byond - Modules - TypesVar Details - Proc Details

ColMarTech generic sorted rack/vendor

Vars

being_restockedindicates someone is performing a restock that isn't instant
corresponding_types_listthis here is made to provide ability to restock vendors with different subtypes of same object, like handmade and manually filled ammo boxes.
dynamic_stock_multipliersIf using VEND_STOCK_DYNAMIC, assoc list of product entry to list of (1.0 scale product multiplier, awarded objects) - as seen in /obj/structure/machinery/cm_vending/sorted/proc/populate_product_list This allows us to backtrack and refill the stocks when new players latejoin.

Procs

additional_restock_checksadditional restocking checks for individual vendor subtypes. Parse in item, do checks, return FALSE to fail. Include error message.
populate_product_listthis proc, well, populates product list based on roundstart amount of players do not rely on scale here if you use VEND_STOCK_DYNAMIC because it's already taken into account this is here for historical reasons and should ONLY be called by populate_product_list_and_boxes if you want dynamic stocks and ammoboxes to work
populate_product_list_and_boxesthis proc, well, populates product list based on roundstart amount of players
update_dynamic_stockUpdates the vendor stock when the [/datum/game_mode/var/marine_tally] has changed and we're using VEND_STOCK_DYNAMIC Assumes the scale can only increase!!! Don't take their items away!

Var Details

being_restocked

indicates someone is performing a restock that isn't instant

corresponding_types_list

this here is made to provide ability to restock vendors with different subtypes of same object, like handmade and manually filled ammo boxes.

dynamic_stock_multipliers

If using VEND_STOCK_DYNAMIC, assoc list of product entry to list of (1.0 scale product multiplier, awarded objects) - as seen in /obj/structure/machinery/cm_vending/sorted/proc/populate_product_list This allows us to backtrack and refill the stocks when new players latejoin.

If NOT using VEND_STOCK_DYNAMIC, assoc list of product entry to list of (estimated 1.0 scale product multiplier, scaled product multiplier) - as seen in /obj/structure/machinery/cm_vending/sorted/proc/populate_product_list This allows us to know the original amounts to know if the vendor is full of an item. The 1.0 scale is estimated because it is a divided by the scale rather than repopulating the list at 1.0 scale - anything that is a fixed amount won't necessarily be correct.

Proc Details

additional_restock_checks

additional restocking checks for individual vendor subtypes. Parse in item, do checks, return FALSE to fail. Include error message.

populate_product_list

this proc, well, populates product list based on roundstart amount of players do not rely on scale here if you use VEND_STOCK_DYNAMIC because it's already taken into account this is here for historical reasons and should ONLY be called by populate_product_list_and_boxes if you want dynamic stocks and ammoboxes to work

populate_product_list_and_boxes

this proc, well, populates product list based on roundstart amount of players

update_dynamic_stock

Updates the vendor stock when the [/datum/game_mode/var/marine_tally] has changed and we're using VEND_STOCK_DYNAMIC Assumes the scale can only increase!!! Don't take their items away!