spawner 
Vars | |
| completed_waves | Number of waves of mobs that have been spawned. Only tracked with SPAWN_BY_WAVE_BEHAVIOR. |
|---|---|
| effect | Visual Effect to spawn before the mobs spawn in that location. |
| faction | Faction to grant to mobs (only applies to mobs) |
| linked_mob | Reference a mob that should it die, we'll stop the spawner component from functioning. |
| max_spawn_per_attempt | How many mobs can we spawn maximum each time we try to spawn? (1 - max) This number is applied |
| max_spawn_types_per_attempt | How many types of mobs, taken from spawn_types, will be spawned in every spawn attempt? |
| max_spawned | Maximum number of atoms we can have active at one time |
| max_waves | If using SPAWN_BY_WAVE_BEHAVIOR, how many waves should spawn before the spawner component shuts down? |
| sound_effect | Audio path to play when spawning new mobs. |
| spawn_callback | Callback to a proc that is called when a mob is spawned. Primarily used for sentient spawners. |
| spawn_distance | Distance from the spawner to spawn mobs |
| spawn_distance_exclude | Distance from the spawner to exclude mobs from spawning |
| spawn_text | Visible message to show when something spawns |
| spawn_time | Time to wait between spawns |
| spawn_types | List of atom types to spawn, picked randomly |
| spawn_windup | How long of a pause do we use between the effect spawning, and the mob spawning. |
| spawned_things | List of weak references to things we have already created |
| spawner_logic | What type of behavior does this spawner have? |
Procs | |
| check_spawn_availability | Determine if we can spawn a mob based on the current spawn logic. |
| delayed_mob_spawn | Adds handling to the created mob from the spawner component, such as adding to spawned_things list, weakrefs to the spawned_things list, and registering relevant signals. |
| mob_death | Called when a mob we spawned dies, remove it from the list and unregister signals |
| on_deleted | Called when an atom we spawned is deleted, remove it from the list |
| select_turf | This proc determines the tile that a spawner will place a mob on. @param: atom/spawner: typed definition of the parent, used to send a signal in case a mob spawns to the default position, as well as center our circles to pick turfs from. |
| setup_spawned_mob | Registers signals and flags onto a component spawned mob, to keep track of the spawned mob, as well as prevent them from getting treated as naturally spawned. @param: mob/spawned_mob: Mob to have signals sent to/registered onto. @param: atom/spawner: |
| stop_spawning | Stop spawning mobs |
| try_spawn_mob | Try to create a new mob |
| validate_references | Remove weakrefs to atoms which have been killed or deleted without us picking it up somehow |
Var Details
completed_waves 
Number of waves of mobs that have been spawned. Only tracked with SPAWN_BY_WAVE_BEHAVIOR.
effect 
Visual Effect to spawn before the mobs spawn in that location.
faction 
Faction to grant to mobs (only applies to mobs)
linked_mob 
Reference a mob that should it die, we'll stop the spawner component from functioning.
max_spawn_per_attempt 
How many mobs can we spawn maximum each time we try to spawn? (1 - max) This number is applied
max_spawn_types_per_attempt 
How many types of mobs, taken from spawn_types, will be spawned in every spawn attempt?
max_spawned 
Maximum number of atoms we can have active at one time
max_waves 
If using SPAWN_BY_WAVE_BEHAVIOR, how many waves should spawn before the spawner component shuts down?
sound_effect 
Audio path to play when spawning new mobs.
spawn_callback 
Callback to a proc that is called when a mob is spawned. Primarily used for sentient spawners.
spawn_distance 
Distance from the spawner to spawn mobs
spawn_distance_exclude 
Distance from the spawner to exclude mobs from spawning
spawn_text 
Visible message to show when something spawns
spawn_time 
Time to wait between spawns
spawn_types 
List of atom types to spawn, picked randomly
spawn_windup 
How long of a pause do we use between the effect spawning, and the mob spawning.
spawned_things 
List of weak references to things we have already created
spawner_logic 
What type of behavior does this spawner have?
Proc Details
check_spawn_availability
Determine if we can spawn a mob based on the current spawn logic.
delayed_mob_spawn
Adds handling to the created mob from the spawner component, such as adding to spawned_things list, weakrefs to the spawned_things list, and registering relevant signals.
@param: turf/picked_spot: Turf to spawn the mob onto. @param: mob/chosen_mob_type: Type of mob to spawn. @param: atom/spawner: type definition of parent, passed for further setup on setup_spawned_mob.
mob_death
Called when a mob we spawned dies, remove it from the list and unregister signals
on_deleted
Called when an atom we spawned is deleted, remove it from the list
select_turf
This proc determines the tile that a spawner will place a mob on. @param: atom/spawner: typed definition of the parent, used to send a signal in case a mob spawns to the default position, as well as center our circles to pick turfs from.
setup_spawned_mob
Registers signals and flags onto a component spawned mob, to keep track of the spawned mob, as well as prevent them from getting treated as naturally spawned. @param: mob/spawned_mob: Mob to have signals sent to/registered onto. @param: atom/spawner:
stop_spawning
Stop spawning mobs
try_spawn_mob
Try to create a new mob
validate_references
Remove weakrefs to atoms which have been killed or deleted without us picking it up somehow