Smart Fridge

Stores items of a specified type.
Vars | |
accepted_items_typecache | Typecache of accepted item types, init it in [/obj/machinery/smartfridge/Initialize]. |
---|---|
board_type | The type of the circuitboard dropped on deconstruction. This is how to avoid getting subtypes into the board. |
can_dry | Whether the fridge can dry its' contents. Used for display. |
drop_contents_on_delete | Do we drop contents on destroy? |
drying | Whether the fridge is currently drying. Used by drying racks. |
is_secure | Whether the fridge is considered secure. Used for wiring and display. |
item_quants | Associative list (/text => /number) tracking the amounts of a specific item held by the fridge. |
max_n_of_items | The maximum number of items the fridge can hold. Multiplicated by the matter bin component's rating. |
scan_id | Whether the fridge requires ID scanning. Used for the secure variant of the fridge. |
seconds_electrified | How long in ticks the fridge is electrified for. Decrements every process. |
shoot_inventory | Whether the fridge should randomly shoot held items at a nearby living target or not. |
silicon_controllable | Whether the fridge is electric and thus silicon controllable. |
starting_items | Associative list (/obj/item => /number) representing the items the fridge should initially contain. |
visible_contents | Whether the fridge's contents are visible on the world icon. |
wires | The wires controlling the fridge. |
Procs | |
accept_check | Returns whether the smart fridge can accept the given item. |
load | Tries to load an item if it is accepted by /obj/machinery/smartfridge/proc/accept_check. |
throw_item | Tries to shoot a random at a nearby living mob. |
Var Details
accepted_items_typecache

Typecache of accepted item types, init it in [/obj/machinery/smartfridge/Initialize].
board_type

The type of the circuitboard dropped on deconstruction. This is how to avoid getting subtypes into the board.
can_dry

Whether the fridge can dry its' contents. Used for display.
drop_contents_on_delete

Do we drop contents on destroy?
drying

Whether the fridge is currently drying. Used by drying racks.
is_secure

Whether the fridge is considered secure. Used for wiring and display.
item_quants

Associative list (/text => /number) tracking the amounts of a specific item held by the fridge.
max_n_of_items

The maximum number of items the fridge can hold. Multiplicated by the matter bin component's rating.
scan_id

Whether the fridge requires ID scanning. Used for the secure variant of the fridge.
seconds_electrified

How long in ticks the fridge is electrified for. Decrements every process.
shoot_inventory

Whether the fridge should randomly shoot held items at a nearby living target or not.
silicon_controllable

Whether the fridge is electric and thus silicon controllable.
starting_items

Associative list (/obj/item => /number) representing the items the fridge should initially contain.
visible_contents

Whether the fridge's contents are visible on the world icon.
wires

The wires controlling the fridge.
Proc Details
accept_check
Returns whether the smart fridge can accept the given item.
By default checks if the item is in the typecache. Arguments:
- O - The item to check.
load
Tries to load an item if it is accepted by /obj/machinery/smartfridge/proc/accept_check.
Arguments:
- I - The item to load.
- user - The user trying to load the item.
throw_item
Tries to shoot a random at a nearby living mob.