diff --git a/code/WorkInProgress/Cael_Aislinn/Rust/circuits_and_design.dm b/code/WorkInProgress/Cael_Aislinn/Rust/circuits_and_design.dm index 5bef0cd8db1..ae0f836b4b1 100644 --- a/code/WorkInProgress/Cael_Aislinn/Rust/circuits_and_design.dm +++ b/code/WorkInProgress/Cael_Aislinn/Rust/circuits_and_design.dm @@ -13,7 +13,7 @@ datum/design/rust_core_control id = "rust_core_control" req_tech = list("programming" = 4, "engineering" = 4) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Misc" build_path = "/obj/item/weapon/circuitboard/rust_core_control" @@ -31,7 +31,7 @@ datum/design/rust_fuel_control id = "rust_fuel_control" req_tech = list("programming" = 4, "engineering" = 4) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Misc" build_path = "/obj/item/weapon/circuitboard/rust_fuel_control" @@ -49,7 +49,7 @@ datum/design/rust_fuel_port id = "rust_fuel_port" req_tech = list("engineering" = 4, "materials" = 5) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20, "$uranium" = 3000) + materials = list(MAT_GLASS = 2000, "sacid" = 20, MAT_URANIUM = 3000) category = "Misc" build_path = "/obj/item/weapon/module/rust_fuel_port" @@ -67,7 +67,7 @@ datum/design/rust_fuel_compressor id = "rust_fuel_compressor" req_tech = list("materials" = 6, "plasmatech" = 4) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20, "$plasma" = 3000, "$diamond" = 1000) + materials = list(MAT_GLASS = 2000, "sacid" = 20, MAT_PLASMA = 3000, MAT_DIAMOND = 1000) category = "Misc" build_path = "/obj/item/weapon/module/rust_fuel_compressor" @@ -94,7 +94,7 @@ datum/design/rust_core req_tech = list(bluespace = 3, plasmatech = 4, magnets = 5, powerstorage = 6) build_type = IMPRINTER reliability_base = 79 - materials = list("$glass" = 2000, "sacid" = 20, "$plasma" = 3000, "$diamond" = 2000) + materials = list(MAT_GLASS = 2000, "sacid" = 20, MAT_PLASMA = 3000, MAT_DIAMOND = 2000) category = "Misc" build_path = "/obj/item/weapon/circuitboard/rust_core" @@ -121,6 +121,6 @@ datum/design/rust_injector req_tech = list(powerstorage = 3, engineering = 4, plasmatech = 4, materials = 6) build_type = IMPRINTER reliability_base = 79 - materials = list("$glass" = 2000, "sacid" = 20, "$plasma" = 3000, "$uranium" = 2000) + materials = list(MAT_GLASS = 2000, "sacid" = 20, MAT_PLASMA = 3000, MAT_URANIUM = 2000) category = "Misc" build_path = "/obj/item/weapon/circuitboard/rust_core" diff --git a/code/WorkInProgress/Cael_Aislinn/ShieldGen/circuits_and_designs.dm b/code/WorkInProgress/Cael_Aislinn/ShieldGen/circuits_and_designs.dm index 1ff3f01dea7..b13a5751822 100644 --- a/code/WorkInProgress/Cael_Aislinn/ShieldGen/circuits_and_designs.dm +++ b/code/WorkInProgress/Cael_Aislinn/ShieldGen/circuits_and_designs.dm @@ -22,7 +22,7 @@ datum/design/shield_gen_ex id = "shield_gen" req_tech = list("bluespace" = 4, "plasmatech" = 3) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20, "$plasma" = 10000, "$diamond" = 5000, "$gold" = 10000) + materials = list(MAT_GLASS = 2000, "sacid" = 20, MAT_PLASMA = 10000, MAT_DIAMOND = 5000, MAT_GOLD = 10000) build_path = "/obj/machinery/shield_gen/external" //////////////////////////////////////// @@ -48,7 +48,7 @@ datum/design/shield_gen id = "shield_gen" req_tech = list("bluespace" = 4, "plasmatech" = 3) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20, "$plasma" = 10000, "$diamond" = 5000, "$gold" = 10000) + materials = list(MAT_GLASS = 2000, "sacid" = 20, MAT_PLASMA = 10000, MAT_DIAMOND = 5000, MAT_GOLD = 10000) build_path = "/obj/machinery/shield_gen/external" //////////////////////////////////////// @@ -74,5 +74,5 @@ datum/design/shield_cap id = "shield_cap" req_tech = list("magnets" = 3, "powerstorage" = 4) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20, "$plasma" = 10000, "$diamond" = 5000, "$silver" = 10000) + materials = list(MAT_GLASS = 2000, "sacid" = 20, MAT_PLASMA = 10000, MAT_DIAMOND = 5000, MAT_SILVER = 10000) build_path = "/obj/machinery/shield_gen/external" diff --git a/code/WorkInProgress/Chinsky/ashtray.dm b/code/WorkInProgress/Chinsky/ashtray.dm index 1f151411434..c295dae0c5c 100644 --- a/code/WorkInProgress/Chinsky/ashtray.dm +++ b/code/WorkInProgress/Chinsky/ashtray.dm @@ -78,8 +78,7 @@ icon_broken = "ashtray_bork_bl" max_butts = 14 health = 24.0 - g_amt = 0 - m_amt = 0 + starting_materials = list(MAT_PLASTIC = 50) w_type = RECYK_MISC empty_desc = "Cheap plastic ashtray." throwforce = 3.0 @@ -100,7 +99,7 @@ icon_broken = "ashtray_bork_br" max_butts = 10 health = 72.0 - m_amt = 80 + starting_materials = list(MAT_IRON = 80) w_type = RECYK_METAL empty_desc = "Massive bronze ashtray." throwforce = 10.0 @@ -122,7 +121,7 @@ icon_broken = "ashtray_bork_gl" max_butts = 12 health = 12.0 - g_amt = 60 + starting_materials = list(MAT_GLASS = 60) empty_desc = "Glass ashtray. Looks fragile." throwforce = 6.0 diff --git a/code/WorkInProgress/Mini/atmos_control.dm b/code/WorkInProgress/Mini/atmos_control.dm index af6f14750b6..84da5ee6f03 100644 --- a/code/WorkInProgress/Mini/atmos_control.dm +++ b/code/WorkInProgress/Mini/atmos_control.dm @@ -9,7 +9,7 @@ var/global/list/atmos_controllers = list() id = "atmoscontrol" req_tech = list("programming" = 4) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Console Boards" build_path = /obj/item/weapon/circuitboard/atmoscontrol diff --git a/code/datums/wires/rnd_wires.dm b/code/datums/wires/rnd_wires.dm new file mode 100644 index 00000000000..5bf0c7acac1 --- /dev/null +++ b/code/datums/wires/rnd_wires.dm @@ -0,0 +1,44 @@ +/datum/wires/rnd + holder_type = /obj/machinery/r_n_d + wire_count = 5 + + +var/const/RND_WIRE_DISABLE = 1 +var/const/RND_WIRE_SHOCK = 2 +var/const/RND_WIRE_HACK = 4 + +/datum/wires/rnd/CanUse(var/mob/living/L) + var/obj/machinery/r_n_d/rnd = holder + if(!istype(L, /mob/living/silicon)) + if(rnd.shocked) + if(rnd.shock(L, 100)) + return 0 + if(rnd.panel_open) + return 1 + return 0 + +/datum/wires/rnd/GetInteractWindow() + var/obj/machinery/r_n_d/rnd = holder + . += ..() + . += "The red light is [rnd.disabled ? "off" : "on"].
" + . += "The green light is [rnd.shocked ? "off" : "on"].
" + . += "The blue light is [rnd.hacked ? "off" : "on"].
" + +/datum/wires/rnd/UpdatePulsed(var/index) + var/obj/machinery/r_n_d/rnd = holder + switch(index) + if(RND_WIRE_DISABLE) + rnd.disabled = !rnd.disabled + if(RND_WIRE_SHOCK) + rnd.shocked = !rnd.shocked + if(RND_WIRE_HACK) + rnd.hacked = !rnd.hacked + rnd.update_hacked() + +/datum/wires/rnd/UpdateCut(var/index, var/mended) + var/obj/machinery/r_n_d/rnd = holder + switch(index) + if(RND_WIRE_DISABLE) + rnd.disabled = !rnd.disabled + if(RND_WIRE_SHOCK) + rnd.shocked = !rnd.shocked diff --git a/code/defines/obj/weapon.dm b/code/defines/obj/weapon.dm index 017899b9574..3eb87a227cd 100644 --- a/code/defines/obj/weapon.dm +++ b/code/defines/obj/weapon.dm @@ -132,7 +132,7 @@ force = 5.0 throwforce = 7.0 w_class = 2.0 - m_amt = 50 + starting_materials = list(MAT_IRON = 50) w_type = RECYK_MISC melt_temperature = MELTPOINT_STEEL attack_verb = list("bludgeoned", "whacked", "disciplined", "thrashed") @@ -578,7 +578,7 @@ icon_state = "rack_parts" flags = FPRINT siemens_coefficient = 1 - m_amt = 3750 + starting_materials = list(MAT_IRON = 3750) w_type = RECYK_METAL melt_temperature=MELTPOINT_STEEL @@ -600,7 +600,7 @@ w_class = 2.0 throw_speed = 4 throw_range = 20 - m_amt = 100 + starting_materials = list(MAT_IRON = 100) w_type = RECYK_ELECTRONIC melt_temperature=MELTPOINT_SILICON origin_tech = "magnets=1" @@ -691,7 +691,7 @@ gender = PLURAL icon = 'icons/obj/items.dmi' icon_state = "table_parts" - m_amt = 3750 + starting_materials = list(MAT_IRON = 3750) w_type = RECYK_METAL melt_temperature=MELTPOINT_STEEL flags = FPRINT @@ -707,7 +707,7 @@ desc = "Hard table parts. Well...harder..." icon = 'icons/obj/items.dmi' icon_state = "reinf_tableparts" - m_amt = 7500 + starting_materials = list(MAT_IRON = 7500) w_type = RECYK_METAL melt_temperature=MELTPOINT_STEEL flags = FPRINT @@ -730,7 +730,7 @@ var/amount = 1.0 var/laying = 0.0 var/old_lay = null - m_amt = 40 + starting_materials = list(MAT_IRON = 70) w_type = RECYK_METAL melt_temperature=MELTPOINT_STEEL attack_verb = list("whipped", "lashed", "disciplined", "tickled") @@ -796,7 +796,7 @@ throwforce = 15.0 throw_speed = 4 throw_range = 4 - m_amt = 15000 + starting_materials = list(MAT_IRON = 15000) w_type = RECYK_METAL melt_temperature=MELTPOINT_STEEL origin_tech = "materials=2;combat=1" @@ -822,7 +822,7 @@ throw_speed = 1 throw_range = 3 w_class = 4.0 - m_amt = 15000 + starting_materials = list(MAT_IRON = 15000) w_type = RECYK_METAL flags = FPRINT slot_flags = SLOT_BACK @@ -879,7 +879,7 @@ desc = "Used in the construction of computers and other devices with a interactive console." icon_state = "screen" origin_tech = "materials=1" - g_amt = 200 + starting_materials = list(MAT_GLASS = 200) w_type = RECYK_GLASS /obj/item/weapon/stock_parts/capacitor @@ -887,8 +887,7 @@ desc = "A basic capacitor used in the construction of a variety of devices." icon_state = "capacitor2_basic" origin_tech = "powerstorage=1" - m_amt = 50 - g_amt = 50 + starting_materials = list(MAT_IRON = 50, MAT_GLASS = 50) w_type = RECYK_ELECTRONIC /obj/item/weapon/stock_parts/scanning_module @@ -896,8 +895,7 @@ 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 + starting_materials = list(MAT_IRON = 50, MAT_GLASS = 20) w_type = RECYK_ELECTRONIC /obj/item/weapon/stock_parts/manipulator @@ -905,7 +903,7 @@ 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 + starting_materials = list(MAT_IRON = 30) w_type = RECYK_ELECTRONIC /obj/item/weapon/stock_parts/micro_laser @@ -913,8 +911,7 @@ desc = "A tiny laser used in certain devices." icon_state = "micro_laser" origin_tech = "magnets=1" - m_amt = 10 - g_amt = 20 + starting_materials = list(MAT_IRON = 10, MAT_GLASS = 20) w_type = RECYK_ELECTRONIC /obj/item/weapon/stock_parts/matter_bin @@ -922,7 +919,7 @@ desc = "A container for hold compressed matter awaiting re-construction." icon_state = "matter_bin" origin_tech = "materials=1" - m_amt = 80 + starting_materials = list(MAT_IRON = 80) w_type = RECYK_ELECTRONIC //Rank 2 @@ -933,8 +930,7 @@ icon_state = "capacitor2_adv" origin_tech = "powerstorage=3" rating = 2 - m_amt = 50 - g_amt = 50 + starting_materials = list(MAT_IRON = 50, MAT_GLASS = 50) /obj/item/weapon/stock_parts/scanning_module/adv name = "advanced scanning module" @@ -942,8 +938,7 @@ icon_state = "scan_module" origin_tech = "magnets=3" rating = 2 - m_amt = 50 - g_amt = 20 + starting_materials = list(MAT_IRON = 50, MAT_GLASS = 20) /obj/item/weapon/stock_parts/manipulator/nano name = "nano-manipulator" @@ -951,7 +946,7 @@ icon_state = "nano_mani" origin_tech = "materials=3;programming=2" rating = 2 - m_amt = 30 + starting_materials = list(MAT_IRON = 30) /obj/item/weapon/stock_parts/micro_laser/high name = "high-power micro-laser" @@ -959,8 +954,7 @@ icon_state = "high_micro_laser" origin_tech = "magnets=3" rating = 2 - m_amt = 10 - g_amt = 20 + starting_materials = list(MAT_IRON = 10, MAT_GLASS = 20) /obj/item/weapon/stock_parts/matter_bin/adv name = "advanced matter bin" @@ -968,7 +962,7 @@ icon_state = "advanced_matter_bin" origin_tech = "materials=3" rating = 2 - m_amt = 80 + starting_materials = list(MAT_IRON = 80) //Rating 3 @@ -978,16 +972,14 @@ icon_state = "capacitor2_super" origin_tech = "powerstorage=5;materials=4" rating = 3 - m_amt = 50 - g_amt = 50 + starting_materials = list(MAT_IRON = 50, MAT_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 + starting_materials = list(MAT_IRON = 50, MAT_GLASS = 20) /obj/item/weapon/stock_parts/manipulator/pico name = "pico-manipulator" @@ -995,7 +987,6 @@ icon_state = "pico_mani" origin_tech = "materials=5;programming=2" rating = 3 - m_amt = 30 /obj/item/weapon/stock_parts/micro_laser/ultra name = "ultra-high-power micro-laser" @@ -1003,8 +994,7 @@ desc = "A tiny laser used in certain devices." origin_tech = "magnets=5" rating = 3 - m_amt = 10 - g_amt = 20 + starting_materials = list(MAT_IRON = 10, MAT_GLASS = 20) /obj/item/weapon/stock_parts/matter_bin/super name = "super matter bin" @@ -1012,7 +1002,7 @@ icon_state = "super_matter_bin" origin_tech = "materials=5" rating = 3 - m_amt = 80 + starting_materials = list(MAT_IRON = 80) // Subspace stock parts @@ -1021,54 +1011,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 + starting_materials = list(MAT_IRON = 30, MAT_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 + starting_materials = list(MAT_IRON = 30, MAT_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 + starting_materials = list(MAT_IRON = 30, MAT_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 + starting_materials = list(MAT_IRON = 30, MAT_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 + starting_materials = list(MAT_IRON = 30, MAT_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 + starting_materials = list(MAT_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 + starting_materials = list(MAT_IRON = 50) /obj/item/weapon/ectoplasm name = "ectoplasm" diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 2405f1b41f9..65c52695b8c 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -24,6 +24,10 @@ var/global/list/ghdel_profiling = list() ///Chemistry. var/datum/reagents/reagents = null + //Material datums - the fun way of doing things in a laggy manner + var/datum/materials/materials = null + var/list/starting_materials //starting set of mats - used in New(), you can set this to an empty list to have the datum be generated but not filled + //var/chem_is_open_container = 0 // replaced by OPENCONTAINER flags and atom/proc/is_open_container() ///Chemistry. @@ -110,6 +114,10 @@ var/global/list/ghdel_profiling = list() reagents.Destroy() reagents = null + if(materials) + materials.Destroy() + returnToDPool(materials) + // Idea by ChuckTheSheep to make the object even more unreferencable. invisibility = 101 INVOKE_EVENT(on_destroyed, list()) // No args. @@ -129,6 +137,10 @@ var/global/list/ghdel_profiling = list() on_destroyed = new("owner"=src) on_moved = new("owner"=src) . = ..() + if(starting_materials) + materials = getFromDPool(/datum/materials, src) + for(var/matID in starting_materials) + materials.addAmount(matID, starting_materials[matID]) AddToProfiler() /atom/proc/assume_air(datum/gas_mixture/giver) diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm index d307e685935..6b1cdc45f14 100644 --- a/code/game/atoms_movable.dm +++ b/code/game/atoms_movable.dm @@ -1,7 +1,6 @@ /atom/movable // Recycling shit - var/m_amt = 0 // metal (CC) - var/g_amt = 0 // glass (CC) + var/w_type = NOT_RECYCLABLE // Waste category for sorters. See setup.dm layer = 3 @@ -124,6 +123,9 @@ return . /atom/movable/proc/recycle(var/datum/materials/rec) + if(materials) + rec.removeFrom(materials, 1) //the 1 zeroes our stored amounts after + return 1 return 0 // Previously known as HasEntered() diff --git a/code/game/gamemodes/nuclear/pinpointer.dm b/code/game/gamemodes/nuclear/pinpointer.dm index 79669dff320..8de26be72a4 100644 --- a/code/game/gamemodes/nuclear/pinpointer.dm +++ b/code/game/gamemodes/nuclear/pinpointer.dm @@ -9,7 +9,7 @@ item_state = "electronic" throw_speed = 4 throw_range = 20 - m_amt = 500 + starting_materials = list(MAT_IRON = 500) w_type = RECYK_ELECTRONIC melt_temperature = MELTPOINT_STEEL var/obj/item/weapon/disk/nuclear/the_disk = null diff --git a/code/game/jobs/job_objectives/science.dm b/code/game/jobs/job_objectives/science.dm index 8225522f4fa..488fb6980c1 100644 --- a/code/game/jobs/job_objectives/science.dm +++ b/code/game/jobs/job_objectives/science.dm @@ -19,7 +19,7 @@ // This was just used for testing. //world << "UNABLE TO FIND A GODDAMN RND SERVER. FUCK." return - for(var/datum/tech/T in server.files.possible_tech) + for(var/datum/tech/T in tech_list) if(T.goal_level==0) // Ignore illegal tech, etc continue var/datum/tech/KT = locate(T.type, server.files.known_tech) diff --git a/code/game/machinery/atmoalter/canister.dm b/code/game/machinery/atmoalter/canister.dm index c564ead7468..c73f57b6fa9 100644 --- a/code/game/machinery/atmoalter/canister.dm +++ b/code/game/machinery/atmoalter/canister.dm @@ -27,7 +27,7 @@ use_power = 0 var/release_log = "" var/busy = 0 - m_amt=10*CC_PER_SHEET_METAL + starting_materials = list(MAT_IRON = 10*CC_PER_SHEET_METAL) w_type = RECYK_METAL melt_temperature = MELTPOINT_STEEL diff --git a/code/game/machinery/atmoalter/gas_mine.dm b/code/game/machinery/atmoalter/gas_mine.dm index 135783d4389..c1595592205 100644 --- a/code/game/machinery/atmoalter/gas_mine.dm +++ b/code/game/machinery/atmoalter/gas_mine.dm @@ -5,7 +5,7 @@ icon_state = "miner" power_channel=ENVIRON - m_amt = 0 // fuk u + starting_materials = null w_type = NOT_RECYCLABLE var/datum/gas_mixture/air_contents diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm index 7f759da2444..2c48ab91f1c 100644 --- a/code/game/machinery/autolathe.dm +++ b/code/game/machinery/autolathe.dm @@ -1,10 +1,40 @@ -//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31 +#define AUTOLATHE_BUILD_TIME 0.5 +#define AUTOLATHE_MAX_TIME 50 //5 seconds max, * time_coeff -var/global/list/autolathe_recipes = list( \ +/obj/machinery/r_n_d/fabricator/mechanic_fab/autolathe + name = "\improper Autolathe" + desc = "Produces a large range of common items using metal and glass." + icon_state = "autolathe" + icon_state_open = "autolathe_t" + density = 1 + + design_types = list() + + use_power = 1 + idle_power_usage = 50 + active_power_usage = 500 + + build_time = AUTOLATHE_BUILD_TIME + + removable_designs = 0 + plastic_added = 0 + + allowed_materials = list( + MAT_IRON, + MAT_GLASS + ) + + machine_flags = SCREWTOGGLE | CROWDESTROY | EMAGGABLE | WRENCHMOVE | FIXED2WORK + + research_flags = NANOTOUCH | TAKESMATIN | HASOUTPUT | IGNORE_CHEMS | HASMAT_OVER + + light_color = LIGHT_COLOR_CYAN + + part_sets = list( + "Items" = list( \ new /obj/item/weapon/reagent_containers/glass/bucket(), \ new /obj/item/weapon/crowbar(), \ new /obj/item/device/flashlight(), \ - new /obj/item/weapon/storage/fancy/flares(), \ new /obj/item/weapon/extinguisher(), \ new /obj/item/device/multitool(), \ new /obj/item/device/analyzer(), \ @@ -21,7 +51,7 @@ var/global/list/autolathe_recipes = list( \ new /obj/item/weapon/stock_parts/manipulator(), \ new /obj/item/weapon/stock_parts/micro_laser(), \ new /obj/item/weapon/stock_parts/matter_bin(), \ - getFromPool(/obj/item/stack/sheet/metal,null), \ + new /obj/item/stack/sheet/metal(), \ new /obj/item/stack/sheet/glass/glass(), \ new /obj/item/stack/sheet/glass/rglass(), \ new /obj/item/stack/rods(), \ @@ -60,9 +90,8 @@ var/global/list/autolathe_recipes = list( \ new /obj/item/weapon/camera_assembly(), \ new /obj/item/weapon/chisel(), \ new /obj/item/weapon/tile_painter(), \ - ) - -var/global/list/autolathe_recipes_hidden = list( \ + ), + "Hidden Items" = list( new /obj/item/weapon/flamethrower/full(), \ new /obj/item/ammo_storage/box/flare(), \ new /obj/item/weapon/rcd(), \ @@ -75,317 +104,10 @@ var/global/list/autolathe_recipes_hidden = list( \ 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" - desc = "Produces a large range of common items using metal and glass." - icon_state = "autolathe" - icon_state_open = "autolathe_t" - density = 1 - - var/m_amount = 0.0 - var/max_m_amount = 150000.0 - - var/g_amount = 0.0 - var/max_g_amount = 75000.0 - - var/operating = 0.0 - anchored = 1.0 - var/list/L = list() - var/list/LL = list() - var/hacked = 0 - var/disabled = 0 - var/shocked = 0 - var/list/wires = list() - var/hack_wire - var/disable_wire - var/shock_wire - use_power = 1 - idle_power_usage = 50 - active_power_usage = 500 - var/busy = 0 - var/build_delay = 30 //Partial - var/time_coeff = 1 //Upgraded via part upgrading - var/resource_store_coeff = 1 - - machine_flags = SCREWTOGGLE | CROWDESTROY | EMAGGABLE | WRENCHMOVE | FIXED2WORK - - light_color = LIGHT_COLOR_CYAN - -/obj/machinery/autolathe/power_change() - ..() - if(!(stat & (BROKEN|NOPOWER))) - set_light(2) - else - set_light(0) - -/obj/machinery/autolathe/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
") - 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") - -/obj/machinery/autolathe/proc/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 < t.m_amt || g_amount < t.g_amt) - dat += title + "
" - 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") - -/obj/machinery/autolathe/interact(mob/user as mob) - if(..()) - return - if(src.shocked) - src.shock(user,50) - if(panel_open) - wires_win(user,50) - return - if(src.disabled) - user << "You press the button, but nothing happens." - return - regular_win(user) - return - -/obj/machinery/autolathe/attackby(var/obj/item/O as obj, var/mob/user as mob) - if(busy) - user << "\The [src] is busy. Please wait for the completion of previous operation." - return 1 - if(..()) //this has to be above the stat check, because it doesn't require power - return 1 - if(stat & (BROKEN|NOPOWER)) - return 1 - if(isrobot(user)) - if(!isMoMMI(user)) - user << "\The [src] refuses your inbuilt module." - return 1 - else - var/mob/living/silicon/robot/mommi/M = user - if(M.is_in_modules(O, permit_sheets=1)) - user << "\The [src] refuses your inbuilt module." - return 1 - if (src.m_amount + O.m_amt > max_m_amount) - user << "\The [src] is full. Please remove metal from \the [src] in order to insert more." - return 1 - if (src.g_amount + O.g_amt > max_g_amount) - user << "\The [src] is full. Please remove glass from \the [src] in order to insert more." - return 1 - if (O.m_amt == 0 && O.g_amt == 0) - user << "This object does not contain significant amounts of metal or glass, or cannot be accepted by \the [src] 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/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) - else - usr.before_take_item(O) - O.loc = src - icon_state = "autolathe" - 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 [src]." - if (O && O.loc == src) - qdel(O) - busy = 0 - src.updateUsrDialog() - return 1 // SO WE DONT GET AFTERATTACK CALLED - -/obj/machinery/autolathe/crowbarDestroy(mob/user) - if(..() == 1) - if(m_amount >= 3750) - var/obj/item/stack/sheet/metal/G = getFromPool(/obj/item/stack/sheet/metal, get_turf(src)) - G.amount = round(m_amount / 3750) - if(g_amount >= 3750) - var/obj/item/stack/sheet/glass/glass/G = new /obj/item/stack/sheet/glass/glass(src.loc) - G.amount = round(g_amount / 3750) - return 1 - return -1 - -/obj/machinery/autolathe/attack_paw(mob/user as mob) - return src.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) - 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"]) - - 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(15) - use_power(power) - spawn(round(build_delay/time_coeff)) - use_power(power) - spawn(round(build_delay/time_coeff)) - 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 - if(istype(template, /obj/item/stack/sheet/metal)) - new_item = getFromPool(/obj/item/stack/sheet/metal, T) - else 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 && !emagged) - 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 && !emagged) - 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 << "\The [src] is busy. Please wait for the completion of previous operation." - src.updateUsrDialog() - return - -/obj/machinery/autolathe/emag(mob/user) - if(!hacked && !emagged) - playsound(get_turf(src), 'sound/effects/sparks4.ogg', 75, 1) - emagged = 1 - hacked = emagged - -/obj/machinery/autolathe/RefreshParts() - ..() - var/T = 0 - for(var/obj/item/weapon/stock_parts/matter_bin/MB in component_parts) - T += MB.rating - resource_store_coeff = T/2 - max_m_amount = 150000.0 * resource_store_coeff - max_g_amount = 75000.0 * resource_store_coeff - T = 0 - for(var/obj/item/weapon/stock_parts/manipulator/MA in component_parts) - T += MA.rating - time_coeff = T - T = 0 - - -/obj/machinery/autolathe/New() +/obj/machinery/r_n_d/fabricator/mechanic_fab/autolathe/New() . = ..() component_parts = newlist( @@ -399,22 +121,29 @@ var/global/list/autolathe_recipes_hidden = list( \ RefreshParts() - 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 +/obj/machinery/r_n_d/fabricator/mechanic_fab/autolathe/get_construction_time_w_coeff(datum/design/part) + return min(..(), (AUTOLATHE_MAX_TIME * time_coeff)) //we have set designs, so we can make them quickly + +/obj/machinery/r_n_d/fabricator/mechanic_fab/autolathe/update_hacked() + if(hacked) + part_sets["Items"] |= part_sets["Hidden Items"] + else + part_sets["Items"] -= part_sets["Hidden Items"] + +/obj/machinery/r_n_d/fabricator/mechanic_fab/autolathe/attackby(obj/item/I, mob/user) + if(..()) + return 1 + + else if(I.materials) + if(I.materials.getVolume() + src.materials.getVolume() > max_material_storage) + user << "\The [src]'s material bin is too full to recycle \the [I]." + return 1 + if(I.materials.getAmount(MAT_IRON) + I.materials.getAmount(MAT_GLASS) < I.materials.getVolume()) + user << "\The [src] can only accept objects made out of metal and glass." + return 1 + user.drop_item(I, src) + materials.removeFrom(I.materials) + user.visible_message("[user] puts \the [I] into \the [src]'s recycling unit.", + "You put \the [I] in \the [src]'s reycling unit.") + qdel(I) + return 1 diff --git a/code/game/machinery/autolathe_old.dm b/code/game/machinery/autolathe_old.dm new file mode 100644 index 00000000000..3654d877e73 --- /dev/null +++ b/code/game/machinery/autolathe_old.dm @@ -0,0 +1,420 @@ +//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31 + +var/global/list/autolathe_recipes = list( \ + new /obj/item/weapon/reagent_containers/glass/bucket(), \ + new /obj/item/weapon/crowbar(), \ + new /obj/item/device/flashlight(), \ + new /obj/item/weapon/storage/fancy/flares(), \ + new /obj/item/weapon/extinguisher(), \ + new /obj/item/device/multitool(), \ + new /obj/item/device/analyzer(), \ + 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/weapon/solder(),\ + new /obj/item/clothing/head/welding(), \ + new /obj/item/weapon/stock_parts/console_screen(), \ + new /obj/item/weapon/stock_parts/capacitor(), \ + new /obj/item/weapon/stock_parts/scanning_module(), \ + new /obj/item/weapon/stock_parts/manipulator(), \ + new /obj/item/weapon/stock_parts/micro_laser(), \ + new /obj/item/weapon/stock_parts/matter_bin(), \ + getFromPool(/obj/item/stack/sheet/metal,null), \ + new /obj/item/stack/sheet/glass/glass(), \ + new /obj/item/stack/sheet/glass/rglass(), \ + new /obj/item/stack/rods(), \ + new /obj/item/weapon/rcd_ammo(), \ + new /obj/item/weapon/kitchen/utensil/knife/large(), \ + 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/storage/pill_bottle(),\ + 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_casing/shotgun/flare(), \ + new /obj/item/ammo_storage/speedloader/c38/empty(), \ + new /obj/item/ammo_storage/box/c38(), \ + new /obj/item/device/taperecorder(), \ + new /obj/item/weapon/storage/pill_bottle/dice(),\ + 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/voice(), \ + new /obj/item/device/assembly/prox_sensor(), \ + new /obj/item/device/assembly/speaker(), \ + new /obj/item/weapon/light/tube(), \ + new /obj/item/weapon/light/bulb(), \ + new /obj/item/ashtray/glass(), \ + new /obj/item/weapon/camera_assembly(), \ + new /obj/item/weapon/chisel(), \ + new /obj/item/weapon/tile_painter(), \ + ) + +var/global/list/autolathe_recipes_hidden = list( \ + new /obj/item/weapon/flamethrower/full(), \ + new /obj/item/ammo_storage/box/flare(), \ + new /obj/item/weapon/rcd(), \ + new /obj/item/weapon/pipe_dispenser(),\ + new /obj/item/weapon/rsf(), \ + new /obj/item/device/radio/electropack(), \ + new /obj/item/weapon/weldingtool/largetank(), \ + new /obj/item/weapon/handcuffs(), \ + new /obj/item/ammo_storage/box/a357(), \ + 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" + desc = "Produces a large range of common items using metal and glass." + icon_state = "autolathe" + icon_state_open = "autolathe_t" + density = 1 + + var/m_amount = 0.0 + var/max_m_amount = 150000.0 + + var/g_amount = 0.0 + var/max_g_amount = 75000.0 + + var/operating = 0.0 + anchored = 1.0 + var/list/L = list() + var/list/LL = list() + var/hacked = 0 + var/disabled = 0 + var/shocked = 0 + var/list/wires = list() + var/hack_wire + var/disable_wire + var/shock_wire + use_power = 1 + idle_power_usage = 50 + active_power_usage = 500 + var/busy = 0 + var/build_delay = 30 //Partial + var/time_coeff = 1 //Upgraded via part upgrading + var/resource_store_coeff = 1 + + machine_flags = SCREWTOGGLE | CROWDESTROY | EMAGGABLE | WRENCHMOVE | FIXED2WORK + + l_color = "#7BF9FF" + +/obj/machinery/autolathe/power_change() + ..() + if(!(stat & (BROKEN|NOPOWER))) + SetLuminosity(2) + else + SetLuminosity(0) + +/obj/machinery/autolathe/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
") + 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") + +/obj/machinery/autolathe/proc/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 < t.m_amt || g_amount < t.g_amt) + dat += title + "
" + 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") + +/obj/machinery/autolathe/interact(mob/user as mob) + if(..()) + return + if(src.shocked) + src.shock(user,50) + if(panel_open) + wires_win(user,50) + return + if(src.disabled) + user << "You press the button, but nothing happens." + return + regular_win(user) + return + +/obj/machinery/autolathe/attackby(var/obj/item/O as obj, var/mob/user as mob) + if(busy) + user << "\The [src] is busy. Please wait for the completion of previous operation." + return 1 + if(..()) //this has to be above the stat check, because it doesn't require power + return 1 + if(stat & (BROKEN|NOPOWER)) + return 1 + if(isrobot(user)) + if(!isMoMMI(user)) + user << "\The [src] refuses your inbuilt module." + return 1 + else + var/mob/living/silicon/robot/mommi/M = user + if(M.is_in_modules(O, permit_sheets=1)) + user << "\The [src] refuses your inbuilt module." + return 1 + if (src.m_amount + O.m_amt > max_m_amount) + user << "\The [src] is full. Please remove metal from \the [src] in order to insert more." + return 1 + if (src.g_amount + O.g_amt > max_g_amount) + user << "\The [src] is full. Please remove glass from \the [src] in order to insert more." + return 1 + if (O.m_amt == 0 && O.g_amt == 0) + user << "This object does not contain significant amounts of metal or glass, or cannot be accepted by \the [src] 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/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) + else + usr.before_take_item(O) + O.loc = src + icon_state = "autolathe" + 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 [src]." + if (O && O.loc == src) + qdel(O) + busy = 0 + src.updateUsrDialog() + return 1 // SO WE DONT GET AFTERATTACK CALLED + +/obj/machinery/autolathe/crowbarDestroy(mob/user) + if(..() == 1) + if(m_amount >= 3750) + var/obj/item/stack/sheet/metal/G = getFromPool(/obj/item/stack/sheet/metal, get_turf(src)) + G.amount = round(m_amount / 3750) + if(g_amount >= 3750) + var/obj/item/stack/sheet/glass/glass/G = new /obj/item/stack/sheet/glass/glass(src.loc) + G.amount = round(g_amount / 3750) + return 1 + return -1 + +/obj/machinery/autolathe/attack_paw(mob/user as mob) + return src.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) + 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"]) + + 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(15) + use_power(power) + spawn(round(build_delay/time_coeff)) + use_power(power) + spawn(round(build_delay/time_coeff)) + 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 + if(istype(template, /obj/item/stack/sheet/metal)) + new_item = getFromPool(/obj/item/stack/sheet/metal, T) + else 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 && !emagged) + 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 && !emagged) + 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 << "\The [src] is busy. Please wait for the completion of previous operation." + src.updateUsrDialog() + return + +/obj/machinery/autolathe/emag(mob/user) + if(!hacked && !emagged) + playsound(get_turf(src), 'sound/effects/sparks4.ogg', 75, 1) + emagged = 1 + hacked = emagged + +/obj/machinery/autolathe/RefreshParts() + ..() + var/T = 0 + for(var/obj/item/weapon/stock_parts/matter_bin/MB in component_parts) + T += MB.rating + resource_store_coeff = T/2 + max_m_amount = 150000.0 * resource_store_coeff + max_g_amount = 75000.0 * resource_store_coeff + T = 0 + for(var/obj/item/weapon/stock_parts/manipulator/MA in component_parts) + T += MA.rating + time_coeff = T + T = 0 + + +/obj/machinery/autolathe/New() + . = ..() + + component_parts = newlist( + /obj/item/weapon/circuitboard/autolathe, + /obj/item/weapon/stock_parts/matter_bin, + /obj/item/weapon/stock_parts/matter_bin, + /obj/item/weapon/stock_parts/matter_bin, + /obj/item/weapon/stock_parts/manipulator, + /obj/item/weapon/stock_parts/console_screen + ) + + RefreshParts() + + 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 diff --git a/code/game/machinery/camera/camera_assembly.dm b/code/game/machinery/camera/camera_assembly.dm index 94c744b169f..bcb6ee74cf9 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 + starting_materials = list(MAT_IRON = 700, MAT_GLASS = 300) w_type = RECYK_ELECTRONIC melt_temperature = MELTPOINT_STEEL diff --git a/code/game/machinery/computer/buildandrepair.dm b/code/game/machinery/computer/buildandrepair.dm index b1fed6fe222..85f5468f46f 100644 --- a/code/game/machinery/computer/buildandrepair.dm +++ b/code/game/machinery/computer/buildandrepair.dm @@ -19,7 +19,7 @@ icon_state = "id_mod" item_state = "circuitboard" origin_tech = "programming=2" - g_amt=2000 // Recycle glass only + starting_materials = list(MAT_GLASS = 2000) // Recycle glass only w_type = RECYK_ELECTRONIC var/id_tag = null diff --git a/code/game/machinery/constructable_frame.dm b/code/game/machinery/constructable_frame.dm index 193dcabeb41..f013b36590d 100644 --- a/code/game/machinery/constructable_frame.dm +++ b/code/game/machinery/constructable_frame.dm @@ -249,7 +249,7 @@ to destroy them and players will be able to make replacements. /obj/item/weapon/circuitboard/autolathe name = "Circuit board (Autolathe)" - build_path = "/obj/machinery/autolathe" + build_path = "/obj/machinery/r_n_d/fabricator/mechanic_fab/autolathe" board_type = "machine" origin_tech = "engineering=2;programming=2" frame_desc = "Requires 3 Matter Bins, 1 Manipulator, and 1 Console Screen." diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index dfb3056d46c..7c025f47114 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -641,7 +641,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.materials && (i.materials.getAmount(MAT_IRON) > 0)) 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 0097b76c08f..639050b60a5 100644 --- a/code/game/machinery/doors/airlock_electronics.dm +++ b/code/game/machinery/doors/airlock_electronics.dm @@ -5,8 +5,7 @@ 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 + starting_materials = list(MAT_IRON = 50, MAT_GLASS = 50) w_type = RECYK_ELECTRONIC melt_temperature = MELTPOINT_SILICON diff --git a/code/game/mecha/mecha_designs.dm b/code/game/mecha/mecha_designs.dm index 68ed9ed3e5d..cf2a0862757 100644 --- a/code/game/mecha/mecha_designs.dm +++ b/code/game/mecha/mecha_designs.dm @@ -16,7 +16,7 @@ build_type = MECHFAB build_path = /obj/item/mecha_parts/chassis/ripley category = "Ripley" - materials = list("$iron"=20000) + materials = list(MAT_IRON=20000) /datum/design/ripley/torso name = "Exosuit Structure (Ripley torso)" @@ -26,7 +26,7 @@ build_type = MECHFAB build_path = /obj/item/mecha_parts/part/ripley_torso category = "Ripley" - materials = list("$iron"=40000,"$glass"=15000) + materials = list(MAT_IRON=40000,MAT_GLASS=15000) /datum/design/ripley/l_arm name = "Exosuit Structure (Ripley left arm)" @@ -36,7 +36,7 @@ build_type = MECHFAB build_path = /obj/item/mecha_parts/part/ripley_left_arm category = "Ripley" - materials = list("$iron"=25000) + materials = list(MAT_IRON=25000) /datum/design/ripley/r_arm name = "Exosuit Structure (Ripley right arm)" @@ -46,7 +46,7 @@ build_type = MECHFAB build_path = /obj/item/mecha_parts/part/ripley_right_arm category = "Ripley" - materials = list("$iron"=25000) + materials = list(MAT_IRON=25000) /datum/design/ripley/l_leg name = "Exosuit Structure (Ripley left leg)" @@ -56,7 +56,7 @@ build_type = MECHFAB build_path = /obj/item/mecha_parts/part/ripley_left_leg category = "Ripley" - materials = list("$iron"=30000) + materials = list(MAT_IRON=30000) /datum/design/ripley/r_leg name = "Exosuit Structure (Ripley right leg)" @@ -66,7 +66,7 @@ build_type = MECHFAB build_path = /obj/item/mecha_parts/part/ripley_right_leg category = "Ripley" - materials = list("$iron"=30000) + materials = list(MAT_IRON=30000) //////////////// ////ODYSSEUS//// @@ -80,7 +80,7 @@ build_type = MECHFAB build_path = /obj/item/mecha_parts/chassis/odysseus category = "Odysseus" - materials = list("$iron"=20000) + materials = list(MAT_IRON=20000) /datum/design/odysseus/torso name = "Exosuit Structure (Odysseus torso)" @@ -90,7 +90,7 @@ build_type = MECHFAB build_path = /obj/item/mecha_parts/part/odysseus_torso category = "Odysseus" - materials = list("$iron"=25000) + materials = list(MAT_IRON=25000) /datum/design/odysseus/l_arm name = "Exosuit Structure (Odysseus left arm)" @@ -100,7 +100,7 @@ build_type = MECHFAB build_path = /obj/item/mecha_parts/part/odysseus_left_arm category = "Odysseus" - materials = list("$iron"=10000) + materials = list(MAT_IRON=10000) /datum/design/odysseus/r_arm name = "Exosuit Structure (Odysseus right arm)" @@ -110,7 +110,7 @@ build_type = MECHFAB build_path = /obj/item/mecha_parts/part/odysseus_right_arm category = "Odysseus" - materials = list("$iron"=10000) + materials = list(MAT_IRON=10000) /datum/design/odysseus/l_leg name = "Exosuit Structure (Odysseus left leg)" @@ -120,7 +120,7 @@ build_type = MECHFAB build_path = /obj/item/mecha_parts/part/odysseus_left_leg category = "Odysseus" - materials = list("$iron"=15000) + materials = list(MAT_IRON=15000) /datum/design/odysseus/r_leg name = "Exosuit Structure (Odysseus right leg)" @@ -130,7 +130,7 @@ build_type = MECHFAB build_path = /obj/item/mecha_parts/part/odysseus_right_leg category = "Odysseus" - materials = list("$iron"=15000) + materials = list(MAT_IRON=15000) /datum/design/odysseus/head name = "Exosuit Structure (Odysseus head)" @@ -140,7 +140,7 @@ build_type = MECHFAB build_path = /obj/item/mecha_parts/part/odysseus_head category = "Odysseus" - materials = list("$iron"=2000,"$glass"=10000) + materials = list(MAT_IRON=2000,MAT_GLASS=10000) //////////////// /////GYGAX////// @@ -153,7 +153,7 @@ build_type = MECHFAB build_path = /obj/item/mecha_parts/chassis/gygax category = "Gygax" - materials = list("$iron"=25000) + materials = list(MAT_IRON=25000) /datum/design/gygax/torso name = "Exosuit Structure (Gygax torso)" @@ -163,7 +163,7 @@ build_type = MECHFAB build_path = /obj/item/mecha_parts/part/gygax_torso category = "Gygax" - materials = list("$iron"=50000,"$glass"=20000) + materials = list(MAT_IRON=50000,MAT_GLASS=20000) /datum/design/gygax/l_arm name = "Exosuit Structure (Gygax left arm)" @@ -173,7 +173,7 @@ build_type = MECHFAB build_path = /obj/item/mecha_parts/part/gygax_left_arm category = "Gygax" - materials = list("$iron"=30000) + materials = list(MAT_IRON=30000) /datum/design/gygax/r_arm name = "Exosuit Structure (Gygax right arm)" @@ -183,7 +183,7 @@ build_type = MECHFAB build_path = /obj/item/mecha_parts/part/gygax_right_arm category = "Gygax" - materials = list("$iron"=30000) + materials = list(MAT_IRON=30000) /datum/design/gygax/l_leg name = "Exosuit Structure (Gygax left leg)" @@ -193,7 +193,7 @@ build_type = MECHFAB build_path = /obj/item/mecha_parts/part/gygax_left_leg category = "Gygax" - materials = list("$iron"=35000) + materials = list(MAT_IRON=35000) /datum/design/gygax/r_leg name = "Exosuit Structure (Gygax right leg)" @@ -203,7 +203,7 @@ build_type = MECHFAB build_path = /obj/item/mecha_parts/part/gygax_right_leg category = "Gygax" - materials = list("$iron"=35000) + materials = list(MAT_IRON=35000) /datum/design/gygax/head name = "Exosuit Structure (Gygax head)" @@ -213,7 +213,7 @@ build_type = MECHFAB build_path = /obj/item/mecha_parts/part/gygax_head category = "Gygax" - materials = list("$iron"=20000,"$glass"=10000) + materials = list(MAT_IRON=20000,MAT_GLASS=10000) /datum/design/gygax/armor name = "Exosuit Structure (Gygax plates)" @@ -223,7 +223,7 @@ build_type = MECHFAB build_path = /obj/item/mecha_parts/part/gygax_armour category = "Gygax" - materials = list("$iron"=50000,"$diamond"=10000) + materials = list(MAT_IRON=50000,MAT_DIAMOND=10000) /////////////// ////DURAND///// @@ -237,7 +237,7 @@ build_type = MECHFAB build_path = /obj/item/mecha_parts/chassis/durand category = "Durand" - materials = list("$iron"=25000) + materials = list(MAT_IRON=25000) /datum/design/durand/torso name = "Exosuit Structure (Durand torso)" @@ -247,7 +247,7 @@ build_type = MECHFAB build_path = /obj/item/mecha_parts/part/durand_torso category = "Durand" - materials = list("$iron"=55000,"$glass"=20000,"$silver"=10000) + materials = list(MAT_IRON=55000,MAT_GLASS=20000,MAT_SILVER=10000) /datum/design/durand/l_arm name = "Exosuit Structure (Durand left arm)" @@ -257,7 +257,7 @@ build_type = MECHFAB build_path = /obj/item/mecha_parts/part/durand_left_arm category = "Durand" - materials = list("$iron"=35000,"$silver"=3000) + materials = list(MAT_IRON=35000,MAT_SILVER=3000) /datum/design/durand/r_arm name = "Exosuit Structure (Durand right arm)" @@ -267,7 +267,7 @@ build_type = MECHFAB build_path = /obj/item/mecha_parts/part/durand_right_arm category = "Durand" - materials = list("$iron"=35000,"$silver"=3000) + materials = list(MAT_IRON=35000,MAT_SILVER=3000) /datum/design/durand/l_leg name = "Exosuit Structure (Durand left leg)" @@ -277,7 +277,7 @@ build_type = MECHFAB build_path = /obj/item/mecha_parts/part/durand_left_leg category = "Durand" - materials = list("$iron"=40000,"$silver"=3000) + materials = list(MAT_IRON=40000,MAT_SILVER=3000) /datum/design/durand/r_leg name = "Exosuit Structure (Durand right leg)" @@ -287,7 +287,7 @@ build_type = MECHFAB build_path = /obj/item/mecha_parts/part/durand_right_leg category = "Durand" - materials = list("$iron"=40000,"$silver"=3000) + materials = list(MAT_IRON=40000,MAT_SILVER=3000) /datum/design/durand/head name = "Exosuit Structure (Durand head)" @@ -297,7 +297,7 @@ build_type = MECHFAB build_path = /obj/item/mecha_parts/part/durand_head category = "Durand" - materials = list("$iron"=25000,"$glass"=10000,"$silver"=3000) + materials = list(MAT_IRON=25000,MAT_GLASS=10000,MAT_SILVER=3000) /datum/design/durand/armor name = "Exosuit Structure (Durand plates)" @@ -307,7 +307,7 @@ build_type = MECHFAB build_path = /obj/item/mecha_parts/part/durand_armour category = "Durand" - materials = list("$iron"=50000,"$uranium"=10000) + materials = list(MAT_IRON=50000,MAT_URANIUM=10000) //////////////// ////HONK//////// @@ -320,7 +320,7 @@ build_type = MECHFAB build_path = /obj/item/mecha_parts/chassis/honker category = "HONK" - materials = list("$iron"=20000) + materials = list(MAT_IRON=20000) /datum/design/honker/torso name = "Exosuit Structure (H.O.N.K. torso)" @@ -330,7 +330,7 @@ build_type = MECHFAB build_path = /obj/item/mecha_parts/part/honker_torso category = "HONK" - materials = list("$iron"=35000,"$glass"=10000,"$clown"=10000) + materials = list(MAT_IRON=35000,MAT_GLASS=10000,MAT_CLOWN=10000) /datum/design/honker/l_arm name = "Exosuit Structure (H.O.N.K. left arm)" @@ -340,7 +340,7 @@ build_type = MECHFAB build_path = /obj/item/mecha_parts/part/honker_left_arm category = "HONK" - materials = list("$iron"=20000,"$clown"=5000) + materials = list(MAT_IRON=20000,MAT_CLOWN=5000) /datum/design/honker/r_arm name = "Exosuit Structure (H.O.N.K. right arm)" @@ -350,7 +350,7 @@ build_type = MECHFAB build_path = /obj/item/mecha_parts/part/honker_right_arm category = "HONK" - materials = list("$iron"=20000,"$clown"=5000) + materials = list(MAT_IRON=20000,MAT_CLOWN=5000) /datum/design/honker/l_leg name = "Exosuit Structure (H.O.N.K. left leg)" @@ -360,7 +360,7 @@ build_type = MECHFAB build_path = /obj/item/mecha_parts/part/honker_left_leg category = "HONK" - materials = list("$iron"=20000,"$clown"=5000) + materials = list(MAT_IRON=20000,MAT_CLOWN=5000) /datum/design/honker/r_leg name = "Exosuit Structure (H.O.N.K. right leg)" @@ -370,7 +370,7 @@ build_type = MECHFAB build_path = /obj/item/mecha_parts/part/honker_right_leg category = "HONK" - materials = list("$iron"=20000,"$clown"=5000) + materials = list(MAT_IRON=20000,MAT_CLOWN=5000) /datum/design/honker/head name = "Exosuit Structure (H.O.N.K. head)" @@ -380,7 +380,7 @@ build_type = MECHFAB build_path = /obj/item/mecha_parts/part/honker_head category = "HONK" - materials = list("$iron"=15000,"$glass"=5000,"$clown"=5000) + materials = list(MAT_IRON=15000,MAT_GLASS=5000,MAT_CLOWN=5000) ////////////// /////PHAZON/// @@ -394,7 +394,7 @@ build_type = MECHFAB build_path = /obj/item/mecha_parts/chassis/phazon category = "Phazon" - materials = list("$iron"=25000) + materials = list(MAT_IRON=25000) /datum/design/phazon/torso name = "Exosuit Structure (Phazon torso)" @@ -404,7 +404,7 @@ build_type = MECHFAB build_path = /obj/item/mecha_parts/part/phazon_torso category = "Phazon" - materials = list("$iron"=35000,"$glass"=10000,"$plasma"=20000, "$phazon"=5000) + materials = list(MAT_IRON=35000,MAT_GLASS=10000,MAT_PLASMA=20000, MAT_PHAZON=5000) /datum/design/phazon/l_arm name = "Exosuit Structure (Phazon left arm)" @@ -414,7 +414,7 @@ build_type = MECHFAB build_path = /obj/item/mecha_parts/part/phazon_left_arm category = "Phazon" - materials = list("$iron"=20000,"$plasma"=10000, "$phazon"=2500) + materials = list(MAT_IRON=20000,MAT_PLASMA=10000, MAT_PHAZON=2500) /datum/design/phazon/r_arm name = "Exosuit Structure (Phazon right arm)" @@ -424,7 +424,7 @@ build_type = MECHFAB build_path = /obj/item/mecha_parts/part/phazon_right_arm category = "Phazon" - materials = list("$iron"=20000,"$plasma"=10000, "$phazon"=2500) + materials = list(MAT_IRON=20000,MAT_PLASMA=10000, MAT_PHAZON=2500) /datum/design/phazon/l_leg name = "Exosuit Structure (Phazon left leg)" @@ -434,7 +434,7 @@ build_type = MECHFAB build_path = /obj/item/mecha_parts/part/phazon_left_leg category = "Phazon" - materials = list("$iron"=20000,"$plasma"=10000, "$phazon"=2500) + materials = list(MAT_IRON=20000,MAT_PLASMA=10000, MAT_PHAZON=2500) /datum/design/phazon/r_leg name = "Exosuit Structure (Phazon right leg)" @@ -444,7 +444,7 @@ build_type = MECHFAB build_path = /obj/item/mecha_parts/part/phazon_right_leg category = "Phazon" - materials = list("$iron"=20000,"$plasma"=10000, "$phazon"=2500) + materials = list(MAT_IRON=20000,MAT_PLASMA=10000, MAT_PHAZON=2500) /datum/design/phazon/head name = "Exosuit Structure (Phazon head)" @@ -454,4 +454,4 @@ build_type = MECHFAB build_path = /obj/item/mecha_parts/part/phazon_head category = "Phazon" - materials = list("$iron"=15000,"$glass"=5000,"$plasma"=10000, "$phazon"=2500) \ No newline at end of file + materials = list(MAT_IRON=15000,MAT_GLASS=5000,MAT_PLASMA=10000, MAT_PHAZON=2500) \ No newline at end of file diff --git a/code/game/mecha/mecha_parts.dm b/code/game/mecha/mecha_parts.dm index f08d9ae37d4..47bb637298b 100644 --- a/code/game/mecha/mecha_parts.dm +++ b/code/game/mecha/mecha_parts.dm @@ -320,7 +320,7 @@ icon_state = "odysseus_armour" origin_tech = "materials=3;engineering=3" construction_time = 200 - materials = list("$iron"=15000)*/ + materials = list(MAT_IRON=15000)*/ ///////// Circuitboards diff --git a/code/game/objects/effects/decals/slag.dm b/code/game/objects/effects/decals/slag.dm index f04b7f5c3ff..abdac77ebac 100644 --- a/code/game/objects/effects/decals/slag.dm +++ b/code/game/objects/effects/decals/slag.dm @@ -8,11 +8,11 @@ melt_temperature=0 light_color = LIGHT_COLOR_ORANGE - var/datum/materials/mats=new + starting_materials = list() /obj/effect/decal/slag/proc/slaggify(var/obj/O) // This is basically a crude recycler doohicky - if (O.recycle(mats)) + if (O.recycle(materials)) if(melt_temperature==0) // Set up our solidification temperature. melt_temperature=O.melt_temperature @@ -50,9 +50,9 @@ user << "Jesus, it's hot!" var/list/bits=list() - for(var/mat_id in mats.storage) - var/datum/material/mat=mats.getMaterial(mat_id) - if(mat.stored > 0) + for(var/mat_id in materials.storage) + var/datum/material/mat=materials.getMaterial(mat_id) + if(materials.storage[mat_id] > 0) bits.Add(mat.processed_name) if(bits.len>0) @@ -94,7 +94,8 @@ "You break apart \the [src] with your [W.name]!", \ "You hear the sound of rock crumbling.") var/obj/item/weapon/ore/slag/slag = new /obj/item/weapon/ore/slag(loc) - slag.mats = src.mats + slag.materials = src.materials + slag.materials.holder = slag qdel(src) else user.visible_message("[user.name] hits \the [src] with his [W.name].", \ diff --git a/code/game/objects/items/devices/codebreaker.dm b/code/game/objects/items/devices/codebreaker.dm index cbe738a6253..951e61dd62c 100644 --- a/code/game/objects/items/devices/codebreaker.dm +++ b/code/game/objects/items/devices/codebreaker.dm @@ -10,8 +10,7 @@ throwforce = 5.0 throw_range = 15 throw_speed = 3 - m_amt = 50 - g_amt = 20 + starting_materials = list(MAT_IRON = 50, MAT_GLASS = 20) w_type = RECYK_ELECTRONIC melt_temperature = MELTPOINT_SILICON origin_tech = "magnets=3;programming=6;syndicate=7" diff --git a/code/game/objects/items/devices/debugger.dm b/code/game/objects/items/devices/debugger.dm index 8d480a52852..c83d5dc975f 100644 --- a/code/game/objects/items/devices/debugger.dm +++ b/code/game/objects/items/devices/debugger.dm @@ -17,8 +17,7 @@ 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 + starting_materials = list(MAT_IRON = 50, MAT_GLASS = 20) w_type = RECYK_ELECTRONIC melt_temperature = MELTPOINT_SILICON origin_tech = "magnets=1;engineering=1" diff --git a/code/game/objects/items/devices/deskbell.dm b/code/game/objects/items/devices/deskbell.dm index 5c408f8b6fd..f7e48a14648 100644 --- a/code/game/objects/items/devices/deskbell.dm +++ b/code/game/objects/items/devices/deskbell.dm @@ -13,7 +13,7 @@ siemens_coefficient = 1 attack_verb = list("rang") hitsound = 'sound/machines/ding2.ogg' - m_amt = 3750 + starting_materials = list(MAT_IRON = 3750) w_type = RECYK_METAL melt_temperature=MELTPOINT_STEEL anchored = 1 @@ -238,7 +238,7 @@ throw_range = 10 flags = FPRINT siemens_coefficient = 1 - m_amt = 3750 + starting_materials = list(MAT_IRON = 3750) w_type = RECYK_METAL melt_temperature=MELTPOINT_STEEL diff --git a/code/game/objects/items/devices/flashlight.dm b/code/game/objects/items/devices/flashlight.dm index 00e7ccdaa46..96b97299aa1 100644 --- a/code/game/objects/items/devices/flashlight.dm +++ b/code/game/objects/items/devices/flashlight.dm @@ -8,8 +8,7 @@ flags = FPRINT siemens_coefficient = 1 slot_flags = SLOT_BELT - m_amt = 50 - g_amt = 20 + starting_materials = list(MAT_IRON = 50, MAT_GLASS = 20) w_type = RECYK_ELECTRONIC melt_temperature = MELTPOINT_STEEL // Assuming big beefy fucking maglite. action_button_name = "Toggle Light" @@ -106,8 +105,7 @@ w_class = 4 flags = FPRINT siemens_coefficient = 1 - m_amt = 0 - g_amt = 0 + starting_materials = null on = 1 /obj/item/device/flashlight/lamp/cultify() diff --git a/code/game/objects/items/devices/multitool.dm b/code/game/objects/items/devices/multitool.dm index a159eb57cdf..7af33153cf1 100644 --- a/code/game/objects/items/devices/multitool.dm +++ b/code/game/objects/items/devices/multitool.dm @@ -19,8 +19,7 @@ throwforce = 5.0 throw_range = 15 throw_speed = 3 - m_amt = 50 - g_amt = 20 + starting_materials = list(MAT_IRON = 50, MAT_GLASS = 20) w_type = RECYK_ELECTRONIC melt_temperature = MELTPOINT_SILICON origin_tech = "magnets=1;engineering=1" diff --git a/code/game/objects/items/devices/powersink.dm b/code/game/objects/items/devices/powersink.dm index 3e7063fc631..f68ef5bb2e3 100644 --- a/code/game/objects/items/devices/powersink.dm +++ b/code/game/objects/items/devices/powersink.dm @@ -11,7 +11,7 @@ throwforce = 5 throw_speed = 1 throw_range = 2 - m_amt = 750 + starting_materials = list(MAT_IRON = 750) w_type = RECYK_ELECTRONIC melt_temperature = MELTPOINT_STEEL origin_tech = "powerstorage=3;syndicate=5" diff --git a/code/game/objects/items/devices/radio/electropack.dm b/code/game/objects/items/devices/radio/electropack.dm index a615d5901de..140b3b51f6c 100644 --- a/code/game/objects/items/devices/radio/electropack.dm +++ b/code/game/objects/items/devices/radio/electropack.dm @@ -8,8 +8,7 @@ siemens_coefficient = 1 slot_flags = SLOT_BACK w_class = 5.0 - g_amt = 2500 - m_amt = 10000 + starting_materials = list(MAT_IRON = 10000, MAT_GLASS = 2500) w_type = RECYK_ELECTRONIC var/code = 2 var/datum/radio_frequency/radio_connection diff --git a/code/game/objects/items/devices/radio/headset.dm b/code/game/objects/items/devices/radio/headset.dm index ec15966d1a3..593f05589e1 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 + starting_materials = list(MAT_IRON = 75) w_type = RECYK_ELECTRONIC melt_temperature = MELTPOINT_PLASTIC subspace_transmission = 1 diff --git a/code/game/objects/items/devices/radio/intercom.dm b/code/game/objects/items/devices/radio/intercom.dm index 7863bcb3190..20cafa95a0e 100644 --- a/code/game/objects/items/devices/radio/intercom.dm +++ b/code/game/objects/items/devices/radio/intercom.dm @@ -158,7 +158,6 @@ icon_state = "door_electronics" desc = "Looks like a circuit. Probably is." w_class = 2.0 - m_amt = 50 - g_amt = 50 + starting_materials = list(MAT_IRON = 50, MAT_GLASS = 50) w_type = RECYK_ELECTRONIC melt_temperature = MELTPOINT_SILICON diff --git a/code/game/objects/items/devices/radio/radio.dm b/code/game/objects/items/devices/radio/radio.dm index 9b7982ea30e..83f6843906a 100644 --- a/code/game/objects/items/devices/radio/radio.dm +++ b/code/game/objects/items/devices/radio/radio.dm @@ -28,8 +28,7 @@ throw_speed = 2 throw_range = 9 w_class = 2 - g_amt = 25 - m_amt = 75 + starting_materials = list(MAT_IRON = 75, MAT_GLASS = 25) w_type = RECYK_ELECTRONIC melt_temperature = MELTPOINT_PLASTIC diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index e8ff8356cb8..c1e289cbeef 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -17,7 +17,7 @@ REAGENT SCANNER slot_flags = SLOT_BELT w_class = 2 item_state = "electronic" - m_amt = 150 + starting_materials = list(MAT_IRON = 150) w_type = RECYK_ELECTRONIC melt_temperature = MELTPOINT_PLASTIC origin_tech = "magnets=1;engineering=1" @@ -85,8 +85,7 @@ REAGENT SCANNER throwforce = 3 w_class = 1.0 throw_speed = 5 - throw_range = 10 - m_amt = 200 + starting_materials = list(MAT_IRON = 200) w_type = RECYK_ELECTRONIC melt_temperature = MELTPOINT_PLASTIC origin_tech = "magnets=1;biotech=1" @@ -242,8 +241,7 @@ proc/healthanalyze(mob/living/M as mob, mob/living/user as mob, var/mode = 0) throwforce = 5 throw_speed = 4 throw_range = 20 - m_amt = 30 - g_amt = 20 + starting_materials = list(MAT_IRON = 30, MAT_GLASS = 20) w_type = RECYK_ELECTRONIC melt_temperature = MELTPOINT_PLASTIC origin_tech = "magnets=1;engineering=1" @@ -315,8 +313,7 @@ proc/healthanalyze(mob/living/M as mob, mob/living/user as mob, var/mode = 0) throwforce = 5 throw_speed = 4 throw_range = 20 - m_amt = 30 - g_amt = 20 + starting_materials = list(MAT_IRON = 30, MAT_GLASS = 20) w_type = RECYK_ELECTRONIC origin_tech = "magnets=2;biotech=2" var/details = 0 @@ -421,8 +418,7 @@ proc/healthanalyze(mob/living/M as mob, mob/living/user as mob, var/mode = 0) throwforce = 5 throw_speed = 4 throw_range = 20 - m_amt = 30 - g_amt = 20 + starting_materials = list(MAT_IRON = 30, MAT_GLASS = 20) w_type = RECYK_ELECTRONIC origin_tech = "magnets=2;biotech=2" var/details = 0 diff --git a/code/game/objects/items/devices/taperecorder.dm b/code/game/objects/items/devices/taperecorder.dm index 9068c553ae9..0211be6e79b 100644 --- a/code/game/objects/items/devices/taperecorder.dm +++ b/code/game/objects/items/devices/taperecorder.dm @@ -4,8 +4,7 @@ icon_state = "taperecorderidle" item_state = "analyzer" w_class = 1.0 - m_amt = 60 - g_amt = 30 + starting_materials = list(MAT_IRON = 60, MAT_GLASS = 30) w_type = RECYK_ELECTRONIC melt_temperature = MELTPOINT_PLASTIC var/emagged = 0.0 diff --git a/code/game/objects/items/mountable_frames/air_alarm.dm b/code/game/objects/items/mountable_frames/air_alarm.dm index 6e0aaa71746..f0a055fdc22 100644 --- a/code/game/objects/items/mountable_frames/air_alarm.dm +++ b/code/game/objects/items/mountable_frames/air_alarm.dm @@ -9,7 +9,7 @@ Code shamelessly copied from apc_frame icon = 'icons/obj/monitors.dmi' icon_state = "alarm_bitem" flags = FPRINT - m_amt = 2*CC_PER_SHEET_METAL + starting_materials = list(MAT_IRON = 2*CC_PER_SHEET_METAL) melt_temperature = MELTPOINT_STEEL w_type = RECYK_METAL mount_reqs = list("simfloor", "nospace") diff --git a/code/game/objects/items/mountable_frames/fire_alarm.dm b/code/game/objects/items/mountable_frames/fire_alarm.dm index 4888d57bf97..f8471e57a47 100644 --- a/code/game/objects/items/mountable_frames/fire_alarm.dm +++ b/code/game/objects/items/mountable_frames/fire_alarm.dm @@ -4,7 +4,7 @@ obj/item/mounted/frame/firealarm icon = 'icons/obj/monitors.dmi' icon_state = "fire_bitem" flags = FPRINT - m_amt=2*CC_PER_SHEET_METAL + starting_materials = list(MAT_IRON = 2*CC_PER_SHEET_METAL) melt_temperature = MELTPOINT_STEEL w_type = RECYK_METAL mount_reqs = list("simfloor", "nospace") diff --git a/code/game/objects/items/robot/robot_designs.dm b/code/game/objects/items/robot/robot_designs.dm index 5ebc59a7f8c..f728ab1634a 100644 --- a/code/game/objects/items/robot/robot_designs.dm +++ b/code/game/objects/items/robot/robot_designs.dm @@ -10,7 +10,7 @@ build_type = MECHFAB build_path = /obj/item/robot_parts/robot_suit category = "Robot" - materials = list("$iron"=50000) + materials = list(MAT_IRON=50000) /datum/design/robot/torso name = "Cyborg Component (Robot torso)" @@ -20,7 +20,7 @@ build_type = MECHFAB build_path = /obj/item/robot_parts/chest category = "Robot" - materials = list("$iron"=40000) + materials = list(MAT_IRON=40000) /datum/design/robot/l_arm name = "Cyborg Component (Robot left arm)" @@ -30,7 +30,7 @@ build_type = MECHFAB build_path = /obj/item/robot_parts/l_arm category = "Robot" - materials = list("$iron"=18000) + materials = list(MAT_IRON=18000) /datum/design/robot/r_arm name = "Cyborg Component (Robot right arm)" @@ -40,7 +40,7 @@ build_type = MECHFAB build_path = /obj/item/robot_parts/r_arm category = "Robot" - materials = list("$iron"=18000) + materials = list(MAT_IRON=18000) /datum/design/robot/l_leg name = "Cyborg Component (Robot left leg)" @@ -50,7 +50,7 @@ build_type = MECHFAB build_path = /obj/item/robot_parts/l_leg category = "Robot" - materials = list("$iron"=15000) + materials = list(MAT_IRON=15000) /datum/design/robot/r_leg name = "Cyborg Component (Robot right leg)" @@ -60,7 +60,7 @@ build_type = MECHFAB build_path = /obj/item/robot_parts/r_leg category = "Robot" - materials = list("$iron"=15000) + materials = list(MAT_IRON=15000) /datum/design/robot/head name = "Cyborg Component (Robot head)" @@ -70,7 +70,7 @@ build_type = MECHFAB build_path = /obj/item/robot_parts/head category = "Robot" - materials = list("$iron"=25000) + materials = list(MAT_IRON=25000) /datum/design/robot/binary_commucation_device name = "Cyborg Component (Binary Communication Device)" @@ -80,7 +80,7 @@ build_type = MECHFAB build_path = /obj/item/robot_parts/robot_component/binary_communication_device category = "Robot_Part" - materials = list("$iron"=5000) + materials = list(MAT_IRON=5000) /datum/design/robot/radio name = "Cyborg Component (Radio)" @@ -90,7 +90,7 @@ build_type = MECHFAB build_path = /obj/item/robot_parts/robot_component/radio category = "Robot_Part" - materials = list("$iron"=5000) + materials = list(MAT_IRON=5000) /datum/design/robot/actuator name = "Cyborg Component (Actuator)" @@ -100,7 +100,7 @@ build_type = MECHFAB build_path = /obj/item/robot_parts/robot_component/actuator category = "Robot_Part" - materials = list("$iron"=5000) + materials = list(MAT_IRON=5000) /datum/design/robot/diagnosis_unit name = "Cyborg Component (Diagnosis Unit)" @@ -110,7 +110,7 @@ build_type = MECHFAB build_path = /obj/item/robot_parts/robot_component/diagnosis_unit category = "Robot_Part" - materials = list("$iron"=5000) + materials = list(MAT_IRON=5000) /datum/design/robot/camera name = "Cyborg Component (Camera)" @@ -120,7 +120,7 @@ build_type = MECHFAB build_path = /obj/item/robot_parts/robot_component/camera category = "Robot_Part" - materials = list("$iron"=5000) + materials = list(MAT_IRON=5000) /datum/design/robot/armour name = "Cyborg Component (Armor)" @@ -130,4 +130,4 @@ build_type = MECHFAB build_path = /obj/item/robot_parts/robot_component/armour category = "Robot_Part" - materials = list("$iron"=5000) \ No newline at end of file + materials = list(MAT_IRON=5000) \ No newline at end of file diff --git a/code/game/objects/items/stacks/cable.dm b/code/game/objects/items/stacks/cable.dm index 0637d38f47b..7b6469be015 100644 --- a/code/game/objects/items/stacks/cable.dm +++ b/code/game/objects/items/stacks/cable.dm @@ -25,7 +25,7 @@ var/global/list/datum/stack_recipe/cable_recipes = list ( \ w_class = 2.0 throw_speed = 2 throw_range = 5 - m_amt = CC_PER_SHEET_METAL + starting_materials = list(MAT_IRON = CC_PER_SHEET_METAL) w_type = RECYK_METAL flags = FPRINT siemens_coefficient = 1.5 //extra conducting diff --git a/code/game/objects/items/stacks/rods.dm b/code/game/objects/items/stacks/rods.dm index aa6182c02c2..df449bec8b9 100644 --- a/code/game/objects/items/stacks/rods.dm +++ b/code/game/objects/items/stacks/rods.dm @@ -10,7 +10,7 @@ throwforce = 15.0 throw_speed = 5 throw_range = 20 - m_amt = 1875 + starting_materials = list(MAT_IRON = 1875) max_amount = 60 attack_verb = list("hit", "bludgeoned", "whacked") w_type=RECYK_METAL diff --git a/code/game/objects/items/stacks/sheets/glass.dm b/code/game/objects/items/stacks/sheets/glass.dm index c9fa117f405..ed9cc1c54d4 100644 --- a/code/game/objects/items/stacks/sheets/glass.dm +++ b/code/game/objects/items/stacks/sheets/glass.dm @@ -194,12 +194,12 @@ desc = "HOLY SHEET! That is a lot of glass." singular_name = "glass sheet" icon_state = "sheet-glass" - g_amt = 3750 + starting_materials = list(MAT_GLASS = 3750) origin_tech = "materials=1" rglass = /obj/item/stack/sheet/glass/rglass /obj/item/stack/sheet/glass/glass/cyborg - g_amt = 0 + starting_materials = null /obj/item/stack/sheet/glass/glass/recycle(var/datum/materials/rec) rec.addAmount("glass", 1*src.amount) @@ -235,8 +235,7 @@ singular_name = "reinforced glass sheet" sname = "glass_ref" icon_state = "sheet-rglass" - g_amt = 3750 - m_amt = 1875 + starting_materials = list(MAT_IRON = 1875, MAT_GLASS = 3750) created_window = /obj/structure/window/reinforced full_window = /obj/structure/window/full/reinforced windoor = /obj/structure/windoor_assembly/ @@ -246,12 +245,11 @@ shealth = 10 /obj/item/stack/sheet/glass/rglass/cyborg - g_amt = 0 - m_amt = 0 + starting_materials = null /obj/item/stack/sheet/glass/rglass/recycle(var/datum/materials/rec) - rec.addAmount("glass", 1*src.amount) - rec.addAmount("iron", 0.5*src.amount) + rec.addAmount(MAT_GLASS, 1*src.amount) + rec.addAmount(MAT_IRON, 0.5*src.amount) return 1 /* @@ -264,7 +262,7 @@ singular_name = "glass sheet" icon_state = "sheet-plasmaglass" sname = "plasma" - g_amt=CC_PER_SHEET_GLASS + starting_materials = list(MAT_GLASS = CC_PER_SHEET_GLASS) origin_tech = "materials=3;plasmatech=2" created_window = /obj/structure/window/plasma full_window = /obj/structure/window/full/plasma @@ -276,8 +274,8 @@ shard_type = /obj/item/weapon/shard/plasma /obj/item/stack/sheet/glass/plasmaglass/recycle(var/datum/materials/rec) - rec.addAmount("plasma",1*src.amount) - rec.addAmount("glass", 1*src.amount) + rec.addAmount(MAT_PLASMA,1*src.amount) + rec.addAmount(MAT_GLASS, 1*src.amount) return RECYK_GLASS /* @@ -289,8 +287,7 @@ singular_name = "reinforced plasma glass sheet" icon_state = "sheet-plasmarglass" sname = "plasma_ref" - g_amt=CC_PER_SHEET_GLASS - m_amt = 1875 + starting_materials = list(MAT_IRON = 1875, MAT_GLASS = CC_PER_SHEET_GLASS) melt_temperature = MELTPOINT_STEEL+500 // I guess...? origin_tech = "materials=4;plasmatech=2" created_window = /obj/structure/window/reinforced/plasma diff --git a/code/game/objects/items/stacks/sheets/sheet_types.dm b/code/game/objects/items/stacks/sheets/sheet_types.dm index b52a89d3985..a30a53d9720 100644 --- a/code/game/objects/items/stacks/sheets/sheet_types.dm +++ b/code/game/objects/items/stacks/sheets/sheet_types.dm @@ -87,7 +87,7 @@ var/global/list/datum/stack_recipe/metal_recipes = list ( \ desc = "Sheets made out of metal. It has been dubbed Metal Sheets." singular_name = "metal sheet" icon_state = "sheet-metal" - m_amt = 3750 + starting_materials = list(MAT_IRON = 3750) w_type = RECYK_METAL throwforce = 14.0 flags = FPRINT @@ -127,7 +127,7 @@ var/global/list/datum/stack_recipe/metal_recipes = list ( \ // Diet metal. /obj/item/stack/sheet/metal/cyborg - m_amt = 0 + starting_materials = null /obj/item/stack/sheet/metal/New(var/loc, var/amount=null) recipes = metal_recipes @@ -155,7 +155,7 @@ var/global/list/datum/stack_recipe/plasteel_recipes = list ( \ desc = "This sheet is an alloy of iron and plasma." icon_state = "sheet-plasteel" item_state = "sheet-plasteel" - m_amt = 3750 // Was 7500, which doesn't make any fucking sense + starting_materials = list(MAT_IRON = 3750) // Was 7500, which doesn't make any fucking sense perunit = 2875 //average of plasma and metal throwforce = 15.0 flags = FPRINT diff --git a/code/game/objects/items/stacks/tiles/plasteel.dm b/code/game/objects/items/stacks/tiles/plasteel.dm index e5bb158277f..76331770ad4 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 + starting_materials = list(MAT_IRON = 937.5) w_type = RECYK_METAL melt_temperature = MELTPOINT_STEEL throwforce = 15.0 diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm index a7a3798bb7a..d6142aca8bc 100644 --- a/code/game/objects/items/toys.dm +++ b/code/game/objects/items/toys.dm @@ -131,8 +131,7 @@ siemens_coefficient = 1 slot_flags = SLOT_BELT w_class = 3.0 - g_amt = 10 - m_amt = 10 + starting_materials = list(MAT_IRON = 10, MAT_GLASS = 10) w_type = RECYK_MISC melt_temperature = MELTPOINT_PLASTIC attack_verb = list("struck", "pistol whipped", "hit", "bashed") @@ -186,8 +185,7 @@ flags = FPRINT siemens_coefficient = 1 w_class = 1.0 - g_amt = 10 - m_amt = 10 + starting_materials = list(MAT_IRON = 10, MAT_GLASS = 10) melt_temperature = MELTPOINT_PLASTIC w_type = RECYK_MISC var/amount_left = 7.0 diff --git a/code/game/objects/items/weapons/RCD.dm b/code/game/objects/items/weapons/RCD.dm index 87c74ed8853..ef0c7628c68 100644 --- a/code/game/objects/items/weapons/RCD.dm +++ b/code/game/objects/items/weapons/RCD.dm @@ -19,7 +19,7 @@ RCD throw_speed = 1 throw_range = 5 w_class = 3.0 - m_amt = 50000 + starting_materials = list(MAT_IRON = 50000) w_type = RECYK_ELECTRONIC melt_temperature = MELTPOINT_STEEL // Lots of metal origin_tech = "engineering=4;materials=2" @@ -267,8 +267,7 @@ RCD anchored = 0.0 origin_tech = "materials=2" w_class = 2.0 - m_amt = 30000 - g_amt = 15000 + starting_materials = list(MAT_IRON = 30000, MAT_GLASS = 15000) w_type = RECYK_ELECTRONIC /obj/item/weapon/rcd_ammo/attackby(var/obj/O, mob/user) diff --git a/code/game/objects/items/weapons/RPD.dm b/code/game/objects/items/weapons/RPD.dm index a5bbdc75dd2..77597a6bb08 100644 --- a/code/game/objects/items/weapons/RPD.dm +++ b/code/game/objects/items/weapons/RPD.dm @@ -140,8 +140,7 @@ var/global/list/RPD_recipes=list( throw_speed = 1 throw_range = 5 w_class = 3.0 - m_amt = 75000 - g_amt = 37500 + starting_materials = list(MAT_IRON = 75000, MAT_GLASS = 37500) w_type = RECYK_ELECTRONIC melt_temperature = MELTPOINT_STEEL origin_tech = "engineering=4;materials=2" diff --git a/code/game/objects/items/weapons/RSF.dm b/code/game/objects/items/weapons/RSF.dm index 1eb77a8a41b..20aefe48419 100644 --- a/code/game/objects/items/weapons/RSF.dm +++ b/code/game/objects/items/weapons/RSF.dm @@ -11,7 +11,7 @@ RSF opacity = 0 density = 0 anchored = 0.0 - m_amt = 40000 + starting_materials = list(MAT_IRON = 40000) var/matter = 0 var/max_matter = 40 var/matter_respawn = 0 diff --git a/code/game/objects/items/weapons/ai_modules/AI_modules.dm b/code/game/objects/items/weapons/ai_modules/AI_modules.dm index 060c6642a7d..e18d2996213 100644 --- a/code/game/objects/items/weapons/ai_modules/AI_modules.dm +++ b/code/game/objects/items/weapons/ai_modules/AI_modules.dm @@ -22,9 +22,7 @@ Refactored AI modules by N3X15 origin_tech = "programming=3" //Recycling - g_amt=2000 // Glass - var/gold_amt=0 - var/diamond_amt=0 + starting_materials = list(MAT_GLASS = 2000) w_type=RECYK_ELECTRONIC melt_temperature = MELTPOINT_SILICON // Don't specify sulfuric, as that's renewable and is used up in the etching process anyway. @@ -39,12 +37,6 @@ Refactored AI modules by N3X15 name = "'[modname]' [modtype]" updateLaw() -/obj/item/weapon/aiModule/recycle(var/datum/materials/rec) - rec.addAmount("glass", g_amt) - rec.addAmount("gold", gold_amt) - rec.addAmount("diamond",diamond_amt) - return 1 - /obj/item/weapon/aiModule/attack_ai(mob/user as mob) // Keep MoMMIs from picking them up. if(isMoMMI(user)) @@ -106,8 +98,7 @@ Refactored AI modules by N3X15 origin_tech = "programming=3;materials=4" // Recycling - g_amt =2000/CC_PER_SHEET_GLASS // Glass - gold_amt=100/CC_PER_SHEET_MISC + starting_materials = list(MAT_GLASS = 2000/CC_PER_SHEET_GLASS, MAT_GOLD = 100/CC_PER_SHEET_MISC) // Don't specify sulfuric, as that's renewable and is used up in the etching process anyway. /obj/item/weapon/aiModule/reset/updateLaw() @@ -132,8 +123,7 @@ Refactored AI modules by N3X15 origin_tech = "programming=3;materials=6" // Recycling - g_amt=2000/CC_PER_SHEET_GLASS // Glass - diamond_amt=100/CC_PER_SHEET_MISC + starting_materials = list(MAT_GLASS = 2000/CC_PER_SHEET_GLASS, MAT_DIAMOND = 100/CC_PER_SHEET_MISC) // Don't specify sulfuric, as that's renewable and is used up in the etching process anyway. /obj/item/weapon/aiModule/purge/updateLaw() diff --git a/code/game/objects/items/weapons/ai_modules/planning_frame.dm b/code/game/objects/items/weapons/ai_modules/planning_frame.dm index f7acaffcd1a..c5338a0fc08 100644 --- a/code/game/objects/items/weapons/ai_modules/planning_frame.dm +++ b/code/game/objects/items/weapons/ai_modules/planning_frame.dm @@ -25,9 +25,7 @@ item_state = "electronic" //Recycling - g_amt=2000 // Glass - var/gold_amt=0 - var/diamond_amt=0 + starting_materials = list(MAT_GLASS = 2000/CC_PER_SHEET_GLASS) w_type=RECYK_ELECTRONIC // Don't specify sulfuric, as that's renewable and is used up in the etching process anyway. @@ -41,12 +39,6 @@ . = ..() laws = new base_law_type -/obj/item/weapon/planning_frame/recycle(var/datum/materials/rec) - rec.addAmount("glass", g_amt) - rec.addAmount("gold", gold_amt) - rec.addAmount("diamond",diamond_amt) - return 1 - /obj/item/weapon/planning_frame/attackby(var/obj/item/W,var/mob/user) if(istype(W, /obj/item/weapon/aiModule)) var/obj/item/weapon/aiModule/module=W diff --git a/code/game/objects/items/weapons/ai_modules/standard.dm b/code/game/objects/items/weapons/ai_modules/standard.dm index 27abcd59503..cdaf0effea7 100644 --- a/code/game/objects/items/weapons/ai_modules/standard.dm +++ b/code/game/objects/items/weapons/ai_modules/standard.dm @@ -20,7 +20,7 @@ var/obj/item/weapon/aiModule/standard/clone = ..() clone.law=law return clone - + /******************** ProtectStation ********************/ /obj/item/weapon/aiModule/standard/protectStation @@ -31,8 +31,7 @@ priority = 5 // Recycling - g_amt=2000/CC_PER_SHEET_GLASS // Glass - gold_amt=100/CC_PER_SHEET_MISC // Gold + starting_materials = list(MAT_GLASS = 2000/CC_PER_SHEET_GLASS, MAT_GOLD = 100/CC_PER_SHEET_MISC) /******************** PrototypeEngineOffline ********************/ @@ -44,8 +43,7 @@ priority = LAW_IONIC // Was 6, but doesn't jive with law priority numbering. // Recycling - g_amt=2000/CC_PER_SHEET_GLASS // Glass - gold_amt=100/CC_PER_SHEET_MISC // Gold + starting_materials = list(MAT_GLASS = 2000/CC_PER_SHEET_GLASS, MAT_GOLD = 100/CC_PER_SHEET_MISC) /******************** TeleporterOffline ********************/ @@ -56,8 +54,7 @@ priority = 7 // Recycling - g_amt=2000/CC_PER_SHEET_GLASS // Glass - gold_amt=100/CC_PER_SHEET_MISC // Gold + starting_materials = list(MAT_GLASS = 2000/CC_PER_SHEET_GLASS, MAT_GOLD = 100/CC_PER_SHEET_MISC) /******************** Quarantine ********************/ @@ -68,8 +65,7 @@ priority = 8 // Recycling - g_amt=2000/CC_PER_SHEET_GLASS // Glass - gold_amt=100/CC_PER_SHEET_MISC // Gold + starting_materials = list(MAT_GLASS = 2000/CC_PER_SHEET_GLASS, MAT_GOLD = 100/CC_PER_SHEET_MISC) /******************** OxygenIsToxicToHumans ********************/ @@ -80,5 +76,4 @@ priority = 9 // Recycling - g_amt=2000/CC_PER_SHEET_GLASS // Glass - gold_amt=100/CC_PER_SHEET_MISC // Gold \ No newline at end of file + starting_materials = list(MAT_GLASS = 2000/CC_PER_SHEET_GLASS, MAT_GOLD = 100/CC_PER_SHEET_MISC) diff --git a/code/game/objects/items/weapons/ai_modules/targetted.dm b/code/game/objects/items/weapons/ai_modules/targetted.dm index 37d6026e5c8..a2e6d75a096 100644 --- a/code/game/objects/items/weapons/ai_modules/targetted.dm +++ b/code/game/objects/items/weapons/ai_modules/targetted.dm @@ -67,8 +67,7 @@ action = "protect" // Recycling - g_amt=2000/CC_PER_SHEET_GLASS // Glass - gold_amt=100/CC_PER_SHEET_MISC // Gold + starting_materials = list(MAT_GLASS = 2000/CC_PER_SHEET_GLASS, MAT_GOLD = 100/CC_PER_SHEET_MISC) /******************** OneHuman ********************/ @@ -76,8 +75,7 @@ origin_tech = "programming=3;materials=6" //made with diamonds! // Recycling - g_amt=2000/CC_PER_SHEET_GLASS // Glass - gold_amt=100/CC_PER_SHEET_MISC // Gold + starting_materials = list(MAT_GLASS = 2000/CC_PER_SHEET_GLASS, MAT_GOLD = 100/CC_PER_SHEET_MISC) modname = "OneHuman" law = "Only is human." diff --git a/code/game/objects/items/weapons/airlock_painter.dm b/code/game/objects/items/weapons/airlock_painter.dm index de36b02a496..aa8e4da1973 100644 --- a/code/game/objects/items/weapons/airlock_painter.dm +++ b/code/game/objects/items/weapons/airlock_painter.dm @@ -7,8 +7,7 @@ w_class = 2.0 - m_amt = 50 - g_amt = 50 + starting_materials = list(MAT_IRON = 50, MAT_GLASS = 50) w_type = RECYK_ELECTRONIC origin_tech = "engineering=1" diff --git a/code/game/objects/items/weapons/chisel.dm b/code/game/objects/items/weapons/chisel.dm index 4a85dcaf1b6..0f2896d4745 100644 --- a/code/game/objects/items/weapons/chisel.dm +++ b/code/game/objects/items/weapons/chisel.dm @@ -5,7 +5,7 @@ icon = 'icons/obj/items.dmi' icon_state = "chisel" - m_amt = 120 + starting_materials = list(MAT_IRON = 120) flags = FPRINT siemens_coefficient = 1 diff --git a/code/game/objects/items/weapons/extinguisher.dm b/code/game/objects/items/weapons/extinguisher.dm index ae1e253eac0..c9967dd67cf 100644 --- a/code/game/objects/items/weapons/extinguisher.dm +++ b/code/game/objects/items/weapons/extinguisher.dm @@ -13,7 +13,7 @@ throw_speed = 2 throw_range = 10 force = 10.0 - m_amt = 90 // TODO: Check against autolathe. + starting_materials = list(MAT_IRON = 90) // TODO: Check against autolathe. w_type = RECYK_METAL melt_temperature = MELTPOINT_STEEL attack_verb = list("slammed", "whacked", "bashed", "thunked", "battered", "bludgeoned", "thrashed") @@ -37,7 +37,7 @@ throwforce = 2 w_class = 2.0 force = 3.0 - m_amt = 0 + starting_materials = null 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 68eebc00868..953c06b0cfe 100644 --- a/code/game/objects/items/weapons/flamethrower.dm +++ b/code/game/objects/items/weapons/flamethrower.dm @@ -11,7 +11,7 @@ throw_speed = 1 throw_range = 5 w_class = 3.0 - m_amt = 500 + starting_materials = list(MAT_IRON = 500) w_type = RECYK_MISC melt_temperature = MELTPOINT_STEEL origin_tech = "combat=1;plasmatech=1" @@ -192,7 +192,7 @@ //Transfer 5% of current tank air contents to turf var/datum/gas_mixture/air_transfer = ptank.air_contents.remove_ratio(0.02*(throw_amount/100)) //air_transfer.toxins = air_transfer.toxins * 5 // This is me not comprehending the air system. I realize this is retarded and I could probably make it work without fucking it up like this, but there you have it. -- TLE - var/plasma_moles = air_transfer.toxins + var/plasma_moles = air_transfer.toxins getFromPool(/obj/effect/decal/cleanable/liquid_fuel/flamethrower_fuel, target, plasma_moles*10, get_dir(loc, target)) air_transfer.toxins = 0 target.assume_air(air_transfer) diff --git a/code/game/objects/items/weapons/handcuffs.dm b/code/game/objects/items/weapons/handcuffs.dm index 402f62c175a..844360196e6 100644 --- a/code/game/objects/items/weapons/handcuffs.dm +++ b/code/game/objects/items/weapons/handcuffs.dm @@ -11,7 +11,7 @@ w_class = 2.0 throw_speed = 2 throw_range = 5 - m_amt = 500 + starting_materials = list(MAT_IRON = 500) w_type = RECYK_METAL melt_temperature = MELTPOINT_STEEL origin_tech = "materials=1" diff --git a/code/game/objects/items/weapons/kitchen.dm b/code/game/objects/items/weapons/kitchen.dm index 56442f0440b..605f1404b7e 100644 --- a/code/game/objects/items/weapons/kitchen.dm +++ b/code/game/objects/items/weapons/kitchen.dm @@ -181,7 +181,7 @@ throwforce = 6.0 throw_speed = 3 throw_range = 6 - m_amt = 12000 + starting_materials = list(MAT_IRON = 12000) w_type = RECYK_METAL melt_temperature = MELTPOINT_STEEL origin_tech = "materials=1" @@ -216,7 +216,7 @@ throwforce = 8.0 throw_speed = 3 throw_range = 6 - m_amt = 12000 + starting_materials = list(MAT_IRON = 12000) w_type = RECYK_METAL melt_temperature = MELTPOINT_STEEL origin_tech = "materials=1" @@ -305,7 +305,7 @@ w_class = 3.0 flags = FPRINT siemens_coefficient = 1 - m_amt = 3000 + starting_materials = list(MAT_IRON = 3000) w_type = RECYK_METAL melt_temperature = MELTPOINT_STEEL var/list/carrying = list() // List of things on the tray. - Doohl diff --git a/code/game/objects/items/weapons/paint.dm b/code/game/objects/items/weapons/paint.dm index 7f51d3a6349..d229decd068 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 + starting_materials = list(MAT_IRON = 200) w_type = RECYK_METAL w_class = 3.0 melt_temperature = MELTPOINT_STEEL diff --git a/code/game/objects/items/weapons/power_cells.dm b/code/game/objects/items/weapons/power_cells.dm index 2aef235359c..801ef0a563d 100644 --- a/code/game/objects/items/weapons/power_cells.dm +++ b/code/game/objects/items/weapons/power_cells.dm @@ -13,8 +13,7 @@ w_class = 3.0 var/charge = 0 // note %age conveted to actual charge in New var/maxcharge = 1000 - m_amt = 700 - g_amt = 50 + starting_materials = list(MAT_IRON = 700, MAT_GLASS = 50) w_type = RECYK_ELECTRONIC melt_temperature = MELTPOINT_STEEL // Rugged var/rigged = 0 // true if rigged to explode @@ -29,7 +28,7 @@ desc = "You can't top the plasma top." //TOTALLY TRADEMARK INFRINGEMENT origin_tech = "powerstorage=0" maxcharge = 500 - g_amt = 40 + starting_materials = list(MAT_IRON = 700, MAT_GLASS = 40) /obj/item/weapon/cell/crap/empty/New() ..() @@ -39,7 +38,7 @@ name = "\improper Security borg rechargeable D battery" origin_tech = "powerstorage=0" maxcharge = 600 //600 max charge / 100 charge per shot = six shots - g_amt = 40 + starting_materials = list(MAT_IRON = 700, MAT_GLASS = 40) /obj/item/weapon/cell/secborg/empty/New() @@ -50,7 +49,7 @@ name = "\improper Mining borg rechargeable D battery" origin_tech = "powerstorage=0" maxcharge = 600 //600 max charge / 100 charge per shot = six shots - g_amt = 40 + starting_materials = list(MAT_IRON = 700, MAT_GLASS = 40) /obj/item/weapon/cell/miningborg/empty/New() @@ -63,7 +62,7 @@ origin_tech = "powerstorage=2" icon_state = "hcell" maxcharge = 10000 - g_amt = 60 + starting_materials = list(MAT_IRON = 700, MAT_GLASS = 60) /obj/item/weapon/cell/high/empty/New() ..() @@ -74,7 +73,7 @@ origin_tech = "powerstorage=5" icon_state = "scell" maxcharge = 20000 - g_amt = 70 + starting_materials = list(MAT_IRON = 700, MAT_GLASS = 70) /obj/item/weapon/cell/super/empty/New() ..() charge = 0 @@ -84,7 +83,7 @@ origin_tech = "powerstorage=6" icon_state = "hpcell" maxcharge = 30000 - g_amt = 80 + starting_materials = list(MAT_IRON = 700, MAT_GLASS = 80) /obj/item/weapon/cell/hyper/empty/New() ..() @@ -95,7 +94,7 @@ icon_state = "icell" origin_tech = null maxcharge = 30000 - g_amt = 80 + starting_materials = list(MAT_IRON = 700, MAT_GLASS = 80) use() return 1 @@ -107,8 +106,7 @@ icon_state = "potato_cell" //"potato_battery" charge = 100 maxcharge = 300 - m_amt = 0 - g_amt = 0 + starting_materials = null w_type = RECYK_BIOLOGICAL minor_fault = 1 @@ -120,8 +118,7 @@ icon = 'icons/mob/slimes.dmi' //'icons/obj/harvest.dmi' icon_state = "yellow slime extract" //"potato_battery" maxcharge = 10000 - m_amt = 0 - g_amt = 0 + starting_materials = null w_type = RECYK_BIOLOGICAL diff --git a/code/game/objects/items/weapons/shard.dm b/code/game/objects/items/weapons/shard.dm index 77c394d9a67..7de89c77d01 100644 --- a/code/game/objects/items/weapons/shard.dm +++ b/code/game/objects/items/weapons/shard.dm @@ -13,7 +13,7 @@ force = 5.0 throwforce = 15.0 item_state = "shard-glassnew" - g_amt = 3750 + starting_materials = list(MAT_GLASS = 3750) w_type = RECYK_GLASS melt_temperature = MELTPOINT_GLASS siemens_coefficient = 0 //no conduct @@ -56,7 +56,7 @@ icon = 'icons/obj/shards.dmi' icon_state = "shrapnellarge" desc = "A bunch of tiny bits of shattered metal." - m_amt=5 + starting_materials = list(MAT_IRON = 5) w_type=RECYK_METAL melt_temperature=MELTPOINT_STEEL diff --git a/code/game/objects/items/weapons/shields.dm b/code/game/objects/items/weapons/shields.dm index ae01479f9cf..48a38105195 100644 --- a/code/game/objects/items/weapons/shields.dm +++ b/code/game/objects/items/weapons/shields.dm @@ -14,8 +14,7 @@ throw_speed = 1 throw_range = 4 w_class = 4.0 - g_amt = 7500 - m_amt = 1000 + starting_materials = list(MAT_IRON = 1000, MAT_GLASS = 7500) melt_temperature = MELTPOINT_GLASS origin_tech = "materials=2" attack_verb = list("shoved", "bashed") diff --git a/code/game/objects/items/weapons/storage/fancy.dm b/code/game/objects/items/weapons/storage/fancy.dm index 77b68fa6dde..17772d87d6c 100644 --- a/code/game/objects/items/weapons/storage/fancy.dm +++ b/code/game/objects/items/weapons/storage/fancy.dm @@ -352,7 +352,6 @@ icon_type = "flare" name = "box of flares" storage_slots = 6 - m_amt = 15000 can_hold = list("/obj/item/device/flashlight/flare") foldable = /obj/item/stack/sheet/cardboard @@ -376,7 +375,6 @@ /obj/item/weapon/storage/fancy/flares/update_icon() ..() - m_amt = contents.len * 2500 /obj/item/weapon/storage/fancy/food_box/chicken_bucket name = "chicken bucket" diff --git a/code/game/objects/items/weapons/storage/firstaid.dm b/code/game/objects/items/weapons/storage/firstaid.dm index eae299eb88d..ce7033c50c4 100644 --- a/code/game/objects/items/weapons/storage/firstaid.dm +++ b/code/game/objects/items/weapons/storage/firstaid.dm @@ -124,8 +124,7 @@ allow_quick_gather = 1 use_to_pickup = 1 storage_slots = 14 - m_amt = 10 - g_amt = 60 + starting_materials = list(MAT_IRON = 10, MAT_GLASS = 60) /obj/item/weapon/storage/pill_bottle/MouseDrop(obj/over_object as obj) //Quick pillbottle fix. -Agouri diff --git a/code/game/objects/items/weapons/storage/toolbox.dm b/code/game/objects/items/weapons/storage/toolbox.dm index 3b77c1ee8d7..db222f7a8df 100644 --- a/code/game/objects/items/weapons/storage/toolbox.dm +++ b/code/game/objects/items/weapons/storage/toolbox.dm @@ -11,7 +11,7 @@ throwforce = 10.0 throw_speed = 1 throw_range = 7 - m_amt = 5000 + starting_materials = list(MAT_IRON = 5000) w_type = RECYK_METAL w_class = 4.0 melt_temperature = MELTPOINT_STEEL diff --git a/code/game/objects/items/weapons/surgery_tools.dm b/code/game/objects/items/weapons/surgery_tools.dm index d11d3f05611..b852292d043 100644 --- a/code/game/objects/items/weapons/surgery_tools.dm +++ b/code/game/objects/items/weapons/surgery_tools.dm @@ -17,8 +17,7 @@ icon = 'icons/obj/surgery.dmi' icon_state = "retractor" item_state = "retractor" - m_amt = 10000 - g_amt = 5000 // OH COME ON, WHERE THE FUCK IS THERE ANY GLASS IN A GODDAMN RETRACTOR //For extra retracting power + starting_materials = list(MAT_IRON = 10000, MAT_GLASS = 5000) melt_temperature = MELTPOINT_STEEL w_type = RECYK_METAL flags = FPRINT @@ -151,8 +150,7 @@ LOOK FOR SURGERY.DM*/ icon = 'icons/obj/surgery.dmi' icon_state = "hemostat" item_state = "hemostat" - m_amt = 5000 - g_amt = 2500 + starting_materials = list(MAT_IRON = 5000, MAT_GLASS = 2500) w_type = RECYK_METAL flags = FPRINT siemens_coefficient = 1 @@ -294,8 +292,7 @@ LOOK FOR SURGERY.DM*/ icon = 'icons/obj/surgery.dmi' icon_state = "cautery" item_state = "cautery" - m_amt = 5000 - g_amt = 2500 + starting_materials = list(MAT_IRON = 5000, MAT_GLASS = 2500) w_type = RECYK_ELECTRONIC flags = FPRINT siemens_coefficient = 1 @@ -394,8 +391,7 @@ LOOK FOR SURGERY.DM*/ icon_state = "drill" item_state = "surgicaldrill" hitsound = 'sound/weapons/circsawhit.ogg' - m_amt = 15000 - g_amt = 10000 + starting_materials = list(MAT_IRON = 15000, MAT_GLASS = 10000) w_type = RECYK_ELECTRONIC flags = FPRINT siemens_coefficient = 1 @@ -426,8 +422,7 @@ LOOK FOR SURGERY.DM*/ throwforce = 5.0 throw_speed = 3 throw_range = 5 - m_amt = 10000 - g_amt = 5000 + starting_materials = list(MAT_IRON = 10000, MAT_GLASS = 5000) w_type = RECYK_METAL origin_tech = "materials=1;biotech=1" attack_verb = list("attacked", "slashed", "stabbed", "sliced", "torn", "ripped", "diced", "cut") @@ -725,8 +720,7 @@ LOOK FOR SURGERY.DM*/ throwforce = 9.0 throw_speed = 3 throw_range = 5 - m_amt = 20000 - g_amt = 10000 + starting_materials = list(MAT_IRON = 20000, MAT_GLASS = 10000) w_type = RECYK_ELECTRONIC origin_tech = "materials=1;biotech=1" attack_verb = list("attacked", "slashed", "sawed", "cut") diff --git a/code/game/objects/items/weapons/switchtool.dm b/code/game/objects/items/weapons/switchtool.dm index 7ca4fd326ec..05adab4ce7d 100644 --- a/code/game/objects/items/weapons/switchtool.dm +++ b/code/game/objects/items/weapons/switchtool.dm @@ -10,7 +10,7 @@ throwforce = 6.0 throw_speed = 3 throw_range = 6 - m_amt = 15000 + starting_materials = list(MAT_IRON = 15000) w_type = RECYK_METAL melt_temperature = MELTPOINT_STEEL origin_tech = "materials=9;bluespace=5" diff --git a/code/game/objects/items/weapons/teleportation.dm b/code/game/objects/items/weapons/teleportation.dm index 57d2c13bd45..426fcb1bbd5 100644 --- a/code/game/objects/items/weapons/teleportation.dm +++ b/code/game/objects/items/weapons/teleportation.dm @@ -22,7 +22,7 @@ item_state = "electronic" throw_speed = 4 throw_range = 20 - m_amt = 400 + starting_materials = list(MAT_IRON = 400) w_type = RECYK_ELECTRONIC origin_tech = "magnets=1" @@ -134,7 +134,7 @@ Frequency: w_class = 2.0 throw_speed = 3 throw_range = 5 - m_amt = 10000 + starting_materials = list(MAT_IRON = 10000, MAT_GOLD = 500, MAT_PHAZON = 50) w_type = RECYK_ELECTRONIC origin_tech = "magnets=1;bluespace=3" diff --git a/code/game/objects/items/weapons/tile_painter.dm b/code/game/objects/items/weapons/tile_painter.dm index f4934d246f2..8b1a267ae45 100644 --- a/code/game/objects/items/weapons/tile_painter.dm +++ b/code/game/objects/items/weapons/tile_painter.dm @@ -308,8 +308,7 @@ var/global/list/paint_variants = list( throw_speed = 1 throw_range = 5 w_class = 3.0 - m_amt = 15000 - g_amt = 7500 + starting_materials = list(MAT_IRON = 15000, MAT_GLASS = 7500) w_type = RECYK_ELECTRONIC melt_temperature = MELTPOINT_STEEL origin_tech = "engineering=2;materials=1" diff --git a/code/game/objects/items/weapons/tools.dm b/code/game/objects/items/weapons/tools.dm index 1d212599d42..cf8c1ba2162 100644 --- a/code/game/objects/items/weapons/tools.dm +++ b/code/game/objects/items/weapons/tools.dm @@ -42,7 +42,7 @@ force = 5.0 throwforce = 7.0 w_class = 2.0 - m_amt = 150 + starting_materials = list(MAT_IRON = 150) w_type = RECYK_METAL melt_temperature = MELTPOINT_STEEL origin_tech = "materials=1;engineering=1" @@ -73,8 +73,7 @@ throwforce = 5.0 throw_speed = 3 throw_range = 5 - g_amt = 0 - m_amt = 75 + starting_materials = list(MAT_IRON = 75) w_type = RECYK_METAL melt_temperature = MELTPOINT_STEEL attack_verb = list("stabbed") @@ -159,7 +158,7 @@ throw_speed = 2 throw_range = 9 w_class = 2.0 - m_amt = 80 + starting_materials = list(MAT_IRON = 80) w_type = RECYK_METAL melt_temperature = MELTPOINT_STEEL origin_tech = "materials=1;engineering=1" @@ -205,8 +204,7 @@ heat_production = 3800 //Cost to make in the autolathe - m_amt = 70 - g_amt = 30 + starting_materials = list(MAT_IRON = 70, MAT_GLASS = 30) w_type = RECYK_MISC melt_temperature = MELTPOINT_PLASTIC @@ -479,24 +477,21 @@ /obj/item/weapon/weldingtool/largetank name = "Industrial Welding Tool" max_fuel = 40 - m_amt = 70 - g_amt = 60 + starting_materials = list(MAT_IRON = 70, MAT_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 + starting_materials = list(MAT_IRON = 70, MAT_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 + starting_materials = list(MAT_IRON = 70, MAT_GLASS = 120) origin_tech = "engineering=4;plasmatech=3" icon_state = "ewelder" var/last_gen = 0 @@ -526,7 +521,7 @@ throwforce = 7.0 item_state = "crowbar" w_class = 2.0 - m_amt = 50 + starting_materials = list(MAT_IRON = 50) w_type = RECYK_METAL melt_temperature = MELTPOINT_STEEL origin_tech = "engineering=1" @@ -612,8 +607,7 @@ throw_speed = 1 throw_range = 5 w_class = 2.0 - m_amt = 70 - g_amt = 30 + starting_materials = list(MAT_IRON = 70, MAT_GLASS = 30) w_type = RECYK_MISC melt_temperature = MELTPOINT_STEEL origin_tech = "engineering=1" @@ -681,7 +675,7 @@ desc = "A special container named Furst in its class by engineers. It has partitioned containment to allow engineers to separate different chemicals, such as welding fuel, sulphuric acid, or water. It also bears a clip to fit on a standard toolbelt." icon = 'icons/obj/items.dmi' icon_state = "fueljar0" - m_amt = 500 + starting_materials = list(MAT_IRON = 500) volume = 50 possible_transfer_amounts = list(5,10,20) var/slot = 0 //This dictates which side is open diff --git a/code/game/objects/items/weapons/weaponry.dm b/code/game/objects/items/weapons/weaponry.dm index 418d1540ef0..79bf14ae87b 100644 --- a/code/game/objects/items/weapons/weaponry.dm +++ b/code/game/objects/items/weapons/weaponry.dm @@ -174,7 +174,7 @@ obj/item/weapon/wirerod force = 9 throwforce = 10 w_class = 3 - m_amt = 1875 + starting_materials = list(MAT_IRON = 1875) w_type = RECYK_METAL attack_verb = list("hit", "bludgeoned", "whacked", "bonked") diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm index a1e397b2eb5..60ac2a376c0 100644 --- a/code/game/objects/objs.dm +++ b/code/game/objects/objs.dm @@ -36,10 +36,8 @@ var/global/list/reagents_to_log = list("fuel" = "welder fuel", "plasma"= "pla /obj/item/proc/is_used_on(obj/O, mob/user) /obj/recycle(var/datum/materials/rec) - if (src.m_amt == 0 && src.g_amt == 0) - return NOT_RECYCLABLE - rec.addAmount("iron",src.m_amt/CC_PER_SHEET_METAL) - rec.addAmount("glass",src.g_amt/CC_PER_SHEET_GLASS) + if(..()) + return 1 return w_type /* diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm index 7797adf27a8..4aa01592a5f 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -20,7 +20,7 @@ //then open it in a populated area to crash clients. var/breakout_time = 2 //2 minutes by default - m_amt = 2*CC_PER_SHEET_METAL + starting_materials = list(MAT_IRON = 2*CC_PER_SHEET_METAL) w_type = RECYK_METAL diff --git a/code/modules/assembly/assembly.dm b/code/modules/assembly/assembly.dm index fa4aae007e2..b6a643d020b 100644 --- a/code/modules/assembly/assembly.dm +++ b/code/modules/assembly/assembly.dm @@ -6,8 +6,7 @@ flags = FPRINT siemens_coefficient = 1 w_class = 2.0 - m_amt = 100 - g_amt = 0 + starting_materials = list(MAT_IRON = 100) w_type = RECYK_ELECTRONIC throwforce = 2 throw_speed = 3 diff --git a/code/modules/assembly/igniter.dm b/code/modules/assembly/igniter.dm index 04865848187..ac51d466f41 100644 --- a/code/modules/assembly/igniter.dm +++ b/code/modules/assembly/igniter.dm @@ -2,8 +2,7 @@ name = "igniter" desc = "A small electronic device able to ignite combustable substances." icon_state = "igniter" - m_amt = 500 - g_amt = 50 + starting_materials = list(MAT_IRON = 500, MAT_GLASS = 50) w_type = RECYK_ELECTRONIC origin_tech = "magnets=1" diff --git a/code/modules/assembly/infrared.dm b/code/modules/assembly/infrared.dm index fc801f7cc3b..702e024a7ba 100644 --- a/code/modules/assembly/infrared.dm +++ b/code/modules/assembly/infrared.dm @@ -4,8 +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 + starting_materials = list(MAT_IRON = 1000, MAT_GLASS = 500) w_type = RECYK_ELECTRONIC origin_tech = "magnets=2" diff --git a/code/modules/assembly/mousetrap.dm b/code/modules/assembly/mousetrap.dm index 58f811d61bf..7af05311c08 100644 --- a/code/modules/assembly/mousetrap.dm +++ b/code/modules/assembly/mousetrap.dm @@ -2,7 +2,7 @@ name = "mousetrap" desc = "A handy little spring-loaded trap for catching pesty rodents." icon_state = "mousetrap" - m_amt = 100 + starting_materials = list(MAT_IRON = 100) w_type = RECYK_METAL origin_tech = "combat=1" var/armed = 0 diff --git a/code/modules/assembly/proximity.dm b/code/modules/assembly/proximity.dm index b68c93712f8..d4c2d83cd2f 100644 --- a/code/modules/assembly/proximity.dm +++ b/code/modules/assembly/proximity.dm @@ -2,8 +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 + starting_materials = list(MAT_IRON = 800, MAT_GLASS = 200) w_type = RECYK_ELECTRONIC origin_tech = "magnets=1" diff --git a/code/modules/assembly/signaler.dm b/code/modules/assembly/signaler.dm index 2a920e12d93..9c1c43885b8 100644 --- a/code/modules/assembly/signaler.dm +++ b/code/modules/assembly/signaler.dm @@ -3,8 +3,7 @@ desc = "Used to remotely activate devices." icon_state = "signaller" item_state = "signaler" - m_amt = 1000 - g_amt = 200 + starting_materials = list(MAT_IRON = 1000, MAT_GLASS = 200) w_type = RECYK_ELECTRONIC origin_tech = "magnets=1" wires = WIRE_RECEIVE | WIRE_PULSE | WIRE_RADIO_PULSE | WIRE_RADIO_RECEIVE diff --git a/code/modules/assembly/speaker.dm b/code/modules/assembly/speaker.dm index e95cdc1229e..a6b8a03ef6b 100644 --- a/code/modules/assembly/speaker.dm +++ b/code/modules/assembly/speaker.dm @@ -4,8 +4,7 @@ desc = "Used to play pre-recorded messages." icon_state = "speaker" item_state = "speaker" - m_amt = 800 - g_amt = 100 + starting_materials = list(MAT_IRON = 800, MAT_GLASS = 100) w_type = RECYK_ELECTRONIC origin_tech = "magnets=1" var/message = "Thank you for using NanoSpeaker!" diff --git a/code/modules/assembly/timer.dm b/code/modules/assembly/timer.dm index 9deae520071..0c238738b75 100644 --- a/code/modules/assembly/timer.dm +++ b/code/modules/assembly/timer.dm @@ -2,8 +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 + starting_materials = list(MAT_IRON = 500, MAT_GLASS = 50) w_type = RECYK_ELECTRONIC origin_tech = "magnets=1" diff --git a/code/modules/assembly/voice.dm b/code/modules/assembly/voice.dm index d13f2fd5ca2..b78dd12ba8c 100644 --- a/code/modules/assembly/voice.dm +++ b/code/modules/assembly/voice.dm @@ -2,8 +2,7 @@ name = "voice analyzer" desc = "A small electronic device able to record a voice sample, and send a signal when that sample is repeated." icon_state = "voice" - m_amt = 500 - g_amt = 50 + starting_materials = list(MAT_IRON = 500, MAT_GLASS = 50) w_type = RECYK_ELECTRONIC origin_tech = "magnets=1" flags = HEAR diff --git a/code/modules/clothing/head/misc_special.dm b/code/modules/clothing/head/misc_special.dm index 3679fc04c8e..055ee1a0aae 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 item_state = "welding" - m_amt = 3000 - g_amt = 1000 + starting_materials = list(MAT_IRON = 3000, MAT_GLASS = 1000) w_type = RECYK_MISC var/up = 0 eyeprot = 3 diff --git a/code/modules/maps/spawners/spawners.dm b/code/modules/maps/spawners/spawners.dm index 732808388c8..612b176a46e 100644 --- a/code/modules/maps/spawners/spawners.dm +++ b/code/modules/maps/spawners/spawners.dm @@ -170,7 +170,7 @@ chance = 75 toSpawn = list( /obj/machinery/atmospherics/binary/circulator, - /obj/machinery/autolathe, + /obj/machinery/r_n_d/fabricator/mechanic_fab/autolathe, /obj/machinery/field_generator, /obj/machinery/floodlight, /obj/machinery/mineral/mint, diff --git a/code/modules/mining/equipment_locker.dm b/code/modules/mining/equipment_locker.dm index 4fdbb216cd9..359e84bc902 100644 --- a/code/modules/mining/equipment_locker.dm +++ b/code/modules/mining/equipment_locker.dm @@ -18,7 +18,7 @@ access_ce, access_virology ) - var/datum/materials/materials = new + materials = list() //makes the new datum var/stack_amt = 50 //amount to stack before releasing var/obj/item/weapon/card/id/inserted_id var/credits = 0 @@ -46,7 +46,7 @@ var/obj/item/stack/sheet/processed_sheet = SmeltMineral(O) if(processed_sheet) var/datum/material/mat = materials.getMaterial(O.material) - mat.stored += processed_sheet.amount //Stack the sheets + materials.addAmount(O.material, processed_sheet.amount) //Stack the sheets credits += mat.value * processed_sheet.amount // Gimme my fucking credits returnToPool(O) @@ -69,10 +69,10 @@ if(B) for(var/mat_id in B.materials.storage) var/datum/material/mat = B.materials.getMaterial(mat_id) - materials.addAmount(mat_id,mat.stored) - score["oremined"] += mat.stored - credits += mat.value * mat.stored // Gimme my fucking credits - mat.stored=0 + materials.addAmount(mat_id, B.materials.storage[mat_id]) + score["oremined"] += B.materials.storage[mat_id] + credits += mat.value * B.materials.storage[mat_id] // Gimme my fucking credits + B.materials.removeAmount(mat_id, B.materials.storage[mat_id]) /obj/machinery/mineral/ore_redemption/proc/SmeltMineral(var/obj/item/weapon/ore/O) if(O.material) @@ -102,9 +102,9 @@ dat += text("No ID inserted. Insert ID.
") for(var/O in materials.storage) - var/datum/material/mat = materials.getMaterial(O) - if(mat.stored > 0) - dat += text("[capitalize(mat.processed_name)]: [mat.stored] Release
") + if(materials.storage[O] > 0) + var/datum/material/mat = materials.getMaterial(O) + dat += text("[capitalize(mat.processed_name)]: [materials.storage[O]] Release
") dat += text("
This unit can hold stacks of [stack_amt] sheets of each mineral type.

") @@ -154,13 +154,13 @@ if(!mat) usr << "Unable to find material [release]!" return 1 - var/desired = input("How much?","How much [mat.processed_name] to eject?",mat.stored) as num + var/desired = input("How much?","How much [mat.processed_name] to eject?", materials.storage[release]) as num if(desired==0) return 1 var/obj/item/stack/sheet/out = new mat.sheettype(output.loc) out.redeemed = 1 //Central command will not pay for this mineral stack. - out.amount = Clamp(desired, 0, min(mat.stored, out.max_amount)) - mat.stored -= out.amount + out.amount = Clamp(desired, 0, min(materials.storage[release], out.max_amount)) + materials.removeAmount(release, out.amount) updateUsrDialog() return diff --git a/code/modules/mining/machine_processing.dm b/code/modules/mining/machine_processing.dm index 9af9d54f8c6..dd74283532e 100644 --- a/code/modules/mining/machine_processing.dm +++ b/code/modules/mining/machine_processing.dm @@ -82,16 +82,16 @@ a.notsmelting { "} for(var/ore_id in machine.ore.storage) var/datum/material/ore_info=machine.ore.getMaterial(ore_id) - if(ore_info.stored) + if(machine.ore.storage[ore_id]) // Can't do squat unless we have at least one. - if(ore_info.stored<1) + if(machine.ore.storage[ore_id]<1) if(ore_id in machine.selected) machine.on=0 machine.selected -= ore_id dat += {" [ore_info.name] - [ore_info.stored] + [machine.ore.storage[ore_id]] 0 && ore_id in selected) + if(ore.getAmount(ore_id)>0 && (ore_id in selected)) ore.removeAmount(ore_id,1) slag.mats.addAmount(ore_id,1) @@ -244,7 +244,7 @@ a.notsmelting { var/datum/material/po = ore.getMaterial(O.material) score["oremined"] += 1 if(po && po.oretype && istype(O, po.oretype)) - po.stored++ + ore.addAmount(O.material, 1) returnToPool(O) continue if(I) @@ -387,16 +387,16 @@ a.notsmelting { "} for(var/ore_id in machine.ore.storage) var/datum/material/ore_info=machine.ore.getMaterial(ore_id) - if(ore_info.stored) + if(machine.ore.storage[ore_id]) // Can't do squat unless we have at least one. - if(ore_info.stored<1) + if(machine.ore.storage[ore_id]<1) if(ore_id in machine.selected) machine.on=0 machine.selected -= ore_id html += {" [ore_info.name] - [ore_info.stored] + [machine.ore.storage[ore_id]] =10) return diff --git a/code/modules/mining/materials.dm b/code/modules/mining/materials.dm index 3ff75a83484..d2645f97bbe 100644 --- a/code/modules/mining/materials.dm +++ b/code/modules/mining/materials.dm @@ -9,13 +9,38 @@ * * Tracks and manages material storage for an object. */ -/datum/materials - var/list/datum/material/storage[0] -/datum/materials/New() - for(var/matdata in typesof(/datum/material) - /datum/material) - var/datum/material/mat = new matdata - storage[mat.id]=mat +var/global/list/material_list //Stores an instance of all the datums as an assoc with their matids +var/global/list/initial_materials //Stores all the matids = 0 in helping New + +/datum/materials + var/atom/holder + var/list/storage = list() + +/datum/materials/New(atom/newholder) + holder = newholder + + if(!material_list) + material_list = list() + initial_materials = list() + for(var/matdata in typesof(/datum/material) - /datum/material) + var/datum/material/mat = new matdata + material_list += list(mat.id = mat) + initial_materials += list(mat.id = 0) + + if(!storage.len) + storage = initial_materials.Copy() + +/datum/materials/resetVariables(args) + var/newargs + if(args) + newargs = args + "storage" + else + newargs = "storage" + + storage = initial_materials.Copy() + + ..(arglist(newargs)) /datum/materials/proc/addAmount(var/mat_id,var/amount) if(!(mat_id in storage)) @@ -23,9 +48,8 @@ return // I HATE BYOND // storage[mat_id].stored++ - var/datum/material/mat=storage[mat_id] - mat.stored += amount - storage[mat_id]=mat + storage[mat_id] = max(0, storage[mat_id] + amount) + /datum/materials/proc/removeFrom(var/datum/materials/mats) src.addFrom(mats,zero_after=1) @@ -34,25 +58,23 @@ if(mats == null) return for(var/mat_id in storage) - var/datum/material/myMat=storage[mat_id] - var/datum/material/theirMat=mats.storage[mat_id] - if(theirMat.stored>0) - myMat.stored += theirMat.stored + if(mats.storage[mat_id]>0) + storage[mat_id] += mats.storage[mat_id] if(zero_after) - theirMat.stored = 0 + mats.storage[mat_id] = 0 /datum/materials/proc/getVolume() var/volume=0 for(var/mat_id in storage) - var/datum/material/mat = storage[mat_id] - volume += mat.stored + volume += storage[mat_id] return volume +//Gives total value, doing mat value * stored mat /datum/materials/proc/getValue() var/value=0 for(var/mat_id in storage) - var/datum/material/mat = storage[mat_id] - value += mat.value + var/datum/material/mat = getMaterial(mat_id) + value += mat.value * storage[mat_id] return value /datum/materials/proc/removeAmount(var/mat_id,var/amount) @@ -66,22 +88,25 @@ warning("getAmount(): Unknown material [mat_id]!") return 0 - var/datum/material/mat=getMaterial(mat_id) - return mat.stored + return storage[mat_id] /datum/materials/proc/getMaterial(var/mat_id) - if(!(mat_id in storage)) + if(!(mat_id in material_list)) warning("getMaterial(): Unknown material [mat_id]!") return 0 - return storage[mat_id] + return material_list[mat_id] + +//HOOKS// +/atom/proc/onMaterialChange(matID, amount) + return +///MATERIALS/// /datum/material var/name="" var/processed_name="" var/id="" - var/stored=0 var/cc_per_sheet=CC_PER_SHEET_MISC var/oretype=null var/sheettype=null @@ -94,7 +119,7 @@ /datum/material/iron name="Iron" - id="iron" + id=MAT_IRON value=1 cc_per_sheet=CC_PER_SHEET_METAL oretype=/obj/item/weapon/ore/iron @@ -104,7 +129,7 @@ /datum/material/glass name="Sand" processed_name="Glass" - id="glass" + id=MAT_GLASS value=1 cc_per_sheet=CC_PER_SHEET_GLASS oretype=/obj/item/weapon/ore/glass @@ -112,7 +137,7 @@ /datum/material/diamond name="Diamond" - id="diamond" + id=MAT_DIAMOND value=40 oretype=/obj/item/weapon/ore/diamond sheettype=/obj/item/stack/sheet/mineral/diamond @@ -120,7 +145,7 @@ /datum/material/plasma name="Plasma" - id="plasma" + id=MAT_PLASMA value=40 oretype=/obj/item/weapon/ore/plasma sheettype=/obj/item/stack/sheet/mineral/plasma @@ -128,7 +153,7 @@ /datum/material/gold name="Gold" - id="gold" + id=MAT_GOLD value=20 oretype=/obj/item/weapon/ore/gold sheettype=/obj/item/stack/sheet/mineral/gold @@ -136,7 +161,7 @@ /datum/material/silver name="Silver" - id="silver" + id=MAT_SILVER value=20 oretype=/obj/item/weapon/ore/silver sheettype=/obj/item/stack/sheet/mineral/silver @@ -144,7 +169,7 @@ /datum/material/uranium name="Uranium" - id="uranium" + id=MAT_URANIUM value=20 oretype=/obj/item/weapon/ore/uranium sheettype=/obj/item/stack/sheet/mineral/uranium @@ -152,7 +177,7 @@ /datum/material/clown name="Bananium" - id="clown" + id=MAT_CLOWN value=100 oretype=/obj/item/weapon/ore/clown sheettype=/obj/item/stack/sheet/mineral/clown @@ -160,7 +185,7 @@ /datum/material/phazon name="Phazon" - id="phazon" + id=MAT_PHAZON value=200 oretype=/obj/item/weapon/ore/phazon sheettype=/obj/item/stack/sheet/mineral/phazon @@ -168,7 +193,7 @@ /datum/material/plastic name="Plastic" - id="plastic" + id=MAT_PLASTIC value=1 oretype=null sheettype=/obj/item/stack/sheet/mineral/plastic diff --git a/code/modules/mining/mine_items.dm b/code/modules/mining/mine_items.dm index f19a5cc5e5d..99ac31781d1 100644 --- a/code/modules/mining/mine_items.dm +++ b/code/modules/mining/mine_items.dm @@ -181,7 +181,7 @@ proc/move_mining_shuttle() throwforce = 4.0 item_state = "pickaxe" w_class = 4.0 - m_amt = 3750 //one sheet, but where can you make them? + starting_materials = list(MAT_IRON = 3750) //one sheet, but where can you make them? w_type = RECYK_METAL var/digspeed = 40 //moving the delay to an item var so R&D can make improved picks. --NEO origin_tech = "materials=1;engineering=1" diff --git a/code/modules/mining/mint.dm b/code/modules/mining/mint.dm index 16850d8535f..6ba81905ee3 100644 --- a/code/modules/mining/mint.dm +++ b/code/modules/mining/mint.dm @@ -8,7 +8,8 @@ anchored = 1 var/obj/machinery/mineral/input = null var/obj/machinery/mineral/output = null - var/list/ore = list() + + starting_materials = list() //makes the new empty datum var/newCoins = 0 //how many coins the machine made in it's last load var/processing = 0 @@ -26,12 +27,6 @@ src.output = locate(/obj/machinery/mineral/output, get_step(src, dir)) if(src.output) break - for(var/oredata in typesof(/datum/material) - /datum/material) - var/datum/material/ore_datum = new oredata - // Only add ores that can be run through the minter. - if(ore_datum.cointype) - ore[ore_datum.id]=ore_datum - return return @@ -41,10 +36,10 @@ var/obj/item/stack/sheet/O O = locate(/obj/item/stack/sheet, input.loc) if(O) - for(var/ore_id in ore) - var/datum/material/po =ore[ore_id] + for(var/ore_id in materials.storage) + var/datum/material/po = materials.getMaterial(ore_id) if (po.cointype && istype(O,po.sheettype)) - po.stored += 5 * O.amount // 100/20 = 5 coins per sheet. + materials.addAmount(ore_id, 5 * O.amount) // 100/20 = 5 coins per sheet. qdel(O) break @@ -110,13 +105,13 @@ a.notsmelting { "} var/nloaded=0 - for(var/ore_id in ore) - var/datum/material/ore_info=ore[ore_id] - if(ore_info.stored && ore_info.cointype) + for(var/ore_id in materials.storage) + var/datum/material/ore_info = materials.getMaterial(ore_id) + if(materials.storage[ore_id] && ore_info.cointype) html += {" [ore_info.processed_name] - [ore_info.stored] + [materials.storage[ore_id]] 0 && coinsToProduce > 0) + while(materials.storage[chosen] > 0 && coinsToProduce > 0) if (locate(/obj/item/weapon/moneybag,output.loc)) M = locate(/obj/item/weapon/moneybag,output.loc) else M = new/obj/item/weapon/moneybag(output.loc) new po.cointype(M) - po.stored-- - ore[chosen]=po + materials.removeAmount(chosen, 1) coinsToProduce-- newCoins++ src.updateUsrDialog() diff --git a/code/modules/mining/money_bag.dm b/code/modules/mining/money_bag.dm index 6abb91b8b7f..853a0a49223 100644 --- a/code/modules/mining/money_bag.dm +++ b/code/modules/mining/money_bag.dm @@ -10,25 +10,25 @@ throwforce = 2.0 w_class = 4.0 + var/datum/materials/coin_value + /obj/item/weapon/moneybag/attack_hand(user as mob) var/credits=0 - var/list/ore=list() - for(var/oredata in typesof(/datum/material) - /datum/material) - var/datum/material/ore_datum = new oredata - ore[ore_datum.id]=ore_datum + if(!coin_value) + coin_value = getFromDPool(/datum/materials) + else + coin_value.resetVariables() //make its storage be 0 for (var/obj/item/weapon/coin/C in contents) if (istype(C,/obj/item/weapon/coin)) - var/datum/material/ore_info=ore[C.material] - ore_info.stored++ - ore[C.material]=ore_info + coin_value.addAmount(C.material, 1) credits += C.credits var/dat = "The contents of the moneybag reveal...Total haul: $[credits]" user << browse("[dat]", "window=moneybag") @@ -41,7 +41,7 @@ if (istype(W, /obj/item/weapon/moneybag)) var/obj/item/weapon/moneybag/C = W for (var/obj/O in C.contents) - contents += O; + contents += O user << "You empty the [C.name] into the bag." return diff --git a/code/modules/mining/ores_coins.dm b/code/modules/mining/ores_coins.dm index 877f646ea29..fdcf0b05317 100644 --- a/code/modules/mining/ores_coins.dm +++ b/code/modules/mining/ores_coins.dm @@ -18,21 +18,21 @@ name = "Uranium ore" icon_state = "Uranium ore" origin_tech = "materials=5" - material="uranium" + material=MAT_URANIUM melt_temperature = 1070+T0C /obj/item/weapon/ore/iron name = "Iron ore" icon_state = "Iron ore" origin_tech = "materials=1" - material="iron" + material=MAT_IRON melt_temperature = MELTPOINT_STEEL /obj/item/weapon/ore/glass name = "Sand" icon_state = "Glass ore" origin_tech = "materials=1" - material="glass" + material=MAT_GLASS melt_temperature = MELTPOINT_GLASS attack_self(mob/living/user as mob) //It's magic I ain't gonna explain how instant conversion with no tool works. -- Urist @@ -47,34 +47,34 @@ name = "Plasma ore" icon_state = "Plasma ore" origin_tech = "materials=2" - material="plasma" + material=MAT_PLASMA melt_temperature = MELTPOINT_STEEL+500 /obj/item/weapon/ore/silver name = "Silver ore" icon_state = "Silver ore" origin_tech = "materials=3" - material="silver" + material=MAT_SILVER melt_temperature = 961+T0C /obj/item/weapon/ore/gold name = "Gold ore" icon_state = "Gold ore" origin_tech = "materials=4" - material="gold" + material=MAT_GOLD melt_temperature = 1064+T0C /obj/item/weapon/ore/diamond name = "Diamond ore" icon_state = "Diamond ore" origin_tech = "materials=6" - material="diamond" + material=MAT_DIAMOND /obj/item/weapon/ore/clown name = "Bananium ore" icon_state = "Clown ore" origin_tech = "materials=4" - material="clown" + material=MAT_CLOWN melt_temperature = MELTPOINT_GLASS /obj/item/weapon/ore/phazon @@ -82,7 +82,7 @@ desc = "What the fuck?" icon_state = "Phazon ore" origin_tech = "materials=7" - material="phazon" + material=MAT_PHAZON melt_temperature = MELTPOINT_GLASS /obj/item/weapon/ore/slag @@ -298,7 +298,7 @@ throwforce = 0.0 w_class = 1.0 var/string_attached - var/material="iron" // Ore ID, used with coinbags. + var/material=MAT_IRON // Ore ID, used with coinbags. var/credits = 0 // How many credits is this coin worth? /obj/item/weapon/coin/New() @@ -313,55 +313,55 @@ return w_type /obj/item/weapon/coin/gold - material="gold" + material=MAT_GOLD name = "Gold coin" icon_state = "coin_gold" credits = 5 melt_temperature=1064+T0C /obj/item/weapon/coin/silver - material="silver" + material=MAT_SILVER name = "Silver coin" icon_state = "coin_silver" credits = 1 melt_temperature=961+T0C /obj/item/weapon/coin/diamond - material="diamond" + material=MAT_DIAMOND name = "Diamond coin" icon_state = "coin_diamond" credits = 25 /obj/item/weapon/coin/iron - material="iron" + material=MAT_IRON name = "Iron coin" icon_state = "coin_iron" credits = 0.01 melt_temperature=MELTPOINT_STEEL /obj/item/weapon/coin/plasma - material="plasma" + material=MAT_PLASMA name = "Solid plasma coin" icon_state = "coin_plasma" credits = 0.1 melt_temperature=MELTPOINT_STEEL+500 /obj/item/weapon/coin/uranium - material="uranium" + material=MAT_URANIUM name = "Uranium coin" icon_state = "coin_uranium" credits = 25 melt_temperature=1070+T0C /obj/item/weapon/coin/clown - material="clown" + material=MAT_CLOWN name = "Bananaium coin" icon_state = "coin_clown" credits = 1000 melt_temperature=MELTPOINT_GLASS /obj/item/weapon/coin/phazon - material="phazon" + material=MAT_PHAZON name = "Phazon coin" icon_state = "coin_phazon" credits = 2000 diff --git a/code/modules/mining/satchel_ore_boxdm.dm b/code/modules/mining/satchel_ore_boxdm.dm index 83f9aed6082..a247c7d5aa3 100644 --- a/code/modules/mining/satchel_ore_boxdm.dm +++ b/code/modules/mining/satchel_ore_boxdm.dm @@ -7,11 +7,7 @@ name = "Ore Box" desc = "A heavy box used for storing ore." density = 1 - var/datum/materials/materials - -/obj/structure/ore_box/New() - . = ..() - materials = new + starting_materials = list() /obj/structure/ore_box/attackby(obj/item/weapon/W as obj, mob/user as mob) if (istype(W, /obj/item/weapon/ore)) @@ -36,8 +32,8 @@ var/dat = "The contents of the ore box reveal...Empty box" user << browse("[dat]", "window=orebox") @@ -51,9 +47,10 @@ if(href_list["removeall"]) for(var/ore_id in materials.storage) var/datum/material/mat = materials.getMaterial(ore_id) - for(var/i=0;iYou empty the box
" src.updateUsrDialog() return diff --git a/code/modules/mining/smelting.dm b/code/modules/mining/smelting.dm index ab2ce25f3d2..39338d256b2 100644 --- a/code/modules/mining/smelting.dm +++ b/code/modules/mining/smelting.dm @@ -8,7 +8,6 @@ var/sufficient_ore=1 var/matching_ingredient_count=0 for(var/ore_id in P.ore.storage) - var/datum/material/po=P.ore.getMaterial(ore_id) var/required=(ore_id in ingredients) var/selected=(ore_id in P.selected) @@ -24,7 +23,7 @@ // Selected, in ingredients, but not enough in stock. if(selected && required) - if(po.stored < min_ore_required) + if(P.ore.storage[ore_id] < min_ore_required) sufficient_ore=0 continue @@ -39,65 +38,65 @@ /datum/smelting_recipe/glass name="Glass" ingredients=list( - "glass"=1 + MAT_GLASS=1 ) yieldtype=/obj/item/stack/sheet/glass/glass /datum/smelting_recipe/rglass name="Reinforced Glass" ingredients=list( - "glass"=1, - "iron"=1 + MAT_GLASS=1, + MAT_IRON=1 ) yieldtype=/obj/item/stack/sheet/glass/rglass /datum/smelting_recipe/gold name="Gold" ingredients=list( - "gold"=1 + MAT_GOLD=1 ) yieldtype=/obj/item/stack/sheet/mineral/gold /datum/smelting_recipe/silver name="Silver" ingredients=list( - "silver"=1 + MAT_SILVER=1 ) yieldtype=/obj/item/stack/sheet/mineral/silver /datum/smelting_recipe/diamond name="Diamond" ingredients=list( - "diamond"=1 + MAT_DIAMOND=1 ) yieldtype=/obj/item/stack/sheet/mineral/diamond /datum/smelting_recipe/plasma name="Plasma" ingredients=list( - "plasma"=1 + MAT_PLASMA=1 ) yieldtype=/obj/item/stack/sheet/mineral/plasma /datum/smelting_recipe/uranium name="Uranium" ingredients=list( - "uranium"=1 + MAT_URANIUM=1 ) yieldtype=/obj/item/stack/sheet/mineral/uranium /datum/smelting_recipe/metal name="Metal" ingredients=list( - "iron"=1 + MAT_IRON=1 ) yieldtype=/obj/item/stack/sheet/metal /datum/smelting_recipe/plasteel name="Plasteel" ingredients=list( - "iron"=1, - "plasma"=1 + MAT_IRON=1, + MAT_PLASMA=1 ) yieldtype=/obj/item/stack/sheet/plasteel @@ -111,31 +110,31 @@ /datum/smelting_recipe/plasma_glass name="Plasma Glass" ingredients=list( - "plasma"=1, - "glass"=1 + MAT_PLASMA=1, + MAT_GLASS=1 ) yieldtype=/obj/item/stack/sheet/glass/plasmaglass /datum/smelting_recipe/plasma_rglass name="Reinforced Plasma Glass" ingredients=list( - "plasma"=1, - "glass"=1, - "iron"=1 + MAT_PLASMA=1, + MAT_GLASS=1, + MAT_IRON=1 ) yieldtype=/obj/item/stack/sheet/glass/plasmarglass /datum/smelting_recipe/phazon name="phazon" ingredients=list( - "phazon"=1 + MAT_PHAZON=1 ) yieldtype=/obj/item/stack/sheet/mineral/phazon /datum/smelting_recipe/plastic - name="plastic" + name="Plastic" ingredients=list( - "plastic"=1 + MAT_PLASTIC=1 ) yieldtype=/obj/item/stack/sheet/mineral/plastic diff --git a/code/modules/mob/living/silicon/robot/component.dm b/code/modules/mob/living/silicon/robot/component.dm index 487a5eea9f5..f18d8341445 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 = 1.0 throw_speed = 5 throw_range = 10 - m_amt = 200 + starting_materials = list(MAT_IRON = 200) w_type = RECYK_ELECTRONIC origin_tech = "magnets=3;engineering=3" var/mode = 1; diff --git a/code/modules/paperwork/pen.dm b/code/modules/paperwork/pen.dm index c88f8bfd9dc..7143da6cd99 100644 --- a/code/modules/paperwork/pen.dm +++ b/code/modules/paperwork/pen.dm @@ -14,7 +14,7 @@ // This WAS a macro, but BYOND a shit. /proc/REG_BBTAG(x) return "\\\[[x]\\\]" - + // [x]blah[/x] /proc/REG_BETWEEN_BBTAG(x) return "[REG_BBTAG(x)]([REG_NOTBB])[REG_BBTAG("/[x]")]" @@ -67,7 +67,7 @@ // Fallthrough just fucking kills the tag addReplacement(REG_BBTAG("\[^\\\]\]"), "") return - + //var/stdshellout_dllFile = 'byond_markdown.dll' var/paperwork = 0 var/paperwork_library @@ -76,9 +76,9 @@ var/paperwork_library set category = "Debug" set name = "Modify Paperwork Mode" - + if(!check_rights(R_DEBUG)) return - + if(!paperwork) paperwork_setup() else @@ -101,7 +101,7 @@ var/paperwork_library else return 0 return 0 - + /proc/paperwork_stop() if(!fexists(paperwork_library)) world.log << "Paperwork file may be missing or something terrible has happened, don't panic and notify a coder/host about this issue." @@ -111,12 +111,12 @@ var/paperwork_library return else return - + /datum/writing_style/proc/parse_markdown(command_args) // if(!fexists("byond_markdown.dll")){fcopy(stdshellout_dllFile,"[stdshellout_dllFile]")} return call(paperwork_library,"render_html")(command_args) - + /datum/writing_style/proc/Format(var/t, var/obj/item/weapon/pen/P, var/mob/user, var/obj/item/weapon/paper/paper) if(paperwork) t = parse_markdown(t) @@ -175,7 +175,7 @@ var/paperwork_library w_class = 1.0 throw_speed = 7 throw_range = 15 - m_amt = 10 + starting_materials = list(MAT_IRON = 10) w_type = RECYK_MISC pressure_resistance = 2 diff --git a/code/modules/paperwork/photography.dm b/code/modules/paperwork/photography.dm index e5587ec4347..eda74eed34f 100644 --- a/code/modules/paperwork/photography.dm +++ b/code/modules/paperwork/photography.dm @@ -105,7 +105,7 @@ flags = FPRINT siemens_coefficient = 1 slot_flags = SLOT_BELT - m_amt = 2000 + starting_materials = list(MAT_IRON = 2000) w_type = RECYK_ELECTRONIC min_harm_label = 3 harm_label_examine = list("A tiny label is on the lens.", "A label covers the lens!") diff --git a/code/modules/paperwork/stamps.dm b/code/modules/paperwork/stamps.dm index 3c034a81621..1f917e1ee8e 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 + starting_materials = list(MAT_IRON = 60) w_type = RECYK_MISC _color = "cargo" pressure_resistance = 2 diff --git a/code/modules/power/antimatter/shielding.dm b/code/modules/power/antimatter/shielding.dm index f19c66d50b9..d1d2ec63164 100644 --- a/code/modules/power/antimatter/shielding.dm +++ b/code/modules/power/antimatter/shielding.dm @@ -242,7 +242,7 @@ proc/cardinalrange(var/center) throwforce = 5 throw_speed = 1 throw_range = 2 - m_amt = CC_PER_SHEET_METAL*2 + starting_materials = list(MAT_IRON = CC_PER_SHEET_METAL*2) w_type = RECYK_METAL /obj/item/device/am_shielding_container/attackby(var/obj/item/I, var/mob/user) diff --git a/code/modules/power/lighting.dm b/code/modules/power/lighting.dm index f8ca43d2233..91601b0415f 100644 --- a/code/modules/power/lighting.dm +++ b/code/modules/power/lighting.dm @@ -597,7 +597,7 @@ var/global/list/obj/machinery/light/alllights = list() var/status = 0 // LIGHT_OK, LIGHT_BURNED or LIGHT_BROKEN var/base_state var/switchcount = 0 // number of times switched - m_amt = 60 + starting_materials = list(MAT_IRON = 60) var/rigged = 0 // true if rigged to explode var/brightness_range = 2 //how much light it gives off var/brightness_power = 1 @@ -611,7 +611,7 @@ var/global/list/obj/machinery/light/alllights = list() icon_state = "tube" base_state = "tube" item_state = "c_tube" - g_amt = 100 + starting_materials = list(MAT_GLASS = 100) w_type = RECYK_GLASS brightness_range = 8 brightness_power = 3 @@ -637,10 +637,10 @@ var/global/list/obj/machinery/light/alllights = list() base_state = "bulb" item_state = "contvapour" fitting = "bulb" - g_amt = 100 brightness_range = 5 brightness_power = 2 brightness_color = "#a0a080" + starting_materials = list(MAT_GLASS = 100) cost = 5 w_type = RECYK_GLASS @@ -661,9 +661,9 @@ var/global/list/obj/machinery/light/alllights = list() icon_state = "fbulb" base_state = "fbulb" item_state = "egg4" - g_amt = 100 brightness_range = 5 brightness_power = 2 + starting_materials = list(MAT_GLASS = 100) // update the icon state and description of the light diff --git a/code/modules/projectiles/ammunition.dm b/code/modules/projectiles/ammunition.dm index 4daf13ede24..89d98b4a1e0 100644 --- a/code/modules/projectiles/ammunition.dm +++ b/code/modules/projectiles/ammunition.dm @@ -37,7 +37,7 @@ siemens_coefficient = 1 slot_flags = SLOT_BELT item_state = "syringe_kit" - m_amt = 50000 + starting_materials = list(MAT_IRON = 50000) w_type = RECYK_METAL throwforce = 2 w_class = 1.0 diff --git a/code/modules/projectiles/ammunition/bullets.dm b/code/modules/projectiles/ammunition/bullets.dm index ee17c989607..c9ce364a0f5 100644 --- a/code/modules/projectiles/ammunition/bullets.dm +++ b/code/modules/projectiles/ammunition/bullets.dm @@ -72,7 +72,7 @@ icon_state = "gshell" caliber = "shotgun" projectile_type = "/obj/item/projectile/bullet" - m_amt = 12500 + starting_materials = list(MAT_IRON = 12500) w_type = RECYK_METAL update_icon() @@ -86,17 +86,15 @@ desc = "A blank shell." icon_state = "blshell" projectile_type = "" - m_amt = 250 + starting_materials = list(MAT_IRON = 250) w_type = RECYK_METAL - - /obj/item/ammo_casing/shotgun/beanbag name = "beanbag shell" desc = "A weak beanbag shell." icon_state = "bshell" projectile_type = "/obj/item/projectile/bullet/weakbullet" - m_amt = 500 + starting_materials = list(MAT_IRON = 500) w_type = RECYK_METAL /obj/item/ammo_casing/shotgun/fakebeanbag @@ -104,7 +102,7 @@ desc = "A weak beanbag shell." icon_state = "bshell" projectile_type = "/obj/item/projectile/bullet/weakbullet/booze" - m_amt = 12500 + starting_materials = list(MAT_IRON = 12500) w_type = RECYK_METAL /obj/item/ammo_casing/shotgun/stunshell @@ -112,16 +110,15 @@ desc = "A stunning shell." icon_state = "stunshell" projectile_type = "/obj/item/projectile/bullet/stunshot" - m_amt = 2500 + starting_materials = list(MAT_IRON = 2500) w_type = RECYK_METAL - /obj/item/ammo_casing/shotgun/dart name = "shotgun darts" desc = "A dart for use in shotguns." icon_state = "blshell" projectile_type = "/obj/item/projectile/bullet/dart" - m_amt = 12500 + starting_materials = list(MAT_IRON = 12500) w_type = RECYK_METAL /obj/item/ammo_casing/a762 diff --git a/code/modules/projectiles/ammunition/flares.dm b/code/modules/projectiles/ammunition/flares.dm index 5d36e5a1995..3e4a9264cf7 100644 --- a/code/modules/projectiles/ammunition/flares.dm +++ b/code/modules/projectiles/ammunition/flares.dm @@ -7,7 +7,7 @@ icon_state = "flareshell" caliber = "flare" projectile_type = "/obj/item/projectile/flare" - m_amt = 1000 + starting_materials = list(MAT_IRON = 1000) w_type = RECYK_METAL w_class = 1.0 var/obj/item/device/flashlight/flare/stored_flare = null diff --git a/code/modules/projectiles/ammunition/rocket.dm b/code/modules/projectiles/ammunition/rocket.dm index 1b1ad5fb086..ad89be48ee5 100644 --- a/code/modules/projectiles/ammunition/rocket.dm +++ b/code/modules/projectiles/ammunition/rocket.dm @@ -4,7 +4,7 @@ icon_state = "rpground" caliber = "rpg" projectile_type = "/obj/item/projectile/rocket" - m_amt = 15000 + starting_materials = list(MAT_IRON = 15000) w_type = RECYK_METAL w_class = 3.0 // Rockets don't exactly fit in pockets and cardboard boxes last I heard, try your backpack diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index e6b213fd8d9..70c32a1870e 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -7,7 +7,7 @@ flags = FPRINT siemens_coefficient = 1 slot_flags = SLOT_BELT - m_amt = 2000 + starting_materials = list(MAT_IRON = 2000) w_type = RECYK_METAL w_class = 3.0 throwforce = 5 diff --git a/code/modules/projectiles/guns/energy/laser.dm b/code/modules/projectiles/guns/energy/laser.dm index 2f522e0eaaf..18a2ffea95f 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 + starting_materials = list(MAT_IRON = 2000) w_type = RECYK_ELECTRONIC 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 b3ca3ff2a71..2fbe4e03840 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 + starting_materials = list(MAT_IRON = 2000) w_type = RECYK_ELECTRONIC origin_tech = "combat=2;magnets=2;syndicate=5" silenced = 1 @@ -104,7 +104,7 @@ desc = "A weapon favored by syndicate infiltration teams." w_class = 4.0 force = 10 - m_amt = 200000 + starting_materials = list(MAT_IRON = 200000) w_type = RECYK_ELECTRONIC 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 7bc208b3319..6ffd55f1fa0 100644 --- a/code/modules/projectiles/guns/projectile.dm +++ b/code/modules/projectiles/guns/projectile.dm @@ -9,7 +9,7 @@ caliber = list("357" = 1) origin_tech = "combat=2;materials=2" w_class = 3.0 - m_amt = 1000 + starting_materials = list(MAT_IRON = 1000) w_type = RECYK_METAL recoil = 1 var/ammo_type = "/obj/item/ammo_casing/a357" diff --git a/code/modules/projectiles/guns/projectile/flare.dm b/code/modules/projectiles/guns/projectile/flare.dm index 4885a10ea98..082179e88b7 100644 --- a/code/modules/projectiles/guns/projectile/flare.dm +++ b/code/modules/projectiles/guns/projectile/flare.dm @@ -10,8 +10,7 @@ item_state = "flaregun" max_shells = 1 w_class = 3.0 - m_amt = 15000 - g_amt = 7500 + starting_materials = list(MAT_IRON = 15000, MAT_GLASS = 7500) w_type = RECYK_METAL force = 4 recoil = 1 diff --git a/code/modules/projectiles/guns/projectile/rocketlauncher.dm b/code/modules/projectiles/guns/projectile/rocketlauncher.dm index f53fd5e4abb..8ec1bca664a 100644 --- a/code/modules/projectiles/guns/projectile/rocketlauncher.dm +++ b/code/modules/projectiles/guns/projectile/rocketlauncher.dm @@ -6,7 +6,7 @@ item_state = "rpg" max_shells = 1 w_class = 4.0 - m_amt = 5000 + starting_materials = list(MAT_IRON = 5000) w_type = RECYK_METAL force = 10 recoil = 5 diff --git a/code/modules/reagents/grenade_launcher.dm b/code/modules/reagents/grenade_launcher.dm index be4755ba141..9673d8ecb32 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 + starting_materials = list(MAT_IRON = 2000) w_type = RECYK_METAL /obj/item/weapon/gun/grenadelauncher/examine(mob/user) diff --git a/code/modules/reagents/reagent_containers/food/drinks.dm b/code/modules/reagents/reagent_containers/food/drinks.dm index 5142ea19919..0201cbcc05f 100644 --- a/code/modules/reagents/reagent_containers/food/drinks.dm +++ b/code/modules/reagents/reagent_containers/food/drinks.dm @@ -743,7 +743,7 @@ /obj/item/weapon/reagent_containers/food/drinks/bottle amount_per_transfer_from_this = 10 volume = 100 - g_amt = 500 + starting_materials = list(MAT_GLASS = 500) bottleheight = 31 melt_temperature = MELTPOINT_GLASS w_type=RECYK_GLASS @@ -764,7 +764,7 @@ item_state = "beer" attack_verb = list("stabbed", "slashed", "attacked") var/icon/broken_outline = icon('icons/obj/drinks.dmi', "broken") - g_amt=500 + starting_materials = list(MAT_GLASS = 500) melt_temperature = MELTPOINT_GLASS w_type=RECYK_GLASS @@ -940,7 +940,7 @@ desc = "Full of vitamins and deliciousness!" icon_state = "orangejuice" item_state = "carton" - g_amt=0 + starting_materials = null New() ..() reagents.add_reagent("orangejuice", 100) @@ -950,7 +950,7 @@ desc = "It's cream. Made from milk. What else did you think you'd find in there?" icon_state = "cream" item_state = "carton" - g_amt=0 + starting_materials = null New() ..() reagents.add_reagent("cream", 100) @@ -960,7 +960,7 @@ desc = "Well, at least it LOOKS like tomato juice. You can't tell with all that redness." icon_state = "tomatojuice" item_state = "carton" - g_amt=0 + starting_materials = null New() ..() reagents.add_reagent("tomatojuice", 100) @@ -970,7 +970,7 @@ desc = "Sweet-sour goodness." icon_state = "limejuice" item_state = "carton" - g_amt=0 + starting_materials = null New() ..() reagents.add_reagent("limejuice", 100) diff --git a/code/modules/reagents/reagent_containers/food/drinks/drinkingglass.dm b/code/modules/reagents/reagent_containers/food/drinks/drinkingglass.dm index 87fc34ed86c..5478501df8e 100644 --- a/code/modules/reagents/reagent_containers/food/drinks/drinkingglass.dm +++ b/code/modules/reagents/reagent_containers/food/drinks/drinkingglass.dm @@ -7,7 +7,7 @@ isGlass = 1 amount_per_transfer_from_this = 10 volume = 50 - g_amt = 500 + starting_materials = list(MAT_GLASS = 500) force = 5 smashtext = "" //due to inconsistencies in the names of the drinks just don't say anything smashname = "broken glass" @@ -508,7 +508,7 @@ isGlass = 0 amount_per_transfer_from_this = 10 volume = 30 - g_amt = 500 + starting_materials = list(MAT_GLASS = 500) on_reagent_change() diff --git a/code/modules/reagents/reagent_containers/food/drinks/jar.dm b/code/modules/reagents/reagent_containers/food/drinks/jar.dm index 3106d13f413..9231da36ed4 100644 --- a/code/modules/reagents/reagent_containers/food/drinks/jar.dm +++ b/code/modules/reagents/reagent_containers/food/drinks/jar.dm @@ -7,7 +7,7 @@ desc = "A jar. You're not sure what it's supposed to hold." icon_state = "jar" item_state = "beaker" - g_amt=500 + starting_materials = list(MAT_GLASS = 500) melt_temperature = MELTPOINT_GLASS w_type=RECYK_GLASS New() diff --git a/code/modules/reagents/reagent_containers/glass.dm b/code/modules/reagents/reagent_containers/glass.dm index 88b84fdcde6..468dc9a9dcb 100644 --- a/code/modules/reagents/reagent_containers/glass.dm +++ b/code/modules/reagents/reagent_containers/glass.dm @@ -104,7 +104,7 @@ icon = 'icons/obj/chemical.dmi' icon_state = "beaker" item_state = "beaker" - g_amt = 500 + starting_materials = list(MAT_GLASS = 500) origin_tech = "materials=1" /obj/item/weapon/reagent_containers/glass/beaker/mop_act(obj/item/weapon/mop/M, mob/user) @@ -181,7 +181,7 @@ name = "large beaker" desc = "A large beaker. Can hold up to 100 units." icon_state = "beakerlarge" - g_amt = 1500 + starting_materials = list(MAT_GLASS = 1500) volume = 100 possible_transfer_amounts = list(5,10,15,25,30,50,100) @@ -196,7 +196,7 @@ name = "stasis beaker" desc = "A beaker powered by experimental bluespace technology. Chemicals are held in stasis and do not react inside of it. Can hold up to 50 units." icon_state = "beakernoreact" - g_amt = 500 + starting_materials = list(MAT_GLASS = 500) volume = 50 flags = FPRINT | OPENCONTAINER | NOREACT origin_tech = "bluespace=3;materials=4" @@ -205,7 +205,7 @@ name = "large stasis beaker" desc = "A beaker powered by experimental bluespace technology. Chemicals are held in stasis and do not react inside of it. Can hold up to 100 units." icon_state = "beakernoreactlarge" - g_amt = 1500 + starting_materials = list(MAT_GLASS = 1500) volume = 100 origin_tech = "bluespace=4;materials=6" @@ -213,7 +213,7 @@ name = "bluespace beaker" desc = "A newly-developed high-capacity beaker, courtesy of bluespace research. Can hold up to 200 units." icon_state = "beakerbluespace" - g_amt = 2000 + starting_materials = list(MAT_GLASS = 2000) volume = 200 w_type = RECYK_GLASS possible_transfer_amounts = list(5,10,15,25,30,50,100,200) @@ -224,7 +224,7 @@ name = "large bluespace beaker" desc = "A prototype ultra-capacity beaker, courtesy of bluespace research. Can hold up to 300 units." icon_state = "beakerbluespacelarge" - g_amt = 5000 + starting_materials = list(MAT_GLASS = 5000) volume = 300 possible_transfer_amounts = list(5,10,15,25,30,50,100,150,200,300) origin_tech = "bluespace=3;materials=5" @@ -233,7 +233,7 @@ name = "vial" desc = "A small glass vial. Can hold up to 25 units." icon_state = "vial" - g_amt = 250 + starting_materials = list(MAT_GLASS = 250) volume = 25 possible_transfer_amounts = list(5,10,15,25) @@ -267,8 +267,7 @@ icon = 'icons/obj/janitor.dmi' icon_state = "bucket" item_state = "bucket" - m_amt = 200 - g_amt = 0 + starting_materials = list(MAT_IRON = 200) w_type = RECYK_METAL w_class = 3.0 amount_per_transfer_from_this = 20 @@ -371,7 +370,7 @@ name = "Kettle" desc = "A pot made for holding hot drinks. Can hold up to 75 units." icon_state = "kettle" - m_amt = 200 + starting_materials = list(MAT_IRON = 200) volume = 75 w_type = RECYK_GLASS amount_per_transfer_from_this = 10 diff --git a/code/modules/reagents/reagent_containers/glass/bottle.dm b/code/modules/reagents/reagent_containers/glass/bottle.dm index 3888ab3aba5..d6db71d93ba 100644 --- a/code/modules/reagents/reagent_containers/glass/bottle.dm +++ b/code/modules/reagents/reagent_containers/glass/bottle.dm @@ -11,7 +11,7 @@ possible_transfer_amounts = list(5,10,15,25,30) flags = FPRINT | OPENCONTAINER volume = 30 - g_amt = 1000 // Half of a circuit board + starting_materials = list(MAT_GLASS = 1000) w_type = RECYK_GLASS melt_temperature = MELTPOINT_GLASS diff --git a/code/modules/reagents/reagent_containers/pill.dm b/code/modules/reagents/reagent_containers/pill.dm index ce0b80e8aac..83d56a34b27 100644 --- a/code/modules/reagents/reagent_containers/pill.dm +++ b/code/modules/reagents/reagent_containers/pill.dm @@ -9,7 +9,8 @@ item_state = "pill" possible_transfer_amounts = null volume = 50 - m_amt = 5 + starting_materials = null +// starting_materials = list(MAT_IRON = 5) //What? w_type = RECYK_METAL New() diff --git a/code/modules/reagents/reagent_containers/syringes.dm b/code/modules/reagents/reagent_containers/syringes.dm index 5111ff4635b..e7d672ed2aa 100644 --- a/code/modules/reagents/reagent_containers/syringes.dm +++ b/code/modules/reagents/reagent_containers/syringes.dm @@ -18,7 +18,7 @@ sharpness = 1 possible_transfer_amounts = null //list(5,10,15) volume = 15 - g_amt = 1000 + starting_materials = list(MAT_GLASS = 1000) w_type = RECYK_GLASS var/mode = SYRINGE_DRAW diff --git a/code/modules/reagents/syringe_gun.dm b/code/modules/reagents/syringe_gun.dm index c08ff6264c3..ff2ed9dd763 100644 --- a/code/modules/reagents/syringe_gun.dm +++ b/code/modules/reagents/syringe_gun.dm @@ -14,7 +14,7 @@ force = 4.0 var/list/syringes = new/list() var/max_syringes = 1 - m_amt = 2000 + starting_materials = list(MAT_IRON = 2000) w_type = RECYK_METAL /obj/item/weapon/gun/syringe/examine(mob/user) diff --git a/code/modules/recycling/disposal-construction.dm b/code/modules/recycling/disposal-construction.dm index a35ead76cfa..9bc895da53e 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 + starting_materials = list(MAT_IRON = 1850) w_type = RECYK_METAL level = 2 var/ptype = 0 diff --git a/code/modules/research/designs.dm b/code/modules/research/designs.dm index 94825f8e99a..3deb23309c7 100644 --- a/code/modules/research/designs.dm +++ b/code/modules/research/designs.dm @@ -43,6 +43,7 @@ The required techs are the following: - Illegal Technologies Research max=8 "syndicate" k */ + #define IMPRINTER 1 //For circuits. Uses glass/chemicals. #define PROTOLATHE 2 //New stuff. Uses glass/metal/chemicals #define AUTOLATHE 4 //Uses glass/metal only. @@ -66,15 +67,6 @@ k var/list/req_lock_access //Sets the access for the lockbox that a locked item spawns in var/category = "Misc" //Primarily used for Mech Fabricators, but can be used for anything -/datum/design/New() - var/list/newmats=list() - for(var/matID in materials) - var/nmid=matID - if(matID == "$iron") - nmid="$iron" - newmats[nmid]=materials[matID] - materials=newmats - //A proc to calculate the reliability of a design based on tech levels and innate modifiers. //Input: A list of /datum/tech; Output: The new reliabilty. /datum/design/proc/CalcReliability(var/list/temp_techs) @@ -89,19 +81,43 @@ k //give it an object or a type //if it gets passed an object, it makes it into a type //it then finds the design which has a buildpath of that type -//confirmed to work by Comic -/datum/proc/FindDesign(var/part as anything) - if(!ispath(part)) - var/obj/thispart = part - part = thispart.type - for(var/thisdesign in typesof(/datum/design)) - var/datum/design/D = new thisdesign - if(initial(D.build_path) == part) - return D - return +//material_strict will check the atom's materials against the design's materials if set to 1, but won't for machines +//If you want to check machine materials strictly as well, set material_strict to 2 +proc/FindDesign(var/atom/part, material_strict = 0) + if(ispath(part)) + return FindTypeDesign(part) + + if(!istype(part)) + return + + for(var/datum/design/D in design_list) + if(D.build_path == part.type) + if(material_strict && ((istype(part, /obj/machinery) && material_strict == 2) || (!istype(part, /obj/machinery) && material_strict))) //if we care about materials, we have to check candidates + var/all_correct = 1 + for(var/matID in D.materials) + if(copytext(matID, 1, 2) == "$" && (part.materials.storage[matID] != D.materials[matID])) //if it's a materal, but it doesn't match the atom's values + all_correct = 0 + break + if(all_correct) + return D + else + return D + +proc/FindTypeDesign(var/part_path) + for(var/datum/design/D in design_list) + if(D.build_path == part_path) + return D + +//Acts as FindDesign, but makes a new design if it doesn't find one +//Doesn't take types for the design creation, so don't rely on it for that +proc/getScanDesign(var/obj/O) + var/datum/design/D = FindDesign(O, 1) //The 1 means we check strict materials - if we don't have materials, we just check the type + if(D) + return D + + else + return new/datum/design/mechanic_design(O) -/datum/proc/FindDesignByID(var/id) - // //sum of the required tech of a design /datum/design/proc/TechTotal() var/total = 0 @@ -127,7 +143,7 @@ k id = "seccamera" req_tech = list("programming" = 2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Console Boards" build_path = /obj/item/weapon/circuitboard/security @@ -137,7 +153,7 @@ k id = "advseccamera" req_tech = list("programming" = 4) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Console Boards" build_path = /obj/item/weapon/circuitboard/security/advanced @@ -147,7 +163,7 @@ k id = "aicore" req_tech = list("programming" = 4, "biotech" = 3) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Machine Boards" build_path = /obj/item/weapon/circuitboard/aicore locked = 1 @@ -159,7 +175,7 @@ k id = "aiupload" req_tech = list("programming" = 4) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Console Boards" build_path = /obj/item/weapon/circuitboard/aiupload locked = 1 @@ -171,7 +187,7 @@ k id = "borgupload" req_tech = list("programming" = 4) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Console Boards" build_path = /obj/item/weapon/circuitboard/borgupload locked = 1 @@ -183,7 +199,7 @@ k id = "med_data" req_tech = list("programming" = 2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Console Boards" build_path = /obj/item/weapon/circuitboard/med_data @@ -193,7 +209,7 @@ k id = "operating" req_tech = list("programming" = 2, "biotech" = 2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Console Boards" build_path = /obj/item/weapon/circuitboard/operating @@ -203,7 +219,7 @@ k id = "pandemic" req_tech = list("programming" = 2, "biotech" = 2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Console Boards" build_path = /obj/item/weapon/circuitboard/pandemic @@ -213,7 +229,7 @@ k id = "cryo" req_tech = list("programming" = 4, "biotech" = 3, "engineering" = 3) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Machine Boards" build_path = /obj/item/weapon/circuitboard/cryo @@ -223,7 +239,7 @@ k id = "chem_dispenser" req_tech = list("programming" = 3, "biotech" = 5, "engineering" = 4) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Machine Boards" build_path = /obj/item/weapon/circuitboard/chem_dispenser @@ -233,7 +249,7 @@ k id = "scan_console" req_tech = list("programming" = 2, "biotech" = 3) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Console Boards" build_path = /obj/item/weapon/circuitboard/scan_consolenew @@ -243,7 +259,7 @@ k id = "comconsole" req_tech = list("programming" = 2, "magnets" = 2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Console Boards" build_path = /obj/item/weapon/circuitboard/communications @@ -253,7 +269,7 @@ k id = "idcardconsole" req_tech = list("programming" = 2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Console Boards" build_path = /obj/item/weapon/circuitboard/card @@ -263,7 +279,7 @@ k id = "crewconsole" req_tech = list("programming" = 3, "magnets" = 2, "biotech" = 2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Console Boards" build_path = /obj/item/weapon/circuitboard/crew @@ -273,7 +289,7 @@ k id = "teleconsole" req_tech = list("programming" = 3, "bluespace" = 2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Console Boards" build_path = /obj/item/weapon/circuitboard/teleporter @@ -283,7 +299,7 @@ k id = "secdata" req_tech = list("programming" = 2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Console Boards" build_path = /obj/item/weapon/circuitboard/secure_data @@ -293,7 +309,7 @@ k id = "atmosalerts" req_tech = list("programming" = 2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Console Boards" build_path = /obj/item/weapon/circuitboard/atmos_alert @@ -303,7 +319,7 @@ k id = "air_management" req_tech = list("programming" = 2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Console Boards" build_path = /obj/item/weapon/circuitboard/air_management @@ -313,7 +329,7 @@ k id = "atmos_automation" req_tech = list("programming" = 3) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Console Boards" build_path = /obj/item/weapon/circuitboard/atmos_automation @@ -323,7 +339,7 @@ k id = "large_tank_control" req_tech = list("programming" = 2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Console Boards" build_path = /obj/item/weapon/circuitboard/large_tank_control @@ -334,7 +350,7 @@ k id = "general_alert" req_tech = list("programming" = 2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/general_alert */ @@ -344,7 +360,7 @@ k id = "robocontrol" req_tech = list("programming" = 4) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Console Boards" build_path = /obj/item/weapon/circuitboard/robotics @@ -354,7 +370,7 @@ k id = "recharge_station" req_tech = list("programming" = 4, "powerstorage" = 3) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Machine Boards" build_path = /obj/item/weapon/circuitboard/recharge_station @@ -364,7 +380,7 @@ k id="smes" req_tech = list("powerstorage" = 4, "engineering" = 4, "programming" = 4) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Machine Boards" build_path = /obj/item/weapon/circuitboard/smes @@ -374,7 +390,7 @@ k id="defib_recharger" req_tech = list("powerstorage" = 2, "engineering" = 2, "programming" = 3, "biotech" = 4) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Machine Boards" build_path = /obj/item/weapon/circuitboard/defib_recharger @@ -384,7 +400,7 @@ k id = "photocopier" req_tech = list ("powerstorage" = 2, "engineering" = 2, "programming" = 4) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Machine Boards" build_path = /obj/item/weapon/circuitboard/photocopier @@ -394,7 +410,7 @@ k id = "freezer" req_tech = list("powerstorage" = 3, "engineering" = 4, "biotech" = 4) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Machine Boards" build_path = /obj/item/weapon/circuitboard/freezer @@ -404,7 +420,7 @@ k id ="heater" req_tech = list("powerstorage" = 3, "engineering" = 5, "biotech"= 4) build_type = IMPRINTER - materials = list ("$glass" = 2000, "sacid" = 20) + materials = list (MAT_GLASS = 2000, "sacid" = 20) category = "Machine Boards" build_path = /obj/item/weapon/circuitboard/heater @@ -414,7 +430,7 @@ k id="chemmaster3000" req_tech = list ("engineering" = 3, "biotech" = 4) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Machine Boards" build_path = /obj/item/weapon/circuitboard/chemmaster3000 @@ -424,7 +440,7 @@ k id="condimaster" req_tech = list ("engineering" = 3, "biotech" = 4) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Machine Boards" build_path = /obj/item/weapon/circuitboard/condimaster @@ -434,7 +450,7 @@ k id="snackbarmachine" req_tech = list ("engineering" = 3, "biotech" = 4) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Machine Boards" build_path = /obj/item/weapon/circuitboard/snackbar_machine @@ -444,7 +460,7 @@ k id = "clonecontrol" req_tech = list("programming" = 3, "biotech" = 3) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Console Boards" build_path = /obj/item/weapon/circuitboard/cloning @@ -454,7 +470,7 @@ k id = "clonepod" req_tech = list("programming" = 3, "biotech" = 3) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Machine Boards" build_path = /obj/item/weapon/circuitboard/clonepod @@ -464,7 +480,7 @@ k id = "clonescanner" req_tech = list("programming" = 3, "biotech" = 3) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Machine Boards" build_path = /obj/item/weapon/circuitboard/clonescanner @@ -474,7 +490,7 @@ k id = "clonescanner" req_tech = list("biotech" = 2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/fullbodyscanner /datum/design/fbs @@ -483,7 +499,7 @@ k id = "clonescanner" req_tech = list("biotech" = 2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/sleeper /datum/design/arcademachine @@ -492,7 +508,7 @@ k id = "arcademachine" req_tech = list("programming" = 1) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Console Boards" build_path = /obj/item/weapon/circuitboard/arcade @@ -502,7 +518,7 @@ k id = "powermonitor" req_tech = list("programming" = 2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Console Boards" build_path = /obj/item/weapon/circuitboard/powermonitor @@ -512,7 +528,7 @@ k id = "apc_board" req_tech = list("powerstorage"=2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Engineering Boards" build_path = /obj/item/weapon/circuitboard/power_control @@ -522,7 +538,7 @@ k id = "solarcontrol" req_tech = list("programming" = 2, "powerstorage" = 2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Console Boards" build_path = /obj/item/weapon/circuitboard/solar_control @@ -532,7 +548,7 @@ k id = "prisonmanage" req_tech = list("programming" = 2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Console Boards" build_path = /obj/item/weapon/circuitboard/prisoner @@ -542,7 +558,7 @@ k id = "mechacontrol" req_tech = list("programming" = 3) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Console Boards" build_path = /obj/item/weapon/circuitboard/mecha_control @@ -552,7 +568,7 @@ k id = "mechapower" req_tech = list("programming" = 2, "powerstorage" = 3) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Console Boards" build_path = /obj/item/weapon/circuitboard/mech_bay_power_console @@ -562,7 +578,7 @@ k id = "rdconsole_core" req_tech = list("programming" = 4) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Console Boards" build_path = /obj/item/weapon/circuitboard/rdconsole @@ -592,7 +608,7 @@ k id = "ordercomp" req_tech = list("programming" = 2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Console Boards" build_path = /obj/item/weapon/circuitboard/ordercomp @@ -602,7 +618,7 @@ k id = "supplycomp" req_tech = list("programming" = 3) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Console Boards" build_path = /obj/item/weapon/circuitboard/supplycomp @@ -612,7 +628,7 @@ k id = "mining" req_tech = list("programming" = 2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Console Boards" build_path = /obj/item/weapon/circuitboard/mining @@ -622,7 +638,7 @@ k id = "comm_monitor" req_tech = list("programming" = 3) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Console Boards" build_path = /obj/item/weapon/circuitboard/comm_monitor @@ -632,7 +648,7 @@ k id = "comm_server" req_tech = list("programming" = 3) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Console Boards" build_path = /obj/item/weapon/circuitboard/comm_server @@ -642,7 +658,7 @@ k id = "traffic_control" req_tech = list("programming" = 5) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Console Boards" build_path = /obj/item/weapon/circuitboard/comm_traffic @@ -652,7 +668,7 @@ k id = "message_monitor" req_tech = list("programming" = 5) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Console Boards" build_path = /obj/item/weapon/circuitboard/message_monitor @@ -662,7 +678,7 @@ k id = "aifixer" req_tech = list("programming" = 3, "biotech" = 2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Console Boards" build_path = /obj/item/weapon/circuitboard/aifixer @@ -672,7 +688,7 @@ k id = "pda_terminal" req_tech = list("programming" = 3, "bluespace"= 2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Console Boards" build_path = /obj/item/weapon/circuitboard/pda_terminal @@ -682,7 +698,7 @@ k id = "pod" req_tech = list("programming" = 2,"engineering" = 4) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Console Boards" build_path = /obj/item/weapon/circuitboard/pod @@ -692,7 +708,7 @@ k id = "pipedispenser" req_tech = list("programming" = 3, "materials" = 3,"engineering" = 2, "powerstorage" = 2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Machine Boards" build_path = /obj/item/weapon/circuitboard/pipedispenser @@ -702,7 +718,7 @@ k id = "dpipedispenser" req_tech = list("programming" = 3, "materials" = 3,"engineering" = 2, "powerstorage" = 2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Machine Boards" build_path = /obj/item/weapon/circuitboard/pipedispenser/disposal @@ -716,7 +732,7 @@ k id = "reverse_engine" req_tech = list("materials" = 6, "programming" = 4, "engineering"= 3, "bluespace"= 3, "powerstorage" = 4) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Machine Boards" build_path = /obj/item/weapon/circuitboard/reverse_engine @@ -726,7 +742,7 @@ k id = "blueprinter" req_tech = list("engineering" = 3, "programming" = 3) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Machine Boards" build_path = /obj/item/weapon/circuitboard/blueprinter @@ -736,7 +752,7 @@ k id = "gen_fab" req_tech = list("materials" = 3, "engineering" = 2, "programming" = 2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Machine Boards" build_path = /obj/item/weapon/circuitboard/generalfab @@ -746,7 +762,7 @@ k id = "flatpacker" req_tech = list("materials" = 5, "engineering" = 4, "powerstorage" = 3, "programming" = 3) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Machine Boards" build_path = /obj/item/weapon/circuitboard/flatpacker @@ -759,7 +775,7 @@ k id = "safeguard_module" req_tech = list("programming" = 3, "materials" = 4) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20, "$gold" = 100) + materials = list(MAT_GLASS = 2000, "sacid" = 20, MAT_GOLD = 100) category = "Module Boards" build_path = /obj/item/weapon/aiModule/targetted/safeguard @@ -769,7 +785,7 @@ k id = "onehuman_module" req_tech = list("programming" = 4, "materials" = 6) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20, "$diamond" = 100) + materials = list(MAT_GLASS = 2000, "sacid" = 20, MAT_DIAMOND = 100) category = "Module Boards" build_path = /obj/item/weapon/aiModule/targetted/oneHuman locked = 1 @@ -781,7 +797,7 @@ k id = "protectstation_module" req_tech = list("programming" = 3, "materials" = 6) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20, "$gold" = 100) + materials = list(MAT_GLASS = 2000, "sacid" = 20, MAT_GOLD = 100) category = "Module Boards" build_path = /obj/item/weapon/aiModule/standard/protectStation @@ -791,7 +807,7 @@ k id = "notele_module" req_tech = list("programming" = 3) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20, "$gold" = 100) + materials = list(MAT_GLASS = 2000, "sacid" = 20, MAT_GOLD = 100) category = "Module Boards" build_path = /obj/item/weapon/aiModule/standard/teleporterOffline @@ -801,7 +817,7 @@ k id = "quarantine_module" req_tech = list("programming" = 3, "biotech" = 2, "materials" = 4) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20, "$gold" = 100) + materials = list(MAT_GLASS = 2000, "sacid" = 20, MAT_GOLD = 100) category = "Module Boards" build_path = /obj/item/weapon/aiModule/standard/quarantine @@ -811,7 +827,7 @@ k id = "oxygen_module" req_tech = list("programming" = 3, "biotech" = 2, "materials" = 4) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20, "$gold" = 100) + materials = list(MAT_GLASS = 2000, "sacid" = 20, MAT_GOLD = 100) category = "Module Boards" build_path = /obj/item/weapon/aiModule/standard/oxygen locked = 1 @@ -823,7 +839,7 @@ k id = "freeform_module" req_tech = list("programming" = 4, "materials" = 4) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20, "$gold" = 100) + materials = list(MAT_GLASS = 2000, "sacid" = 20, MAT_GOLD = 100) category = "Module Boards" build_path = /obj/item/weapon/aiModule/freeform @@ -833,7 +849,7 @@ k id = "reset_module" req_tech = list("programming" = 3, "materials" = 6) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20, "$gold" = 100) + materials = list(MAT_GLASS = 2000, "sacid" = 20, MAT_GOLD = 100) category = "Module Boards" build_path = /obj/item/weapon/aiModule/reset @@ -843,7 +859,7 @@ k id = "purge_module" req_tech = list("programming" = 4, "materials" = 6) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20, "$diamond" = 100) + materials = list(MAT_GLASS = 2000, "sacid" = 20, MAT_DIAMOND = 100) category = "Module Boards" build_path = /obj/item/weapon/aiModule/purge @@ -853,7 +869,7 @@ k id = "freeformcore_module" req_tech = list("programming" = 4, "materials" = 6) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20, "$diamond" = 100) + materials = list(MAT_GLASS = 2000, "sacid" = 20, MAT_DIAMOND = 100) category = "Module Boards" build_path = /obj/item/weapon/aiModule/freeform/core @@ -863,7 +879,7 @@ k id = "asimov_module" req_tech = list("programming" = 3, "materials" = 6) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20, "$diamond" = 100) + materials = list(MAT_GLASS = 2000, "sacid" = 20, MAT_DIAMOND = 100) category = "Module Boards" build_path = /obj/item/weapon/aiModule/core/asimov @@ -873,7 +889,7 @@ k id = "paladin_module" req_tech = list("programming" = 4, "materials" = 6) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20, "$diamond" = 100) + materials = list(MAT_GLASS = 2000, "sacid" = 20, MAT_DIAMOND = 100) category = "Module Boards" build_path = /obj/item/weapon/aiModule/core/paladin @@ -883,7 +899,7 @@ k id = "tyrant_module" req_tech = list("programming" = 4, "syndicate" = 2, "materials" = 6) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20, "$diamond" = 100) + materials = list(MAT_GLASS = 2000, "sacid" = 20, MAT_DIAMOND = 100) category = "Module Boards" build_path = /obj/item/weapon/aiModule/core/tyrant locked = 1 @@ -898,7 +914,7 @@ k id = "s-receiver" req_tech = list("programming" = 4, "engineering" = 3, "bluespace" = 2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Machine Boards" build_path = /obj/item/weapon/circuitboard/telecomms/receiver @@ -908,7 +924,7 @@ k id = "s-bus" req_tech = list("programming" = 4, "engineering" = 4) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Machine Boards" build_path = /obj/item/weapon/circuitboard/telecomms/bus @@ -918,7 +934,7 @@ k id = "s-hub" req_tech = list("programming" = 4, "engineering" = 4) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Machine Boards" build_path = /obj/item/weapon/circuitboard/telecomms/hub @@ -928,7 +944,7 @@ k id = "s-relay" req_tech = list("programming" = 3, "engineering" = 4, "bluespace" = 3) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Machine Boards" build_path = /obj/item/weapon/circuitboard/telecomms/relay @@ -938,7 +954,7 @@ k id = "s-processor" req_tech = list("programming" = 4, "engineering" = 4) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Machine Boards" build_path = /obj/item/weapon/circuitboard/telecomms/processor @@ -948,7 +964,7 @@ k id = "s-server" req_tech = list("programming" = 4, "engineering" = 4) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Machine Boards" build_path = /obj/item/weapon/circuitboard/telecomms/server @@ -958,7 +974,7 @@ k id = "s-broadcaster" req_tech = list("programming" = 4, "engineering" = 4, "bluespace" = 2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Machine Boards" build_path = /obj/item/weapon/circuitboard/telecomms/broadcaster @@ -968,7 +984,7 @@ k id = "s-bioprinter" req_tech = list("programming" = 3, "engineering" = 2, "biotech" = 3) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Machine Boards" build_path = /obj/item/weapon/circuitboard/bioprinter @@ -983,7 +999,7 @@ k id = "intellicard" req_tech = list("programming" = 4, "materials" = 4) build_type = PROTOLATHE - materials = list("$glass" = 1000, "$gold" = 200) + materials = list(MAT_GLASS = 1000, MAT_GOLD = 200) category = "Data" build_path = /obj/item/device/aicard @@ -993,7 +1009,7 @@ k id = "paicard" req_tech = list("programming" = 2) build_type = PROTOLATHE - materials = list("$glass" = 500, "$iron" = 500) + materials = list(MAT_GLASS = 500, MAT_IRON = 500) category = "Data" build_path = /obj/item/device/paicard @@ -1003,7 +1019,7 @@ k id = "posibrain" req_tech = list("engineering" = 4, "materials" = 6, "bluespace" = 2, "programming" = 4) build_type = PROTOLATHE - materials = list("$iron" = 2000, "$glass" = 1000, "$silver" = 1000, "$gold" = 500, "$plasma" = 500, "$diamond" = 100) + materials = list(MAT_IRON = 2000, MAT_GLASS = 1000, MAT_SILVER = 1000, MAT_GOLD = 500, MAT_PLASMA = 500, MAT_DIAMOND = 100) category = "Robotics" build_path = /obj/item/device/mmi/posibrain @@ -1013,7 +1029,7 @@ k id = "np_dispenser" req_tech = list("programming" = 2, "materials" = 2) build_type = PROTOLATHE - materials = list("$glass" = 500, "$iron" = 1000, "$gold" = 500) + materials = list(MAT_GLASS = 500, MAT_IRON = 1000, MAT_GOLD = 500) category = "Data" build_path = /obj/item/weapon/paper_bin/nano @@ -1027,7 +1043,7 @@ k id = "ripley_main" req_tech = list("programming" = 3) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Mecha Boards" build_path = /obj/item/weapon/circuitboard/mecha/ripley/main @@ -1037,7 +1053,7 @@ k id = "ripley_peri" req_tech = list("programming" = 3) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Mecha Boards" build_path = /obj/item/weapon/circuitboard/mecha/ripley/peripherals @@ -1047,7 +1063,7 @@ k id = "odysseus_main" req_tech = list("programming" = 3,"biotech" = 2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Mecha Boards" build_path = /obj/item/weapon/circuitboard/mecha/odysseus/main @@ -1057,7 +1073,7 @@ k id = "odysseus_peri" req_tech = list("programming" = 3,"biotech" = 2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Mecha Boards" build_path = /obj/item/weapon/circuitboard/mecha/odysseus/peripherals @@ -1067,7 +1083,7 @@ k id = "phazon_main" req_tech = list("materials" = 9,"bluespace" = 10) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Mecha Boards" build_path = /obj/item/weapon/circuitboard/mecha/phazon/main @@ -1077,7 +1093,7 @@ k id = "phazon_peri" req_tech = list("materials" = 9,"bluespace" = 10) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Mecha Boards" build_path = /obj/item/weapon/circuitboard/mecha/phazon/peripherals @@ -1087,7 +1103,7 @@ k id = "phazon_phasearray" req_tech = list("bluespace" = 10, "programming" = 4) build_type = MECHFAB - materials = list("$iron" = 5000, "$phazon" = 2000) + materials = list(MAT_IRON = 5000, MAT_PHAZON = 2000) category = "Exosuit_Modules" build_path = /obj/item/mecha_parts/part/phazon_phase_array @@ -1097,7 +1113,7 @@ k id = "gygax_main" req_tech = list("programming" = 4) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Mecha Boards" build_path = /obj/item/weapon/circuitboard/mecha/gygax/main @@ -1107,7 +1123,7 @@ k id = "gygax_peri" req_tech = list("programming" = 4) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Mecha Boards" build_path = /obj/item/weapon/circuitboard/mecha/gygax/peripherals @@ -1117,7 +1133,7 @@ k id = "gygax_targ" req_tech = list("programming" = 4, "combat" = 2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Mecha Boards" build_path = /obj/item/weapon/circuitboard/mecha/gygax/targeting @@ -1127,7 +1143,7 @@ k id = "durand_main" req_tech = list("programming" = 4) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Mecha Boards" build_path = /obj/item/weapon/circuitboard/mecha/durand/main @@ -1137,7 +1153,7 @@ k id = "durand_peri" req_tech = list("programming" = 4) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Mecha Boards" build_path = /obj/item/weapon/circuitboard/mecha/durand/peripherals @@ -1147,7 +1163,7 @@ k id = "durand_targ" req_tech = list("programming" = 4, "combat" = 2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Mecha Boards" build_path = /obj/item/weapon/circuitboard/mecha/durand/targeting @@ -1157,7 +1173,7 @@ k id = "honker_main" req_tech = list("programming" = 3) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Mecha Boards" build_path = /obj/item/weapon/circuitboard/mecha/honker/main @@ -1167,7 +1183,7 @@ k id = "honker_peri" req_tech = list("programming" = 3) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Mecha Boards" build_path = /obj/item/weapon/circuitboard/mecha/honker/peripherals @@ -1177,7 +1193,7 @@ k id = "honker_targ" req_tech = list("programming" = 3) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Mecha Boards" build_path = /obj/item/weapon/circuitboard/mecha/honker/targeting @@ -1187,7 +1203,7 @@ k id = "spacepod_main" req_tech = list("programming" = 4) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Misc" build_path = /obj/item/weapon/circuitboard/mecha/pod @@ -1204,7 +1220,7 @@ k build_path = /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/scattershot category = "Exosuit_Weapons" locked = 1 - materials = list("$iron"=10000) + materials = list(MAT_IRON=10000) /datum/design/mech_lmg name = "Weapon Design (Ultra AC 2)" @@ -1215,7 +1231,7 @@ k build_path = /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/lmg category = "Exosuit_Weapons" locked = 1 - materials = list("$iron"=10000) + materials = list(MAT_IRON=10000) /datum/design/mech_taser name = "Weapon Design (PBT \"Pacifier\" Taser)" @@ -1226,7 +1242,7 @@ k build_path = /obj/item/mecha_parts/mecha_equipment/weapon/energy/taser category = "Exosuit_Weapons" locked = 1 - materials = list("$iron"=10000) + materials = list(MAT_IRON=10000) /datum/design/mech_honker name = "Weapon Design (HoNkER BlAsT 5000)" @@ -1236,7 +1252,7 @@ k req_tech = list("combat" = 1) build_path = /obj/item/mecha_parts/mecha_equipment/weapon/honker category = "Exosuit_Weapons" - materials = list("$iron"=20000,"$clown"=10000) + materials = list(MAT_IRON=20000,MAT_CLOWN=10000) /datum/design/mech_mousetrap name = "Weapon Design (Mousetrap Mortar)" @@ -1246,7 +1262,7 @@ k req_tech = list("combat" = 1) build_path = /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/mousetrap_mortar category = "Exosuit_Weapons" - materials = list("$iron"=20000,"$clown"=5000) + materials = list(MAT_IRON=20000,MAT_CLOWN=5000) /datum/design/mech_banana name = "Weapon Design (Banana Mortar)" @@ -1256,7 +1272,7 @@ k req_tech = list("combat" = 1) build_path = /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/banana_mortar category = "Exosuit_Weapons" - materials = list("$iron"=20000,"$clown"=5000) + materials = list(MAT_IRON=20000,MAT_CLOWN=5000) /datum/design/mech_creampie name = "Weapon Design (Rapid-Fire Cream Pie Mortar)" @@ -1266,7 +1282,7 @@ k req_tech = list("combat" = 1) build_path = /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/creampie_mortar category = "Exosuit_Weapons" - materials = list("$iron"=20000,"$clown"=5000) + materials = list(MAT_IRON=20000,MAT_CLOWN=5000) /datum/design/mech_bolas name = "Weapon Design (PCMK-6 Bolas Launcher)" @@ -1277,7 +1293,7 @@ k build_path = /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/bolas category = "Exosuit_Weapons" locked = 1 - materials = list("$iron"=20000) + materials = list(MAT_IRON=20000) /datum/design/mech_laser name = "Weapon Design (CH-PS \"Immolator\" Laser)" @@ -1288,7 +1304,7 @@ k build_path = /obj/item/mecha_parts/mecha_equipment/weapon/energy/laser category = "Exosuit_Weapons" locked = 1 - materials = list("$iron"=10000) + materials = list(MAT_IRON=10000) /datum/design/mech_laser_heavy name = "Weapon Design (CH-LC \"Solaris\" Laser Cannon)" @@ -1299,7 +1315,7 @@ k build_path = /obj/item/mecha_parts/mecha_equipment/weapon/energy/laser/heavy category = "Exosuit_Weapons" locked = 1 - materials = list("$iron"=10000) + materials = list(MAT_IRON=10000) /datum/design/mech_grenade_launcher name = "Weapon Design (SGL-6 Grenade Launcher)" @@ -1310,7 +1326,7 @@ k build_path = /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/flashbang category = "Exosuit_Weapons" locked = 1 - materials = list("$iron"=10000) + materials = list(MAT_IRON=10000) /datum/design/clusterbang_launcher name = "Module Design (SOP-6 Clusterbang Launcher)" @@ -1321,7 +1337,7 @@ k build_path = /obj/item/mecha_parts/mecha_equipment/weapon/ballistic/missile_rack/flashbang/clusterbang/limited category = "Exosuit_Weapons" locked = 1 - materials = list("$iron"=20000,"$gold"=6000,"$uranium"=6000) + materials = list(MAT_IRON=20000,MAT_GOLD=6000,MAT_URANIUM=6000) /datum/design/mech_wormhole_gen name = "Module Design (Localized Wormhole Generator)" @@ -1331,7 +1347,7 @@ k req_tech = list("bluespace" = 3, "magnets" = 2) build_path = /obj/item/mecha_parts/mecha_equipment/wormhole_generator category = "Exosuit_Tools" - materials = list("$iron"=10000) + materials = list(MAT_IRON=10000) /datum/design/mech_teleporter name = "Module Design (Teleporter Module)" @@ -1341,7 +1357,7 @@ k req_tech = list("bluespace" = 10, "magnets" = 5) build_path = /obj/item/mecha_parts/mecha_equipment/teleporter category = "Exosuit_Tools" - materials = list("$iron"=10000) + materials = list(MAT_IRON=10000) /datum/design/mech_rcd name = "Module Design (RCD Module)" @@ -1351,7 +1367,7 @@ k req_tech = list("materials" = 4, "bluespace" = 3, "magnets" = 4, "powerstorage"=4, "engineering" = 4) build_path = /obj/item/mecha_parts/mecha_equipment/tool/rcd category = "Exosuit_Tools" - materials = list("$iron"=30000,"$plasma"=25000,"$silver"=20000,"$gold"=20000) + materials = list(MAT_IRON=30000,MAT_PLASMA=25000,MAT_SILVER=20000,MAT_GOLD=20000) /datum/design/mech_gravcatapult name = "Module Design (Gravitational Catapult Module)" @@ -1361,7 +1377,7 @@ k req_tech = list("bluespace" = 2, "magnets" = 3, "engineering" = 3) build_path = /obj/item/mecha_parts/mecha_equipment/gravcatapult category = "Exosuit_Tools" - materials = list("$iron"=10000) + materials = list(MAT_IRON=10000) /datum/design/mech_repair_droid name = "Module Design (Repair Droid Module)" @@ -1371,7 +1387,7 @@ k req_tech = list("magnets" = 3, "programming" = 3, "engineering" = 3) build_path = /obj/item/mecha_parts/mecha_equipment/repair_droid category = "Exosuit_Modules" - materials = list("$iron"=10000,"$gold"=1000,"$silver"=2000,"$glass"=5000) + materials = list(MAT_IRON=10000,MAT_GOLD=1000,MAT_SILVER=2000,MAT_GLASS=5000) /* MISSING /datum/design/mech_plasma_generator @@ -1392,7 +1408,7 @@ k req_tech = list("magnets" = 4, "powerstorage" = 3) build_path = /obj/item/mecha_parts/mecha_equipment/tesla_energy_relay category = "Exosuit_Modules" - materials = list("$iron"=10000,"$gold"=2000,"$silver"=3000,"$glass"=2000) + materials = list(MAT_IRON=10000,MAT_GOLD=2000,MAT_SILVER=3000,MAT_GLASS=2000) /datum/design/mech_ccw_armor name = "Module Design(Melee Armor Booster Module)" @@ -1402,7 +1418,7 @@ k req_tech = list("materials" = 5, "combat" = 4) build_path = /obj/item/mecha_parts/mecha_equipment/anticcw_armor_booster category = "Exosuit_Modules" - materials = list("$iron"=20000,"$silver"=5000) + materials = list(MAT_IRON=20000,MAT_SILVER=5000) /datum/design/mech_proj_armor name = "Module Design(Projectile Armor Booster Module)" @@ -1412,7 +1428,7 @@ k req_tech = list("materials" = 5, "combat" = 5, "engineering"=3) build_path = /obj/item/mecha_parts/mecha_equipment/antiproj_armor_booster category = "Exosuit_Modules" - materials = list("$iron"=20000,"$gold"=5000) + materials = list(MAT_IRON=20000,MAT_GOLD=5000) /datum/design/mech_syringe_gun name = "Module Design (Syringe Gun)" @@ -1421,8 +1437,8 @@ k build_type = MECHFAB req_tech = list("materials" = 3, "biotech"=4, "magnets"=4, "programming"=3) build_path = /obj/item/mecha_parts/mecha_equipment/tool/syringe_gun - category = "Exosuit_Tools" //as if it weren't actually a weapon - materials = list("$iron"=3000,"$glass"=2000) + category = "Exosuit_Tools" + materials = list(MAT_IRON=3000,MAT_GLASS=2000) /datum/design/mech_drill name = "Module Design (Mining Drill)" @@ -1432,7 +1448,7 @@ k req_tech = list("materials" = 1, "engineering" = 1) build_path = /obj/item/mecha_parts/mecha_equipment/tool/drill category = "Exosuit_Tools" - materials = list("$iron"=10000) + materials = list(MAT_IRON=10000) /datum/design/mech_diamond_drill name = "Module Design (Diamond Mining Drill)" @@ -1442,7 +1458,7 @@ k req_tech = list("materials" = 4, "engineering" = 3) build_path = /obj/item/mecha_parts/mecha_equipment/tool/drill/diamonddrill category = "Exosuit_Tools" - materials = list("$iron"=10000,"$diamond"=6500) + materials = list(MAT_IRON=10000,MAT_DIAMOND=6500) /datum/design/mech_hydro_clamp name = "Module Design (Hydraulic Clamp)" @@ -1452,7 +1468,7 @@ k req_tech = list("materials" = 1, "engineering" = 1) build_path = /obj/item/mecha_parts/mecha_equipment/tool/hydraulic_clamp category = "Exosuit_Tools" - materials = list("$iron"=10000) + materials = list(MAT_IRON=10000) /datum/design/mech_cable name = "Module Design (Cable Layer)" @@ -1462,7 +1478,7 @@ k req_tech = list("engineering" = 1) build_path = /obj/item/mecha_parts/mecha_equipment/tool/cable_layer category = "Exosuit_Tools" - materials = list("$iron"=10000) + materials = list(MAT_IRON=10000) /datum/design/mech_extinguisher name = "Module Design (Foam Extinguisher)" @@ -1472,7 +1488,7 @@ k req_tech = list("materials" = 1, "engineering" = 2) build_path = /obj/item/mecha_parts/mecha_equipment/tool/extinguisher category = "Exosuit_Tools" - materials = list("$iron"=10000) + materials = list(MAT_IRON=10000) /datum/design/mech_generator_plasma name = "Module Design (Plasma Generator)" @@ -1481,8 +1497,8 @@ k build_type = MECHFAB req_tech = list("engineering" = 1) build_path = /obj/item/mecha_parts/mecha_equipment/generator - category = "Exosuit_Modules" - materials = list("$iron"=10000,"$silver"=500,"$glass"=1000) + category = "Exosuit_Tools" + materials = list(MAT_IRON=10000,MAT_SILVER=500,MAT_GLASS=1000) /datum/design/mech_sleeper name = "Module Design (Mounted Sleeper)" @@ -1492,7 +1508,7 @@ k req_tech = list("biotech" = 1) build_path = /obj/item/mecha_parts/mecha_equipment/tool/sleeper category = "Exosuit_Tools" - materials = list("$iron"=5000,"$glass"=10000) + materials = list(MAT_IRON=5000,MAT_GLASS=10000) /datum/design/mech_generator_nuclear name = "Module Design (ExoNuclear Reactor)" @@ -1502,8 +1518,7 @@ k req_tech = list("powerstorage"= 3, "engineering" = 3, "materials" = 3) build_path = /obj/item/mecha_parts/mecha_equipment/generator/nuclear category = "Exosuit_Modules" - materials = list("$iron"=10000,"$silver"=500,"$glass"=1000) - + materials = list(MAT_IRON=10000,MAT_SILVER=500,MAT_GLASS=1000) /datum/design/firefighter_chassis name = "Structure (Firefighter chassis)" desc = "Used to build a Ripley Firefighter chassis." @@ -1512,8 +1527,7 @@ k build_type = MECHFAB build_path = /obj/item/mecha_parts/chassis/firefighter category = "Exosuit_Modules" - materials = list("$iron"=25000) - + materials = list(MAT_IRON=25000) /datum/design/mech_jail_cell name = "Exosuit Module Design (Mounted Jail Cell)" @@ -1523,7 +1537,7 @@ k req_tech = list("biotech" = 2, "combat" = 4) build_path = /obj/item/mecha_parts/mecha_equipment/tool/jail category = "Exosuit_Tools" - materials = list("$iron"=7500,"$glass"=10000) + materials = list(MAT_IRON=7500,MAT_GLASS=10000) /datum/design/mech_tracker name = "Exosuit Tracking Device" @@ -1533,7 +1547,7 @@ k req_tech = list("engineering" = 1) build_path = /obj/item/mecha_parts/mecha_tracking category = "Misc" - materials = list("$iron"=500) + materials = list(MAT_IRON=500) /datum/design/mech_jetpack name = "Module Design (Exosuit Jetpack)" @@ -1554,7 +1568,7 @@ k id = "design_disk" req_tech = list("programming" = 1) build_type = PROTOLATHE | AUTOLATHE - materials = list("$iron" = 30, "$glass" = 10) + materials = list(MAT_IRON = 30, MAT_GLASS = 10) category = "Data" build_path = /obj/item/weapon/disk/design_disk @@ -1564,7 +1578,7 @@ k id = "tech_disk" req_tech = list("programming" = 1) build_type = PROTOLATHE | AUTOLATHE - materials = list("$iron" = 30, "$glass" = 10) + materials = list(MAT_IRON = 30, MAT_GLASS = 10) category = "Data" build_path = /obj/item/weapon/disk/tech_disk @@ -1578,7 +1592,7 @@ k id = "basic_capacitor" req_tech = list("powerstorage" = 1) build_type = PROTOLATHE | AUTOLATHE - materials = list("$iron" = 50, "$glass" = 50) + materials = list(MAT_IRON = 50, MAT_GLASS = 50) category = "Stock Parts" build_path = /obj/item/weapon/stock_parts/capacitor @@ -1589,7 +1603,7 @@ k id = "basic_sensor" req_tech = list("magnets" = 1) build_type = PROTOLATHE | AUTOLATHE - materials = list("$iron" = 50, "$glass" = 20) + materials = list(MAT_IRON = 50, MAT_GLASS = 20) category = "Stock Parts" build_path = /obj/item/weapon/stock_parts/scanning_module @@ -1599,7 +1613,7 @@ k id = "micro_mani" req_tech = list("materials" = 1, "programming" = 1) build_type = PROTOLATHE | AUTOLATHE - materials = list("$iron" = 30) + materials = list(MAT_IRON = 30) category = "Stock Parts" build_path = /obj/item/weapon/stock_parts/manipulator @@ -1609,7 +1623,7 @@ k id = "basic_micro_laser" req_tech = list("magnets" = 1) build_type = PROTOLATHE | AUTOLATHE - materials = list("$iron" = 10, "$glass" = 20) + materials = list(MAT_IRON = 10, MAT_GLASS = 20) category = "Stock Parts" build_path = /obj/item/weapon/stock_parts/micro_laser @@ -1619,7 +1633,7 @@ k id = "basic_matter_bin" req_tech = list("materials" = 1) build_type = PROTOLATHE | AUTOLATHE - materials = list("$iron" = 80) + materials = list(MAT_IRON = 80) category = "Stock Parts" build_path = /obj/item/weapon/stock_parts/matter_bin @@ -1629,7 +1643,7 @@ k id = "adv_capacitor" req_tech = list("powerstorage" = 3) build_type = PROTOLATHE - materials = list("$iron" = 50, "$glass" = 50) + materials = list(MAT_IRON = 50, MAT_GLASS = 50) category = "Stock Parts" build_path = /obj/item/weapon/stock_parts/capacitor/adv @@ -1640,7 +1654,7 @@ k id = "adv_sensor" req_tech = list("magnets" = 3) build_type = PROTOLATHE - materials = list("$iron" = 50, "$glass" = 20) + materials = list(MAT_IRON = 50, MAT_GLASS = 20) category = "Stock Parts" build_path = /obj/item/weapon/stock_parts/scanning_module/adv @@ -1650,7 +1664,7 @@ k id = "nano_mani" req_tech = list("materials" = 3, "programming" = 2) build_type = PROTOLATHE - materials = list("$iron" = 30) + materials = list(MAT_IRON = 30) category = "Stock Parts" build_path = /obj/item/weapon/stock_parts/manipulator/nano @@ -1660,7 +1674,7 @@ k id = "high_micro_laser" req_tech = list("magnets" = 3) build_type = PROTOLATHE - materials = list("$iron" = 10, "$glass" = 20) + materials = list(MAT_IRON = 10, MAT_GLASS = 20) category = "Stock Parts" build_path = /obj/item/weapon/stock_parts/micro_laser/high @@ -1670,7 +1684,7 @@ k id = "adv_matter_bin" req_tech = list("materials" = 3) build_type = PROTOLATHE - materials = list("$iron" = 80) + materials = list(MAT_IRON = 80) category = "Stock Parts" build_path = /obj/item/weapon/stock_parts/matter_bin/adv @@ -1681,7 +1695,7 @@ k req_tech = list("powerstorage" = 5, "materials" = 4) build_type = PROTOLATHE reliability_base = 71 - materials = list("$iron" = 50, "$glass" = 50, "$gold" = 20) + materials = list(MAT_IRON = 50, MAT_GLASS = 50, MAT_GOLD = 20) category = "Stock Parts" build_path = /obj/item/weapon/stock_parts/capacitor/super @@ -1692,7 +1706,7 @@ k id = "phasic_sensor" req_tech = list("magnets" = 5, "materials" = 3) build_type = PROTOLATHE - materials = list("$iron" = 50, "$glass" = 20, "$silver" = 10) + materials = list(MAT_IRON = 50, MAT_GLASS = 20, MAT_SILVER = 10) reliability_base = 72 category = "Stock Parts" build_path = /obj/item/weapon/stock_parts/scanning_module/phasic @@ -1703,7 +1717,7 @@ k id = "pico_mani" req_tech = list("materials" = 5, "programming" = 2) build_type = PROTOLATHE - materials = list("$iron" = 30) + materials = list(MAT_IRON = 30) reliability_base = 73 category = "Stock Parts" build_path = /obj/item/weapon/stock_parts/manipulator/pico @@ -1714,7 +1728,7 @@ k id = "ultra_micro_laser" req_tech = list("magnets" = 5, "materials" = 5) build_type = PROTOLATHE - materials = list("$iron" = 10, "$glass" = 20, "$uranium" = 10) + materials = list(MAT_IRON = 10, MAT_GLASS = 20, MAT_URANIUM = 10) reliability_base = 70 category = "Stock Parts" build_path = /obj/item/weapon/stock_parts/micro_laser/ultra @@ -1725,7 +1739,7 @@ k id = "super_matter_bin" req_tech = list("materials" = 5) build_type = PROTOLATHE - materials = list("$iron" = 80) + materials = list(MAT_IRON = 80) reliability_base = 75 category = "Stock Parts" build_path = /obj/item/weapon/stock_parts/matter_bin/super @@ -1738,7 +1752,7 @@ k id = "s-ansible" req_tech = list("programming" = 3, "magnets" = 4, "materials" = 4, "bluespace" = 2) build_type = PROTOLATHE - materials = list("$iron" = 80, "$silver" = 20) + materials = list(MAT_IRON = 80, MAT_SILVER = 20) category = "Stock Parts" build_path = /obj/item/weapon/stock_parts/subspace/ansible @@ -1748,7 +1762,7 @@ k id = "s-filter" req_tech = list("programming" = 3, "magnets" = 3) build_type = PROTOLATHE - materials = list("$iron" = 40, "$silver" = 10) + materials = list(MAT_IRON = 40, MAT_SILVER = 10) category = "Stock Parts" build_path = /obj/item/weapon/stock_parts/subspace/filter @@ -1758,7 +1772,7 @@ k id = "s-amplifier" req_tech = list("programming" = 3, "magnets" = 4, "materials" = 4, "bluespace" = 2) build_type = PROTOLATHE - materials = list("$iron" = 10, "$gold" = 30, "$uranium" = 15) + materials = list(MAT_IRON = 10, MAT_GOLD = 30, MAT_URANIUM = 15) category = "Stock Parts" build_path = /obj/item/weapon/stock_parts/subspace/amplifier @@ -1768,7 +1782,7 @@ k id = "s-treatment" req_tech = list("programming" = 3, "magnets" = 2, "materials" = 4, "bluespace" = 2) build_type = PROTOLATHE - materials = list("$iron" = 10, "$silver" = 20) + materials = list(MAT_IRON = 10, MAT_SILVER = 20) category = "Stock Parts" build_path = /obj/item/weapon/stock_parts/subspace/treatment @@ -1778,7 +1792,7 @@ k id = "s-analyzer" req_tech = list("programming" = 3, "magnets" = 4, "materials" = 4, "bluespace" = 2) build_type = PROTOLATHE - materials = list("$iron" = 10, "$gold" = 15) + materials = list(MAT_IRON = 10, MAT_GOLD = 15) category = "Stock Parts" build_path = /obj/item/weapon/stock_parts/subspace/analyzer @@ -1788,7 +1802,7 @@ k id = "s-crystal" req_tech = list("magnets" = 4, "materials" = 4, "bluespace" = 2) build_type = PROTOLATHE - materials = list("$glass" = 1000, "$silver" = 20, "$gold" = 20) + materials = list(MAT_GLASS = 1000, MAT_SILVER = 20, MAT_GOLD = 20) category = "Stock Parts" build_path = /obj/item/weapon/stock_parts/subspace/crystal @@ -1798,7 +1812,7 @@ k id = "s-transmitter" req_tech = list("magnets" = 5, "materials" = 5, "bluespace" = 3) build_type = PROTOLATHE - materials = list("$glass" = 100, "$silver" = 10, "$uranium" = 15) + materials = list(MAT_GLASS = 100, MAT_SILVER = 10, MAT_URANIUM = 15) category = "Stock Parts" build_path = /obj/item/weapon/stock_parts/subspace/transmitter @@ -1812,7 +1826,7 @@ k id = "basic_cell" req_tech = list("powerstorage" = 1) build_type = PROTOLATHE | AUTOLATHE | MECHFAB | PODFAB - materials = list("$iron" = 700, "$glass" = 50) + materials = list(MAT_IRON = 700, MAT_GLASS = 50) build_path = /obj/item/weapon/cell category = "Engineering" @@ -1822,7 +1836,7 @@ k id = "high_cell" req_tech = list("powerstorage" = 2) build_type = PROTOLATHE | AUTOLATHE | MECHFAB | PODFAB - materials = list("$iron" = 700, "$glass" = 60) + materials = list(MAT_IRON = 700, MAT_GLASS = 60) build_path = /obj/item/weapon/cell/high category = "Engineering" @@ -1833,7 +1847,7 @@ k req_tech = list("powerstorage" = 3, "materials" = 2) reliability_base = 75 build_type = PROTOLATHE | MECHFAB | PODFAB - materials = list("$iron" = 700, "$glass" = 70) + materials = list(MAT_IRON = 700, MAT_GLASS = 70) build_path = /obj/item/weapon/cell/super category = "Engineering" @@ -1844,7 +1858,7 @@ k req_tech = list("powerstorage" = 5, "materials" = 4) reliability_base = 70 build_type = PROTOLATHE | MECHFAB | PODFAB - materials = list("$iron" = 400, "$gold" = 150, "$silver" = 150, "$glass" = 70) + materials = list(MAT_IRON = 400, MAT_GOLD = 150, MAT_SILVER = 150, MAT_GLASS = 70) build_path = /obj/item/weapon/cell/hyper category = "Engineering" @@ -1854,7 +1868,7 @@ k id = "light_replacer" req_tech = list("magnets" = 3, "materials" = 4) build_type = PROTOLATHE - materials = list("$iron" = 1500, "$silver" = 150, "$glass" = 3000) + materials = list(MAT_IRON = 1500, MAT_SILVER = 150, MAT_GLASS = 3000) category = "Engineering" build_path = /obj/item/device/lightreplacer @@ -1868,7 +1882,7 @@ k id = "destructive_analyzer" req_tech = list("programming" = 2, "magnets" = 2, "engineering" = 2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Machine Boards" build_path = /obj/item/weapon/circuitboard/destructive_analyzer @@ -1878,7 +1892,7 @@ k id = "protolathe" req_tech = list("programming" = 2, "engineering" = 2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Machine Boards" build_path = /obj/item/weapon/circuitboard/protolathe @@ -1888,7 +1902,7 @@ k id = "circuit_imprinter" req_tech = list("programming" = 2, "engineering" = 2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Machine Boards" build_path = /obj/item/weapon/circuitboard/circuit_imprinter @@ -1898,7 +1912,7 @@ k id = "autolathe" req_tech = list("programming" = 2, "engineering" = 2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Machine Boards" build_path = /obj/item/weapon/circuitboard/autolathe @@ -1908,7 +1922,7 @@ k id = "rdservercontrol" req_tech = list("programming" = 3) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Console Boards" build_path = /obj/item/weapon/circuitboard/rdservercontrol @@ -1918,7 +1932,7 @@ k id = "rdserver" req_tech = list("programming" = 3) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Machine Boards" build_path = /obj/item/weapon/circuitboard/rdserver @@ -1928,7 +1942,7 @@ k id = "mechfab" req_tech = list("programming" = 3, "engineering" = 3) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Machine Boards" build_path = /obj/item/weapon/circuitboard/mechfab @@ -1938,7 +1952,7 @@ k id = "pdapainter" req_tech = list("programming" = 3, "engineering" = 2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Machine Boards" build_path = /obj/item/weapon/circuitboard/pdapainter @@ -1954,7 +1968,7 @@ k req_tech = list("programming" = 3, "plasmatech" = 3, "powerstorage" = 3, "engineering" = 3) build_type = IMPRINTER reliability_base = 79 - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Machine Boards" build_path = /obj/item/weapon/circuitboard/pacman @@ -1965,7 +1979,7 @@ k req_tech = list("programming" = 3, "powerstorage" = 4, "engineering" = 4) build_type = IMPRINTER reliability_base = 76 - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Machine Boards" build_path = /obj/item/weapon/circuitboard/pacman/super @@ -1976,7 +1990,7 @@ k req_tech = list("programming" = 3, "powerstorage" = 5, "engineering" = 5) build_type = IMPRINTER reliability_base = 74 - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Machine Boards" build_path = /obj/item/weapon/circuitboard/pacman/mrs @@ -1991,7 +2005,7 @@ k id = "bruise_pack" req_tech = list("biotech" = 1) build_type = PROTOLATHE - materials = list("$iron" = 400, "$glass" = 125) + materials = list(MAT_IRON = 400, MAT_GLASS = 125) category = "Medical" build_path = /obj/item/stack/medical/bruise_pack @@ -2001,7 +2015,7 @@ k id = "ointment" req_tech = list("biotech" = 1) build_type = PROTOLATHE - materials = list("$iron" = 400, "$glass" = 125) + materials = list(MAT_IRON = 400, MAT_GLASS = 125) category = "Medical" build_path = /obj/item/stack/medical/ointment @@ -2011,7 +2025,7 @@ k id = "adv_bruise_pack" req_tech = list("biotech" = 2) build_type = PROTOLATHE - materials = list("$iron" = 600, "$glass" = 250) + materials = list(MAT_IRON = 600, MAT_GLASS = 250) category = "Medical" build_path = /obj/item/stack/medical/advanced/bruise_pack @@ -2021,7 +2035,7 @@ k id = "adv_ointment" req_tech = list("biotech" = 2) build_type = PROTOLATHE - materials = list("$iron" = 600, "$glass" = 250) + materials = list(MAT_IRON = 600, MAT_GLASS = 250) category = "Medical" build_path = /obj/item/stack/medical/advanced/ointment @@ -2031,7 +2045,7 @@ k id = "mass_spectrometer" req_tech = list("biotech" = 2, "magnets" = 2) build_type = PROTOLATHE - materials = list("$iron" = 30, "$glass" = 20) + materials = list(MAT_IRON = 30, MAT_GLASS = 20) reliability_base = 76 category = "Medical" build_path = /obj/item/device/mass_spectrometer @@ -2042,7 +2056,7 @@ k id = "adv_mass_spectrometer" req_tech = list("biotech" = 2, "magnets" = 4) build_type = PROTOLATHE - materials = list("$iron" = 30, "$glass" = 20) + materials = list(MAT_IRON = 30, MAT_GLASS = 20) reliability_base = 74 category = "Medical" build_path = /obj/item/device/mass_spectrometer/adv @@ -2053,7 +2067,7 @@ k id = "mmi" req_tech = list("programming" = 2, "biotech" = 3) build_type = PROTOLATHE | MECHFAB - materials = list("$iron" = 1000, "$glass" = 500) + materials = list(MAT_IRON = 1000, MAT_GLASS = 500) reliability_base = 76 build_path = /obj/item/device/mmi category = "Robotics" @@ -2064,7 +2078,7 @@ k id = "mmi_radio" req_tech = list("programming" = 2, "biotech" = 4) build_type = PROTOLATHE | MECHFAB - materials = list("$iron" = 1200, "$glass" = 500) + materials = list(MAT_IRON = 1200, MAT_GLASS = 500) reliability_base = 74 build_path = /obj/item/device/mmi/radio_enabled category = "Robotics" @@ -2076,7 +2090,7 @@ k id = "mami" req_tech = list("programming" = 4, "biotech" = 4) build_type = PROTOLATHE - materials = list("$iron" = 5000, "$glass" = 500, "$gold" = 500, "$silver" = 500) + materials = list(MAT_IRON = 5000, MAT_GLASS = 500, MAT_GOLD = 500, MAT_SILVER = 500) build_path = /obj/item/organ/brain/mami */ @@ -2086,7 +2100,7 @@ k id = "sflash" req_tech = list("magnets" = 3, "combat" = 2) build_type = MECHFAB - materials = list("$iron" = 750, "$glass" = 750) + materials = list(MAT_IRON = 750, MAT_GLASS = 750) reliability_base = 76 build_path = /obj/item/device/flash/synthetic category = "Robotics" @@ -2097,7 +2111,7 @@ k id = "nanopaste" req_tech = list("materials" = 4, "engineering" = 3) build_type = PROTOLATHE - materials = list("$iron" = 7000, "$glass" = 7000) + materials = list(MAT_IRON = 7000, MAT_GLASS = 7000) category = "Robotics" build_path = /obj/item/stack/nanopaste @@ -2107,7 +2121,7 @@ k id = "robotanalyzer" req_tech = list("magnets" = 3, "engineering" = 3) build_type = PROTOLATHE - materials = list("$iron" = 8000, "$glass" = 2000) + materials = list(MAT_IRON = 8000, MAT_GLASS = 2000) category = "Robotics" build_path = /obj/item/device/robotanalyzer @@ -2117,7 +2131,7 @@ k id = "defibrillator" req_tech = list("magnets" = 3, "materials" = 4, "biotech" = 4) build_type = PROTOLATHE - materials = list("$iron" = 9000, "$silver" = 250, "$glass" = 10000) + materials = list(MAT_IRON = 9000, MAT_SILVER = 250, MAT_GLASS = 10000) category = "Medical" build_path = /obj/item/weapon/melee/defibrillator @@ -2127,7 +2141,7 @@ k id = "healthanalyzer" req_tech = list("magnets" = 2, "biotech" = 2) build_type = PROTOLATHE - materials = list ("$iron" = 1000, "$glass" = 1000) + materials = list (MAT_IRON = 1000, MAT_GLASS = 1000) category = "Medical" build_path = /obj/item/device/healthanalyzer @@ -2137,7 +2151,7 @@ k id = "laserscalpel1" req_tech = list("materials" = 3, "engineering" = 2, "biotech" = 2) build_type = PROTOLATHE - materials = list ("$iron" = 10000, "$glass" = 5000) + materials = list (MAT_IRON = 10000, MAT_GLASS = 5000, MAT_PLASMA = 500) category = "Medical" build_path = /obj/item/weapon/scalpel/laser/tier1 @@ -2147,7 +2161,7 @@ k id = "laserscalpel2" req_tech = list("materials" = 4, "engineering" = 3, "biotech" = 4) build_type = PROTOLATHE - materials = list ("$iron" = 10000, "$glass" = 5000, "$uranium" = 500) + materials = list (MAT_IRON = 10000, MAT_GLASS = 5000, MAT_URANIUM = 500) category = "Medical" build_path = /obj/item/weapon/scalpel/laser/tier2 @@ -2157,7 +2171,7 @@ k id = "incisionmanager" req_tech = list("materials" = 5, "engineering" = 4, "biotech" = 5) build_type = PROTOLATHE - materials = list ("$iron" = 10000, "$glass" = 5000, "$uranium" = 250, "$silver" = 500) + materials = list (MAT_IRON = 10000, MAT_GLASS = 5000, MAT_URANIUM = 250, MAT_SILVER = 500) category = "Medical" build_path = /obj/item/weapon/retractor/manager @@ -2171,7 +2185,7 @@ k id = "nuclear_gun" req_tech = list("combat" = 3, "materials" = 5, "powerstorage" = 3) build_type = PROTOLATHE - materials = list("$iron" = 5000, "$glass" = 1000, "$uranium" = 500) + materials = list(MAT_IRON = 5000, MAT_GLASS = 1000, MAT_URANIUM = 500) reliability_base = 76 category = "Weapons" build_path = /obj/item/weapon/gun/energy/gun/nuclear @@ -2184,7 +2198,7 @@ k id = "stunrevolver" req_tech = list("combat" = 3, "materials" = 3, "powerstorage" = 2) build_type = PROTOLATHE - materials = list("$iron" = 4000) + materials = list(MAT_IRON = 4000) category = "Weapons" build_path = /obj/item/weapon/gun/energy/stunrevolver locked = 1 @@ -2197,7 +2211,7 @@ k id = "lasercannon" req_tech = list("combat" = 4, "materials" = 3, "powerstorage" = 3) build_type = PROTOLATHE - materials = list("$iron" = 10000, "$glass" = 1000, "$diamond" = 2000) + materials = list(MAT_IRON = 10000, MAT_GLASS = 1000, MAT_DIAMOND = 2000) category = "Weapons" build_path = /obj/item/weapon/gun/energy/lasercannon locked = 1 @@ -2210,7 +2224,7 @@ k id = "xcomsquaddiearmor" req_tech = list("materials" = 3) build_type = PROTOLATHE - materials = list("$iron" = 5000, "$glass" = 1000) + materials = list(MAT_IRON = 5000, MAT_GLASS = 1000) category = "Armor" build_path = /obj/item/clothing/suit/armor/xcomsquaddie @@ -2220,7 +2234,7 @@ k id = "xcomoriginalarmor" req_tech = list("materials" = 3) build_type = PROTOLATHE - materials = list("$iron" = 5000, "$glass" = 1000) + materials = list(MAT_IRON = 5000, MAT_GLASS = 1000) category = "Armor" build_path = /obj/item/clothing/suit/armor/xcomarmor @@ -2230,7 +2244,7 @@ k id = "xcomplasmapistol" req_tech = list("combat" = 5, "materials" = 3, "powerstorage" = 3, "plasmatech" = 3) build_type = PROTOLATHE - materials = list("$iron" = 10000, "$glass" = 1000, "$plasma" = 12000, "$uranium" = 4000) + materials = list(MAT_IRON = 10000, MAT_GLASS = 1000, MAT_PLASMA = 12000, MAT_URANIUM = 4000) category = "Weapons" build_path = /obj/item/weapon/gun/energy/plasma/pistol locked = 1 @@ -2243,7 +2257,7 @@ k id = "xcomplasmarifle" req_tech = list("combat" = 5, "materials" = 3, "powerstorage" = 3, "plasmatech" = 3) build_type = PROTOLATHE - materials = list("$iron" = 10000, "$glass" = 1000, "$diamond" = 3000, "$plasma" = 28000, "$uranium" = 12000) + materials = list(MAT_IRON = 10000, MAT_GLASS = 1000, MAT_DIAMOND = 3000, MAT_PLASMA = 28000, MAT_URANIUM = 12000) category = "Weapons" build_path = /obj/item/weapon/gun/energy/plasma/rifle locked = 1 @@ -2256,7 +2270,7 @@ k id = "xcomlightplasmarifle" req_tech = list("combat" = 5, "materials" = 3, "powerstorage" = 3, "plasmatech" = 3) build_type = PROTOLATHE - materials = list("$iron" = 10000, "$glass" = 1000, "$plasma" = 20000, "$uranium" = 8000) + materials = list(MAT_IRON = 10000, MAT_GLASS = 1000, MAT_PLASMA = 20000, MAT_URANIUM = 8000) category = "Weapons" build_path = /obj/item/weapon/gun/energy/plasma/light locked = 1 @@ -2269,7 +2283,7 @@ k id = "xcomlaserrifle" req_tech = list("combat" = 4, "materials" = 3, "powerstorage" = 3) build_type = PROTOLATHE - materials = list("$iron" = 10000, "$glass" = 1000, "$diamond" = 2000) + materials = list(MAT_IRON = 10000, MAT_GLASS = 1000, MAT_DIAMOND = 2000) category = "Weapons" build_path = /obj/item/weapon/gun/energy/laser/rifle locked = 1 @@ -2282,7 +2296,7 @@ k id = "xcomlaserpistol" req_tech = list("combat" = 4, "materials" = 3, "powerstorage" = 3) build_type = PROTOLATHE - materials = list("$iron" = 10000, "$glass" = 1000, "$diamond" = 1000) + materials = list(MAT_IRON = 10000, MAT_GLASS = 1000, MAT_DIAMOND = 1000) category = "Weapons" build_path = /obj/item/weapon/gun/energy/laser/pistol locked = 1 @@ -2295,7 +2309,7 @@ k id = "xcomar" req_tech = list("combat" = 4, "materials" = 3) build_type = PROTOLATHE - materials = list("$iron" = 10000, "$glass" = 1000) + materials = list(MAT_IRON = 10000, MAT_GLASS = 1000) category = "Weapons" build_path = /obj/item/weapon/gun/projectile/automatic/xcom locked = 1 @@ -2308,7 +2322,7 @@ k id = "decloner" req_tech = list("combat" = 4, "materials" = 4, "biotech" = 5, "powerstorage" = 4, "syndicate" = 3) //More reasonable build_type = PROTOLATHE - materials = list("$iron" = 5000, "$gold" = 5000,"$uranium" = 10000) //, "mutagen" = 40) + materials = list(MAT_IRON = 5000, MAT_GOLD = 5000,MAT_URANIUM = 10000) //, "mutagen" = 40) category = "Weapons" build_path = /obj/item/weapon/gun/energy/decloner locked = 1 @@ -2321,7 +2335,7 @@ k id = "chemsprayer" req_tech = list("combat" = 3, "materials" = 3, "engineering" = 3, "biotech" = 2, "syndicate" = 3) build_type = PROTOLATHE - materials = list("$iron" = 5000, "$glass" = 1000) + materials = list(MAT_IRON = 5000, MAT_GLASS = 1000) reliability_base = 100 category = "Weapons" build_path = /obj/item/weapon/reagent_containers/spray/chemsprayer @@ -2334,7 +2348,7 @@ k id = "rapidsyringe" req_tech = list("combat" = 3, "materials" = 3, "engineering" = 3, "biotech" = 2) build_type = PROTOLATHE - materials = list("$iron" = 5000, "$glass" = 1000) + materials = list(MAT_IRON = 5000, MAT_GLASS = 1000) category = "Weapons" build_path = /obj/item/weapon/gun/syringe/rapidsyringe @@ -2344,7 +2358,7 @@ k id = "largecrossbow" req_tech = list("combat" = 4, "materials" = 5, "engineering" = 3, "biotech" = 4, "syndicate" = 3) build_type = PROTOLATHE - materials = list("$iron" = 5000, "$glass" = 1000, "$uranium" = 1000, "$silver" = 1000) + materials = list(MAT_IRON = 5000, MAT_GLASS = 1000, MAT_URANIUM = 1000, MAT_SILVER = 1000) category = "Weapons" build_path = /obj/item/weapon/gun/energy/crossbow/largecrossbow locked = 1 @@ -2357,7 +2371,7 @@ k id = "temp_gun" req_tech = list("combat" = 3, "materials" = 4, "powerstorage" = 3, "magnets" = 2) build_type = PROTOLATHE - materials = list("$iron" = 5000, "$glass" = 500, "$silver" = 3000) + materials = list(MAT_IRON = 5000, MAT_GLASS = 500, MAT_SILVER = 3000) category = "Weapons" build_path = /obj/item/weapon/gun/energy/temperature locked = 1 @@ -2370,7 +2384,7 @@ k id = "flora_gun" req_tech = list("materials" = 2, "biotech" = 3, "powerstorage" = 3) build_type = PROTOLATHE - materials = list("$iron" = 2000, "$glass" = 500, "$uranium" = 500) + materials = list(MAT_IRON = 2000, MAT_GLASS = 500, MAT_URANIUM = 500) category = "Misc" build_path = /obj/item/weapon/gun/energy/floragun @@ -2380,7 +2394,7 @@ k id = "large_Grenade" req_tech = list("combat" = 3, "materials" = 2) build_type = PROTOLATHE - materials = list("$iron" = 3000) + materials = list(MAT_IRON = 3000) reliability_base = 79 category = "Weapons" build_path = /obj/item/weapon/grenade/chem_grenade/large @@ -2391,7 +2405,7 @@ k id = "ex_Grenade" req_tech = list("combat" = 4, "materials" = 2, "engineering" = 2) build_type = PROTOLATHE - materials = list("$iron" = 3000) + materials = list(MAT_IRON = 3000) reliability_base = 79 category = "Weapons" build_path = /obj/item/weapon/grenade/chem_grenade/exgrenade @@ -2402,7 +2416,7 @@ k id = "smg" req_tech = list("combat" = 4, "materials" = 3) build_type = PROTOLATHE - materials = list("$iron" = 8000, "$silver" = 2000, "$diamond" = 1000) + materials = list(MAT_IRON = 8000, MAT_SILVER = 2000, MAT_DIAMOND = 1000) category = "Weapons" build_path = /obj/item/weapon/gun/projectile/automatic locked = 1 @@ -2415,7 +2429,7 @@ k id = "ammo_9mm" req_tech = list("combat" = 4, "materials" = 3) build_type = PROTOLATHE - materials = list("$iron" = 3750, "$silver" = 100) + materials = list(MAT_IRON = 3750, MAT_SILVER = 100) category = "Weapons" build_path = /obj/item/ammo_storage/box/c9mm @@ -2425,7 +2439,7 @@ k id = "stunshell" req_tech = list("combat" = 3, "materials" = 3) build_type = PROTOLATHE - materials = list("$iron" = 4000) + materials = list(MAT_IRON = 4000) category = "Weapons" build_path = /obj/item/ammo_casing/shotgun/stunshell @@ -2435,7 +2449,7 @@ k id = "pneumatic" req_tech = list("materials" = 3, "engineering" = 3) build_type = PROTOLATHE - materials = list("$iron" = 12000) + materials = list(MAT_IRON = 12000) category = "Weapons" build_path = /obj/item/weapon/storage/pneumatic @@ -2449,7 +2463,7 @@ k id = "jackhammer" req_tech = list("materials" = 3, "powerstorage" = 2, "engineering" = 2) build_type = PROTOLATHE - materials = list("$iron" = 2000, "$glass" = 500, "$silver" = 500) + materials = list(MAT_IRON = 2000, MAT_GLASS = 500, MAT_SILVER = 500) category = "Mining" build_path = /obj/item/weapon/pickaxe/jackhammer @@ -2459,7 +2473,7 @@ k id = "drill" req_tech = list("materials" = 2, "powerstorage" = 3, "engineering" = 2) build_type = PROTOLATHE - materials = list("$iron" = 6000, "$glass" = 1000) //expensive, but no need for miners. + materials = list(MAT_IRON = 6000, MAT_GLASS = 1000) //expensive, but no need for miners. category = "Mining" build_path = /obj/item/weapon/pickaxe/drill @@ -2469,7 +2483,7 @@ k id = "plasmacutter" req_tech = list("materials" = 4, "plasmatech" = 3, "engineering" = 3) build_type = PROTOLATHE - materials = list("$iron" = 1500, "$glass" = 500, "$gold" = 500, "$plasma" = 500) + materials = list(MAT_IRON = 1500, MAT_GLASS = 500, MAT_GOLD = 500, MAT_PLASMA = 500) reliability_base = 79 category = "Mining" build_path = /obj/item/weapon/pickaxe/plasmacutter @@ -2480,7 +2494,7 @@ k id = "pick_diamond" req_tech = list("materials" = 6) build_type = PROTOLATHE - materials = list("$diamond" = 3000) + materials = list(MAT_DIAMOND = 3000) category = "Mining" build_path = /obj/item/weapon/pickaxe/diamond @@ -2490,7 +2504,7 @@ k id = "drill_diamond" req_tech = list("materials" = 6, "powerstorage" = 4, "engineering" = 4) build_type = PROTOLATHE - materials = list("$iron" = 3000, "$glass" = 1000, "$diamond" = 3750) //Yes, a whole diamond is needed. + materials = list(MAT_IRON = 3000, MAT_GLASS = 1000, MAT_DIAMOND = 3750) //Yes, a whole diamond is needed. reliability_base = 79 category = "Mining" build_path = /obj/item/weapon/pickaxe/drill/diamond @@ -2501,7 +2515,7 @@ k id = "mesons" req_tech = list("magnets" = 2, "engineering" = 2) build_type = PROTOLATHE - materials = list("$iron" = 50, "$glass" = 50) + materials = list(MAT_IRON = 50, MAT_GLASS = 50) category = "Mining" build_path = /obj/item/clothing/glasses/meson @@ -2511,7 +2525,7 @@ k id = "excavationdrill" req_tech = list("materials" = 6, "powerstorage" = 3, "engineering" = 3, "bluespace" = 4) build_type = PROTOLATHE - materials = list("$iron" = 4000, "$glass" = 1000, "$silver" = 1000, "$diamond" = 500) + materials = list(MAT_IRON = 4000, MAT_GLASS = 1000, MAT_SILVER = 1000, MAT_DIAMOND = 500) category = "Mining" build_path = /obj/item/weapon/pickaxe/excavationdrill @@ -2525,7 +2539,7 @@ k id = "beacon" req_tech = list("bluespace" = 1) build_type = PROTOLATHE - materials = list ("$iron" = 20, "$glass" = 10) + materials = list (MAT_IRON = 20, MAT_GLASS = 10) category = "Bluespace" build_path = /obj/item/device/radio/beacon @@ -2535,7 +2549,7 @@ k id = "bag_holding" req_tech = list("bluespace" = 4, "materials" = 6) build_type = PROTOLATHE - materials = list("$gold" = 3000, "$diamond" = 1500, "$uranium" = 250) + materials = list(MAT_GOLD = 3000, MAT_DIAMOND = 1500, MAT_URANIUM = 250) reliability_base = 80 category = "Bluespace" build_path = /obj/item/weapon/storage/backpack/holding @@ -2546,7 +2560,7 @@ k id = "bluespace_crystal" req_tech = list("bluespace" = 4, "materials" = 6) build_type = PROTOLATHE - materials = list("$diamond" = 1500, "$plasma" = 1500) + materials = list(MAT_DIAMOND = 1500, MAT_PLASMA = 1500) reliability = 100 category = "Bluespace" build_path = /obj/item/bluespace_crystal/artificial @@ -2557,7 +2571,7 @@ k id = "bluespacebeaker_small" req_tech = list("bluespace" = 2, "materials" = 3) build_type = PROTOLATHE - materials = list("$glass" = 6000, "$iron" = 6000) + materials = list(MAT_GLASS = 6000, MAT_IRON = 6000) reliability = 100 category = "Bluespace" build_path = /obj/item/weapon/reagent_containers/glass/beaker/bluespace @@ -2568,7 +2582,7 @@ k id = "bluespacebeaker_large" req_tech = list("bluespace" = 3, "materials" = 5) build_type = PROTOLATHE - materials = list("$diamond" = 1500, "$iron" = 6000, "$glass" = 6000) + materials = list(MAT_DIAMOND = 1500, MAT_IRON = 6000, MAT_GLASS = 6000) reliability = 100 category = "Bluespace" build_path = /obj/item/weapon/reagent_containers/glass/beaker/bluespace/large @@ -2579,7 +2593,7 @@ k id = "stasisbeaker_small" req_tech = list("bluespace" = 3, "materials" = 4) build_type = PROTOLATHE - materials = list("$uranium" = 1500, "$iron" = 3750, "$glass" = 3750) + materials = list(MAT_URANIUM = 1500, MAT_IRON = 3750, MAT_GLASS = 3750) reliability = 100 category = "Bluespace" build_path = /obj/item/weapon/reagent_containers/glass/beaker/noreact @@ -2590,7 +2604,7 @@ k id = "stasisbeaker_large" req_tech = list("bluespace" = 4, "materials" = 6) build_type = PROTOLATHE - materials = list("$diamond" = 1500, "$iron" = 3750, "$glass" = 3750, "$uranium" = 1500) + materials = list(MAT_DIAMOND = 1500, MAT_IRON = 3750, MAT_GLASS = 3750, MAT_URANIUM = 1500) reliability = 100 category = "Bluespace" build_path = /obj/item/weapon/reagent_containers/glass/beaker/noreact/large @@ -2601,7 +2615,7 @@ k id = "reactive_teleport_armor" req_tech = list("bluespace" = 4, "materials" = 5) build_type = PROTOLATHE - materials = list("$diamond" = 2000, "$iron" = 3000, "$uranium" = 3750) + materials = list(MAT_DIAMOND = 2000, MAT_IRON = 3000, MAT_URANIUM = 3750) category = "Armor" build_path = /obj/item/clothing/suit/armor/reactive @@ -2611,7 +2625,7 @@ k id = "gps" req_tech = list("bluespace" = 2, "magnets" = 2) build_type = PROTOLATHE - materials = list ("$iron" = 800, "$glass" = 200) + materials = list (MAT_IRON = 800, MAT_GLASS = 200) category = "Bluespace" build_path = /obj/item/device/gps/science @@ -2621,7 +2635,7 @@ k id = "mat_synth" req_tech = list("engineering" = 4, "materials" = 5, "powerstorage" = 3) build_type = PROTOLATHE - materials = list ("$iron" = 3000, "$glass" = 1500, "$diamond" = 1000, "$uranium" = 3000) + materials = list (MAT_IRON = 3000, MAT_GLASS = 1500, MAT_DIAMOND = 1000, MAT_URANIUM = 3000) category = "Engineering" build_path = /obj/item/device/material_synth @@ -2635,7 +2649,7 @@ k id = "health_hud" req_tech = list("biotech" = 2, "magnets" = 3) build_type = PROTOLATHE - materials = list("$iron" = 50, "$glass" = 50) + materials = list(MAT_IRON = 50, MAT_GLASS = 50) category = "Medical" build_path = /obj/item/clothing/glasses/hud/health @@ -2646,7 +2660,7 @@ k id = "security_hud" req_tech = list("magnets" = 3, "combat" = 2) build_type = PROTOLATHE - materials = list("$iron" = 50, "$glass" = 50) + materials = list(MAT_IRON = 50, MAT_GLASS = 50) build_path = /obj/item/clothing/glasses/hud/security locked = 1 */ @@ -2657,7 +2671,7 @@ k id = "sechud_sunglass" req_tech = list("magnets" = 3, "combat" = 2) build_type = PROTOLATHE - materials = list("$iron" = 50, "$glass" = 50) + materials = list(MAT_IRON = 50, MAT_GLASS = 50) category = "Armor" build_path = /obj/item/clothing/glasses/sunglasses/sechud locked = 1 @@ -2674,7 +2688,7 @@ k id = "superior_welding_goggles" req_tech = list("materials" = 3, "engineering" = 3) build_type = PROTOLATHE - materials = list("$iron" = 500, "$glass" = 1500) + materials = list(MAT_IRON = 500, MAT_GLASS = 1500) category = "Engineering" build_path = /obj/item/clothing/glasses/welding/superior @@ -2684,7 +2698,7 @@ k id = "night_vision_goggles" req_tech = list("materials" = 5, "engineering" = 4) build_type = PROTOLATHE - materials = list("$iron" = 700, "$glass" = 2000, "$gold" = 100) + materials = list(MAT_IRON = 700, MAT_GLASS = 2000, MAT_GOLD = 100) category = "Engineering" build_path = /obj/item/clothing/glasses/night @@ -2694,7 +2708,7 @@ k id = "deviceanalyser" req_tech = list("magnets"=3, "engineering"=4, "materials"=4, "programming"=3) build_type = PROTOLATHE - materials = list("$iron" = 500, "$glass" = 1000, "$gold" = 200, "$silver" = 200) + materials = list(MAT_IRON = 500, MAT_GLASS = 1000, MAT_GOLD = 200, MAT_SILVER = 200) category = "Engineering" build_path = /obj/item/device/device_analyser @@ -2704,7 +2718,7 @@ k id = "componentexchanger" req_tech = list("magnets"=2, "engineering"=4, "materials"=5, "programming"=3) build_type = PROTOLATHE - materials = list("$iron" = 500, "$glass" = 1000, "$gold" = 200, "$silver" = 200) + materials = list(MAT_IRON = 500, MAT_GLASS = 1000, MAT_GOLD = 200, MAT_SILVER = 200) category = "Engineering" build_path = /obj/item/weapon/storage/component_exchanger @@ -2718,7 +2732,7 @@ k id = "ablative vest" req_tech = list("combat" = 4, "materials" = 5) build_type = PROTOLATHE - materials = list("$iron" = 1500, "$glass" = 2500, "$diamond" = 3750, "$silver" = 1000, "$uranium" = 500) + materials = list(MAT_IRON = 1500, MAT_GLASS = 2500, MAT_DIAMOND = 3750, MAT_SILVER = 1000, MAT_URANIUM = 500) category = "Armor" build_path = /obj/item/clothing/suit/armor/laserproof locked = 1 @@ -2731,7 +2745,7 @@ k id = "advanced eod suit" req_tech = list("combat" = 5, "materials" = 5, "biotech" = 2) build_type = PROTOLATHE - materials = list ("$iron" = 10000, "$glass" = 2500, "$gold" = 3750, "$silver" = 1000) + materials = list (MAT_IRON = 10000, MAT_GLASS = 2500, MAT_GOLD = 3750, MAT_SILVER = 1000) category = "Armor" build_path = /obj/item/clothing/suit/advancedeod @@ -2741,7 +2755,7 @@ k id = "advanced eod helmet" req_tech = list("combat" = 5, "materials" = 5, "biotech" = 2) build_type = PROTOLATHE - materials = list ("$iron" = 3750, "$glass" = 2500, "$gold" = 3750, "$silver" = 1000) + materials = list (MAT_IRON = 3750, MAT_GLASS = 2500, MAT_GOLD = 3750, MAT_SILVER = 1000) category = "Armor" build_path = /obj/item/clothing/head/advancedeod_helmet @@ -2756,7 +2770,7 @@ k id = "protolathe_test" build_type = PROTOLATHE req_tech = list("materials" = 1) - materials = list("$gold" = 3000, "iron" = 15, "copper" = 10, "$silver" = 2500) + materials = list(MAT_GOLD = 3000, "iron" = 15, "copper" = 10, MAT_SILVER = 2500) build_path = /obj/item/weapon/banhammer */ //////////////////////////////////////// @@ -2770,8 +2784,7 @@ k icon_state = "datadisk2" item_state = "card-id" w_class = 1.0 - m_amt = 30 - g_amt = 10 + starting_materials = list(MAT_IRON = 30, MAT_GLASS = 10) w_type = RECYK_ELECTRONIC var/datum/design/blueprint @@ -2792,7 +2805,7 @@ k req_tech = list("combat" = 4, "syndicate" = 3) build_path = /obj/item/borg/upgrade/syndicate category = "Robotic_Upgrade_Modules" - materials = list("$iron"=10000,"$glass"=15000,"$diamond" = 10000) + materials = list(MAT_IRON=10000,MAT_GLASS=15000,MAT_DIAMOND = 10000) /datum/design/borg_engineer_upgrade name = "engineering module board" @@ -2802,7 +2815,7 @@ k req_tech = list("engineering" = 1) build_path = /obj/item/borg/upgrade/engineering category = "Robotic_Upgrade_Modules" - materials = list("$iron"=10000,"$glass"=10000,"$plasma"=5000) + materials = list(MAT_IRON=10000,MAT_GLASS=10000,MAT_PLASMA=5000) /datum/design/medical_module_surgery name = "medical module board" @@ -2810,7 +2823,7 @@ k id = "medical_module_surgery" req_tech = list("biotech" = 3, "engineering" = 3) build_type = MECHFAB - materials = list("$iron" = 80000, "$glass" = 20000) + materials = list(MAT_IRON = 80000, MAT_GLASS = 20000) build_path = /obj/item/borg/upgrade/medical/surgery category = "Robotic_Upgrade_Modules" @@ -2822,7 +2835,7 @@ k build_type = MECHFAB build_path = /obj/item/borg/upgrade/reset category = "Robotic_Upgrade_Modules" - materials = list("$iron"=10000) + materials = list(MAT_IRON=10000) /datum/design/borg_rename_board name = "cyborg rename module" @@ -2832,7 +2845,7 @@ k build_type = MECHFAB build_path = /obj/item/borg/upgrade/rename category = "Robotic_Upgrade_Modules" - materials = list("$iron"=35000) + materials = list(MAT_IRON=35000) /datum/design/borg_restart_board name = "cyborg restart module" @@ -2842,7 +2855,7 @@ k build_type = MECHFAB build_path = /obj/item/borg/upgrade/restart category = "Robotic_Upgrade_Modules" - materials = list("$iron"=60000 , "$glass"=5000) + materials = list(MAT_IRON=60000 , MAT_GLASS=5000) /datum/design/borg_vtec_board name = "cyborg VTEC module" @@ -2852,7 +2865,7 @@ k build_type = MECHFAB build_path = /obj/item/borg/upgrade/vtec category = "Robotic_Upgrade_Modules" - materials = list("$iron"=80000, "$glass"=6000, "$gold"= 5000) + materials = list(MAT_IRON=80000, MAT_GLASS=6000, MAT_GOLD= 5000) /datum/design/borg_tasercooler_board name = "cyborg taser cooling module" @@ -2862,7 +2875,7 @@ k build_type = MECHFAB build_path = /obj/item/borg/upgrade/tasercooler category = "Robotic_Upgrade_Modules" - materials = list("$iron"=80000 , "$glass"=6000 , "$gold"= 2000, "$diamond" = 500) + materials = list(MAT_IRON=80000 , MAT_GLASS=6000 , MAT_GOLD= 2000, MAT_DIAMOND = 500) /datum/design/borg_jetpack_board name = "cyborg jetpack module" @@ -2872,7 +2885,7 @@ k build_type = MECHFAB build_path = /obj/item/borg/upgrade/jetpack category = "Robotic_Upgrade_Modules" - materials = list("$iron"=10000,"$plasma"=15000,"$uranium" = 20000) + materials = list(MAT_IRON=10000,MAT_PLASMA=15000,MAT_URANIUM = 20000) ///////////////////////////////////////// ///////////General Upgrades////////////// @@ -2885,7 +2898,7 @@ k build_type = PROTOLATHE | MECHFAB build_path = /obj/item/mecha_parts/janicart_upgrade req_tech = list("engineering" = 1, "materials" = 1) - materials = list("$iron"=10000) + materials = list(MAT_IRON=10000) category = "Misc" ///////////////////////////////////////// @@ -2897,7 +2910,7 @@ k id = "telehub" req_tech = list("programming" = 4, "engineering"=3, "bluespace" = 3) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Machine Boards" build_path = /obj/item/weapon/circuitboard/telehub @@ -2907,7 +2920,7 @@ k id = "telestation" req_tech = list("programming" = 4, "engineering" = 3, "bluespace" = 3) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Machine Boards" build_path = /obj/item/weapon/circuitboard/telestation @@ -2921,7 +2934,7 @@ k id = "biogenerator" req_tech = list("programming" = 3,"engineering" = 2, "biotech" = 3) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Machine Boards" build_path = /obj/item/weapon/circuitboard/biogenerator @@ -2931,7 +2944,7 @@ k id = "seed_extractor" req_tech = list("programming" = 3,"engineering" = 2, "biotech" = 3) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Machine Boards" build_path = /obj/item/weapon/circuitboard/seed_extractor @@ -2941,7 +2954,7 @@ k id = "microwave" req_tech = list("programming" = 2,"engineering" = 2,"magnets" = 3) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Machine Boards" build_path = /obj/item/weapon/circuitboard/microwave @@ -2951,7 +2964,7 @@ k id = "reagentgrinder" req_tech = list("programming" = 3,"engineering" = 2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Machine Boards" build_path = /obj/item/weapon/circuitboard/reagentgrinder @@ -2961,7 +2974,7 @@ k id = "smartfridge" req_tech = list("programming" = 3,"engineering" = 2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Machine Boards" build_path = /obj/item/weapon/circuitboard/smartfridge @@ -2971,7 +2984,7 @@ k id = "hydroponics" req_tech = list("programming" = 3,"engineering" = 2,"biotech" = 3,"powerstorage" = 2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Machine Boards" build_path = /obj/item/weapon/circuitboard/hydroponics @@ -2981,7 +2994,7 @@ k id = "gibber" req_tech = list("programming" = 3,"engineering" = 2,"biotech" = 3,"powerstorage" = 2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Machine Boards" build_path = /obj/item/weapon/circuitboard/gibber @@ -2991,7 +3004,7 @@ k id = "processor" req_tech = list("programming" = 3,"engineering" = 2,"biotech" = 3,"powerstorage" = 2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Machine Boards" build_path = /obj/item/weapon/circuitboard/processor @@ -3001,7 +3014,7 @@ k id = "monkey" req_tech = list("programming" = 3,"engineering" = 2,"biotech" = 3,"powerstorage" = 2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Machine Boards" build_path = /obj/item/weapon/circuitboard/monkey_recycler @@ -3011,7 +3024,7 @@ k id = "chicken" req_tech = list("programming" = 3,"engineering" = 2,"biotech" = 3,"powerstorage" = 2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Machine Boards" build_path = /obj/item/weapon/circuitboard/chicken_processor @@ -3021,7 +3034,7 @@ k id = "air_alarm" req_tech = list("programming" = 2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Engineering Boards" build_path = /obj/item/weapon/circuitboard/air_alarm @@ -3031,7 +3044,7 @@ k id = "fire_alarm" req_tech = list("programming" = 2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Engineering Boards" build_path = /obj/item/weapon/circuitboard/fire_alarm @@ -3041,7 +3054,7 @@ k id = "airlock" req_tech = list("programming" = 2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Engineering Boards" build_path = /obj/item/weapon/circuitboard/airlock @@ -3051,7 +3064,7 @@ k id = "intercom" req_tech = list("programming" = 2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Engineering Boards" build_path = /obj/item/weapon/intercom_electronics @@ -3061,7 +3074,7 @@ k id = "conveyor" req_tech = list("programming" = 2) build_type = IMPRINTER - materials = list("$glass" = 200, "sacid" = 5) + materials = list(MAT_GLASS = 200, "sacid" = 5) category = "Machine Boards" build_path = /obj/item/weapon/circuitboard/conveyor @@ -3071,7 +3084,7 @@ k id = "bhangmeter" req_tech = list("programming" = 2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Console Boards" build_path = /obj/item/weapon/circuitboard/bhangmeter @@ -3081,7 +3094,7 @@ k id = "mechapowerport" req_tech = list("engineering" = 2, "powerstorage" = 3) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Machine Boards" build_path = /obj/item/weapon/circuitboard/mech_bay_power_port @@ -3092,7 +3105,7 @@ k id = "mechapowerfloor" req_tech = list("materials" = 2, "powerstorage" = 3) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Machine Boards" build_path = /obj/item/weapon/circuitboard/mech_bay_recharge_station @@ -3106,7 +3119,7 @@ k id = "access_control" req_tech = list("programming" = 3) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Engineering Boards" build_path = /obj/item/weapon/circuitboard/ecb/access_controller @@ -3116,7 +3129,7 @@ k id = "airlock_control" req_tech = list("programming" = 3) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Engineering Boards" build_path = /obj/item/weapon/circuitboard/ecb/airlock_controller @@ -3126,7 +3139,7 @@ k id = "advanced_airlock_control" req_tech = list("programming" = 3) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) circuitboard/ecb/access_controller category = "Engineering Boards" build_path = /obj/item/weapon/circuitboard/ecb/advanced_airlock_controller @@ -3138,7 +3151,7 @@ k id = "hydroseeds" req_tech = list("programming" = 3,"engineering" = 2,"biotech" = 3,"powerstorage" = 2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/hydroseeds /datum/design/hydronutrients @@ -3147,7 +3160,7 @@ k id = "hydronutrients" req_tech = list("programming" = 3,"engineering" = 2,"biotech" = 3,"powerstorage" = 2) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) build_path = /obj/item/weapon/circuitboard/hydronutrients */ @@ -3162,7 +3175,7 @@ k req_tech = list("materials" = 3, "engineering" = 2) build_path = /obj/item/pod_parts/pod_frame/fore_port category = "Pod_Frame" - materials = list("$iron"=15000,"$glass"=5000) + materials = list(MAT_IRON=15000,MAT_GLASS=5000) /datum/design/podframe_ap name = "Aft port pod frame" @@ -3172,7 +3185,7 @@ k req_tech = list("materials" = 3, "engineering" = 2) build_path = /obj/item/pod_parts/pod_frame/aft_port category = "Pod_Frame" - materials = list("$iron"=15000,"$glass"=5000) + materials = list(MAT_IRON=15000,MAT_GLASS=5000) /datum/design/podframe_fs name = "Fore starboard pod frame" @@ -3182,7 +3195,7 @@ k req_tech = list("materials" = 3, "engineering" = 2) build_path = /obj/item/pod_parts/pod_frame/fore_starboard category = "Pod_Frame" - materials = list("$iron"=15000,"$glass"=5000) + materials = list(MAT_IRON=15000,MAT_GLASS=5000) /datum/design/podframe_as name = "Aft starboard pod frame" @@ -3192,7 +3205,7 @@ k req_tech = list("materials" = 3, "engineering" = 2) build_path = /obj/item/pod_parts/pod_frame/aft_starboard category = "Pod_Frame" - materials = list("$iron"=15000,"$glass"=5000) + materials = list(MAT_IRON=15000,MAT_GLASS=5000) ////////////////////////// ////////POD CORE//////// @@ -3206,7 +3219,7 @@ k req_tech = list("materials" = 4, "engineering" = 3, "plasmatech" = 3, "bluespace" = 2) build_path = /obj/item/pod_parts/core category = "Pod_Parts" - materials = list("$iron"=5000,"$uranium"=1000,"$plasma"=5000) + materials = list(MAT_IRON=5000,MAT_URANIUM=1000,MAT_PLASMA=5000) ////////////////////////////////////////// ////////SPACEPOD ARMOR//////////////////// @@ -3220,7 +3233,7 @@ k req_tech = list("materials" = 3, "plasmatech" = 3) build_path = /obj/item/pod_parts/armor category = "Pod_Armor" - materials = list("$iron"=15000,"$glass"=5000,"$plasma"=10000) + materials = list(MAT_IRON=15000,MAT_GLASS=5000,MAT_PLASMA=10000) ////////////////////////////////////////// //////SPACEPOD GUNS/////////////////////// @@ -3233,7 +3246,7 @@ k req_tech = list("materials" = 2, "combat" = 2) build_path = /obj/item/device/spacepod_equipment/weaponry/taser category = "Pod_Weaponry" - materials = list("$iron" = 15000) + materials = list(MAT_IRON = 15000) /datum/design/pod_gun_btaser name = "Spacepod Equipment (Burst Taser)" @@ -3243,7 +3256,7 @@ k req_tech = list("materials" = 3, "combat" = 3) build_path = /obj/item/device/spacepod_equipment/weaponry/taser/burst category = "Pod_Weaponry" - materials = list("$iron" = 15000) + materials = list(MAT_IRON = 15000) /datum/design/pod_gun_laser name = "Spacepod Equipment (Laser)" @@ -3253,7 +3266,7 @@ k req_tech = list("materials" = 3, "combat" = 3, "plasmatech" = 2) build_path = /obj/item/device/spacepod_equipment/weaponry/laser category = "Pod_Weaponry" - materials = list("$iron" = 15000) + materials = list(MAT_IRON = 15000) locked = 1 ////////////////////////////////////////// @@ -3265,7 +3278,7 @@ k id = "vendomat" req_tech = list("materials" = 1, "engineering" = 1, "powerstorage" = 1) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Misc" build_path = /obj/item/weapon/circuitboard/vendomat @@ -3278,7 +3291,7 @@ k id = "incubator" req_tech = list("materials" = 4, "biotech" = 5, "magnets" = 3) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Machine Boards" build_path = /obj/item/weapon/circuitboard/incubator @@ -3288,7 +3301,7 @@ k id = "diseaseanalyser" req_tech = list("engineering" = 3, "biotech" = 3, "programming" = 3) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Machine Boards" build_path = /obj/item/weapon/circuitboard/diseaseanalyser @@ -3298,7 +3311,7 @@ k id = "splicer" req_tech = list("programming" = 3, "biotech" = 4) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Machine Boards" build_path = /obj/item/weapon/circuitboard/splicer @@ -3308,7 +3321,7 @@ k id = "centrifuge" req_tech = list("programming" = 3, "biotech" = 3) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Machine Boards" build_path = /obj/item/weapon/circuitboard/centrifuge @@ -3318,7 +3331,7 @@ k id = "prism" req_tech = list("programming" = 3, "engineering" = 3) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Machine Boards" build_path = /obj/item/weapon/circuitboard/prism @@ -3328,7 +3341,7 @@ k id = "cellcharger" req_tech = list("materials" = 2, "engineering" = 2, "powerstorage" = 3) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Machine Boards" build_path = /obj/item/weapon/circuitboard/cell_charger @@ -3345,7 +3358,7 @@ k id="botany_centrifuge" req_tech = list ("engineering" = 3, "biotech" = 3) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Machine Boards" build_path = /obj/item/weapon/circuitboard/botany_centrifuge @@ -3355,6 +3368,6 @@ k id="botany_bioballistic" req_tech = list ("engineering" = 3, "biotech" = 3) build_type = IMPRINTER - materials = list("$glass" = 2000, "sacid" = 20) + materials = list(MAT_GLASS = 2000, "sacid" = 20) category = "Machine Boards" build_path = /obj/item/weapon/circuitboard/botany_bioballistic diff --git a/code/modules/research/fabricators.dm b/code/modules/research/fabricators.dm index e603a2dd4d6..957fde02019 100644 --- a/code/modules/research/fabricators.dm +++ b/code/modules/research/fabricators.dm @@ -138,16 +138,16 @@ return var/counter = 0 - for(var/datum/design/D in files.possible_designs) //the reason we do possible is that some designs don't have base requirement - for(var/name_set in part_sets) - var/list/part_set = part_sets[name_set] - if(!istype(part_set) || !part_set.len) - continue - for(var/i = 1; i <= part_set.len; i++) - if(D.build_path == part_set[i]) - part_set[i] = D - counter++ - break + + for(var/name_set in part_sets) + var/list/part_set = part_sets[name_set] + if(!istype(part_set) || !part_set.len) + continue + for(var/i = 1; i <= part_set.len; i++) + var/datum/design/D = FindDesign(part_set[i]) + if(D) + part_set[i] = D + counter++ for(var/name_set in part_sets) var/list/part_set = part_sets[name_set] @@ -156,7 +156,7 @@ warning("[element] was left over in setting up parts.") part_set.Remove(element) - counter += convert_designs() //fill the rest of the way + counter += convert_designs() //fill the rest of the way with the designs we get at base research - essentially a starting sync return counter @@ -213,22 +213,38 @@ var/output = "" for(var/M in part.materials) if(copytext(M,1,2) == "$") - var/matID=copytext(M,2) - var/datum/material/material=materials.getMaterial(matID) - output += "[output ? " | " : null][get_resource_cost_w_coeff(part,"$[matID]")] [material.processed_name]" + var/datum/material/material=materials.getMaterial(M) + output += "[output ? " | " : null][get_resource_cost_w_coeff(part,M)] [material.processed_name]" return output /obj/machinery/r_n_d/fabricator/proc/remove_materials(var/datum/design/part) for(var/M in part.materials) if(!check_mat(part, M)) return 0 + + for(var/M in part.materials) if(copytext(M,1,2) == "$" && !(research_flags & IGNORE_MATS)) - var/matID=copytext(M,2) - materials.removeAmount(matID, part.materials[M]) + materials.removeAmount(M, get_resource_cost_w_coeff(part, M)) else if(!(research_flags & IGNORE_CHEMS)) reagents.remove_reagent(M, part.materials[M]) return 1 +/obj/machinery/r_n_d/fabricator/proc/check_mat(var/datum/design/being_built, var/M, var/num_requested=1) + if(copytext(M,1,2) == "$") + if(src.research_flags & IGNORE_MATS) + return num_requested + for(var/n=num_requested,n>=1,n--) + if ((materials.storage[M]-(get_resource_cost_w_coeff(being_built, M)*n)) >= 0) + return n + else + if(src.research_flags & IGNORE_CHEMS) + return num_requested + for(var/n=num_requested,n>=1,n--) + if (reagents.has_reagent(M, get_resource_cost_w_coeff(being_built, M))) + return n + return 0 + + /obj/machinery/r_n_d/fabricator/proc/build_part(var/datum/design/part) if(!part) return @@ -249,6 +265,13 @@ src.use_power = 1 src.overlays -= "[base_state]_ani" if(being_built) + if(!being_built.materials) + being_built.materials = getFromDPool(/datum/materials, being_built) + for(var/matID in part.materials) + if(copytext(matID, 1, 2) != "$") //it's not a material, let's ignore it + continue + being_built.materials.storage[matID] = 0 //remove all old materials + being_built.materials.addAmount(matID, get_resource_cost_w_coeff(part,matID)) //slap in what we built with - matching the cost if(part.locked && research_flags &LOCKBOXES) var/obj/item/weapon/storage/lockbox/L //if(research_flags &TRUELOCKS) @@ -280,19 +303,9 @@ src.visible_message("\icon[src] [src] beeps: \"[set_name] parts were added to the queue\".") return - -/obj/machinery/r_n_d/fabricator/FindDesignByID() - for(var/datum/design/D in files.known_designs) - if(D.id == id) - return D - if(!istype(D)) - warning("[D] was found in known_designs in FindDesignByID, the ID passed into it it was: [id]") - /obj/machinery/r_n_d/fabricator/proc/add_to_queue(var/datum/design/part) if(!istype(queue)) queue = list() - if(!istype(part)) - part = FindDesignByID(part.id) if(!part) return if(part) @@ -452,8 +465,8 @@ //Get the material names for(var/matID in materials.storage) var/datum/material/material = materials.getMaterial(matID) // get the ID of the materials - if(material && material.stored > 0) - materials_list.Add(list(list("name" = material.processed_name, "storage" = material.stored, "commands" = list("eject" = matID)))) // get the amount of the materials + if(material && materials.storage[matID] > 0) + materials_list.Add(list(list("name" = material.processed_name, "storage" = materials.storage[matID], "commands" = list("eject" = matID)))) // get the amount of the materials data["materials"] = materials_list var/parts_list[0] // setup a list to get all the information for parts @@ -570,7 +583,7 @@ if(exit.density) src.visible_message("\icon[src] [src] beeps, \"Error! Part outlet is obstructed\".") return - . + if(stat & BROKEN) return @@ -578,9 +591,7 @@ src.visible_message("Unauthorized Access: attempted by [user]") return - if(research_flags & NANOTOUCH) - ui_interact(user) - + ..() /* /obj/machinery/r_n_d/fabricator/mech/Topic(href, href_list) @@ -637,7 +648,7 @@ var/datum/material/material = materials.getMaterial(matID) if(material) //var/obj/item/stack/sheet/res = new material.sheettype(src) - var/total_amount = min(round(material.stored/material.cc_per_sheet),amount) + var/total_amount = min(round(materials.storage[matID]/material.cc_per_sheet), amount) var/to_spawn = total_amount while(to_spawn > 0) @@ -657,6 +668,3 @@ return total_amount return 0 - -/obj/machinery/r_n_d/fabricator/attackby(obj/W as obj, mob/user as mob) - ..() diff --git a/code/modules/research/mechanic/blueprint.dm b/code/modules/research/mechanic/blueprint.dm index f78b97ec103..af6e9f076c5 100644 --- a/code/modules/research/mechanic/blueprint.dm +++ b/code/modules/research/mechanic/blueprint.dm @@ -6,17 +6,15 @@ var/datum/design/mechanic_design/stored_design = null var/design_type = "" //istype is 2longafunction4me var/delete_on_use = 1 //whether the blueprint is used up on use - var/change_design_count = 1 - var/uses = 0 //counter of how many times you can make this design before it disappears! /obj/item/research_blueprint/nano //nano kind name = "nanoprint" icon_state = "nanoprint" desc = "An electromagnetic nanoprint design, used by mechanics. This nanopaper variant is more advanced than the normal version." - change_design_count = 0 - uses = -1 + delete_on_use = 0 -/obj/item/research_blueprint/New(var/new_loc, var/datum/design/mechanic_design/printed_design, var/maxuses = 0 as num) + +/obj/item/research_blueprint/New(var/new_loc, var/datum/design/mechanic_design/printed_design) ..(new_loc) if(!istype(printed_design)) @@ -28,10 +26,5 @@ if(stored_design) //if it doesn't have a source (like a printer), a blueprint can have no design name = "[design_type] " + name + " ([printed_design.name])" - if(change_design_count && maxuses > 0) //can't change nano uses - uses = maxuses - else - uses = -1 - pixel_x = rand(-3, 3) pixel_y = rand(-5, 6) \ No newline at end of file diff --git a/code/modules/research/mechanic/blueprinter.dm b/code/modules/research/mechanic/blueprinter.dm index d68efa33c14..81ba02ec822 100644 --- a/code/modules/research/mechanic/blueprinter.dm +++ b/code/modules/research/mechanic/blueprinter.dm @@ -10,7 +10,6 @@ var/nano_loaded = 0 var/max_paper = 10 var/max_nano = 10 - var/max_paperprint_uses = 1 //how many uses you get out of a paper blueprint research_flags = HASOUTPUT @@ -29,7 +28,6 @@ /obj/machinery/r_n_d/blueprinter/RefreshParts() var/list/bins = list() - var/obj/item/weapon/stock_parts/manipulator/M if(!component_parts) return for(var/obj/item/weapon/stock_parts/matter_bin/MB in component_parts) @@ -37,14 +35,6 @@ bins += MB.rating max_paper = 10 * bins[1] max_nano = 10 * bins[2] - for(var/obj/item/weapon/stock_parts/SP in component_parts) - if(istype(SP, /obj/item/weapon/stock_parts/manipulator)) - M = SP - break - if(M) - max_paperprint_uses = 1 * M.rating - else - max_paperprint_uses = 1 /obj/machinery/r_n_d/blueprinter/attackby(var/atom/A, mob/user) if(..()) @@ -104,7 +94,7 @@ new/obj/item/research_blueprint/nano(output.loc, design) nano_loaded -= 1 else - new/obj/item/research_blueprint(output.loc, design, max_paperprint_uses) + new/obj/item/research_blueprint(output.loc, design) paper_loaded -= 1 src.visible_message("\icon [src]\The [src] beeps: Successfully printed the [design.name] design.") spawn(20) diff --git a/code/modules/research/mechanic/component_exchanger.dm b/code/modules/research/mechanic/component_exchanger.dm index 66ec5f2158f..225b913a911 100644 --- a/code/modules/research/mechanic/component_exchanger.dm +++ b/code/modules/research/mechanic/component_exchanger.dm @@ -12,8 +12,7 @@ slot_flags = SLOT_BELT w_class = 2 item_state = "electronic" - m_amt = 0 //So the autolathe doesn't try to eat it - g_amt = 0 + starting_materials = null w_type = RECYK_ELECTRONIC origin_tech = "magnets=2;engineering=4;materials=5;programming=3" var/emagged = 0 //So we can emag it for "improved" functionality diff --git a/code/modules/research/mechanic/device_analyser.dm b/code/modules/research/mechanic/device_analyser.dm index 57e39b1fb7d..c6fb0241444 100644 --- a/code/modules/research/mechanic/device_analyser.dm +++ b/code/modules/research/mechanic/device_analyser.dm @@ -16,11 +16,12 @@ slot_flags = SLOT_BELT w_class = 2 item_state = "electronic" - m_amt = 0 //so the autolathe doesn't try to eat it - g_amt = 0 + starting_materials = null w_type = RECYK_ELECTRONIC origin_tech = "magnets=3;engineering=4;materials=4;programming=3" + mech_flags = MECH_SCAN_FAIL + /obj/item/device/device_analyser/attack_self() ..() loadone = !loadone @@ -44,7 +45,7 @@ switch(CanCreateDesign(O, user)) //this proc. Checks to see if there's anything illegal or bad in the thing before scanning it if(1) if(max_designs && !(max_designs <= loaded_designs.len)) - loaded_designs += new /datum/design/mechanic_design(O) + loaded_designs += getScanDesign(O) user.visible_message("[user] scans \the [O].", "You successfully scan \the [O].") return 1 else @@ -108,4 +109,5 @@ if(src.syndi_filter) if((techlist && techlist["syndicate"]) || (O.mech_flags & MECH_SCAN_ILLEGAL)) return -1 //special negative return case - return 1 \ No newline at end of file + return 1 + diff --git a/code/modules/research/mechanic/flatpacker.dm b/code/modules/research/mechanic/flatpacker.dm index 93e8e3937f3..abe75de17eb 100644 --- a/code/modules/research/mechanic/flatpacker.dm +++ b/code/modules/research/mechanic/flatpacker.dm @@ -1,6 +1,3 @@ -#define FLA_FAB_WIDTH 1000 -#define FLA_FAB_HEIGHT 600 - #define FLA_FAB_BASETIME 0.5 /obj/machinery/r_n_d/fabricator/mechanic_fab/flatpacker @@ -13,7 +10,7 @@ build_time = FLA_FAB_BASETIME - design_types = list("machine" = 1, "item" = 0) + design_types = list("machine") var/build_parts = list( /obj/item/weapon/stock_parts/micro_laser = 1, @@ -74,17 +71,12 @@ src.visible_message("\icon [src] \The [src] beeps: \"Succesfully completed \the [being_built.name].\"") src.being_built = null - //blueprint stuff - if(uses_list[part] > 0) - uses_list[part]-- - if(uses_list[part] == 0) - uses_list -= part - remove_part_from_set(part.category, part) src.updateUsrDialog() src.busy = 0 return 1 /obj/machinery/r_n_d/fabricator/mechanic_fab/flatpacker/attackby(var/obj/item/O as obj, var/mob/user as mob) - ..() + if(..()) + return 1 if (O.is_open_container()) return 1 \ No newline at end of file diff --git a/code/modules/research/mechanic/mechanic_designs.dm b/code/modules/research/mechanic/mechanic_designs.dm index b406e97ba28..cd49dc5bdf7 100644 --- a/code/modules/research/mechanic/mechanic_designs.dm +++ b/code/modules/research/mechanic/mechanic_designs.dm @@ -6,7 +6,6 @@ build_path = null //used to store the type of the design itself (not to be confused with design type, this is the class of the thing) req_tech = list() //the origin tech of either the item, or the board in the machine - var/obj/item/weapon/circuitboard/connected_circuit //used to store the type of the circuit in a scanned machine. Empty for items category = "" /datum/design/mechanic_design/New(var/obj/O) //sets the name, type, design, origin_tech, and circuit, all by itself @@ -15,107 +14,83 @@ name = O.name desc = initial(O.desc) //we use initial because some things edit the description build_path = O.type + design_list += src //puts us in the design list to be found later, possibly + if(istype(O, /obj/machinery)) var/obj/machinery/M = O design_type = "machine" + materials += list(MAT_IRON = 5 * CC_PER_SHEET_METAL) //cost of the frame if(M.component_parts && M.component_parts.len) category = "Machines" - for(var/obj/item/weapon/circuitboard/CB in M.component_parts) //fetching the circuit by looking in the parts - if(istype(CB)) - connected_circuit = CB.type - break + for(var/obj/item/I in M.component_parts) //fetching the circuit by looking in the parts + if(istype(I, /obj/item/weapon/circuitboard)) + var/obj/item/weapon/circuitboard/CB = I + req_tech = ConvertReqString2List(CB.origin_tech) //our tech is the circuit's requirement + + var/datum/design/part_design = FindDesign(I) + if(part_design) + copyCost(part_design, filter_chems = 1) //copy those materials requirements + else if(istype(M, /obj/machinery/computer)) category = "Computers" var/obj/machinery/computer/C = M if(C.circuit) - connected_circuit = text2path(C.circuit) - if(connected_circuit) //our tech is the circuit's requirement - req_tech = ConvertReqString2List(initial(connected_circuit.origin_tech)) - Gen_Mach_Reqs() - Gen_Tech_Mats(1.5)//consider using M.component_parts.len for this in the future + var/obj/item/weapon/circuitboard/CB = text2path(C.circuit) + req_tech = ConvertReqString2List(initial(CB.origin_tech)) //have to use initial because it's a path + var/datum/design/circuit_design = FindTypeDesign(CB) + if(circuit_design) + copyCost(circuit_design, filter_chems = 1) + else if(istype(O, /obj/item)) var/obj/item/I = O - var/found_design = FindDesign(I) category = "Items" design_type = "item" - if(found_design) - var/datum/design/D = found_design - //message_admins("Found the [D]") - req_tech = D.req_tech //our tech is simply the item requirement - materials = D.materials - materials["$plastic"] += round(0.1 * src.MatTotal()) //plastic reqs - del(D) - else - req_tech = ConvertReqString2List(I.origin_tech) - Gen_Tech_Mats(1) + req_tech = ConvertReqString2List(I.origin_tech) + if(I.materials) + for(var/matID in I.materials.storage) + if(I.materials.storage[matID] > 0) + materials += list("[matID]" = I.materials.storage[matID]) + if(!category) category = "Misc" return src +//Takes the materials of a design, and adds them to this one +/datum/design/mechanic_design/proc/copyCost(var/datum/design/D, filter_mats = 0, filter_chems = 0) + for(var/matID in D.materials) + if(copytext(matID, 1, 2) == "$") + if(filter_mats) + continue + else + if(filter_chems) + continue + + if(!(matID in materials)) + materials += list("[matID]" = 0) + + materials[matID] += D.materials[matID] + +/* Saved for use maybe some other time - used to generate random additional costs /datum/design/mechanic_design/proc/Gen_Tech_Mats(var/modifier = 1) if(modifier < 0) //fuck off return var/techtotal = src.TechTotal() / 2 - materials["$iron"] += techtotal * round(rand(300, 1500), 100) * modifier - materials["$glass"] += techtotal * round(rand(150, 300), 50) * modifier + materials[MAT_IRON] += techtotal * round(rand(300, 1500), 100) * modifier + materials[MAT_GLASS] += techtotal * round(rand(150, 300), 50) * modifier if(src.design_type == "item") if(prob(techtotal * 15)) //let's add an extra cost of some medium-rare material - sure a lot of items - materials[pick("$plasma", "$uranium", "$gold", "$silver")] += techtotal * round(rand(50, 250), 10) * modifier + materials[pick(MAT_PLASMA, MAT_URANIUM, MAT_GOLD, MAT_SILVER)] += techtotal * round(rand(50, 250), 10) * modifier if(prob(techtotal * 8))//and another cost, because we can - can proc for some items - materials[pick("$plasma", "$uranium", "$gold", "$silver")] += techtotal * round(rand(50, 250), 10) * modifier + materials[pick(MAT_PLASMA, MAT_URANIUM, MAT_GOLD, MAT_SILVER)] += techtotal * round(rand(50, 250), 10) * modifier if(techtotal >= 7) //let's add something REALLY rare - bananium and phazon removed for now - materials[/*pick(*/"$diamond"/*, "$clown", "$phazon")*/] += techtotal * round(rand(10, 150), 10) * modifier + materials[/*pick(*/MAT_DIAMOND/*, MAT_CLOWN, MAT_PHAZON)*/] += techtotal * round(rand(10, 150), 10) * modifier for(var/matID in materials) materials[matID] -= (materials[matID] % 10) //clean up the numbers - materials["$plastic"] += 0.1 * src.MatTotal() * modifier //100% materials, extra 10% plastic cost - -//returns the required materials for the parts of a machine design -/datum/design/mechanic_design/proc/Gen_Mach_Reqs() - - materials["$iron"] += 20000 //base costs, the best costs - materials["$glass"] += 2000 - - if(istype(build_path, /obj/machinery/computer)) - var/datum/design/circuit_design = FindDesign(connected_circuit) - if(circuit_design) - //message_admins("Found the circuit design") - circuit_design = new circuit_design - for(var/matID in circuit_design.materials) - if(copytext(matID,1,2) == "$") - materials[matID] += circuit_design.materials[matID] - del(circuit_design) - else - materials["$glass"] += 2000 - //message_admins("Couldn't find the board") - return 1 - - else - - var/obj/machinery/test_machine = new build_path - //why do we instance? - //because components are generated in New() - - for(var/obj/item/thispart in test_machine.component_parts) - //message_admins("We're trying to find the design for [thispart]") - var/datum/design/part_design = FindDesign(thispart) - if(!part_design) - materials["$iron"] += round(rand(50, 500), 10) - materials["$glass"] += round(rand(20, 300), 10) - continue - //message_admins("We found the design!") - part_design = part_design - var/list/fetched_materials = part_design.materials - for(var/matID in fetched_materials) - if(copytext(matID,1,2) == "$") - materials[matID] += fetched_materials[matID] - del(part_design) - - //gets rid of the instancing - qdel(test_machine) - return 1 + materials[MAT_PLASTIC] += 0.1 * src.MatTotal() * modifier //100% materials, extra 10% plastic cost +*/ proc/ConvertReqString2List(var/list/source_list) //shamelessly ripped from the code for research machines. Shoot me - Comic var/list/temp_list = params2list(source_list) diff --git a/code/modules/research/mechanic/mechanic_fabs.dm b/code/modules/research/mechanic/mechanic_fabs.dm index 1954cdb725a..5d35e0ea723 100644 --- a/code/modules/research/mechanic/mechanic_fabs.dm +++ b/code/modules/research/mechanic/mechanic_fabs.dm @@ -1,10 +1,11 @@ -#define GEN_FAB_WIDTH 1000 //Gen fab stands for General Fabricator -#define GEN_FAB_HEIGHT 600 +#define GEN_FAB_WIDTH 850 //Gen fab stands for General Fabricator +#define GEN_FAB_HEIGHT 400 #define GEN_FAB_BASETIME 5 #define GEN_FAB_BASESTORAGE 225000 +#define PLASTIC_FRACTION 0.1 /obj/machinery/r_n_d/fabricator/mechanic_fab name = "General Fabricator" desc = "A machine used to produce items from blueprint designs." @@ -12,8 +13,9 @@ icon_state = "genfab" max_material_storage = GEN_FAB_BASESTORAGE nano_file = "genfab.tmpl" - var/list/design_types = list("machine" = 0, "item" = 1) - var/list/uses_list = list() + var/list/design_types = list("item") + var/removable_designs = 1 + var/plastic_added = 1 //if plastic costs are added for designs - the autolathe doesn't have this build_time = GEN_FAB_BASETIME @@ -24,8 +26,24 @@ part_sets = list("Items" = list()) + /obj/machinery/r_n_d/fabricator/mechanic_fab/setup_part_sets() - return + + for(var/name_set in part_sets) + var/list/part_set = part_sets[name_set] + if(!istype(part_set) || !part_set.len) + continue + for(var/i = 1; i <= part_set.len; i++) + var/obj/item/I = part_set[i] + part_set[i] = getScanDesign(I) + + for(var/name_set in part_sets) + var/list/part_set = part_sets[name_set] + for(var/element in part_set) + if(!istype(element, /datum/design)) + warning("[element] was left over in setting up parts.") + part_set.Remove(element) + /obj/machinery/r_n_d/fabricator/mechanic_fab/New() ..() @@ -42,15 +60,42 @@ RefreshParts() +////PLASTIC COSTS/// +//We add the plastic cost to this output so people can see it +/obj/machinery/r_n_d/fabricator/mechanic_fab/output_part_cost(var/datum/design/part) + var/output = ..() + if(plastic_added) + output += " | [get_resource_cost_w_coeff(part, MAT_PLASTIC)] Plastic" + return output + +/obj/machinery/r_n_d/fabricator/mechanic_fab/get_resource_cost_w_coeff(var/datum/design/part as obj,var/resource as text, var/roundto=1) + if(resource == MAT_PLASTIC && !(MAT_PLASTIC in part.materials)) //output the extra 0.1 plastic we need + return round(part.MatTotal() * PLASTIC_FRACTION * resource_coeff, roundto) + return round(part.materials[resource]*resource_coeff, roundto) + +/obj/machinery/r_n_d/fabricator/mechanic_fab/remove_materials(var/datum/design/part) + if(plastic_added) + if(!(MAT_PLASTIC in part.materials) && !(research_flags & IGNORE_MATS)) + if(materials.getAmount(MAT_PLASTIC) < get_resource_cost_w_coeff(part, MAT_PLASTIC)) + return 0 + + if(..()) //we passed the tests for the parent, and took resources + if(plastic_added) + if(!(MAT_PLASTIC in part.materials) && !(research_flags & IGNORE_MATS)) + materials.removeAmount(MAT_PLASTIC, get_resource_cost_w_coeff(part, MAT_PLASTIC)) + return 1 + return 0 +///END PLASTIC COST/// + /obj/machinery/r_n_d/fabricator/mechanic_fab/attackby(var/obj/O, var/mob/user) if(..()) return 1 if(istype(O, /obj/item/research_blueprint)) var/obj/item/research_blueprint/RB = O - if(!design_types[RB.design_type]) + if(!(RB.design_type in design_types)) user <<"This isn't the right machine for that kind of blueprint!" return 0 - else if(RB.stored_design && design_types[RB.design_type]) + else if(RB.stored_design && (RB.design_type in design_types)) if(src.AddBlueprint(RB, user)) if(src.AddMechanicDesign(RB.stored_design, user)) overlays += "[base_state]-bp" @@ -58,6 +103,7 @@ if(RB.delete_on_use) qdel(RB) //we delete if the thing is set to delete. Always set to 1 right now spawn(10) overlays -= "[base_state]-bp" + return 1 /obj/machinery/r_n_d/fabricator/mechanic_fab/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null) if(stat & (BROKEN|NOPOWER)) @@ -78,9 +124,10 @@ //Get the material names for(var/matID in materials.storage) var/datum/material/material = materials.getMaterial(matID) // get the ID of the materials - if(material && material.stored > 0) - materials_list.Add(list(list("name" = material.processed_name, "storage" = material.stored, "commands" = list("eject" = matID)))) // get the amount of the materials + if(material && materials.storage[matID] > 0) + materials_list.Add(list(list("name" = material.processed_name, "storage" = materials.storage[matID], "commands" = list("eject" = matID)))) // get the amount of the materials data["materials"] = materials_list + data["removableDesigns"] = removable_designs var/parts_list[0] // setup a list to get all the information for parts @@ -89,16 +136,16 @@ var/list/parts = part_sets[set_name] var/list/set_name_list = list() var/i = 0 - for(var/datum/design/mechanic_design/part in parts) + for(var/datum/design/part in parts) //message_admins("Adding the [part.name] to the list") i++ - set_name_list.Add(list(list("name" = part.name, "uses" = uses_list[part], "cost" = output_part_cost(part), "time" = get_construction_time_w_coeff(part)/10, "command1" = list("add_to_queue" = "[i][set_name]"), "command2" = list("build" = "[i][set_name]"), "command3" = list("remove_design" = "[i][set_name]")))) + set_name_list.Add(list(list("name" = part.name, "cost" = output_part_cost(part), "time" = get_construction_time_w_coeff(part)/10, "command1" = list("add_to_queue" = "[i][set_name]"), "command2" = list("build" = "[i][set_name]"), "command3" = list("remove_design" = "[i][set_name]")))) parts_list[set_name] = set_name_list data["parts"] = parts_list // assigning the parts data to the data sent to UI ui = nanomanager.try_update_ui(user, src, ui_key, ui, data) if (!ui) - ui = new(user, src, ui_key, nano_file, name, FAB_SCREEN_WIDTH, FAB_SCREEN_HEIGHT) + ui = new(user, src, ui_key, nano_file, name, GEN_FAB_WIDTH, GEN_FAB_HEIGHT) ui.set_initial_data(data) ui.open() @@ -106,7 +153,7 @@ if(..()) // critical exploit prevention, do not remove unless you replace it -walter0o return 1 - if(href_list["remove_design"]) + if(href_list["remove_design"] && removable_designs) var/datum/design/part = getTopicDesign(href_list["remove_design"]) remove_part_from_set(copytext(href_list["remove_design"], 2), part) return 1 @@ -118,17 +165,9 @@ var/datum/design/mechanic_design/BPdesign = blueprint.stored_design for(var/list in src.part_sets) for(var/datum/design/mechanic_design/MD in part_sets[list]) - if(MD.build_path == BPdesign.build_path) //so they make the same thing, which is good - if(uses_list[MD] > 0) //so we're adding to a paper design, with finite uses - if(blueprint.uses > 0) //adding paper to paper - uses_list[MD] += blueprint.uses //makes the design uses stack with multiple paper designs - return 1 - else //adding nanopaper to paper - uses_list[MD] = -1 //we make it infinite, hurray! - else - user << "You can't add that design, as it's already loaded into the machine!" - return 0 //can't add to an infinite design - uses_list[BPdesign] = blueprint.uses + if(MD == BPdesign) //because they're the same design, they make exactly the same thing + user << "You can't add that design, as it's already loaded into the machine!" + return 0 //can't add to an infinite design return 1 //let's add the new design, since we haven't found it /obj/machinery/r_n_d/fabricator/mechanic_fab/proc/AddMechanicDesign(var/datum/design/mechanic_design/design) @@ -140,26 +179,3 @@ else return 0 return 0 - -/obj/machinery/r_n_d/fabricator/mechanic_fab/attackby(var/obj/item/O as obj, var/mob/user as mob) - ..() - if (O.is_open_container()) - return 0 - -/obj/machinery/r_n_d/fabricator/mechanic_fab/build_part(var/datum/design/mechanic_design/part) - . = ..() - if(.) - if(uses_list[part] > 0) - uses_list[part]-- - if(uses_list[part] == 0) - uses_list -= part - remove_part_from_set(part.category, part) - -/obj/machinery/r_n_d/fabricator/mechanic_fab/add_to_queue(var/datum/design/mechanic_design/part) - . = ..() - if(uses_list[part] > 0) - uses_list[part]-- - if(uses_list[part] == 0) - uses_list -= part - remove_part_from_set(part.category, part) - return . \ No newline at end of file diff --git a/code/modules/research/mechanic/reverse_engine.dm b/code/modules/research/mechanic/reverse_engine.dm index d9d8a728bbe..dee753fad09 100644 --- a/code/modules/research/mechanic/reverse_engine.dm +++ b/code/modules/research/mechanic/reverse_engine.dm @@ -118,11 +118,9 @@ var/techdifference = 0 if(techlist.len && linked_console) //message_admins("We have a techlist and a linked_console") - var/obj/machinery/computer/rdconsole/console = src.linked_console - var/list/possible_tech = console.files.possible_tech for(var/checktech in techlist) //message_admins("Looking at [checktech] with value of [techlist[checktech]]") - for(var/datum/tech/pointed_tech in possible_tech) //if we find that technology + for(var/datum/tech/pointed_tech in tech_list) //if we find that technology if(pointed_tech.id == checktech) if(techlist[checktech] > pointed_tech.level) //if the machine board's research level is higher than the one on the console //message_admins("Found a difference of [techlist[checktech] - pointed_tech.level]") diff --git a/code/modules/research/rdconsole.dm b/code/modules/research/rdconsole.dm index 3d3b0f85541..38c98ad89cb 100644 --- a/code/modules/research/rdconsole.dm +++ b/code/modules/research/rdconsole.dm @@ -67,10 +67,12 @@ won't update every console in existence) but it's more of a hassle to do. Also, req_access = list(access_tox) //Data and setting manipulation requires scientist access. + starting_materials = list() + light_color = LIGHT_COLOR_PINK /obj/machinery/computer/rdconsole/proc/Maximize() - files.known_tech=files.possible_tech + files.known_tech = tech_list.Copy() for(var/datum/tech/KT in files.known_tech) if(KT.level < KT.max_level) KT.level=KT.max_level @@ -92,24 +94,8 @@ won't update every console in existence) but it's more of a hassle to do. Also, /obj/machinery/computer/rdconsole/proc/CallMaterialName(var/ID) var/return_name = null if (copytext(ID, 1, 2) == "$") - return_name = copytext(ID, 2) - switch(return_name) - if("metal") - return_name = "Metal" - if("glass") - return_name = "Glass" - if("gold") - return_name = "Gold" - if("silver") - return_name = "Silver" - if("plasma") - return_name = "Solid Plasma" - if("uranium") - return_name = "Uranium" - if("diamond") - return_name = "Diamond" - if("clown") - return_name = "Bananium" + var/datum/material/mat = materials.getMaterial(ID) + return mat.processed_name else for(var/R in typesof(/datum/reagent) - /datum/reagent) var/datum/reagent/T = new R() @@ -304,13 +290,9 @@ won't update every console in existence) but it's more of a hassle to do. Also, files.UpdateTech(T, temp_tech[T]) 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. - var/datum/material/metal = linked_lathe.materials.getMaterial("iron") - var/datum/material/glass = linked_lathe.materials.getMaterial("glass") - metal.stored += min((linked_lathe.max_material_storage - linked_lathe.TotalMaterials()), (linked_destroy.loaded_item.m_amt*linked_destroy.decon_mod)) - glass.stored += min((linked_lathe.max_material_storage - linked_lathe.TotalMaterials()), (linked_destroy.loaded_item.g_amt*linked_destroy.decon_mod)) - /*linked_lathe.materials["iron"]=metal - linked_lathe.materials["glass"]=glass*/ + if(linked_lathe && linked_destroy.loaded_item.materials) //Also sends salvaged materials to a linked protolathe, if any. + for(var/matID in linked_destroy.loaded_item.materials.storage) //Transfers by ID + linked_lathe.materials.addAmount(matID, linked_destroy.loaded_item.materials.storage[matID]) linked_destroy.loaded_item = null for(var/obj/I in linked_destroy.contents) for(var/mob/M in I.contents) @@ -492,10 +474,10 @@ won't update every console in existence) but it's more of a hassle to do. Also, warning("PROTOLATHE: Unknown material [matID]! ([href])") else var/obj/item/stack/sheet/sheet = new M.sheettype(linked_lathe.output.loc) - var/available_num_sheets = round(M.stored/sheet.perunit) + var/available_num_sheets = round(linked_lathe.materials.storage[matID]/sheet.perunit) if(available_num_sheets>0) sheet.amount = min(available_num_sheets, desired_num_sheets) - M.stored = max(0, (M.stored-sheet.amount * sheet.perunit)) + linked_lathe.materials.removeAmount(matID, sheet.amount * sheet.perunit) else del sheet else if(href_list["imprinter_ejectsheet"] && linked_imprinter) //Causes the protolathe to eject a sheet of material @@ -510,10 +492,10 @@ won't update every console in existence) but it's more of a hassle to do. Also, warning("IMPRINTER: Unknown material [matID]! ([href])") else var/obj/item/stack/sheet/sheet = new M.sheettype(linked_imprinter.output.loc) - var/available_num_sheets = round(M.stored/sheet.perunit) + var/available_num_sheets = round(linked_imprinter.materials.storage[matID]/sheet.perunit) if(available_num_sheets>0) sheet.amount = min(available_num_sheets, desired_num_sheets) - M.stored = max(0, (M.stored-sheet.amount * sheet.perunit)) + linked_imprinter.materials.removeAmount(matID, sheet.amount * sheet.perunit) else del sheet @@ -918,10 +900,10 @@ won't update every console in existence) but it's more of a hassle to do. Also, for(var/matID in linked_lathe.materials.storage) var/datum/material/M=linked_lathe.materials.getMaterial(matID) - dat += "
  • [M.stored] cm3 of [M.processed_name]" - if(M.stored >= M.cc_per_sheet) + dat += "
  • [linked_lathe.materials.storage[matID]] cm3 of [M.processed_name]" + if(linked_lathe.materials.storage[matID] >= M.cc_per_sheet) dat += " - (1 Sheet) " - if(M.stored >= (M.cc_per_sheet*5)) + if(linked_lathe.materials.storage[matID] >= (M.cc_per_sheet*5)) dat += "(5 Sheets) " dat += "(Max Sheets)" else @@ -1036,12 +1018,12 @@ won't update every console in existence) but it's more of a hassle to do. Also, for(var/matID in linked_imprinter.materials.storage) var/datum/material/M=linked_imprinter.materials.getMaterial(matID) - if(!(M.id in linked_imprinter.allowed_materials)) + if(!(matID in linked_imprinter.allowed_materials)) continue - dat += "
  • [M.stored] cm3 of [M.processed_name]" - if(M.stored >= M.cc_per_sheet) + dat += "
  • [linked_imprinter.materials.storage[matID]] cm3 of [M.processed_name]" + if(linked_imprinter.materials.storage[matID] >= M.cc_per_sheet) dat += " - (1 Sheet) " - if(M.stored >= (M.cc_per_sheet*5)) + if(linked_imprinter.materials.storage[matID] >= (M.cc_per_sheet*5)) dat += "(5 Sheets) " dat += "(Max Sheets)" else diff --git a/code/modules/research/rdmachines.dm b/code/modules/research/rdmachines.dm index 1d466bdbe15..6b3d3229fc7 100644 --- a/code/modules/research/rdmachines.dm +++ b/code/modules/research/rdmachines.dm @@ -11,10 +11,6 @@ var/global/list/rnd_machines = list() var/hacked = 0 var/disabled = 0 var/shocked = 0 - var/list/wires = list() - var/hack_wire - var/disable_wire - var/shock_wire var/obj/machinery/computer/rdconsole/linked_console var/obj/output var/stopped = 0 @@ -25,34 +21,25 @@ var/global/list/rnd_machines = list() var/nano_file = "" - var/datum/materials/materials var/max_material_storage = 0 var/list/allowed_materials[0] //list of material IDs we take, if we whitelist var/research_flags //see setup.dm for details of these + var/datum/wires/rnd/wires = null + /obj/machinery/r_n_d/New() rnd_machines |= src ..() - wires["Red"] = 0 - wires["Blue"] = 0 - wires["Green"] = 0 - wires["Yellow"] = 0 - wires["Black"] = 0 - wires["White"] = 0 - var/list/w = list("Red","Blue","Green","Yellow","Black","White") - 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 + + wires = new(src) base_state = icon_state icon_state_open = "[base_state]_t" - if(research_flags & TAKESMATIN) - materials = new + if(research_flags & TAKESMATIN && !materials) + materials = getFromDPool(/datum/materials, src) + if(ticker) initialize() // Define initial output. @@ -68,6 +55,7 @@ var/global/list/rnd_machines = list() /obj/machinery/r_n_d/Destroy() rnd_machines -= src + wires = null ..() /obj/machinery/r_n_d/update_icon() @@ -87,15 +75,7 @@ var/global/list/rnd_machines = list() if (shocked) shock(user,50) if(panel_open) - var/dat as text - dat += "[src.name] Wires:
    " - for(var/wire in src.wires) - dat += text("[wire] Wire: [src.wires[wire] ? "Mend" : "Cut"] Pulse
    ") - - 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("[src.name] Hacking[dat]","window=hack_win") + wires.Interact(user) else if (research_flags & NANOTOUCH) ui_interact(user) return @@ -109,41 +89,12 @@ var/global/list/rnd_machines = list() return 1 usr.set_machine(src) src.add_fingerprint(usr) - if(href_list["pulse"]) - var/temp_wire = href_list["wire"] - 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 == href_list["wire"]) - src.hacked = !src.hacked - spawn(100) src.hacked = !src.hacked - if(src.disable_wire == href_list["wire"]) - src.disabled = !src.disabled - src.shock(usr,50) - spawn(100) src.disabled = !src.disabled - if(src.shock_wire == href_list["wire"]) - src.shocked = !src.shocked - src.shock(usr,50) - spawn(100) src.shocked = !src.shocked - if(href_list["cut"]) - if (!istype(usr.get_active_hand(), /obj/item/weapon/wirecutters)) - usr << "You need wirecutters!" - else - var/temp_wire = href_list["wire"] - 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) src.updateUsrDialog() +//Called when the hack wire is toggled in some way +/obj/machinery/r_n_d/proc/update_hacked() + return + /obj/machinery/r_n_d/togglePanelOpen(var/item/toggleitem, mob/user) if(..()) if (panel_open && linked_console) @@ -163,13 +114,13 @@ var/global/list/rnd_machines = list() if(..() == 1) if (materials) for(var/matID in materials.storage) - var/datum/material/M = materials.storage[matID] + var/datum/material/M = materials.getMaterial(matID) var/obj/item/stack/sheet/sheet = new M.sheettype(src.loc) if(sheet) - var/available_num_sheets = round(M.stored/sheet.perunit) + var/available_num_sheets = round(materials.storage[matID]/sheet.perunit) if(available_num_sheets>0) sheet.amount = available_num_sheets - M.stored = max(0, (M.stored-sheet.amount * sheet.perunit)) + materials.removeAmount(matID, sheet.amount * sheet.perunit) else qdel(sheet) return 1 @@ -178,14 +129,17 @@ var/global/list/rnd_machines = list() /obj/machinery/r_n_d/attackby(var/obj/item/O as obj, var/mob/user as mob) if (shocked) shock(user,50) - if (disabled) - return 1 if (busy) user << "The [src.name] is busy. Please wait for completion of previous operation." return 1 + if( ..() ) + return 1 + if(panel_open) + wires.Interact(user) + return 1 if (stat) return 1 - if( ..() ) + if (disabled) return 1 if (istype(O, /obj/item/device/multitool)) if(!panel_open && research_flags &HASOUTPUT) @@ -276,20 +230,3 @@ var/global/list/rnd_machines = list() if(materials) return materials.getVolume() return 0 - -/obj/machinery/r_n_d/proc/check_mat(var/datum/design/being_built, var/M, var/num_requested=1) - if(copytext(M,1,2) == "$") - if(src.research_flags & IGNORE_MATS) - return num_requested - var/matID=copytext(M,2) - var/datum/material/material = materials.getMaterial(matID) - for(var/n=num_requested,n>=1,n--) - if ((material.stored-(being_built.materials[M]*n)) >= 0) - return n - else - if(src.research_flags & IGNORE_CHEMS) - return num_requested - for(var/n=num_requested,n>=1,n--) - if (reagents.has_reagent(M, being_built.materials[M])) - return n - return 0 diff --git a/code/modules/research/research.dm b/code/modules/research/research.dm index 9778de638b6..0f2c5733952 100644 --- a/code/modules/research/research.dm +++ b/code/modules/research/research.dm @@ -44,19 +44,20 @@ research holder datum. ** Includes all the helper procs and basic tech processing. ** ***************************************************************/ -/datum/research //Holder for all the existing, archived, and known tech. Individual to console. +var/global/list/design_list = list() +var/global/list/tech_list = list() - //Datum/tech go here. - var/list/possible_tech = list() //List of all tech in the game that players have access to (barring special events). - var/list/known_tech = list() //List of locally known tech. - var/list/possible_designs = list() //List of all designs (at base reliability). +/datum/research //Holder for all the existing, archived, and known tech. Individual to console. + var/list/known_tech = list() //List of locally known tech. var/list/known_designs = list() //List of available designs (at base reliability). /datum/research/New() //Insert techs into possible_tech here. Known_tech automatically updated. - for(var/T in typesof(/datum/tech) - /datum/tech) - possible_tech += new T(src) - for(var/D in typesof(/datum/design) - /datum/design) - possible_designs += new D(src) + if(!tech_list.len) + for(var/T in typesof(/datum/tech) - /datum/tech) + tech_list += new T() + if(!design_list.len) + for(var/D in typesof(/datum/design) - /datum/design) + design_list += new D() RefreshResearch() @@ -134,10 +135,10 @@ research holder datum. //Refreshes known_tech and known_designs list. Then updates the reliability vars of the designs in the known_designs list. //Input/Output: n/a /datum/research/proc/RefreshResearch() - for(var/datum/tech/PT in possible_tech) + for(var/datum/tech/PT in tech_list) if(TechHasReqs(PT)) AddTech2Known(PT) - for(var/datum/design/PD in possible_designs) + for(var/datum/design/PD in design_list) if(DesignHasReqs(PD)) AddDesign2Known(PD) for(var/datum/tech/T in known_tech) @@ -282,8 +283,7 @@ datum/tech/robotics icon_state = "datadisk2" item_state = "card-id" w_class = 1.0 - m_amt = 30 - g_amt = 10 + starting_materials = list(MAT_IRON = 30, MAT_GLASS = 10) w_type = RECYK_ELECTRONIC var/datum/tech/stored diff --git a/code/modules/research/xenoarchaeology/chemistry.dm b/code/modules/research/xenoarchaeology/chemistry.dm index ff890579cc8..8af0de3b8a5 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 = 50 + starting_materials = list(MAT_GLASS = 20) w_type = RECYK_GLASS w_class = 1.0 amount_per_transfer_from_this = 1 diff --git a/code/setup.dm b/code/setup.dm index 4ac18513a9c..e9f44f1639d 100644 --- a/code/setup.dm +++ b/code/setup.dm @@ -541,7 +541,7 @@ var/static/list/scarySounds = list('sound/weapons/thudswoosh.ogg','sound/weapons var/list/liftable_structures = list(\ - /obj/machinery/autolathe, \ + /obj/machinery/r_n_d/fabricator/mechanic_fab/autolathe, \ /obj/machinery/constructable_frame, \ /obj/machinery/portable_atmospherics/hydroponics, \ /obj/machinery/computer, \ @@ -688,6 +688,20 @@ var/list/TAGGERLOCATIONS = list( #define ORGAN_MUTATED 2048 #define ORGAN_PEG 4096 // ROB'S MAGICAL PEGLEGS v2 +//////////////////MATERIAL DEFINES///////////////// + +#define MAT_IRON "$iron" +#define MAT_GLASS "$glass" +#define MAT_GOLD "$gold" +#define MAT_SILVER "$silver" +#define MAT_URANIUM "$uranium" +#define MAT_DIAMOND "$diamond" +#define MAT_PHAZON "$phazon" +#define MAT_PLASMA "$plasma" +#define MAT_CLOWN "$clown" +#define MAT_PLASTIC "$plastic" + + //Please don't edit these values without speaking to Errorage first ~Carn //Admin Permissions #define R_BUILDMODE 1 diff --git a/icons/obj/machines/mechanic.dmi b/icons/obj/machines/mechanic.dmi index e6200e76962..9a9540bd8f3 100644 Binary files a/icons/obj/machines/mechanic.dmi and b/icons/obj/machines/mechanic.dmi differ diff --git a/maps/defficiency.dmm b/maps/defficiency.dmm index f6eea4cf98c..17ea0c6ee02 100644 --- a/maps/defficiency.dmm +++ b/maps/defficiency.dmm @@ -3794,7 +3794,7 @@ "buX" = (/obj/structure/stool/bed/chair/office/dark{dir = 8},/obj/structure/disposalpipe/segment{dir = 4},/obj/effect/landmark/start{name = "Cargo Technician"},/turf/simulated/floor,/area/supply/storage) "buY" = (/obj/machinery/atmospherics/unary/vent_pump{dir = 4; on = 1},/obj/structure/disposalpipe/segment{dir = 4},/turf/simulated/floor,/area/supply/storage) "buZ" = (/obj/machinery/atmospherics/pipe/simple/supply/hidden{dir = 4},/obj/structure/disposalpipe/junction{icon_state = "pipe-y"; dir = 8},/turf/simulated/floor,/area/supply/storage) -"bva" = (/obj/machinery/autolathe,/turf/simulated/floor,/area/supply/storage) +"bva" = (/obj/machinery/r_n_d/fabricator/mechanic_fab/autolathe,/turf/simulated/floor,/area/supply/storage) "bvb" = (/obj/machinery/door/poddoor{density = 0; dir = 4; icon_state = "pdoor0"; id_tag = "SM_Rad1"; name = "radiation shutters"; opacity = 0},/obj/structure/cable{d1 = 1; d2 = 4; icon_state = "1-4"},/turf/simulated/floor/plating,/area/engineering/supermatter_room) "bvc" = (/obj/machinery/atmospherics/pipe/simple/supply/hidden{dir = 4},/obj/machinery/door/airlock/maintenance{name = "Derelict Parts Access"; req_access_txt = "12"},/turf/simulated/floor/plating,/area/derelictparts/fsderelict) "bvd" = (/obj/effect/decal/cleanable/cobweb,/obj/structure/table,/obj/item/weapon/folder,/obj/item/weapon/pen,/turf/simulated/floor/plating{icon_state = "platingdmg1"},/area/derelictparts/fsderelict) @@ -9935,7 +9935,7 @@ "dJc" = (/turf/simulated/floor/plating/airless{broken = 1; icon_state = "panelscorched"},/area/derelict/atmos) "dJd" = (/obj/machinery/vending/engivend,/turf/simulated/floor,/area/derelict/solar_control) "dJe" = (/obj/machinery/vending/tool,/turf/simulated/floor,/area/derelict/solar_control) -"dJf" = (/obj/machinery/autolathe{desc = "Your typical Autolathe. It appears to have much more options than your regular one, however..."; hacked = 1; name = "Derelict Autolathe"},/turf/simulated/floor,/area/derelict/solar_control) +"dJf" = (/obj/machinery/r_n_d/fabricator/mechanic_fab/autolathe{desc = "Your typical Autolathe. It appears to have much more options than your regular one, however..."; hacked = 1; name = "Derelict Autolathe"},/turf/simulated/floor,/area/derelict/solar_control) "dJg" = (/obj/machinery/door/airlock/external{name = "Air Bridge Access"},/turf/simulated/floor/plating,/area/derelict/atmos) "dJh" = (/obj/machinery/door/airlock/external{name = "Air Bridge Access"},/turf/space,/area/derelict/atmos) "dJi" = (/obj/structure/lattice,/turf/simulated/floor,/area/derelict/atmos) diff --git a/maps/metaclub.dmm b/maps/metaclub.dmm index 9db87078439..da68a025c12 100644 --- a/maps/metaclub.dmm +++ b/maps/metaclub.dmm @@ -3421,7 +3421,7 @@ "bnO" = (/obj/machinery/photocopier,/turf/simulated/floor{dir = 2; icon_state = "brown"},/area/supply/office{name = "\improper Cargo Office"}) "bnP" = (/obj/machinery/mineral/input,/turf/simulated/floor{dir = 2; icon_state = "brown"},/area/supply/office{name = "\improper Cargo Office"}) "bnQ" = (/obj/structure/disposalpipe/segment,/obj/machinery/hologram/holopad,/turf/simulated/floor{dir = 2; icon_state = "brown"},/area/supply/office{name = "\improper Cargo Office"}) -"bnR" = (/obj/machinery/autolathe,/obj/machinery/newscaster{pixel_x = 28; pixel_y = 0},/turf/simulated/floor{dir = 6; icon_state = "brown"},/area/supply/office{name = "\improper Cargo Office"}) +"bnR" = (/obj/machinery/r_n_d/fabricator/mechanic_fab/autolathe,/obj/machinery/newscaster{pixel_x = 28; pixel_y = 0},/turf/simulated/floor{dir = 6; icon_state = "brown"},/area/supply/office{name = "\improper Cargo Office"}) "bnS" = (/obj/structure/stool/bed/chair/comfy/beige{dir = 1; icon_state = "comfychair_beige"; tag = ""},/obj/effect/landmark/start{name = "Assistant"},/turf/simulated/floor{icon_state = "grimy"},/area/hallway/primary/port) "bnT" = (/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden,/turf/simulated/floor{dir = 8; icon_state = "browncorner"},/area/hallway/primary/port) "bnU" = (/obj/structure/disposalpipe/segment{dir = 4; icon_state = "pipe-c"},/obj/machinery/atmospherics/pipe/simple/supply/hidden{dir = 6},/turf/simulated/floor{dir = 2; icon_state = "browncorner"},/area/hallway/primary/port) @@ -4737,7 +4737,7 @@ "bNe" = (/obj/structure/grille,/obj/structure/window/reinforced{dir = 4},/obj/structure/window/reinforced{dir = 8},/obj/structure/window/reinforced,/turf/simulated/floor/plating,/area/maintenance/aft{name = "Aft Maintenance"}) "bNf" = (/obj/machinery/atmospherics/pipe/simple/supply/hidden{req_access_txt = 1},/obj/machinery/door/poddoor/preopen{id_tag = "Biohazard"; name = "biohazard containment door"},/obj/machinery/door/airlock/maintenance{name = "Research Break Room Maintenance"; req_access_txt = "7"; req_one_access_txt = "0"},/turf/simulated/floor/plating,/area/maintenance/starboard) "bNg" = (/obj/structure/table/reinforced,/obj/item/stack/sheet/glass/rglass{amount = 50; pixel_x = 2; pixel_y = 3},/obj/item/stack/rods{amount = 50},/obj/machinery/light{dir = 4},/obj/item/stack/sheet/glass/glass{amount = 50},/turf/simulated/floor{icon_state = "dark"},/area/ai_monitored/storage/eva{name = "E.V.A. Storage"}) -"bNh" = (/obj/item/device/radio/intercom{dir = 8; name = "Station Intercom (General)"; pixel_x = -28},/obj/machinery/autolathe,/turf/simulated/floor{dir = 9; icon_state = "whitepurple"},/area/science/lab) +"bNh" = (/obj/item/device/radio/intercom{dir = 8; name = "Station Intercom (General)"; pixel_x = -28},/obj/machinery/r_n_d/fabricator/mechanic_fab/autolathe,/turf/simulated/floor{dir = 9; icon_state = "whitepurple"},/area/science/lab) "bNi" = (/obj/structure/cable{icon_state = "0-4"; d2 = 4},/obj/structure/catwalk{icon_state = "catwalk12"},/turf/space,/area/solar/aport) "bNj" = (/obj/structure/window/reinforced,/obj/structure/window/reinforced{dir = 1},/obj/structure/grille,/obj/machinery/atmospherics/pipe/simple/cyan/visible,/turf/simulated/floor/plating,/area/engineering/atmos) "bNk" = (/obj/structure/window/reinforced,/obj/structure/window/reinforced{dir = 1},/obj/structure/grille,/obj/machinery/atmospherics/pipe/simple/cyan/visible{dir = 9},/turf/simulated/floor/plating,/area/engineering/atmos) @@ -8428,7 +8428,7 @@ "dgd" = (/obj/structure/reagent_dispensers/watertank,/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/shuttle/administration/centcom) "dge" = (/obj/machinery/recharge_station,/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/shuttle/administration/centcom) "dgf" = (/obj/machinery/r_n_d/fabricator/mech,/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/shuttle/administration/centcom) -"dgg" = (/obj/machinery/autolathe{desc = "Your typical Autolathe. It appears to have much more options than your regular one, however..."; hacked = 1; name = "Thunderdome Autolathe"},/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/shuttle/administration/centcom) +"dgg" = (/obj/machinery/r_n_d/fabricator/mechanic_fab/autolathe{desc = "Your typical Autolathe. It appears to have much more options than your regular one, however..."; hacked = 1; name = "Thunderdome Autolathe"},/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/shuttle/administration/centcom) "dgh" = (/obj/structure/dispenser,/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/shuttle/administration/centcom) "dgi" = (/obj/structure/stool/bed,/obj/item/weapon/bedsheet,/turf/unsimulated/floor{icon_state = "carpet"},/area/centcom/living) "dgj" = (/obj/machinery/door/airlock/centcom{name = "Living Quarters"; opacity = 1; req_access_txt = "105"},/turf/unsimulated/floor{icon_state = "bar"},/area/centcom/living) @@ -9772,7 +9772,7 @@ "dFV" = (/turf/simulated/floor/plating/airless{broken = 1; icon_state = "panelscorched"},/area/derelict/atmos) "dFW" = (/turf/simulated/floor,/area/derelict/atmos) "dFX" = (/turf/simulated/wall,/area/derelict/atmos) -"dFY" = (/obj/machinery/autolathe{desc = "Your typical Autolathe. It appears to have much more options than your regular one, however..."; hacked = 1; name = "Derelict Autolathe"},/turf/simulated/floor,/area/derelict/solar_control) +"dFY" = (/obj/machinery/r_n_d/fabricator/mechanic_fab/autolathe{desc = "Your typical Autolathe. It appears to have much more options than your regular one, however..."; hacked = 1; name = "Derelict Autolathe"},/turf/simulated/floor,/area/derelict/solar_control) "dFZ" = (/turf/simulated/floor,/area/derelict/solar_control) "dGa" = (/obj/machinery/light/small{dir = 1},/turf/simulated/floor,/area/derelict/solar_control) "dGb" = (/obj/machinery/vending/engivend,/turf/simulated/floor,/area/derelict/solar_control) diff --git a/maps/ministation.dmm b/maps/ministation.dmm index 4749316ce5f..96629eecd6f 100644 --- a/maps/ministation.dmm +++ b/maps/ministation.dmm @@ -287,7 +287,7 @@ "fA" = (/obj/machinery/atmospherics/pipe/simple/supply/hidden{dir = 4},/turf/simulated/floor,/area/supply/storage) "fB" = (/obj/machinery/atmospherics/pipe/simple/supply/hidden{dir = 4},/obj/structure/closet/secure_closet/cargotech,/obj/machinery/light{icon_state = "tube1"; dir = 4},/turf/simulated/floor{dir = 4; icon_state = "yellow"},/area/supply/storage) "fC" = (/obj/machinery/atmospherics/pipe/simple/supply/hidden{dir = 4},/turf/simulated/wall,/area/supply/storage) -"fD" = (/obj/machinery/atmospherics/pipe/simple/supply/hidden{dir = 4},/obj/machinery/autolathe,/obj/machinery/light{icon_state = "tube1"; dir = 8},/turf/simulated/floor,/area/supply/storage) +"fD" = (/obj/machinery/atmospherics/pipe/simple/supply/hidden{dir = 4},/obj/machinery/r_n_d/fabricator/mechanic_fab/autolathe,/obj/machinery/light{icon_state = "tube1"; dir = 8},/turf/simulated/floor,/area/supply/storage) "fE" = (/obj/machinery/atmospherics/pipe/manifold/supply/hidden{dir = 4},/turf/simulated/floor,/area/supply/storage) "fF" = (/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden,/obj/structure/stool/bed/chair{dir = 4},/obj/effect/landmark/start{name = "Cargo Technician"},/turf/simulated/floor{dir = 4; icon_state = "yellow"},/area/supply/storage) "fG" = (/obj/structure/table/reinforced,/obj/machinery/door/window{dir = 8; name = "Cargo Desk"; req_access_txt = "50"},/obj/item/weapon/folder/yellow,/turf/simulated/floor,/area/supply/storage) diff --git a/maps/taxistation.dmm b/maps/taxistation.dmm index 856fba0ca4d..1ff47692afb 100644 --- a/maps/taxistation.dmm +++ b/maps/taxistation.dmm @@ -1842,7 +1842,7 @@ "aJv" = (/obj/structure/table,/obj/item/device/multitool,/turf/simulated/floor{dir = 1; icon_state = "brown"},/area/supply/storage) "aJw" = (/obj/machinery/light{dir = 1},/obj/structure/table,/obj/item/weapon/storage/box/labels,/obj/item/weapon/hand_labeler,/turf/simulated/floor{dir = 1; icon_state = "brown"},/area/supply/storage) "aJx" = (/turf/simulated/floor{dir = 1; icon_state = "brown"},/area/supply/storage) -"aJy" = (/obj/machinery/autolathe,/turf/simulated/floor{dir = 1; icon_state = "brown"},/area/supply/storage) +"aJy" = (/obj/machinery/r_n_d/fabricator/mechanic_fab/autolathe,/turf/simulated/floor{dir = 1; icon_state = "brown"},/area/supply/storage) "aJz" = (/obj/structure/window/reinforced{dir = 8},/obj/structure/window/reinforced{dir = 1},/obj/structure/window/reinforced{dir = 4},/obj/structure/grille,/turf/simulated/floor/plating/airless,/area/supply/storage) "aJA" = (/obj/machinery/power/apc{dir = 1; pixel_y = 24; pixel_x = 0},/obj/structure/cable{icon_state = "0-4"; d2 = 4},/obj/machinery/light{dir = 1},/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden,/obj/machinery/photocopier,/turf/simulated/floor{dir = 9; icon_state = "brown"},/area/supply/office) "aJB" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"},/obj/structure/cable{d1 = 1; d2 = 8; icon_state = "1-8"},/obj/machinery/atmospherics/pipe/simple/supply/hidden,/turf/simulated/floor{dir = 1; icon_state = "brown"},/area/supply/office) @@ -2707,7 +2707,7 @@ "bac" = (/obj/structure/table,/obj/item/weapon/storage/toolbox/electrical{pixel_x = 1; pixel_y = -1},/obj/machinery/cell_charger,/obj/item/weapon/cell/high{charge = 100; maxcharge = 15000},/turf/simulated/floor{icon_state = "purple"; dir = 1},/area/hallway/secondary/construction{name = "\improper Mining Access Hallway"}) "bad" = (/obj/structure/table,/obj/item/device/multitool{pixel_x = 4},/obj/item/weapon/storage/toolbox/mechanical{pixel_x = -2; pixel_y = -1},/obj/structure/disposalpipe/segment,/obj/machinery/atmospherics/pipe/simple/supply/hidden,/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"},/turf/simulated/floor{icon_state = "purple"; dir = 1},/area/hallway/secondary/construction{name = "\improper Mining Access Hallway"}) "bae" = (/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden,/turf/simulated/floor{icon_state = "purple"; dir = 1},/area/hallway/secondary/construction{name = "\improper Mining Access Hallway"}) -"baf" = (/obj/machinery/autolathe,/turf/simulated/floor,/area/hallway/secondary/construction{name = "\improper Mining Access Hallway"}) +"baf" = (/obj/machinery/r_n_d/fabricator/mechanic_fab/autolathe,/turf/simulated/floor,/area/hallway/secondary/construction{name = "\improper Mining Access Hallway"}) "bag" = (/obj/machinery/vending/tool,/obj/machinery/camera{c_tag = "Research and Mining Hallway"; dir = 8},/turf/simulated/floor{dir = 4; icon_state = "brown"},/area/hallway/secondary/construction{name = "\improper Mining Access Hallway"}) "bah" = (/obj/effect/landmark/start{name = "Shaft Miner"},/obj/machinery/atmospherics/unary/vent_pump{dir = 4; on = 1},/obj/machinery/requests_console{department = "Cargo Bay"; departmentType = 2; pixel_x = -30},/turf/simulated/floor,/area/supply/miningdelivery) "bai" = (/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"},/obj/machinery/atmospherics/pipe/manifold/supply/hidden{dir = 8},/turf/simulated/floor,/area/supply/miningdelivery) @@ -5659,7 +5659,7 @@ "ceQ" = (/obj/structure/catwalk,/turf/space,/area/derelict/atmos) "ceR" = (/turf/simulated/floor/plating/airless{icon_state = "panelscorched"},/area/derelict/atmos) "ceS" = (/turf/simulated/wall,/area/derelict/atmos) -"ceT" = (/obj/machinery/autolathe{desc = "Your typical Autolathe. It appears to have much more options than your regular one, however..."; hacked = 1; name = "Derelict Autolathe"},/turf/simulated/floor,/area/derelict/solar_control) +"ceT" = (/obj/machinery/r_n_d/fabricator/mechanic_fab/autolathe{desc = "Your typical Autolathe. It appears to have much more options than your regular one, however..."; hacked = 1; name = "Derelict Autolathe"},/turf/simulated/floor,/area/derelict/solar_control) "ceU" = (/turf/simulated/floor,/area/derelict/solar_control) "ceV" = (/obj/machinery/light/small{dir = 1},/turf/simulated/floor,/area/derelict/solar_control) "ceW" = (/obj/machinery/vending/engivend,/turf/simulated/floor,/area/derelict/solar_control) diff --git a/maps/tgstation.dmm b/maps/tgstation.dmm index a095ed7e90d..e33e8d6d47f 100644 --- a/maps/tgstation.dmm +++ b/maps/tgstation.dmm @@ -3854,7 +3854,7 @@ "bwf" = (/obj/machinery/atmospherics/pipe/simple/scrubbers/hidden,/turf/simulated/wall,/area/science/hallway) "bwg" = (/obj/machinery/door/airlock/research{name = "Research Division Access"; req_access_txt = "47"},/turf/simulated/floor{icon_state = "white"},/area/science/hallway) "bwh" = (/obj/structure/sign/securearea,/obj/machinery/atmospherics/pipe/simple/supply/hidden,/turf/simulated/wall,/area/science/hallway) -"bwi" = (/obj/machinery/requests_console{department = "Science"; departmentType = 2; name = "Science Requests Console"; pixel_x = -30},/obj/machinery/autolathe,/turf/simulated/floor{icon_state = "white"},/area/science/lab) +"bwi" = (/obj/machinery/requests_console{department = "Science"; departmentType = 2; name = "Science Requests Console"; pixel_x = -30},/obj/machinery/r_n_d/fabricator/mechanic_fab/autolathe,/turf/simulated/floor{icon_state = "white"},/area/science/lab) "bwj" = (/obj/structure/disposalpipe/segment{dir = 4; icon_state = "pipe-c"},/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"},/turf/simulated/floor{icon_state = "white"},/area/science/lab) "bwk" = (/obj/structure/disposalpipe/segment{dir = 4},/turf/simulated/floor{icon_state = "white"},/area/science/lab) "bwl" = (/obj/machinery/disposal,/obj/structure/disposalpipe/trunk{dir = 8},/turf/simulated/floor{icon_state = "white"},/area/science/lab) @@ -4244,7 +4244,7 @@ "bDF" = (/obj/machinery/conveyor{dir = 10; id_tag = "QMLoad3"; in_reverse = 1; movedir = 8},/turf/simulated/floor/plating,/area/supply/storage) "bDG" = (/obj/machinery/atmospherics/pipe/simple/supply/hidden,/obj/effect/decal/warning_stripes{tag = "icon-warning (WEST)"; icon_state = "warning"; dir = 8},/turf/simulated/floor,/area/supply/storage) "bDH" = (/obj/machinery/light_switch{pixel_x = 27},/turf/simulated/floor,/area/supply/storage) -"bDI" = (/obj/machinery/autolathe,/obj/machinery/light_switch{pixel_x = -27},/turf/simulated/floor,/area/supply/office) +"bDI" = (/obj/machinery/r_n_d/fabricator/mechanic_fab/autolathe,/obj/machinery/light_switch{pixel_x = -27},/turf/simulated/floor,/area/supply/office) "bDJ" = (/obj/machinery/atmospherics/pipe/simple/supply/hidden{dir = 5},/turf/simulated/floor,/area/supply/office) "bDK" = (/obj/machinery/atmospherics/pipe/simple/supply/hidden{dir = 4},/turf/simulated/floor,/area/supply/office) "bDL" = (/obj/structure/disposalpipe/segment,/obj/structure/cable{d1 = 1; d2 = 2; icon_state = "1-2"},/obj/machinery/atmospherics/pipe/simple/supply/hidden{dir = 10},/turf/simulated/floor,/area/supply/office) @@ -8112,7 +8112,7 @@ "cZZ" = (/obj/structure/reagent_dispensers/watertank,/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/shuttle/administration/centcom) "daa" = (/obj/machinery/recharge_station,/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/shuttle/administration/centcom) "dab" = (/obj/machinery/r_n_d/fabricator/mech,/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/shuttle/administration/centcom) -"dac" = (/obj/machinery/autolathe{desc = "Your typical Autolathe. It appears to have much more options than your regular one, however..."; hacked = 1; name = "Thunderdome Autolathe"},/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/shuttle/administration/centcom) +"dac" = (/obj/machinery/r_n_d/fabricator/mechanic_fab/autolathe{desc = "Your typical Autolathe. It appears to have much more options than your regular one, however..."; hacked = 1; name = "Thunderdome Autolathe"},/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/shuttle/administration/centcom) "dad" = (/obj/structure/dispenser,/turf/simulated/shuttle/floor{icon_state = "floor4"},/area/shuttle/administration/centcom) "dae" = (/obj/structure/stool/bed,/obj/item/weapon/bedsheet,/turf/unsimulated/floor{icon_state = "carpet"},/area/centcom/living) "daf" = (/obj/machinery/door/airlock/centcom{name = "Living Quarters"; opacity = 1; req_access_txt = "105"},/turf/unsimulated/floor{icon_state = "bar"},/area/centcom/living) @@ -9558,7 +9558,7 @@ "dBP" = (/turf/simulated/floor/plating/airless{broken = 1; icon_state = "panelscorched"},/area/derelict/atmos) "dBQ" = (/turf/simulated/floor,/area/derelict/atmos) "dBR" = (/turf/simulated/wall,/area/derelict/atmos) -"dBS" = (/obj/machinery/autolathe{desc = "Your typical Autolathe. It appears to have much more options than your regular one, however..."; hacked = 1; name = "Derelict Autolathe"},/turf/simulated/floor,/area/derelict/solar_control) +"dBS" = (/obj/machinery/r_n_d/fabricator/mechanic_fab/autolathe{desc = "Your typical Autolathe. It appears to have much more options than your regular one, however..."; hacked = 1; name = "Derelict Autolathe"},/turf/simulated/floor,/area/derelict/solar_control) "dBT" = (/turf/simulated/floor,/area/derelict/solar_control) "dBU" = (/obj/machinery/light/small{dir = 1},/turf/simulated/floor,/area/derelict/solar_control) "dBV" = (/obj/machinery/vending/engivend,/turf/simulated/floor,/area/derelict/solar_control) diff --git a/nano/templates/flatpacker.tmpl b/nano/templates/flatpacker.tmpl index d184ccf935e..18294144370 100644 --- a/nano/templates/flatpacker.tmpl +++ b/nano/templates/flatpacker.tmpl @@ -20,26 +20,18 @@ Used In File(s): code\modules\research\mechanic\flatpacker.dm
    Computer Designs
    -
    +
    {{for data.parts.Computers}}
    -
    -
    - {{:helper.link(value.name, 'gear', null, null, null, 'misc')}} - {{:helper.link(value.cost, null, null, null, null, 'cost')}} -
    -
    -
    -
    - {{:helper.link("Build Flatpack", 'gear', value.command2, null, 'fixedLeftWide')}} - {{:helper.link("Add to Queue", 'gear', value.command1, null, 'fixedLeftWide')}} - {{:helper.link("Remove", 'circle-arrow-s', value.command3, null, 'fixedLeftWide')}} - {{if value.uses >= 0}} - {{:helper.link("Uses: " + value.uses, null, null, null, 'fixedLeft')}} - {{/if}} -
    +
    + {{:helper.link(value.name, 'gear', value.command2, null, null, 'misc')}} + {{:helper.link(value.cost, null, null, null, null, 'cost')}} + {{:helper.link("Queue", 'gear', value.command1, null, 'fixedLeft')}} + {{if data.removableDesigns}} + {{:helper.link("Remove", 'circle-arrow-s', value.command3, null, 'fixedLeft')}} + {{/if}}
    {{empty}} @@ -51,26 +43,18 @@ Used In File(s): code\modules\research\mechanic\flatpacker.dm
    Machine Designs
    -
    +
    {{for data.parts.Machines}}
    -
    -
    - {{:helper.link(value.name, 'gear', null, null, null, 'misc')}} - {{:helper.link(value.cost, null, null, null, null, 'cost')}} -
    -
    -
    -
    - {{:helper.link("Build Flatpack", 'gear', value.command2, null, 'fixedLeftWide')}} - {{:helper.link("Add to Queue", 'gear', value.command1, null, 'fixedLeftWide')}} - {{:helper.link("Remove", 'circle-arrow-s', value.command3, null, 'fixedLeftWide')}} - {{if value.uses >= 0}} - {{:helper.link("Uses: " + value.uses, null, null, null, 'fixedLeft')}} - {{/if}} -
    +
    + {{:helper.link(value.name, 'gear', value.command2, null, null, 'misc')}} + {{:helper.link(value.cost, null, null, null, null, 'cost')}} + {{:helper.link("Queue", 'gear', value.command1, null, 'fixedLeft')}} + {{if data.removableDesigns}} + {{:helper.link("Remove", 'circle-arrow-s', value.command3, null, 'fixedLeft')}} + {{/if}}
    {{empty}} @@ -87,21 +71,13 @@ Used In File(s): code\modules\research\mechanic\flatpacker.dm
    {{for data.parts.Misc}}
    -
    -
    - {{:helper.link(value.name, 'gear', null, null, null, 'misc')}} - {{:helper.link(value.cost, null, null, null, null, 'cost')}} -
    -
    -
    -
    - {{:helper.link("Build Flatpack", 'gear', value.command2, null, 'fixedLeftWide')}} - {{:helper.link("Add to Queue", 'gear', value.command1, null, 'fixedLeftWide')}} - {{:helper.link("Remove", 'circle-arrow-s', value.command3, null, 'fixedLeftWide')}} - {{if value.uses >= 0}} - {{:helper.link("Uses: " + value.uses, null, null, null, 'fixedLeft')}} - {{/if}} -
    +
    + {{:helper.link(value.name, 'gear', value.command2, null, null, 'misc')}} + {{:helper.link(value.cost, null, null, null, null, 'cost')}} + {{:helper.link("Queue", 'gear', value.command1, null, 'fixedLeft')}} + {{if data.removableDesigns}} + {{:helper.link("Remove", 'circle-arrow-s', value.command3, null, 'fixedLeft')}} + {{/if}}
    {{empty}} @@ -110,7 +86,7 @@ Used In File(s): code\modules\research\mechanic\flatpacker.dm
    -
    +
    {{for data.queue}} @@ -118,8 +94,8 @@ Used In File(s): code\modules\research\mechanic\flatpacker.dm
    {{:helper.link(value.name, 'gear', null, null, null, 'misc')}} - {{:helper.link(value.cost, null, null, null, 'fixedLeftWide')}} - {{:helper.link("Remove", 'circle-arrow-s', value.commands, null, 'fixedLeftWide')}} + {{:helper.link(value.cost, null, null, null, 'cost')}} + {{:helper.link("Remove", 'circle-arrow-s', value.commands, null, 'fixedLeft')}}
    @@ -136,7 +112,7 @@ Used In File(s): code\modules\research\mechanic\flatpacker.dm
    Materials
    -
    +
    {{for data.materials}} diff --git a/nano/templates/genfab.tmpl b/nano/templates/genfab.tmpl index 8965f00e629..3d91178171b 100644 --- a/nano/templates/genfab.tmpl +++ b/nano/templates/genfab.tmpl @@ -12,7 +12,7 @@ Used By Machine(s): Flatpack Fabricator, General Fabricator } #misc { - width:350px; + width:300px; float:left; } @@ -21,26 +21,18 @@ Used By Machine(s): Flatpack Fabricator, General Fabricator
    Design List
    -
    +
    {{for data.parts.Items}}
    -
    -
    - {{:helper.link(value.name, 'gear', null, null, null, 'misc')}} - {{:helper.link(value.cost, null, null, null, null, 'cost')}} -
    -
    -
    -
    - {{:helper.link("Build Design", 'gear', value.command2, null, 'fixedLeftWide')}} - {{:helper.link("Add to Queue", 'gear', value.command1, null, 'fixedLeftWide')}} - {{:helper.link("Remove", 'circle-arrow-s', value.command3, null, 'fixedLeft')}} - {{if value.uses >= 0}} - {{:helper.link("Uses: " + value.uses, null, null, null, 'fixedLeft')}} - {{/if}} -
    +
    + {{:helper.link(value.name, 'gear', value.command2, null, null, 'misc')}} + {{:helper.link(value.cost, null, null, null, null, 'cost')}} + {{:helper.link("Queue", 'gear', value.command1, null, 'fixedLeft')}} + {{if data.removableDesigns}} + {{:helper.link("Remove", 'circle-arrow-s', value.command3, null, 'fixedLeft')}} + {{/if}}
    {{empty}} @@ -52,7 +44,7 @@ Used By Machine(s): Flatpack Fabricator, General Fabricator
    Queue
    -
    +
    {{for data.queue}} @@ -60,8 +52,8 @@ Used By Machine(s): Flatpack Fabricator, General Fabricator
    {{:helper.link(value.name, 'gear', null, null, null, 'misc')}} - {{:helper.link(value.cost, null, null, null, 'fixedLeftWide')}} - {{:helper.link("Remove", 'circle-arrow-s', value.commands, null, 'fixedLeftWide')}} + {{:helper.link(value.cost, null, null, null, null, 'cost')}} + {{:helper.link("Remove", 'circle-arrow-s', value.commands, null, 'fixedLeft')}}
    @@ -78,7 +70,7 @@ Used By Machine(s): Flatpack Fabricator, General Fabricator
    Materials
    -
    +
    {{for data.materials}} diff --git a/vgstation13.dme b/vgstation13.dme index 910fd96d676..5d8e6dc5345 100644 --- a/vgstation13.dme +++ b/vgstation13.dme @@ -210,6 +210,7 @@ #include "code\datums\wires\mulebot.dm" #include "code\datums\wires\particle_accelerator.dm" #include "code\datums\wires\radio.dm" +#include "code\datums\wires\rnd_wires.dm" #include "code\datums\wires\robot.dm" #include "code\datums\wires\vending.dm" #include "code\datums\wires\wires.dm"