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

vent_clog

Vars

filth_spawn_typesThe list of decals we will choose from to spawn when producing a mob
living_mobsUsed to track/limit produced mobs.
maximum_spawnsCap on the number of spawned mobs that can be alive at once.
spawn_delayInterval between mob spawns.
spawned_mobWhat mob will be spawned
ventVent selected for the event.

Procs

attempt_unclogHandles the actual unclogging action and ends the event on completion.
clear_signalsClears the signals related to the event, before we wrap things up.
clog_ventHandles the initial steps of clogging a vent, either at event start or when the vent moves.
get_mobSelects which mob will be spawned for a given vent clog event.
get_ventFinds a valid vent to spawn mobs from.
life_checkChecks which mobs in the mob spawn list are alive.
plunger_unclogSignal catcher for plunger_act()
produce_mobHandles the production of our mob and adds it to our living_mobs list
vent_moveFinds a new vent for the event if the original is destroyed.

Var Details

filth_spawn_types

The list of decals we will choose from to spawn when producing a mob

living_mobs

Used to track/limit produced mobs.

maximum_spawns

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

spawn_delay

Interval between mob spawns.

spawned_mob

What mob will be spawned

vent

Vent selected for the event.

Proc Details

attempt_unclog

Handles the actual unclogging action and ends the event on completion.

clear_signals

Clears the signals related to the event, before we wrap things up.

clog_vent

Handles the initial steps of clogging a vent, either at event start or when the vent moves.

get_mob

Selects which mob will be spawned for a given vent 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_vent

Finds a valid vent to spawn mobs from.

Randomly selects a vent that is on-station, unwelded, and hosted by a passable turf. If no vents are found, the event is immediately killed.

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.

plunger_unclog

Signal catcher for plunger_act()

produce_mob

Handles the production of our mob and adds it to our living_mobs list

Used by the vent clog random event to handle the spawning of mobs. The proc receives the mob that will be spawned, and the event's current list of living mobs produced by the event so far. After checking if the vent is welded, the new mob is created on the vent's turf, then added to the living_mobs list.

vent_move

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

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