Merge pull request #12236 from Fox-McCloud/vending-machien-refactor-fix

Refactors Vending Machines and Fixes Restocking Exploit
This commit is contained in:
variableundefined
2019-09-09 15:54:08 -04:00
committed by GitHub
27 changed files with 707 additions and 422 deletions
+7 -7
View File
@@ -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;
@@ -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
@@ -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,
@@ -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{
+15 -15
View File
@@ -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;
+4 -4
View File
@@ -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;
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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,
+1 -1
View File
@@ -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,
+1 -32
View File
@@ -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
+108 -53
View File
@@ -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"
+6 -6
View File
@@ -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
+43 -33
View File
@@ -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, "<span class='notice'>You set the board to [new_name].</span>")
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)"
File diff suppressed because it is too large Load Diff
+4
View File
@@ -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
-1
View File
@@ -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)
@@ -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"
@@ -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()
Binary file not shown.

Before

Width:  |  Height:  |  Size: 97 KiB

After

Width:  |  Height:  |  Size: 100 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

After

Width:  |  Height:  |  Size: 2.2 KiB