/tg/ Station 13 - Modules - TypesVar Details - Proc Details

simple_spawner

Spawns objects, mobs, whatever with all the necessary code to make it hit and/or miss the shuttle

Vars

remove_from_list_when_spawnedIf set to TRUE, every time an object is spawned their weight is decreased untill they are removed
self_destruct_when_emptyIf set to true, we'll delete ourselves if we cant spawn anything anymore. Useful in conjunction with remove_from_list_when_spawned
spawn_probability_per_processChance, from 0 to 100, for something to spawn
spawning_flagsbehaviour of spawning objects, if we spawn
spawning_listweighted list with spawnable movables
spawning_turfs_hitList of valid spawning turfs, generated from generate_spawning_turfs(), that will HIT the shuttle
spawning_turfs_missList of valid spawning turfs, generated from generate_spawning_turfs(), that will MISS the shuttle
spawns_per_spawnIncrement if you want more stuff to spawn at once

Procs

generate_spawning_turfsBounding coords are list(x0, y0, x1, y1) where x0 and y0 are top-left
get_spawn_turfPick a random turf from the valid turfs we got. Overwrite if you need some custom picking
get_type_to_spawnNot technically a getter if remove_from_list_when_spawned=TRUE. Otherwise, this returns the type we're going to spawn and throw at the shuttle
post_spawnDo any post-spawn edits you need to do
spawn_movableSpawn stuff! if you're not using this, don't use the simple_spawner subtype

Var Details

remove_from_list_when_spawned

If set to TRUE, every time an object is spawned their weight is decreased untill they are removed

self_destruct_when_empty

If set to true, we'll delete ourselves if we cant spawn anything anymore. Useful in conjunction with remove_from_list_when_spawned

spawn_probability_per_process

Chance, from 0 to 100, for something to spawn

spawning_flags

behaviour of spawning objects, if we spawn

spawning_list

weighted list with spawnable movables

spawning_turfs_hit

List of valid spawning turfs, generated from generate_spawning_turfs(), that will HIT the shuttle

spawning_turfs_miss

List of valid spawning turfs, generated from generate_spawning_turfs(), that will MISS the shuttle

spawns_per_spawn

Increment if you want more stuff to spawn at once

Proc Details

generate_spawning_turfs

Bounding coords are list(x0, y0, x1, y1) where x0 and y0 are top-left

get_spawn_turf

Pick a random turf from the valid turfs we got. Overwrite if you need some custom picking

get_type_to_spawn

Not technically a getter if remove_from_list_when_spawned=TRUE. Otherwise, this returns the type we're going to spawn and throw at the shuttle

post_spawn

Do any post-spawn edits you need to do

spawn_movable

Spawn stuff! if you're not using this, don't use the simple_spawner subtype