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

trapdoor

trapdoor component!

component attached to floors to turn them into trapdoors, a constructable trap that when signalled drops people to the level below. assembly code at the bottom of this file

Vars

assemblyassembly tied to this trapdoor
autocloseTrapdoor shuts close automatically
autoclose_delayDelay before trapdoor shuts close
conspicuousis this trapdoor "conspicuous" (ie. it gets examine text and overlay added)
stored_decalslist of lists that are arguments for readding decals when the linked trapdoor comes back. pain.
trapdoor_overlayoverlay that makes trapdoors more obvious
trapdoor_turf_pathpath of the turf this should change into when the assembly is pulsed. needed for openspace trapdoors knowing what to turn back into

Procs

apply_decalsmall proc that takes passed arguments and drops it into a new element
carry_over_trapdoor
on_examine
on_link_requestedcalled by linking remotes to tie an assembly to the trapdoor
openspace_trapdoor_setupinitializing as an opened trapdoor, we need to trust that we were given the data by a closed trapdoor
reapply_all_decals
tile_trapdoor_setupinitializing as a closed trapdoor, we need to take data from the tile we're on to give it to the open state to store
toggle_trapdoorsignal called by our assembly being pulsed
try_closing
try_opening
turf_changed_presignal called by turf changing

Var Details

assembly

assembly tied to this trapdoor

autoclose

Trapdoor shuts close automatically

autoclose_delay

Delay before trapdoor shuts close

conspicuous

is this trapdoor "conspicuous" (ie. it gets examine text and overlay added)

stored_decals

list of lists that are arguments for readding decals when the linked trapdoor comes back. pain.

we are storing this data FOR the trapdoor component we are linked to. kinda like a multitool. format: list(list(element's description, element's cleanable, element's directional, element's pic)) the list will be filled with all the data of the deleting elements (when ChangeTurf is called) only when the trapdoor begins to open. so any other case the elements will be changed but not recorded.

trapdoor_overlay

overlay that makes trapdoors more obvious

trapdoor_turf_path

path of the turf this should change into when the assembly is pulsed. needed for openspace trapdoors knowing what to turn back into

Proc Details

apply_decal

small proc that takes passed arguments and drops it into a new element

carry_over_trapdoor

carry_over_trapdoor

applies the trapdoor to the new turf (created by the last trapdoor) apparently callbacks with arguments on invoke and the callback itself have the callback args go first. interesting!

on_examine

on_examine

examine message for conspicuous trapdoors that makes it obvious

called by linking remotes to tie an assembly to the trapdoor

openspace_trapdoor_setup

initializing as an opened trapdoor, we need to trust that we were given the data by a closed trapdoor

reapply_all_decals

reapply_all_decals

changing turfs does not bring over decals, so we must perform a little bit of element reapplication.

tile_trapdoor_setup

initializing as a closed trapdoor, we need to take data from the tile we're on to give it to the open state to store

toggle_trapdoor

signal called by our assembly being pulsed

try_closing

try_closing

small proc for closing the turf back into what it should be trapdoor can be blocked by building things on the openspace turf

try_opening

try_opening

small proc for opening the turf into openspace there are no checks for opening a trapdoor, but closed has some

turf_changed_pre

signal called by turf changing