vending

Vars | |
active | No sales pitches if off |
---|---|
ads_list | Unimplemented list of ads that are meant to show up somewhere, but don't. |
aggressive | If the vendor should tip on anyone who walks by. Mainly used for brand intelligence |
aggressive_slogan_delay | How often slogans will be used by vendors if they're aggressive. |
category | The category of this vendor. Used for announcing brand intelligence. |
crit_damage_factor | Factor of extra damage to deal when triggering a crit |
currently_vending | Item currently being bought |
emagged | Allows people to access a vendor that's normally access restricted. |
extended_inventory | can we access the hidden inventory? |
flickering | blocks further flickering while true |
force_no_power_icon_state | do I look unpowered, even when powered? |
hit_warning_cooldown_length | How long to wait before resetting the warning cooldown |
icon_addon | Icon to be an overlay over the base sprite |
icon_broken | Icon for the broken overlay, defaults to icon_state + _broken |
icon_deny | Icon_state when denying access |
icon_lightmask | Icon for the lightmask, defaults to icon_state + _off, _lightmask if one is defined. |
icon_off | Icon for the off overlay, defaults to icon_state + _off |
icon_panel | Icon for the panel overlay, defaults to icon_state + _panel |
icon_vend | Icon_state when vending |
inserted_item | the actual item inserted |
item_slot | boolean, whether this vending machine can accept people inserting items into it, used for coffee vendors |
last_hit_time | Last time the machine was punched |
num_shards | number of shards to apply when a crit embeds |
scan_id | If true, enforce access checks on customers. Disabled by messing with wires. |
seconds_electrified | Shocks people like an airlock |
self_knockover_factor | Factor of extra damage to deal when you knock it over onto yourself |
shoot_chance | How often are we firing the items? (prob(...)) |
shoot_inventory | Fire items at customers! We're broken! |
shoot_speed | How hard are we firing the items? |
shut_up | If true, prevent saying sales pitches |
slogan_list | List of slogans the vendor will say, optional |
squish_damage | Amount of damage to deal when tipped |
tiltable | If this vending machine can be tipped or not |
tilted | If this vendor is currently tipped |
vend_delay | How long vendor takes to vend one item. |
vend_ready | If off, vendor is busy and unusable until current action finishes |
vendor_account | the money account that is tethered to this vendor |
Procs | |
build_inventory | Build src.produdct_records from the products lists |
refill_inventory | Refill our inventory from the passed in product list into the record list |
restock | Refill a vending machine from a refill canister |
unbuild_inventory | Given a record list, go through and and return a list of type -> amount |
update_canister | Set up a refill canister that matches this machines products |
Var Details
active

No sales pitches if off
ads_list

Unimplemented list of ads that are meant to show up somewhere, but don't.
aggressive

If the vendor should tip on anyone who walks by. Mainly used for brand intelligence
aggressive_slogan_delay

How often slogans will be used by vendors if they're aggressive.
category

The category of this vendor. Used for announcing brand intelligence.
crit_damage_factor

Factor of extra damage to deal when triggering a crit
currently_vending

Item currently being bought
emagged

Allows people to access a vendor that's normally access restricted.
extended_inventory

can we access the hidden inventory?
flickering

blocks further flickering while true
force_no_power_icon_state

do I look unpowered, even when powered?
hit_warning_cooldown_length

How long to wait before resetting the warning cooldown
icon_addon

Icon to be an overlay over the base sprite
icon_broken

Icon for the broken overlay, defaults to icon_state + _broken
icon_deny

Icon_state when denying access
icon_lightmask

Icon for the lightmask, defaults to icon_state + _off, _lightmask if one is defined.
icon_off

Icon for the off overlay, defaults to icon_state + _off
icon_panel

Icon for the panel overlay, defaults to icon_state + _panel
icon_vend

Icon_state when vending
inserted_item

the actual item inserted
item_slot

boolean, whether this vending machine can accept people inserting items into it, used for coffee vendors
last_hit_time

Last time the machine was punched
num_shards

number of shards to apply when a crit embeds
scan_id

If true, enforce access checks on customers. Disabled by messing with wires.
seconds_electrified

Shocks people like an airlock
self_knockover_factor

Factor of extra damage to deal when you knock it over onto yourself
shoot_chance

How often are we firing the items? (prob(...))
shoot_inventory

Fire items at customers! We're broken!
shoot_speed

How hard are we firing the items?
shut_up

If true, prevent saying sales pitches
slogan_list

List of slogans the vendor will say, optional
squish_damage

Amount of damage to deal when tipped
tiltable

If this vending machine can be tipped or not
tilted

If this vendor is currently tipped
vend_delay

How long vendor takes to vend one item.
vend_ready

If off, vendor is busy and unusable until current action finishes
vendor_account

the money account that is tethered to this vendor
Proc Details
build_inventory
Build src.produdct_records from the products lists
src.products, src.contraband, src.premium, and src.prices allow specifying products that the vending machine is to carry without manually populating src.product_records.
refill_inventory
Refill our inventory from the passed in product list into the record list
Arguments:
- productlist - list of types -> amount
- recordlist - existing record datums
restock
Refill a vending machine from a refill canister
This takes the products from the refill canister and then fills the products,contraband and premium product categories
Arguments:
- canister - the vending canister we are refilling from
unbuild_inventory
Given a record list, go through and and return a list of type -> amount
update_canister
Set up a refill canister that matches this machines products
This is used when the machine is deconstructed, so the items aren't "lost"