computer_hardware

Vars | |
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 |
power_usage | If the hardware uses extra power, change this. |
removable | Whether the hardware is removable or not. |
Procs | |
can_install | Component-side compatibility check. |
check_functionality | Handles damage checks |
diagnostics | Called on multitool click, prints diagnostic information to the user. |
enable_changed | Called when the device's enablement changes state. |
on_install | Called when component is installed into PC. |
on_remove | Called when component is removed from PC. |
try_eject | Implement this when your hardware contains an object that the user can eject. |
try_insert | Called 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
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.
enable_changed
Called when the device's enablement changes state.
on_install
Called when component is installed into PC.
on_remove
Called when component is removed from PC.
try_eject
Implement this when your hardware contains an object that the user can eject.
Examples include ejecting cells from battery modules, ejecting an ID card from a card reader or ejecting an Intellicard from an AI card slot. Arguments:
- user - The mob requesting the eject.
- forced - Whether this action should be forced in some way.
try_insert
Called when someone tries to insert something in it - paper in printer, card in card reader, etc.