mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-23 03:57:13 +01:00
Makes SMES'es and Vending Machines constructable and upgradeable, gives borgs recorders
This commit is contained in:
@@ -1051,6 +1051,10 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
||||
/datum/supply_packs/vending
|
||||
name = "Bartending Supply Crate"
|
||||
contains = list(/obj/item/weapon/vending_refill/boozeomat,
|
||||
/obj/item/weapon/vending_refill/boozeomat,
|
||||
/obj/item/weapon/vending_refill/boozeomat,
|
||||
/obj/item/weapon/vending_refill/coffee,
|
||||
/obj/item/weapon/vending_refill/coffee,
|
||||
/obj/item/weapon/vending_refill/coffee)
|
||||
cost = 15
|
||||
containertype = /obj/structure/closet/crate
|
||||
@@ -1070,6 +1074,7 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
||||
/datum/supply_packs/vending/cola
|
||||
name = "Softdrinks Supply Crate"
|
||||
contains = list(/obj/item/weapon/vending_refill/cola,
|
||||
/obj/item/weapon/vending_refill/cola,
|
||||
/obj/item/weapon/vending_refill/cola)
|
||||
cost = 15
|
||||
containertype = /obj/structure/closet/crate
|
||||
@@ -1078,7 +1083,9 @@ var/list/all_supply_groups = list("Operations","Security","Hospitality","Enginee
|
||||
|
||||
/datum/supply_packs/vending/cigarette
|
||||
name = "Cigarette Supply Crate"
|
||||
contains = list(/obj/item/weapon/vending_refill/cigarette)
|
||||
contains = list(/obj/item/weapon/vending_refill/cigarette,
|
||||
/obj/item/weapon/vending_refill/cigarette,
|
||||
/obj/item/weapon/vending_refill/cigarette)
|
||||
cost = 15
|
||||
containertype = /obj/structure/closet/crate
|
||||
containername = "cigarette supply crate"
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
req_component_names = new()
|
||||
for(var/tname in req_components)
|
||||
var/path = text2path(tname)
|
||||
var/path = tname
|
||||
var/obj/O = new path()
|
||||
req_component_names[tname] = O.name
|
||||
|
||||
@@ -136,7 +136,7 @@
|
||||
if(istype(P, /obj/item))
|
||||
var/success
|
||||
for(var/I in req_components)
|
||||
if(istype(P, text2path(I)) && (req_components[I] > 0))
|
||||
if(istype(P, I) && (req_components[I] > 0))
|
||||
success=1
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
if(istype(P, /obj/item/stack/cable_coil))
|
||||
@@ -166,17 +166,57 @@ micro-manipulator, console screen, beaker, Microlaser, matter bin, power cells.
|
||||
Note: Once everything is added to the public areas, will add m_amt and g_amt to circuit boards since autolathe won't be able
|
||||
to destroy them and players will be able to make replacements.
|
||||
*/
|
||||
/obj/item/weapon/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/weapon/vending_refill/boozeomat = 3)
|
||||
|
||||
var/list/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/cola = "Robust Softdrinks",
|
||||
/obj/machinery/vending/cigarette = "ShadyCigs Deluxe",
|
||||
/obj/machinery/vending/autodrobe = "AutoDrobe")
|
||||
|
||||
/obj/item/weapon/circuitboard/vendor/attackby(obj/item/I, mob/user)
|
||||
if(istype(I, /obj/item/weapon/screwdriver))
|
||||
set_type(pick(names_paths), user)
|
||||
|
||||
|
||||
/obj/item/weapon/circuitboard/vendor/proc/set_type(typepath, mob/user)
|
||||
build_path = typepath
|
||||
name = "circuit board ([names_paths[build_path]] Vendor)"
|
||||
user << "<span class='notice'>You set the board to [names_paths[build_path]].</span>"
|
||||
req_components = list(text2path("/obj/item/weapon/vending_refill/[copytext("[build_path]", 24)]") = 3)
|
||||
|
||||
/obj/item/weapon/circuitboard/smes
|
||||
name = "circuit board (SMES)"
|
||||
build_path = /obj/machinery/power/smes
|
||||
board_type = "machine"
|
||||
origin_tech = "programming=4;powerstorage=5;engineering=5"
|
||||
frame_desc = "Requires 5 pieces of cable, 5 Power Cells and 1 Capacitor."
|
||||
req_components = list(
|
||||
/obj/item/stack/cable_coil = 5,
|
||||
/obj/item/weapon/cell = 5,
|
||||
/obj/item/weapon/stock_parts/capacitor = 1)
|
||||
|
||||
|
||||
/obj/item/weapon/circuitboard/thermomachine
|
||||
name = "circuit board (Freezer)"
|
||||
desc = "Use screwdriver to switch between heating and cooling modes."
|
||||
build_path = /obj/machinery/atmospherics/unary/cold_sink/freezer
|
||||
board_type = "machine"
|
||||
origin_tech = "programming=3;plasmatech=3"
|
||||
frame_desc = "Requires 2 Matter Bins, 2 Micro Lasers, 1 piece of cable and 1 Console Screen."
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/matter_bin" = 2,
|
||||
"/obj/item/weapon/stock_parts/micro_laser" = 2,
|
||||
"/obj/item/stack/cable_coil" = 1,
|
||||
"/obj/item/weapon/stock_parts/console_screen" = 1)
|
||||
/obj/item/weapon/stock_parts/matter_bin = 2,
|
||||
/obj/item/weapon/stock_parts/micro_laser = 2,
|
||||
/obj/item/stack/cable_coil = 1,
|
||||
/obj/item/weapon/stock_parts/console_screen = 1)
|
||||
|
||||
/obj/item/weapon/circuitboard/thermomachine/attackby(obj/item/I, mob/user)
|
||||
if(istype(I, /obj/item/weapon/screwdriver))
|
||||
@@ -196,10 +236,10 @@ to destroy them and players will be able to make replacements.
|
||||
origin_tech = "programming=3;biotech=2;materials=3"
|
||||
frame_desc = "Requires 1 Matter Bin, 1 Manipulator, 1 piece of cable and 1 Console Screen."
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/matter_bin" = 1,
|
||||
"/obj/item/weapon/stock_parts/manipulator" = 1,
|
||||
"/obj/item/stack/cable_coil" = 1,
|
||||
"/obj/item/weapon/stock_parts/console_screen" = 1)
|
||||
/obj/item/weapon/stock_parts/matter_bin = 1,
|
||||
/obj/item/weapon/stock_parts/manipulator = 1,
|
||||
/obj/item/stack/cable_coil = 1,
|
||||
/obj/item/weapon/stock_parts/console_screen = 1)
|
||||
|
||||
/obj/item/weapon/circuitboard/hydroponics
|
||||
name = "circuit board (Hydroponics Tray)"
|
||||
@@ -208,8 +248,8 @@ to destroy them and players will be able to make replacements.
|
||||
origin_tech = "programming=1;biotech=1"
|
||||
frame_desc = "Requires 2 Matter Bins and 1 Console Screen."
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/matter_bin" = 2,
|
||||
"/obj/item/weapon/stock_parts/console_screen" = 1)
|
||||
/obj/item/weapon/stock_parts/matter_bin = 2,
|
||||
/obj/item/weapon/stock_parts/console_screen = 1)
|
||||
|
||||
/obj/item/weapon/circuitboard/microwave
|
||||
name = "circuit board (Microwave)"
|
||||
@@ -218,9 +258,9 @@ to destroy them and players will be able to make replacements.
|
||||
origin_tech = "programming=1"
|
||||
frame_desc = "Requires 1 Micro Laser, 1 piece of cable and 1 Console Screen."
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/micro_laser" = 1,
|
||||
"/obj/item/stack/cable_coil" = 2,
|
||||
"/obj/item/weapon/stock_parts/console_screen" = 1)
|
||||
/obj/item/weapon/stock_parts/micro_laser = 1,
|
||||
/obj/item/stack/cable_coil = 2,
|
||||
/obj/item/weapon/stock_parts/console_screen = 1)
|
||||
|
||||
/obj/item/weapon/circuitboard/chem_dispenser
|
||||
name = "circuit board (Portable Chem Dispenser)"
|
||||
@@ -229,11 +269,11 @@ to destroy them and players will be able to make replacements.
|
||||
origin_tech = "materials=4;engineering=4;programming=4;plasmatech=3;biotech=3"
|
||||
frame_desc = "Requires 1 Matter Bin, 1 Capacitor, 1 Manipulator, 1 Console Screen, and 1 Power Cell."
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/matter_bin" = 2,
|
||||
"/obj/item/weapon/stock_parts/capacitor" = 1,
|
||||
"/obj/item/weapon/stock_parts/manipulator" = 1,
|
||||
"/obj/item/weapon/stock_parts/console_screen" = 1,
|
||||
"/obj/item/weapon/cell" = 1)
|
||||
/obj/item/weapon/stock_parts/matter_bin = 2,
|
||||
/obj/item/weapon/stock_parts/capacitor = 1,
|
||||
/obj/item/weapon/stock_parts/manipulator = 1,
|
||||
/obj/item/weapon/stock_parts/console_screen = 1,
|
||||
/obj/item/weapon/cell = 1)
|
||||
|
||||
/obj/item/weapon/circuitboard/destructive_analyzer
|
||||
name = "Circuit board (Destructive Analyzer)"
|
||||
@@ -242,9 +282,9 @@ to destroy them and players will be able to make replacements.
|
||||
origin_tech = "magnets=2;engineering=2;programming=2"
|
||||
frame_desc = "Requires 1 Scanning Module, 1 Manipulator, and 1 Micro-Laser."
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/scanning_module" = 1,
|
||||
"/obj/item/weapon/stock_parts/manipulator" = 1,
|
||||
"/obj/item/weapon/stock_parts/micro_laser" = 1)
|
||||
/obj/item/weapon/stock_parts/scanning_module = 1,
|
||||
/obj/item/weapon/stock_parts/manipulator = 1,
|
||||
/obj/item/weapon/stock_parts/micro_laser = 1)
|
||||
|
||||
/obj/item/weapon/circuitboard/autolathe
|
||||
name = "Circuit board (Autolathe)"
|
||||
@@ -253,9 +293,9 @@ to destroy them and players will be able to make replacements.
|
||||
origin_tech = "engineering=2;programming=2"
|
||||
frame_desc = "Requires 3 Matter Bins, 1 Manipulator, and 1 Console Screen."
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/matter_bin" = 3,
|
||||
"/obj/item/weapon/stock_parts/manipulator" = 1,
|
||||
"/obj/item/weapon/stock_parts/console_screen" = 1)
|
||||
/obj/item/weapon/stock_parts/matter_bin = 3,
|
||||
/obj/item/weapon/stock_parts/manipulator = 1,
|
||||
/obj/item/weapon/stock_parts/console_screen = 1)
|
||||
|
||||
/obj/item/weapon/circuitboard/protolathe
|
||||
name = "Circuit board (Protolathe)"
|
||||
@@ -264,9 +304,9 @@ to destroy them and players will be able to make replacements.
|
||||
origin_tech = "engineering=2;programming=2"
|
||||
frame_desc = "Requires 2 Matter Bins, 2 Manipulators, and 2 Beakers."
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/matter_bin" = 2,
|
||||
"/obj/item/weapon/stock_parts/manipulator" = 2,
|
||||
"/obj/item/weapon/reagent_containers/glass/beaker" = 2)
|
||||
/obj/item/weapon/stock_parts/matter_bin = 2,
|
||||
/obj/item/weapon/stock_parts/manipulator = 2,
|
||||
/obj/item/weapon/reagent_containers/glass/beaker = 2)
|
||||
|
||||
|
||||
/obj/item/weapon/circuitboard/circuit_imprinter
|
||||
@@ -276,9 +316,9 @@ to destroy them and players will be able to make replacements.
|
||||
origin_tech = "engineering=2;programming=2"
|
||||
frame_desc = "Requires 1 Matter Bin, 1 Manipulator, and 2 Beakers."
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/matter_bin" = 1,
|
||||
"/obj/item/weapon/stock_parts/manipulator" = 1,
|
||||
"/obj/item/weapon/reagent_containers/glass/beaker" = 2)
|
||||
/obj/item/weapon/stock_parts/matter_bin = 1,
|
||||
/obj/item/weapon/stock_parts/manipulator = 1,
|
||||
/obj/item/weapon/reagent_containers/glass/beaker = 2)
|
||||
|
||||
/obj/item/weapon/circuitboard/pacman
|
||||
name = "Circuit Board (PACMAN-type Generator)"
|
||||
@@ -287,10 +327,10 @@ to destroy them and players will be able to make replacements.
|
||||
origin_tech = "programming=3:powerstorage=3;plasmatech=3;engineering=3"
|
||||
frame_desc = "Requires 1 Matter Bin, 1 Micro-Laser, 2 Pieces of Cable, and 1 Capacitor."
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/matter_bin" = 1,
|
||||
"/obj/item/weapon/stock_parts/micro_laser" = 1,
|
||||
"/obj/item/stack/cable_coil" = 2,
|
||||
"/obj/item/weapon/stock_parts/capacitor" = 1)
|
||||
/obj/item/weapon/stock_parts/matter_bin = 1,
|
||||
/obj/item/weapon/stock_parts/micro_laser = 1,
|
||||
/obj/item/stack/cable_coil = 2,
|
||||
/obj/item/weapon/stock_parts/capacitor = 1)
|
||||
|
||||
/obj/item/weapon/circuitboard/pacman/super
|
||||
name = "Circuit Board (SUPERPACMAN-type Generator)"
|
||||
@@ -309,8 +349,8 @@ obj/item/weapon/circuitboard/rdserver
|
||||
origin_tech = "programming=3"
|
||||
frame_desc = "Requires 2 pieces of cable, and 1 Scanning Module."
|
||||
req_components = list(
|
||||
"/obj/item/stack/cable_coil" = 2,
|
||||
"/obj/item/weapon/stock_parts/scanning_module" = 1)
|
||||
/obj/item/stack/cable_coil = 2,
|
||||
/obj/item/weapon/stock_parts/scanning_module = 1)
|
||||
|
||||
/obj/item/weapon/circuitboard/mechfab
|
||||
name = "Circuit board (Exosuit Fabricator)"
|
||||
@@ -319,10 +359,10 @@ obj/item/weapon/circuitboard/rdserver
|
||||
origin_tech = "programming=3;engineering=3"
|
||||
frame_desc = "Requires 2 Matter Bins, 1 Manipulator, 1 Micro-Laser and 1 Console Screen."
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/matter_bin" = 2,
|
||||
"/obj/item/weapon/stock_parts/manipulator" = 1,
|
||||
"/obj/item/weapon/stock_parts/micro_laser" = 1,
|
||||
"/obj/item/weapon/stock_parts/console_screen" = 1)
|
||||
/obj/item/weapon/stock_parts/matter_bin = 2,
|
||||
/obj/item/weapon/stock_parts/manipulator = 1,
|
||||
/obj/item/weapon/stock_parts/micro_laser = 1,
|
||||
/obj/item/weapon/stock_parts/console_screen = 1)
|
||||
|
||||
/obj/item/weapon/circuitboard/clonepod
|
||||
name = "Circuit board (Clone Pod)"
|
||||
@@ -331,10 +371,10 @@ obj/item/weapon/circuitboard/rdserver
|
||||
origin_tech = "programming=3;biotech=3"
|
||||
frame_desc = "Requires 2 Manipulator, 2 Scanning Module, 2 pieces of cable and 1 Console Screen."
|
||||
req_components = list(
|
||||
"/obj/item/stack/cable_coil" = 2,
|
||||
"/obj/item/weapon/stock_parts/scanning_module" = 2,
|
||||
"/obj/item/weapon/stock_parts/manipulator" = 2,
|
||||
"/obj/item/weapon/stock_parts/console_screen" = 1)
|
||||
/obj/item/stack/cable_coil = 2,
|
||||
/obj/item/weapon/stock_parts/scanning_module = 2,
|
||||
/obj/item/weapon/stock_parts/manipulator = 2,
|
||||
/obj/item/weapon/stock_parts/console_screen = 1)
|
||||
|
||||
/obj/item/weapon/circuitboard/clonescanner
|
||||
name = "Circuit board (Cloning Scanner)"
|
||||
@@ -343,11 +383,11 @@ obj/item/weapon/circuitboard/rdserver
|
||||
origin_tech = "programming=2;biotech=2"
|
||||
frame_desc = "Requires 1 Scanning Module, 1 Manipulator, 1 Micro-Laser, 2 pieces of cable and 1 Console Screen."
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/scanning_module" = 1,
|
||||
"/obj/item/weapon/stock_parts/manipulator" = 1,
|
||||
"/obj/item/weapon/stock_parts/micro_laser" = 1,
|
||||
"/obj/item/weapon/stock_parts/console_screen" = 1,
|
||||
"/obj/item/stack/cable_coil" = 2,)
|
||||
/obj/item/weapon/stock_parts/scanning_module = 1,
|
||||
/obj/item/weapon/stock_parts/manipulator = 1,
|
||||
/obj/item/weapon/stock_parts/micro_laser = 1,
|
||||
/obj/item/weapon/stock_parts/console_screen = 1,
|
||||
/obj/item/stack/cable_coil = 2,)
|
||||
|
||||
/obj/item/weapon/circuitboard/mech_recharger
|
||||
name = "circuit board (Mech Bay Recharger)"
|
||||
@@ -356,8 +396,8 @@ obj/item/weapon/circuitboard/rdserver
|
||||
origin_tech = "programming=3;powerstorage=4;engineering=4"
|
||||
frame_desc = "Requires 1 piece of cable and 5 Capacitors."
|
||||
req_components = list(
|
||||
"/obj/item/stack/cable_coil" = 1,
|
||||
"/obj/item/weapon/stock_parts/capacitor" = 5)
|
||||
/obj/item/stack/cable_coil = 1,
|
||||
/obj/item/weapon/stock_parts/capacitor = 5)
|
||||
|
||||
/obj/item/weapon/circuitboard/teleporter_hub
|
||||
name = "circuit board (Teleporter Hub)"
|
||||
@@ -366,8 +406,8 @@ obj/item/weapon/circuitboard/rdserver
|
||||
origin_tech = "programming=3;engineering=5;bluespace=5;materials=4"
|
||||
frame_desc = "Requires 3 Bluespace Crystals and 1 Matter Bin."
|
||||
req_components = list(
|
||||
"/obj/item/bluespace_crystal" = 3,
|
||||
"/obj/item/weapon/stock_parts/matter_bin" = 1)
|
||||
/obj/item/bluespace_crystal = 3,
|
||||
/obj/item/weapon/stock_parts/matter_bin = 1)
|
||||
|
||||
/obj/item/weapon/circuitboard/teleporter_station
|
||||
name = "circuit board (Teleporter Station)"
|
||||
@@ -376,9 +416,9 @@ obj/item/weapon/circuitboard/rdserver
|
||||
origin_tech = "programming=4;engineering=4;bluespace=4"
|
||||
frame_desc = "Requires 2 Bluespace Crystals, 2 Capacitors and 1 Console Screen."
|
||||
req_components = list(
|
||||
"/obj/item/bluespace_crystal" = 2,
|
||||
"/obj/item/weapon/stock_parts/capacitor" = 2,
|
||||
"/obj/item/weapon/stock_parts/console_screen" = 1)
|
||||
/obj/item/bluespace_crystal = 2,
|
||||
/obj/item/weapon/stock_parts/capacitor = 2,
|
||||
/obj/item/weapon/stock_parts/console_screen = 1)
|
||||
|
||||
/obj/item/weapon/circuitboard/telesci_pad
|
||||
name = "Circuit board (Telepad)"
|
||||
@@ -387,10 +427,10 @@ obj/item/weapon/circuitboard/rdserver
|
||||
origin_tech = "programming=4;engineering=3;materials=3;bluespace=4"
|
||||
frame_desc = "Requires 2 Bluespace Crystals, 1 Capacitor, 1 piece of cable and 1 Console Screen."
|
||||
req_components = list(
|
||||
"/obj/item/bluespace_crystal" = 2,
|
||||
"/obj/item/weapon/stock_parts/capacitor" = 1,
|
||||
"/obj/item/stack/cable_coil" = 1,
|
||||
"/obj/item/weapon/stock_parts/console_screen" = 1)
|
||||
/obj/item/bluespace_crystal = 2,
|
||||
/obj/item/weapon/stock_parts/capacitor = 1,
|
||||
/obj/item/stack/cable_coil = 1,
|
||||
/obj/item/weapon/stock_parts/console_screen = 1)
|
||||
|
||||
|
||||
/obj/item/weapon/circuitboard/sleeper
|
||||
@@ -400,10 +440,10 @@ obj/item/weapon/circuitboard/rdserver
|
||||
origin_tech = "programming=3;biotech=2;engineering=3;materials=3"
|
||||
frame_desc = "Requires 1 Matter Bin, 1 Manipulator, 1 piece of cable and 2 Console Screens."
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/matter_bin" = 1,
|
||||
"/obj/item/weapon/stock_parts/manipulator" = 1,
|
||||
"/obj/item/stack/cable_coil" = 1,
|
||||
"/obj/item/weapon/stock_parts/console_screen" = 2)
|
||||
/obj/item/weapon/stock_parts/matter_bin = 1,
|
||||
/obj/item/weapon/stock_parts/manipulator = 1,
|
||||
/obj/item/stack/cable_coil = 1,
|
||||
/obj/item/weapon/stock_parts/console_screen = 2)
|
||||
|
||||
/obj/item/weapon/circuitboard/sleep_console
|
||||
name = "circuit board (Sleeper Console)"
|
||||
@@ -412,8 +452,8 @@ obj/item/weapon/circuitboard/rdserver
|
||||
origin_tech = "programming=3;biotech=2;engineering=3;materials=3"
|
||||
frame_desc = "Requires 2 pieces of cable and 2 Console Screens."
|
||||
req_components = list(
|
||||
"/obj/item/stack/cable_coil" = 2,
|
||||
"/obj/item/weapon/stock_parts/console_screen" = 2)
|
||||
/obj/item/stack/cable_coil = 2,
|
||||
/obj/item/weapon/stock_parts/console_screen = 2)
|
||||
|
||||
/obj/item/weapon/circuitboard/bodyscanner
|
||||
name = "circuit board (Body Scanner)"
|
||||
@@ -422,9 +462,9 @@ obj/item/weapon/circuitboard/rdserver
|
||||
origin_tech = "programming=3;biotech=2;engineering=3;materials=3"
|
||||
frame_desc = "Requires 1 Scanning Module, 2 pieces of cable and 2 Console Screens."
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/scanning_module" = 1,
|
||||
"/obj/item/stack/cable_coil" = 2,
|
||||
"/obj/item/weapon/stock_parts/console_screen" = 2)
|
||||
/obj/item/weapon/stock_parts/scanning_module = 1,
|
||||
/obj/item/stack/cable_coil = 2,
|
||||
/obj/item/weapon/stock_parts/console_screen = 2)
|
||||
|
||||
/obj/item/weapon/circuitboard/bodyscanner_console
|
||||
name = "circuit board (Body Scanner Console)"
|
||||
@@ -433,8 +473,8 @@ obj/item/weapon/circuitboard/rdserver
|
||||
origin_tech = "programming=3;biotech=2;engineering=3;materials=3"
|
||||
frame_desc = "Requires 2 pieces of cable and 2 Console Screens."
|
||||
req_components = list(
|
||||
"/obj/item/stack/cable_coil" = 2,
|
||||
"/obj/item/weapon/stock_parts/console_screen" = 2)
|
||||
/obj/item/stack/cable_coil = 2,
|
||||
/obj/item/weapon/stock_parts/console_screen = 2)
|
||||
|
||||
/obj/item/weapon/circuitboard/cryo_tube
|
||||
name = "circuit board (Cryotube)"
|
||||
@@ -443,9 +483,9 @@ obj/item/weapon/circuitboard/rdserver
|
||||
origin_tech = "programming=4;biotech=3;engineering=4"
|
||||
frame_desc = "Requires 1 Matter Bin, 1 piece of cable and 4 Console Screens."
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/matter_bin" = 1,
|
||||
"/obj/item/stack/cable_coil" = 1,
|
||||
"/obj/item/weapon/stock_parts/console_screen" = 4)
|
||||
/obj/item/weapon/stock_parts/matter_bin = 1,
|
||||
/obj/item/stack/cable_coil = 1,
|
||||
/obj/item/weapon/stock_parts/console_screen = 4)
|
||||
|
||||
/obj/item/weapon/circuitboard/cyborgrecharger
|
||||
name = "circuit board (Cyborg Recharger)"
|
||||
@@ -454,9 +494,9 @@ obj/item/weapon/circuitboard/rdserver
|
||||
origin_tech = "powerstorage=3;engineering=3"
|
||||
frame_desc = "Requires 2 Capacitors, 1 Power Cell and 1 Manipulator."
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/capacitor" = 2,
|
||||
"/obj/item/weapon/cell" = 1,
|
||||
"/obj/item/weapon/stock_parts/manipulator" = 1)
|
||||
/obj/item/weapon/stock_parts/capacitor = 2,
|
||||
/obj/item/weapon/cell = 1,
|
||||
/obj/item/weapon/stock_parts/manipulator = 1)
|
||||
|
||||
// Telecomms circuit boards:
|
||||
/obj/item/weapon/circuitboard/telecomms/receiver
|
||||
@@ -466,10 +506,10 @@ obj/item/weapon/circuitboard/rdserver
|
||||
origin_tech = "programming=4;engineering=3;bluespace=2"
|
||||
frame_desc = "Requires 1 Subspace Ansible, 1 Hyperwave Filter, 2 Manipulators, and 1 Micro-Laser."
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/subspace/ansible" = 1,
|
||||
"/obj/item/weapon/stock_parts/subspace/filter" = 1,
|
||||
"/obj/item/weapon/stock_parts/manipulator" = 2,
|
||||
"/obj/item/weapon/stock_parts/micro_laser" = 1)
|
||||
/obj/item/weapon/stock_parts/subspace/ansible = 1,
|
||||
/obj/item/weapon/stock_parts/subspace/filter = 1,
|
||||
/obj/item/weapon/stock_parts/manipulator = 2,
|
||||
/obj/item/weapon/stock_parts/micro_laser = 1)
|
||||
|
||||
/obj/item/weapon/circuitboard/telecomms/hub
|
||||
name = "Circuit Board (Hub Mainframe)"
|
||||
@@ -478,9 +518,9 @@ obj/item/weapon/circuitboard/rdserver
|
||||
origin_tech = "programming=4;engineering=4"
|
||||
frame_desc = "Requires 2 Manipulators, 2 Cable Coil and 2 Hyperwave Filter."
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/manipulator" = 2,
|
||||
"/obj/item/stack/cable_coil" = 2,
|
||||
"/obj/item/weapon/stock_parts/subspace/filter" = 2)
|
||||
/obj/item/weapon/stock_parts/manipulator = 2,
|
||||
/obj/item/stack/cable_coil = 2,
|
||||
/obj/item/weapon/stock_parts/subspace/filter = 2)
|
||||
|
||||
/obj/item/weapon/circuitboard/telecomms/relay
|
||||
name = "Circuit Board (Relay Mainframe)"
|
||||
@@ -489,9 +529,9 @@ obj/item/weapon/circuitboard/rdserver
|
||||
origin_tech = "programming=3;engineering=4;bluespace=3"
|
||||
frame_desc = "Requires 2 Manipulators, 2 Cable Coil and 2 Hyperwave Filters."
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/manipulator" = 2,
|
||||
"/obj/item/stack/cable_coil" = 2,
|
||||
"/obj/item/weapon/stock_parts/subspace/filter" = 2)
|
||||
/obj/item/weapon/stock_parts/manipulator = 2,
|
||||
/obj/item/stack/cable_coil = 2,
|
||||
/obj/item/weapon/stock_parts/subspace/filter = 2)
|
||||
|
||||
/obj/item/weapon/circuitboard/telecomms/bus
|
||||
name = "Circuit Board (Bus Mainframe)"
|
||||
@@ -500,9 +540,9 @@ obj/item/weapon/circuitboard/rdserver
|
||||
origin_tech = "programming=4;engineering=4"
|
||||
frame_desc = "Requires 2 Manipulators, 1 Cable Coil and 1 Hyperwave Filter."
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/manipulator" = 2,
|
||||
"/obj/item/stack/cable_coil" = 1,
|
||||
"/obj/item/weapon/stock_parts/subspace/filter" = 1)
|
||||
/obj/item/weapon/stock_parts/manipulator = 2,
|
||||
/obj/item/stack/cable_coil = 1,
|
||||
/obj/item/weapon/stock_parts/subspace/filter = 1)
|
||||
|
||||
/obj/item/weapon/circuitboard/telecomms/processor
|
||||
name = "Circuit Board (Processor Unit)"
|
||||
@@ -511,12 +551,12 @@ obj/item/weapon/circuitboard/rdserver
|
||||
origin_tech = "programming=4;engineering=4"
|
||||
frame_desc = "Requires 3 Manipulators, 1 Hyperwave Filter, 2 Treatment Disks, 1 Wavelength Analyzer, 2 Cable Coils and 1 Subspace Amplifier."
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/manipulator" = 3,
|
||||
"/obj/item/weapon/stock_parts/subspace/filter" = 1,
|
||||
"/obj/item/weapon/stock_parts/subspace/treatment" = 2,
|
||||
"/obj/item/weapon/stock_parts/subspace/analyzer" = 1,
|
||||
"/obj/item/stack/cable_coil" = 2,
|
||||
"/obj/item/weapon/stock_parts/subspace/amplifier" = 1)
|
||||
/obj/item/weapon/stock_parts/manipulator = 3,
|
||||
/obj/item/weapon/stock_parts/subspace/filter = 1,
|
||||
/obj/item/weapon/stock_parts/subspace/treatment = 2,
|
||||
/obj/item/weapon/stock_parts/subspace/analyzer = 1,
|
||||
/obj/item/stack/cable_coil = 2,
|
||||
/obj/item/weapon/stock_parts/subspace/amplifier = 1)
|
||||
|
||||
/obj/item/weapon/circuitboard/telecomms/server
|
||||
name = "Circuit Board (Telecommunication Server)"
|
||||
@@ -525,9 +565,9 @@ obj/item/weapon/circuitboard/rdserver
|
||||
origin_tech = "programming=4;engineering=4"
|
||||
frame_desc = "Requires 2 Manipulators, 1 Cable Coil and 1 Hyperwave Filter."
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/manipulator" = 2,
|
||||
"/obj/item/stack/cable_coil" = 1,
|
||||
"/obj/item/weapon/stock_parts/subspace/filter" = 1)
|
||||
/obj/item/weapon/stock_parts/manipulator = 2,
|
||||
/obj/item/stack/cable_coil = 1,
|
||||
/obj/item/weapon/stock_parts/subspace/filter = 1)
|
||||
|
||||
/obj/item/weapon/circuitboard/telecomms/broadcaster
|
||||
name = "Circuit Board (Subspace Broadcaster)"
|
||||
@@ -536,8 +576,8 @@ obj/item/weapon/circuitboard/rdserver
|
||||
origin_tech = "programming=4;engineering=4;bluespace=2"
|
||||
frame_desc = "Requires 2 Manipulators, 1 Cable Coil, 1 Hyperwave Filter, 1 Ansible Crystal and 2 High-Powered Micro-Lasers. "
|
||||
req_components = list(
|
||||
"/obj/item/weapon/stock_parts/manipulator" = 2,
|
||||
"/obj/item/stack/cable_coil" = 1,
|
||||
"/obj/item/weapon/stock_parts/subspace/filter" = 1,
|
||||
"/obj/item/weapon/stock_parts/subspace/crystal" = 1,
|
||||
"/obj/item/weapon/stock_parts/micro_laser/high" = 2)
|
||||
/obj/item/weapon/stock_parts/manipulator = 2,
|
||||
/obj/item/stack/cable_coil = 1,
|
||||
/obj/item/weapon/stock_parts/subspace/filter = 1,
|
||||
/obj/item/weapon/stock_parts/subspace/crystal = 1,
|
||||
/obj/item/weapon/stock_parts/micro_laser/high = 2)
|
||||
@@ -336,8 +336,8 @@ Class Procs:
|
||||
var/P
|
||||
for(var/obj/item/weapon/stock_parts/A in component_parts)
|
||||
for(var/D in CB.req_components)
|
||||
if(ispath(A.type, text2path(D)))
|
||||
P = text2path(D)
|
||||
if(ispath(A.type, D))
|
||||
P = D
|
||||
break
|
||||
for(var/obj/item/weapon/stock_parts/B in W.contents)
|
||||
if(istype(B, P) && istype(A, P))
|
||||
@@ -353,8 +353,8 @@ Class Procs:
|
||||
// Power cell snowflake
|
||||
for(var/obj/item/weapon/cell/A in component_parts)
|
||||
for(var/D in CB.req_components)
|
||||
if(ispath(A.type, text2path(D)))
|
||||
P = text2path(D)
|
||||
if(ispath(A.type, D))
|
||||
P = D
|
||||
break
|
||||
for(var/obj/item/weapon/cell/B in W.contents)
|
||||
if(istype(B, P) && istype(A, P))
|
||||
|
||||
+100
-33
@@ -57,7 +57,6 @@
|
||||
var/obj/item/weapon/coin/coin
|
||||
var/datum/wires/vending/wires = null
|
||||
|
||||
|
||||
/obj/machinery/vending/New()
|
||||
..()
|
||||
wires = new(src)
|
||||
@@ -82,7 +81,13 @@
|
||||
return
|
||||
|
||||
|
||||
|
||||
/obj/machinery/vending/Destroy()
|
||||
del(wires)
|
||||
wires = null
|
||||
del(coin)
|
||||
coin = null
|
||||
..()
|
||||
|
||||
/obj/machinery/vending/ex_act(severity)
|
||||
switch(severity)
|
||||
if(1.0)
|
||||
@@ -96,7 +101,14 @@
|
||||
if(prob(25))
|
||||
malfunction()
|
||||
|
||||
|
||||
/obj/machinery/vending/RefreshParts() //Better would be to make constructable child
|
||||
if(component_parts)
|
||||
build_inventory(products, start_empty = 1)
|
||||
build_inventory(contraband, 1, 1)
|
||||
build_inventory(premium, 0, 1, 1)
|
||||
for(var/obj/item/weapon/vending_refill/VR in component_parts)
|
||||
refill_inventory(VR, product_records)
|
||||
|
||||
/obj/machinery/vending/blob_act()
|
||||
if(prob(75))
|
||||
malfunction()
|
||||
@@ -104,7 +116,7 @@
|
||||
del(src)
|
||||
|
||||
|
||||
/obj/machinery/vending/proc/build_inventory(var/list/productlist,hidden=0,req_coin=0)
|
||||
/obj/machinery/vending/proc/build_inventory(var/list/productlist,hidden=0,req_coin=0,start_empty = null)
|
||||
for(var/typepath in productlist)
|
||||
var/amount = productlist[typepath]
|
||||
var/price = prices[typepath]
|
||||
@@ -114,7 +126,8 @@
|
||||
var/datum/data/vending_product/R = new /datum/data/vending_product()
|
||||
|
||||
R.product_path = typepath
|
||||
R.amount = amount
|
||||
if(!start_empty)
|
||||
R.amount = amount
|
||||
R.max_amount = amount
|
||||
R.price = price
|
||||
R.display_color = pick("red","blue","green")
|
||||
@@ -166,13 +179,28 @@
|
||||
break
|
||||
return total
|
||||
|
||||
|
||||
/obj/machinery/vending/attackby(obj/item/weapon/W, mob/user)
|
||||
if(panel_open)
|
||||
if(default_unfasten_wrench(user, W, time = 60))
|
||||
return
|
||||
|
||||
if(component_parts && istype(W, /obj/item/weapon/crowbar))
|
||||
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/weapon/vending_refill/VR in component_parts)
|
||||
VR.charges++
|
||||
machine_content.amount--
|
||||
if(!machine_content.amount)
|
||||
break
|
||||
default_deconstruction_crowbar(W)
|
||||
|
||||
if(istype(W, /obj/item/weapon/card/emag))
|
||||
emagged = 1
|
||||
user << "You short out the product lock on [src]"
|
||||
return
|
||||
else if(istype(W, /obj/item/weapon/screwdriver))
|
||||
else if(istype(W, /obj/item/weapon/screwdriver) && anchored)
|
||||
playsound(src.loc, 'sound/items/Screwdriver.ogg', 50, 1)
|
||||
panel_open = !panel_open
|
||||
user << "You [panel_open ? "open" : "close"] the maintenance panel."
|
||||
overlays.Cut()
|
||||
@@ -184,36 +212,15 @@
|
||||
if(panel_open)
|
||||
attack_hand(user)
|
||||
return
|
||||
else if(istype(W, /obj/item/weapon/card) && currently_vending)
|
||||
var/obj/item/weapon/card/I = W
|
||||
scan_card(I)
|
||||
else if(istype(W, /obj/item/weapon/coin) && premium.len > 0)
|
||||
user.drop_item()
|
||||
W.loc = src
|
||||
coin = W
|
||||
user << "<span class='notice'>You insert [W] into [src].</span>"
|
||||
return
|
||||
|
||||
else if(istype(W, /obj/item/weapon/wrench))
|
||||
|
||||
if(do_after(user, 20))
|
||||
if(!src) return
|
||||
playsound(src.loc, 'sound/items/Ratchet.ogg', 100, 1)
|
||||
switch (anchored)
|
||||
if (0)
|
||||
anchored = 1
|
||||
user.visible_message("[user] tightens the bolts securing \the [src] to the floor.", "You tighten the bolts securing \the [src] to the floor.")
|
||||
if (1)
|
||||
user.visible_message("[user] unfastens the bolts securing \the [src] to the floor.", "You unfasten the bolts securing \the [src] to the floor.")
|
||||
anchored = 0
|
||||
return
|
||||
|
||||
else if(src.panel_open)
|
||||
for(var/datum/data/vending_product/R in product_records)
|
||||
if(istype(W, R.product_path))
|
||||
stock(R, user)
|
||||
del(W)
|
||||
|
||||
else if(istype(W, /obj/item/weapon/card) && currently_vending)
|
||||
var/obj/item/weapon/card/I = W
|
||||
scan_card(I)
|
||||
else if(istype(W, refill_canister) && refill_canister != null)
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
user << "<span class='notice'>It does nothing.</span>"
|
||||
@@ -234,6 +241,8 @@
|
||||
else
|
||||
..()
|
||||
|
||||
|
||||
|
||||
/obj/machinery/vending/proc/scan_card(var/obj/item/weapon/card/I)
|
||||
if(!currently_vending) return
|
||||
if (istype(I, /obj/item/weapon/card/id))
|
||||
@@ -661,6 +670,16 @@
|
||||
contraband = list(/obj/item/device/flashlight = 5,/obj/item/device/assembly/timer = 2)
|
||||
product_ads = "Only the finest!;Have some tools.;The most robust equipment.;The finest gear in space!"
|
||||
|
||||
/obj/machinery/vending/boozeomat/New()
|
||||
..()
|
||||
component_parts = list()
|
||||
var/obj/item/weapon/circuitboard/vendor/V = new(null)
|
||||
V.set_type(type)
|
||||
component_parts += V
|
||||
component_parts += new /obj/item/weapon/vending_refill/boozeomat(0)
|
||||
component_parts += new /obj/item/weapon/vending_refill/boozeomat(0)
|
||||
component_parts += new /obj/item/weapon/vending_refill/boozeomat(0)
|
||||
|
||||
/obj/machinery/vending/coffee
|
||||
name = "Hot Drinks machine"
|
||||
desc = "A vending machine which dispenses hot drinks."
|
||||
@@ -673,7 +692,15 @@
|
||||
prices = list(/obj/item/weapon/reagent_containers/food/drinks/coffee = 25, /obj/item/weapon/reagent_containers/food/drinks/tea = 25, /obj/item/weapon/reagent_containers/food/drinks/h_chocolate = 25)
|
||||
refill_canister = /obj/item/weapon/vending_refill/coffee
|
||||
|
||||
|
||||
/obj/machinery/vending/coffee/New()
|
||||
..()
|
||||
component_parts = list()
|
||||
var/obj/item/weapon/circuitboard/vendor/V = new(null)
|
||||
V.set_type(type)
|
||||
component_parts += V
|
||||
component_parts += new /obj/item/weapon/vending_refill/coffee(0)
|
||||
component_parts += new /obj/item/weapon/vending_refill/coffee(0)
|
||||
component_parts += new /obj/item/weapon/vending_refill/coffee(0)
|
||||
|
||||
/obj/machinery/vending/snack
|
||||
name = "Getmore Chocolate Corp"
|
||||
@@ -699,6 +726,16 @@
|
||||
prices = list(/obj/item/weapon/reagent_containers/food/snacks/chinese/chowmein = 50, /obj/item/weapon/reagent_containers/food/snacks/chinese/tao = 50, /obj/item/weapon/reagent_containers/food/snacks/chinese/newdles = 50,
|
||||
/obj/item/weapon/reagent_containers/food/snacks/chinese/rice = 50, /obj/item/weapon/reagent_containers/food/snacks/wingfangchu = 50)
|
||||
|
||||
/obj/machinery/vending/snack/New()
|
||||
..()
|
||||
component_parts = list()
|
||||
var/obj/item/weapon/circuitboard/vendor/V = new(null)
|
||||
V.set_type(type)
|
||||
component_parts += V
|
||||
component_parts += new /obj/item/weapon/vending_refill/snack(0)
|
||||
component_parts += new /obj/item/weapon/vending_refill/snack(0)
|
||||
component_parts += new /obj/item/weapon/vending_refill/snack(0)
|
||||
|
||||
/obj/machinery/vending/cola
|
||||
name = "Robust Softdrinks"
|
||||
desc = "A softdrink vendor provided by Robust Industries, LLC."
|
||||
@@ -724,7 +761,16 @@
|
||||
/obj/item/weapon/cartridge/janitor = 10,/obj/item/weapon/cartridge/signal/toxins = 10,/obj/item/device/pda/heads = 10,
|
||||
/obj/item/weapon/cartridge/captain = 3,/obj/item/weapon/cartridge/quartermaster = 10)
|
||||
|
||||
|
||||
/obj/machinery/vending/cola/New()
|
||||
..()
|
||||
component_parts = list()
|
||||
var/obj/item/weapon/circuitboard/vendor/V = new(null)
|
||||
V.set_type(type)
|
||||
component_parts += V
|
||||
component_parts += new /obj/item/weapon/vending_refill/cola(0)
|
||||
component_parts += new /obj/item/weapon/vending_refill/cola(0)
|
||||
component_parts += new /obj/item/weapon/vending_refill/cola(0)
|
||||
|
||||
/obj/machinery/vending/cigarette
|
||||
name = "Cigarette machine" //OCD had to be uppercase to look nice with the new formating
|
||||
desc = "If you want to get cancer, might as well do it in style"
|
||||
@@ -738,6 +784,16 @@
|
||||
prices = list(/obj/item/weapon/storage/fancy/cigarettes = 60,/obj/item/weapon/storage/box/matches = 10,/obj/item/weapon/lighter/random = 60, /obj/item/weapon/rollingpaperpack = 20)
|
||||
refill_canister = /obj/item/weapon/vending_refill/cigarette
|
||||
|
||||
/obj/machinery/vending/cigarette/New()
|
||||
..()
|
||||
component_parts = list()
|
||||
var/obj/item/weapon/circuitboard/vendor/V = new(null)
|
||||
V.set_type(type)
|
||||
component_parts += V
|
||||
component_parts += new /obj/item/weapon/vending_refill/cigarette(0)
|
||||
component_parts += new /obj/item/weapon/vending_refill/cigarette(0)
|
||||
component_parts += new /obj/item/weapon/vending_refill/cigarette(0)
|
||||
|
||||
/obj/machinery/vending/medical
|
||||
name = "NanoMed Plus"
|
||||
desc = "Medical drug dispenser."
|
||||
@@ -864,6 +920,17 @@
|
||||
contraband = list(/obj/item/clothing/suit/cardborg = 1,/obj/item/clothing/head/cardborg = 1,/obj/item/clothing/suit/judgerobe = 1,/obj/item/clothing/head/powdered_wig = 1,/obj/item/weapon/gun/magic/wand = 1)
|
||||
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)
|
||||
refill_canister = /obj/item/weapon/vending_refill/autodrobe
|
||||
|
||||
/obj/machinery/vending/cigarette/New()
|
||||
..()
|
||||
component_parts = list()
|
||||
var/obj/item/weapon/circuitboard/vendor/V = new(null)
|
||||
V.set_type(type)
|
||||
component_parts += V
|
||||
component_parts += new /obj/item/weapon/vending_refill/cigarette(0)
|
||||
component_parts += new /obj/item/weapon/vending_refill/cigarette(0)
|
||||
component_parts += new /obj/item/weapon/vending_refill/cigarette(0)
|
||||
|
||||
/obj/machinery/vending/dinnerware
|
||||
name = "Dinnerware"
|
||||
desc = "A kitchen and restaurant equipment vendor"
|
||||
|
||||
@@ -1,58 +1,59 @@
|
||||
/obj/item/weapon/vending_refill
|
||||
name = "Resupply canister"
|
||||
name = "resupply canister"
|
||||
var/machine_name = "Generic"
|
||||
|
||||
icon = 'icons/obj/vending_restock.dmi'
|
||||
icon_state = "refill_snack"
|
||||
item_state = "restock_unit"
|
||||
flags = FPRINT | TABLEPASS| CONDUCT
|
||||
flags = CONDUCT
|
||||
force = 7.0
|
||||
throwforce = 15.0
|
||||
throwforce = 10.0
|
||||
throw_speed = 1
|
||||
throw_range = 7
|
||||
w_class = 4.0
|
||||
|
||||
var/charges = 0 //how many restocking "charges" the refill has
|
||||
|
||||
/obj/item/weapon/vending_refill/New()
|
||||
/obj/item/weapon/vending_refill/New(amt = -1)
|
||||
..()
|
||||
name = "\improper [machine_name] restocking unit"
|
||||
if(isnum(amt) && amt > -1)
|
||||
charges = amt
|
||||
|
||||
/obj/item/weapon/vending_refill/examine()
|
||||
set src in usr
|
||||
/obj/item/weapon/vending_refill/examine(mob/user)
|
||||
..()
|
||||
if(charges)
|
||||
usr << "It can restock [charges] item(s)."
|
||||
user << "It can restock [charges] item(s)."
|
||||
else
|
||||
usr << "It's empty!"
|
||||
user << "It's empty!"
|
||||
|
||||
//NOTE I decided to go for about 1/3 of a machine's capacity
|
||||
|
||||
/obj/item/weapon/vending_refill/boozeomat
|
||||
machine_name = "Booze-O-Mat"
|
||||
icon_state = "refill_booze"
|
||||
charges = 50//of 138
|
||||
charges = 46//of 138
|
||||
|
||||
/obj/item/weapon/vending_refill/coffee
|
||||
machine_name = "hot drinks"
|
||||
icon_state = "refill_joe"
|
||||
charges = 30//of 85
|
||||
charges = 28//of 85
|
||||
|
||||
/obj/item/weapon/vending_refill/snack
|
||||
machine_name = "Getmore Chocolate Corp"
|
||||
charges = 15//of 48
|
||||
charges = 16//of 48
|
||||
|
||||
/obj/item/weapon/vending_refill/cola
|
||||
machine_name = "Robust Softdrinks"
|
||||
icon_state = "refill_cola"
|
||||
charges = 20//of 65
|
||||
charges = 21//of 65
|
||||
|
||||
/obj/item/weapon/vending_refill/cigarette
|
||||
machine_name = "cigarette"
|
||||
icon_state = "refill_smoke"
|
||||
charges = 10// of 30
|
||||
charges = 9// of 30
|
||||
|
||||
/obj/item/weapon/vending_refill/autodrobe
|
||||
machine_name = "AutoDrobe"
|
||||
icon_state = "refill_costume"
|
||||
charges = 28// of 58
|
||||
charges = 19// of 58
|
||||
|
||||
@@ -235,6 +235,7 @@
|
||||
src.modules += new /obj/item/weapon/melee/baton/robot(src)
|
||||
src.modules += new /obj/item/weapon/gun/energy/taser/cyborg(src)
|
||||
src.modules += new /obj/item/taperoll/police(src)
|
||||
src.modules += new /obj/item/device/taperecorder(src)
|
||||
src.emag = new /obj/item/weapon/gun/energy/laser/cyborg(src)
|
||||
return
|
||||
|
||||
@@ -299,6 +300,7 @@
|
||||
src.modules += new /obj/item/device/flash(src)
|
||||
src.modules += new /obj/item/weapon/pen/robopen(src)
|
||||
src.modules += new /obj/item/weapon/form_printer(src)
|
||||
src.modules += new /obj/item/device/taperecorder(src)
|
||||
src.modules += new /obj/item/weapon/gripper/paperwork(src)
|
||||
|
||||
src.emag = new /obj/item/weapon/stamp/denied(src)
|
||||
|
||||
+158
-12
@@ -22,6 +22,8 @@
|
||||
var/chargemode = 0
|
||||
var/chargecount = 0
|
||||
var/chargelevel = 50000
|
||||
var/input_level_max = 200000 // cap on input_level
|
||||
var/output_level_max = 200000 // cap on output_level
|
||||
var/online = 1
|
||||
var/name_tag = null
|
||||
var/obj/machinery/power/terminal/terminal = null
|
||||
@@ -29,6 +31,16 @@
|
||||
|
||||
/obj/machinery/power/smes/New()
|
||||
..()
|
||||
component_parts = list()
|
||||
component_parts += new /obj/item/weapon/circuitboard/smes(null)
|
||||
component_parts += new /obj/item/weapon/cell/high(null)
|
||||
component_parts += new /obj/item/weapon/cell/high(null)
|
||||
component_parts += new /obj/item/weapon/cell/high(null)
|
||||
component_parts += new /obj/item/weapon/cell/high(null)
|
||||
component_parts += new /obj/item/weapon/cell/high(null)
|
||||
component_parts += new /obj/item/weapon/stock_parts/capacitor(null)
|
||||
component_parts += new /obj/item/stack/cable_coil(null, 5)
|
||||
RefreshParts()
|
||||
spawn(5)
|
||||
if(!powernet)
|
||||
connect_to_network()
|
||||
@@ -49,7 +61,17 @@
|
||||
updateicon()
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/power/smes/RefreshParts()
|
||||
var/IO = 0
|
||||
var/C = 0
|
||||
for(var/obj/item/weapon/stock_parts/capacitor/CP in component_parts)
|
||||
IO += CP.rating
|
||||
input_level_max = 200000 * IO
|
||||
output_level_max = 200000 * IO
|
||||
for(var/obj/item/weapon/cell/PC in component_parts)
|
||||
C += PC.maxcharge
|
||||
capacity = C / (15000) * 1e6
|
||||
|
||||
/obj/machinery/power/smes/proc/updateicon()
|
||||
overlays.Cut()
|
||||
if(stat & BROKEN) return
|
||||
@@ -85,15 +107,139 @@
|
||||
return
|
||||
|
||||
|
||||
/obj/machinery/power/smes/attackby(obj/item/I, mob/user)
|
||||
//opening using screwdriver
|
||||
if(default_deconstruction_screwdriver(user, "[initial(icon_state)]-o", initial(icon_state), I))
|
||||
update_icon()
|
||||
return
|
||||
|
||||
//changing direction using wrench
|
||||
if(default_change_direction_wrench(user, I))
|
||||
terminal = null
|
||||
var/turf/T = get_step(src, dir)
|
||||
for(var/obj/machinery/power/terminal/term in T)
|
||||
if(term && term.dir == turn(dir, 180))
|
||||
terminal = term
|
||||
terminal.master = src
|
||||
user << "<span class='notice'>Terminal found.</span>"
|
||||
break
|
||||
if(!terminal)
|
||||
user << "<span class='alert'>No power source found.</span>"
|
||||
return
|
||||
stat &= ~BROKEN
|
||||
update_icon()
|
||||
return
|
||||
|
||||
//exchanging parts using the RPE
|
||||
if(exchange_parts(user, I))
|
||||
return
|
||||
|
||||
//building and linking a terminal
|
||||
if(istype(I, /obj/item/stack/cable_coil))
|
||||
var/dir = get_dir(user,src)
|
||||
if(dir & (dir-1))//we don't want diagonal click
|
||||
return
|
||||
|
||||
if(terminal) //is there already a terminal ?
|
||||
user << "<span class='alert'>This SMES already have a power terminal!</span>"
|
||||
return
|
||||
|
||||
if(!panel_open) //is the panel open ?
|
||||
user << "<span class='alert'>You must open the maintenance panel first!</span>"
|
||||
return
|
||||
|
||||
var/turf/T = get_turf(user)
|
||||
if (T.intact) //is the floor plating removed ?
|
||||
user << "<span class='alert'>You must first remove the floor plating!</span>"
|
||||
return
|
||||
|
||||
|
||||
var/obj/item/stack/cable_coil/C = I
|
||||
if(C.amount < 10)
|
||||
user << "<span class='alert'>You need more wires.</span>"
|
||||
return
|
||||
|
||||
user << "You start building the power terminal..."
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
|
||||
if(do_after(user, 20) && C.amount >= 10)
|
||||
var/obj/structure/cable/N = T.get_cable_node() //get the connecting node cable, if there's one
|
||||
if (prob(50) && electrocute_mob(usr, N, N)) //animate the electrocution if uncautious and unlucky
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(5, 1, src)
|
||||
s.start()
|
||||
return
|
||||
|
||||
C.use(10)
|
||||
user.visible_message(\
|
||||
"<span class='alert'>[user.name] has built a power terminal!</span>",\
|
||||
"You build the power terminal.")
|
||||
|
||||
//build the terminal and link it to the network
|
||||
make_terminal(T)
|
||||
terminal.connect_to_network()
|
||||
return
|
||||
|
||||
//disassembling the terminal
|
||||
if(istype(I, /obj/item/weapon/wirecutters) && terminal && panel_open)
|
||||
var/turf/T = get_turf(terminal)
|
||||
if (T.intact) //is the floor plating removed ?
|
||||
user << "<span class='alert'>You must first expose the power terminal!</span>"
|
||||
return
|
||||
|
||||
user << "You begin to dismantle the power terminal..."
|
||||
playsound(src.loc, 'sound/items/Deconstruct.ogg', 50, 1)
|
||||
|
||||
if(do_after(user, 50))
|
||||
if (prob(50) && electrocute_mob(usr, terminal.powernet, terminal)) //animate the electrocution if uncautious and unlucky
|
||||
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
|
||||
s.set_up(5, 1, src)
|
||||
s.start()
|
||||
return
|
||||
|
||||
//give the wires back and delete the terminal
|
||||
new /obj/item/stack/cable_coil(T,10)
|
||||
user.visible_message(\
|
||||
"<span class='alert'>[user.name] cuts the cables and dismantles the power terminal.</span>",\
|
||||
"You cut the cables and dismantle the power terminal.")
|
||||
charging = 0 //stop inputting, since we have don't have a terminal anymore
|
||||
del(terminal)
|
||||
return
|
||||
|
||||
//crowbarring it !
|
||||
default_deconstruction_crowbar(I)
|
||||
|
||||
/obj/machinery/power/smes/Destroy()
|
||||
if(ticker && ticker.current_state == GAME_STATE_PLAYING)
|
||||
var/area/area = get_area(src)
|
||||
message_admins("SMES deleted at (<A HREF='?_src_=holder;adminplayerobservecoodjump=1;X=[x];Y=[y];Z=[z]'>[area.name]</a>)")
|
||||
log_game("SMES deleted at ([area.name])")
|
||||
investigate_log("<font color='red'>deleted</font> at ([area.name])","singulo")
|
||||
if(terminal)
|
||||
disconnect_terminal()
|
||||
..()
|
||||
|
||||
// create a terminal object pointing towards the SMES
|
||||
// wires will attach to this
|
||||
/obj/machinery/power/smes/proc/make_terminal(var/turf/T)
|
||||
terminal = new/obj/machinery/power/terminal(T)
|
||||
terminal.dir = get_dir(T,src)
|
||||
terminal.master = src
|
||||
|
||||
/obj/machinery/power/smes/proc/disconnect_terminal()
|
||||
if(terminal)
|
||||
terminal.master = null
|
||||
terminal = null
|
||||
|
||||
/obj/machinery/power/smes/proc/chargedisplay()
|
||||
return round(5.5*charge/(capacity ? capacity : 5e6))
|
||||
return round(5.5*charge/capacity)
|
||||
|
||||
#define SMESRATE 0.05 // rate of internal charge to external power
|
||||
|
||||
|
||||
/obj/machinery/power/smes/process()
|
||||
|
||||
if(stat & BROKEN) return
|
||||
if(stat & BROKEN)
|
||||
return
|
||||
|
||||
//store machine state to see if we need to update the icon overlays
|
||||
var/last_disp = chargedisplay()
|
||||
@@ -205,10 +351,10 @@
|
||||
data["charging"] = charging
|
||||
data["chargeMode"] = chargemode
|
||||
data["chargeLevel"] = chargelevel
|
||||
data["chargeMax"] = SMESMAXCHARGELEVEL
|
||||
data["chargeMax"] = input_level_max
|
||||
data["outputOnline"] = online
|
||||
data["outputLevel"] = output
|
||||
data["outputMax"] = SMESMAXOUTPUT
|
||||
data["outputMax"] = output_level_max
|
||||
data["outputLoad"] = round(loaddemand)
|
||||
|
||||
// update the ui if it exists, returns null if no ui is passed/found
|
||||
@@ -254,20 +400,20 @@
|
||||
if("min")
|
||||
chargelevel = 0
|
||||
if("max")
|
||||
chargelevel = SMESMAXCHARGELEVEL //30000
|
||||
chargelevel = input_level_max //30000
|
||||
if("set")
|
||||
chargelevel = input(usr, "Enter new input level (0-[SMESMAXCHARGELEVEL])", "SMES Input Power Control", chargelevel) as num
|
||||
chargelevel = max(0, min(SMESMAXCHARGELEVEL, chargelevel)) // clamp to range
|
||||
chargelevel = input(usr, "Enter new input level (0-[input_level_max])", "SMES Input Power Control", chargelevel) as num
|
||||
chargelevel = max(0, min(input_level_max, chargelevel)) // clamp to range
|
||||
|
||||
else if( href_list["output"] )
|
||||
switch( href_list["output"] )
|
||||
if("min")
|
||||
output = 0
|
||||
if("max")
|
||||
output = SMESMAXOUTPUT //30000
|
||||
output = output_level_max //30000
|
||||
if("set")
|
||||
output = input(usr, "Enter new output level (0-[SMESMAXOUTPUT])", "SMES Output Power Control", output) as num
|
||||
output = max(0, min(SMESMAXOUTPUT, output)) // clamp to range
|
||||
output = input(usr, "Enter new output level (0-[output_level_max])", "SMES Output Power Control", output) as num
|
||||
output = max(0, min(output_level_max, output)) // clamp to range
|
||||
|
||||
investigate_log("input/output; [chargelevel>output?"<font color='green'>":"<font color='red'>"][chargelevel]/[output]</font> | Output-mode: [online?"<font color='green'>on</font>":"<font color='red'>off</font>"] | Input-mode: [chargemode?"<font color='green'>auto</font>":"<font color='red'>off</font>"] by [usr.key]","singulo")
|
||||
|
||||
|
||||
@@ -1325,8 +1325,17 @@ datum/design/light_replacer
|
||||
////////////////////////////////////////
|
||||
//////////////MISC Boards///////////////
|
||||
////////////////////////////////////////
|
||||
datum/design/smes
|
||||
name = "SMES Board"
|
||||
desc = "The circuit board for a SMES."
|
||||
id = "smes"
|
||||
req_tech = list("programming" = 4, "power" = 5, "engineering" = 4)
|
||||
build_type = IMPRINTER
|
||||
materials = list("$glass" = 1000, "sacid" = 20)
|
||||
build_path = /obj/item/weapon/circuitboard/smes
|
||||
|
||||
datum/design/thermomachine
|
||||
name = "Machine Design (Freezer/Heater Board)"
|
||||
name = "Freezer/Heater Board"
|
||||
desc = "The circuit board for a freezer/heater."
|
||||
id = "thermomachine"
|
||||
req_tech = list("programming" = 3, "plasmatech" = 3)
|
||||
@@ -1335,7 +1344,7 @@ datum/design/thermomachine
|
||||
build_path = /obj/item/weapon/circuitboard/thermomachine
|
||||
|
||||
datum/design/biogenerator
|
||||
name = "Machine Design (Biogenerator Board)"
|
||||
name = "Biogenerator Board"
|
||||
desc = "The circuit board for a biogenerator."
|
||||
id = "biogenerator"
|
||||
req_tech = list("programming" = 3, "biotech" = 2, "materials" = 3)
|
||||
@@ -1344,7 +1353,7 @@ datum/design/biogenerator
|
||||
build_path = /obj/item/weapon/circuitboard/biogenerator
|
||||
|
||||
datum/design/hydroponics
|
||||
name = "Machine Design (Hydroponics Tray Board)"
|
||||
name = "Hydroponics Tray Board"
|
||||
desc = "The circuit board for a hydroponics tray."
|
||||
id = "hydro_tray"
|
||||
req_tech = list("programming" = 1, "biotech" = 1)
|
||||
@@ -1353,7 +1362,7 @@ datum/design/hydroponics
|
||||
build_path = /obj/item/weapon/circuitboard/hydroponics
|
||||
|
||||
datum/design/microwave
|
||||
name = "Machine Design (Microwave Board)"
|
||||
name = "Microwave Board"
|
||||
desc = "The circuit board for a microwave."
|
||||
id = "microwave"
|
||||
req_tech = list("programming" = 1)
|
||||
@@ -1362,7 +1371,7 @@ datum/design/microwave
|
||||
build_path = "/obj/item/weapon/circuitboard/microwave"
|
||||
|
||||
datum/design/chem_dispenser
|
||||
name = "Machine Design (Portable Chem Dispenser Board)"
|
||||
name = "Portable Chem Dispenser Board"
|
||||
desc = "The circuit board for a portable chem dispenser."
|
||||
id = "chem_dispenser"
|
||||
req_tech = list("programming" = 4, "biotech" = 3, "engineering" = 4, "materials" = 4, "plasmatech" = 3)
|
||||
@@ -1451,6 +1460,15 @@ datum/design/mech_recharger
|
||||
materials = list("$glass" = 1000, "sacid" = 20)
|
||||
build_path = "/obj/item/weapon/circuitboard/mech_recharger"
|
||||
|
||||
datum/design/vendor
|
||||
name = "Vendor Board"
|
||||
desc = "The circuit board for a Vendor."
|
||||
id = "vendor"
|
||||
req_tech = list("programming" = 1)
|
||||
build_type = IMPRINTER
|
||||
materials = list("$glass" = 1000, "sacid" = 20)
|
||||
build_path = "/obj/item/weapon/circuitboard/vendor"
|
||||
|
||||
/////////////////////////////////////////
|
||||
////////////Power Stuff//////////////////
|
||||
/////////////////////////////////////////
|
||||
|
||||
Reference in New Issue
Block a user