diff --git a/baystation12.dme b/baystation12.dme
index 363e5bbf36..62a6618628 100644
--- a/baystation12.dme
+++ b/baystation12.dme
@@ -277,6 +277,7 @@
#include "code\game\machinery\alarm.dm"
#include "code\game\machinery\atmo_control.dm"
#include "code\game\machinery\autolathe.dm"
+#include "code\game\machinery\autolathe_datums.dm"
#include "code\game\machinery\Beacon.dm"
#include "code\game\machinery\bees_apiary.dm"
#include "code\game\machinery\bees_items.dm"
diff --git a/code/WorkInProgress/Chinsky/ashtray.dm b/code/WorkInProgress/Chinsky/ashtray.dm
index 5825171125..1b92d48ecc 100644
--- a/code/WorkInProgress/Chinsky/ashtray.dm
+++ b/code/WorkInProgress/Chinsky/ashtray.dm
@@ -82,8 +82,7 @@
icon_broken = "ashtray_bork_bl"
max_butts = 14
health = 24.0
- g_amt = 30
- m_amt = 30
+ matter = list("metal" = 30,"glass" = 30)
empty_desc = "Cheap plastic ashtray."
throwforce = 3.0
die()
@@ -103,7 +102,7 @@
icon_broken = "ashtray_bork_br"
max_butts = 10
health = 72.0
- m_amt = 80
+ matter = list("metal" = 80)
empty_desc = "Massive bronze ashtray."
throwforce = 10.0
@@ -124,7 +123,7 @@
icon_broken = "ashtray_bork_gl"
max_butts = 12
health = 12.0
- g_amt = 60
+ matter = list("glass" = 60)
empty_desc = "Glass ashtray. Looks fragile."
throwforce = 6.0
diff --git a/code/defines/obj/weapon.dm b/code/defines/obj/weapon.dm
index b60daef316..c034a65e04 100644
--- a/code/defines/obj/weapon.dm
+++ b/code/defines/obj/weapon.dm
@@ -20,7 +20,7 @@
opacity = 0
density = 0
anchored = 0.0
- var/matter = 0
+ var/stored_matter = 0
var/mode = 1
flags = TABLEPASS
w_class = 3.0
@@ -94,7 +94,7 @@
force = 5.0
throwforce = 7.0
w_class = 2.0
- m_amt = 50
+ matter = list("metal" = 50)
attack_verb = list("bludgeoned", "whacked", "disciplined", "thrashed")
/obj/item/weapon/disk
@@ -210,7 +210,7 @@
icon = 'icons/obj/items.dmi'
icon_state = "rack_parts"
flags = FPRINT | TABLEPASS| CONDUCT
- m_amt = 3750
+ matter = list("metal" = 3750)
/obj/item/weapon/shard
name = "shard"
@@ -222,7 +222,7 @@
force = 5.0
throwforce = 8.0
item_state = "shard-glass"
- g_amt = 3750
+ matter = list("glass" = 3750)
attack_verb = list("stabbed", "slashed", "sliced", "cut")
suicide_act(mob/user)
@@ -250,7 +250,7 @@
item_state = "radio"
throw_speed = 4
throw_range = 20
- m_amt = 100
+ matter = list("metal" = 100
origin_tech = "magnets=2;syndicate=3"*/
/obj/item/weapon/shard/shrapnel
@@ -292,7 +292,7 @@
w_class = 2.0
throw_speed = 4
throw_range = 20
- m_amt = 100
+ matter = list("metal" = 100)
origin_tech = "magnets=1"
/obj/item/weapon/staff
@@ -340,7 +340,7 @@
gender = PLURAL
icon = 'icons/obj/items.dmi'
icon_state = "table_parts"
- m_amt = 3750
+ matter = list("metal" = 3750)
flags = FPRINT | TABLEPASS| CONDUCT
attack_verb = list("slammed", "bashed", "battered", "bludgeoned", "thrashed", "whacked")
@@ -349,7 +349,7 @@
desc = "Hard table parts. Well...harder..."
icon = 'icons/obj/items.dmi'
icon_state = "reinf_tableparts"
- m_amt = 7500
+ matter = list("metal" = 7500)
flags = FPRINT | TABLEPASS| CONDUCT
/obj/item/weapon/table_parts/wood
@@ -366,7 +366,7 @@
var/amount = 1.0
var/laying = 0.0
var/old_lay = null
- m_amt = 40
+ matter = list("metal" = 40)
attack_verb = list("whipped", "lashed", "disciplined", "tickled")
suicide_act(mob/user)
@@ -390,8 +390,7 @@
name = "power control module"
icon_state = "power_mod"
desc = "Heavy-duty switching circuits for power control."
- m_amt = 50
- g_amt = 50
+ matter = list("metal" = 50, "glass" = 50)
/obj/item/weapon/module/id_auth
name = "\improper ID authentication module"
@@ -506,45 +505,42 @@
desc = "Used in the construction of computers and other devices with a interactive console."
icon_state = "screen"
origin_tech = "materials=1"
- g_amt = 200
+ matter = list("glass" = 200)
/obj/item/weapon/stock_parts/capacitor
name = "capacitor"
desc = "A basic capacitor used in the construction of a variety of devices."
icon_state = "capacitor"
origin_tech = "powerstorage=1"
- m_amt = 50
- g_amt = 50
+ matter = list("metal" = 50,"glass" = 50)
/obj/item/weapon/stock_parts/scanning_module
name = "scanning module"
desc = "A compact, high resolution scanning module used in the construction of certain devices."
icon_state = "scan_module"
origin_tech = "magnets=1"
- m_amt = 50
- g_amt = 20
+ matter = list("metal" = 50,"glass" = 20)
/obj/item/weapon/stock_parts/manipulator
name = "micro-manipulator"
desc = "A tiny little manipulator used in the construction of certain devices."
icon_state = "micro_mani"
origin_tech = "materials=1;programming=1"
- m_amt = 30
+ matter = list("metal" = 30)
/obj/item/weapon/stock_parts/micro_laser
name = "micro-laser"
desc = "A tiny laser used in certain devices."
icon_state = "micro_laser"
origin_tech = "magnets=1"
- m_amt = 10
- g_amt = 20
+ matter = list("metal" = 10,"glass" = 20)
/obj/item/weapon/stock_parts/matter_bin
name = "matter bin"
desc = "A container for hold compressed matter awaiting re-construction."
icon_state = "matter_bin"
origin_tech = "materials=1"
- m_amt = 80
+ matter = list("metal" = 80)
//Rank 2
@@ -553,8 +549,7 @@
desc = "An advanced capacitor used in the construction of a variety of devices."
origin_tech = "powerstorage=3"
rating = 2
- m_amt = 50
- g_amt = 50
+ matter = list("metal" = 50,"glass" = 50)
/obj/item/weapon/stock_parts/scanning_module/adv
name = "advanced scanning module"
@@ -562,8 +557,7 @@
icon_state = "scan_module"
origin_tech = "magnets=3"
rating = 2
- m_amt = 50
- g_amt = 20
+ matter = list("metal" = 50,"glass" = 20)
/obj/item/weapon/stock_parts/manipulator/nano
name = "nano-manipulator"
@@ -571,7 +565,7 @@
icon_state = "nano_mani"
origin_tech = "materials=3,programming=2"
rating = 2
- m_amt = 30
+ matter = list("metal" = 30)
/obj/item/weapon/stock_parts/micro_laser/high
name = "high-power micro-laser"
@@ -579,8 +573,7 @@
icon_state = "high_micro_laser"
origin_tech = "magnets=3"
rating = 2
- m_amt = 10
- g_amt = 20
+ matter = list("metal" = 10,"glass" = 20)
/obj/item/weapon/stock_parts/matter_bin/adv
name = "advanced matter bin"
@@ -588,7 +581,7 @@
icon_state = "advanced_matter_bin"
origin_tech = "materials=3"
rating = 2
- m_amt = 80
+ matter = list("metal" = 80)
//Rating 3
@@ -597,16 +590,14 @@
desc = "A super-high capacity capacitor used in the construction of a variety of devices."
origin_tech = "powerstorage=5;materials=4"
rating = 3
- m_amt = 50
- g_amt = 50
+ matter = list("metal" = 50,"glass" = 50)
/obj/item/weapon/stock_parts/scanning_module/phasic
name = "phasic scanning module"
desc = "A compact, high resolution phasic scanning module used in the construction of certain devices."
origin_tech = "magnets=5"
rating = 3
- m_amt = 50
- g_amt = 20
+ matter = list("metal" = 50,"glass" = 20)
/obj/item/weapon/stock_parts/manipulator/pico
name = "pico-manipulator"
@@ -614,7 +605,7 @@
icon_state = "pico_mani"
origin_tech = "materials=5,programming=2"
rating = 3
- m_amt = 30
+ matter = list("metal" = 30)
/obj/item/weapon/stock_parts/micro_laser/ultra
name = "ultra-high-power micro-laser"
@@ -622,8 +613,7 @@
desc = "A tiny laser used in certain devices."
origin_tech = "magnets=5"
rating = 3
- m_amt = 10
- g_amt = 20
+ matter = list("metal" = 10,"glass" = 20)
/obj/item/weapon/stock_parts/matter_bin/super
name = "super matter bin"
@@ -631,7 +621,7 @@
icon_state = "super_matter_bin"
origin_tech = "materials=5"
rating = 3
- m_amt = 80
+ matter = list("metal" = 80)
// Subspace stock parts
@@ -640,54 +630,49 @@
icon_state = "subspace_ansible"
desc = "A compact module capable of sensing extradimensional activity."
origin_tech = "programming=3;magnets=5;materials=4;bluespace=2"
- m_amt = 30
- g_amt = 10
+ matter = list("metal" = 30,"glass" = 10)
/obj/item/weapon/stock_parts/subspace/filter
name = "hyperwave filter"
icon_state = "hyperwave_filter"
desc = "A tiny device capable of filtering and converting super-intense radiowaves."
origin_tech = "programming=4;magnets=2"
- m_amt = 30
- g_amt = 10
+ matter = list("metal" = 30,"glass" = 10)
/obj/item/weapon/stock_parts/subspace/amplifier
name = "subspace amplifier"
icon_state = "subspace_amplifier"
desc = "A compact micro-machine capable of amplifying weak subspace transmissions."
origin_tech = "programming=3;magnets=4;materials=4;bluespace=2"
- m_amt = 30
- g_amt = 10
+ matter = list("metal" = 30,"glass" = 10)
/obj/item/weapon/stock_parts/subspace/treatment
name = "subspace treatment disk"
icon_state = "treatment_disk"
desc = "A compact micro-machine capable of stretching out hyper-compressed radio waves."
origin_tech = "programming=3;magnets=2;materials=5;bluespace=2"
- m_amt = 30
- g_amt = 10
+ matter = list("metal" = 30,"glass" = 10)
/obj/item/weapon/stock_parts/subspace/analyzer
name = "subspace wavelength analyzer"
icon_state = "wavelength_analyzer"
desc = "A sophisticated analyzer capable of analyzing cryptic subspace wavelengths."
origin_tech = "programming=3;magnets=4;materials=4;bluespace=2"
- m_amt = 30
- g_amt = 10
+ matter = list("metal" = 30,"glass" = 10)
/obj/item/weapon/stock_parts/subspace/crystal
name = "ansible crystal"
icon_state = "ansible_crystal"
desc = "A crystal made from pure glass used to transmit laser databursts to subspace."
origin_tech = "magnets=4;materials=4;bluespace=2"
- g_amt = 50
+ matter = list("glass" = 50)
/obj/item/weapon/stock_parts/subspace/transmitter
name = "subspace transmitter"
icon_state = "subspace_transmitter"
desc = "A large piece of equipment used to open a window into the subspace dimension."
origin_tech = "magnets=5;materials=5;bluespace=3"
- m_amt = 50
+ matter = list("metal" = 50)
/obj/item/weapon/ectoplasm
name = "ectoplasm"
diff --git a/code/game/gamemodes/nuclear/pinpointer.dm b/code/game/gamemodes/nuclear/pinpointer.dm
index 51a5c888d7..9b49e37fae 100644
--- a/code/game/gamemodes/nuclear/pinpointer.dm
+++ b/code/game/gamemodes/nuclear/pinpointer.dm
@@ -8,7 +8,7 @@
item_state = "electronic"
throw_speed = 4
throw_range = 20
- m_amt = 500
+ matter = list("metal" = 500)
var/obj/item/weapon/disk/nuclear/the_disk = null
var/active = 0
diff --git a/code/game/machinery/alarm.dm b/code/game/machinery/alarm.dm
index beced0067b..8d13db78a4 100644
--- a/code/game/machinery/alarm.dm
+++ b/code/game/machinery/alarm.dm
@@ -616,18 +616,6 @@
updateDialog()
return
-/obj/machinery/alarm/proc/shock(mob/user, prb)
- if((stat & (NOPOWER))) // unpowered, no shock
- return 0
- if(!prob(prb))
- return 0 //you lucked out, no shock for you
- var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
- s.set_up(5, 1, src)
- s.start() //sparks always.
- if (electrocute_mob(user, get_area(src), src))
- return 1
- else
- return 0
///////////////
//END HACKING//
///////////////
@@ -964,11 +952,11 @@ table tr:first-child th:first-child { border: none;}
add_fingerprint(usr)
usr.set_machine(src)
-
+
// hrefs that can always be called -walter0o
if(href_list["rcon"])
var/attempted_rcon_setting = text2num(href_list["rcon"])
-
+
switch(attempted_rcon_setting)
if(RCON_NO)
rcon_setting = RCON_NO
@@ -978,7 +966,7 @@ table tr:first-child th:first-child { border: none;}
rcon_setting = RCON_YES
else
return
-
+
if(href_list["temperature"])
var/list/selected = TLV["temperature"]
var/max_temperature = min(selected[3] - T0C, MAX_TEMPERATURE)
@@ -991,7 +979,7 @@ table tr:first-child th:first-child { border: none;}
// hrefs that need the AA unlocked -walter0o
if(!locked || istype(usr, /mob/living/silicon))
-
+
if(href_list["command"])
var/device_id = href_list["id_tag"]
switch(href_list["command"])
@@ -1004,9 +992,9 @@ table tr:first-child th:first-child { border: none;}
"n2o_scrub",
"panic_siphon",
"scrubbing")
-
+
send_signal(device_id, list(href_list["command"] = text2num(href_list["val"]) ) )
-
+
if("set_threshold")
var/env = href_list["env"]
var/threshold = text2num(href_list["var"])
@@ -1054,36 +1042,36 @@ table tr:first-child th:first-child { border: none;}
selected[2] = selected[4]
if(selected[3] > selected[4])
selected[3] = selected[4]
-
+
apply_mode()
-
+
if(href_list["screen"])
screen = text2num(href_list["screen"])
-
+
if(href_list["atmos_unlock"])
switch(href_list["atmos_unlock"])
if("0")
air_doors_close(1)
if("1")
air_doors_open(1)
-
+
if(href_list["atmos_alarm"])
if (alarm_area.atmosalert(2))
apply_danger_level(2)
update_icon()
-
+
if(href_list["atmos_reset"])
if (alarm_area.atmosalert(0))
apply_danger_level(0)
update_icon()
-
+
if(href_list["mode"])
mode = text2num(href_list["mode"])
apply_mode()
-
+
// hrefs that need the AA wires exposed, note that borgs should be in range here too -walter0o
if(wiresexposed && Adjacent(usr))
-
+
if (href_list["AAlarmwires"])
var/t1 = text2num(href_list["AAlarmwires"])
if (!( istype(usr.equipped(), /obj/item/weapon/wirecutters) ))
@@ -1098,7 +1086,7 @@ table tr:first-child th:first-child { border: none;}
update_icon()
buildstage = 1
return
-
+
else if (href_list["pulse"])
var/t1 = text2num(href_list["pulse"])
if (!istype(usr.equipped(), /obj/item/device/multitool))
@@ -1217,8 +1205,7 @@ Just a object used in constructing air alarms
icon_state = "door_electronics"
desc = "Looks like a circuit. Probably is."
w_class = 2.0
- m_amt = 50
- g_amt = 50
+ matter = list("metal" = 50, "glass" = 50)
/*
@@ -1545,8 +1532,7 @@ Just a object used in constructing fire alarms
icon_state = "door_electronics"
desc = "A circuit. It has a label on it, it says \"Can handle heat levels up to 40 degrees celsius!\""
w_class = 2.0
- m_amt = 50
- g_amt = 50
+ matter = list("metal" = 50, "glass" = 50)
/*
diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm
index 6a65e4812a..080faf4b89 100644
--- a/code/game/machinery/autolathe.dm
+++ b/code/game/machinery/autolathe.dm
@@ -1,401 +1,371 @@
-//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31
-
-var/global/list/autolathe_recipes = list( \
- /* screwdriver removed*/ \
- new /obj/item/weapon/reagent_containers/glass/bucket(), \
- new /obj/item/weapon/crowbar(), \
- new /obj/item/device/flashlight(), \
- new /obj/item/weapon/extinguisher(), \
- new /obj/item/device/multitool(), \
- new /obj/item/device/t_scanner(), \
- new /obj/item/weapon/weldingtool(), \
- new /obj/item/weapon/screwdriver(), \
- new /obj/item/weapon/wirecutters(), \
- new /obj/item/weapon/wrench(), \
- new /obj/item/clothing/head/welding(), \
- new /obj/item/weapon/stock_parts/console_screen(), \
- new /obj/item/weapon/airlock_electronics(), \
- new /obj/item/weapon/airalarm_electronics(), \
- new /obj/item/weapon/firealarm_electronics(), \
- new /obj/item/weapon/module/power_control(), \
- new /obj/item/stack/sheet/metal(), \
- new /obj/item/stack/sheet/glass(), \
- new /obj/item/stack/sheet/rglass(), \
- new /obj/item/stack/rods(), \
- new /obj/item/weapon/rcd_ammo(), \
- new /obj/item/weapon/kitchenknife(), \
- new /obj/item/weapon/scalpel(), \
- new /obj/item/weapon/circular_saw(), \
- new /obj/item/weapon/surgicaldrill(),\
- new /obj/item/weapon/retractor(),\
- new /obj/item/weapon/cautery(),\
- new /obj/item/weapon/hemostat(),\
- new /obj/item/weapon/reagent_containers/glass/beaker(), \
- new /obj/item/weapon/reagent_containers/glass/beaker/large(), \
- new /obj/item/weapon/reagent_containers/glass/beaker/vial(), \
- new /obj/item/weapon/reagent_containers/syringe(), \
- new /obj/item/ammo_casing/shotgun/blank(), \
- new /obj/item/ammo_casing/shotgun/beanbag(), \
- new /obj/item/ammo_magazine/c45r(), \
- new /obj/item/device/taperecorder(), \
- new /obj/item/device/assembly/igniter(), \
- new /obj/item/device/assembly/signaler(), \
- new /obj/item/device/radio/headset(), \
- new /obj/item/device/radio/off(), \
- new /obj/item/device/assembly/infra(), \
- new /obj/item/device/assembly/timer(), \
- new /obj/item/device/assembly/prox_sensor(), \
- new /obj/item/weapon/light/tube(), \
- new /obj/item/weapon/light/bulb(), \
- new /obj/item/ashtray/glass(), \
- new /obj/item/weapon/camera_assembly(), \
- )
-
-var/global/list/autolathe_recipes_hidden = list( \
- new /obj/item/weapon/flamethrower/full(), \
- new /obj/item/weapon/rcd(), \
- new /obj/item/device/radio/electropack(), \
- new /obj/item/weapon/weldingtool/largetank(), \
- new /obj/item/weapon/handcuffs(), \
- new /obj/item/ammo_magazine/a357(), \
- new /obj/item/ammo_magazine/c45m(), \
- new /obj/item/ammo_casing/shotgun(), \
- new /obj/item/ammo_casing/shotgun/dart(), \
- /* new /obj/item/weapon/shield/riot(), */ \
- )
-
/obj/machinery/autolathe
- name = "\improper Autolathe"
+ name = "\improper autolathe"
desc = "It produces items using metal and glass."
icon_state = "autolathe"
density = 1
+ anchored = 1
+ use_power = 1
+ idle_power_usage = 10
+ active_power_usage = 100
- var/m_amount = 0.0
- var/max_m_amount = 150000.0
+ var/list/stored_material = list("metal" = 0, "glass" = 0)
+ var/list/storage_capacity = list("metal" = 0, "glass" = 0)
+ var/show_category = "All"
- var/g_amount = 0.0
- var/max_g_amount = 75000.0
-
- var/operating = 0.0
- var/opened = 0.0
- anchored = 1.0
- var/list/L = list()
- var/list/LL = list()
+ var/opened = 0
var/hacked = 0
var/disabled = 0
var/shocked = 0
+ var/busy = 0
+
var/list/wires = list()
var/hack_wire
var/disable_wire
var/shock_wire
- use_power = 1
- idle_power_usage = 10
- active_power_usage = 100
- var/busy = 0
- proc
- wires_win(mob/user as mob)
- var/dat as text
- dat += "Autolathe Wires:
"
- for(var/wire in src.wires)
- dat += text("[wire] Wire: [src.wires[wire] ? "Mend" : "Cut"] Pulse
")
+/obj/machinery/autolathe/interact(mob/user as mob)
- dat += text("The red light is [src.disabled ? "off" : "on"].
")
- dat += text("The green light is [src.shocked ? "off" : "on"].
")
- dat += text("The blue light is [src.hacked ? "off" : "on"].
")
- user << browse("
Autolathe Hacking[dat]","window=autolathe_hack")
- onclose(user, "autolathe_hack")
-
- regular_win(mob/user as mob)
- var/dat as text
- dat = text("Metal Amount: [src.m_amount] cm3 (MAX: [max_m_amount])
\nGlass Amount: [src.g_amount] cm3 (MAX: [max_g_amount])
")
- var/list/objs = list()
- objs += src.L
- if (src.hacked)
- objs += src.LL
- for(var/obj/t in objs)
- var/title = "[t.name] ([t.m_amt] m /[t.g_amt] g)"
- if (m_amount"
- continue
- dat += "[title]"
- if (istype(t, /obj/item/stack))
- var/obj/item/stack/S = t
- var/max_multiplier = min(S.max_amount, S.m_amt?round(m_amount/S.m_amt):INFINITY, S.g_amt?round(g_amount/S.g_amt):INFINITY)
- if (max_multiplier>1)
- dat += " |"
- if (max_multiplier>10)
- dat += " x[10]"
- if (max_multiplier>25)
- dat += " x[25]"
- if (max_multiplier>1)
- dat += " x[max_multiplier]"
- dat += "
"
- user << browse("Autolathe Control Panel[dat]", "window=autolathe_regular")
- onclose(user, "autolathe_regular")
-
- shock(mob/user, prb)
- if(stat & (BROKEN|NOPOWER)) // unpowered, no shock
- return 0
- if(!prob(prb))
- return 0
- var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
- s.set_up(5, 1, src)
- s.start()
- if (electrocute_mob(user, get_area(src), src, 0.7))
- return 1
- else
- return 0
-
- interact(mob/user as mob)
- if(..())
- return
- if (src.shocked)
- src.shock(user,50)
- if (src.opened)
- wires_win(user,50)
- return
- if (src.disabled)
- user << "\red You press the button, but nothing happens."
- return
- regular_win(user)
+ if(..() || disabled)
return
- attackby(var/obj/item/O as obj, var/mob/user as mob)
- if (stat)
- return 1
- if (busy)
- user << "\red The autolathe is busy. Please wait for completion of previous operation."
- return 1
- if (istype(O, /obj/item/weapon/screwdriver))
- if (!opened)
- src.opened = 1
- src.icon_state = "autolathe_t"
- user << "You open the maintenance hatch of [src]."
- else
- src.opened = 0
- src.icon_state = "autolathe"
- user << "You close the maintenance hatch of [src]."
- return 1
- if (opened)
- if(istype(O, /obj/item/weapon/crowbar))
- playsound(src.loc, 'sound/items/Crowbar.ogg', 50, 1)
- var/obj/machinery/constructable_frame/machine_frame/M = new /obj/machinery/constructable_frame/machine_frame(src.loc)
- M.state = 2
- M.icon_state = "box_1"
- for(var/obj/I in component_parts)
- if(I.reliability != 100 && crit_fail)
- I.crit_fail = 1
- I.loc = src.loc
- if(m_amount >= 3750)
- var/obj/item/stack/sheet/metal/G = new /obj/item/stack/sheet/metal(src.loc)
- G.amount = round(m_amount / 3750)
- if(g_amount >= 3750)
- var/obj/item/stack/sheet/glass/G = new /obj/item/stack/sheet/glass(src.loc)
- G.amount = round(g_amount / 3750)
- del(src)
- return 1
- else
- user.set_machine(src)
- interact(user)
- return 1
+ if (shocked)
+ shock(user,50)
- if (src.m_amount + O.m_amt > max_m_amount)
- user << "\red The autolathe is full. Please remove metal from the autolathe in order to insert more."
- return 1
- if (src.g_amount + O.g_amt > max_g_amount)
- user << "\red The autolathe is full. Please remove glass from the autolathe in order to insert more."
- return 1
- if (O.m_amt == 0 && O.g_amt == 0)
- user << "\red This object does not contain significant amounts of metal or glass, or cannot be accepted by the autolathe due to size or hazardous materials."
- return 1
- /*
- if (istype(O, /obj/item/weapon/grab) && src.hacked)
- var/obj/item/weapon/grab/G = O
- if (prob(25) && G.affecting)
- G.affecting.gib()
- m_amount += 50000
- return
- */
+ var/dat = "Autolathe Control Panel
"
- var/amount = 1
- var/obj/item/stack/stack
- var/m_amt = O.m_amt
- var/g_amt = O.g_amt
- if (istype(O, /obj/item/stack))
- stack = O
- amount = stack.amount
- if (m_amt)
- amount = min(amount, round((max_m_amount-src.m_amount)/m_amt))
- flick("autolathe_o",src)//plays metal insertion animation
- if (g_amt)
- amount = min(amount, round((max_g_amount-src.g_amount)/g_amt))
- flick("autolathe_r",src)//plays glass insertion animation
- stack.use(amount)
+ dat += ""
+ var/material_top = ""
+ var/material_bottom = "
"
+
+ for(var/material in stored_material)
+ material_top += "| [material] | "
+ material_bottom += "[stored_material[material]]/[storage_capacity[material]] | "
+
+ dat += "[material_top]
[material_bottom]
"
+ dat += "Printable Designs
"
+
+ var/index = 0
+ for(var/datum/autolathe/recipe/R in autolathe_recipes)
+ index++
+ if(R.hidden && !hacked || (show_category != "All" && show_category != R.category))
+ continue
+
+ var/can_make = 1
+ var/material_string = ""
+ var/multiplier_string = ""
+ var/max_sheets
+
+ var/comma
+ if(!R.resources || !R.resources.len)
+ material_string = "No resources required."
else
- usr.before_take_item(O)
- O.loc = src
- icon_state = "autolathe"
+
+ //Make sure it's buildable and list requires resources.
+ for(var/material in R.resources)
+ var/sheets = round(stored_material[material]/R.resources[material])
+ if(isnull(max_sheets) || max_sheets > sheets)
+ max_sheets = sheets
+
+ if(!isnull(stored_material[material]) && stored_material[material] < R.resources[material])
+ can_make = 0
+ if(!comma)
+ comma = 1
+ else
+ material_string += ", "
+ material_string += "[R.resources[material]] [material]"
+ material_string += ".
"
+
+ //Build list of multipliers for sheets.
+ if(R.is_stack)
+ if(max_sheets && max_sheets > 0)
+ multiplier_string += "
"
+ for(var/i = 5;i\[x[i]\]"
+ multiplier_string += "\[x[max_sheets]\]"
+
+ dat += "| [R.hidden ? "*" : ""][can_make ? "" : ""][R.name][can_make ? "" : ""][R.hidden ? "*" : ""][multiplier_string] | [material_string] |
"
+
+ dat += "
"
+
+ //Hacking.
+ if(opened)
+ dat += "Maintenance Panel
"
+ for(var/wire in wires)
+ dat += "[wire] Wire: [wires[wire] ? "Mend" : "Cut"] Pulse
"
+ dat += "
"
+ dat += "The red light is [disabled ? "off" : "on"].
"
+ dat += "The green light is [shocked ? "off" : "on"].
"
+ dat += "The blue light is [hacked ? "off" : "on"].
"
+
+ dat += "
"
+
+ user << browse(dat, "window=autolathe")
+ onclose(user, "autolathe")
+
+/obj/machinery/autolathe/attackby(var/obj/item/O as obj, var/mob/user as mob)
+
+ if (stat)
+ return
+
+ if (busy)
+ user << "\red \The [src] is busy. Please wait for completion of previous operation."
+ return
+
+ if(istype(O, /obj/item/weapon/screwdriver))
+ opened = !opened
+ icon_state = (opened ? "autolathe_t": "autolathe")
+ user << "You [opened ? "open" : "close"] the maintenance hatch of [src]."
+ updateUsrDialog()
+ return
+
+ if (opened)
+ //Dismantle the frame.
+ if(istype(O, /obj/item/weapon/crowbar))
+ dismantle()
+ return
+
+ //Resources are being loaded.
+ var/obj/item/eating = O
+ if(!eating.matter)
+ user << "\The [eating] does not contain significant amounts of useful materials and cannot be accepted."
+ return
+
+ var/filltype = 0 // Used to determine message.
+ var/total_used = 0 // Amount of material used.
+ var/mass_per_sheet = 0 // Amount of material constituting one sheet.
+
+ for(var/material in eating.matter)
+
+ if(isnull(stored_material[material]) || isnull(storage_capacity[material]))
+ continue
+
+ if(stored_material[material] >= storage_capacity[material])
+ continue
+
+ var/total_material = eating.matter[material]
+
+ //If it's a stack, we eat multiple sheets.
+ if(istype(eating,/obj/item/stack))
+ var/obj/item/stack/stack = eating
+ total_material *= stack.amount
+
+ if(stored_material[material] + total_material > storage_capacity[material])
+ total_material = storage_capacity[material] - stored_material[material]
+ filltype = 1
+ else
+ filltype = 2
+
+ stored_material[material] += total_material
+ total_used += total_material
+ mass_per_sheet += eating.matter[material]
+
+ if(!filltype)
+ user << "\red \The [src] is full. Please remove material from the autolathe in order to insert more."
+ return
+ else if(filltype == 1)
+ user << "You fill \the [src] to capacity with \the [eating]."
+ else
+ user << "You fill \the [src] with \the [eating]."
+
+ flick("autolathe_o",src) // Plays metal insertion animation. Work out a good way to work out a fitting animation. ~Z
+
+ if(istype(eating,/obj/item/stack))
+ var/obj/item/stack/stack = eating
+ stack.use(max(1,round(total_used/mass_per_sheet))) // Always use at least 1 to prevent infinite materials.
+ else
+ user.drop_item(O)
+ del(O)
+
+ updateUsrDialog()
+ return
+
+/obj/machinery/autolathe/attack_paw(mob/user as mob)
+ return attack_hand(user)
+
+/obj/machinery/autolathe/attack_hand(mob/user as mob)
+ user.set_machine(src)
+ interact(user)
+
+/obj/machinery/autolathe/Topic(href, href_list)
+
+ if(..())
+ return
+
+ usr.set_machine(src)
+ add_fingerprint(usr)
+
+ if(busy)
+ usr << "\red The autolathe is busy. Please wait for completion of previous operation."
+ return
+
+ if(href_list["change_category"])
+
+ var/choice = input("Which category do you wish to display?") as null|anything in autolathe_categories+"All"
+ if(!choice) return
+ show_category = choice
+
+ if(href_list["make"] && autolathe_recipes)
+
+ var/index = text2num(href_list["make"])
+ var/multiplier = text2num(href_list["multiplier"])
+ var/datum/autolathe/recipe/making
+
+ if(index > 0 && index <= autolathe_recipes.len)
+ making = autolathe_recipes[index]
+
+ //Exploit detection, not sure if necessary after rewrite.
+ if(!making || multiplier < 0 || multiplier > 100)
+ var/turf/exploit_loc = get_turf(usr)
+ message_admins("[key_name_admin(usr)] tried to exploit an autolathe to duplicate an item! ([exploit_loc ? "JMP" : "null"])", 0)
+ log_admin("EXPLOIT : [key_name(usr)] tried to exploit an autolathe to duplicate an item!")
+ return
+
busy = 1
- use_power(max(1000, (m_amt+g_amt)*amount/10))
- src.m_amount += m_amt * amount
- src.g_amount += g_amt * amount
- user << "You insert [amount] sheet[amount>1 ? "s" : ""] to the autolathe."
- if (O && O.loc == src)
- del(O)
+ //This needs some work.
+ use_power(max(2000, (making.power_use*multiplier)))
+
+ //Check if we still have the materials.
+ for(var/material in making.resources)
+ if(!isnull(stored_material[material]))
+ if(stored_material[material] < (making.resources[material]*multiplier))
+ return
+
+ //Consume materials.
+ for(var/material in making.resources)
+ if(!isnull(stored_material[material]))
+ stored_material[material] = max(0,stored_material[material]-(making.resources[material]*multiplier))
+
+ //Fancy autolathe animation.
+ flick("autolathe_n",src)
+
+ sleep(50)
+
busy = 0
- src.updateUsrDialog()
- attack_paw(mob/user as mob)
- return src.attack_hand(user)
+ //Sanity check.
+ if(!making || !src) return
- attack_hand(mob/user as mob)
- user.set_machine(src)
- interact(user)
+ //Create the desired item.
+ var/obj/item/I = new making.path(get_step(loc, get_dir(src,usr)))
+ if(multiplier>1 && istype(I,/obj/item/stack))
+ var/obj/item/stack/S = I
+ S.amount = multiplier
+
+ if(href_list["act"])
+
+ var/temp_wire = href_list["wire"]
+ if(href_list["act"] == "pulse")
+
+ if (!istype(usr.get_active_hand(), /obj/item/device/multitool))
+ usr << "You need a multitool!"
+ return
+
+ if(wires[temp_wire])
+ usr << "You can't pulse a cut wire."
+ return
+
+ if(hack_wire == temp_wire)
+ hacked = !hacked
+
+ spawn(100)
+ hacked = !hacked
+
+ if(disable_wire == temp_wire)
+ disabled = !disabled
+ shock(usr,50)
+
+ spawn(100)
+ disabled = !disabled
+
+ if(shock_wire == temp_wire)
+ shocked = !shocked
+ shock(usr,50)
+
+ spawn(100)
+ shocked = !shocked
+
+ else if(href_list["act"] == "wire")
+
+ if (!istype(usr.get_active_hand(), /obj/item/weapon/wirecutters))
+ usr << "You need wirecutters!"
+ return
+
+ wires[temp_wire] = !wires[temp_wire]
+
+ if(hack_wire == temp_wire)
+ hacked = !hacked
+
+ if(disable_wire == temp_wire)
+ disabled = !disabled
+ shock(usr,50)
+
+ if(shock_wire == temp_wire)
+ shocked = !shocked
+ shock(usr,50)
+
+ updateUsrDialog()
- Topic(href, href_list)
- if(..())
- return
- usr.set_machine(src)
- src.add_fingerprint(usr)
- if (!busy)
- if(href_list["make"])
- var/turf/T = get_step(src.loc, get_dir(src,usr))
-
- // critical exploit fix start -walter0o
- var/obj/item/template = null
- var/attempting_to_build = locate(href_list["make"])
+/obj/machinery/autolathe/New()
- if(!attempting_to_build)
- return
+ ..()
- if(locate(attempting_to_build, src.L) || locate(attempting_to_build, src.LL)) // see if the requested object is in one of the construction lists, if so, it is legit -walter0o
- template = attempting_to_build
-
- else // somebody is trying to exploit, alert admins -walter0o
-
- var/turf/LOC = get_turf(usr)
- message_admins("[key_name_admin(usr)] tried to exploit an autolathe to duplicate [attempting_to_build] ! ([LOC ? "JMP" : "null"])", 0)
- log_admin("EXPLOIT : [key_name(usr)] tried to exploit an autolathe to duplicate [attempting_to_build] !")
- return
-
- // now check for legit multiplier, also only stacks should pass with one to prevent raw-materials-manipulation -walter0o
-
- var/multiplier = text2num(href_list["multiplier"])
-
- if (!multiplier) multiplier = 1
- var/max_multiplier = 1
-
- if(istype(template, /obj/item/stack)) // stacks are the only items which can have a multiplier higher than 1 -walter0o
- var/obj/item/stack/S = template
- max_multiplier = min(S.max_amount, S.m_amt?round(m_amount/S.m_amt):INFINITY, S.g_amt?round(g_amount/S.g_amt):INFINITY) // pasta from regular_win() to make sure the numbers match -walter0o
-
- if( (multiplier > max_multiplier) || (multiplier <= 0) ) // somebody is trying to exploit, alert admins-walter0o
-
- var/turf/LOC = get_turf(usr)
- message_admins("[key_name_admin(usr)] tried to exploit an autolathe with multiplier set to [multiplier] on [template] ! ([LOC ? "JMP" : "null"])" , 0)
- log_admin("EXPLOIT : [key_name(usr)] tried to exploit an autolathe with multiplier set to [multiplier] on [template] !")
- return
-
- var/power = max(2000, (template.m_amt+template.g_amt)*multiplier/5)
- if(src.m_amount >= template.m_amt*multiplier && src.g_amount >= template.g_amt*multiplier)
- busy = 1
- use_power(power)
- icon_state = "autolathe"
- flick("autolathe_n",src)
- spawn(16)
- use_power(power)
- spawn(16)
- use_power(power)
- spawn(16)
- src.m_amount -= template.m_amt*multiplier
- src.g_amount -= template.g_amt*multiplier
- if(src.m_amount < 0)
- src.m_amount = 0
- if(src.g_amount < 0)
- src.g_amount = 0
- var/obj/new_item = new template.type(T)
- if (multiplier>1)
- var/obj/item/stack/S = new_item
- S.amount = multiplier
- busy = 0
- src.updateUsrDialog()
- if(href_list["act"])
- var/temp_wire = href_list["wire"]
- if(href_list["act"] == "pulse")
- if (!istype(usr.get_active_hand(), /obj/item/device/multitool))
- usr << "You need a multitool!"
- else
- if(src.wires[temp_wire])
- usr << "You can't pulse a cut wire."
- else
- if(src.hack_wire == temp_wire)
- src.hacked = !src.hacked
- spawn(100) src.hacked = !src.hacked
- if(src.disable_wire == temp_wire)
- src.disabled = !src.disabled
- src.shock(usr,50)
- spawn(100) src.disabled = !src.disabled
- if(src.shock_wire == temp_wire)
- src.shocked = !src.shocked
- src.shock(usr,50)
- spawn(100) src.shocked = !src.shocked
- if(href_list["act"] == "wire")
- if (!istype(usr.get_active_hand(), /obj/item/weapon/wirecutters))
- usr << "You need wirecutters!"
- else
- wires[temp_wire] = !wires[temp_wire]
- if(src.hack_wire == temp_wire)
- src.hacked = !src.hacked
- if(src.disable_wire == temp_wire)
- src.disabled = !src.disabled
- src.shock(usr,50)
- if(src.shock_wire == temp_wire)
- src.shocked = !src.shocked
- src.shock(usr,50)
- else
- usr << "\red The autolathe is busy. Please wait for completion of previous operation."
- src.updateUsrDialog()
- return
+ //Create global autolathe recipe list if it hasn't been made already.
+ if(isnull(autolathe_recipes))
+ autolathe_recipes = list()
+ autolathe_categories = list()
+ for(var/R in typesof(/datum/autolathe/recipe)-/datum/autolathe/recipe)
+ var/datum/autolathe/recipe/recipe = new R
+ autolathe_recipes += recipe
+ autolathe_categories |= recipe.category
+ var/obj/item/I = new recipe.path
+ if(I.matter && !recipe.resources) //This can be overidden in the datums.
+ recipe.resources = list()
+ for(var/material in I.matter)
+ if(!isnull(storage_capacity[material]))
+ recipe.resources[material] = round(I.matter[material]*1.25) // More expensive to produce than they are to recycle.
+ del(I)
+ //Create parts for lathe.
+ component_parts = list()
+ component_parts += new /obj/item/weapon/circuitboard/autolathe(src)
+ component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
+ component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
+ component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
+ component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
+ component_parts += new /obj/item/weapon/stock_parts/console_screen(src)
RefreshParts()
- ..()
- var/tot_rating = 0
- for(var/obj/item/weapon/stock_parts/matter_bin/MB in component_parts)
- tot_rating += MB.rating
- tot_rating *= 25000
- max_m_amount = tot_rating * 2
- max_g_amount = tot_rating
- New()
- ..()
- component_parts = list()
- component_parts += new /obj/item/weapon/circuitboard/autolathe(src)
- component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
- component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
- component_parts += new /obj/item/weapon/stock_parts/matter_bin(src)
- component_parts += new /obj/item/weapon/stock_parts/manipulator(src)
- component_parts += new /obj/item/weapon/stock_parts/console_screen(src)
- RefreshParts()
+ //Init wires.
+ wires = list(
+ "Light Red" = 0,
+ "Dark Red" = 0,
+ "Blue" = 0,
+ "Green" = 0,
+ "Yellow" = 0,
+ "Black" = 0,
+ "White" = 0,
+ "Gray" = 0,
+ "Orange" = 0,
+ "Pink" = 0
+ )
- src.L = autolathe_recipes
- src.LL = autolathe_recipes_hidden
- src.wires["Light Red"] = 0
- src.wires["Dark Red"] = 0
- src.wires["Blue"] = 0
- src.wires["Green"] = 0
- src.wires["Yellow"] = 0
- src.wires["Black"] = 0
- src.wires["White"] = 0
- src.wires["Gray"] = 0
- src.wires["Orange"] = 0
- src.wires["Pink"] = 0
- var/list/w = list("Light Red","Dark Red","Blue","Green","Yellow","Black","White","Gray","Orange","Pink")
- src.hack_wire = pick(w)
- w -= src.hack_wire
- src.shock_wire = pick(w)
- w -= src.shock_wire
- src.disable_wire = pick(w)
- w -= src.disable_wire
+ //Randomize wires.
+ var/list/w = list("Light Red","Dark Red","Blue","Green","Yellow","Black","White","Gray","Orange","Pink")
+ hack_wire = pick(w)
+ w -= hack_wire
+ shock_wire = pick(w)
+ w -= shock_wire
+ disable_wire = pick(w)
+ w -= disable_wire
+
+//Updates overall lathe storage size.
+/obj/machinery/autolathe/RefreshParts()
+ ..()
+ var/tot_rating = 0
+ for(var/obj/item/weapon/stock_parts/matter_bin/MB in component_parts)
+ tot_rating += MB.rating
+
+ storage_capacity["metal"] = tot_rating * 25000
+ storage_capacity["glass"] = tot_rating * 12500
\ No newline at end of file
diff --git a/code/game/machinery/autolathe_datums.dm b/code/game/machinery/autolathe_datums.dm
new file mode 100644
index 0000000000..04ce040162
--- /dev/null
+++ b/code/game/machinery/autolathe_datums.dm
@@ -0,0 +1,304 @@
+/var/global/list/autolathe_recipes
+/var/global/list/autolathe_categories
+
+/datum/autolathe/recipe
+ var/name = "object"
+ var/path
+ var/list/resources
+ var/hidden
+ var/category
+ var/power_use = 0
+ var/is_stack
+
+/datum/autolathe/recipe/bucket
+ name = "bucket"
+ path = /obj/item/weapon/reagent_containers/glass/bucket
+ category = "General"
+
+/datum/autolathe/recipe/flashlight
+ name = "flashlight"
+ path = /obj/item/device/flashlight
+ category = "General"
+
+/datum/autolathe/recipe/extinguisher
+ name = "extinguisher"
+ path = /obj/item/weapon/extinguisher
+ category = "General"
+
+/datum/autolathe/recipe/crowbar
+ name = "crowbar"
+ path = /obj/item/weapon/crowbar
+ category = "Tools"
+
+/datum/autolathe/recipe/multitool
+ name = "multitool"
+ path = /obj/item/device/multitool
+ category = "Tools"
+
+/datum/autolathe/recipe/t_scanner
+ name = "T-ray scanner"
+ path = /obj/item/device/t_scanner
+ category = "Tools"
+
+/datum/autolathe/recipe/weldertool
+ name = "welding tool"
+ path = /obj/item/weapon/weldingtool
+ category = "Tools"
+
+/datum/autolathe/recipe/screwdriver
+ name = "screwdriver"
+ path = /obj/item/weapon/screwdriver
+ category = "Tools"
+
+/datum/autolathe/recipe/wirecutters
+ name = "wirecutters"
+ path = /obj/item/weapon/wirecutters
+ category = "Tools"
+
+/datum/autolathe/recipe/wrench
+ name = "wrench"
+ path = /obj/item/weapon/wrench
+ category = "Tools"
+
+/datum/autolathe/recipe/radio_headset
+ name = "radio headset"
+ path = /obj/item/device/radio/headset
+ category = "General"
+
+/datum/autolathe/recipe/radio_bounced
+ name = "station bounced radio"
+ path = /obj/item/device/radio/off
+ category = "General"
+
+/datum/autolathe/recipe/weldermask
+ name = "welding mask"
+ path = /obj/item/clothing/head/welding
+ category = "General"
+
+/datum/autolathe/recipe/metal
+ name = "steel sheets"
+ path = /obj/item/stack/sheet/metal
+ category = "General"
+ is_stack = 1
+
+/datum/autolathe/recipe/glass
+ name = "glass sheets"
+ path = /obj/item/stack/sheet/glass
+ category = "General"
+ is_stack = 1
+
+/datum/autolathe/recipe/rglass
+ name = "reinforced glass sheets"
+ path = /obj/item/stack/sheet/rglass
+ category = "General"
+ is_stack = 1
+
+/datum/autolathe/recipe/rods
+ name = "metal rods"
+ path = /obj/item/stack/rods
+ category = "General"
+ is_stack = 1
+
+/datum/autolathe/recipe/knife
+ name = "kitchen knife"
+ path = /obj/item/weapon/kitchenknife
+ category = "General"
+
+/datum/autolathe/recipe/taperecorder
+ name = "tape recorder"
+ path = /obj/item/device/taperecorder
+ category = "General"
+
+/datum/autolathe/recipe/airlockmodule
+ name = "airlock electronics"
+ path = /obj/item/weapon/airlock_electronics
+ category = "Engineering"
+
+/datum/autolathe/recipe/airalarm
+ name = "air alarm electronics"
+ path = /obj/item/weapon/airalarm_electronics
+ category = "Engineering"
+
+/datum/autolathe/recipe/firealarm
+ name = "fire alarm electronics"
+ path = /obj/item/weapon/firealarm_electronics
+ category = "Engineering"
+
+/datum/autolathe/recipe/powermodule
+ name = "power control module"
+ path = /obj/item/weapon/module/power_control
+ category = "Engineering"
+
+/datum/autolathe/recipe/rcd_ammo
+ name = "matter cartridge"
+ path = /obj/item/weapon/rcd_ammo
+ category = "Engineering"
+
+/datum/autolathe/recipe/scalpel
+ name = "scalpel"
+ path = /obj/item/weapon/scalpel
+ category = "Medical"
+
+/datum/autolathe/recipe/circularsaw
+ name = "circular saw"
+ path = /obj/item/weapon/circular_saw
+ category = "Medical"
+
+/datum/autolathe/recipe/surgicaldrill
+ name = "surgical drill"
+ path = /obj/item/weapon/surgicaldrill
+ category = "Medical"
+
+/datum/autolathe/recipe/retractor
+ name = "retractor"
+ path = /obj/item/weapon/retractor
+ category = "Medical"
+
+/datum/autolathe/recipe/cautery
+ name = "cautery"
+ path = /obj/item/weapon/cautery
+ category = "Medical"
+
+/datum/autolathe/recipe/hemostat
+ name = "hemostat"
+ path = /obj/item/weapon/hemostat
+ category = "Medical"
+
+/datum/autolathe/recipe/beaker
+ name = "glass beaker"
+ path = /obj/item/weapon/reagent_containers/glass/beaker
+ category = "Medical"
+
+/datum/autolathe/recipe/beaker_large
+ name = "large glass beaker"
+ path = /obj/item/weapon/reagent_containers/glass/beaker/large
+ category = "Medical"
+
+/datum/autolathe/recipe/vial
+ name = "glass vial"
+ path = /obj/item/weapon/reagent_containers/glass/beaker/vial
+ category = "Medical"
+
+/datum/autolathe/recipe/syringe
+ name = "syringe"
+ path = /obj/item/weapon/reagent_containers/syringe
+ category = "Medical"
+
+/datum/autolathe/recipe/shotgun_blanks
+ name = "ammunition (shotgun, blanks)"
+ path = /obj/item/ammo_casing/shotgun/blank
+ category = "Arms and Ammunition"
+
+/datum/autolathe/recipe/shotgun_beanbag
+ name = "ammunition (shotgun, beanbag)"
+ path = /obj/item/ammo_casing/shotgun/beanbag
+ category = "Arms and Ammunition"
+
+/datum/autolathe/recipe/magazine_rubber
+ name = "ammunition (rubber)"
+ path = /obj/item/ammo_magazine/c45r
+ category = "Arms and Ammunition"
+
+/datum/autolathe/recipe/consolescreen
+ name = "console screen"
+ path = /obj/item/weapon/stock_parts/console_screen
+ category = "Devices and Components"
+
+/datum/autolathe/recipe/igniter
+ name = "igniter"
+ path = /obj/item/device/assembly/igniter
+ category = "Devices and Components"
+
+/datum/autolathe/recipe/signaler
+ name = "signaler"
+ path = /obj/item/device/assembly/signaler
+ category = "Devices and Components"
+
+/datum/autolathe/recipe/sensor_infra
+ name = "infrared sensor"
+ path = /obj/item/device/assembly/infra
+ category = "Devices and Components"
+
+/datum/autolathe/recipe/timer
+ name = "timer"
+ path = /obj/item/device/assembly/timer
+ category = "Devices and Components"
+
+/datum/autolathe/recipe/sensor_prox
+ name = "proximity sensor"
+ path = /obj/item/device/assembly/prox_sensor
+ category = "Devices and Components"
+
+/datum/autolathe/recipe/tube
+ name = "light tube"
+ path = /obj/item/weapon/light/tube
+ category = "General"
+
+/datum/autolathe/recipe/bulb
+ name = "light bulb"
+ path = /obj/item/weapon/light/bulb
+ category = "General"
+
+/datum/autolathe/recipe/ashtray_glass
+ name = "glass ashtray"
+ path = /obj/item/ashtray/glass
+ category = "General"
+
+/datum/autolathe/recipe/camera_assembly
+ name = "camera assembly"
+ path = /obj/item/weapon/camera_assembly
+ category = "Engineering"
+
+/datum/autolathe/recipe/flamethrower
+ name = "flamethrower"
+ path = /obj/item/weapon/flamethrower/full
+ hidden = 1
+ category = "Arms and Ammunition"
+
+/datum/autolathe/recipe/magazine_revolver_1
+ name = "ammunition (.357)"
+ path = /obj/item/ammo_magazine/a357
+ hidden = 1
+ category = "Arms and Ammunition"
+
+/datum/autolathe/recipe/magazine_revolver_2
+ name = "ammunition (.45)"
+ path = /obj/item/ammo_magazine/c45m
+ hidden = 1
+ category = "Arms and Ammunition"
+
+/datum/autolathe/recipe/shotgun
+ name = "ammunition (shell, shotgun)"
+ path = /obj/item/ammo_casing/shotgun
+ hidden = 1
+ category = "Arms and Ammunition"
+
+/datum/autolathe/recipe/shotgun_dart
+ name = "ammunition (dart, shotgun)"
+ path = /obj/item/ammo_casing/shotgun/dart
+ hidden = 1
+ category = "Arms and Ammunition"
+
+/datum/autolathe/recipe/rcd
+ name = "rapid construction device"
+ path = /obj/item/weapon/rcd
+ hidden = 1
+ category = "Engineering"
+
+/datum/autolathe/recipe/electropack
+ name = "electropack"
+ path = /obj/item/device/radio/electropack
+ hidden = 1
+ category = "Devices and Components"
+
+/datum/autolathe/recipe/welder_industrial
+ name = "industrial welding tool"
+ path = /obj/item/weapon/weldingtool/largetank
+ hidden = 1
+ category = "Tools"
+
+/datum/autolathe/recipe/handcuffs
+ name = "handcuffs"
+ path = /obj/item/weapon/handcuffs
+ hidden = 1
+ category = "General"
diff --git a/code/game/machinery/camera/camera.dm b/code/game/machinery/camera/camera.dm
index 5d206b9f94..b50d38dcb6 100644
--- a/code/game/machinery/camera/camera.dm
+++ b/code/game/machinery/camera/camera.dm
@@ -94,11 +94,6 @@
src.view_range = num
cameranet.updateVisibility(src, 0)
-/obj/machinery/camera/proc/shock(var/mob/living/user)
- if(!istype(user))
- return
- user.electrocute_act(10, src)
-
/obj/machinery/camera/attack_paw(mob/living/carbon/alien/humanoid/user as mob)
if(!istype(user))
return
diff --git a/code/game/machinery/camera/camera_assembly.dm b/code/game/machinery/camera/camera_assembly.dm
index a57140b6e3..8f0739b13e 100644
--- a/code/game/machinery/camera/camera_assembly.dm
+++ b/code/game/machinery/camera/camera_assembly.dm
@@ -6,8 +6,7 @@
w_class = 2
anchored = 0
- m_amt = 700
- g_amt = 300
+ matter = list("metal" = 700,"glass" = 300)
// Motion, EMP-Proof, X-Ray
var/list/obj/item/possible_upgrades = list(/obj/item/device/assembly/prox_sensor, /obj/item/stack/sheet/mineral/phoron, /obj/item/weapon/reagent_containers/food/snacks/grown/carrot)
diff --git a/code/game/machinery/camera/wires.dm b/code/game/machinery/camera/wires.dm
index 13f0a85861..785b33368a 100644
--- a/code/game/machinery/camera/wires.dm
+++ b/code/game/machinery/camera/wires.dm
@@ -50,7 +50,6 @@
if(CAMERA_WIRE_POWER)
deactivate(usr, 1)
- //shock(usr)
if(CAMERA_WIRE_LIGHT)
light_disabled = 1
diff --git a/code/game/machinery/constructable_frame.dm b/code/game/machinery/constructable_frame.dm
index 9232ff019b..340ee6da8c 100644
--- a/code/game/machinery/constructable_frame.dm
+++ b/code/game/machinery/constructable_frame.dm
@@ -160,7 +160,7 @@
//Machine Frame Circuit Boards
/*Common Parts: Parts List: Ignitor, Timer, Infra-red laser, Infra-red sensor, t_scanner, Capacitor, Valve, sensor unit,
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
+Note: Once everything is added to the public areas, will add materials to circuit boards since autolathe won't be able
to destroy them and players will be able to make replacements.
*/
/obj/item/weapon/circuitboard/destructive_analyzer
diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm
index e9b40fde7d..37a57e7a99 100644
--- a/code/game/machinery/doors/airlock.dm
+++ b/code/game/machinery/doors/airlock.dm
@@ -596,17 +596,12 @@ About the new airlock wires panel:
// shock user with probability prb (if all connections & power are working)
// returns 1 if shocked, 0 otherwise
// The preceding comment was borrowed from the grille's shock script
-/obj/machinery/door/airlock/proc/shock(mob/user, prb)
- if((stat & (NOPOWER)) || !src.arePowerSystemsOn()) // unpowered, no shock
+/obj/machinery/door/airlock/shock(mob/user, prb)
+ if(!arePowerSystemsOn())
return 0
if(hasShocked)
return 0 //Already shocked someone recently?
- if(!prob(prb))
- return 0 //you lucked out, no shock for you
- var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
- s.set_up(5, 1, src)
- s.start() //sparks always.
- if(electrocute_mob(user, get_area(src), src))
+ if(..())
hasShocked = 1
sleep(10)
hasShocked = 0
@@ -817,7 +812,7 @@ About the new airlock wires panel:
if (src.isElectrified())
if (istype(mover, /obj/item))
var/obj/item/i = mover
- if (i.m_amt)
+ if (i.matter["metal"])
var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
s.set_up(5, 1, src)
s.start()
diff --git a/code/game/machinery/doors/airlock_electronics.dm b/code/game/machinery/doors/airlock_electronics.dm
index 8086ea8d95..d9a3efe959 100644
--- a/code/game/machinery/doors/airlock_electronics.dm
+++ b/code/game/machinery/doors/airlock_electronics.dm
@@ -5,8 +5,8 @@
icon = 'icons/obj/doors/door_assembly.dmi'
icon_state = "door_electronics"
w_class = 2.0 //It should be tiny! -Agouri
- m_amt = 50
- g_amt = 50
+
+ matter = list("metal" = 50,"glass" = 50)
req_access = list(access_engine)
@@ -113,4 +113,4 @@
/obj/item/weapon/airlock_electronics/secure
name = "secure airlock electronics"
desc = "designed to be somewhat more resistant to hacking than standard electronics."
- origin_tech = "programming=3"
+ origin_tech = "programming=3"
diff --git a/code/game/machinery/kitchen/smartfridge.dm b/code/game/machinery/kitchen/smartfridge.dm
index 841ac36d9b..6242626bc7 100644
--- a/code/game/machinery/kitchen/smartfridge.dm
+++ b/code/game/machinery/kitchen/smartfridge.dm
@@ -407,16 +407,6 @@
src.visible_message("\red [src] launches [throw_item.name] at [target.name]!")
return 1
-/obj/machinery/smartfridge/proc/shock(mob/user, prb)
- if(!ispowered) return 0
- if(!prob(prb)) return 0
-
- var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
- s.set_up(5, 1, src)
- s.start()
-
- return electrocute_mob(user, get_area(src), src, 0.7)
-
/************************
* Secure SmartFridges
*************************/
diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm
index 0b16a5aee2..495bb45246 100644
--- a/code/game/machinery/machinery.dm
+++ b/code/game/machinery/machinery.dm
@@ -258,3 +258,28 @@ Class Procs:
state(text, "blue")
playsound(src.loc, 'sound/machines/ping.ogg', 50, 0)
+
+/obj/machinery/proc/shock(mob/user, prb)
+ if(stat & (BROKEN|NOPOWER))
+ return 0
+ if(!prob(prb))
+ return 0
+ var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
+ s.set_up(5, 1, src)
+ s.start()
+ if (electrocute_mob(user, get_area(src), src, 0.7))
+ return 1
+ else
+ return 0
+
+/obj/machinery/proc/dismantle()
+ playsound(loc, 'sound/items/Crowbar.ogg', 50, 1)
+ var/obj/machinery/constructable_frame/machine_frame/M = new /obj/machinery/constructable_frame/machine_frame(loc)
+ M.state = 2
+ M.icon_state = "box_1"
+ for(var/obj/I in component_parts)
+ if(I.reliability != 100 && crit_fail)
+ I.crit_fail = 1
+ I.loc = loc
+ del(src)
+ return 1
\ No newline at end of file
diff --git a/code/game/machinery/robot_fabricator.dm b/code/game/machinery/robot_fabricator.dm
index 3d185e47d7..73aacd3a9b 100644
--- a/code/game/machinery/robot_fabricator.dm
+++ b/code/game/machinery/robot_fabricator.dm
@@ -21,7 +21,7 @@
if(!O:amount)
return
while(metal_amount < 150000 && O:amount)
- src.metal_amount += O:m_amt /*O:height * O:width * O:length * 100000.0*/
+ src.metal_amount += O.matter["metal"] /*O:height * O:width * O:length * 100000.0*/
O:amount--
count++
diff --git a/code/game/machinery/suit_storage_unit.dm b/code/game/machinery/suit_storage_unit.dm
index bcb58cd8b6..f939e24a6b 100644
--- a/code/game/machinery/suit_storage_unit.dm
+++ b/code/game/machinery/suit_storage_unit.dm
@@ -1027,19 +1027,6 @@
if (WIRE_SCANID)
locked = !locked
-/obj/machinery/suit_cycler/proc/shock(mob/user, prb)
- if(stat & (BROKEN|NOPOWER)) // unpowered, no shock
- return 0
- if(!prob(prb))
- return 0
- var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
- s.set_up(5, 1, src)
- s.start()
- if (electrocute_mob(user, get_area(src), src, 0.7))
- return 1
- else
- return 0
-
//There HAS to be a less bloated way to do this. TODO: some kind of table/icon name coding? ~Z
/obj/machinery/suit_cycler/proc/apply_paintjob()
diff --git a/code/game/machinery/vending.dm b/code/game/machinery/vending.dm
index c8ddc33f20..5dd31a036e 100644
--- a/code/game/machinery/vending.dm
+++ b/code/game/machinery/vending.dm
@@ -159,7 +159,7 @@
user << "\blue You insert the [W] into the [src]"
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)
@@ -171,7 +171,7 @@
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)
@@ -601,19 +601,6 @@
src.shoot_inventory = !src.shoot_inventory
-/obj/machinery/vending/proc/shock(mob/user, prb)
- if(stat & (BROKEN|NOPOWER)) // unpowered, no shock
- return 0
- if(!prob(prb))
- return 0
- var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
- s.set_up(5, 1, src)
- s.start()
- if (electrocute_mob(user, get_area(src), src, 0.7))
- return 1
- else
- return 0
-
/*
* Vending machine types
*/
diff --git a/code/game/objects/items/devices/debugger.dm b/code/game/objects/items/devices/debugger.dm
index 7a05fc696a..3e952671a0 100644
--- a/code/game/objects/items/devices/debugger.dm
+++ b/code/game/objects/items/devices/debugger.dm
@@ -16,8 +16,9 @@
throw_range = 15
throw_speed = 3
desc = "You can use this on airlocks or APCs to try to hack them without cutting wires."
- m_amt = 50
- g_amt = 20
+
+ matter = list("metal" = 50,"glass" = 20)
+
origin_tech = "magnets=1;engineering=1"
var/obj/machinery/telecomms/buffer // simple machine buffer for device linkage
diff --git a/code/game/objects/items/devices/flashlight.dm b/code/game/objects/items/devices/flashlight.dm
index f524daa692..14f22059ad 100644
--- a/code/game/objects/items/devices/flashlight.dm
+++ b/code/game/objects/items/devices/flashlight.dm
@@ -7,8 +7,9 @@
w_class = 2
flags = FPRINT | TABLEPASS | CONDUCT
slot_flags = SLOT_BELT
- m_amt = 50
- g_amt = 20
+
+ matter = list("metal" = 50,"glass" = 20)
+
icon_action_button = "action_flashlight"
var/on = 0
var/brightness_on = 4 //luminosity when on
@@ -128,8 +129,7 @@
brightness_on = 5
w_class = 4
flags = FPRINT | TABLEPASS | CONDUCT
- m_amt = 0
- g_amt = 0
+
on = 1
@@ -204,7 +204,7 @@
src.force = on_damage
src.damtype = "fire"
processing_objects += src
-
+
/obj/item/device/flashlight/slime
gender = PLURAL
name = "glowing slime extract"
@@ -213,16 +213,14 @@
icon_state = "floor1" //not a slime extract sprite but... something close enough!
item_state = "slime"
w_class = 1
- m_amt = 0
- g_amt = 0
brightness_on = 6
on = 1 //Bio-luminesence has one setting, on.
-
+
/obj/item/device/flashlight/slime/New()
SetLuminosity(brightness_on)
spawn(1) //Might be sloppy, but seems to be necessary to prevent further runtimes and make these work as intended... don't judge me!
update_brightness()
icon_state = initial(icon_state)
-
+
/obj/item/device/flashlight/slime/attack_self(mob/user)
return //Bio-luminescence does not toggle.
\ No newline at end of file
diff --git a/code/game/objects/items/devices/multitool.dm b/code/game/objects/items/devices/multitool.dm
index 497b5c4ef3..2a5df89510 100644
--- a/code/game/objects/items/devices/multitool.dm
+++ b/code/game/objects/items/devices/multitool.dm
@@ -15,7 +15,8 @@
throw_range = 15
throw_speed = 3
desc = "You can use this on airlocks or APCs to try to hack them without cutting wires."
- m_amt = 50
- g_amt = 20
+
+ matter = list("metal" = 50,"glass" = 20)
+
origin_tech = "magnets=1;engineering=1"
var/obj/machinery/telecomms/buffer // simple machine buffer for device linkage
\ No newline at end of file
diff --git a/code/game/objects/items/devices/powersink.dm b/code/game/objects/items/devices/powersink.dm
index 7e4a6d8995..019422b617 100644
--- a/code/game/objects/items/devices/powersink.dm
+++ b/code/game/objects/items/devices/powersink.dm
@@ -10,8 +10,9 @@
throwforce = 5
throw_speed = 1
throw_range = 2
- m_amt = 750
- w_amt = 750
+
+ matter = list("metal" = 750,"waste" = 750)
+
origin_tech = "powerstorage=3;syndicate=5"
var/drain_rate = 600000 // amount of power to drain per tick
var/power_drained = 0 // has drained this much power
diff --git a/code/game/objects/items/devices/radio/electropack.dm b/code/game/objects/items/devices/radio/electropack.dm
index 6860721b61..00666b2e2a 100644
--- a/code/game/objects/items/devices/radio/electropack.dm
+++ b/code/game/objects/items/devices/radio/electropack.dm
@@ -7,8 +7,9 @@
flags = FPRINT | CONDUCT | TABLEPASS
slot_flags = SLOT_BACK
w_class = 5.0
- g_amt = 2500
- m_amt = 10000
+
+ matter = list("metal" = 10000,"glass" = 2500)
+
var/code = 2
/obj/item/device/radio/electropack/attack_hand(mob/user as mob)
diff --git a/code/game/objects/items/devices/radio/headset.dm b/code/game/objects/items/devices/radio/headset.dm
index f8b908264d..ed59e43989 100644
--- a/code/game/objects/items/devices/radio/headset.dm
+++ b/code/game/objects/items/devices/radio/headset.dm
@@ -3,8 +3,7 @@
desc = "An updated, modular intercom that fits over the head. Takes encryption keys"
icon_state = "headset"
item_state = "headset"
- g_amt = 0
- m_amt = 75
+ matter = list("metal" = 75)
subspace_transmission = 1
canhear_range = 0 // can't hear headsets from very far away
diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm
index 569aad1c84..a15356e9c9 100644
--- a/code/game/objects/items/devices/radio/radio.dm
+++ b/code/game/objects/items/devices/radio/radio.dm
@@ -30,8 +30,9 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
throw_speed = 2
throw_range = 9
w_class = 2
- g_amt = 25
- m_amt = 75
+
+ matter = list("glass" = 25,"metal" = 75)
+
var/const/WIRE_SIGNAL = 1 //sends a signal, like to set off a bomb or electrocute someone
var/const/WIRE_RECEIVE = 2
var/const/WIRE_TRANSMIT = 4
@@ -761,10 +762,10 @@ var/GLOBAL_RADIO_TYPE = 1 // radio type to use
continue
src.channels += ch_name
src.channels[ch_name] += keyslot.channels[ch_name]
-
+
if(keyslot.syndie)
src.syndie = 1
-
+
for (var/ch_name in src.channels)
if(!radio_controller)
diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm
index fe2f1352d2..c0b230b4a7 100644
--- a/code/game/objects/items/devices/scanners.dm
+++ b/code/game/objects/items/devices/scanners.dm
@@ -17,7 +17,9 @@ REAGENT SCANNER
slot_flags = SLOT_BELT
w_class = 2
item_state = "electronic"
- m_amt = 150
+
+ matter = list("metal" = 150)
+
origin_tech = "magnets=1;engineering=1"
/obj/item/device/t_scanner/attack_self(mob/user)
@@ -71,7 +73,7 @@ REAGENT SCANNER
w_class = 2.0
throw_speed = 5
throw_range = 10
- m_amt = 200
+ matter = list("metal" = 200)
origin_tech = "magnets=1;biotech=1"
var/mode = 1;
@@ -209,8 +211,9 @@ REAGENT SCANNER
throwforce = 5
throw_speed = 4
throw_range = 20
- m_amt = 30
- g_amt = 20
+
+ matter = list("metal" = 30,"glass" = 20)
+
origin_tech = "magnets=1;engineering=1"
/obj/item/device/analyzer/attack_self(mob/user as mob)
@@ -279,8 +282,9 @@ REAGENT SCANNER
throwforce = 5
throw_speed = 4
throw_range = 20
- m_amt = 30
- g_amt = 20
+
+ matter = list("metal" = 30,"glass" = 20)
+
origin_tech = "magnets=2;biotech=2"
var/details = 0
var/recent_fail = 0
@@ -352,8 +356,8 @@ REAGENT SCANNER
throwforce = 5
throw_speed = 4
throw_range = 20
- m_amt = 30
- g_amt = 20
+ matter = list("metal" = 30,"glass" = 20)
+
origin_tech = "magnets=2;biotech=2"
var/details = 0
var/recent_fail = 0
diff --git a/code/game/objects/items/devices/taperecorder.dm b/code/game/objects/items/devices/taperecorder.dm
index b68b76a7fe..88f5ad1830 100644
--- a/code/game/objects/items/devices/taperecorder.dm
+++ b/code/game/objects/items/devices/taperecorder.dm
@@ -4,8 +4,9 @@
icon_state = "taperecorderidle"
item_state = "analyzer"
w_class = 2.0
- m_amt = 60
- g_amt = 30
+
+ matter = list("metal" = 60,"glass" = 30)
+
var/emagged = 0.0
var/recording = 0.0
var/playing = 0.0
diff --git a/code/game/objects/items/stacks/rods.dm b/code/game/objects/items/stacks/rods.dm
index bbdaf65713..9945c2a00a 100644
--- a/code/game/objects/items/stacks/rods.dm
+++ b/code/game/objects/items/stacks/rods.dm
@@ -9,7 +9,7 @@
throwforce = 15.0
throw_speed = 5
throw_range = 20
- m_amt = 1875
+ matter = list("metal" = 1875)
max_amount = 60
attack_verb = list("hit", "bludgeoned", "whacked")
@@ -63,4 +63,4 @@
usr << "\blue You assemble a grille"
F.add_fingerprint(usr)
use(2)
- return
+ return
diff --git a/code/game/objects/items/stacks/sheets/glass.dm b/code/game/objects/items/stacks/sheets/glass.dm
index 07da1ba585..43ca384129 100644
--- a/code/game/objects/items/stacks/sheets/glass.dm
+++ b/code/game/objects/items/stacks/sheets/glass.dm
@@ -15,7 +15,7 @@
desc = "HOLY SHEET! That is a lot of glass."
singular_name = "glass sheet"
icon_state = "sheet-glass"
- g_amt = 3750
+ matter = list("glass" = 3750)
origin_tech = "materials=1"
var/created_window = /obj/structure/window/basic
@@ -24,7 +24,7 @@
desc = "HOLY SHEET! That is a lot of glass."
singular_name = "glass sheet"
icon_state = "sheet-glass"
- g_amt = 0
+ matter = null
created_window = /obj/structure/window/basic
/obj/item/stack/sheet/glass/attack_self(mob/user as mob)
@@ -123,8 +123,9 @@
desc = "Glass which seems to have rods or something stuck in them."
singular_name = "reinforced glass sheet"
icon_state = "sheet-rglass"
- g_amt = 3750
- m_amt = 1875
+
+ matter = list("metal" = 1875,"glass" = 3750)
+
origin_tech = "materials=2"
/obj/item/stack/sheet/rglass/cyborg
@@ -132,8 +133,6 @@
desc = "Glass which seems to have rods or something stuck in them."
singular_name = "reinforced glass sheet"
icon_state = "sheet-rglass"
- g_amt = 0
- m_amt = 0
/obj/item/stack/sheet/rglass/attack_self(mob/user as mob)
construct_window(user)
@@ -317,7 +316,7 @@
desc = "A very strong and very resistant sheet of a phoron-glass alloy."
singular_name = "phoron glass sheet"
icon_state = "sheet-phoronglass"
- g_amt = 7500
+ matter = list("glass" = 7500)
origin_tech = "materials=3;phoron=2"
created_window = /obj/structure/window/phoronbasic
@@ -349,8 +348,8 @@
desc = "Phoron glass which seems to have rods or something stuck in them."
singular_name = "reinforced phoron glass sheet"
icon_state = "sheet-phoronrglass"
- g_amt = 7500
- m_amt = 1875
+ matter = list("glass" = 7500,"metal" = 1875)
+
origin_tech = "materials=4;phoron=2"
created_window = /obj/structure/window/phoronreinforced
diff --git a/code/game/objects/items/stacks/sheets/sheet_types.dm b/code/game/objects/items/stacks/sheets/sheet_types.dm
index 8bacfaa32e..76b3dc3694 100644
--- a/code/game/objects/items/stacks/sheets/sheet_types.dm
+++ b/code/game/objects/items/stacks/sheets/sheet_types.dm
@@ -77,7 +77,7 @@ var/global/list/datum/stack_recipe/metal_recipes = list ( \
desc = "Sheets made out off metal. It has been dubbed Metal Sheets."
singular_name = "metal sheet"
icon_state = "sheet-metal"
- m_amt = 3750
+ matter = list("metal" = 3750)
throwforce = 14.0
flags = FPRINT | TABLEPASS | CONDUCT
origin_tech = "materials=1"
@@ -87,7 +87,6 @@ var/global/list/datum/stack_recipe/metal_recipes = list ( \
desc = "Sheets made out off metal. It has been dubbed Metal Sheets."
singular_name = "metal sheet"
icon_state = "sheet-metal"
- m_amt = 0
throwforce = 14.0
flags = FPRINT | TABLEPASS | CONDUCT
@@ -112,7 +111,7 @@ var/global/list/datum/stack_recipe/plasteel_recipes = list ( \
desc = "This sheet is an alloy of iron and phoron."
icon_state = "sheet-plasteel"
item_state = "sheet-metal"
- m_amt = 7500
+ matter = list("metal" = 7500)
throwforce = 15.0
flags = FPRINT | TABLEPASS | CONDUCT
origin_tech = "materials=2"
diff --git a/code/game/objects/items/stacks/tiles/plasteel.dm b/code/game/objects/items/stacks/tiles/plasteel.dm
index 8c1dc28567..e238a80323 100644
--- a/code/game/objects/items/stacks/tiles/plasteel.dm
+++ b/code/game/objects/items/stacks/tiles/plasteel.dm
@@ -5,7 +5,7 @@
icon_state = "tile"
w_class = 3.0
force = 6.0
- m_amt = 937.5
+ matter = list("metal" = 937.5)
throwforce = 15.0
throw_speed = 5
throw_range = 20
@@ -42,4 +42,4 @@
S.ChangeTurf(/turf/simulated/floor/plating)
// var/turf/simulated/floor/W = S.ReplaceWithFloor()
// W.make_plating()
- return
+ return
diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm
index 852072769a..301f01aeb5 100644
--- a/code/game/objects/items/toys.dm
+++ b/code/game/objects/items/toys.dm
@@ -126,8 +126,9 @@
flags = FPRINT | TABLEPASS | CONDUCT
slot_flags = SLOT_BELT
w_class = 3.0
- g_amt = 10
- m_amt = 10
+
+ matter = list("glass" = 10,"metal" = 10)
+
attack_verb = list("struck", "pistol whipped", "hit", "bashed")
var/bullets = 7.0
@@ -182,8 +183,9 @@
icon_state = "357-7"
flags = FPRINT | TABLEPASS| CONDUCT
w_class = 1.0
- g_amt = 10
- m_amt = 10
+
+ matter = list("metal" = 10,"glass" = 10)
+
var/amount_left = 7.0
update_icon()
diff --git a/code/game/objects/items/weapons/RCD.dm b/code/game/objects/items/weapons/RCD.dm
index f53734dbba..86fbe9e7de 100644
--- a/code/game/objects/items/weapons/RCD.dm
+++ b/code/game/objects/items/weapons/RCD.dm
@@ -18,10 +18,10 @@ RCD
throw_speed = 1
throw_range = 5
w_class = 3.0
- m_amt = 50000
+ matter = list("metal" = 50000)
origin_tech = "engineering=4;materials=2"
var/datum/effect/effect/system/spark_spread/spark_system
- var/matter = 0
+ var/stored_matter = 0
var/working = 0
var/mode = 1
var/canRwall = 0
@@ -29,7 +29,7 @@ RCD
New()
- desc = "A RCD. It currently holds [matter]/30 matter-units."
+ desc = "A RCD. It currently holds [stored_matter]/30 matter-units."
src.spark_system = new /datum/effect/effect/system/spark_spread
spark_system.set_up(5, 0, src)
spark_system.attach(src)
@@ -39,15 +39,15 @@ RCD
attackby(obj/item/weapon/W, mob/user)
..()
if(istype(W, /obj/item/weapon/rcd_ammo))
- if((matter + 10) > 30)
+ if((stored_matter + 10) > 30)
user << "The RCD cant hold any more matter-units."
return
user.drop_item()
del(W)
- matter += 10
+ stored_matter += 10
playsound(src.loc, 'sound/machines/click.ogg', 50, 1)
- user << "The RCD now holds [matter]/30 matter-units."
- desc = "A RCD. It currently holds [matter]/30 matter-units."
+ user << "The RCD now holds [stored_matter]/30 matter-units."
+ desc = "A RCD. It currently holds [stored_matter]/30 matter-units."
return
@@ -163,14 +163,14 @@ RCD
return 0
/obj/item/weapon/rcd/proc/useResource(var/amount, var/mob/user)
- if(matter < amount)
+ if(stored_matter < amount)
return 0
- matter -= amount
- desc = "A RCD. It currently holds [matter]/30 matter-units."
+ stored_matter -= amount
+ desc = "A RCD. It currently holds [stored_matter]/30 matter-units."
return 1
/obj/item/weapon/rcd/proc/checkResource(var/amount, var/mob/user)
- return matter >= amount
+ return stored_matter >= amount
/obj/item/weapon/rcd/borg/useResource(var/amount, var/mob/user)
if(!isrobot(user))
return 0
@@ -196,5 +196,4 @@ RCD
density = 0
anchored = 0.0
origin_tech = "materials=2"
- m_amt = 30000
- g_amt = 15000
\ No newline at end of file
+ matter = list("metal" = 30000,"glass" = 15000)
\ No newline at end of file
diff --git a/code/game/objects/items/weapons/RSF.dm b/code/game/objects/items/weapons/RSF.dm
index fa55fc8e62..9d86411b1a 100644
--- a/code/game/objects/items/weapons/RSF.dm
+++ b/code/game/objects/items/weapons/RSF.dm
@@ -3,6 +3,8 @@ CONTAINS:
RSF
*/
+
+//TODO: WHAT THE FUCK, FIX THIS GARBAGE.
/obj/item/weapon/rsf
name = "\improper Rapid-Service-Fabricator"
desc = "A device used to rapidly deploy service items."
@@ -11,26 +13,26 @@ RSF
opacity = 0
density = 0
anchored = 0.0
- var/matter = 0
+ var/stored_matter = 0
var/mode = 1
flags = TABLEPASS
w_class = 3.0
/obj/item/weapon/rsf/New()
- desc = "A RSF. It currently holds [matter]/30 fabrication-units."
+ desc = "A RSF. It currently holds [stored_matter]/30 fabrication-units."
return
/obj/item/weapon/rsf/attackby(obj/item/weapon/W as obj, mob/user as mob)
..()
if (istype(W, /obj/item/weapon/rcd_ammo))
- if ((matter + 10) > 30)
+ if ((stored_matter + 10) > 30)
user << "The RSF cant hold any more matter."
return
del(W)
- matter += 10
+ stored_matter += 10
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
- user << "The RSF now holds [matter]/30 fabrication-units."
- desc = "A RSF. It currently holds [matter]/30 fabrication-units."
+ user << "The RSF now holds [stored_matter]/30 fabrication-units."
+ desc = "A RSF. It currently holds [stored_matter]/30 fabrication-units."
return
/obj/item/weapon/rsf/attack_self(mob/user as mob)
@@ -67,7 +69,7 @@ RSF
return
if (istype(A, /obj/structure/table) && mode == 1)
- if (istype(A, /obj/structure/table) && matter >= 1)
+ if (istype(A, /obj/structure/table) && stored_matter >= 1)
user << "Dispensing Dosh..."
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
new /obj/item/weapon/spacecash/c10( A.loc )
@@ -75,13 +77,13 @@ RSF
var/mob/living/silicon/robot/engy = user
engy.cell.charge -= 200 //once money becomes useful, I guess changing this to a high ammount, like 500 units a kick, till then, enjoy dosh!
else
- matter--
- user << "The RSF now holds [matter]/30 fabrication-units."
- desc = "A RSF. It currently holds [matter]/30 fabrication-units."
+ stored_matter--
+ user << "The RSF now holds [stored_matter]/30 fabrication-units."
+ desc = "A RSF. It currently holds [stored_matter]/30 fabrication-units."
return
else if (istype(A, /turf/simulated/floor) && mode == 1)
- if (istype(A, /turf/simulated/floor) && matter >= 1)
+ if (istype(A, /turf/simulated/floor) && stored_matter >= 1)
user << "Dispensing Dosh..."
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
new /obj/item/weapon/spacecash/c10( A )
@@ -89,13 +91,13 @@ RSF
var/mob/living/silicon/robot/engy = user
engy.cell.charge -= 200 //once money becomes useful, I guess changing this to a high ammount, like 500 units a kick, till then, enjoy dosh!
else
- matter--
- user << "The RSF now holds [matter]/30 fabrication-units."
- desc = "A RSF. It currently holds [matter]/30 fabrication-units."
+ stored_matter--
+ user << "The RSF now holds [stored_matter]/30 fabrication-units."
+ desc = "A RSF. It currently holds [stored_matter]/30 fabrication-units."
return
else if (istype(A, /obj/structure/table) && mode == 2)
- if (istype(A, /obj/structure/table) && matter >= 1)
+ if (istype(A, /obj/structure/table) && stored_matter >= 1)
user << "Dispensing Drinking Glass..."
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
new /obj/item/weapon/reagent_containers/food/drinks/drinkingglass( A.loc )
@@ -103,13 +105,13 @@ RSF
var/mob/living/silicon/robot/engy = user
engy.cell.charge -= 50
else
- matter--
- user << "The RSF now holds [matter]/30 fabrication-units."
- desc = "A RSF. It currently holds [matter]/30 fabrication-units."
+ stored_matter--
+ user << "The RSF now holds [stored_matter]/30 fabrication-units."
+ desc = "A RSF. It currently holds [stored_matter]/30 fabrication-units."
return
else if (istype(A, /turf/simulated/floor) && mode == 2)
- if (istype(A, /turf/simulated/floor) && matter >= 1)
+ if (istype(A, /turf/simulated/floor) && stored_matter >= 1)
user << "Dispensing Drinking Glass..."
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
new /obj/item/weapon/reagent_containers/food/drinks/drinkingglass( A )
@@ -117,13 +119,13 @@ RSF
var/mob/living/silicon/robot/engy = user
engy.cell.charge -= 50
else
- matter--
- user << "The RSF now holds [matter]/30 fabrication-units."
- desc = "A RSF. It currently holds [matter]/30 fabrication-units."
+ stored_matter--
+ user << "The RSF now holds [stored_matter]/30 fabrication-units."
+ desc = "A RSF. It currently holds [stored_matter]/30 fabrication-units."
return
else if (istype(A, /obj/structure/table) && mode == 3)
- if (istype(A, /obj/structure/table) && matter >= 1)
+ if (istype(A, /obj/structure/table) && stored_matter >= 1)
user << "Dispensing Paper Sheet..."
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
new /obj/item/weapon/paper( A.loc )
@@ -131,13 +133,13 @@ RSF
var/mob/living/silicon/robot/engy = user
engy.cell.charge -= 10
else
- matter--
- user << "The RSF now holds [matter]/30 fabrication-units."
- desc = "A RSF. It currently holds [matter]/30 fabrication-units."
+ stored_matter--
+ user << "The RSF now holds [stored_matter]/30 fabrication-units."
+ desc = "A RSF. It currently holds [stored_matter]/30 fabrication-units."
return
else if (istype(A, /turf/simulated/floor) && mode == 3)
- if (istype(A, /turf/simulated/floor) && matter >= 1)
+ if (istype(A, /turf/simulated/floor) && stored_matter >= 1)
user << "Dispensing Paper Sheet..."
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
new /obj/item/weapon/paper( A )
@@ -145,13 +147,13 @@ RSF
var/mob/living/silicon/robot/engy = user
engy.cell.charge -= 10
else
- matter--
- user << "The RSF now holds [matter]/30 fabrication-units."
- desc = "A RSF. It currently holds [matter]/30 fabrication-units."
+ stored_matter--
+ user << "The RSF now holds [stored_matter]/30 fabrication-units."
+ desc = "A RSF. It currently holds [stored_matter]/30 fabrication-units."
return
else if (istype(A, /obj/structure/table) && mode == 4)
- if (istype(A, /obj/structure/table) && matter >= 1)
+ if (istype(A, /obj/structure/table) && stored_matter >= 1)
user << "Dispensing Pen..."
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
new /obj/item/weapon/pen( A.loc )
@@ -159,13 +161,13 @@ RSF
var/mob/living/silicon/robot/engy = user
engy.cell.charge -= 50
else
- matter--
- user << "The RSF now holds [matter]/30 fabrication-units."
- desc = "A RSF. It currently holds [matter]/30 fabrication-units."
+ stored_matter--
+ user << "The RSF now holds [stored_matter]/30 fabrication-units."
+ desc = "A RSF. It currently holds [stored_matter]/30 fabrication-units."
return
else if (istype(A, /turf/simulated/floor) && mode == 4)
- if (istype(A, /turf/simulated/floor) && matter >= 1)
+ if (istype(A, /turf/simulated/floor) && stored_matter >= 1)
user << "Dispensing Pen..."
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
new /obj/item/weapon/pen( A )
@@ -173,13 +175,13 @@ RSF
var/mob/living/silicon/robot/engy = user
engy.cell.charge -= 50
else
- matter--
- user << "The RSF now holds [matter]/30 fabrication-units."
- desc = "A RSF. It currently holds [matter]/30 fabrication-units."
+ stored_matter--
+ user << "The RSF now holds [stored_matter]/30 fabrication-units."
+ desc = "A RSF. It currently holds [stored_matter]/30 fabrication-units."
return
else if (istype(A, /obj/structure/table) && mode == 5)
- if (istype(A, /obj/structure/table) && matter >= 1)
+ if (istype(A, /obj/structure/table) && stored_matter >= 1)
user << "Dispensing Dice Pack..."
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
new /obj/item/weapon/storage/pill_bottle/dice( A.loc )
@@ -187,13 +189,13 @@ RSF
var/mob/living/silicon/robot/engy = user
engy.cell.charge -= 200
else
- matter--
- user << "The RSF now holds [matter]/30 fabrication-units."
- desc = "A RSF. It currently holds [matter]/30 fabrication-units."
+ stored_matter--
+ user << "The RSF now holds [stored_matter]/30 fabrication-units."
+ desc = "A RSF. It currently holds [stored_matter]/30 fabrication-units."
return
else if (istype(A, /turf/simulated/floor) && mode == 5)
- if (istype(A, /turf/simulated/floor) && matter >= 1)
+ if (istype(A, /turf/simulated/floor) && stored_matter >= 1)
user << "Dispensing Dice Pack..."
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
new /obj/item/weapon/storage/pill_bottle/dice( A )
@@ -201,13 +203,13 @@ RSF
var/mob/living/silicon/robot/engy = user
engy.cell.charge -= 200
else
- matter--
- user << "The RSF now holds [matter]/30 fabrication-units."
- desc = "A RSF. It currently holds [matter]/30 fabrication-units."
+ stored_matter--
+ user << "The RSF now holds [stored_matter]/30 fabrication-units."
+ desc = "A RSF. It currently holds [stored_matter]/30 fabrication-units."
return
else if (istype(A, /obj/structure/table) && mode == 6)
- if (istype(A, /obj/structure/table) && matter >= 1)
+ if (istype(A, /obj/structure/table) && stored_matter >= 1)
user << "Dispensing Cigarette..."
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
new /obj/item/clothing/mask/cigarette( A.loc )
@@ -215,13 +217,13 @@ RSF
var/mob/living/silicon/robot/engy = user
engy.cell.charge -= 10
else
- matter--
- user << "The RSF now holds [matter]/30 fabrication-units."
- desc = "A RSF. It currently holds [matter]/30 fabrication-units."
+ stored_matter--
+ user << "The RSF now holds [stored_matter]/30 fabrication-units."
+ desc = "A RSF. It currently holds [stored_matter]/30 fabrication-units."
return
else if (istype(A, /turf/simulated/floor) && mode == 6)
- if (istype(A, /turf/simulated/floor) && matter >= 1)
+ if (istype(A, /turf/simulated/floor) && stored_matter >= 1)
user << "Dispensing Cigarette..."
playsound(src.loc, 'sound/machines/click.ogg', 10, 1)
new /obj/item/clothing/mask/cigarette( A )
@@ -229,7 +231,7 @@ RSF
var/mob/living/silicon/robot/engy = user
engy.cell.charge -= 10
else
- matter--
- user << "The RSF now holds [matter]/30 fabrication-units."
- desc = "A RSF. It currently holds [matter]/30 fabrication-units."
+ stored_matter--
+ user << "The RSF now holds [stored_matter]/30 fabrication-units."
+ desc = "A RSF. It currently holds [stored_matter]/30 fabrication-units."
return
\ No newline at end of file
diff --git a/code/game/objects/items/weapons/extinguisher.dm b/code/game/objects/items/weapons/extinguisher.dm
index 8c2514a2c2..513d2e3a3a 100644
--- a/code/game/objects/items/weapons/extinguisher.dm
+++ b/code/game/objects/items/weapons/extinguisher.dm
@@ -11,7 +11,7 @@
throw_speed = 2
throw_range = 10
force = 10.0
- m_amt = 90
+ matter = list("metal" = 90)
attack_verb = list("slammed", "whacked", "bashed", "thunked", "battered", "bludgeoned", "thrashed")
var/max_water = 50
var/last_use = 1.0
@@ -28,7 +28,6 @@
throwforce = 2
w_class = 2.0
force = 3.0
- m_amt = 0
max_water = 30
sprite_name = "miniFE"
diff --git a/code/game/objects/items/weapons/flamethrower.dm b/code/game/objects/items/weapons/flamethrower.dm
index c81d3afb73..1d10771958 100644
--- a/code/game/objects/items/weapons/flamethrower.dm
+++ b/code/game/objects/items/weapons/flamethrower.dm
@@ -10,7 +10,7 @@
throw_speed = 1
throw_range = 5
w_class = 3.0
- m_amt = 500
+ matter = list("metal" = 500)
origin_tech = "combat=1;phorontech=1"
var/status = 0
var/throw_amount = 100
diff --git a/code/game/objects/items/weapons/handcuffs.dm b/code/game/objects/items/weapons/handcuffs.dm
index 58a0713ecc..774c12d9b0 100644
--- a/code/game/objects/items/weapons/handcuffs.dm
+++ b/code/game/objects/items/weapons/handcuffs.dm
@@ -10,7 +10,7 @@
w_class = 2.0
throw_speed = 2
throw_range = 5
- m_amt = 500
+ matter = list("metal" = 500)
origin_tech = "materials=1"
var/dispenser = 0
var/breakouttime = 1200 //Deciseconds = 120s = 2 minutes
diff --git a/code/game/objects/items/weapons/kitchen.dm b/code/game/objects/items/weapons/kitchen.dm
index 534634529d..be1f526081 100644
--- a/code/game/objects/items/weapons/kitchen.dm
+++ b/code/game/objects/items/weapons/kitchen.dm
@@ -159,7 +159,7 @@
throwforce = 6.0
throw_speed = 3
throw_range = 6
- m_amt = 12000
+ matter = list("metal" = 12000)
origin_tech = "materials=1"
attack_verb = list("slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
@@ -189,7 +189,7 @@
throwforce = 8.0
throw_speed = 3
throw_range = 6
- m_amt = 12000
+ matter = list("metal" = 12000)
origin_tech = "materials=1"
attack_verb = list("cleaved", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
@@ -259,7 +259,7 @@
throw_range = 5
w_class = 3.0
flags = FPRINT | TABLEPASS | CONDUCT
- m_amt = 3000
+ matter = list("metal" = 3000)
/* // NOPE
var/food_total= 0
var/burger_amt = 0
diff --git a/code/game/objects/items/weapons/paint.dm b/code/game/objects/items/weapons/paint.dm
index 166144407d..96e66d7bee 100644
--- a/code/game/objects/items/weapons/paint.dm
+++ b/code/game/objects/items/weapons/paint.dm
@@ -8,8 +8,7 @@ var/global/list/cached_icons = list()
icon = 'icons/obj/items.dmi'
icon_state = "paint_neutral"
item_state = "paintcan"
- m_amt = 200
- g_amt = 0
+ matter = list("metal" = 200)
w_class = 3.0
amount_per_transfer_from_this = 10
possible_transfer_amounts = list(10,20,30,50,70)
diff --git a/code/game/objects/items/weapons/power_cells.dm b/code/game/objects/items/weapons/power_cells.dm
index 9fb8610413..5636681f5e 100644
--- a/code/game/objects/items/weapons/power_cells.dm
+++ b/code/game/objects/items/weapons/power_cells.dm
@@ -13,12 +13,11 @@
w_class = 3.0
var/charge = 0 // note %age conveted to actual charge in New
var/maxcharge = 1000
- m_amt = 700
- g_amt = 50
var/rigged = 0 // true if rigged to explode
var/minor_fault = 0 //If not 100% reliable, it will build up faults.
var/construction_cost = list("metal"=750,"glass"=75)
var/construction_time=100
+ matter = list("metal" = 700, "glass" = 50)
suicide_act(mob/user)
viewers(user) << "\red [user] is licking the electrodes of the [src.name]! It looks like \he's trying to commit suicide."
@@ -29,7 +28,7 @@
desc = "You can't top the plasma top." //TOTALLY TRADEMARK INFRINGEMENT
origin_tech = "powerstorage=0"
maxcharge = 500
- g_amt = 40
+ matter = list("glass" = 40)
/obj/item/weapon/cell/crap/empty/New()
..()
@@ -39,7 +38,7 @@
name = "security borg rechargable D battery"
origin_tech = "powerstorage=0"
maxcharge = 600 //600 max charge / 100 charge per shot = six shots
- g_amt = 40
+ matter = list("glass" = 40)
/obj/item/weapon/cell/secborg/empty/New()
..()
@@ -50,7 +49,7 @@
origin_tech = "powerstorage=2"
icon_state = "hcell"
maxcharge = 10000
- g_amt = 60
+ matter = list("glass" = 60)
/obj/item/weapon/cell/high/empty/New()
..()
@@ -61,7 +60,7 @@
origin_tech = "powerstorage=5"
icon_state = "scell"
maxcharge = 20000
- g_amt = 70
+ matter = list("glass" = 70)
construction_cost = list("metal"=750,"glass"=100)
/obj/item/weapon/cell/super/empty/New()
@@ -73,7 +72,7 @@
origin_tech = "powerstorage=6"
icon_state = "hpcell"
maxcharge = 30000
- g_amt = 80
+ matter = list("glass" = 80)
construction_cost = list("metal"=500,"glass"=150,"gold"=200,"silver"=200)
/obj/item/weapon/cell/hyper/empty/New()
@@ -85,7 +84,7 @@
icon_state = "icell"
origin_tech = null
maxcharge = 30000
- g_amt = 80
+ matter = list("glass"= 80)
use()
return 1
@@ -97,8 +96,6 @@
icon_state = "potato_cell" //"potato_battery"
charge = 100
maxcharge = 300
- m_amt = 0
- g_amt = 0
minor_fault = 1
@@ -110,5 +107,4 @@
icon_state = "yellow slime extract" //"potato_battery"
maxcharge = 10000
maxcharge = 10000
- m_amt = 0
- g_amt = 0
+ matter = null
\ No newline at end of file
diff --git a/code/game/objects/items/weapons/shields.dm b/code/game/objects/items/weapons/shields.dm
index 21a4650f35..e10ea5bece 100644
--- a/code/game/objects/items/weapons/shields.dm
+++ b/code/game/objects/items/weapons/shields.dm
@@ -13,8 +13,7 @@
throw_speed = 1
throw_range = 4
w_class = 4.0
- g_amt = 7500
- m_amt = 1000
+ matter = list("glass" = 7500, "metal" = 1000)
origin_tech = "materials=2"
attack_verb = list("shoved", "bashed")
var/cooldown = 0 //shield bash cooldown. based on world.time
diff --git a/code/game/objects/items/weapons/surgery_tools.dm b/code/game/objects/items/weapons/surgery_tools.dm
index 4bd89f7d43..4d881757bd 100644
--- a/code/game/objects/items/weapons/surgery_tools.dm
+++ b/code/game/objects/items/weapons/surgery_tools.dm
@@ -16,8 +16,7 @@
desc = "Retracts stuff."
icon = 'icons/obj/surgery.dmi'
icon_state = "retractor"
- m_amt = 10000
- g_amt = 5000
+ matter = list("metal" = 10000, "glass" = 5000)
flags = FPRINT | TABLEPASS | CONDUCT
w_class = 2.0
origin_tech = "materials=1;biotech=1"
@@ -130,8 +129,7 @@ LOOK FOR SURGERY.DM*/
desc = "You think you have seen this before."
icon = 'icons/obj/surgery.dmi'
icon_state = "hemostat"
- m_amt = 5000
- g_amt = 2500
+ matter = list("metal" = 5000, "glass" = 2500)
flags = FPRINT | TABLEPASS | CONDUCT
w_class = 2.0
origin_tech = "materials=1;biotech=1"
@@ -265,8 +263,7 @@ LOOK FOR SURGERY.DM*/
desc = "This stops bleeding."
icon = 'icons/obj/surgery.dmi'
icon_state = "cautery"
- m_amt = 5000
- g_amt = 2500
+ matter = list("metal" = 5000, "glass" = 2500)
flags = FPRINT | TABLEPASS | CONDUCT
w_class = 2.0
origin_tech = "materials=1;biotech=1"
@@ -356,8 +353,7 @@ LOOK FOR SURGERY.DM*/
icon = 'icons/obj/surgery.dmi'
icon_state = "drill"
hitsound = 'sound/weapons/circsawhit.ogg'
- m_amt = 15000
- g_amt = 10000
+ matter = list("metal" = 15000, "glass" = 10000)
flags = FPRINT | TABLEPASS | CONDUCT
force = 15.0
w_class = 2.0
@@ -383,8 +379,7 @@ LOOK FOR SURGERY.DM*/
throwforce = 5.0
throw_speed = 3
throw_range = 5
- m_amt = 10000
- g_amt = 5000
+ matter = list("metal" = 10000, "glass" = 5000)
origin_tech = "materials=1;biotech=1"
attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut")
@@ -664,8 +659,7 @@ LOOK FOR SURGERY.DM*/
throwforce = 9.0
throw_speed = 3
throw_range = 5
- m_amt = 20000
- g_amt = 10000
+ matter = list("metal" = 20000,"glass" = 10000)
origin_tech = "materials=1;biotech=1"
attack_verb = list("attacked", "slashed", "sawed", "cut")
diff --git a/code/game/objects/items/weapons/teleportation.dm b/code/game/objects/items/weapons/teleportation.dm
index 8bb00069f7..8472723f48 100644
--- a/code/game/objects/items/weapons/teleportation.dm
+++ b/code/game/objects/items/weapons/teleportation.dm
@@ -21,7 +21,7 @@
item_state = "electronic"
throw_speed = 4
throw_range = 20
- m_amt = 400
+ matter = list("metal" = 400)
origin_tech = "magnets=1"
/obj/item/weapon/locator/attack_self(mob/user as mob)
@@ -132,7 +132,7 @@ Frequency:
w_class = 2.0
throw_speed = 3
throw_range = 5
- m_amt = 10000
+ matter = list("metal" = 10000)
origin_tech = "magnets=1;bluespace=3"
/obj/item/weapon/hand_tele/attack_self(mob/user as mob)
diff --git a/code/game/objects/items/weapons/tools.dm b/code/game/objects/items/weapons/tools.dm
index 2a7f3a5061..543d3aec0c 100644
--- a/code/game/objects/items/weapons/tools.dm
+++ b/code/game/objects/items/weapons/tools.dm
@@ -24,7 +24,7 @@
force = 5.0
throwforce = 7.0
w_class = 2.0
- m_amt = 150
+ matter = list("metal" = 150)
origin_tech = "materials=1;engineering=1"
attack_verb = list("bashed", "battered", "bludgeoned", "whacked")
@@ -44,8 +44,7 @@
throwforce = 5.0
throw_speed = 3
throw_range = 5
- g_amt = 0
- m_amt = 75
+ matter = list("metal" = 75)
attack_verb = list("stabbed")
suicide_act(mob/user)
@@ -103,7 +102,7 @@
throw_speed = 2
throw_range = 9
w_class = 2.0
- m_amt = 80
+ matter = list("metal" = 80)
origin_tech = "materials=1;engineering=1"
attack_verb = list("pinched", "nipped")
@@ -141,8 +140,7 @@
w_class = 2.0
//Cost to make in the autolathe
- m_amt = 70
- g_amt = 30
+ matter = list("metal" = 70, "glass" = 30)
//R&D tech level
origin_tech = "engineering=1"
@@ -395,24 +393,21 @@
/obj/item/weapon/weldingtool/largetank
name = "Industrial Welding Tool"
max_fuel = 40
- m_amt = 70
- g_amt = 60
+ matter = list("metal" = 70, "glass" = 60)
origin_tech = "engineering=2"
/obj/item/weapon/weldingtool/hugetank
name = "Upgraded Welding Tool"
max_fuel = 80
w_class = 3.0
- m_amt = 70
- g_amt = 120
+ matter = list("metal" = 70, "glass" = 120)
origin_tech = "engineering=3"
/obj/item/weapon/weldingtool/experimental
name = "Experimental Welding Tool"
max_fuel = 40
w_class = 3.0
- m_amt = 70
- g_amt = 120
+ matter = list("metal" = 70, "glass" = 120)
origin_tech = "engineering=4;phoron=3"
var/last_gen = 0
@@ -439,7 +434,7 @@
throwforce = 7.0
item_state = "crowbar"
w_class = 2.0
- m_amt = 50
+ matter = list("metal" = 50)
origin_tech = "engineering=1"
attack_verb = list("attacked", "bashed", "battered", "bludgeoned", "whacked")
diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm
index d68a7b3c8d..e95bd236a3 100644
--- a/code/game/objects/objs.dm
+++ b/code/game/objects/objs.dm
@@ -1,8 +1,7 @@
/obj
- //var/datum/module/mod //not used
- var/m_amt = 0 // metal
- var/g_amt = 0 // glass
- var/w_amt = 0 // waster amounts
+ //Used to store information about the contents of the object.
+ var/list/matter
+
var/origin_tech = null //Used by R&D to determine what research bonuses it grants.
var/reliability = 100 //Used by SOME devices to determine how reliable they are.
var/crit_fail = 0
diff --git a/code/modules/assembly/assembly.dm b/code/modules/assembly/assembly.dm
index cd27eaa169..13e326e08e 100644
--- a/code/modules/assembly/assembly.dm
+++ b/code/modules/assembly/assembly.dm
@@ -5,9 +5,7 @@
icon_state = ""
flags = FPRINT | TABLEPASS| CONDUCT
w_class = 2.0
- m_amt = 100
- g_amt = 0
- w_amt = 0
+ matter = list("metal" = 100)
throwforce = 2
throw_speed = 3
throw_range = 10
diff --git a/code/modules/assembly/igniter.dm b/code/modules/assembly/igniter.dm
index bc535e8590..ece2f08219 100644
--- a/code/modules/assembly/igniter.dm
+++ b/code/modules/assembly/igniter.dm
@@ -2,9 +2,7 @@
name = "igniter"
desc = "A small electronic device able to ignite combustable substances."
icon_state = "igniter"
- m_amt = 500
- g_amt = 50
- w_amt = 10
+ matter = list("metal" = 500, "glass" = 50, "waste" = 10)
origin_tech = "magnets=1"
secured = 1
diff --git a/code/modules/assembly/infrared.dm b/code/modules/assembly/infrared.dm
index 3e57e3bed9..50697f503a 100644
--- a/code/modules/assembly/infrared.dm
+++ b/code/modules/assembly/infrared.dm
@@ -4,9 +4,7 @@
name = "infrared emitter"
desc = "Emits a visible or invisible beam and is triggered when the beam is interrupted."
icon_state = "infrared"
- m_amt = 1000
- g_amt = 500
- w_amt = 100
+ matter = list("metal" = 1000, "glass" = 500, "waste" = 100)
origin_tech = "magnets=2"
wires = WIRE_PULSE
diff --git a/code/modules/assembly/mousetrap.dm b/code/modules/assembly/mousetrap.dm
index 5cea63edae..3c22613022 100644
--- a/code/modules/assembly/mousetrap.dm
+++ b/code/modules/assembly/mousetrap.dm
@@ -2,8 +2,7 @@
name = "mousetrap"
desc = "A handy little spring-loaded trap for catching pesty rodents."
icon_state = "mousetrap"
- m_amt = 100
- w_amt = 10
+ matter = list("metal" = 100, "waste" = 10)
origin_tech = "combat=1"
var/armed = 0
diff --git a/code/modules/assembly/proximity.dm b/code/modules/assembly/proximity.dm
index d026ef83b9..cd0a377b43 100644
--- a/code/modules/assembly/proximity.dm
+++ b/code/modules/assembly/proximity.dm
@@ -2,9 +2,7 @@
name = "proximity sensor"
desc = "Used for scanning and alerting when someone enters a certain proximity."
icon_state = "prox"
- m_amt = 800
- g_amt = 200
- w_amt = 50
+ matter = list("metal" = 800, "glass" = 200, "waste" = 50)
origin_tech = "magnets=1"
wires = WIRE_PULSE
diff --git a/code/modules/assembly/signaler.dm b/code/modules/assembly/signaler.dm
index c304156a59..963081404f 100644
--- a/code/modules/assembly/signaler.dm
+++ b/code/modules/assembly/signaler.dm
@@ -3,9 +3,7 @@
desc = "Used to remotely activate devices."
icon_state = "signaller"
item_state = "signaler"
- m_amt = 1000
- g_amt = 200
- w_amt = 100
+ matter = list("metal" = 1000, "glass" = 200, "waste" = 100)
origin_tech = "magnets=1"
wires = WIRE_RECEIVE | WIRE_PULSE | WIRE_RADIO_PULSE | WIRE_RADIO_RECEIVE
diff --git a/code/modules/assembly/timer.dm b/code/modules/assembly/timer.dm
index ac01841718..5a0fb6e4d4 100644
--- a/code/modules/assembly/timer.dm
+++ b/code/modules/assembly/timer.dm
@@ -2,9 +2,7 @@
name = "timer"
desc = "Used to time things. Works well with contraptions which has to count down. Tick tock."
icon_state = "timer"
- m_amt = 500
- g_amt = 50
- w_amt = 10
+ matter = list("metal" = 500, "glass" = 50, "waste" = 10)
origin_tech = "magnets=1"
wires = WIRE_PULSE
@@ -20,7 +18,7 @@
activate()
if(!..()) return 0//Cooldown check
-
+
timing = !timing
update_icon()
diff --git a/code/modules/clothing/head/misc_special.dm b/code/modules/clothing/head/misc_special.dm
index 649541774d..59d6bb36c3 100644
--- a/code/modules/clothing/head/misc_special.dm
+++ b/code/modules/clothing/head/misc_special.dm
@@ -17,8 +17,7 @@
icon_state = "welding"
flags = (FPRINT | TABLEPASS | HEADCOVERSEYES | HEADCOVERSMOUTH)
item_state = "welding"
- m_amt = 3000
- g_amt = 1000
+ matter = list("metal" = 3000, "glass" = 1000)
var/up = 0
armor = list(melee = 10, bullet = 0, laser = 0,energy = 0, bomb = 0, bio = 0, rad = 0)
flags_inv = (HIDEMASK|HIDEEARS|HIDEEYES|HIDEFACE)
diff --git a/code/modules/customitems/item_defines.dm b/code/modules/customitems/item_defines.dm
index db1375c493..dd642f0b84 100644
--- a/code/modules/customitems/item_defines.dm
+++ b/code/modules/customitems/item_defines.dm
@@ -326,7 +326,7 @@
desc = "The message: 'Please do not be removing this beaker from the chemistry lab. If lost, return to Nashida Bisha'ra' can be seen etched into the side of this 100 unit beaker."
icon = 'icons/obj/chemical.dmi'
icon_state = "beakerlarge"
- g_amt = 5000
+ matter = list("glass" = 5000)
volume = 100
/obj/item/weapon/reagent_containers/glass/beaker/fluff/eleanor_stone //Rkf45: Eleanor Stone
diff --git a/code/modules/hydroponics/hydro_tools.dm b/code/modules/hydroponics/hydro_tools.dm
index 4993f5c26f..1142c8e059 100644
--- a/code/modules/hydroponics/hydro_tools.dm
+++ b/code/modules/hydroponics/hydro_tools.dm
@@ -111,7 +111,7 @@
force = 5.0
throwforce = 7.0
w_class = 2.0
- m_amt = 50
+ matter = list("metal" = 50)
attack_verb = list("slashed", "sliced", "cut", "clawed")
@@ -214,7 +214,7 @@
throwforce = 15.0
throw_speed = 4
throw_range = 4
- m_amt = 15000
+ matter = list("metal" = 15000)
origin_tech = "materials=2;combat=1"
attack_verb = list("chopped", "torn", "cut")
diff --git a/code/modules/mining/mine_items.dm b/code/modules/mining/mine_items.dm
index cc1cbc556b..5bc87bdb91 100644
--- a/code/modules/mining/mine_items.dm
+++ b/code/modules/mining/mine_items.dm
@@ -58,7 +58,7 @@
throwforce = 4.0
item_state = "pickaxe"
w_class = 4.0
- m_amt = 3750 //one sheet, but where can you make them?
+ matter = list("metal" = 3750)
var/digspeed = 40 //moving the delay to an item var so R&D can make improved picks. --NEO
origin_tech = "materials=1;engineering=1"
attack_verb = list("hit", "pierced", "sliced", "attacked")
@@ -155,7 +155,7 @@
throwforce = 4.0
item_state = "shovel"
w_class = 3.0
- m_amt = 50
+ matter = list("metal" = 50)
origin_tech = "materials=1;engineering=1"
attack_verb = list("bashed", "bludgeoned", "thrashed", "whacked")
diff --git a/code/modules/mob/living/silicon/robot/component.dm b/code/modules/mob/living/silicon/robot/component.dm
index fba4477b1d..37677f49af 100644
--- a/code/modules/mob/living/silicon/robot/component.dm
+++ b/code/modules/mob/living/silicon/robot/component.dm
@@ -171,7 +171,7 @@
w_class = 2.0
throw_speed = 5
throw_range = 10
- m_amt = 200
+ matter = list("metal" = 200)
origin_tech = "magnets=1;biotech=1"
var/mode = 1;
diff --git a/code/modules/paperwork/pen.dm b/code/modules/paperwork/pen.dm
index 58faf46948..6197956587 100644
--- a/code/modules/paperwork/pen.dm
+++ b/code/modules/paperwork/pen.dm
@@ -21,7 +21,7 @@
w_class = 1.0
throw_speed = 7
throw_range = 15
- m_amt = 10
+ matter = list("metal" = 10)
var/colour = "black" //what colour the ink is!
pressure_resistance = 2
diff --git a/code/modules/paperwork/photography.dm b/code/modules/paperwork/photography.dm
index 3656d55090..f0d39337b6 100644
--- a/code/modules/paperwork/photography.dm
+++ b/code/modules/paperwork/photography.dm
@@ -119,7 +119,7 @@
w_class = 2.0
flags = FPRINT | CONDUCT | TABLEPASS
slot_flags = SLOT_BELT
- m_amt = 2000
+ matter = list("metal" = 2000)
var/pictures_max = 10
var/pictures_left = 10
var/on = 1
diff --git a/code/modules/paperwork/stamps.dm b/code/modules/paperwork/stamps.dm
index 9f0378b5dc..5374d98b36 100644
--- a/code/modules/paperwork/stamps.dm
+++ b/code/modules/paperwork/stamps.dm
@@ -9,7 +9,7 @@
w_class = 1.0
throw_speed = 7
throw_range = 15
- m_amt = 60
+ matter = list("metal" = 60)
item_color = "cargo"
pressure_resistance = 2
attack_verb = list("stamped")
diff --git a/code/modules/power/antimatter/shielding.dm b/code/modules/power/antimatter/shielding.dm
index c2f248a5b8..ea92b1f690 100644
--- a/code/modules/power/antimatter/shielding.dm
+++ b/code/modules/power/antimatter/shielding.dm
@@ -210,8 +210,7 @@ proc/cardinalrange(var/center)
throwforce = 5
throw_speed = 1
throw_range = 2
- m_amt = 100
- w_amt = 2000
+ matter = list("metal" = 100, "waste" = 2000)
/obj/item/device/am_shielding_container/attackby(var/obj/item/I, var/mob/user)
if(istype(I, /obj/item/device/multitool) && istype(src.loc,/turf))
diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm
index bb1e49ebc3..42ab0a1812 100644
--- a/code/modules/power/apc.dm
+++ b/code/modules/power/apc.dm
@@ -1425,17 +1425,4 @@
malfvacate(1)*/
..()
-/obj/machinery/power/apc/proc/shock(mob/user, prb)
- if(!prob(prb))
- return 0
- var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
- s.set_up(5, 1, src)
- s.start()
- if(isalien(user))
- return 0
- if (electrocute_mob(user, src, src))
- return 1
- else
- return 0
-
#undef APC_UPDATE_ICON_COOLDOWN
diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm
index 0c143c28a4..d64dd4ccfb 100644
--- a/code/modules/power/cable.dm
+++ b/code/modules/power/cable.dm
@@ -212,8 +212,7 @@
w_class = 2.0
throw_speed = 2
throw_range = 5
- m_amt = 50
- g_amt = 20
+ matter = list("metal" = 50, "glass" = 20)
flags = TABLEPASS | FPRINT | CONDUCT
slot_flags = SLOT_BELT
item_state = "coil"
diff --git a/code/modules/power/lighting.dm b/code/modules/power/lighting.dm
index 74d2a476f0..324492a3bd 100644
--- a/code/modules/power/lighting.dm
+++ b/code/modules/power/lighting.dm
@@ -646,7 +646,7 @@
var/status = 0 // LIGHT_OK, LIGHT_BURNED or LIGHT_BROKEN
var/base_state
var/switchcount = 0 // number of times switched
- m_amt = 60
+ matter = list("metal" = 60)
var/rigged = 0 // true if rigged to explode
var/brightness = 2 //how much light it gives off
@@ -656,7 +656,7 @@
icon_state = "ltube"
base_state = "ltube"
item_state = "c_tube"
- g_amt = 100
+ matter = list("glass" = 100)
brightness = 8
/obj/item/weapon/light/tube/large
@@ -670,7 +670,7 @@
icon_state = "lbulb"
base_state = "lbulb"
item_state = "contvapour"
- g_amt = 100
+ matter = list("glass" = 100)
brightness = 5
/obj/item/weapon/light/throw_impact(atom/hit_atom)
@@ -683,7 +683,7 @@
icon_state = "fbulb"
base_state = "fbulb"
item_state = "egg4"
- g_amt = 100
+ matter = list("glass" = 100)
brightness = 5
// update the icon state and description of the light
diff --git a/code/modules/power/singularity/containment_field.dm b/code/modules/power/singularity/containment_field.dm
index a9ee6a25fc..123ed28c9a 100644
--- a/code/modules/power/singularity/containment_field.dm
+++ b/code/modules/power/singularity/containment_field.dm
@@ -50,7 +50,7 @@
-/obj/machinery/containment_field/proc/shock(mob/living/user as mob)
+/obj/machinery/containment_field/shock(mob/living/user as mob)
if(hasShocked)
return 0
if(!FG1 || !FG2)
diff --git a/code/modules/projectiles/ammunition.dm b/code/modules/projectiles/ammunition.dm
index 7368735b49..972f6206ae 100644
--- a/code/modules/projectiles/ammunition.dm
+++ b/code/modules/projectiles/ammunition.dm
@@ -51,7 +51,7 @@
flags = FPRINT | TABLEPASS | CONDUCT
slot_flags = SLOT_BELT
item_state = "syringe_kit"
- m_amt = 50000
+ matter = list("metal" = 50000)
throwforce = 2
w_class = 2.0
throw_speed = 4
diff --git a/code/modules/projectiles/ammunition/bullets.dm b/code/modules/projectiles/ammunition/bullets.dm
index c600199d43..e524c9765c 100644
--- a/code/modules/projectiles/ammunition/bullets.dm
+++ b/code/modules/projectiles/ammunition/bullets.dm
@@ -60,7 +60,7 @@
icon_state = "gshell"
caliber = "shotgun"
projectile_type = "/obj/item/projectile/bullet"
- m_amt = 12500
+ matter = list("metal" = 12500)
/obj/item/ammo_casing/shotgun/blank
@@ -68,7 +68,7 @@
desc = "A blank shell."
icon_state = "blshell"
projectile_type = ""
- m_amt = 250
+ matter = list("metal" = 250)
/obj/item/ammo_casing/shotgun/beanbag
@@ -76,7 +76,7 @@
desc = "A weak beanbag shell."
icon_state = "bshell"
projectile_type = "/obj/item/projectile/bullet/weakbullet/beanbag"
- m_amt = 500
+ matter = list("metal" = 500)
/obj/item/ammo_casing/shotgun/stunshell
@@ -84,7 +84,7 @@
desc = "A stunning shell."
icon_state = "stunshell"
projectile_type = "/obj/item/projectile/bullet/stunshot"
- m_amt = 2500
+ matter = list("metal" = 2500)
/obj/item/ammo_casing/shotgun/dart
@@ -92,7 +92,7 @@
desc = "A dart for use in shotguns."
icon_state = "dart"
projectile_type = "/obj/item/projectile/energy/dart"
- m_amt = 12500
+ matter = list("metal" = 12500)
/obj/item/ammo_casing/a762
desc = "A 7.62 bullet casing."
diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm
index 272216f275..0b5c5e9a56 100644
--- a/code/modules/projectiles/gun.dm
+++ b/code/modules/projectiles/gun.dm
@@ -6,7 +6,7 @@
item_state = "gun"
flags = FPRINT | TABLEPASS | CONDUCT
slot_flags = SLOT_BELT
- m_amt = 2000
+ matter = list("metal" = 2000)
w_class = 3.0
throwforce = 5
throw_speed = 4
@@ -194,7 +194,7 @@
playsound(user, fire_sound, 10, 1)
else
playsound(user, fire_sound, 50, 1)
- if(istype(in_chamber, /obj/item/projectile/beam/lastertag))
+ if(istype(in_chamber, /obj/item/projectile/beam/lastertag))
user.show_message("You feel rather silly, trying to commit suicide with a toy.")
mouthshoot = 0
return
diff --git a/code/modules/projectiles/guns/energy/laser.dm b/code/modules/projectiles/guns/energy/laser.dm
index c7026905b6..b1dbc7a0d4 100644
--- a/code/modules/projectiles/guns/energy/laser.dm
+++ b/code/modules/projectiles/guns/energy/laser.dm
@@ -5,7 +5,7 @@
item_state = "laser"
fire_sound = 'sound/weapons/Laser.ogg'
w_class = 3.0
- m_amt = 2000
+ matter = list("metal" = 2000)
origin_tech = "combat=3;magnets=2"
projectile_type = "/obj/item/projectile/beam"
diff --git a/code/modules/projectiles/guns/energy/stun.dm b/code/modules/projectiles/guns/energy/stun.dm
index 8f752b68ff..937bec18e5 100644
--- a/code/modules/projectiles/guns/energy/stun.dm
+++ b/code/modules/projectiles/guns/energy/stun.dm
@@ -65,7 +65,7 @@
icon_state = "crossbow"
w_class = 2.0
item_state = "crossbow"
- m_amt = 2000
+ matter = list("metal" = 2000)
origin_tech = "combat=2;magnets=2;syndicate=5"
silenced = 1
fire_sound = 'sound/weapons/Genhit.ogg'
@@ -103,7 +103,7 @@
desc = "A weapon favored by syndicate infiltration teams."
w_class = 4.0
force = 10
- m_amt = 200000
+ matter = list("metal" = 200000)
projectile_type = "/obj/item/projectile/energy/bolt/large"
diff --git a/code/modules/projectiles/guns/projectile.dm b/code/modules/projectiles/guns/projectile.dm
index 18be233b9b..b326dbf437 100644
--- a/code/modules/projectiles/guns/projectile.dm
+++ b/code/modules/projectiles/guns/projectile.dm
@@ -9,7 +9,7 @@
caliber = "357"
origin_tech = "combat=2;materials=2"
w_class = 3.0
- m_amt = 1000
+ matter = list("metal" = 1000)
recoil = 1
var/ammo_type = "/obj/item/ammo_casing/a357"
var/list/loaded = list()
diff --git a/code/modules/reagents/grenade_launcher.dm b/code/modules/reagents/grenade_launcher.dm
index d5f1ca734d..5545883c2f 100644
--- a/code/modules/reagents/grenade_launcher.dm
+++ b/code/modules/reagents/grenade_launcher.dm
@@ -11,7 +11,7 @@
force = 5.0
var/list/grenades = new/list()
var/max_grenades = 3
- m_amt = 2000
+ matter = list("metal" = 2000)
examine()
set src in view()
diff --git a/code/modules/reagents/reagent_containers/glass.dm b/code/modules/reagents/reagent_containers/glass.dm
index 5aea9ff6a5..8984706099 100644
--- a/code/modules/reagents/reagent_containers/glass.dm
+++ b/code/modules/reagents/reagent_containers/glass.dm
@@ -160,8 +160,7 @@
icon = 'icons/obj/chemical.dmi'
icon_state = "beaker"
item_state = "beaker"
- m_amt = 0
- g_amt = 500
+ matter = list("glass" = 500)
on_reagent_change()
update_icon()
@@ -205,7 +204,7 @@
name = "large beaker"
desc = "A large beaker. Can hold up to 100 units."
icon_state = "beakerlarge"
- g_amt = 5000
+ matter = list("glass" = 5000)
volume = 100
amount_per_transfer_from_this = 10
possible_transfer_amounts = list(5,10,15,25,30,50,100)
@@ -215,7 +214,7 @@
name = "cryostasis beaker"
desc = "A cryostasis beaker that allows for chemical storage without reactions. Can hold up to 50 units."
icon_state = "beakernoreact"
- g_amt = 500
+ matter = list("glass" = 500)
volume = 50
amount_per_transfer_from_this = 10
flags = FPRINT | TABLEPASS | OPENCONTAINER | NOREACT
@@ -224,7 +223,7 @@
name = "bluespace beaker"
desc = "A bluespace beaker, powered by experimental bluespace technology. Can hold up to 300 units."
icon_state = "beakerbluespace"
- g_amt = 5000
+ matter = list("glass" = 5000)
volume = 300
amount_per_transfer_from_this = 10
possible_transfer_amounts = list(5,10,15,25,30,50,100,300)
@@ -235,7 +234,7 @@
name = "vial"
desc = "A small glass vial. Can hold up to 25 units."
icon_state = "vial"
- g_amt = 250
+ matter = list("glass" = 250)
volume = 25
amount_per_transfer_from_this = 10
possible_transfer_amounts = list(5,10,15,25)
@@ -265,8 +264,7 @@
icon = 'icons/obj/janitor.dmi'
icon_state = "bucket"
item_state = "bucket"
- m_amt = 200
- g_amt = 0
+ matter = list("metal" = 200)
w_class = 3.0
amount_per_transfer_from_this = 20
possible_transfer_amounts = list(10,20,30,50,70)
@@ -280,7 +278,7 @@
user.put_in_hands(new /obj/item/weapon/bucket_sensor)
user.drop_from_inventory(src)
del(src)
-
+
update_icon()
overlays.Cut()
diff --git a/code/modules/reagents/reagent_containers/syringes.dm b/code/modules/reagents/reagent_containers/syringes.dm
index 183e74fba0..ba8fe0390f 100644
--- a/code/modules/reagents/reagent_containers/syringes.dm
+++ b/code/modules/reagents/reagent_containers/syringes.dm
@@ -11,7 +11,7 @@
icon = 'icons/obj/syringe.dmi'
item_state = "syringe_0"
icon_state = "0"
- g_amt = 150
+ matter = list("glass" = 150)
amount_per_transfer_from_this = 5
possible_transfer_amounts = null //list(5,10,15)
volume = 15
diff --git a/code/modules/reagents/syringe_gun.dm b/code/modules/reagents/syringe_gun.dm
index 07693c086d..34750a9397 100644
--- a/code/modules/reagents/syringe_gun.dm
+++ b/code/modules/reagents/syringe_gun.dm
@@ -13,7 +13,7 @@
force = 4.0
var/list/syringes = new/list()
var/max_syringes = 1
- m_amt = 2000
+ matter = list("metal" = 2000)
/obj/item/weapon/gun/syringe/examine()
set src in view()
diff --git a/code/modules/recycling/disposal-construction.dm b/code/modules/recycling/disposal-construction.dm
index 1c51fec763..f94d0de80b 100644
--- a/code/modules/recycling/disposal-construction.dm
+++ b/code/modules/recycling/disposal-construction.dm
@@ -10,7 +10,7 @@
anchored = 0
density = 0
pressure_resistance = 5*ONE_ATMOSPHERE
- m_amt = 1850
+ matter = list("metal" = 1850)
level = 2
var/ptype = 0
// 0=straight, 1=bent, 2=junction-j1, 3=junction-j2, 4=junction-y, 5=trunk, 6=disposal bin, 7=outlet, 8=inlet
diff --git a/code/modules/research/designs.dm b/code/modules/research/designs.dm
index b33f240214..48d18098d5 100644
--- a/code/modules/research/designs.dm
+++ b/code/modules/research/designs.dm
@@ -1721,8 +1721,7 @@ datum/design/security_hud
icon_state = "datadisk2"
item_state = "card-id"
w_class = 2.0
- m_amt = 30
- g_amt = 10
+ matter = list("metal" = 30,"glass" = 10)
var/datum/design/blueprint
/obj/item/weapon/disk/design_disk/New()
diff --git a/code/modules/research/rdconsole.dm b/code/modules/research/rdconsole.dm
index f32fbc33a1..a7a7c1c43b 100644
--- a/code/modules/research/rdconsole.dm
+++ b/code/modules/research/rdconsole.dm
@@ -262,8 +262,8 @@ won't update every console in existence) but it's more of a hassle to do. Also,
if(linked_destroy.loaded_item.reliability < 100 && linked_destroy.loaded_item.crit_fail)
files.UpdateDesign(linked_destroy.loaded_item.type)
if(linked_lathe) //Also sends salvaged materials to a linked protolathe, if any.
- linked_lathe.m_amount += min((linked_lathe.max_material_storage - linked_lathe.TotalMaterials()), (linked_destroy.loaded_item.m_amt*linked_destroy.decon_mod))
- linked_lathe.g_amount += min((linked_lathe.max_material_storage - linked_lathe.TotalMaterials()), (linked_destroy.loaded_item.g_amt*linked_destroy.decon_mod))
+ linked_lathe.m_amount += min((linked_lathe.max_material_storage - linked_lathe.TotalMaterials()), (linked_destroy.loaded_item.matter["metal"]*linked_destroy.decon_mod))
+ linked_lathe.g_amount += min((linked_lathe.max_material_storage - linked_lathe.TotalMaterials()), (linked_destroy.loaded_item.matter["glass"]*linked_destroy.decon_mod))
linked_destroy.loaded_item = null
for(var/obj/I in linked_destroy.contents)
for(var/mob/M in I.contents)
diff --git a/code/modules/research/rdmachines.dm b/code/modules/research/rdmachines.dm
index 68def8bd39..04f1536c25 100644
--- a/code/modules/research/rdmachines.dm
+++ b/code/modules/research/rdmachines.dm
@@ -36,20 +36,6 @@
src.disable_wire = pick(w)
w -= src.disable_wire
-/obj/machinery/r_n_d/proc/
- shock(mob/user, prb)
- if(stat & (BROKEN|NOPOWER)) // unpowered, no shock
- return 0
- if(!prob(prb))
- return 0
- var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread
- s.set_up(5, 1, src)
- s.start()
- if (electrocute_mob(user, get_area(src), src, 0.7))
- return 1
- else
- return 0
-
/obj/machinery/r_n_d/attack_hand(mob/user as mob)
if (shocked)
shock(user,50)
diff --git a/code/modules/research/research.dm b/code/modules/research/research.dm
index d7f488cf8c..536d712f2e 100644
--- a/code/modules/research/research.dm
+++ b/code/modules/research/research.dm
@@ -263,8 +263,7 @@ datum/tech/robotics
icon_state = "datadisk2"
item_state = "card-id"
w_class = 2.0
- m_amt = 30
- g_amt = 10
+ matter = list("metal" = 30, "glass" = 10)
var/datum/tech/stored
/obj/item/weapon/disk/tech_disk/New()
diff --git a/code/modules/research/xenoarchaeology/chemistry.dm b/code/modules/research/xenoarchaeology/chemistry.dm
index 13a8367b96..e6c622a94a 100644
--- a/code/modules/research/xenoarchaeology/chemistry.dm
+++ b/code/modules/research/xenoarchaeology/chemistry.dm
@@ -75,8 +75,7 @@ datum
desc = "A small, open-topped glass container for delicate research samples. It sports a re-useable strip for labelling with a pen."
icon = 'icons/obj/device.dmi'
icon_state = "solution_tray"
- m_amt = 0
- g_amt = 5
+ matter = list("glass" = 5)
w_class = 2.0
amount_per_transfer_from_this = 1
possible_transfer_amounts = list(1, 2)