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

shell

Makes an atom a shell that is able to take in an attached circuit.

Vars

attached_circuitThe circuitboard attached to this shell
capacityThe capacity of the shell.
shell_flagsFlags containing what this shell can do
unremovable_circuit_componentsA list of components that cannot be removed

Procs

attach_circuitAttaches a circuit to the parent. Doesn't do any checks to see for any existing circuits so that should be done beforehand.
on_attack_byCalled when an item hits the parent. This is the method to add the circuitboard to the component.
on_circuit_deleteChecks for when the circuitboard deletes so that it can be unassigned.
on_circuit_movedChecks for when the circuitboard moves. If it moves, removes it from the component.
on_screwdriver_actCalled when a screwdriver is used on the parent. Removes the circuitboard from the component.
on_unfastenCalled when the shell is wrenched.
remove_circuitRemoves the circuit from the component. Doesn't do any checks to see for an existing circuit so that should be done beforehand.
set_lockedSets whether the shell is locked or not

Var Details

attached_circuit

The circuitboard attached to this shell

capacity

The capacity of the shell.

shell_flags

Flags containing what this shell can do

unremovable_circuit_components

A list of components that cannot be removed

Proc Details

attach_circuit

Attaches a circuit to the parent. Doesn't do any checks to see for any existing circuits so that should be done beforehand.

on_attack_by

Called when an item hits the parent. This is the method to add the circuitboard to the component.

on_circuit_delete

Checks for when the circuitboard deletes so that it can be unassigned.

on_circuit_moved

Checks for when the circuitboard moves. If it moves, removes it from the component.

on_screwdriver_act

Called when a screwdriver is used on the parent. Removes the circuitboard from the component.

on_unfasten

Called when the shell is wrenched.

Only applies if the shell has SHELL_FLAG_REQUIRE_ANCHOR. Disables the integrated circuit if unanchored, otherwise enable the circuit.

remove_circuit

Removes the circuit from the component. Doesn't do any checks to see for an existing circuit so that should be done beforehand.

set_locked

Sets whether the shell is locked or not