diff --git a/_maps/map_files/Delta/delta.dmm b/_maps/map_files/Delta/delta.dmm
index ba474ccc877..32348eb0027 100644
--- a/_maps/map_files/Delta/delta.dmm
+++ b/_maps/map_files/Delta/delta.dmm
@@ -1855,7 +1855,7 @@
},
/area/shuttle/syndicate)
"aem" = (
-/obj/machinery/vending/wallmed1/syndicate{
+/obj/machinery/vending/wallmed/syndicate{
pixel_x = -30
},
/turf/simulated/shuttle/floor{
@@ -32126,7 +32126,7 @@
},
/obj/machinery/iv_drip,
/obj/structure/bed,
-/obj/machinery/vending/wallmed1{
+/obj/machinery/vending/wallmed{
pixel_y = 28
},
/obj/item/bedsheet/blue,
@@ -96753,7 +96753,7 @@
},
/area/medical/surgery)
"dqS" = (
-/obj/machinery/vending/wallmed1{
+/obj/machinery/vending/wallmed{
layer = 3.3;
name = "Emergency NanoMed";
pixel_x = 28;
@@ -98848,7 +98848,7 @@
pixel_x = 12;
pixel_y = 0
},
-/obj/machinery/vending/wallmed1{
+/obj/machinery/vending/wallmed{
layer = 3.3;
name = "Emergency NanoMed";
pixel_x = 28;
@@ -99390,7 +99390,7 @@
/area/medical/morgue)
"dvF" = (
/obj/structure/table/glass,
-/obj/machinery/vending/wallmed1{
+/obj/machinery/vending/wallmed{
layer = 3.3;
name = "Emergency NanoMed";
pixel_x = 0;
@@ -107567,7 +107567,7 @@
/area/medical/virology)
"dKC" = (
/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,
-/obj/machinery/vending/wallmed1{
+/obj/machinery/vending/wallmed{
name = "Emergency NanoMed";
pixel_x = -25;
pixel_y = 0;
@@ -111985,7 +111985,7 @@
dir = 8
},
/obj/effect/decal/cleanable/dirt,
-/obj/machinery/vending/wallmed1{
+/obj/machinery/vending/wallmed{
layer = 3.3;
name = "Emergency NanoMed";
pixel_x = 28;
diff --git a/_maps/map_files/MetaStation/MetaStation.v41A.II.dmm b/_maps/map_files/MetaStation/MetaStation.v41A.II.dmm
index 30539064bef..f0c2f14698d 100644
--- a/_maps/map_files/MetaStation/MetaStation.v41A.II.dmm
+++ b/_maps/map_files/MetaStation/MetaStation.v41A.II.dmm
@@ -589,7 +589,7 @@
},
/area/shuttle/syndicate)
"abk" = (
-/obj/machinery/vending/wallmed1/syndicate{
+/obj/machinery/vending/wallmed/syndicate{
pixel_x = -30
},
/turf/simulated/shuttle/floor{
@@ -57886,7 +57886,7 @@
})
"bVg" = (
/obj/structure/bed/roller,
-/obj/machinery/vending/wallmed1{
+/obj/machinery/vending/wallmed{
pixel_x = -28
},
/obj/machinery/camera{
@@ -68224,7 +68224,7 @@
/turf/space,
/area/solar/port)
"cmI" = (
-/obj/machinery/vending/wallmed1{
+/obj/machinery/vending/wallmed{
name = "Emergency NanoMed";
pixel_x = 25;
req_access_txt = "0"
@@ -69498,7 +69498,7 @@
},
/area/toxins/lab)
"coL" = (
-/obj/machinery/vending/wallmed1{
+/obj/machinery/vending/wallmed{
name = "Emergency NanoMed";
pixel_x = -25;
req_access_txt = "0"
@@ -82553,7 +82553,7 @@
})
"cJM" = (
/obj/structure/chair/office/light,
-/obj/machinery/vending/wallmed1{
+/obj/machinery/vending/wallmed{
name = "Emergency NanoMed";
pixel_x = -25;
req_access_txt = "0"
@@ -82599,7 +82599,7 @@
/area/medical/virology)
"cJQ" = (
/obj/structure/chair/office/light,
-/obj/machinery/vending/wallmed1{
+/obj/machinery/vending/wallmed{
name = "Emergency NanoMed";
pixel_x = 25;
req_access_txt = "0"
@@ -95073,7 +95073,7 @@
/turf/simulated/floor/plating/airless,
/area/space/nearstation)
"deb" = (
-/obj/machinery/vending/wallmed1{
+/obj/machinery/vending/wallmed{
name = "Emergency NanoMed";
req_access_txt = "0";
use_power = 0
diff --git a/_maps/map_files/RandomRuins/LavaRuins/lavaland_surface_animal_hospital.dmm b/_maps/map_files/RandomRuins/LavaRuins/lavaland_surface_animal_hospital.dmm
index 5a947203de8..fe3615237da 100644
--- a/_maps/map_files/RandomRuins/LavaRuins/lavaland_surface_animal_hospital.dmm
+++ b/_maps/map_files/RandomRuins/LavaRuins/lavaland_surface_animal_hospital.dmm
@@ -367,7 +367,7 @@
/turf/simulated/floor/plasteel/white,
/area/ruin/powered/animal_hospital)
"aW" = (
-/obj/machinery/vending/wallmed1{
+/obj/machinery/vending/wallmed{
pixel_y = 28
},
/turf/simulated/floor/plasteel/white,
diff --git a/_maps/map_files/RandomZLevels/stationCollision.dmm b/_maps/map_files/RandomZLevels/stationCollision.dmm
index 8910fa36aaa..d608b2a6b56 100644
--- a/_maps/map_files/RandomZLevels/stationCollision.dmm
+++ b/_maps/map_files/RandomZLevels/stationCollision.dmm
@@ -4511,7 +4511,7 @@
/turf/simulated/floor/plasteel,
/area/awaymission/southblock)
"lK" = (
-/obj/machinery/vending/wallmed1{
+/obj/machinery/vending/wallmed{
pixel_x = 31
},
/turf/simulated/floor/plasteel{
diff --git a/_maps/map_files/cyberiad/cyberiad.dmm b/_maps/map_files/cyberiad/cyberiad.dmm
index 16c46a85239..a83823e65dc 100644
--- a/_maps/map_files/cyberiad/cyberiad.dmm
+++ b/_maps/map_files/cyberiad/cyberiad.dmm
@@ -2820,7 +2820,7 @@
},
/area/shuttle/syndicate)
"afD" = (
-/obj/machinery/vending/wallmed1/syndicate{
+/obj/machinery/vending/wallmed/syndicate{
pixel_x = -30
},
/turf/simulated/shuttle/floor{
@@ -8956,7 +8956,7 @@
},
/area/security/prison/cell_block/A)
"apA" = (
-/obj/machinery/vending/wallmed1{
+/obj/machinery/vending/wallmed{
dir = 2;
name = "Emergency NanoMed";
pixel_x = -27;
@@ -23706,7 +23706,7 @@
/turf/simulated/floor/plasteel,
/area/hallway/primary/fore)
"aQE" = (
-/obj/machinery/vending/wallmed1{
+/obj/machinery/vending/wallmed{
name = "Emergency NanoMed";
pixel_x = 0;
pixel_y = 28;
@@ -25837,7 +25837,7 @@
/obj/structure/window/reinforced{
dir = 4
},
-/obj/machinery/vending/wallmed1{
+/obj/machinery/vending/wallmed{
name = "Emergency NanoMed";
pixel_x = -5;
pixel_y = 30;
@@ -27498,7 +27498,7 @@
},
/area/security/nuke_storage)
"aXS" = (
-/obj/machinery/lapvend,
+/obj/machinery/vending/modularpc,
/turf/simulated/floor/plasteel,
/area/storage/primary)
"aXU" = (
@@ -43532,7 +43532,7 @@
pixel_x = 6;
pixel_y = 6
},
-/obj/machinery/vending/wallmed1{
+/obj/machinery/vending/wallmed{
name = "Emergency NanoMed";
pixel_x = -25;
pixel_y = 0;
@@ -43877,7 +43877,7 @@
/turf/simulated/floor/plating,
/area/maintenance/disposal)
"bDF" = (
-/obj/machinery/vending/wallmed1{
+/obj/machinery/vending/wallmed{
layer = 3.3;
name = "Emergency NanoMed";
pixel_x = 28;
@@ -49584,7 +49584,7 @@
icon_state = "4-8";
pixel_x = 0
},
-/obj/machinery/vending/wallmed1{
+/obj/machinery/vending/wallmed{
name = "Emergency NanoMed";
pixel_x = 0;
pixel_y = -32;
@@ -55616,7 +55616,7 @@
/area/medical/cryo)
"bXP" = (
/obj/structure/disposalpipe/segment,
-/obj/machinery/vending/wallmed1{
+/obj/machinery/vending/wallmed{
name = "Emergency NanoMed";
pixel_x = -25;
pixel_y = 0;
@@ -58812,7 +58812,7 @@
dir = 1;
network = list("SS13")
},
-/obj/machinery/vending/wallmed1{
+/obj/machinery/vending/wallmed{
name = "Emergency NanoMed";
pixel_x = -5;
pixel_y = -30;
@@ -60945,7 +60945,7 @@
},
/area/medical/cmo)
"cfY" = (
-/obj/machinery/vending/wallmed1{
+/obj/machinery/vending/wallmed{
name = "Emergency NanoMed";
pixel_x = -25;
pixel_y = 0;
@@ -62595,7 +62595,7 @@
d2 = 2;
icon_state = "1-2"
},
-/obj/machinery/vending/wallmed1{
+/obj/machinery/vending/wallmed{
name = "Emergency NanoMed";
pixel_x = -25;
pixel_y = 0;
@@ -74964,7 +74964,7 @@
/area/toxins/misc_lab)
"cDE" = (
/obj/machinery/hologram/holopad,
-/obj/machinery/vending/wallmed1{
+/obj/machinery/vending/wallmed{
name = "Emergency NanoMed";
pixel_x = 0;
pixel_y = -32;
@@ -82057,7 +82057,7 @@
/obj/structure/disposalpipe/trunk{
dir = 8
},
-/obj/machinery/vending/wallmed1{
+/obj/machinery/vending/wallmed{
name = "Emergency NanoMed";
pixel_x = 0;
pixel_y = -32;
@@ -86337,7 +86337,7 @@
/turf/simulated/floor/plasteel,
/area/engine/engineering)
"cXI" = (
-/obj/machinery/vending/wallmed1{
+/obj/machinery/vending/wallmed{
name = "Emergency NanoMed";
pixel_x = 0;
pixel_y = -32;
diff --git a/_maps/map_files/cyberiad/z2.dmm b/_maps/map_files/cyberiad/z2.dmm
index e84f90a3ee2..b6544287437 100644
--- a/_maps/map_files/cyberiad/z2.dmm
+++ b/_maps/map_files/cyberiad/z2.dmm
@@ -7326,7 +7326,7 @@
},
/area/centcom/specops)
"sg" = (
-/obj/machinery/vending/wallmed1{
+/obj/machinery/vending/wallmed{
name = "Emergency NanoMed";
pixel_x = -30;
pixel_y = 0;
@@ -7342,7 +7342,7 @@
},
/area/centcom/evac)
"si" = (
-/obj/machinery/vending/wallmed1{
+/obj/machinery/vending/wallmed{
name = "Emergency NanoMed";
pixel_x = 30;
pixel_y = 0;
@@ -7633,7 +7633,7 @@
},
/area/centcom/evac)
"sS" = (
-/obj/machinery/vending/wallmed1{
+/obj/machinery/vending/wallmed{
name = "Emergency NanoMed";
pixel_x = -30;
pixel_y = 0;
@@ -7787,7 +7787,7 @@
},
/area/centcom/evac)
"tk" = (
-/obj/machinery/vending/wallmed1{
+/obj/machinery/vending/wallmed{
name = "Emergency NanoMed";
pixel_x = 30;
pixel_y = 0;
diff --git a/_maps/map_files/cyberiad/z4.dmm b/_maps/map_files/cyberiad/z4.dmm
index bd20066c0a4..cf0e350181d 100644
--- a/_maps/map_files/cyberiad/z4.dmm
+++ b/_maps/map_files/cyberiad/z4.dmm
@@ -1938,7 +1938,7 @@
/turf/simulated/floor/plasteel,
/area/engiestation)
"eQ" = (
-/obj/machinery/vending/wallmed1{
+/obj/machinery/vending/wallmed{
layer = 3.3;
name = "Emergency NanoMed";
pixel_x = 28;
diff --git a/_maps/map_files/shuttles/emergency_bar.dmm b/_maps/map_files/shuttles/emergency_bar.dmm
index 4dd07825738..5d45aa9b206 100644
--- a/_maps/map_files/shuttles/emergency_bar.dmm
+++ b/_maps/map_files/shuttles/emergency_bar.dmm
@@ -534,7 +534,7 @@
},
/area/shuttle/escape)
"bs" = (
-/obj/machinery/vending/wallmed1{
+/obj/machinery/vending/wallmed{
layer = 3.3;
name = "Emergency NanoMed";
pixel_x = 28;
diff --git a/_maps/map_files/shuttles/emergency_clown.dmm b/_maps/map_files/shuttles/emergency_clown.dmm
index 5942ed33b76..16150fb8fed 100644
--- a/_maps/map_files/shuttles/emergency_clown.dmm
+++ b/_maps/map_files/shuttles/emergency_clown.dmm
@@ -418,7 +418,7 @@
/turf/simulated/floor/noslip,
/area/shuttle/escape)
"be" = (
-/obj/machinery/vending/wallmed1{
+/obj/machinery/vending/wallmed{
layer = 3.3;
name = "Emergency NanoMed";
pixel_x = 28;
diff --git a/_maps/map_files/shuttles/emergency_cyb.dmm b/_maps/map_files/shuttles/emergency_cyb.dmm
index 5f35a77e455..995f5af74d2 100644
--- a/_maps/map_files/shuttles/emergency_cyb.dmm
+++ b/_maps/map_files/shuttles/emergency_cyb.dmm
@@ -447,7 +447,7 @@
},
/area/shuttle/escape)
"bh" = (
-/obj/machinery/vending/wallmed1{
+/obj/machinery/vending/wallmed{
layer = 3.3;
name = "Emergency NanoMed";
pixel_x = 28;
diff --git a/_maps/map_files/shuttles/emergency_dept.dmm b/_maps/map_files/shuttles/emergency_dept.dmm
index 32b14270d05..739056d20d6 100644
--- a/_maps/map_files/shuttles/emergency_dept.dmm
+++ b/_maps/map_files/shuttles/emergency_dept.dmm
@@ -656,7 +656,7 @@
},
/area/shuttle/escape)
"bI" = (
-/obj/machinery/vending/wallmed1{
+/obj/machinery/vending/wallmed{
layer = 3.3;
name = "Emergency NanoMed";
pixel_x = 28;
diff --git a/_maps/map_files/shuttles/emergency_meta.dmm b/_maps/map_files/shuttles/emergency_meta.dmm
index c711de199e7..cfd300d1abd 100644
--- a/_maps/map_files/shuttles/emergency_meta.dmm
+++ b/_maps/map_files/shuttles/emergency_meta.dmm
@@ -390,7 +390,7 @@
/turf/simulated/shuttle/floor,
/area/shuttle/escape)
"aS" = (
-/obj/machinery/vending/wallmed1{
+/obj/machinery/vending/wallmed{
name = "Emergency NanoMed";
pixel_x = 0;
pixel_y = 0;
diff --git a/_maps/map_files/shuttles/emergency_mil.dmm b/_maps/map_files/shuttles/emergency_mil.dmm
index 3741f06c673..e5e13ddf4b9 100644
--- a/_maps/map_files/shuttles/emergency_mil.dmm
+++ b/_maps/map_files/shuttles/emergency_mil.dmm
@@ -260,7 +260,7 @@
},
/area/shuttle/escape)
"aT" = (
-/obj/machinery/vending/wallmed1{
+/obj/machinery/vending/wallmed{
layer = 3.3;
name = "Emergency NanoMed";
pixel_x = 28;
diff --git a/_maps/map_files/shuttles/emergency_old.dmm b/_maps/map_files/shuttles/emergency_old.dmm
index 6956613e0b8..f4a2b0c7754 100644
--- a/_maps/map_files/shuttles/emergency_old.dmm
+++ b/_maps/map_files/shuttles/emergency_old.dmm
@@ -404,7 +404,7 @@
/area/shuttle/escape)
"bc" = (
/obj/structure/bed/roller,
-/obj/machinery/vending/wallmed1{
+/obj/machinery/vending/wallmed{
layer = 3.3;
name = "Emergency NanoMed";
pixel_x = 28;
diff --git a/_maps/map_files/templates/shelter_1.dmm b/_maps/map_files/templates/shelter_1.dmm
index 0123bf7329c..2455db765b9 100644
--- a/_maps/map_files/templates/shelter_1.dmm
+++ b/_maps/map_files/templates/shelter_1.dmm
@@ -30,7 +30,7 @@
/area/survivalpod)
"g" = (
/obj/machinery/sleeper/survival_pod,
-/obj/machinery/vending/wallmed1/survival_pod{
+/obj/machinery/vending/wallmed/survival_pod{
pixel_x = -24
},
/turf/simulated/floor/pod,
diff --git a/_maps/map_files/templates/shelter_2.dmm b/_maps/map_files/templates/shelter_2.dmm
index 1c2e99a0c4d..281a1f43433 100644
--- a/_maps/map_files/templates/shelter_2.dmm
+++ b/_maps/map_files/templates/shelter_2.dmm
@@ -39,7 +39,7 @@
/area/survivalpod)
"i" = (
/obj/machinery/sleeper/survival_pod,
-/obj/machinery/vending/wallmed1/survival_pod{
+/obj/machinery/vending/wallmed/survival_pod{
pixel_x = -24
},
/turf/simulated/floor/pod,
diff --git a/code/_globalvars/unused.dm b/code/_globalvars/unused.dm
index 6f55887ee66..2e3f8f9c6dc 100644
--- a/code/_globalvars/unused.dm
+++ b/code/_globalvars/unused.dm
@@ -1,32 +1 @@
-var/skipupdate = 0
-
-var/shuttlecoming = 0
-var/forceblob = 0
-var/datum/debug/debugobj
-
-var/list/liftable_structures = list(\
- /obj/machinery/autolathe, \
- /obj/machinery/constructable_frame, \
- /obj/machinery/hydroponics, \
- /obj/machinery/computer, \
- /obj/machinery/optable, \
- /obj/structure/dispenser, \
- /obj/machinery/gibber, \
- /obj/machinery/kitchen_machine/microwave, \
- /obj/machinery/vending, \
- /obj/machinery/seed_extractor, \
- /obj/machinery/space_heater, \
- /obj/machinery/recharge_station, \
- /obj/machinery/flasher, \
- /obj/structure/closet, \
- /obj/machinery/photocopier, \
- /obj/structure/filingcabinet, \
- /obj/structure/reagent_dispensers, \
- /obj/machinery/portable_atmospherics/canister)
-
-var/starticon = null
-var/midicon = null
-var/endicon = null
-var/datum/air_tunnel/air_tunnel1/SS13_airtunnel = null
-var/going = 1.0
-var/datum/engine_eject/engine_eject_control = null
+var/going = 1.0
\ No newline at end of file
diff --git a/code/datums/supplypacks.dm b/code/datums/supplypacks.dm
index 494379aa821..0f349ab1f12 100644
--- a/code/datums/supplypacks.dm
+++ b/code/datums/supplypacks.dm
@@ -216,6 +216,12 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine
cost = 10
containername = "security supply crate"
+/datum/supply_packs/security/vending/security
+ name = "SecTech Supply Crate"
+ cost = 15
+ contains = list(/obj/item/vending_refill/security)
+ containername = "SecTech supply crate"
+
////// Armor: Basic
/datum/supply_packs/security/helmets
@@ -532,6 +538,12 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine
cost = 10
containername = "electrical maintenance crate"
+/datum/supply_packs/vending/engivend
+ name = "EngiVend Supply Crate"
+ cost = 15
+ contains = list(/obj/item/vending_refill/engivend)
+ containername = "engineering supply crate"
+
/datum/supply_packs/engineering/powergamermitts
name = "Insulated Gloves Crate"
contains = list(/obj/item/clothing/gloves/color/yellow,
@@ -743,7 +755,8 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine
/obj/item/storage/box/beakers,
/obj/item/storage/box/syringes,
/obj/item/storage/box/bodybags,
- /obj/item/storage/box/iv_bags)
+ /obj/item/storage/box/iv_bags,
+ /obj/item/vending_refill/medical)
cost = 20
containertype = /obj/structure/closet/crate/medical
containername = "medical supplies crate"
@@ -829,6 +842,12 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine
access = access_cmo
announce_beacons = list("Medbay" = list("Virology", "Chief Medical Officer's Desk"))
+/datum/supply_packs/medical/vending
+ name = "Medical Vending Crate"
+ cost = 20
+ contains = list(/obj/item/vending_refill/medical,
+ /obj/item/vending_refill/wallmed)
+ containername = "medical vending crate"
/datum/supply_packs/medical/bloodpacks
name = "Blood Pack Variety Crate"
@@ -943,6 +962,11 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine
containername = "shield generators crate"
access = access_teleporter
+/datum/supply_packs/science/modularpc
+ name = "Deluxe Silicate Selections restocking unit"
+ cost = 15
+ contains = list(/obj/item/vending_refill/modularpc)
+ containername = "computer supply crate"
/datum/supply_packs/science/transfer_valves
name = "Tank Transfer Valves Crate"
@@ -1189,6 +1213,14 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine
cost = 10
containername = "seeds crate"
+/datum/supply_packs/organic/vending/hydro_refills
+ name = "Hydroponics Vending Machines Refills"
+ cost = 20
+ containertype = /obj/structure/closet/crate
+ contains = list(/obj/item/vending_refill/hydroseeds,
+ /obj/item/vending_refill/hydronutrients)
+ containername = "hydroponics supply crate"
+
/datum/supply_packs/organic/hydroponics/exoticseeds
name = "Exotic Seeds Crate"
contains = list(/obj/item/seeds/nettle,
@@ -1808,73 +1840,96 @@ var/list/all_supply_groups = list(supply_emergency,supply_security,supply_engine
/datum/supply_packs/vending/autodrobe
name = "Autodrobe Supply Crate"
- contains = list(/obj/item/vending_refill/autodrobe,
- /obj/item/vending_refill/autodrobe)
+ contains = list(/obj/item/vending_refill/autodrobe)
cost = 15
containername = "autodrobe supply crate"
/datum/supply_packs/vending/clothes
- name = "Clothing Supply Crate"
- contains = list(/obj/item/vending_refill/suitdispenser,
- /obj/item/vending_refill/shoedispenser,
- /obj/item/vending_refill/hatdispenser,
- /obj/item/vending_refill/clothing)
+ name = "ClothesMate Supply Crate"
+ contains = list(/obj/item/vending_refill/clothing)
cost = 15
- containername = "clothing supply crate"
+ containername = "clothesmate supply crate"
+
+/datum/supply_packs/vending/suit
+ name = "Suitlord Supply Crate"
+ contains = list(/obj/item/vending_refill/suitdispenser)
+ cost = 15
+ containername = "suitlord supply crate"
+
+/datum/supply_packs/vending/hat
+ name = "Hatlord Supply Crate"
+ contains = list(/obj/item/vending_refill/hatdispenser)
+ cost = 15
+ containername = "hatlord supply crate"
+
+/datum/supply_packs/vending/shoes
+ name = "Shoelord Supply Crate"
+ contains = list(/obj/item/vending_refill/shoedispenser)
+ cost = 15
+ containername = "shoelord supply crate"
/datum/supply_packs/vending/pets
name = "Pet Supply Crate"
- contains = list(/obj/item/vending_refill/crittercare,
- /obj/item/vending_refill/crittercare,
- /obj/item/vending_refill/crittercare)
+ contains = list(/obj/item/vending_refill/crittercare)
cost = 15
containername = "pet supply crate"
-/datum/supply_packs/vending/bar
- name = "Bar Supply Crate"
+/datum/supply_packs/vending/bartending
+ name = "Booze-o-mat and Coffee Supply Crate"
+ cost = 20
contains = list(/obj/item/vending_refill/boozeomat,
- /obj/item/vending_refill/boozeomat,
- /obj/item/vending_refill/boozeomat)
- cost = 15
- containername = "bar supply crate"
- announce_beacons = list("Bar" = list("Bar"))
-
-/datum/supply_packs/vending/coffee
- name = "Coffee Supply Crate"
- contains = list(/obj/item/vending_refill/coffee,
- /obj/item/vending_refill/coffee,
/obj/item/vending_refill/coffee)
- cost = 15
- containername = "coffee supply crate"
-
-/datum/supply_packs/vending/snack
- name = "Snack Supply Crate"
- contains = list(/obj/item/vending_refill/snack,
- /obj/item/vending_refill/snack,
- /obj/item/vending_refill/snack)
- cost = 15
- containername = "snacks supply crate"
-
-/datum/supply_packs/vending/chinese
- name = "Chinese Supply Crate"
- contains = list(/obj/item/vending_refill/chinese,
- /obj/item/vending_refill/chinese,
- /obj/item/vending_refill/chinese)
- cost = 15
- containername = "chinese supply crate"
-
-/datum/supply_packs/vending/cola
- name = "Softdrinks Supply Crate"
- contains = list(/obj/item/vending_refill/cola,
- /obj/item/vending_refill/cola,
- /obj/item/vending_refill/cola)
- cost = 15
- containername = "softdrinks supply crate"
+ containername = "bartending supply crate"
+ announce_beacons = list("Bar" = list("Bar"))
/datum/supply_packs/vending/cigarette
name = "Cigarette Supply Crate"
- contains = list(/obj/item/vending_refill/cigarette,
- /obj/item/vending_refill/cigarette,
- /obj/item/vending_refill/cigarette)
+ contains = list(/obj/item/vending_refill/cigarette)
cost = 15
containername = "cigarette supply crate"
+ containertype = /obj/structure/closet/crate
+
+/datum/supply_packs/vending/dinnerware
+ name = "Dinnerware Supply Crate"
+ cost = 10
+ contains = list(/obj/item/vending_refill/dinnerware)
+ containername = "dinnerware supply crate"
+
+/datum/supply_packs/vending/imported
+ name = "Imported Vending Machines"
+ cost = 40
+ contains = list(/obj/item/vending_refill/sustenance,
+ /obj/item/vending_refill/robotics,
+ /obj/item/vending_refill/sovietsoda,
+ /obj/item/vending_refill/engineering)
+ containername = "unlabeled supply crate"
+
+/datum/supply_packs/vending/ptech
+ name = "PTech Supply Crate"
+ cost = 15
+ contains = list(/obj/item/vending_refill/cart)
+ containername = "ptech supply crate"
+
+/datum/supply_packs/vending/snack
+ name = "Snack Supply Crate"
+ contains = list(/obj/item/vending_refill/snack)
+ cost = 15
+ containername = "snacks supply crate"
+
+/datum/supply_packs/vending/cola
+ name = "Softdrinks Supply Crate"
+ contains = list(/obj/item/vending_refill/cola)
+ cost = 15
+ containername = "softdrinks supply crate"
+
+/datum/supply_packs/vending/vendomat
+ name = "Vendomat Supply Crate"
+ cost = 10
+ contains = list(/obj/item/vending_refill/assist)
+ containername = "vendomat supply crate"
+
+/datum/supply_packs/vending/chinese
+ name = "Chinese Supply Crate"
+ contains = list(/obj/item/vending_refill/chinese)
+ cost = 15
+ containername = "chinese supply crate"
\ No newline at end of file
diff --git a/code/datums/wires/vending.dm b/code/datums/wires/vending.dm
index 054a7e4f669..3861cc68203 100644
--- a/code/datums/wires/vending.dm
+++ b/code/datums/wires/vending.dm
@@ -11,13 +11,13 @@ var/const/VENDING_WIRE_IDSCAN = 8
switch(index)
if(VENDING_WIRE_THROW)
return "Item Throw"
-
+
if(VENDING_WIRE_CONTRABAND)
return "Contraband"
-
+
if(VENDING_WIRE_ELECTRIFY)
return "Electrification"
-
+
if(VENDING_WIRE_IDSCAN)
return "ID Scan"
@@ -36,7 +36,7 @@ var/const/VENDING_WIRE_IDSCAN = 8
var/obj/machinery/vending/V = holder
. += "The orange light is [V.seconds_electrified ? "on" : "off"]."
. += "The red light is [V.shoot_inventory ? "off" : "blinking"]."
- . += "The green light is [(V.categories & CAT_HIDDEN) ? "on" : "off"]."
+ . += "The green light is [V.extended_inventory ? "on" : "off"]."
. += "A [V.scan_id ? "purple" : "yellow"] light is on."
/datum/wires/vending/UpdatePulsed(index)
@@ -45,7 +45,7 @@ var/const/VENDING_WIRE_IDSCAN = 8
if(VENDING_WIRE_THROW)
V.shoot_inventory = !V.shoot_inventory
if(VENDING_WIRE_CONTRABAND)
- V.categories ^= CAT_HIDDEN
+ V.extended_inventory = !V.extended_inventory
if(VENDING_WIRE_ELECTRIFY)
V.seconds_electrified = 30
if(VENDING_WIRE_IDSCAN)
@@ -58,7 +58,7 @@ var/const/VENDING_WIRE_IDSCAN = 8
if(VENDING_WIRE_THROW)
V.shoot_inventory = !mended
if(VENDING_WIRE_CONTRABAND)
- V.categories &= ~CAT_HIDDEN
+ V.extended_inventory = FALSE
if(VENDING_WIRE_ELECTRIFY)
if(mended)
V.seconds_electrified = 0
diff --git a/code/game/machinery/constructable_frame.dm b/code/game/machinery/constructable_frame.dm
index 8cb3301e40c..547692ad2ff 100644
--- a/code/game/machinery/constructable_frame.dm
+++ b/code/game/machinery/constructable_frame.dm
@@ -227,46 +227,56 @@ to destroy them and players will be able to make replacements.
*/
/obj/item/circuitboard/vendor
name = "circuit board (Booze-O-Mat Vendor)"
- build_path = /obj/machinery/vending/boozeomat
board_type = "machine"
origin_tech = "programming=1"
- frame_desc = "Requires 3 Resupply Canisters."
- req_components = list(
- /obj/item/vending_refill/boozeomat = 3)
+ frame_desc = "Requires 1 Resupply Canister."
+ build_path = /obj/machinery/vending/boozeomat
+ req_components = list(/obj/item/vending_refill/boozeomat = 1)
- var/list/names_paths = list("Booze-O-Mat" = /obj/machinery/vending/boozeomat,
- "Solar's Best Hot Drinks" = /obj/machinery/vending/coffee,
- "Getmore Chocolate Corp" = /obj/machinery/vending/snack,
- "Mr. Chang" = /obj/machinery/vending/chinese,
- "Robust Softdrinks" = /obj/machinery/vending/cola,
- "ShadyCigs Deluxe" = /obj/machinery/vending/cigarette,
- "AutoDrobe" = /obj/machinery/vending/autodrobe,
- "Hatlord 9000" = /obj/machinery/vending/hatdispenser,
- "Suitlord 9000" = /obj/machinery/vending/suitdispenser,
- "Shoelord 9000" = /obj/machinery/vending/shoedispenser,
- "ClothesMate" = /obj/machinery/vending/clothing,
- "CritterCare" = /obj/machinery/vending/crittercare)
+ var/static/list/vending_names_paths = list(
+ /obj/machinery/vending/boozeomat = "Booze-O-Mat",
+ /obj/machinery/vending/coffee = "Solar's Best Hot Drinks",
+ /obj/machinery/vending/snack = "Getmore Chocolate Corp",
+ /obj/machinery/vending/chinese = "Mr. Chang",
+ /obj/machinery/vending/cola = "Robust Softdrinks",
+ /obj/machinery/vending/cigarette = "ShadyCigs Deluxe",
+ /obj/machinery/vending/hatdispenser = "Hatlord 9000",
+ /obj/machinery/vending/suitdispenser = "Suitlord 9000",
+ /obj/machinery/vending/shoedispenser = "Shoelord 9000",
+ /obj/machinery/vending/clothing = "ClothesMate",
+ /obj/machinery/vending/medical = "NanoMed Plus",
+ /obj/machinery/vending/wallmed = "NanoMed",
+ /obj/machinery/vending/assist = "Vendomat",
+ /obj/machinery/vending/engivend = "Engi-Vend",
+ /obj/machinery/vending/hydronutrients = "NutriMax",
+ /obj/machinery/vending/hydroseeds = "MegaSeed Servitor",
+ /obj/machinery/vending/sustenance = "Sustenance Vendor",
+ /obj/machinery/vending/dinnerware = "Plasteel Chef's Dinnerware Vendor",
+ /obj/machinery/vending/cart = "PTech",
+ /obj/machinery/vending/robotics = "Robotech Deluxe",
+ /obj/machinery/vending/engineering = "Robco Tool Maker",
+ /obj/machinery/vending/sovietsoda = "BODA",
+ /obj/machinery/vending/security = "SecTech",
+ /obj/machinery/vending/modularpc = "Deluxe Silicate Selections",
+ /obj/machinery/vending/crittercare = "CritterCare")
/obj/item/circuitboard/vendor/attackby(obj/item/I, mob/user, params)
- if(istype(I, /obj/item/screwdriver))
- set_type(null, user)
-
-
-/obj/item/circuitboard/vendor/proc/set_type(typepath, mob/user)
- var/new_name = "Booze-O-Mat Vendor"
- if(!typepath)
- new_name = input("Circuit Setting", "What would you change the board setting to?") in names_paths
- typepath = names_paths[new_name]
+ if(isscrewdriver(I))
+ var/static/list/display_vending_names_paths
+ if(!display_vending_names_paths)
+ display_vending_names_paths = list()
+ for(var/path in vending_names_paths)
+ display_vending_names_paths[vending_names_paths[path]] = path
+ var/choice = input(user, "Choose a new brand","Select an Item") as null|anything in display_vending_names_paths
+ set_type(display_vending_names_paths[choice])
else
- for(var/name in names_paths)
- if(names_paths[name] == typepath)
- new_name = name
- break
+ return ..()
+
+
+/obj/item/circuitboard/vendor/proc/set_type(obj/machinery/vending/typepath)
build_path = typepath
- name = "circuit board ([new_name])"
- req_components = list(text2path("/obj/item/vending_refill/[copytext("[build_path]", 24)]") = 3)
- if(user)
- to_chat(user, "You set the board to [new_name].")
+ name = "circuit board ([vending_names_paths[build_path]] Vendor)"
+ req_components = list(initial(typepath.refill_canister) = 1)
/obj/item/circuitboard/smes
name = "circuit board (SMES)"
diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm
index 8533824b4a8..2c76308c46c 100644
--- a/code/game/machinery/vending.dm
+++ b/code/game/machinery/vending.dm
@@ -2,29 +2,14 @@
* Datum used to hold information about a product in a vending machine
*/
/datum/data/vending_product
- var/product_name = "generic" // Display name for the product
+ name = "generic"
+ ///Typepath of the product that is created when this record "sells"
var/product_path = null
- var/amount = 0 // Amount held in the vending machine
+ ///How many of this product we currently have
+ var/amount = 0
+ ///How many we can store at maximum
var/max_amount = 0
var/price = 0 // Price to buy one
- var/display_color = null // Display color for vending machine listing
- var/category = CAT_NORMAL // CAT_HIDDEN for contraband, CAT_COIN for premium
-
-/datum/data/vending_product/New(path, name = null, amount = 1, price = 0, color = null, category = CAT_NORMAL)
- ..()
-
- product_path = path
-
- if(!name)
- var/atom/temp = path
- product_name = initial(temp.name)
- else
- product_name = name
-
- amount = amount
- price = price
- display_color = color
- category = category
/**
* A vending machine
@@ -52,7 +37,6 @@
var/active = 1 //No sales pitches if off!
var/vend_ready = 1 //Are we ready to vend?? Is it time??
var/vend_delay = 10 //How long does it take to vend?
- var/categories = CAT_NORMAL // Bitmask of cats we're currently showing
var/datum/data/vending_product/currently_vending = null // What we're requesting payment for right now
var/status_message = "" // Status screen messages like "insufficient funds", displayed in NanoUI
var/status_error = 0 // Set to 1 if status_message is an error
@@ -66,6 +50,7 @@
// List of vending_product items available.
var/list/product_records = list()
var/list/hidden_records = list()
+ var/list/coin_records = list()
// // Variables used to initialize advertising
var/product_slogans = "" //String of slogans separated by semicolons, optional
@@ -77,11 +62,14 @@
var/list/slogan_list = list()
var/vend_reply //Thank you for shopping!
var/shut_up = 0 //Stop spouting those godawful pitches!
+ ///can we access the hidden inventory?
+ var/extended_inventory = 0
var/last_reply = 0
var/last_slogan = 0 //When did we last pitch?
var/slogan_delay = 6000 //How long until we can pitch again?
- var/obj/item/vending_refill/refill_canister = null //The type of refill canisters used by this machine.
+ //The type of refill canisters used by this machine.
+ var/obj/item/vending_refill/refill_canister = null
// Things that can go wrong
emagged = 0 //Ignores if somebody doesn't have card access to that machine.
@@ -98,8 +86,15 @@
var/obj/item/inserted_item = null
/obj/machinery/vending/Initialize(mapload)
+ var/build_inv = FALSE
+ if(!refill_canister)
+ build_inv = TRUE
. = ..()
wires = new(src)
+ if(build_inv) //non-constructable vending machine
+ build_inventory(products, product_records)
+ build_inventory(contraband, hidden_records)
+ build_inventory(premium, coin_records)
if(product_slogans)
slogan_list += splittext(product_slogans, ";")
@@ -111,7 +106,6 @@
if(product_ads)
ads_list += splittext(product_ads, ";")
- build_inventory()
power_change()
/obj/machinery/vending/Destroy()
@@ -120,6 +114,20 @@
QDEL_NULL(inserted_item)
return ..()
+/obj/machinery/vending/RefreshParts() //Better would be to make constructable child
+ if(!component_parts)
+ return
+
+ product_records = list()
+ hidden_records = list()
+ coin_records = list()
+ build_inventory(products, product_records, start_empty = TRUE)
+ build_inventory(contraband, hidden_records, start_empty = TRUE)
+ build_inventory(premium, coin_records, start_empty = TRUE)
+ for(var/obj/item/vending_refill/VR in component_parts)
+ restock(VR)
+
+
/**
* Build src.produdct_records from the products lists
*
@@ -127,24 +135,82 @@
* products that the vending machine is to carry without manually populating
* src.product_records.
*/
-/obj/machinery/vending/proc/build_inventory()
- var/list/all_products = list(
- list(products, CAT_NORMAL),
- list(contraband, CAT_HIDDEN),
- list(premium, CAT_COIN))
+/obj/machinery/vending/proc/build_inventory(list/productlist, list/recordlist, start_empty = FALSE)
+ for(var/typepath in productlist)
+ var/amount = productlist[typepath]
+ if(isnull(amount))
+ amount = 0
- for(var/current_list in all_products)
- var/category = current_list[2]
+ var/atom/temp = typepath
+ var/datum/data/vending_product/R = new /datum/data/vending_product()
+ R.name = initial(temp.name)
+ R.product_path = typepath
+ if(!start_empty)
+ R.amount = amount
+ R.max_amount = amount
+ R.price = (typepath in prices) ? prices[typepath] : 0
+ recordlist += R
+/**
+ * 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
+ */
+/obj/machinery/vending/proc/restock(obj/item/vending_refill/canister)
+ if(!canister.products)
+ canister.products = products.Copy()
+ if(!canister.contraband)
+ canister.contraband = contraband.Copy()
+ if(!canister.premium)
+ canister.premium = premium.Copy()
+ . = 0
+ . += refill_inventory(canister.products, product_records)
+ . += refill_inventory(canister.contraband, hidden_records)
+ . += refill_inventory(canister.premium, coin_records)
+/**
+ * Refill our inventory from the passed in product list into the record list
+ *
+ * Arguments:
+ * * productlist - list of types -> amount
+ * * recordlist - existing record datums
+ */
+/obj/machinery/vending/proc/refill_inventory(list/productlist, list/recordlist)
+ . = 0
+ for(var/R in recordlist)
+ var/datum/data/vending_product/record = R
+ var/diff = min(record.max_amount - record.amount, productlist[record.product_path])
+ if (diff)
+ productlist[record.product_path] -= diff
+ record.amount += diff
+ . += diff
+/**
+ * Set up a refill canister that matches this machines products
+ *
+ * This is used when the machine is deconstructed, so the items aren't "lost"
+ */
+/obj/machinery/vending/proc/update_canister()
+ if(!component_parts)
+ return
- for(var/entry in current_list[1])
- var/datum/data/vending_product/product = new /datum/data/vending_product(entry)
+ var/obj/item/vending_refill/R = locate() in component_parts
+ if(!R)
+ CRASH("Constructible vending machine did not have a refill canister")
+ return
- product.price = (entry in prices) ? prices[entry] : 0
- product.amount = (current_list[1][entry]) ? current_list[1][entry] : 1
- product.max_amount = product.amount
- product.category = category
+ R.products = unbuild_inventory(product_records)
+ R.contraband = unbuild_inventory(hidden_records)
+ R.premium = unbuild_inventory(coin_records)
- product_records.Add(product)
+/**
+ * Given a record list, go through and and return a list of type -> amount
+ */
+/obj/machinery/vending/proc/unbuild_inventory(list/recordlist)
+ . = list()
+ for(var/R in recordlist)
+ var/datum/data/vending_product/record = R
+ .[record.product_path] += record.amount
/obj/machinery/vending/ex_act(severity) //TO-DO-OBJECT-DAMAGE: Kill off when everything is damageable
switch(severity)
@@ -156,11 +222,6 @@
if(3)
take_damage(rand(10, 90), BRUTE, "bomb", 0)
-/obj/machinery/vending/RefreshParts() //Better would be to make constructable child
- if(component_parts)
- for(var/obj/item/vending_refill/VR in component_parts)
- refill_inventory(VR, product_records, usr)
-
/obj/machinery/vending/deconstruct(disassembled = TRUE)
eject_item()
if(!refill_canister) //the non constructable vendors drop metal instead of a machine frame.
@@ -172,37 +233,6 @@
/obj/machinery/vending/blob_act(obj/structure/blob/B) //TO-DO-OBJECT-DAMAGE: Kill off when everything is damageable
take_damage(400, BRUTE, "melee", 0, get_dir(src, B))
-/obj/machinery/vending/proc/refill_inventory(obj/item/vending_refill/refill, list/machine, mob/user)
- var/total = 0
-
- var/to_restock = 0
- for(var/datum/data/vending_product/machine_content in machine)
- to_restock += machine_content.max_amount - machine_content.amount
-
- if(to_restock <= refill.charges)
- for(var/datum/data/vending_product/machine_content in machine)
- if(machine_content.amount != machine_content.max_amount)
- if(user)
- to_chat(user, "[machine_content.max_amount - machine_content.amount] of [machine_content.product_name]")
- machine_content.amount = machine_content.max_amount
- refill.charges -= to_restock
- total = to_restock
- else
- var/tmp_charges = refill.charges
- for(var/datum/data/vending_product/machine_content in machine)
- var/restock = Ceiling(((machine_content.max_amount - machine_content.amount)/to_restock)*tmp_charges)
- if(restock > refill.charges)
- restock = refill.charges
- machine_content.amount += restock
- refill.charges -= restock
- total += restock
- if(restock)
- if(user)
- to_chat(user, "[restock] of [machine_content.product_name]")
- if(refill.charges == 0) //due to rounding, we ran out of refill charges, exit.
- break
- return total
-
/obj/machinery/vending/attackby(obj/item/I, mob/user, params)
if(currently_vending && vendor_account && !vendor_account.suspended)
var/paid = 0
@@ -245,14 +275,6 @@
if(ismultitool(I) || iswirecutter(I))
return attack_hand(user)
if(component_parts && iscrowbar(I))
- var/datum/data/vending_product/machine = product_records
- for(var/datum/data/vending_product/machine_content in machine)
- while(machine_content.amount !=0)
- for(var/obj/item/vending_refill/VR in component_parts)
- VR.charges++
- machine_content.amount--
- if(!machine_content.amount)
- break
default_deconstruction_crowbar(I)
return
if(istype(I, /obj/item/coin) && premium.len)
@@ -260,26 +282,26 @@
return
I.forceMove(src)
coin = I
- categories |= CAT_COIN
to_chat(user, "You insert the [I] into the [src]")
SSnanoui.update_uis(src)
return
- if(istype(I, refill_canister) && refill_canister != null)
- if(stat & (BROKEN|NOPOWER))
- to_chat(user, "It does nothing.")
- else if(panel_open)
+ if(refill_canister && istype(I, refill_canister))
+ if(!panel_open)
+ to_chat(user, "You should probably unscrew the service panel first!")
+ else if (stat & (BROKEN|NOPOWER))
+ to_chat(user, "[src] does not respond.")
+ else
//if the panel is open we attempt to refill the machine
var/obj/item/vending_refill/canister = I
- if(canister.charges == 0)
- to_chat(user, "This [canister.name] is empty!")
+ if(canister.get_part_rating() == 0)
+ to_chat(user, "[canister] is empty!")
else
- var/transfered = refill_inventory(canister,product_records,user)
- if(transfered)
- to_chat(user, "You loaded [transfered] items in \the [name].")
+ // instantiate canister if needed
+ var/transferred = restock(canister)
+ if(transferred)
+ to_chat(user, "You loaded [transferred] items in [src].")
else
- to_chat(user, "The [name] is fully stocked.")
- else
- to_chat(user, "You should probably unscrew the service panel first.")
+ to_chat(user, "There's nothing to restock!")
return
if(item_slot_check(user, I))
insert_item(user, I)
@@ -305,6 +327,32 @@
return TRUE
*/
+/obj/machinery/vending/exchange_parts(mob/user, obj/item/storage/part_replacer/W)
+ if(!istype(W))
+ return FALSE
+ if(!W.works_from_distance)
+ return FALSE
+ if(!component_parts || !refill_canister)
+ return FALSE
+
+ var/moved = 0
+ if(panel_open || W.works_from_distance)
+ if(W.works_from_distance)
+ display_parts(user)
+ for(var/I in W)
+ if(istype(I, refill_canister))
+ moved += restock(I)
+ else
+ display_parts(user)
+ if(moved)
+ to_chat(user, "[moved] items restocked.")
+ W.play_rped_sound()
+ return TRUE
+
+/obj/machinery/vending/on_deconstruction()
+ update_canister()
+ . = ..()
+
/obj/machinery/vending/proc/insert_item(mob/user, obj/item/I)
if(!item_slot || inserted_item)
return
@@ -397,8 +445,8 @@
else
// Okay to move the money at this point
var/paid = customer_account.charge(currently_vending.price, vendor_account,
- "Purchase of [currently_vending.product_name]", name, vendor_account.owner_name,
- "Sale of [currently_vending.product_name]", customer_account.owner_name)
+ "Purchase of [currently_vending.name]", name, vendor_account.owner_name,
+ "Sale of [currently_vending.name]", customer_account.owner_name)
if(paid)
// Give the vendor the money. We use the account owner name, which means
@@ -414,7 +462,7 @@
*/
/obj/machinery/vending/proc/credit_purchase(var/target as text)
vendor_account.money += currently_vending.price
- vendor_account.credit(currently_vending.price, "Sale of [currently_vending.product_name]",
+ vendor_account.credit(currently_vending.price, "Sale of [currently_vending.name]",
name, target)
/obj/machinery/vending/attack_ai(mob/user)
@@ -451,7 +499,7 @@
var/list/data = list()
if(currently_vending)
data["mode"] = 1
- data["product"] = sanitize(currently_vending.product_name)
+ data["product"] = sanitize(currently_vending.name)
data["price"] = currently_vending.price
data["message_err"] = 0
data["message"] = src.status_message
@@ -460,17 +508,23 @@
data["mode"] = 0
var/list/listed_products = list()
- for(var/key = 1 to src.product_records.len)
- var/datum/data/vending_product/I = src.product_records[key]
+ var/list/display_records = product_records + coin_records
+ if(extended_inventory)
+ display_records = product_records + coin_records + hidden_records
- if(!(I.category & src.categories))
+ for(var/key = 1 to display_records.len)
+ var/datum/data/vending_product/I = display_records[key]
+
+ if(coin_records.Find(I) && !coin)
+ continue
+
+ if(hidden_records.Find(I) && !extended_inventory)
continue
listed_products.Add(list(list(
"key" = key,
- "name" = sanitize(I.product_name),
+ "name" = sanitize(I.name),
"price" = I.price,
- "color" = I.display_color,
"amount" = I.amount)))
data["products"] = listed_products
@@ -506,7 +560,6 @@
usr.put_in_hands(coin)
coin = null
to_chat(usr, "You remove [coin] from [src].")
- categories &= ~CAT_COIN
if(href_list["remove_item"])
eject_item(usr)
@@ -544,10 +597,16 @@
return
var/key = text2num(href_list["vend"])
- var/datum/data/vending_product/R = product_records[key]
+ var/list/display_records = product_records + coin_records
+ if(extended_inventory)
+ display_records = product_records + coin_records + hidden_records
+ var/datum/data/vending_product/R = display_records[key]
// This should not happen unless the request from NanoUI was bad
- if(!(R.category & categories))
+ if(coin_records.Find(R) && !coin)
+ return
+
+ if(hidden_records.Find(R) && !extended_inventory)
return
if(R.price <= 0)
@@ -585,7 +644,7 @@
status_error = 0
SSnanoui.update_uis(src)
- if(R.category & CAT_COIN)
+ if(coin_records.Find(R))
if(!coin)
to_chat(user, "You need to insert a coin to get this item.")
return
@@ -595,10 +654,8 @@
else
to_chat(user, "You weren't able to pull the coin out fast enough, the machine ate it, string and all.")
QDEL_NULL(coin)
- categories &= ~CAT_COIN
else
QDEL_NULL(coin)
- categories &= ~CAT_COIN
R.amount--
@@ -644,13 +701,6 @@
qdel(vended)
*/
-/obj/machinery/vending/proc/stock(datum/data/vending_product/R, mob/user)
- if(panel_open)
- to_chat(user, "You stock the [src] with \a [R.product_name]")
- R.amount++
- updateUsrDialog()
-
-
/obj/machinery/vending/process()
if(stat & (BROKEN|NOPOWER))
return
@@ -771,6 +821,22 @@
vend_delay = 0
*/
+/obj/machinery/vending/assist
+ products = list( /obj/item/assembly/prox_sensor = 5,/obj/item/assembly/igniter = 3,/obj/item/assembly/signaler = 4,
+ /obj/item/wirecutters = 1, /obj/item/cartridge/signal = 4)
+ contraband = list(/obj/item/flashlight = 5,/obj/item/assembly/timer = 2, /obj/item/assembly/voice = 2, /obj/item/assembly/health = 2)
+ product_ads = "Only the finest!;Have some tools.;The most robust equipment.;The finest gear in space!"
+ refill_canister = /obj/item/vending_refill/assist
+
+/obj/machinery/vending/assist/Initialize(mapload)
+ component_parts = list()
+ var/obj/item/circuitboard/vendor/V = new(null)
+ V.set_type(type)
+ component_parts += V
+ component_parts += new /obj/item/vending_refill/assist(null)
+ RefreshParts()
+ return ..()
+
/obj/machinery/vending/boozeomat
name = "\improper Booze-O-Mat"
desc = "A technological marvel, supposedly able to mix just the mixture you'd like to drink the moment you ask for one."
@@ -808,22 +874,14 @@
/obj/machinery/vending/boozeomat/syndicate_access
req_access = list(access_syndicate)
-/obj/machinery/vending/assist
- products = list( /obj/item/assembly/prox_sensor = 5,/obj/item/assembly/igniter = 3,/obj/item/assembly/signaler = 4,
- /obj/item/wirecutters = 1, /obj/item/cartridge/signal = 4)
- contraband = list(/obj/item/flashlight = 5,/obj/item/assembly/timer = 2, /obj/item/assembly/voice = 2, /obj/item/assembly/health = 2)
- product_ads = "Only the finest!;Have some tools.;The most robust equipment.;The finest gear in space!"
- armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 0, bio = 0, rad = 0)
-
-/obj/machinery/vending/boozeomat/New()
- ..()
+/obj/machinery/vending/boozeomat/Initialize(mapload)
component_parts = list()
var/obj/item/circuitboard/vendor/V = new(null)
V.set_type(type)
component_parts += V
- component_parts += new /obj/item/vending_refill/boozeomat(0)
- component_parts += new /obj/item/vending_refill/boozeomat(0)
- component_parts += new /obj/item/vending_refill/boozeomat(0)
+ component_parts += new /obj/item/vending_refill/boozeomat(null)
+ RefreshParts()
+ return ..()
/obj/machinery/vending/coffee
@@ -846,15 +904,14 @@
/obj/machinery/vending/coffee/free
prices = list()
-/obj/machinery/vending/coffee/New()
- ..()
+/obj/machinery/vending/coffee/Initialize(mapload)
component_parts = list()
var/obj/item/circuitboard/vendor/V = new(null)
V.set_type(type)
component_parts += V
- component_parts += new /obj/item/vending_refill/coffee(0)
- component_parts += new /obj/item/vending_refill/coffee(0)
- component_parts += new /obj/item/vending_refill/coffee(0)
+ component_parts += new /obj/item/vending_refill/coffee(null)
+ RefreshParts()
+ return ..()
/obj/machinery/vending/coffee/item_slot_check(mob/user, obj/item/I)
if(!(istype(I, /obj/item/reagent_containers/glass) || istype(I, /obj/item/reagent_containers/food/drinks)))
@@ -912,15 +969,14 @@
/obj/machinery/vending/snack/free
prices = list()
-/obj/machinery/vending/snack/New()
- ..()
+/obj/machinery/vending/snack/Initialize(mapload)
component_parts = list()
var/obj/item/circuitboard/vendor/V = new(null)
V.set_type(type)
component_parts += V
- component_parts += new /obj/item/vending_refill/snack(0)
- component_parts += new /obj/item/vending_refill/snack(0)
- component_parts += new /obj/item/vending_refill/snack(0)
+ component_parts += new /obj/item/vending_refill/snack(null)
+ RefreshParts()
+ return ..()
/obj/machinery/vending/chinese
name = "\improper Mr. Chang"
@@ -936,15 +992,14 @@
/obj/machinery/vending/chinese/free
prices = list()
-/obj/machinery/vending/chinese/New()
- ..()
+/obj/machinery/vending/chinese/Initialize(mapload)
component_parts = list()
var/obj/item/circuitboard/vendor/V = new(null)
V.set_type(type)
component_parts += V
- component_parts += new /obj/item/vending_refill/chinese(0)
- component_parts += new /obj/item/vending_refill/chinese(0)
- component_parts += new /obj/item/vending_refill/chinese(0)
+ component_parts += new /obj/item/vending_refill/chinese(null)
+ RefreshParts()
+ return ..()
/obj/machinery/vending/cola
name = "\improper Robust Softdrinks"
@@ -964,18 +1019,16 @@
/obj/machinery/vending/cola/free
prices = list()
-/obj/machinery/vending/cola/New()
- ..()
+/obj/machinery/vending/cola/Initialize(mapload)
component_parts = list()
var/obj/item/circuitboard/vendor/V = new(null)
V.set_type(type)
component_parts += V
- component_parts += new /obj/item/vending_refill/cola(0)
- component_parts += new /obj/item/vending_refill/cola(0)
- component_parts += new /obj/item/vending_refill/cola(0)
+ component_parts += new /obj/item/vending_refill/cola(null)
+ RefreshParts()
+ return ..()
-//This one's from bay12
/obj/machinery/vending/cart
name = "\improper PTech"
desc = "Cartridges for PDA's."
@@ -989,11 +1042,20 @@
prices = list(/obj/item/pda =300,/obj/item/cartridge/mob_hunt_game = 50,/obj/item/cartridge/medical = 200,/obj/item/cartridge/chemistry = 150,/obj/item/cartridge/engineering = 100,
/obj/item/cartridge/atmos = 75,/obj/item/cartridge/janitor = 100,/obj/item/cartridge/signal/toxins = 150,
/obj/item/cartridge/signal = 75)
- armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 0, bio = 0, rad = 0)
+ refill_canister = /obj/item/vending_refill/cart
/obj/machinery/vending/cart/free
prices = list()
+/obj/machinery/vending/cart/Initialize(mapload)
+ component_parts = list()
+ var/obj/item/circuitboard/vendor/V = new(null)
+ V.set_type(type)
+ component_parts += V
+ component_parts += new /obj/item/vending_refill/cart(null)
+ RefreshParts()
+ return ..()
+
/obj/machinery/vending/liberationstation
name = "\improper Liberation Station"
desc = "An overwhelming amount of ancient patriotism washes over you just by looking at the machine."
@@ -1084,15 +1146,14 @@
/obj/item/lighter/zippo = 3)
prices = list()
-/obj/machinery/vending/cigarette/New()
- ..()
+/obj/machinery/vending/cigarette/Initialize(mapload)
component_parts = list()
var/obj/item/circuitboard/vendor/V = new(null)
V.set_type(type)
component_parts += V
- component_parts += new /obj/item/vending_refill/cigarette(0)
- component_parts += new /obj/item/vending_refill/cigarette(0)
- component_parts += new /obj/item/vending_refill/cigarette(0)
+ component_parts += new /obj/item/vending_refill/cigarette(null)
+ RefreshParts()
+ return ..()
/obj/machinery/vending/medical
name = "\improper NanoMed Plus"
@@ -1112,12 +1173,21 @@
/obj/item/healthupgrade = 4, /obj/item/reagent_containers/hypospray/safety = 2, /obj/item/sensor_device = 2, /obj/item/pinpointer/crew = 2)
contraband = list(/obj/item/reagent_containers/glass/bottle/sulfonal = 1, /obj/item/reagent_containers/glass/bottle/pancuronium = 1)
armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 0, bio = 0, rad = 0)
+ refill_canister = /obj/item/vending_refill/medical
/obj/machinery/vending/medical/syndicate_access
name = "\improper SyndiMed Plus"
req_access = list(access_syndicate)
-//This one's from bay12
+/obj/machinery/vending/medical/Initialize(mapload)
+ component_parts = list()
+ var/obj/item/circuitboard/vendor/V = new(null)
+ V.set_type(type)
+ component_parts += V
+ component_parts += new /obj/item/vending_refill/medical(null)
+ RefreshParts()
+ return ..()
+
/obj/machinery/vending/plasmaresearch
name = "\improper Toximate 3000"
desc = "All the fine parts you need in one vending machine!"
@@ -1125,7 +1195,7 @@
/obj/item/wirecutters = 1, /obj/item/assembly/timer = 8)
contraband = list(/obj/item/flashlight = 5, /obj/item/assembly/voice = 3, /obj/item/assembly/health = 3, /obj/item/assembly/infra = 3)
-/obj/machinery/vending/wallmed1
+/obj/machinery/vending/wallmed
name = "\improper NanoMed"
desc = "Wall-mounted Medical Equipment dispenser."
product_ads = "Go save some lives!;The best stuff for your medbay.;Only the finest tools.;Natural chemicals!;This stuff saves lives.;Don't you want some?"
@@ -1135,19 +1205,18 @@
products = list(/obj/item/stack/medical/bruise_pack = 2, /obj/item/stack/medical/ointment = 2, /obj/item/reagent_containers/hypospray/autoinjector = 4, /obj/item/healthanalyzer = 1)
contraband = list(/obj/item/reagent_containers/syringe/charcoal = 4, /obj/item/reagent_containers/syringe/antiviral = 4, /obj/item/reagent_containers/food/pill/tox = 1)
armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 0, bio = 0, rad = 0)
+ refill_canister = /obj/item/vending_refill/wallmed
-/obj/machinery/vending/wallmed2
- name = "\improper NanoMed"
- desc = "Wall-mounted Medical Equipment dispenser."
- icon_state = "wallmed"
- icon_deny = "wallmed-deny"
- density = FALSE //It is wall-mounted, and thus, not dense. --Superxpdude
- products = list(/obj/item/reagent_containers/hypospray/autoinjector = 5, /obj/item/reagent_containers/syringe/charcoal = 3, /obj/item/stack/medical/bruise_pack = 3,
- /obj/item/stack/medical/ointment = 3, /obj/item/healthanalyzer = 3)
- contraband = list(/obj/item/reagent_containers/food/pill/tox = 3)
- armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 0, bio = 0, rad = 0)
+/obj/machinery/vending/wallmed/Initialize(mapload)
+ component_parts = list()
+ var/obj/item/circuitboard/vendor/V = new(null)
+ V.set_type(type)
+ component_parts += V
+ component_parts += new /obj/item/vending_refill/wallmed(null)
+ RefreshParts()
+ return ..()
-/obj/machinery/vending/wallmed1/syndicate
+/obj/machinery/vending/wallmed/syndicate
name = "\improper SyndiMed Plus"
desc = "EVIL wall-mounted Medical Equipment dispenser."
icon_state = "syndimed"
@@ -1168,7 +1237,16 @@
/obj/item/reagent_containers/food/snacks/donut = 12,/obj/item/storage/box/evidence = 6,/obj/item/flashlight/seclite = 4,/obj/item/restraints/legcuffs/bola/energy = 7,
/obj/item/clothing/mask/muzzle/safety = 4)
contraband = list(/obj/item/clothing/glasses/sunglasses = 2,/obj/item/storage/fancy/donut_box = 2,/obj/item/hailer = 5)
- armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 0, bio = 0, rad = 0)
+ refill_canister = /obj/item/vending_refill/security
+
+/obj/machinery/vending/security/Initialize(mapload)
+ component_parts = list()
+ var/obj/item/circuitboard/vendor/V = new(null)
+ V.set_type(type)
+ component_parts += V
+ component_parts += new /obj/item/vending_refill/security(null)
+ RefreshParts()
+ return ..()
/obj/machinery/vending/hydronutrients
name = "\improper NutriMax"
@@ -1180,9 +1258,16 @@
products = list(/obj/item/reagent_containers/glass/bottle/nutrient/ez = 30,/obj/item/reagent_containers/glass/bottle/nutrient/l4z = 20,/obj/item/reagent_containers/glass/bottle/nutrient/rh = 10,/obj/item/reagent_containers/spray/pestspray = 20,
/obj/item/reagent_containers/syringe = 5,/obj/item/storage/bag/plants = 5,/obj/item/cultivator = 3,/obj/item/shovel/spade = 3,/obj/item/plant_analyzer = 4)
contraband = list(/obj/item/reagent_containers/glass/bottle/ammonia = 10,/obj/item/reagent_containers/glass/bottle/diethylamine = 5)
- armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 0, bio = 0, rad = 0)
+ refill_canister = /obj/item/vending_refill/hydronutrients
-///obj/item/beezeez = 45,
+/obj/machinery/vending/hydronutrients/Initialize(mapload)
+ component_parts = list()
+ var/obj/item/circuitboard/vendor/V = new(null)
+ V.set_type(type)
+ component_parts += V
+ component_parts += new /obj/item/vending_refill/hydronutrients(null)
+ RefreshParts()
+ return ..()
/obj/machinery/vending/hydroseeds
name = "\improper MegaSeed Servitor"
@@ -1201,34 +1286,16 @@
contraband = list(/obj/item/seeds/amanita = 2, /obj/item/seeds/glowshroom = 2, /obj/item/seeds/liberty = 2, /obj/item/seeds/nettle = 2,
/obj/item/seeds/plump = 2, /obj/item/seeds/reishi = 2, /obj/item/seeds/cannabis = 3, /obj/item/seeds/starthistle = 2, /obj/item/seeds/fungus = 3, /obj/item/seeds/random = 2)
premium = list(/obj/item/reagent_containers/spray/waterflower = 1)
- armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 0, bio = 0, rad = 0)
+ refill_canister = /obj/item/vending_refill/hydroseeds
-/**
- * Populate hydroseeds product_records
- *
- * This needs to be customized to fetch the actual names of the seeds, otherwise
- * the machine would simply list "packet of seeds" times 20
- */
-/obj/machinery/vending/hydroseeds/build_inventory()
- var/list/all_products = list(
- list(products, CAT_NORMAL),
- list(contraband, CAT_HIDDEN),
- list(premium, CAT_COIN))
-
- for(var/current_list in all_products)
- var/category = current_list[2]
-
- for(var/entry in current_list[1])
- var/obj/item/seeds/S = new entry(src)
- var/name = S.name
- var/datum/data/vending_product/product = new/datum/data/vending_product(entry, name)
-
- product.price = (entry in prices) ? prices[entry] : 0
- product.amount = (current_list[1][entry]) ? current_list[1][entry] : 1
- product.max_amount = product.amount
- product.category = category
-
- product_records.Add(product)
+/obj/machinery/vending/hydroseeds/Initialize(mapload)
+ component_parts = list()
+ var/obj/item/circuitboard/vendor/V = new(null)
+ V.set_type(type)
+ component_parts += V
+ component_parts += new /obj/item/vending_refill/hydroseeds(null)
+ RefreshParts()
+ return ..()
/obj/machinery/vending/magivend
name = "\improper MagiVend"
@@ -1296,15 +1363,14 @@
premium = list(/obj/item/clothing/suit/hgpirate = 1, /obj/item/clothing/head/hgpiratecap = 1, /obj/item/clothing/head/helmet/roman = 1, /obj/item/clothing/head/helmet/roman/legionaire = 1, /obj/item/clothing/under/roman = 1, /obj/item/clothing/shoes/roman = 1, /obj/item/shield/riot/roman = 1)
refill_canister = /obj/item/vending_refill/autodrobe
-/obj/machinery/vending/autodrobe/New()
- ..()
+/obj/machinery/vending/autodrobe/Initialize(mapload)
component_parts = list()
var/obj/item/circuitboard/vendor/V = new(null)
V.set_type(type)
component_parts += V
- component_parts += new /obj/item/vending_refill/autodrobe(0)
- component_parts += new /obj/item/vending_refill/autodrobe(0)
- component_parts += new /obj/item/vending_refill/autodrobe(0)
+ component_parts += new /obj/item/vending_refill/autodrobe(null)
+ RefreshParts()
+ return ..()
/obj/machinery/vending/dinnerware
name = "\improper Plasteel Chef's Dinnerware Vendor"
@@ -1326,7 +1392,16 @@
/obj/item/kitchen/mould/coin = 1, /obj/item/kitchen/mould/loli = 1,
/obj/item/kitchen/cutter = 2)
contraband = list(/obj/item/kitchen/rollingpin = 2, /obj/item/kitchen/knife/butcher = 2)
- armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 0, bio = 0, rad = 0)
+ refill_canister = /obj/item/vending_refill/dinnerware
+
+/obj/machinery/vending/dinnerware/Initialize(mapload)
+ component_parts = list()
+ var/obj/item/circuitboard/vendor/V = new(null)
+ V.set_type(type)
+ component_parts += V
+ component_parts += new /obj/item/vending_refill/dinnerware(null)
+ RefreshParts()
+ return ..()
/obj/machinery/vending/sovietsoda
name = "\improper BODA"
@@ -1335,7 +1410,16 @@
product_ads = "For Tsar and Country.;Have you fulfilled your nutrition quota today?;Very nice!;We are simple people, for this is all we eat.;If there is a person, there is a problem. If there is no person, then there is no problem."
products = list(/obj/item/reagent_containers/food/drinks/drinkingglass/soda = 30)
contraband = list(/obj/item/reagent_containers/food/drinks/drinkingglass/cola = 20)
- armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 0, bio = 0, rad = 0)
+ refill_canister = /obj/item/vending_refill/sovietsoda
+
+/obj/machinery/vending/sovietsoda/Initialize(mapload)
+ component_parts = list()
+ var/obj/item/circuitboard/vendor/V = new(null)
+ V.set_type(type)
+ component_parts += V
+ component_parts += new /obj/item/vending_refill/sovietsoda(null)
+ RefreshParts()
+ return ..()
/obj/machinery/vending/tool
name = "\improper YouTool"
@@ -1358,9 +1442,17 @@
products = list(/obj/item/clothing/glasses/meson = 2,/obj/item/multitool = 4,/obj/item/airlock_electronics = 10,/obj/item/firelock_electronics = 10,/obj/item/firealarm_electronics = 10,/obj/item/apc_electronics = 10,/obj/item/airalarm_electronics = 10,/obj/item/stock_parts/cell/high = 10,/obj/item/camera_assembly = 10)
contraband = list(/obj/item/stock_parts/cell/potato = 3)
premium = list(/obj/item/storage/belt/utility = 3)
- armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 0, bio = 0, rad = 0)
+ refill_canister = /obj/item/vending_refill/engivend
+
+/obj/machinery/vending/engivend/Initialize(mapload)
+ component_parts = list()
+ var/obj/item/circuitboard/vendor/V = new(null)
+ V.set_type(type)
+ component_parts += V
+ component_parts += new /obj/item/vending_refill/engivend(null)
+ RefreshParts()
+ return ..()
-//This one's from bay12
/obj/machinery/vending/engineering
name = "\improper Robco Tool Maker"
desc = "Everything you need for do-it-yourself station repair."
@@ -1373,12 +1465,17 @@
/obj/item/stack/cable_coil/heavyduty = 8, /obj/item/stock_parts/cell = 8, /obj/item/weldingtool = 8,/obj/item/clothing/head/welding = 8,
/obj/item/light/tube = 10,/obj/item/clothing/suit/fire = 4, /obj/item/stock_parts/scanning_module = 5,/obj/item/stock_parts/micro_laser = 5,
/obj/item/stock_parts/matter_bin = 5,/obj/item/stock_parts/manipulator = 5,/obj/item/stock_parts/console_screen = 5)
- // There was an incorrect entry (cablecoil/power). I improvised to cablecoil/heavyduty.
- // Another invalid entry, /obj/item/circuitry. I don't even know what that would translate to, removed it.
- // The original products list wasn't finished. The ones without given quantities became quantity 5. -Sayu
- armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 0, bio = 0, rad = 0)
+ refill_canister = /obj/item/vending_refill/engineering
+
+/obj/machinery/vending/engineering/Initialize(mapload)
+ component_parts = list()
+ var/obj/item/circuitboard/vendor/V = new(null)
+ V.set_type(type)
+ component_parts += V
+ component_parts += new /obj/item/vending_refill/engineering(null)
+ RefreshParts()
+ return ..()
-//This one's from bay12
/obj/machinery/vending/robotics
name = "\improper Robotech Deluxe"
desc = "All the tools you need to create your own robot army."
@@ -1389,8 +1486,16 @@
/obj/item/stock_parts/cell/high = 12, /obj/item/assembly/prox_sensor = 3,/obj/item/assembly/signaler = 3,/obj/item/healthanalyzer = 3,
/obj/item/scalpel = 2,/obj/item/circular_saw = 2,/obj/item/tank/anesthetic = 2,/obj/item/clothing/mask/breath/medical = 5,
/obj/item/screwdriver = 5,/obj/item/crowbar = 5)
- //everything after the power cell had no amounts, I improvised. -Sayu
- armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 0, bio = 0, rad = 0)
+ refill_canister = /obj/item/vending_refill/robotics
+
+/obj/machinery/vending/robotics/Initialize(mapload)
+ component_parts = list()
+ var/obj/item/circuitboard/vendor/V = new(null)
+ V.set_type(type)
+ component_parts += V
+ component_parts += new /obj/item/vending_refill/robotics(null)
+ RefreshParts()
+ return ..()
/obj/machinery/vending/sustenance
name = "\improper Sustenance Vendor"
@@ -1401,8 +1506,20 @@
products = list(/obj/item/reagent_containers/food/snacks/tofu = 24,
/obj/item/reagent_containers/food/drinks/ice = 12,
/obj/item/reagent_containers/food/snacks/candy/candy_corn = 6)
- contraband = list(/obj/item/kitchen/knife = 6)
- armor = list(melee = 100, bullet = 100, laser = 100, energy = 100, bomb = 0, bio = 0, rad = 0)
+ contraband = list(/obj/item/kitchen/knife = 6,
+ /obj/item/reagent_containers/food/drinks/coffee = 12,
+ /obj/item/tank/emergency_oxygen = 6,
+ /obj/item/clothing/mask/breath = 6)
+ refill_canister = /obj/item/vending_refill/sustenance
+
+/obj/machinery/vending/sustenance/Initialize(mapload)
+ component_parts = list()
+ var/obj/item/circuitboard/vendor/V = new(null)
+ V.set_type(type)
+ component_parts += V
+ component_parts += new /obj/item/vending_refill/sustenance(null)
+ RefreshParts()
+ return ..()
/obj/machinery/vending/hatdispenser
name = "\improper Hatlord 9000"
@@ -1419,6 +1536,15 @@
premium = list(/obj/item/clothing/head/soft/rainbow = 1)
refill_canister = /obj/item/vending_refill/hatdispenser
+/obj/machinery/vending/hatdispenser/Initialize(mapload)
+ component_parts = list()
+ var/obj/item/circuitboard/vendor/V = new(null)
+ V.set_type(type)
+ component_parts += V
+ component_parts += new /obj/item/vending_refill/hatdispenser(null)
+ RefreshParts()
+ return ..()
+
/obj/machinery/vending/suitdispenser
name = "\improper Suitlord 9000"
desc = "You wonder for a moment why all of your shirts and pants come conjoined. This hurts your head and you stop thinking about it."
@@ -1431,6 +1557,15 @@
premium = list(/obj/item/clothing/under/rainbow = 1)
refill_canister = /obj/item/vending_refill/suitdispenser
+/obj/machinery/vending/suitdispenser/Initialize(mapload)
+ component_parts = list()
+ var/obj/item/circuitboard/vendor/V = new(null)
+ V.set_type(type)
+ component_parts += V
+ component_parts += new /obj/item/vending_refill/suitdispenser(null)
+ RefreshParts()
+ return ..()
+
/obj/machinery/vending/shoedispenser
name = "\improper Shoelord 9000"
desc = "Wow, hatlord looked fancy, suitlord looked streamlined, and this is just normal. The guy who designed these must be an idiot."
@@ -1441,6 +1576,15 @@
premium = list(/obj/item/clothing/shoes/rainbow = 1)
refill_canister = /obj/item/vending_refill/shoedispenser
+/obj/machinery/vending/shoedispenser/Initialize(mapload)
+ component_parts = list()
+ var/obj/item/circuitboard/vendor/V = new(null)
+ V.set_type(type)
+ component_parts += V
+ component_parts += new /obj/item/vending_refill/shoedispenser(null)
+ RefreshParts()
+ return ..()
+
/obj/machinery/vending/syndicigs
name = "\improper Suspicious Cigarette Machine"
desc = "Smoke 'em if you've got 'em."
@@ -1458,9 +1602,7 @@
icon_state = "snack"
products = list(/obj/item/reagent_containers/food/snacks/chips =6,/obj/item/reagent_containers/food/snacks/sosjerky = 6,
/obj/item/reagent_containers/food/snacks/syndicake = 6, /obj/item/reagent_containers/food/snacks/cheesiehonkers = 6)
- refill_canister = /obj/item/vending_refill/snack
-//This one's from NTstation
//don't forget to change the refill size if you change the machine's contents!
/obj/machinery/vending/clothing
name = "\improper ClothesMate" //renamed to make the slogan rhyme
@@ -1555,15 +1697,14 @@
refill_canister = /obj/item/vending_refill/clothing
-/obj/machinery/vending/clothing/New()
- ..()
+/obj/machinery/vending/clothing/Initialize(mapload)
component_parts = list()
var/obj/item/circuitboard/vendor/V = new(null)
V.set_type(type)
component_parts += V
- component_parts += new /obj/item/vending_refill/clothing(0)
- component_parts += new /obj/item/vending_refill/clothing(0)
- component_parts += new /obj/item/vending_refill/clothing(0)
+ component_parts += new /obj/item/vending_refill/clothing(null)
+ RefreshParts()
+ return ..()
/obj/machinery/vending/artvend
name = "\improper ArtVend"
@@ -1604,12 +1745,54 @@
/obj/machinery/vending/crittercare/free
prices = list()
-/obj/machinery/vending/crittercare/New()
- ..()
+/obj/machinery/vending/crittercare/Initialize(mapload)
component_parts = list()
var/obj/item/circuitboard/vendor/V = new(null)
V.set_type(type)
component_parts += V
- component_parts += new /obj/item/vending_refill/crittercare(0)
- component_parts += new /obj/item/vending_refill/crittercare(0)
- component_parts += new /obj/item/vending_refill/crittercare(0)
+ component_parts += new /obj/item/vending_refill/crittercare(null)
+ RefreshParts()
+ return ..()
+
+/obj/machinery/vending/modularpc
+ name = "\improper Deluxe Silicate Selections"
+ desc = "All the parts you need to build your own custom pc."
+ icon_state = "modularpc"
+ icon_deny = "modularpc-deny"
+ product_ads = "Get your gamer gear!;The best GPUs for all of your space-crypto needs!;The most robust cooling!;The finest RGB in space!"
+ vend_reply = "Game on!"
+ products = list(/obj/item/modular_computer/laptop = 4,
+ /obj/item/modular_computer/tablet = 4,
+ /obj/item/computer_hardware/hard_drive = 4,
+ /obj/item/computer_hardware/hard_drive/small = 4,
+ /obj/item/computer_hardware/network_card = 8,
+ /obj/item/computer_hardware/hard_drive/portable = 8,
+ /obj/item/computer_hardware/battery = 8,
+ /obj/item/stock_parts/cell/computer = 8,
+ /obj/item/computer_hardware/processor_unit = 4,
+ /obj/item/computer_hardware/processor_unit/small = 4)
+ premium = list(/obj/item/computer_hardware/card_slot = 2,
+ /obj/item/computer_hardware/ai_slot = 2,
+ /obj/item/computer_hardware/printer/mini = 2,
+ /obj/item/computer_hardware/recharger/APC = 2,
+ /obj/item/paicard = 2)
+ prices = list(/obj/item/modular_computer/laptop = 300,
+ /obj/item/modular_computer/tablet = 300,
+ /obj/item/computer_hardware/hard_drive = 100,
+ /obj/item/computer_hardware/hard_drive/small = 50,
+ /obj/item/computer_hardware/network_card = 100,
+ /obj/item/computer_hardware/hard_drive/portable = 100,
+ /obj/item/computer_hardware/battery = 100,
+ /obj/item/stock_parts/cell/computer = 100,
+ /obj/item/computer_hardware/processor_unit = 100,
+ /obj/item/computer_hardware/processor_unit/small = 100)
+ refill_canister = /obj/item/vending_refill/modularpc
+
+/obj/machinery/vending/modularpc/Initialize(mapload)
+ component_parts = list()
+ var/obj/item/circuitboard/vendor/V = new(null)
+ V.set_type(type)
+ component_parts += V
+ component_parts += new /obj/item/vending_refill/modularpc(null)
+ RefreshParts()
+ return ..()
\ No newline at end of file
diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm
index f61e0027e17..a5e3ad4205b 100644
--- a/code/game/objects/items.dm
+++ b/code/game/objects/items.dm
@@ -611,6 +611,10 @@ var/global/image/fire_overlay = image("icon" = 'icons/goonstation/effects/fire.d
deltimer(tip_timer) //delete any in-progress timer if the mouse is moved off the item before it finishes
closeToolTip(usr)
+// Returns a numeric value for sorting items used as parts in machines, so they can be replaced by the rped
+/obj/item/proc/get_part_rating()
+ return 0
+
/obj/item/proc/update_slot_icon()
if(!ismob(loc))
return
diff --git a/code/game/objects/items/weapons/misc.dm b/code/game/objects/items/weapons/misc.dm
index a38f6e11873..a718d3bd389 100644
--- a/code/game/objects/items/weapons/misc.dm
+++ b/code/game/objects/items/weapons/misc.dm
@@ -90,7 +90,6 @@
desc = "test lightning"
/obj/item/lightning/New()
- icon = midicon
icon_state = "1"
/obj/item/lightning/afterattack(atom/A as mob|obj|turf|area, mob/living/user as mob|obj, flag, params)
diff --git a/code/game/objects/items/weapons/vending_items.dm b/code/game/objects/items/weapons/vending_items.dm
index 8ad42ab74a5..c3773ccf5ed 100644
--- a/code/game/objects/items/weapons/vending_items.dm
+++ b/code/game/objects/items/weapons/vending_items.dm
@@ -5,84 +5,149 @@
icon = 'icons/obj/vending_restock.dmi'
icon_state = "refill_snack"
item_state = "restock_unit"
+ desc = "A vending machine restock cart."
+ usesound = 'sound/items/deconstruct.ogg'
flags = CONDUCT
- force = 7.0
- throwforce = 10.0
+ force = 7
+ throwforce = 10
throw_speed = 1
throw_range = 7
w_class = WEIGHT_CLASS_BULKY
- var/charges = 0 //how many restocking "charges" the refill has
+ // Built automatically from the corresponding vending machine.
+ // If null, considered to be full. Otherwise, is list(/typepath = amount).
+ var/list/products
+ var/list/contraband
+ var/list/premium
-/obj/item/vending_refill/New(amt = -1)
- ..()
+/obj/item/vending_refill/Initialize(mapload)
+ . = ..()
name = "\improper [machine_name] restocking unit"
- if(isnum(amt) && amt > -1)
- charges = amt
/obj/item/vending_refill/examine(mob/user)
- ..(user)
- if(charges)
- to_chat(user, "It can restock [charges] item(s).")
- else
+ . = ..()
+ var/num = get_part_rating()
+ if (num == INFINITY)
+ to_chat(user, "It's sealed tight, completely full of supplies.")
+ else if (num == 0)
to_chat(user, "It's empty!")
+ else
+ to_chat(user, "It can restock [num] item\s.")
+
+/obj/item/vending_refill/get_part_rating()
+ if (!products || !contraband || !premium)
+ return INFINITY
+ . = 0
+ for(var/key in products)
+ . += products[key]
+ for(var/key in contraband)
+ . += contraband[key]
+ for(var/key in premium)
+ . += premium[key]
//NOTE I decided to go for about 1/3 of a machine's capacity
/obj/item/vending_refill/boozeomat
machine_name = "Booze-O-Mat"
icon_state = "refill_booze"
- charges = 46//of 138
/obj/item/vending_refill/coffee
machine_name = "hot drinks"
icon_state = "refill_joe"
- charges = 35//of 105
/obj/item/vending_refill/snack
machine_name = "Getmore Chocolate Corp"
- charges = 16//of 48
/obj/item/vending_refill/cola
machine_name = "Robust Softdrinks"
icon_state = "refill_cola"
- charges = 21//of 65
/obj/item/vending_refill/cigarette
machine_name = "cigarette"
icon_state = "refill_smoke"
- charges = 9// of 30
/obj/item/vending_refill/autodrobe
machine_name = "AutoDrobe"
icon_state = "refill_costume"
- charges = 19// of 58
/obj/item/vending_refill/hatdispenser
machine_name = "hat"
icon_state = "refill_costume"
- charges = 18// of 56
/obj/item/vending_refill/suitdispenser
machine_name = "suit"
icon_state = "refill_costume"
- charges = 68// of 206
/obj/item/vending_refill/shoedispenser
machine_name = "shoe"
icon_state = "refill_costume"
- charges = 30// of 91
/obj/item/vending_refill/clothing
machine_name = "ClothesMate"
icon_state = "refill_clothes"
- charges = 20// of 62
/obj/item/vending_refill/crittercare
machine_name = "CritterCare"
icon_state = "refill_pet"
- charges = 31// of 94
/obj/item/vending_refill/chinese
machine_name = "MrChangs"
- charges = 8// of 24
+
+/obj/item/vending_refill/hydroseeds
+ machine_name = "MegaSeed Servitor"
+ icon_state = "refill_plant"
+
+/obj/item/vending_refill/assist
+ machine_name = "Vendomat"
+ icon_state = "refill_engi"
+
+/obj/item/vending_refill/cart
+ machine_name = "PTech"
+ icon_state = "refill_smoke"
+
+/obj/item/vending_refill/dinnerware
+ machine_name = "Plasteel Chef's Dinnerware Vendor"
+ icon_state = "refill_smoke"
+
+/obj/item/vending_refill/engineering
+ machine_name = "Robco Tool Maker"
+ icon_state = "refill_engi"
+
+/obj/item/vending_refill/engivend
+ machine_name = "Engi-Vend"
+ icon_state = "refill_engi"
+
+/obj/item/vending_refill/medical
+ machine_name = "NanoMed Plus"
+ icon_state = "refill_medical"
+
+/obj/item/vending_refill/wallmed
+ machine_name = "NanoMed"
+ icon_state = "refill_medical"
+
+/obj/item/vending_refill/modularpc
+ machine_name = "Deluxe Silicate Selections"
+ icon_state = "refill_engi"
+
+/obj/item/vending_refill/hydronutrients
+ machine_name = "NutriMax"
+ icon_state = "refill_plant"
+
+/obj/item/vending_refill/security
+ icon_state = "refill_sec"
+
+/obj/item/vending_refill/sovietsoda
+ machine_name = "BODA"
+ icon_state = "refill_cola"
+
+/obj/item/vending_refill/sustenance
+ machine_name = "Sustenance Vendor"
+ icon_state = "refill_snack"
+
+/obj/item/vending_refill/donksoft
+ machine_name = "Donksoft Toy Vendor"
+ icon_state = "refill_donksoft"
+
+/obj/item/vending_refill/robotics
+ machine_name = "Robotech Deluxe"
+ icon_state = "refill_engi"
\ No newline at end of file
diff --git a/code/modules/mining/equipment/survival_pod.dm b/code/modules/mining/equipment/survival_pod.dm
index 575ea17d7c0..11669e000fd 100644
--- a/code/modules/mining/equipment/survival_pod.dm
+++ b/code/modules/mining/equipment/survival_pod.dm
@@ -160,7 +160,7 @@
RefreshParts()
//NanoMed
-/obj/machinery/vending/wallmed1/survival_pod
+/obj/machinery/vending/wallmed/survival_pod
name = "survival pod medical supply"
desc = "Wall-mounted Medical Equipment dispenser. This one seems just a tiny bit smaller."
req_access = list()
diff --git a/icons/obj/vending.dmi b/icons/obj/vending.dmi
index 5be90269399..b39384b9b5b 100755
Binary files a/icons/obj/vending.dmi and b/icons/obj/vending.dmi differ
diff --git a/icons/obj/vending_restock.dmi b/icons/obj/vending_restock.dmi
index 7b1a2387c2c..f9a0c83c4bf 100644
Binary files a/icons/obj/vending_restock.dmi and b/icons/obj/vending_restock.dmi differ