Reduces vending machine stock to put it in the commissary instead (#21717)

This remaps the commissary and library, increasing the size of the
former at the cost of the latter.
Several vending machines have been touched onboard the Horizon only. The
idris refresh and getmore vending machines have been merged into the
getmore, with the available items strongly reduced. The cigarette
vending machine also had their options lowered. All of the options and
some extra was moved to the restock packs the commissary gets now, so it
can be sold from there.
The nanopharm in the commissary is now free to vend, containing only
drugs and over the counter meds, intended to be paid for at the
commissary desk.
New restock packs were made, which are intended similarly to vending
machine restocks except they work on the shelves in the commissary and
gives them a set of items based on the pack, after which the pack can be
folded into cardboard.
All the new restock packs are also available to order from operations,
should more stock be necessary or other reasons.

For mapping I was aided by Kaizr, with helpful suggestions from RHG and
Noble Row.

Commissary:
<img width="635" height="617" alt="billede"
src="https://github.com/user-attachments/assets/bc16d9e1-dd58-4de8-b6d9-5dfdf67c17dc"
/>
<img width="605" height="601" alt="billede"
src="https://github.com/user-attachments/assets/4078656e-9cef-47ff-999c-685356647389"
/>

Library:
<img width="669" height="485" alt="billede"
src="https://github.com/user-attachments/assets/6984b56f-1236-494b-8c93-01a9b2aa9716"
/>

the nanopharm in the commissary, alongside how the getmore and cigarette
vending machines look around the horizon now.
<img width="1267" height="446" alt="billede"
src="https://github.com/user-attachments/assets/a7611dd8-1131-4616-92cf-ec99f1c9fa87"
/>
This commit is contained in:
Casper3667
2026-01-25 18:59:22 +00:00
committed by GitHub
parent 5561356136
commit f65792207b
10 changed files with 3955 additions and 3327 deletions
+154
View File
@@ -581,3 +581,157 @@
container_type = "crate"
groupable = TRUE
spawn_amount = 1
/singleton/cargo_item/cigarette_restock
category = "operations"
name = "commissary cigarette restock"
supplier = "getmore"
description = "A box full of stock for the commissary."
price = 200
items = list(
/obj/item/commissary_restrock
)
access = 0
container_type = "crate"
groupable = TRUE
spawn_amount = 1
/singleton/cargo_item/rollable_restock
category = "operations"
name = "commissary tobacco leaves restock"
supplier = "getmore"
description = "A box full of stock for the commissary."
price = 150
items = list(
/obj/item/commissary_restrock/rollable
)
access = 0
container_type = "crate"
groupable = TRUE
spawn_amount = 1
/singleton/cargo_item/chewable_restock
category = "operations"
name = "commissary chewing tobacco restock"
supplier = "getmore"
description = "A box full of stock for the commissary."
price = 175
items = list(
/obj/item/commissary_restrock/chewable
)
access = 0
container_type = "crate"
groupable = TRUE
spawn_amount = 1
/singleton/cargo_item/smoking_accessory_restock
category = "operations"
name = "commissary smoking accessories restock"
supplier = "getmore"
description = "A box full of stock for the commissary."
price = 400 // includes a bunch of lottery tickets, so it should be relatively high compared to other restocks
items = list(
/obj/item/commissary_restrock/smoking_accessory
)
access = 0
container_type = "crate"
groupable = TRUE
spawn_amount = 1
/singleton/cargo_item/electric_cig_restock
category = "operations"
name = "commissary electronic cigarette restock"
supplier = "getmore"
description = "A box full of stock for the commissary."
price = 225
items = list(
/obj/item/commissary_restrock/electronic_cig
)
access = 0
container_type = "crate"
groupable = TRUE
spawn_amount = 1
/singleton/cargo_item/snack_restock
category = "operations"
name = "commissary snack restock"
supplier = "getmore"
description = "A box full of stock for the commissary."
price = 150
items = list(
/obj/item/commissary_restrock/food
)
access = 0
container_type = "crate"
groupable = TRUE
spawn_amount = 1
/singleton/cargo_item/xeno_restock
category = "operations"
name = "commissary xeno snack restock"
supplier = "getmore"
description = "A box full of stock for the commissary."
price = 150
items = list(
/obj/item/commissary_restrock/food/xeno
)
access = 0
container_type = "crate"
groupable = TRUE
spawn_amount = 1
/singleton/cargo_item/candy_restock
category = "operations"
name = "commissary candy restock"
supplier = "getmore"
description = "A box full of stock for the commissary."
price = 150
items = list(
/obj/item/commissary_restrock/food/candy
)
access = 0
container_type = "crate"
groupable = TRUE
spawn_amount = 1
/singleton/cargo_item/microwave_restock
category = "operations"
name = "commissary microwave meal restock"
supplier = "getmore"
description = "A box full of stock for the commissary."
price = 150
items = list(
/obj/item/commissary_restrock/food/microwave
)
access = 0
container_type = "crate"
groupable = TRUE
spawn_amount = 1
/singleton/cargo_item/drink_restock
category = "operations"
name = "commissary drink restock"
supplier = "getmore"
description = "A box full of stock for the commissary."
price = 300
items = list(
/obj/item/commissary_restrock/drink
)
access = 0
container_type = "crate"
groupable = TRUE
spawn_amount = 1
/singleton/cargo_item/cheap_booze_restock
category = "operations"
name = "commissary beer restock"
supplier = "getmore"
description = "A box full of stock for the commissary."
price = 200
items = list(
/obj/item/commissary_restrock/drink/booze_cheap
)
access = 0
container_type = "crate"
groupable = TRUE
spawn_amount = 1
+330 -2
View File
@@ -1,3 +1,24 @@
/**
* Cigarette shelf
* Clothing shelf
* Food and drinks shelf
* Toy shelf
* Cash register
* Commissary restock
* Cigarettes
* Tobacco leaves
* Chewing tobacco
* Smoking accessories
* Electronic cigarette
* Snack
* Xeno snack
* Candy
* Microwave meal
* Drink
* Cheap booze
* Restock crate
*/
/obj/machinery/smartfridge/tradeshelf
name = "cigarette shelf"
desc = "A commercialized shelf for cigarettes and associated items."
@@ -14,7 +35,8 @@
/obj/item/storage/box/fancy/matches,
/obj/item/flame/lighter,
/obj/item/clothing/mask/smokable/ecig,
/obj/item/reagent_containers/ecig_cartridge
/obj/item/reagent_containers/ecig_cartridge,
/obj/item/spacecash/ewallet/lotto
)
display_tiers = 5
display_tier_amt = 3
@@ -41,7 +63,22 @@
active_power_usage = 100
cooling = TRUE
accepted_items = list(/obj/item/reagent_containers/food,
/obj/item/storage/box/fancy/cookiesnack
/obj/item/storage/box/fancy/cookiesnack,
/obj/item/storage/box/pineapple,
/obj/item/storage/box/fancy/gum,
/obj/item/storage/box/fancy/vkrexitaffy,
/obj/item/clothing/mask/chewable/candy/lolli,
/obj/item/storage/box/fancy/admints,
/obj/item/storage/box/fancy/quick_microwave_pizza,
/obj/item/reagent_containers/food/snacks/packaged_microwave_mac_and_cheeze,
/obj/item/reagent_containers/food/snacks/packaged_microwave_fiery_mac_and_cheeze,
/obj/item/storage/box/fancy/packaged_burger,
/obj/item/storage/box/fancy/packaged_mossburger,
/obj/item/storage/box/fancy/toptarts_strawberry,
/obj/item/storage/box/fancy/toptarts_chocolate_peanutbutter,
/obj/item/storage/box/fancy/toptarts_blueberry,
/obj/item/storage/box/unique/donkpockets,
/obj/item/storage/box/fancy/yoke
)
display_tiers = 4
display_tier_amt = 5
@@ -73,6 +110,28 @@
display_tiers = 4
display_tier_amt = 5
/obj/machinery/smartfridge/tradeshelf/mouse_drop_receive(atom/dropping, mob/user, params)
LoadComponent(/datum/component/leanable, dropping)
/obj/machinery/smartfridge/tradeshelf/attackby(obj/item/attacking_item, mob/user)
if(istype(attacking_item, /obj/item/commissary_restrock))
var/obj/item/commissary_restrock/P = attacking_item
var/item_loaded = 0
for(var/obj/G in P.contents)
if(accept_check(G))
if(length(contents) >= max_n_of_items)
break
P.remove_from_storage(G,src)
item_quants[G.name]++
item_loaded++
if(item_loaded)
user.visible_message("<b>[user]</b> loads [src] with [P].", SPAN_NOTICE("You load [src] with [P]."))
if(length(P.contents) > 0)
to_chat(user, SPAN_NOTICE("Some items are refused."))
update_overlays()
return TRUE
. = ..()
// -------------------------------------------------
/obj/structure/cash_register/commissary
var/machine_id = ""
@@ -345,3 +404,272 @@
buying.Cut()
sum = 0
receipt = ""
/obj/item/commissary_restrock
name = "commissary cigarette restock pack"
icon = 'icons/obj/storage/boxes.dmi'
icon_state = "commissary_restock"
item_state = "commissary_restock"
w_class = WEIGHT_CLASS_NORMAL
var/illustration = "sparkler"
var/starts_with = list(
// Cigarettes
/obj/item/storage/box/fancy/cigarettes/pra = 3,
/obj/item/storage/box/fancy/cigarettes/dpra = 3,
/obj/item/storage/box/fancy/cigarettes/nka = 3,
/obj/item/storage/box/fancy/cigarettes/federation = 3,
/obj/item/storage/box/fancy/cigarettes/dyn = 3,
/obj/item/storage/box/fancy/cigarettes/oracle = 3,
/obj/item/storage/box/fancy/cigarettes/koko = 3,
/obj/item/storage/box/fancy/cigarettes/dromedaryco = 3,
/obj/item/storage/box/fancy/cigarettes/nicotine = 3,
/obj/item/storage/box/fancy/cigarettes/cigar = 3
)
/obj/item/commissary_restrock/rollable
name = "commissary tobacco leaves restock pack"
starts_with = list(
// Rollables
/obj/item/storage/chewables/rollable = 3,
/obj/item/storage/chewables/rollable/unathi = 3,
/obj/item/storage/chewables/rollable/fine = 3,
/obj/item/storage/chewables/rollable/nico = 3,
/obj/item/storage/chewables/rollable/oracle = 3,
/obj/item/storage/chewables/rollable/vedamor = 3
)
/obj/item/commissary_restrock/chewable
name = "commissary chewing tobacco restock pack"
starts_with = list(
// Chewing tobacco
/obj/item/storage/chewables/tobacco = 3,
/obj/item/storage/chewables/tobacco/bad = 3,
/obj/item/storage/chewables/tobacco/fine = 3,
/obj/item/storage/chewables/tobacco/federation = 3,
/obj/item/storage/chewables/tobacco/dyn = 3,
/obj/item/storage/chewables/tobacco/koko = 3,
/obj/item/storage/box/fancy/chewables/tobacco/nico = 3,
/obj/item/storage/chewables/oracle = 3
)
/obj/item/commissary_restrock/smoking_accessory
name = "commissary smoking accessories restock pack"
starts_with = list(
// Misc smoking
/obj/item/storage/cigfilters = 6,
/obj/item/storage/box/fancy/cigpaper = 3,
/obj/item/storage/box/fancy/cigpaper/fine = 3,
// Lighters & stuff
/obj/item/storage/box/fancy/matches = 5,
/obj/item/flame/lighter/random = 4,
/obj/item/flame/lighter/zippo = 4,
/obj/item/spacecash/ewallet/lotto = 8 // A bit of a risk that hangar techs may just use them instead of selling, but that should be handled IC as theft
)
/obj/item/commissary_restrock/electronic_cig
name = "commissary electronic cigarette restock pack"
starts_with = list(
// Electronic
/obj/item/clothing/mask/smokable/ecig/util = 3,
/obj/item/reagent_containers/ecig_cartridge/med_nicotine = 2,
/obj/item/reagent_containers/ecig_cartridge/high_nicotine = 2,
/obj/item/reagent_containers/ecig_cartridge/orange = 2,
/obj/item/reagent_containers/ecig_cartridge/watermelon = 2,
/obj/item/reagent_containers/ecig_cartridge/grape = 2
)
/obj/item/commissary_restrock/food
name = "commissary snack restock pack"
illustration = "snack"
starts_with = list(
// Chips
/obj/item/reagent_containers/food/snacks/chips = 6,
/obj/item/reagent_containers/food/snacks/chips/chicken = 3,
/obj/item/reagent_containers/food/snacks/chips/cucumber = 3,
/obj/item/reagent_containers/food/snacks/chips/dirtberry = 3,
/obj/item/reagent_containers/food/snacks/chips/phoron = 3, // Not actually phoron
/obj/item/reagent_containers/food/snacks/algaechips = 2,
// General
/obj/item/reagent_containers/food/snacks/no_raisin = 3,
/obj/item/storage/box/pineapple = 2,
/obj/item/reagent_containers/food/snacks/ricetub = 4,
/obj/item/reagent_containers/food/snacks/riceball = 4,
/obj/item/reagent_containers/food/snacks/seaweed = 4,
/obj/item/reagent_containers/food/snacks/tuna = 2,
/obj/item/reagent_containers/food/drinks/dry_ramen = 3,
/obj/item/reagent_containers/food/snacks/sosjerky = 3
)
/obj/item/commissary_restrock/food/xeno
name = "commissary xeno snack restock pack"
illustration = "snack"
starts_with = list(
// Skrell
/obj/item/reagent_containers/food/snacks/skrellsnacks = 3,
/obj/item/reagent_containers/food/snacks/meatsnack = 2,
/obj/item/reagent_containers/food/drinks/jyalra = 2,
/obj/item/reagent_containers/food/drinks/jyalra/cheese = 2,
/obj/item/reagent_containers/food/drinks/jyalra/apple = 2,
/obj/item/reagent_containers/food/drinks/jyalra/cherry = 2,
// Vaurca
/obj/item/reagent_containers/food/snacks/koisbar_clean = 6,
// Unathi
/obj/item/reagent_containers/food/snacks/nathisnack = 2,
/obj/item/reagent_containers/food/snacks/candy/koko = 3,
// Tajara
/obj/item/reagent_containers/food/snacks/adhomian_can = 2,
)
/obj/item/commissary_restrock/food/candy
name = "commissary candy restock pack"
starts_with = list(
// Candy
/obj/item/reagent_containers/food/snacks/candy = 4,
/obj/item/reagent_containers/food/snacks/chocolatebar = 4,
/obj/item/reagent_containers/food/snacks/whitechocolate/wrapped = 4,
/obj/item/storage/box/fancy/cookiesnack = 3,
/obj/item/storage/box/fancy/gum = 4,
/obj/item/storage/box/fancy/vkrexitaffy = 3,
/obj/item/clothing/mask/chewable/candy/lolli = 5,
/obj/item/storage/box/fancy/admints = 3,
/obj/item/reagent_containers/food/drinks/bottle/bestblend,
/obj/item/storage/box/fancy/foysnack,
/obj/item/reagent_containers/food/snacks/choctruffles
)
/obj/item/commissary_restrock/food/microwave
name = "commissary microwave meal restock pack"
starts_with = list(
// Microwave meals
/obj/item/storage/box/fancy/quick_microwave_pizza = 3,
/obj/item/storage/box/fancy/quick_microwave_pizza/olive = 3,
/obj/item/storage/box/fancy/quick_microwave_pizza/pepperoni = 3,
/obj/item/storage/box/fancy/quick_microwave_pizza/district6 = 3,
/obj/item/reagent_containers/food/snacks/packaged_microwave_mac_and_cheeze = 3,
/obj/item/reagent_containers/food/snacks/packaged_microwave_fiery_mac_and_cheeze = 3,
/obj/item/storage/box/fancy/packaged_burger = 3,
/obj/item/storage/box/fancy/packaged_mossburger = 2,
/obj/item/reagent_containers/food/snacks/quick_curry = 3,
/obj/item/reagent_containers/food/snacks/hv_dinner = 3,
/obj/item/storage/box/fancy/toptarts_strawberry = 3,
/obj/item/storage/box/fancy/toptarts_chocolate_peanutbutter = 3,
/obj/item/storage/box/fancy/toptarts_blueberry = 3,
/obj/item/storage/box/unique/donkpockets = 3
)
/obj/item/commissary_restrock/drink
name = "commissary drink restock pack"
illustration = "soda"
starts_with = list(
// Soda
/obj/item/reagent_containers/food/drinks/cans/cola = 5,
/obj/item/reagent_containers/food/drinks/cans/diet_cola = 5,
/obj/item/reagent_containers/food/drinks/cans/space_mountain_wind = 5,
/obj/item/reagent_containers/food/drinks/cans/dr_gibb = 5,
/obj/item/reagent_containers/food/drinks/cans/starkist = 5,
/obj/item/reagent_containers/food/drinks/cans/peach_soda = 5,
/obj/item/reagent_containers/food/drinks/cans/space_up = 5,
/obj/item/reagent_containers/food/drinks/cans/melon_soda = 5,
// Misc
/obj/item/reagent_containers/food/drinks/waterbottle = 5,
/obj/item/reagent_containers/food/drinks/cans/root_beer = 5,
/obj/item/reagent_containers/food/drinks/cans/iced_tea = 5,
/obj/item/reagent_containers/food/drinks/cans/grape_juice = 5,
/obj/item/reagent_containers/food/drinks/zobo = 5,
// Skrell
/obj/item/reagent_containers/food/drinks/cans/dyn = 5,
// Tajara
/obj/item/reagent_containers/food/drinks/cans/hrozamal_soda = 5,
/obj/item/reagent_containers/food/drinks/cans/adhomai_milk = 3,
// Milk
/obj/item/reagent_containers/food/drinks/cans/beetle_milk = 5,
/obj/item/reagent_containers/food/drinks/carton/small/milk = 5,
/obj/item/reagent_containers/food/drinks/carton/small/milk/choco = 5,
/obj/item/reagent_containers/food/drinks/carton/small/milk/strawberry = 5
)
/obj/item/commissary_restrock/drink/booze_cheap
name = "commissary cheap booze restock pack"
starts_with = list(
// Booze
/obj/item/storage/box/fancy/yoke/beer = 2,
/obj/item/storage/box/fancy/yoke/ebisu = 2,
/obj/item/storage/box/fancy/yoke/shimauma = 2,
/obj/item/reagent_containers/food/drinks/cans/beer = 6,
/obj/item/reagent_containers/food/drinks/cans/beer/rice = 6,
/obj/item/reagent_containers/food/drinks/cans/beer/rice/shimauma = 6,
/obj/item/reagent_containers/food/drinks/cans/beer/whistlingforest = 6,
/obj/item/reagent_containers/food/drinks/bottle/small/xuizijuice = 6
)
/obj/item/commissary_restrock/Initialize(mapload, ...)
. = ..()
if(illustration)
var/image/illustration_img = image(icon, illustration)
illustration_img.appearance_flags |= RESET_COLOR
AddOverlays(illustration_img)
fill()
/obj/item/commissary_restrock/proc/fill()
if(LAZYLEN(starts_with))
for(var/t in starts_with)
if(!ispath(t))
crash_with("[t] in [src]'s starts_with list is not a path!")
continue
for(var/i=0, i<starts_with[t], i++)
new t(src)
return
/obj/item/commissary_restrock/mechanics_hints(mob/user, distance, is_adjacent)
. += ..()
. += "This item can be used to restock the commissary shelves."
. += "Left-click on this when empty to fold it into a sheet if it is empty."
/obj/item/commissary_restrock/attack_self(mob/user as mob)
. = ..()
if(contents.len)
to_chat(user, SPAN_NOTICE("There are still things left in \the [src]."))
return
to_chat(user, SPAN_NOTICE("You fold \the [src] flat."))
playsound(src.loc, 'sound/items/storage/boxfold.ogg', 30, 1)
var/obj/item/foldable = new /obj/item/stack/material/cardboard()
qdel(src)
user.put_in_hands(foldable) //try to put it inhands if possible
/obj/item/commissary_restrock/proc/remove_from_storage(obj/item/W, atom/new_location)
if(!istype(W))
return FALSE
if(new_location)
W.forceMove(new_location)
else
W.forceMove(get_turf(src))
W.on_exit_storage(src)
update_icon()
return TRUE
/obj/item/commissary_restrock/update_icon()
. = ..()
if(length(contents) == 0)
icon_state = "[initial(icon_state)]_used"
item_state = "[initial(item_state)]_used"
/obj/structure/closet/crate/commissary
name = "commissary crate"
desc = "A crate packed with boxes of various goods. Handle with care!"
/obj/structure/closet/crate/commissary/fill()
new /obj/item/commissary_restrock(src)
new /obj/item/commissary_restrock/rollable(src)
new /obj/item/commissary_restrock/chewable(src)
new /obj/item/commissary_restrock/smoking_accessory(src)
new /obj/item/commissary_restrock/electronic_cig(src)
new /obj/item/commissary_restrock/food(src)
new /obj/item/commissary_restrock/food/candy(src)
new /obj/item/commissary_restrock/food/xeno(src)
new /obj/item/commissary_restrock/food/microwave(src)
new /obj/item/commissary_restrock/drink(src)
new /obj/item/commissary_restrock/drink/booze_cheap(src)
@@ -428,7 +428,7 @@
var/K = item_quants[i]
var/count = item_quants[K]
if(count > 0)
items.Add(list(list("display_name" = html_encode(capitalize(K)), "vend" = i, "quantity" = count)))
items.Add(list(list("display_name" = capitalize(K), "vend" = i, "quantity" = count)))
if(length(items) > 0)
data["contents"] = items