Documentation
¶
Index ¶
- Variables
- func Colorize(color Color, text string) string
- func ProcessColors(text string, cm ColorMode) string
- func StripColors(text string) string
- type Area
- type AreaList
- type Character
- type CharacterList
- type Color
- type ColorMode
- type Communicable
- type Container
- type Coordinate
- type Destroyable
- type Direction
- type Effect
- type EffectKind
- type EffectList
- type Id
- type Identifiable
- type Item
- type ItemList
- type Locateable
- type Loginable
- type NPC
- type NPCList
- type Nameable
- type Object
- type ObjectType
- type PC
- type PCList
- type Purchaser
- type ReadLockable
- type Room
- type RoomList
- type Skill
- type SkillList
- type Spawner
- type SpawnerList
- type Store
- type Template
- type TemplateList
- type Time
- type User
- type UserList
- type World
- type Zone
- type ZoneList
Constants ¶
This section is empty.
Variables ¶
View Source
var ColorRegex = regexp.MustCompile("([@#][0-6]|@@|##)")
View Source
var Lookup = map[Color]bool{ ColorRed: true, ColorGreen: true, ColorYellow: true, ColorBlue: true, ColorMagenta: true, ColorCyan: true, ColorWhite: true, ColorDarkRed: true, ColorDarkGreen: true, ColorDarkYellow: true, ColorDarkBlue: true, ColorDarkMagenta: true, ColorDarkCyan: true, ColorBlack: true, ColorGray: true, ColorNormal: true, }
Functions ¶
func ProcessColors ¶
Strips MUD color codes and replaces them with ansi color codes
func StripColors ¶
Types ¶
type CharacterList ¶
type CharacterList []Character
func (CharacterList) Names ¶
func (self CharacterList) Names() []string
type Color ¶
type Color string
const ( ColorRed Color = "@0" ColorGreen Color = "@1" ColorYellow Color = "@2" ColorBlue Color = "@3" ColorMagenta Color = "@4" ColorCyan Color = "@5" ColorWhite Color = "@6" ColorDarkRed Color = "#0" ColorDarkGreen Color = "#1" ColorDarkYellow Color = "#2" ColorDarkBlue Color = "#3" ColorDarkMagenta Color = "#4" ColorDarkCyan Color = "#5" ColorBlack Color = "#6" ColorGray Color = "@@" ColorNormal Color = "##" )
type Communicable ¶
type Coordinate ¶
func (*Coordinate) Next ¶
func (self *Coordinate) Next(direction Direction) Coordinate
type Destroyable ¶
type Destroyable interface { Destroy() IsDestroyed() bool }
type Direction ¶
type Direction string
const ( DirectionNorth Direction = "North" DirectionNorthEast Direction = "NorthEast" DirectionEast Direction = "East" DirectionSouthEast Direction = "SouthEast" DirectionSouth Direction = "South" DirectionSouthWest Direction = "SouthWest" DirectionWest Direction = "West" DirectionNorthWest Direction = "NorthWest" DirectionUp Direction = "Up" DirectionDown Direction = "Down" DirectionNone Direction = "None" )
func StringToDirection ¶
type EffectKind ¶
type EffectKind string
const ( HitpointEffect EffectKind = "hitpoint" SilenceEffect EffectKind = "silence" StunEffect EffectKind = "stun" )
type EffectList ¶
type EffectList []Effect
func (EffectList) Names ¶
func (self EffectList) Names() []string
type Identifiable ¶
type Identifiable interface {
GetId() Id
}
type Locateable ¶
type Locateable interface {
GetRoomId() Id
}
type NPCList ¶
type NPCList []NPC
func (NPCList) Characters ¶
func (self NPCList) Characters() CharacterList
type Object ¶
type Object interface { Identifiable ReadLockable Destroyable SetId(Id) }
type ObjectType ¶
type ObjectType string
const ( NpcType ObjectType = "Npc" PcType ObjectType = "Pc" SpawnerType ObjectType = "Spawner" UserType ObjectType = "User" ZoneType ObjectType = "Zone" AreaType ObjectType = "Area" RoomType ObjectType = "Room" TemplateType ObjectType = "Template" ItemType ObjectType = "Item" SkillType ObjectType = "Skill" EffectType ObjectType = "Effect" StoreType ObjectType = "Store" WorldType ObjectType = "World" )
type PCList ¶
type PCList []PC
func (PCList) Characters ¶
func (self PCList) Characters() CharacterList
type ReadLockable ¶
type ReadLockable interface { ReadLock() ReadUnlock() }
type Room ¶
type Room interface { Object Container GetZoneId() Id GetAreaId() Id SetAreaId(Id) GetLocation() Coordinate SetExitEnabled(Direction, bool) HasExit(Direction) bool NextLocation(Direction) Coordinate GetExits() []Direction GetTitle() string SetTitle(string) GetDescription() string SetDescription(string) SetLink(string, Id) RemoveLink(string) GetLinks() map[string]Id LinkNames() []string SetLocked(Direction, bool) IsLocked(Direction) bool }
type SpawnerList ¶
type SpawnerList []Spawner
type TemplateList ¶
type TemplateList []Template
func (TemplateList) Len ¶
func (self TemplateList) Len() int
func (TemplateList) Less ¶
func (self TemplateList) Less(i, j int) bool
func (TemplateList) Names ¶
func (self TemplateList) Names() []string
func (TemplateList) Swap ¶
func (self TemplateList) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.