Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAllMutatorIds ¶
func GetAllMutatorIds() []string
Types ¶
type Mutator ¶
type Mutator struct {
MutatorId string `yaml:"mutatorid,omitempty"` // Short text that will uniquely identify this modifier ("dusty")
SpawnedRound uint64 `yaml:"spawnedround,omitempty"` // Tracks when this mutator was created (useful for decay)
DespawnedRound uint64 `yaml:"despawnedround,omitempty"` // Track when it decayed to nothing.
}
func (*Mutator) GetSpec ¶
func (m *Mutator) GetSpec() *MutatorSpec
type MutatorList ¶
type MutatorList []Mutator
func (*MutatorList) Add ¶
func (ml *MutatorList) Add(mutName string) bool
func (*MutatorList) GetActive ¶
func (ml *MutatorList) GetActive() MutatorList
Returns a new list containing only active mutators
func (*MutatorList) Has ¶
func (ml *MutatorList) Has(mutName string) bool
func (*MutatorList) Remove ¶
func (ml *MutatorList) Remove(mutName string) bool
func (*MutatorList) Update ¶
func (ml *MutatorList) Update(roundNow uint64)
type MutatorSpec ¶
type MutatorSpec struct {
MutatorId string `yaml:"mutatorid,omitempty"` // Short text that will uniquely identify this modifier ("dusty")
// Text based changes
NameModifier *TextModifier `yaml:"namemodifier,omitempty"`
DescriptionModifier *TextModifier `yaml:"descriptionmodifier,omitempty"`
AlertModifier *TextModifier `yaml:"alertmodifier,omitempty"` // These can only append.
// End text based changes
DecayIntoId string `yaml:"decayintoid,omitempty"` // Id of another Mutator that replaces this one when it decays. This can be a circular behavior.
PlayerBuffIds []int `yaml:"playerbuffids,omitempty"` // buffId's that apply conditionally TO PLAYERS AND PLAYER FOLLOWERS
MobBuffIds []int `yaml:"mobbuffids,omitempty"` // buffId's that apply conditionally TO MOBS
NativeBuffIds []int `yaml:"nativebuffids,omitempty"` // buffId's that apply conditionally TO MOBS THAT SPAWNED IN THIS ROOM
DecayRate string `yaml:"decayrate,omitempty"` // how long until it is gone
RespawnRate string `yaml:"respawnrate,omitempty"` // daily, weekly, 1 day, 3 day, monthly, etc.
LightMod int `yaml:"lightmod,omitempty"` // -2 to 2 (change). If result is 0 = none. 1 = can see this room. 2 = can see this room and all exits
Exits map[string]exit.RoomExit `yaml:"exits,omitempty"` // name/roomId pairs of exits only available while mutator is live.
Pvp PvpOverride `yaml:"pvp,omitempty"` // optionally force room pvp attributes.
}
func GetAllMutatorSpecs ¶
func GetAllMutatorSpecs() []MutatorSpec
func GetMutatorSpec ¶
func GetMutatorSpec(mutatorId string) *MutatorSpec
func (*MutatorSpec) Filename ¶
func (m *MutatorSpec) Filename() string
func (*MutatorSpec) Filepath ¶
func (m *MutatorSpec) Filepath() string
func (*MutatorSpec) Id ¶
func (m *MutatorSpec) Id() string
func (*MutatorSpec) Save ¶
func (m *MutatorSpec) Save() error
func (*MutatorSpec) Validate ¶
func (m *MutatorSpec) Validate() error
type PvpOverride ¶
type TextBehavior ¶
type TextBehavior string
const ( TextPrepend TextBehavior = `prepend` TextAppend TextBehavior = `append` // Default behavior is replace TextReplace TextBehavior = `replace` TextDefault TextBehavior = TextReplace )
func (TextBehavior) IsValid ¶
func (tb TextBehavior) IsValid() bool
type TextModifier ¶
type TextModifier struct {
Behavior TextBehavior `yaml:"behavior,omitempty"` // prepend, append or replace?
Text string `yaml:"text,omitempty"` // The text that will be injected somehow
ColorPattern string `yaml:"colorpattern,omitempty"` // An optional color pattern name to apply
}
Click to show internal directories.
Click to hide internal directories.