machinery
Vars | |
is_operational | A combination of factors such as having power, not being broken and so on. Boolean. |
---|---|
processing_flags | Viable flags to go here are START_PROCESSING_ON_INIT, or START_PROCESSING_MANUALLY. See code__DEFINES\machines.dm for more information on these flags. |
subsystem_type | What subsystem this machine will use, which is generally SSmachines or SSfastprocess. By default all machinery use SSmachines. This fires a machine's process() roughly every 2 seconds. |
Procs | |
begin_processing | Helper proc for telling a machine to start processing with the subsystem type that is located in its subsystem_type var. |
end_processing | Helper proc for telling a machine to stop processing with the subsystem type that is located in its subsystem_type var. |
on_set_is_operational | Called when the value of is_operational changes, so we can react to it. |
on_set_machine_stat | Called when the value of machine_stat changes, so we can react to it. |
power_change | Called whenever the power settings of the containing area change |
set_is_operational | Called when we want to change the value of the is_operational variable. Boolean. |
set_machine_stat | Called when we want to change the value of the machine_stat variable. Holds bitflags. |
spawn_frame | Spawns a frame where this machine is. If the machine was not disassmbled, the frame is spawned damaged. If the frame couldn't exist on this turf, it's smashed down to metal sheets. |
try_put_in_hand | Puts passed object in to user's hand |
Var Details
is_operational
A combination of factors such as having power, not being broken and so on. Boolean.
processing_flags
Viable flags to go here are START_PROCESSING_ON_INIT, or START_PROCESSING_MANUALLY. See code__DEFINES\machines.dm for more information on these flags.
subsystem_type
What subsystem this machine will use, which is generally SSmachines or SSfastprocess. By default all machinery use SSmachines. This fires a machine's process() roughly every 2 seconds.
Proc Details
begin_processing
Helper proc for telling a machine to start processing with the subsystem type that is located in its subsystem_type
var.
end_processing
Helper proc for telling a machine to stop processing with the subsystem type that is located in its subsystem_type
var.
on_set_is_operational
Called when the value of is_operational
changes, so we can react to it.
on_set_machine_stat
Called when the value of machine_stat
changes, so we can react to it.
power_change
Called whenever the power settings of the containing area change
by default, check equipment channel & set flag, can override if needed
Returns TRUE if the NOPOWER flag was toggled
set_is_operational
Called when we want to change the value of the is_operational
variable. Boolean.
set_machine_stat
Called when we want to change the value of the machine_stat variable. Holds bitflags.
spawn_frame
Spawns a frame where this machine is. If the machine was not disassmbled, the frame is spawned damaged. If the frame couldn't exist on this turf, it's smashed down to metal sheets.
Arguments:
- disassembled - If FALSE, the machine was destroyed instead of disassembled and the frame spawns at reduced integrity.
try_put_in_hand
Puts passed object in to user's hand
Puts the passed object in to the users hand if they are adjacent. If the user is not adjacent then place the object on top of the machine.
Vars:
- object (obj) The object to be moved in to the users hand.
- user (mob/living) The user to recive the object