shell

Makes an atom a shell that is able to take in an attached circuit.
Vars | |
attached_circuit | The circuitboard attached to this shell |
---|---|
capacity | The capacity of the shell. |
locked | Whether the shell is locked or not |
max_power_use_in_minute | The maximum power that the shell can use in a minute before entering overheating and destroying itself. |
power_used_cooldown | The cooldown time to reset the power_used_in_minute to 0 |
power_used_in_minute | The amount of power used in the last minute |
shell_flags | Flags containing what this shell can do |
unremovable_circuit_components | A list of components that cannot be removed |
Procs | |
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. |
is_authorized | Determines if a user is authorized to see the existance of this shell. Returns false if they are not |
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_set_anchored | Called when the shell is anchored. |
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 |
Var Details
attached_circuit

The circuitboard attached to this shell
capacity

The capacity of the shell.
locked

Whether the shell is locked or not
max_power_use_in_minute

The maximum power that the shell can use in a minute before entering overheating and destroying itself.
power_used_cooldown

The cooldown time to reset the power_used_in_minute to 0
power_used_in_minute

The amount of power used in the last minute
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.
is_authorized
Determines if a user is authorized to see the existance of this shell. Returns false if they are not
Arguments:
- user - The user to check if they are authorized
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_set_anchored
Called when the shell is anchored.
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