vending 
Vars | |
active | No sales pitches if off |
---|---|
aggressive | If the vendor should tip on anyone who walks by. Mainly used for brand intelligence |
all_possible_crits | All possible crits that could be applied. We only need to build this up once |
broken_lightmask_overlay | Special lightmask for broken overlay. If vendor is BROKEN, but not dePOWERED we will see this, instead of lightmask_overlay . |
broken_overlay | Damage overlay applied if vendor is damaged enough. |
coin | Holder for a coin inserted into the vendor |
contraband | List of products this machine sells when you hack it |
crit_damage_factor | Factor of extra damage to deal when triggering a crit |
currently_vending | Item currently being bought |
deny_lightmask | Special lightmask that will override default lightmask_overlay , while machine is denying its wares. |
deny_overlay | Overlay applied when machine is denying its wares. |
deny_overlay_time | Amount of time until denying sequence is reseted. |
extended_inventory | can we access the hidden inventory? |
flick_sequence | Flags used to correctly manipulate with vend/deny sequences. |
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 |
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 | Cooldown for warning cooldowns |
last_slogan | When did we last pitch? |
lightmask_overlay | Lightmask used when vendor is working properly. |
num_shards | number of shards to apply when a crit embeds |
panel_overlay | Overlay of vendor maintenance panel. |
possible_crits | Possible crit effects from this vending machine tipping. |
premium | List of premium products this machine sells |
prices | Prices for each item, list(/type/path = price), items not in the list don't have a price. |
product_categories | List of products this machine sells, categorized.
Can only be used as an alternative to products , not alongside it. |
products | List of products this machine sells |
refill_canister | The type of refill canisters used by this machine. |
scan_id | If true, enforce access checks on customers. Disabled by messing with wires. |
screen_overlay | Overlay of a vendor screen, will not apply of stat is NOPOWER. |
seconds_electrified | Allows people to access a vendor that's normally access restricted. 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 |
skip_non_primary_icon_updates | If TRUE machine will only react to BROKEN/NOPOWER stat, when updating overlays. |
slogan_delay | How long until we can pitch again? |
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 |
tilted_rotation | If tilted, this variable should always be the rotation that was applied when we were tilted. Stored for the purposes of unapplying it. |
vend_delay | How long vendor takes to vend one item. |
vend_lightmask | Special lightmask that will override default lightmask_overlay , while machine is vending goods. |
vend_overlay | Overlay applied when machine is vending goods. |
vend_overlay_time | Amount of time until vending sequence is reseted. |
vend_ready | If off, vendor is busy and unusable until current action finishes |
vend_reply | "Спас+ибо за пок+упку!" type phrases |
Procs | |
RefreshParts | Better would be to make constructable child |
build_inventories | *Builds all available inventories for the vendor - standard, contraband and premium |
build_inventory | Build the inventory of the vending machine from it's product and record lists |
build_products_from_categories | Populates list of products with categorized products |
choose_crit | Select a random valid crit. |
create_categories_from | Returns a list of data about the category Arguments: name - string for the name of the category icon - string for the fontawesome icon to use in the UI for the category products - list of products available in the category |
do_vend | Override this proc to add handling for what to do with the vended product when you have a inserted item and remember to include a parent call for this generic handling |
freebie | Dispenses free items from the standard stock. Arguments: freebies - number of free items to vend |
item_slot_check | Override this proc to do per-machine checks on the inserted item, but remember to call the parent to handle these generic checks before your logic! |
refill_inventory | Refill our inventory from the passed in product list into the record list |
restock | Refill a vending machine from a refill canister |
tilt | Tilts the machine onto the atom passed in. |
unbuild_inventory | Given a record list, go through and and return a list of type -> amount |
unbuild_inventory_into | Unbuild product_records into categorized product lists to the machine's refill canister. Does not handle contraband/premium products, only standard stock and any other categories used by the vendor(see: ClothesMate). If a product has no category, puts it into standard stock category. Arguments: product_records - list of products of the vendor products - list of products of the refill canister product_categories - list of product categories of the refill canister |
update_canister | Set up a refill canister that matches this machines products |
Var Details
active 
No sales pitches if off
aggressive 
If the vendor should tip on anyone who walks by. Mainly used for brand intelligence
all_possible_crits 
All possible crits that could be applied. We only need to build this up once
broken_lightmask_overlay 
Special lightmask for broken overlay. If vendor is BROKEN, but not dePOWERED we will see this, instead of lightmask_overlay
.
broken_overlay 
Damage overlay applied if vendor is damaged enough.
coin 
Holder for a coin inserted into the vendor
contraband 
List of products this machine sells when you hack it
form should be list(/type/path = amount, /type/path2 = amount2)
crit_damage_factor 
Factor of extra damage to deal when triggering a crit
currently_vending 
Item currently being bought
deny_lightmask 
Special lightmask that will override default lightmask_overlay
, while machine is denying its wares.
deny_overlay 
Overlay applied when machine is denying its wares.
deny_overlay_time 
Amount of time until denying sequence is reseted.
extended_inventory 
can we access the hidden inventory?
flick_sequence 
Flags used to correctly manipulate with vend/deny sequences.
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
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 
Cooldown for warning cooldowns
last_slogan 
When did we last pitch?
lightmask_overlay 
Lightmask used when vendor is working properly.
num_shards 
number of shards to apply when a crit embeds
panel_overlay 
Overlay of vendor maintenance panel.
possible_crits 
Possible crit effects from this vending machine tipping.
premium 
List of premium products this machine sells
form should be list(/type/path, /type/path2) as there is only ever one in stock
prices 
Prices for each item, list(/type/path = price), items not in the list don't have a price.
product_categories 
List of products this machine sells, categorized.
Can only be used as an alternative to products
, not alongside it.
Form should be list(
- "name" = "Category Name",
- "icon" = "UI Icon (Font Awesome or tgfont)",
- "products" = list(/type/path = amount, ...), )
products 
List of products this machine sells
form should be list(/type/path = amount, /type/path2 = amount2)
refill_canister 
The type of refill canisters used by this machine.
scan_id 
If true, enforce access checks on customers. Disabled by messing with wires.
screen_overlay 
Overlay of a vendor screen, will not apply of stat is NOPOWER.
seconds_electrified 
Allows people to access a vendor that's normally access restricted. 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
skip_non_primary_icon_updates 
If TRUE
machine will only react to BROKEN/NOPOWER stat, when updating overlays.
slogan_delay 
How long until we can pitch again?
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
tilted_rotation 
If tilted, this variable should always be the rotation that was applied when we were tilted. Stored for the purposes of unapplying it.
vend_delay 
How long vendor takes to vend one item.
vend_lightmask 
Special lightmask that will override default lightmask_overlay
, while machine is vending goods.
vend_overlay 
Overlay applied when machine is vending goods.
vend_overlay_time 
Amount of time until vending sequence is reseted.
vend_ready 
If off, vendor is busy and unusable until current action finishes
vend_reply 
"Спас+ибо за пок+упку!" type phrases
Place "+" before stressed syllables for better Text-to-speech pronunciation
Proc Details
RefreshParts
Better would be to make constructable child
build_inventories
*Builds all available inventories for the vendor - standard, contraband and premium
- Arguments:
- start_empty - bool to pass into build_inventory that determines whether a product entry starts with available stock or not
build_inventory
Build the inventory of the vending machine from it's product and record lists
This builds up a full set of /datum/data/vending_product from the product list of the vending machine type Arguments:
- productlist - the list of products that need to be converted
- recordlist - the list containing /datum/data/vending_product datums
- categories - account list in the format of product_categories to source category from
- startempty - should we set vending_product record amount from the product list (so it's prefilled at roundstart)
build_products_from_categories
Populates list of products with categorized products
choose_crit
Select a random valid crit.
create_categories_from
Returns a list of data about the category Arguments: name - string for the name of the category icon - string for the fontawesome icon to use in the UI for the category products - list of products available in the category
do_vend
Override this proc to add handling for what to do with the vended product when you have a inserted item and remember to include a parent call for this generic handling
freebie
Dispenses free items from the standard stock. Arguments: freebies - number of free items to vend
item_slot_check
Override this proc to do per-machine checks on the inserted item, but remember to call the parent to handle these generic checks before your logic!
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
tilt
Tilts the machine onto the atom passed in.
Arguments:
- target_atom - The thing the machine is falling on top of
- crit - if true, some special damage effects might happen.
- from_combat - If true, hold off on some of the additional damage and extra effects.
unbuild_inventory
Given a record list, go through and and return a list of type -> amount
unbuild_inventory_into
Unbuild product_records into categorized product lists to the machine's refill canister. Does not handle contraband/premium products, only standard stock and any other categories used by the vendor(see: ClothesMate). If a product has no category, puts it into standard stock category. Arguments: product_records - list of products of the vendor products - list of products of the refill canister product_categories - list of product categories of the refill canister
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"