Yogstation 13 - Modules - TypesVar Details - Proc Details

hardware

Vars

can_installPrevents direct installation of removable media.
criticalPrevent disabling for important component, like the CPU.
damageCurrent damage level
damage_failure"Failure" threshold. When damage exceeds this value the hardware piece will not work at all.
damage_malfunction"Malfunction" threshold. When damage exceeds this value the hardware piece will semi-randomly fail and do !!FUN!! things
device_typeWhat define is used to qualify this piece of hardware? Important for upgraded versions of the same hardware.
enabledIf the hardware is turned off set this to 0.
expansion_hwHardware that fits into expansion bays.
malfunction_probabilityChance of malfunction when the component is damaged
max_damageMaximal damage level.
power_usageIf the hardware uses extra power, change this.
removableWhether the hardware is removable or not.

Procs

can_installComponent-side compatibility check.
check_functionalityHandles damage checks
diagnosticsCalled on multitool click, prints diagnostic information to the user.
on_installCalled when component is installed into PC.
on_removeCalled when component is removed from PC.
try_ejectCalled when someone tries to eject something from it - card from card reader, etc.
try_insertCalled when someone tries to insert something in it - paper in printer, card in card reader, etc.

Var Details

can_install

Prevents direct installation of removable media.

critical

Prevent disabling for important component, like the CPU.

damage

Current damage level

damage_failure

"Failure" threshold. When damage exceeds this value the hardware piece will not work at all.

damage_malfunction

"Malfunction" threshold. When damage exceeds this value the hardware piece will semi-randomly fail and do !!FUN!! things

device_type

What define is used to qualify this piece of hardware? Important for upgraded versions of the same hardware.

enabled

If the hardware is turned off set this to 0.

expansion_hw

Hardware that fits into expansion bays.

malfunction_probability

Chance of malfunction when the component is damaged

max_damage

Maximal damage level.

power_usage

If the hardware uses extra power, change this.

removable

Whether the hardware is removable or not.

Proc Details

can_install

Component-side compatibility check.

check_functionality

Handles damage checks

diagnostics

Called on multitool click, prints diagnostic information to the user.

on_install

Called when component is installed into PC.

on_remove

Called when component is removed from PC.

try_eject

Called when someone tries to eject something from it - card from card reader, etc.

try_insert

Called when someone tries to insert something in it - paper in printer, card in card reader, etc.