From 4850230fc48b8b263ba0b1113550d0f9636662c4 Mon Sep 17 00:00:00 2001 From: Dax Dupont Date: Fri, 27 Apr 2018 20:12:41 +0200 Subject: [PATCH 1/2] Refactors and fixes RPEDs --- .../components/storage/concrete/rped.dm | 36 +++++++++++++++++++ code/game/machinery/Sleeper.dm | 2 -- code/game/machinery/autolathe.dm | 3 -- code/game/machinery/cloning.dm | 3 -- code/game/machinery/dna_scanner.dm | 3 -- code/game/machinery/hologram.dm | 3 -- code/game/machinery/launch_pad.dm | 3 -- code/game/machinery/limbgrower.dm | 3 -- code/game/machinery/quantum_pad.dm | 3 -- code/game/machinery/recharger.dm | 2 -- code/game/machinery/rechargestation.dm | 3 -- code/game/machinery/recycler.dm | 3 -- code/game/machinery/spaceheater.dm | 2 +- .../telecomms/machine_interactions.dm | 4 --- code/game/machinery/teleporter.dm | 5 --- code/game/mecha/mech_bay.dm | 3 -- code/game/mecha/mech_fabricator.dm | 3 -- .../components/unary_devices/cryo.dm | 2 +- .../components/unary_devices/thermomachine.dm | 2 -- .../kitchen_machinery/deep_fryer.dm | 2 -- .../kitchen_machinery/gibber.dm | 5 +-- .../kitchen_machinery/microwave.dm | 2 -- .../kitchen_machinery/monkeyrecycler.dm | 3 -- .../kitchen_machinery/processor.dm | 3 -- .../kitchen_machinery/smartfridge.dm | 3 -- code/modules/hydroponics/biogenerator.dm | 3 -- code/modules/hydroponics/gene_modder.dm | 2 -- code/modules/hydroponics/hydroponics.dm | 3 -- code/modules/hydroponics/seed_extractor.dm | 3 -- code/modules/mining/machine_redemption.dm | 2 -- code/modules/power/port_gen.dm | 3 -- code/modules/power/rtg.dm | 4 +-- code/modules/power/singularity/emitter.dm | 3 -- code/modules/power/smes.dm | 4 --- code/modules/power/tesla/coil.dm | 6 ---- code/modules/power/turbine.dm | 6 ---- .../chemistry/machinery/chem_dispenser.dm | 3 -- .../chemistry/machinery/chem_heater.dm | 3 -- .../chemistry/machinery/chem_master.dm | 2 -- code/modules/research/rdmachines.dm | 2 -- code/modules/research/stock_parts.dm | 15 ++++++-- 41 files changed, 53 insertions(+), 117 deletions(-) diff --git a/code/datums/components/storage/concrete/rped.dm b/code/datums/components/storage/concrete/rped.dm index 9966fa3749..10541f55c2 100644 --- a/code/datums/components/storage/concrete/rped.dm +++ b/code/datums/components/storage/concrete/rped.dm @@ -1,3 +1,4 @@ +<<<<<<< HEAD /datum/component/storage/concrete/rped collection_mode = COLLECT_EVERYTHING allow_quick_gather = TRUE @@ -29,3 +30,38 @@ if(!I.get_part_rating() && !stop_messages) to_chat(M, "[parent] only accepts machine parts!") return FALSE +======= +/datum/component/storage/concrete/rped + collection_mode = COLLECT_EVERYTHING + allow_quick_gather = TRUE + allow_quick_empty = TRUE + click_gather = TRUE + max_w_class = WEIGHT_CLASS_NORMAL + max_combined_w_class = 100 + max_items = 50 + display_numerical_stacking = TRUE + +/datum/component/storage/concrete/rped/can_be_inserted(obj/item/I, stop_messages, mob/M) + . = ..() + if(!I.get_part_rating()) + if (!stop_messages) + to_chat(M, "[parent] only accepts machine parts!") + return FALSE + +/datum/component/storage/concrete/bluespace/rped + collection_mode = COLLECT_EVERYTHING + allow_quick_gather = TRUE + allow_quick_empty = TRUE + click_gather = TRUE + max_w_class = WEIGHT_CLASS_NORMAL + max_combined_w_class = 800 + max_items = 400 + display_numerical_stacking = TRUE + +/datum/component/storage/concrete/bluespace/rped/can_be_inserted(obj/item/I, stop_messages, mob/M) + . = ..() + if(!I.get_part_rating()) + if (!stop_messages) + to_chat(M, "[parent] only accepts machine par ts!") + return FALSE +>>>>>>> 52a7ebc... Refactors and fixes RPEDs (#37380) diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm index cefc471d08..e4b8dd9083 100644 --- a/code/game/machinery/Sleeper.dm +++ b/code/game/machinery/Sleeper.dm @@ -93,8 +93,6 @@ return if(default_change_direction_wrench(user, I)) return - if(exchange_parts(user, I)) - return if(default_pry_open(I)) return if(default_deconstruction_crowbar(I)) diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm index 2c8fa467c2..d6154aeb8b 100644 --- a/code/game/machinery/autolathe.dm +++ b/code/game/machinery/autolathe.dm @@ -93,9 +93,6 @@ updateUsrDialog() return TRUE - if(exchange_parts(user, O)) - return TRUE - if(default_deconstruction_crowbar(O)) return TRUE diff --git a/code/game/machinery/cloning.dm b/code/game/machinery/cloning.dm index 0297652982..3482cc2ec7 100644 --- a/code/game/machinery/cloning.dm +++ b/code/game/machinery/cloning.dm @@ -282,9 +282,6 @@ if(default_deconstruction_screwdriver(user, "[icon_state]_maintenance", "[initial(icon_state)]",W)) return - if(exchange_parts(user, W)) - return - if(default_deconstruction_crowbar(W)) return diff --git a/code/game/machinery/dna_scanner.dm b/code/game/machinery/dna_scanner.dm index 9296e0807d..2a8868cb4f 100644 --- a/code/game/machinery/dna_scanner.dm +++ b/code/game/machinery/dna_scanner.dm @@ -133,9 +133,6 @@ update_icon()//..since we're updating the icon here, since the scanner can be unpowered when opened/closed return - if(exchange_parts(user, I)) - return - if(default_pry_open(I)) return diff --git a/code/game/machinery/hologram.dm b/code/game/machinery/hologram.dm index d6b35136b6..ab2694769f 100644 --- a/code/game/machinery/hologram.dm +++ b/code/game/machinery/hologram.dm @@ -146,9 +146,6 @@ Possible to do for anyone motivated enough: if(default_deconstruction_screwdriver(user, "holopad_open", "holopad0", P)) return - if(exchange_parts(user, P)) - return - if(default_pry_open(P)) return diff --git a/code/game/machinery/launch_pad.dm b/code/game/machinery/launch_pad.dm index f50f409463..83ffadd8b9 100644 --- a/code/game/machinery/launch_pad.dm +++ b/code/game/machinery/launch_pad.dm @@ -37,9 +37,6 @@ to_chat(user, "You save the data in the [I.name]'s buffer.") return 1 - if(exchange_parts(user, I)) - return - if(default_deconstruction_crowbar(I)) return diff --git a/code/game/machinery/limbgrower.dm b/code/game/machinery/limbgrower.dm index 77cb3e32d1..2fd8a22ce6 100644 --- a/code/game/machinery/limbgrower.dm +++ b/code/game/machinery/limbgrower.dm @@ -70,9 +70,6 @@ updateUsrDialog() return - if(exchange_parts(user, O)) - return - if(panel_open && default_deconstruction_crowbar(O)) return diff --git a/code/game/machinery/quantum_pad.dm b/code/game/machinery/quantum_pad.dm index 91a7f6923f..cdc9c16907 100644 --- a/code/game/machinery/quantum_pad.dm +++ b/code/game/machinery/quantum_pad.dm @@ -60,9 +60,6 @@ to_chat(user, "You link [src] to the one in [I]'s buffer.") return 1 - if(exchange_parts(user, I)) - return - if(default_deconstruction_crowbar(I)) return diff --git a/code/game/machinery/recharger.dm b/code/game/machinery/recharger.dm index f95f69e2d1..5c6a6d5ade 100755 --- a/code/game/machinery/recharger.dm +++ b/code/game/machinery/recharger.dm @@ -68,8 +68,6 @@ default_deconstruction_crowbar(G) return - if(exchange_parts(user, G)) - return return ..() /obj/machinery/recharger/attack_hand(mob/user) diff --git a/code/game/machinery/rechargestation.dm b/code/game/machinery/rechargestation.dm index 790158515f..f46b957c4c 100644 --- a/code/game/machinery/rechargestation.dm +++ b/code/game/machinery/rechargestation.dm @@ -53,9 +53,6 @@ if(default_deconstruction_screwdriver(user, "borgdecon2", "borgcharger0", P)) return - if(exchange_parts(user, P)) - return - if(default_pry_open(P)) return diff --git a/code/game/machinery/recycler.dm b/code/game/machinery/recycler.dm index 0eb3f97acf..ec2e19258f 100644 --- a/code/game/machinery/recycler.dm +++ b/code/game/machinery/recycler.dm @@ -55,9 +55,6 @@ if(default_deconstruction_screwdriver(user, "grinder-oOpen", "grinder-o0", I)) return - if(exchange_parts(user, I)) - return - if(default_pry_open(I)) return diff --git a/code/game/machinery/spaceheater.dm b/code/game/machinery/spaceheater.dm index 9fbe2b412b..872c5b8f1d 100644 --- a/code/game/machinery/spaceheater.dm +++ b/code/game/machinery/spaceheater.dm @@ -156,7 +156,7 @@ update_icon() if(panel_open) interact(user) - else if(exchange_parts(user, I) || default_deconstruction_crowbar(I)) + else if(default_deconstruction_crowbar(I)) return else return ..() diff --git a/code/game/machinery/telecomms/machine_interactions.dm b/code/game/machinery/telecomms/machine_interactions.dm index 3bacd10b05..62d88cadf3 100644 --- a/code/game/machinery/telecomms/machine_interactions.dm +++ b/code/game/machinery/telecomms/machine_interactions.dm @@ -18,10 +18,6 @@ if(default_deconstruction_screwdriver(user, icon_open, icon_closed, P)) return - - else if(exchange_parts(user, P)) - return - // Using a multitool lets you access the receiver's interface else if(istype(P, /obj/item/device/multitool)) attack_hand(user) diff --git a/code/game/machinery/teleporter.dm b/code/game/machinery/teleporter.dm index ae3263d96a..6f72da823c 100644 --- a/code/game/machinery/teleporter.dm +++ b/code/game/machinery/teleporter.dm @@ -55,8 +55,6 @@ power_station.engaged = 0 //hub with panel open is off, so the station must be informed. update_icon() return - if(exchange_parts(user, W)) - return if(default_deconstruction_crowbar(W)) return return ..() @@ -169,9 +167,6 @@ update_icon() return - else if(exchange_parts(user, W)) - return - else if(default_deconstruction_crowbar(W)) return diff --git a/code/game/mecha/mech_bay.dm b/code/game/mecha/mech_bay.dm index 90234b97b5..b2c771cb21 100644 --- a/code/game/mecha/mech_bay.dm +++ b/code/game/mecha/mech_bay.dm @@ -62,9 +62,6 @@ recharging_turf = get_step(loc, dir) return - if(exchange_parts(user, I)) - return - if(default_deconstruction_crowbar(I)) return return ..() diff --git a/code/game/mecha/mech_fabricator.dm b/code/game/mecha/mech_fabricator.dm index 7815014891..49f29b5969 100644 --- a/code/game/mecha/mech_fabricator.dm +++ b/code/game/mecha/mech_fabricator.dm @@ -401,9 +401,6 @@ if(default_deconstruction_screwdriver(user, "fab-o", "fab-idle", W)) return TRUE - if(exchange_parts(user, W)) - return TRUE - if(default_deconstruction_crowbar(W)) return TRUE diff --git a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm index d3dde7a18e..345b4e1ddd 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm @@ -298,7 +298,7 @@ var/reagentlist = pretty_string_from_reagent_list(I.reagents.reagent_list) log_game("[key_name(user)] added an [I] to cyro containing [reagentlist]") return - if(!on && !occupant && !state_open && (default_deconstruction_screwdriver(user, "pod-off", "pod-off", I) || exchange_parts(user, I)) \ + if(!on && !occupant && !state_open && (default_deconstruction_screwdriver(user, "pod-off", "pod-off", I)) \ || default_change_direction_wrench(user, I) \ || default_pry_open(I) \ || default_deconstruction_crowbar(I)) diff --git a/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm b/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm index ce365bdab8..2ff19218f5 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm @@ -80,8 +80,6 @@ return if(default_deconstruction_crowbar(I)) return - if(exchange_parts(user, I)) - return return ..() /obj/machinery/atmospherics/components/unary/thermomachine/default_change_direction_wrench(mob/user, obj/item/I) diff --git a/code/modules/food_and_drinks/kitchen_machinery/deep_fryer.dm b/code/modules/food_and_drinks/kitchen_machinery/deep_fryer.dm index 3e5554b783..fe2f5b986c 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/deep_fryer.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/deep_fryer.dm @@ -89,8 +89,6 @@ God bless America. return if(default_unfasten_wrench(user, I)) return - else if(exchange_parts(user, I)) - return else if(default_deconstruction_screwdriver(user, "fryer_off", "fryer_off" ,I)) //where's the open maint panel icon?! return else diff --git a/code/modules/food_and_drinks/kitchen_machinery/gibber.dm b/code/modules/food_and_drinks/kitchen_machinery/gibber.dm index 5da7975a05..784cf22ccd 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/gibber.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/gibber.dm @@ -99,10 +99,7 @@ /obj/machinery/gibber/attackby(obj/item/P, mob/user, params) if(default_deconstruction_screwdriver(user, "grinder_open", "grinder", P)) return - - else if(exchange_parts(user, P)) - return - + else if(default_pry_open(P)) return diff --git a/code/modules/food_and_drinks/kitchen_machinery/microwave.dm b/code/modules/food_and_drinks/kitchen_machinery/microwave.dm index 8330c9feed..7363f262b4 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/microwave.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/microwave.dm @@ -50,8 +50,6 @@ return if(default_unfasten_wrench(user, O)) return - if(exchange_parts(user, O)) - return if(default_deconstruction_crowbar(O)) return diff --git a/code/modules/food_and_drinks/kitchen_machinery/monkeyrecycler.dm b/code/modules/food_and_drinks/kitchen_machinery/monkeyrecycler.dm index 23466305f1..397f5c7a6d 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/monkeyrecycler.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/monkeyrecycler.dm @@ -29,9 +29,6 @@ if(default_deconstruction_screwdriver(user, "grinder_open", "grinder", O)) return - if(exchange_parts(user, O)) - return - if(default_pry_open(O)) return diff --git a/code/modules/food_and_drinks/kitchen_machinery/processor.dm b/code/modules/food_and_drinks/kitchen_machinery/processor.dm index e07a957cfb..91a73eecec 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/processor.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/processor.dm @@ -46,9 +46,6 @@ if(default_deconstruction_screwdriver(user, "processor", "processor1", O)) return - if(exchange_parts(user, O)) - return - if(default_pry_open(O)) return diff --git a/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm b/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm index 1149d917dd..2f7356820b 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm @@ -55,9 +55,6 @@ if(default_deconstruction_screwdriver(user, "smartfridge_open", "smartfridge", O)) return - if(exchange_parts(user, O)) - return - if(default_pry_open(O)) return diff --git a/code/modules/hydroponics/biogenerator.dm b/code/modules/hydroponics/biogenerator.dm index 65aaba95e7..624394f878 100644 --- a/code/modules/hydroponics/biogenerator.dm +++ b/code/modules/hydroponics/biogenerator.dm @@ -83,9 +83,6 @@ update_icon() return - if(exchange_parts(user, O)) - return - if(default_deconstruction_crowbar(O)) return diff --git a/code/modules/hydroponics/gene_modder.dm b/code/modules/hydroponics/gene_modder.dm index 6bb000ebe2..dd1d1777d8 100644 --- a/code/modules/hydroponics/gene_modder.dm +++ b/code/modules/hydroponics/gene_modder.dm @@ -69,8 +69,6 @@ if(default_deconstruction_screwdriver(user, "dnamod", "dnamod", I)) update_icon() return - if(exchange_parts(user, I)) - return if(default_deconstruction_crowbar(I)) return if(iscyborg(user)) diff --git a/code/modules/hydroponics/hydroponics.dm b/code/modules/hydroponics/hydroponics.dm index 44ec4d56ee..409af32f15 100644 --- a/code/modules/hydroponics/hydroponics.dm +++ b/code/modules/hydroponics/hydroponics.dm @@ -59,9 +59,6 @@ if(default_deconstruction_screwdriver(user, "hydrotray3", "hydrotray3", I)) return - if(exchange_parts(user, I)) - return - if(default_pry_open(I)) return diff --git a/code/modules/hydroponics/seed_extractor.dm b/code/modules/hydroponics/seed_extractor.dm index f188466434..3d0ffdfd53 100644 --- a/code/modules/hydroponics/seed_extractor.dm +++ b/code/modules/hydroponics/seed_extractor.dm @@ -62,9 +62,6 @@ if(default_deconstruction_screwdriver(user, "sextractor_open", "sextractor", O)) return - if(exchange_parts(user, O)) - return - if(default_pry_open(O)) return diff --git a/code/modules/mining/machine_redemption.dm b/code/modules/mining/machine_redemption.dm index b3b7bd29d3..05b39a93f0 100644 --- a/code/modules/mining/machine_redemption.dm +++ b/code/modules/mining/machine_redemption.dm @@ -148,8 +148,6 @@ send_console_message() /obj/machinery/mineral/ore_redemption/attackby(obj/item/W, mob/user, params) - if(exchange_parts(user, W)) - return GET_COMPONENT(materials, /datum/component/material_container) if(default_pry_open(W)) materials.retrieve_all() diff --git a/code/modules/power/port_gen.dm b/code/modules/power/port_gen.dm index cc4000fd42..7cea950ccc 100644 --- a/code/modules/power/port_gen.dm +++ b/code/modules/power/port_gen.dm @@ -173,9 +173,6 @@ return else if(!active) - if(exchange_parts(user, O)) - return - if(istype(O, /obj/item/wrench)) if(!anchored && !isinspace()) diff --git a/code/modules/power/rtg.dm b/code/modules/power/rtg.dm index d458fbf7e2..7266a3e8a0 100644 --- a/code/modules/power/rtg.dm +++ b/code/modules/power/rtg.dm @@ -38,9 +38,7 @@ power_gen = initial(power_gen) * part_level /obj/machinery/power/rtg/attackby(obj/item/I, mob/user, params) - if(exchange_parts(user, I)) - return - else if(default_deconstruction_screwdriver(user, "[initial(icon_state)]-open", initial(icon_state), I)) + if(default_deconstruction_screwdriver(user, "[initial(icon_state)]-open", initial(icon_state), I)) return else if(default_deconstruction_crowbar(I)) return diff --git a/code/modules/power/singularity/emitter.dm b/code/modules/power/singularity/emitter.dm index d6a27f1483..da2fc9dc94 100644 --- a/code/modules/power/singularity/emitter.dm +++ b/code/modules/power/singularity/emitter.dm @@ -291,9 +291,6 @@ wires.interact(user) return - else if(exchange_parts(user, I)) - return - return ..() /obj/machinery/power/emitter/emag_act(mob/user) diff --git a/code/modules/power/smes.dm b/code/modules/power/smes.dm index 95b78ff0b5..d514a2c4e9 100644 --- a/code/modules/power/smes.dm +++ b/code/modules/power/smes.dm @@ -98,10 +98,6 @@ update_icon() return - //exchanging parts using the RPE - if(exchange_parts(user, I)) - return - //building and linking a terminal if(istype(I, /obj/item/stack/cable_coil)) var/dir = get_dir(user,src) diff --git a/code/modules/power/tesla/coil.dm b/code/modules/power/tesla/coil.dm index 32499ace2f..32d35b4392 100644 --- a/code/modules/power/tesla/coil.dm +++ b/code/modules/power/tesla/coil.dm @@ -56,9 +56,6 @@ if(default_deconstruction_screwdriver(user, "coil_open[anchored]", "coil[anchored]", W)) return - if(exchange_parts(user, W)) - return - if(default_unfasten_wrench(user, W)) return @@ -169,9 +166,6 @@ if(default_deconstruction_screwdriver(user, "grounding_rod_open[anchored]", "grounding_rod[anchored]", W)) return - if(exchange_parts(user, W)) - return - if(default_unfasten_wrench(user, W)) return diff --git a/code/modules/power/turbine.dm b/code/modules/power/turbine.dm index 7e73c1c9c1..22777e4fcf 100644 --- a/code/modules/power/turbine.dm +++ b/code/modules/power/turbine.dm @@ -112,9 +112,6 @@ stat |= BROKEN return - if(exchange_parts(user, I)) - return - default_deconstruction_crowbar(I) /obj/machinery/power/compressor/process() @@ -243,9 +240,6 @@ stat |= BROKEN return - if(exchange_parts(user, I)) - return - default_deconstruction_crowbar(I) /obj/machinery/power/turbine/ui_interact(mob/user) diff --git a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm index 02d6bb9152..2db6058852 100644 --- a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm +++ b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm @@ -292,9 +292,6 @@ obj/machinery/chem_dispenser/proc/work_animation() update_icon() return - if(exchange_parts(user, I)) - return - if(default_deconstruction_crowbar(I)) return if(istype(I, /obj/item/reagent_containers) && !(I.flags_1 & ABSTRACT_1) && I.is_open_container()) diff --git a/code/modules/reagents/chemistry/machinery/chem_heater.dm b/code/modules/reagents/chemistry/machinery/chem_heater.dm index fa88cab801..73413a5e7b 100644 --- a/code/modules/reagents/chemistry/machinery/chem_heater.dm +++ b/code/modules/reagents/chemistry/machinery/chem_heater.dm @@ -60,9 +60,6 @@ if(default_deconstruction_screwdriver(user, "mixer0b", "mixer0b", I)) return - if(exchange_parts(user, I)) - return - if(default_deconstruction_crowbar(I)) return diff --git a/code/modules/reagents/chemistry/machinery/chem_master.dm b/code/modules/reagents/chemistry/machinery/chem_master.dm index f3abe40ca5..89b63f4ee5 100644 --- a/code/modules/reagents/chemistry/machinery/chem_master.dm +++ b/code/modules/reagents/chemistry/machinery/chem_master.dm @@ -79,8 +79,6 @@ if(default_deconstruction_screwdriver(user, "mixer0_nopower", "mixer0", I)) return - else if(exchange_parts(user, I)) - return else if(default_deconstruction_crowbar(I)) return diff --git a/code/modules/research/rdmachines.dm b/code/modules/research/rdmachines.dm index 0ce53f0e07..47f34a9b15 100644 --- a/code/modules/research/rdmachines.dm +++ b/code/modules/research/rdmachines.dm @@ -43,8 +43,6 @@ if(linked_console) disconnect_console() return - if(exchange_parts(user, O)) - return if(default_deconstruction_crowbar(O)) return if(is_refillable() && O.is_drainable()) diff --git a/code/modules/research/stock_parts.dm b/code/modules/research/stock_parts.dm index 96e7656fbc..4bd318de21 100644 --- a/code/modules/research/stock_parts.dm +++ b/code/modules/research/stock_parts.dm @@ -14,13 +14,24 @@ If you create T5+ please take a pass at gene_modder.dm [L40]. Max_values MUST fi var/pshoom_or_beepboopblorpzingshadashwoosh = 'sound/items/rped.ogg' var/alt_sound = null -/obj/item/storage/part_replacer/afterattack(obj/machinery/T, mob/living/carbon/human/user, flag, params) +/obj/item/storage/part_replacer/pre_attack(obj/machinery/T, mob/living/user, params) if(!istype(T) || !T.component_parts) return ..() - if(works_from_distance || user.Adjacent(T)) + if(user.Adjacent(T)) // no TK upgrading. + if(works_from_distance) + user.Beam(T, icon_state = "rped_upgrade", time = 5) T.exchange_parts(user, src) + return FALSE + return ..() + +/obj/item/storage/part_replacer/afterattack(obj/machinery/T, mob/living/user, adjacent, params) + if(adjacent || !istype(T) || !T.component_parts) + return ..() if(works_from_distance) user.Beam(T, icon_state = "rped_upgrade", time = 5) + T.exchange_parts(user, src) + return + return ..() /obj/item/storage/part_replacer/proc/play_rped_sound() //Plays the sound for RPED exhanging or installing parts. From ab8355968c438b212fde2fc853daf1078c7629a1 Mon Sep 17 00:00:00 2001 From: LetterJay Date: Sun, 29 Apr 2018 02:28:43 -0500 Subject: [PATCH 2/2] Update rped.dm --- .../components/storage/concrete/rped.dm | 34 ------------------- 1 file changed, 34 deletions(-) diff --git a/code/datums/components/storage/concrete/rped.dm b/code/datums/components/storage/concrete/rped.dm index 10541f55c2..eb895fd74f 100644 --- a/code/datums/components/storage/concrete/rped.dm +++ b/code/datums/components/storage/concrete/rped.dm @@ -1,36 +1,3 @@ -<<<<<<< HEAD -/datum/component/storage/concrete/rped - collection_mode = COLLECT_EVERYTHING - allow_quick_gather = TRUE - allow_quick_empty = TRUE - click_gather = TRUE - max_w_class = WEIGHT_CLASS_NORMAL - max_combined_w_class = 100 - max_items = 50 - display_numerical_stacking = TRUE - -/datum/component/storage/concrete/rped/can_be_inserted(obj/item/I, stop_messages, mob/M) - . = ..() - if(!I.get_part_rating() && !stop_messages) - to_chat(M, "[parent] only accepts machine parts!") - return FALSE - -/datum/component/storage/concrete/bluespace/rped - collection_mode = COLLECT_EVERYTHING - allow_quick_gather = TRUE - allow_quick_empty = TRUE - click_gather = TRUE - max_w_class = WEIGHT_CLASS_NORMAL - max_combined_w_class = 800 - max_items = 400 - display_numerical_stacking = TRUE - -/datum/component/storage/concrete/bluespace/rped/can_be_inserted(obj/item/I, stop_messages, mob/M) - . = ..() - if(!I.get_part_rating() && !stop_messages) - to_chat(M, "[parent] only accepts machine parts!") - return FALSE -======= /datum/component/storage/concrete/rped collection_mode = COLLECT_EVERYTHING allow_quick_gather = TRUE @@ -64,4 +31,3 @@ if (!stop_messages) to_chat(M, "[parent] only accepts machine par ts!") return FALSE ->>>>>>> 52a7ebc... Refactors and fixes RPEDs (#37380)