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 |
record_spawn | Whether blackbox should record when the spawner spawns. |
spawn_all_loot | Whether the spawner should spawn all the loot in the list |
spawn_inside | Where do we want to spawn an item (closet, safe etc.) |
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_loot_split_pixel_offsets | The pixel x/y divider offsets for spawn_loot_split (spaced 1 pixel apart by default) |
spawn_random_angle | Whether the spawned items should be rotated randomly. |
spawn_random_offset | Whether the items should have a random pixel_x/y offset (maximum offset distance is ± spawn_random_offset_max_pixels for x/y) |
spawn_random_offset_max_pixels | Maximum offset distance for random pixel offsets. |
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 that are in view and have an unblocked line to them. |
make_item | Makes the actual item related to our spawner. If record_spawn is TRUE ,
this is when the items spawned are recorded to blackbox (except for /obj/effect s). |
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
record_spawn
Whether blackbox should record when the spawner spawns.
spawn_all_loot
Whether the spawner should spawn all the loot in the list
spawn_inside
Where do we want to spawn an item (closet, safe etc.)
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_loot_split_pixel_offsets
The pixel x/y divider offsets for spawn_loot_split (spaced 1 pixel apart by default)
spawn_random_angle
Whether the spawned items should be rotated randomly.
spawn_random_offset
Whether the items should have a random pixel_x/y offset (maximum offset distance is ± spawn_random_offset_max_pixels for x/y)
spawn_random_offset_max_pixels
Maximum offset distance for random pixel offsets.
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 that are in view and have an unblocked line to them.
make_item
Makes the actual item related to our spawner. If record_spawn
is TRUE
,
this is when the items spawned are recorded to blackbox (except for /obj/effect
s).
spawn_loc - where are we spawning it? type_path_to_make - what are we spawning?
spawn_loot
If the spawner has any loot defined, randomly picks some and spawns it. Does not cleanup the spawner.