random
Base class for all random spawners.
Vars | |
anchored | Stops persistent lootdrop spawns from being shoved into lockers |
---|---|
loot | A list of possible items to spawn e.g. list(/obj/item, /obj/structure, /obj/effect) |
loot_subtype_path | The subtypes (this excludes the provided path) to combine with the loot list |
loot_type_path | The subtypes AND type to combine with the loot list |
spawn_all_loot | Whether the spawner should spawn all the loot in the list |
spawn_loot_chance | The chance for the spawner to create loot (ignores spawn_loot_count) |
spawn_loot_count | How many items will be spawned |
spawn_loot_double | If the same item can be spawned twice |
spawn_loot_split | Whether the items should be distributed to offsets 0,1,-1,2,-2,3,-3.. This overrides pixel_x/y on the spawner itself |
spawn_on_init | Whether the spawner should immediately spawn loot and cleanup on Initialize() |
spawn_random_offset | Whether the items should have a random pixel_x/y offset (maxium offset distance is ±16 pixels for x/y) |
spawn_scatter_radius | Determines how big of a range (in tiles) we should scatter things in. |
Procs | |
get_spawn_locations | If the spawner has a spawn_scatter_radius set, this creates a list of nearby turfs available |
spawn_loot | If the spawner has any loot defined, randomly picks some and spawns it. Does not cleanup the spawner. |
Var Details
anchored
Stops persistent lootdrop spawns from being shoved into lockers
loot
A list of possible items to spawn e.g. list(/obj/item, /obj/structure, /obj/effect)
loot_subtype_path
The subtypes (this excludes the provided path) to combine with the loot list
loot_type_path
The subtypes AND type to combine with the loot list
spawn_all_loot
Whether the spawner should spawn all the loot in the list
spawn_loot_chance
The chance for the spawner to create loot (ignores spawn_loot_count)
spawn_loot_count
How many items will be spawned
spawn_loot_double
If the same item can be spawned twice
spawn_loot_split
Whether the items should be distributed to offsets 0,1,-1,2,-2,3,-3.. This overrides pixel_x/y on the spawner itself
spawn_on_init
Whether the spawner should immediately spawn loot and cleanup on Initialize()
spawn_random_offset
Whether the items should have a random pixel_x/y offset (maxium offset distance is ±16 pixels for x/y)
spawn_scatter_radius
Determines how big of a range (in tiles) we should scatter things in.
Proc Details
get_spawn_locations
If the spawner has a spawn_scatter_radius set, this creates a list of nearby turfs available
spawn_loot
If the spawner has any loot defined, randomly picks some and spawns it. Does not cleanup the spawner.