vending

Vars | |
active | Whether this vendor is active or not. |
---|---|
check_accounts | 1 = requires PIN and checks accounts. 0 = You slide an ID, it vends, SPACE COMMUNISM! |
coin_records | list of /datum/vending_product's that are available on the vendor when a coin is used. |
contraband | Contraband products that are only available on vendor when hacked. |
currently_vending | A /datum/vending_product instance of what we're paying for right now. |
ewallet | Current cash card. |
extended_inventory | If the vending machine is hacked, makes the items on contraband list available. |
hacking_safety | Stops the machine from being hacked to shoot inventory or allow all access |
hidden_records | list of /datum/vending_product's that are available when vendor is hacked. |
icon_deny | Icon state when failing to vend, be it by no access or money. |
icon_vend | Icon state when successfuly vending |
isshared | If this vendor uses a global list for items. |
knockdown_threshold | How much damage we can take before tipping over. |
last_reply | When was last time we spoke when vending |
last_slogan | Last time we spoke our slogan |
premium | Premium products that are only available when using a coin to pay for it. |
prices | Prices for each item, list(/type/path = price), items not in the list don't have a price. |
product_ads | String of small ad messages in the vending screen - random chance |
product_records | list of /datum/vending_product's that are always available on the vendor |
product_slogans | String of slogans separated by semicolons, optional |
products | Normal products that are always available on the vendor. |
seasonal_items | |
seconds_electrified | how many seconds(duh) we have left electrified. |
shoot_inventory | If we should fire items at customers! We're broken! |
shut_up | If true the machine won't be speaking slogans randomly. Stop spouting those godawful pitches! |
slogan_delay | The interval between slogans. |
small_ads | small ad messages in the vending screen - random chance of popping up whenever you open it |
tipped_level | How much tipped we are. |
vend_delay | How long it takes to vend an item, vend_ready is false during that. |
vend_ready | If the vendor is ready to vend. |
vend_reply | Message spoken by the vending machine when a item is vended |
vending_sound | The sound the vendor makes when it vends something |
Procs | |
build_inventory | Builds a vending machine inventory from the given list into their records depending of category. |
build_seasonal_tabs | Makes additional tabs/adds to the tabs based on the seasonal_items vendor specification |
build_shared_inventory | Builds shared vendors inventory the first vendor that calls this uses build_inventory and makes their records in GLOB.vending_records[type] or premium or contraband, etc. the rest of vendors of same type just set all their records to the respective global lists |
display_message_and_visuals | Displays a balloon alert to the user if enable is true state determines what the vending machine will do other than display a simple balloon message |
do_stock | Actually does the restock. Overridden by lasgun vendor for snowflake behaviour |
interact | Used only when vendor is tipped to put it back up Normal usage is in ui_interact |
release_item | Vends the item |
scan_card | The found record matching the item_to_refill in the vending_records lists |
start_release_item | Tries to vend the item |
stock | Tries to restock "item_to_stock" into the vending machine again after some checks. show_feedback states whether or not to display any messages to the player, display the vending flicker animation as well as sound effects when recharging a cell. Returns TRUE if item has been restocked, FALSE otherwise.. |
stock_vacuum | Vending machine tries to restock all of the loose item on it's location onto itself. |
Var Details
active

Whether this vendor is active or not.
check_accounts

1 = requires PIN and checks accounts. 0 = You slide an ID, it vends, SPACE COMMUNISM!
coin_records

list of /datum/vending_product's that are available on the vendor when a coin is used.
contraband

Contraband products that are only available on vendor when hacked.
currently_vending

A /datum/vending_product instance of what we're paying for right now.
ewallet

Current cash card.
extended_inventory

If the vending machine is hacked, makes the items on contraband list available.
hacking_safety

Stops the machine from being hacked to shoot inventory or allow all access
hidden_records

list of /datum/vending_product's that are available when vendor is hacked.
icon_deny

Icon state when failing to vend, be it by no access or money.
icon_vend

Icon state when successfuly vending
isshared

If this vendor uses a global list for items.
knockdown_threshold

How much damage we can take before tipping over.
last_reply

When was last time we spoke when vending
last_slogan

Last time we spoke our slogan
premium

Premium products that are only available when using a coin to pay for it.
prices

Prices for each item, list(/type/path = price), items not in the list don't have a price.
product_ads

String of small ad messages in the vending screen - random chance
product_records

list of /datum/vending_product's that are always available on the vendor
product_slogans

String of slogans separated by semicolons, optional
products

Normal products that are always available on the vendor.
seasonal_items

- List of seasons whose products are added to the vendor's.
- Format for each entry is SEASON_NAME = "tab name"
seconds_electrified

how many seconds(duh) we have left electrified.
shoot_inventory

If we should fire items at customers! We're broken!
shut_up

If true the machine won't be speaking slogans randomly. Stop spouting those godawful pitches!
slogan_delay

The interval between slogans.
small_ads

small ad messages in the vending screen - random chance of popping up whenever you open it
tipped_level

How much tipped we are.
vend_delay

How long it takes to vend an item, vend_ready is false during that.
vend_ready

If the vendor is ready to vend.
vend_reply

Message spoken by the vending machine when a item is vended
vending_sound

The sound the vendor makes when it vends something
Proc Details
build_inventory
Builds a vending machine inventory from the given list into their records depending of category.
build_seasonal_tabs
Makes additional tabs/adds to the tabs based on the seasonal_items vendor specification
build_shared_inventory
Builds shared vendors inventory the first vendor that calls this uses build_inventory and makes their records in GLOB.vending_records[type] or premium or contraband, etc. the rest of vendors of same type just set all their records to the respective global lists
display_message_and_visuals
Displays a balloon alert to the user if enable is true state determines what the vending machine will do other than display a simple balloon message
do_stock
Actually does the restock. Overridden by lasgun vendor for snowflake behaviour
interact
Used only when vendor is tipped to put it back up Normal usage is in ui_interact
release_item
Vends the item
scan_card
The found record matching the item_to_refill in the vending_records lists
start_release_item
Tries to vend the item
stock
Tries to restock "item_to_stock" into the vending machine again after some checks. show_feedback states whether or not to display any messages to the player, display the vending flicker animation as well as sound effects when recharging a cell. Returns TRUE if item has been restocked, FALSE otherwise..
stock_vacuum
Vending machine tries to restock all of the loose item on it's location onto itself.