Documentation ¶
Index ¶
Constants ¶
View Source
const ( DefaultConfigFile = "spawnsCfg.yaml" DefaultTickLengthS = 5 DefaultReapTicks = 60 // 5 minutes @ 5-second ticks )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ActorPrototype ¶
type ActorPrototype struct { Name string BrainType string Attributes core.AttributeSet Skills core.Skillset InventoryConstraints core.ActorInventoryConstraints }
type Service ¶
type Service struct { World *core.World BrainSvc *brain.Service // How often, in seconds, to check for objects that need reaping, and // actors that need spawning TickLengthS int // How many ticks to leave an object in-place before reaping it ReapTicks int // Full path to config file for Actor spawns ConfigFile string // contains filtered or unexported fields }
func (*Service) GetSpawnConfigForZone ¶
func (s *Service) GetSpawnConfigForZone(zone *core.Zone) []SpawnSpecification
func (*Service) PutSpawnConfigForZone ¶
func (s *Service) PutSpawnConfigForZone(specList []SpawnSpecification, zone *core.Zone) error
type SpawnSpecification ¶
type SpawnSpecification struct { ActorProto ActorPrototype MaxCount int MaxSpawnAtOneTime int SpawnChancePerTick float64 }
Click to show internal directories.
Click to hide internal directories.