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

scrubber_clog

Vars

cloggedUsed for tracking if the clog signal should be sent.
living_mobsUsed to track/limit produced mobs.
maximum_spawnsCap on the number of spawned mobs that can be alive at once.
scrubberScrubber selected for the event.
spawn_delayInterval between mob spawns.
spawned_mobWhat mob will be spawned

Procs

get_mobSelects which mob will be spawned for a given scrubber clog event.
get_scrubberFinds a valid scrubber for the scrubber clog event.
life_checkChecks which mobs in the mob spawn list are alive.
scrubber_moveFinds a new scrubber for the event if the original is destroyed.

Var Details

clogged

Used for tracking if the clog signal should be sent.

living_mobs

Used to track/limit produced mobs.

maximum_spawns

Cap on the number of spawned mobs that can be alive at once.

scrubber

Scrubber selected for the event.

spawn_delay

Interval between mob spawns.

spawned_mob

What mob will be spawned

Proc Details

get_mob

Selects which mob will be spawned for a given scrubber clog event.

Creates a static list of mobs, which is different based on the severity of the event being run, and returns a pick() of it.

get_scrubber

Finds a valid scrubber for the scrubber clog event.

For every scrubber in the round, checks if the scrubber turf is on-station, and is neither welded nor already clogged, and adds it to a list. A random scrubber is picked from this list, and returned as the scrubber that will be used for the event.

life_check

Checks which mobs in the mob spawn list are alive.

Checks each mob in the living_mobs list, to see if they're dead or not. If dead, they're removed from the list. This is used to keep new mobs spawning as the old ones die.

scrubber_move

Finds a new scrubber for the event if the original is destroyed.

This is used when the scrubber for the event is destroyed. It picks a new scrubber and announces that the event has moved elsewhere. Handles the scrubber ref if there are no valid scrubbers to replace it with.