diff --git a/code/game/dna/dna_modifier.dm b/code/game/dna/dna_modifier.dm index 89b670b0975..96d602fd4d6 100644 --- a/code/game/dna/dna_modifier.dm +++ b/code/game/dna/dna_modifier.dm @@ -185,9 +185,7 @@ return TRUE /obj/machinery/dna_scannernew/attackby(obj/item/I, mob/user, params) - if(exchange_parts(user, I)) - return - else if(istype(I, /obj/item/reagent_containers/glass)) + if(istype(I, /obj/item/reagent_containers/glass)) if(beaker) to_chat(user, "A beaker is already loaded into the machine.") return @@ -201,26 +199,33 @@ I.forceMove(src) user.visible_message("[user] adds \a [I] to \the [src]!", "You add \a [I] to \the [src]!") return + if(istype(I, /obj/item/grab)) var/obj/item/grab/G = I if(!ismob(G.affecting)) return + if(occupant) to_chat(user, "The scanner is already occupied!") return + if(G.affecting.abiotic()) to_chat(user, "Subject may not hold anything in their hands.") return + if(G.affecting.has_buckled_mobs()) //mob attached to us to_chat(user, "[G] will not fit into [src] because [G.affecting.p_they()] [G.affecting.p_have()] a slime latched onto [G.affecting.p_their()] head.") return + if(panel_open) to_chat(usr, "Close the maintenance panel first.") return + put_in(G.affecting) add_fingerprint(user) qdel(G) return + return ..() /obj/machinery/dna_scannernew/crowbar_act(mob/user, obj/item/I) diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm index 2fc95b05051..44559c81ee6 100644 --- a/code/game/machinery/Sleeper.dm +++ b/code/game/machinery/Sleeper.dm @@ -317,19 +317,19 @@ to_chat(user, "The sleeper has a beaker already.") return - if(exchange_parts(user, I)) - return - if(istype(I, /obj/item/grab)) var/obj/item/grab/G = I if(panel_open) to_chat(user, "Close the maintenance panel first.") return + if(!ismob(G.affecting)) return + if(occupant) to_chat(user, "The sleeper is already occupied!") return + if(G.affecting.has_buckled_mobs()) //mob attached to us to_chat(user, "[G.affecting] will not fit into [src] because [G.affecting.p_they()] [G.affecting.p_have()] a slime latched onto [G.affecting.p_their()] head.") return @@ -340,8 +340,10 @@ if(occupant) to_chat(user, "The sleeper is already occupied!") return + if(!G || !G.affecting) return + var/mob/M = G.affecting M.forceMove(src) occupant = M diff --git a/code/game/machinery/adv_med.dm b/code/game/machinery/adv_med.dm index 965532d04e4..5ef02606a44 100644 --- a/code/game/machinery/adv_med.dm +++ b/code/game/machinery/adv_med.dm @@ -65,26 +65,28 @@ icon_state = "bodyscanner-open" /obj/machinery/bodyscanner/attackby(obj/item/I, mob/user) - if(exchange_parts(user, I)) - return - if(istype(I, /obj/item/grab)) var/obj/item/grab/TYPECAST_YOUR_SHIT = I if(panel_open) to_chat(user, "Close the maintenance panel first.") return + if(!ishuman(TYPECAST_YOUR_SHIT.affecting)) return + if(occupant) to_chat(user, "The scanner is already occupied!") return + if(TYPECAST_YOUR_SHIT.affecting.has_buckled_mobs()) //mob attached to us to_chat(user, "[TYPECAST_YOUR_SHIT.affecting] will not fit into [src] because [TYPECAST_YOUR_SHIT.affecting.p_they()] [TYPECAST_YOUR_SHIT.affecting.p_have()] a fucking slime latched onto [TYPECAST_YOUR_SHIT.affecting.p_their()] head.") return + var/mob/living/carbon/human/M = TYPECAST_YOUR_SHIT.affecting if(M.abiotic()) to_chat(user, "Subject may not hold anything in their hands.") return + M.forceMove(src) occupant = M playsound(src, 'sound/machines/podclose.ogg', 5) diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm index b5d28534dd9..96c54e3e947 100644 --- a/code/game/machinery/autolathe.dm +++ b/code/game/machinery/autolathe.dm @@ -265,11 +265,10 @@ /obj/machinery/autolathe/attackby(obj/item/O, mob/user, params) if(busy) to_chat(user, "The autolathe is busy. Please wait for completion of previous operation.") - return 1 - if(exchange_parts(user, O)) - return + return TRUE + if(stat) - return 1 + return TRUE // Disks in general if(istype(O, /obj/item/disk)) @@ -280,14 +279,17 @@ if(design.id in files.known_designs) to_chat(user, "This design has already been loaded into the autolathe.") - return 1 + return TRUE if(!files.CanAddDesign2Known(design)) to_chat(user, "This design is not compatible with the autolathe.") - return 1 - user.visible_message("[user] begins to load \the [O] in \the [src]...", + return TRUE + + user.visible_message( + "[user] begins to load \the [O] in \the [src]...", "You begin to load a design from \the [O]...", - "You hear the chatter of a floppy drive.") + "You hear the chatter of a floppy drive." + ) playsound(get_turf(src), 'sound/goonstation/machines/printer_dotmatrix.ogg', 50, 1) busy = TRUE if(do_after(user, 14.4, target = src)) @@ -298,11 +300,12 @@ busy = FALSE else to_chat(user, "That disk does not have a design on it!") - return 1 + return TRUE + else // So that people who are bad at computers don't shred their disks to_chat(user, "This is not the correct type of disk for the autolathe!") - return 1 + return TRUE return ..() diff --git a/code/game/machinery/clonepod.dm b/code/game/machinery/clonepod.dm index 75d0230ad4f..f5cf2e9dafa 100644 --- a/code/game/machinery/clonepod.dm +++ b/code/game/machinery/clonepod.dm @@ -556,9 +556,6 @@ //Attackby and x_acts /obj/machinery/clonepod/attackby(obj/item/I, mob/user, params) - if(exchange_parts(user, I)) - return - if(I.is_open_container()) return diff --git a/code/game/machinery/hologram.dm b/code/game/machinery/hologram.dm index 59e1a926d84..3972f09f32e 100644 --- a/code/game/machinery/hologram.dm +++ b/code/game/machinery/hologram.dm @@ -149,11 +149,6 @@ GLOBAL_LIST_EMPTY(holopads) holograph_range += 1 * B.rating holo_range = holograph_range -/obj/machinery/hologram/holopad/attackby(obj/item/I, mob/user, params) - if(exchange_parts(user, I)) - return - return ..() - /obj/machinery/hologram/holopad/multitool_act(mob/living/user, obj/item/I) . = TRUE if(!I.use_tool(src, user, 0, volume = I.tool_volume)) diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm index 2acb73839c1..7188f8546cc 100644 --- a/code/game/machinery/machinery.dm +++ b/code/game/machinery/machinery.dm @@ -344,28 +344,37 @@ power_change() /obj/machinery/attackby(obj/item/O, mob/user, params) + if(exchange_parts(user, O)) + return + if(istype(O, /obj/item/stack/nanopaste)) var/obj/item/stack/nanopaste/N = O if(stat & BROKEN) to_chat(user, "[src] is too damaged to be fixed with nanopaste!") return + if(obj_integrity == max_integrity) to_chat(user, "[src] is fully intact.") return + if(being_repaired) return + if(N.get_amount() < 1) to_chat(user, "You don't have enough to complete this task!") return + to_chat(user, "You start applying [O] to [src].") being_repaired = TRUE var/result = do_after(user, 3 SECONDS, target = src) being_repaired = FALSE if(!result) return + if(!N.use(1)) to_chat(user, "You don't have enough to complete this task!") // this is here, as we don't want to use nanopaste until you finish applying return + obj_integrity = min(obj_integrity + 50, max_integrity) user.visible_message("[user] applied some [O] at [src]'s damaged areas.",\ "You apply some [O] at [src]'s damaged areas.") @@ -376,57 +385,58 @@ var/shouldplaysound = 0 if(flags & NODECONSTRUCT) return FALSE - if(istype(W) && component_parts) - if(panel_open || W.works_from_distance) - var/obj/item/circuitboard/CB = locate(/obj/item/circuitboard) in component_parts - var/P - if(W.works_from_distance) - to_chat(user, display_parts(user)) - for(var/obj/item/stock_parts/A in component_parts) - for(var/D in CB.req_components) - if(ispath(A.type, D)) - P = D - break - for(var/obj/item/stock_parts/B in W.contents) - if(istype(B, P) && istype(A, P)) - //If it's cell - check: 1) Max charge is better? 2) Max charge same but current charge better? - If both NO -> next content - if(ispath(B.type, /obj/item/stock_parts/cell)) - var/obj/item/stock_parts/cell/tA = A - var/obj/item/stock_parts/cell/tB = B - if(!(tB.maxcharge > tA.maxcharge) && !((tB.maxcharge == tA.maxcharge) && (tB.charge > tA.charge))) - continue - //If it's not cell and not better -> next content - else if(B.rating <= A.rating) + + if(!istype(W) || !component_parts) + return FALSE + + if(panel_open || W.works_from_distance) + var/obj/item/circuitboard/CB = locate(/obj/item/circuitboard) in component_parts + var/P + if(W.works_from_distance) + to_chat(user, display_parts(user)) + for(var/obj/item/stock_parts/A in component_parts) + for(var/D in CB.req_components) + if(ispath(A.type, D)) + P = D + break + for(var/obj/item/stock_parts/B in W.contents) + if(istype(B, P) && istype(A, P)) + //If it's cell - check: 1) Max charge is better? 2) Max charge same but current charge better? - If both NO -> next content + if(ispath(B.type, /obj/item/stock_parts/cell)) + var/obj/item/stock_parts/cell/tA = A + var/obj/item/stock_parts/cell/tB = B + if(!(tB.maxcharge > tA.maxcharge) && !((tB.maxcharge == tA.maxcharge) && (tB.charge > tA.charge))) continue - W.remove_from_storage(B, src) - W.handle_item_insertion(A, user, TRUE) - component_parts -= A - component_parts += B - B.loc = null - to_chat(user, "[A.name] replaced with [B.name].") - shouldplaysound = TRUE - break - for(var/obj/item/reagent_containers/glass/beaker/A in component_parts) - for(var/obj/item/reagent_containers/glass/beaker/B in W.contents) - // If it's not better -> next content - if(B.reagents.maximum_volume <= A.reagents.maximum_volume) + //If it's not cell and not better -> next content + else if(B.rating <= A.rating) continue W.remove_from_storage(B, src) - W.handle_item_insertion(A, TRUE) + W.handle_item_insertion(A, user, TRUE) component_parts -= A component_parts += B B.loc = null to_chat(user, "[A.name] replaced with [B.name].") shouldplaysound = TRUE break - RefreshParts() - else - to_chat(user, display_parts(user)) - if(shouldplaysound) - W.play_rped_sound() - return 1 + for(var/obj/item/reagent_containers/glass/beaker/A in component_parts) + for(var/obj/item/reagent_containers/glass/beaker/B in W.contents) + // If it's not better -> next content + if(B.reagents.maximum_volume <= A.reagents.maximum_volume) + continue + W.remove_from_storage(B, src) + W.handle_item_insertion(A, TRUE) + component_parts -= A + component_parts += B + B.loc = null + to_chat(user, "[A.name] replaced with [B.name].") + shouldplaysound = TRUE + break + RefreshParts() else - return 0 + to_chat(user, display_parts(user)) + if(shouldplaysound) + W.play_rped_sound() + return TRUE /obj/machinery/proc/display_parts(mob/user) . = list("Following parts detected in the machine:") diff --git a/code/game/machinery/quantum_pad.dm b/code/game/machinery/quantum_pad.dm index 0a6f672216b..a57de59b9f1 100644 --- a/code/game/machinery/quantum_pad.dm +++ b/code/game/machinery/quantum_pad.dm @@ -88,11 +88,6 @@ teleport_cooldown = initial(teleport_cooldown) teleport_cooldown -= (E * 100) -/obj/machinery/quantumpad/attackby(obj/item/I, mob/user, params) - if(exchange_parts(user, I)) - return - return ..() - /obj/machinery/quantumpad/crowbar_act(mob/user, obj/item/I) . = TRUE if(!I.tool_use_check(user, 0)) diff --git a/code/game/machinery/rechargestation.dm b/code/game/machinery/rechargestation.dm index 99f06335113..5661fbc1bf7 100644 --- a/code/game/machinery/rechargestation.dm +++ b/code/game/machinery/rechargestation.dm @@ -125,13 +125,6 @@ else icon_state = "borgcharger0" -/obj/machinery/recharge_station/attackby(obj/item/I, mob/user, params) - if(exchange_parts(user, I)) - return - - else - return ..() - /obj/machinery/recharge_station/crowbar_act(mob/user, obj/item/I) if(default_deconstruction_crowbar(user, I)) return TRUE diff --git a/code/game/machinery/recycler.dm b/code/game/machinery/recycler.dm index 36be7f6cd03..a9b800a5933 100644 --- a/code/game/machinery/recycler.dm +++ b/code/game/machinery/recycler.dm @@ -57,12 +57,6 @@ return update_icon(UPDATE_ICON_STATE) -/obj/machinery/recycler/attackby(obj/item/I, mob/user, params) - add_fingerprint(user) - if(exchange_parts(user, I)) - return - return ..() - /obj/machinery/recycler/crowbar_act(mob/user, obj/item/I) if(default_deconstruction_crowbar(user, I)) return TRUE diff --git a/code/game/machinery/teleporter.dm b/code/game/machinery/teleporter.dm index 6ca72c4ed53..3baacc32877 100644 --- a/code/game/machinery/teleporter.dm +++ b/code/game/machinery/teleporter.dm @@ -419,11 +419,6 @@ use_power(5000) return -/obj/machinery/teleport/hub/attackby(obj/item/I, mob/user, params) - if(exchange_parts(user, I)) - return - return ..() - /obj/machinery/teleport/hub/crowbar_act(mob/user, obj/item/I) if(default_deconstruction_crowbar(user, I)) return TRUE @@ -555,11 +550,6 @@ else set_light(0) -/obj/machinery/teleport/perma/attackby(obj/item/I, mob/user, params) - if(exchange_parts(user, I)) - return - return ..() - /obj/machinery/teleport/perma/crowbar_act(mob/user, obj/item/I) if(default_deconstruction_crowbar(user, I)) return TRUE @@ -634,16 +624,16 @@ return ..() /obj/machinery/teleport/station/attackby(obj/item/I, mob/user, params) - if(exchange_parts(user, I)) - return if(panel_open && istype(I, /obj/item/circuitboard/teleporter_perma)) if(!teleporter_console) to_chat(user, "[src] is not linked to a teleporter console.") return + var/obj/item/circuitboard/teleporter_perma/C = I C.target = teleporter_console.target to_chat(user, "You copy the targeting information from [src] to [C].") return + return ..() /obj/machinery/teleport/station/crowbar_act(mob/user, obj/item/I) diff --git a/code/game/mecha/mech_bay.dm b/code/game/mecha/mech_bay.dm index 7f1f0150039..be9227943b5 100644 --- a/code/game/mecha/mech_bay.dm +++ b/code/game/mecha/mech_bay.dm @@ -90,11 +90,6 @@ MC += C.rating max_charge = MC * 25 -/obj/machinery/mech_bay_recharge_port/attackby(obj/item/I, mob/user, params) - if(exchange_parts(user, I)) - return - return ..() - /obj/machinery/mech_bay_recharge_port/screwdriver_act(mob/user, obj/item/I) if(default_deconstruction_screwdriver(user, "recharge_port-o", "recharge_port", I)) return TRUE diff --git a/code/game/mecha/mech_fabricator.dm b/code/game/mecha/mech_fabricator.dm index 4df9d1b4a63..86a5576160b 100644 --- a/code/game/mecha/mech_fabricator.dm +++ b/code/game/mecha/mech_fabricator.dm @@ -297,10 +297,10 @@ /obj/machinery/mecha_part_fabricator/attackby(obj/item/W, mob/user, params) if(default_deconstruction_screwdriver(user, "fab-o", "fab-idle", W)) return - if(exchange_parts(user, W)) - return + if(default_deconstruction_crowbar(user, W)) return TRUE + return ..() /obj/machinery/mecha_part_fabricator/attack_ghost(mob/user) diff --git a/code/game/objects/items/weapons/stock_parts.dm b/code/game/objects/items/weapons/stock_parts.dm index 570c1c8f8b0..0e3ddf14683 100644 --- a/code/game/objects/items/weapons/stock_parts.dm +++ b/code/game/objects/items/weapons/stock_parts.dm @@ -1,5 +1,6 @@ -///////////////////////////////////////Stock Parts ///////////////////////////////// - +//////////////////////////////////////// +// MARK: RPEDs +//////////////////////////////////////// /obj/item/storage/part_replacer name = "Rapid Part Exchange Device" desc = "Special mechanical module made to store, sort, and apply standard machine parts." @@ -21,11 +22,11 @@ display_contents_with_number = TRUE max_w_class = WEIGHT_CLASS_NORMAL max_combined_w_class = 100 + toolspeed = 1 + usesound = 'sound/items/rped.ogg' var/works_from_distance = FALSE var/primary_sound = 'sound/items/rped.ogg' var/alt_sound = null - toolspeed = 1 - usesound = 'sound/items/rped.ogg' /obj/item/storage/part_replacer/Initialize(mapload) . = ..() @@ -34,6 +35,7 @@ /obj/item/storage/part_replacer/can_be_inserted(obj/item/I, stop_messages = FALSE) if(!istype(I, /obj/item/reagent_containers/glass/beaker)) return ..() + var/obj/item/reagent_containers/glass/beaker/B = I if(B.reagents?.total_volume) if(!stop_messages) @@ -41,18 +43,26 @@ return FALSE return ..() -/obj/item/storage/part_replacer/afterattack(obj/machinery/M, mob/user, flag, params) - if(!flag && works_from_distance && istype(M)) - // Make sure its in range - if(get_dist(src, M) <= (user.client.maxview() + 2)) - if(M.component_parts) - M.exchange_parts(user, src) - user.Beam(M,icon_state="rped_upgrade", icon='icons/effects/effects.dmi', time=5) - else - message_admins("\[EXPLOIT] [key_name_admin(user)] attempted to upgrade machinery with a BRPED via a camera console. (Attempted range exploit)") - playsound(src, 'sound/machines/synth_no.ogg', 15, TRUE) - to_chat(user, "ERROR: [M] is out of [src]'s range!") +/obj/item/storage/part_replacer/afterattack(obj/machinery/M, mob/user, proximity_flag, params) + if(!istype(M)) + return ..() + if(!proximity_flag && !works_from_distance) + return + + if(get_dist(src, M) <= (user.client.maxview() + 2)) + if(M.component_parts) + M.exchange_parts(user, src) + if(works_from_distance) + user.Beam(M, icon_state="rped_upgrade", icon='icons/effects/effects.dmi', time=5) + else + message_admins("\[EXPLOIT] [key_name_admin(user)] attempted to upgrade machinery with a BRPED via a camera console (attempted range exploit).") + playsound(src, 'sound/machines/synth_no.ogg', 15, TRUE) + to_chat(user, "ERROR: [M] is out of [src]'s range!") + +//////////////////////////////////////// +// Bluespace Part Replacer +//////////////////////////////////////// /obj/item/storage/part_replacer/bluespace name = "bluespace rapid part exchange device" desc = "A version of the RPED that allows for replacement of parts and scanning from a distance, along with higher capacity for parts." @@ -85,6 +95,9 @@ else playsound(src, primary_sound, 40, 1) +//////////////////////////////////////// +// MARK: Stock parts +//////////////////////////////////////// /obj/item/stock_parts name = "stock part" desc = "What?" diff --git a/code/modules/arcade/arcade_base.dm b/code/modules/arcade/arcade_base.dm index 2232b48e290..5a1949b426f 100644 --- a/code/modules/arcade/arcade_base.dm +++ b/code/modules/arcade/arcade_base.dm @@ -57,18 +57,18 @@ return /obj/machinery/economy/arcade/attackby(obj/item/O, mob/user, params) - if(exchange_parts(user, O)) - return if(!freeplay) if(isspacecash(O)) insert_cash(O, user, token_price) if(pay_with_cash(token_price, "Arcade Token Purchase", "DonkBook Gaming", user, account_database.vendor_account)) tokens += 1 return + if(istype(O, /obj/item/card/id)) if(pay_with_card(O, token_price, "Arcade Token Purchase", "DonkBook Gaming", user, account_database.vendor_account)) tokens += 1 return + return ..() /obj/machinery/economy/arcade/screwdriver_act(mob/living/user, obj/item/I) diff --git a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm index 1025b299100..e884e77593c 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm @@ -304,9 +304,11 @@ if(beaker) to_chat(user, "A beaker is already loaded into the machine.") return + if(!user.drop_item()) - to_chat(user, "[B] is stuck to you!") + to_chat(user, "[B] is stuck to you!") return + B.forceMove(src) beaker = B add_attack_logs(user, null, "Added [B] containing [B.reagents.log_list()] to a cryo cell at [COORD(src)]") @@ -314,23 +316,24 @@ SStgui.update_uis(src) return - if(exchange_parts(user, G)) - return - if(istype(G, /obj/item/grab)) var/obj/item/grab/GG = G if(panel_open) - to_chat(user, "Close the maintenance panel first.") + to_chat(user, "Close the maintenance panel first.") return + if(!ismob(GG.affecting)) return + if(GG.affecting.has_buckled_mobs()) //mob attached to us to_chat(user, "[GG.affecting] will not fit into [src] because [GG.affecting.p_they()] [GG.affecting.p_have()] a slime latched onto [GG.affecting.p_their()] head.") return + var/mob/M = GG.affecting if(put_mob(M)) qdel(GG) return + return ..() /obj/machinery/atmospherics/unary/cryo_cell/crowbar_act(mob/user, obj/item/I) diff --git a/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm b/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm index d9a48dce55a..22893029b46 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/thermomachine.dm @@ -123,11 +123,6 @@ change_power_mode(IDLE_POWER_USE) return -/obj/machinery/atmospherics/unary/thermomachine/attackby(obj/item/I, mob/user, params) - if(exchange_parts(user, I)) - return - return ..() - /obj/machinery/atmospherics/unary/thermomachine/crowbar_act(mob/user, obj/item/I) if(default_deconstruction_crowbar(user, I)) return TRUE diff --git a/code/modules/food_and_drinks/kitchen_machinery/gibber.dm b/code/modules/food_and_drinks/kitchen_machinery/gibber.dm index 8ad5a5a81ce..0935bd9ab3a 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/gibber.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/gibber.dm @@ -106,14 +106,12 @@ if(default_deconstruction_screwdriver(user, "grinder_open", "grinder", P)) return - if(exchange_parts(user, P)) - return - if(default_unfasten_wrench(user, P, time = 4 SECONDS)) return if(default_deconstruction_crowbar(user, P)) return + return ..() /obj/machinery/gibber/MouseDrop_T(mob/target, mob/user) diff --git a/code/modules/food_and_drinks/kitchen_machinery/kitchen_machine.dm b/code/modules/food_and_drinks/kitchen_machinery/kitchen_machine.dm index 09e60e96ff3..43edc6fbc46 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/kitchen_machine.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/kitchen_machine.dm @@ -74,11 +74,13 @@ /obj/machinery/kitchen_machine/attackby(obj/item/O, mob/user, params) if(operating) return + if(dirty < MAX_DIRT) if(default_deconstruction_screwdriver(user, open_icon, off_icon, O)) return - if(exchange_parts(user, O)) - return + + if(istype(O, /obj/item/storage/part_replacer)) + return ..() default_deconstruction_crowbar(user, O) @@ -91,13 +93,16 @@ update_icon(UPDATE_ICON_STATE) container_type = OPENCONTAINER return TRUE + else //Otherwise bad luck!! to_chat(user, "It's dirty!") return TRUE - else if(is_type_in_list(O, GLOB.cooking_ingredients[recipe_type]) || istype(O, /obj/item/mixing_bowl)) + + if(is_type_in_list(O, GLOB.cooking_ingredients[recipe_type]) || istype(O, /obj/item/mixing_bowl)) if(length(contents) >= max_n_of_items) to_chat(user, "This [src] is full of ingredients, you cannot put more.") return TRUE + if(istype(O,/obj/item/stack)) var/obj/item/stack/S = O if(S.get_amount() > 1) @@ -111,16 +116,19 @@ else if(is_type_in_list(O, list(/obj/item/reagent_containers/glass, /obj/item/reagent_containers/drinks, /obj/item/reagent_containers/condiment))) if(!O.reagents) return TRUE + for(var/datum/reagent/R in O.reagents.reagent_list) if(!(R.id in GLOB.cooking_reagents[recipe_type])) to_chat(user, "Your [O] contains components unsuitable for cookery.") return TRUE + else if(istype(O, /obj/item/grab)) var/obj/item/grab/G = O if(HAS_TRAIT(user, TRAIT_PACIFISM)) to_chat(user, "Slamming [G.affecting] into [src] might hurt them!") return return special_attack_grab(G, user) + else to_chat(user, "You have no idea what you can cook with [O].") return TRUE diff --git a/code/modules/food_and_drinks/kitchen_machinery/monkeyrecycler.dm b/code/modules/food_and_drinks/kitchen_machinery/monkeyrecycler.dm index e19832d8500..672529d4361 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/monkeyrecycler.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/monkeyrecycler.dm @@ -58,8 +58,8 @@ GLOBAL_LIST_EMPTY(monkey_recyclers) if(default_deconstruction_screwdriver(user, "grinder_open", "grinder", O)) return - if(exchange_parts(user, O)) - return + if(istype(O, /obj/item/storage/part_replacer)) + return ..() if(default_unfasten_wrench(user, O, time = 4 SECONDS)) power_change() diff --git a/code/modules/food_and_drinks/kitchen_machinery/processor.dm b/code/modules/food_and_drinks/kitchen_machinery/processor.dm index 5514f6fb545..4c919ee95c5 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/processor.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/processor.dm @@ -189,16 +189,15 @@ return 0 /obj/machinery/processor/attackby(obj/item/O, mob/user, params) - if(processing) to_chat(user, "\the [src] is already processing something!") - return 1 + return TRUE if(default_deconstruction_screwdriver(user, "processor_open", "processor", O)) return - if(exchange_parts(user, O)) - return + if(istype(O, /obj/item/storage/part_replacer)) + return ..() if(default_unfasten_wrench(user, O, time = 4 SECONDS)) return diff --git a/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm b/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm index 6ea26c47751..b88ceb5ab9f 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm @@ -178,31 +178,43 @@ return ..() /obj/machinery/smartfridge/attackby(obj/item/O, mob/user) - if(exchange_parts(user, O)) + if(istype(O, /obj/item/storage/part_replacer)) + . = ..() SStgui.update_uis(src) return + if(stat & (BROKEN|NOPOWER)) - to_chat(user, "\The [src] is unpowered and useless.") + to_chat(user, "[src] is unpowered and useless.") return if(load(O, user)) - user.visible_message("[user] has added \the [O] to \the [src].", "You add \the [O] to \the [src].") + user.visible_message( + "[user] has added [O] to [src].", + "You add [O] to [src]." + ) SStgui.update_uis(src) update_icon(UPDATE_OVERLAYS) - else if(istype(O, /obj/item/storage/bag) || istype(O, /obj/item/storage/box)) + return + + if(istype(O, /obj/item/storage/bag) || istype(O, /obj/item/storage/box)) var/obj/item/storage/P = O var/items_loaded = 0 for(var/obj/G in P.contents) if(load(G, user)) items_loaded++ if(items_loaded) - user.visible_message("[user] loads \the [src] with \the [P].", "You load \the [src] with \the [P].") + user.visible_message( + "[user] loads [src] with [P].", + "You load [src] with [P]." + ) SStgui.update_uis(src) update_icon(UPDATE_OVERLAYS) var/failed = length(P.contents) if(failed) to_chat(user, "[failed] item\s [failed == 1 ? "is" : "are"] refused.") - else if(!istype(O, /obj/item/card/emag)) + return + + if(!istype(O, /obj/item/card/emag)) to_chat(user, "\The [src] smartly refuses [O].") return TRUE diff --git a/code/modules/hydroponics/biogenerator.dm b/code/modules/hydroponics/biogenerator.dm index ef4e15963d4..7bc748cbe8a 100644 --- a/code/modules/hydroponics/biogenerator.dm +++ b/code/modules/hydroponics/biogenerator.dm @@ -105,19 +105,23 @@ /obj/machinery/biogenerator/attackby(obj/item/O, mob/user, params) if(user.a_intent == INTENT_HARM) return ..() + + if(istype(O, /obj/item/storage/part_replacer)) + return ..() + if(processing) to_chat(user, "[src] is currently processing.") return - if(exchange_parts(user, O)) - return if(istype(O, /obj/item/reagent_containers/glass)) if(panel_open) to_chat(user, "Close the maintenance panel first.") return + if(container) to_chat(user, "A container is already loaded into [src].") return + if(!user.drop_item()) return @@ -128,7 +132,7 @@ SStgui.update_uis(src) return TRUE - else if(istype(O, /obj/item/storage/bag/plants)) + if(istype(O, /obj/item/storage/bag/plants)) if(length(stored_plants) >= max_storable_plants) to_chat(user, "[src] can't hold any more plants!") return @@ -149,7 +153,7 @@ SStgui.update_uis(src) return TRUE - else if(is_type_in_typecache(O, acceptable_items)) + if(is_type_in_typecache(O, acceptable_items)) if(length(stored_plants) >= max_storable_plants) to_chat(user, "[src] can't hold any more plants!") return @@ -162,7 +166,7 @@ SStgui.update_uis(src) return TRUE - else if(istype(O, /obj/item/disk/design_disk)) + if(istype(O, /obj/item/disk/design_disk)) user.visible_message("[user] begins to load [O] in [src]...", "You begin to load a design from [O]...", "You hear the chatter of a floppy drive.") @@ -176,8 +180,8 @@ processing = FALSE update_ui_product_list(user) return TRUE - else - to_chat(user, "You cannot put this in [name]!") + + to_chat(user, "You cannot put [src] in [name]!") /** * Builds/Updates the `product_list` used by the UI. diff --git a/code/modules/hydroponics/gene_modder.dm b/code/modules/hydroponics/gene_modder.dm index 6cac5b3b964..272dbbf143c 100644 --- a/code/modules/hydroponics/gene_modder.dm +++ b/code/modules/hydroponics/gene_modder.dm @@ -134,22 +134,23 @@ if(default_deconstruction_screwdriver(user, "dnamod", "dnamod", I)) update_icon(UPDATE_OVERLAYS) return - if(exchange_parts(user, I)) - return + if(default_deconstruction_crowbar(user, I)) return - if(isrobot(user)) + + if(istype(I, /obj/item/unsorted_seeds)) + to_chat(user, "You need to sort [I] first!") return if(istype(I, /obj/item/seeds)) add_seed(I, user) - else if(istype(I, /obj/item/unsorted_seeds)) - to_chat(user, "You need to sort [I] first!") - return ..() - else if(istype(I, /obj/item/disk/plantgene) || istype(I, /obj/item/storage/box)) + return + + if(istype(I, /obj/item/disk/plantgene) || istype(I, /obj/item/storage/box)) add_disk(I, user) - else - return ..() + return + + return ..() /obj/machinery/plantgenes/proc/add_seed(obj/item/seeds/new_seed, mob/user) if(seed) diff --git a/code/modules/hydroponics/hydroponics_tray.dm b/code/modules/hydroponics/hydroponics_tray.dm index 4bd228afbbb..72ac8ef4bcd 100644 --- a/code/modules/hydroponics/hydroponics_tray.dm +++ b/code/modules/hydroponics/hydroponics_tray.dm @@ -122,7 +122,7 @@ return ..() /obj/machinery/hydroponics/constructable/attackby(obj/item/I, mob/user, params) - if(default_deconstruction_screwdriver(user, "hydrotray3", "hydrotray3", I) || exchange_parts(user, I)) + if(default_deconstruction_screwdriver(user, "hydrotray3", "hydrotray3", I)) return return ..() diff --git a/code/modules/hydroponics/seed_extractor.dm b/code/modules/hydroponics/seed_extractor.dm index 37ac3e36132..dce24a56999 100644 --- a/code/modules/hydroponics/seed_extractor.dm +++ b/code/modules/hydroponics/seed_extractor.dm @@ -77,13 +77,17 @@ /obj/machinery/seed_extractor/attackby(obj/item/O, mob/user, params) if(default_deconstruction_screwdriver(user, "sextractor_open", "sextractor", O)) return - if(exchange_parts(user, O)) - return + if(default_unfasten_wrench(user, O, time = 4 SECONDS)) return + if(default_deconstruction_crowbar(user, O)) return + if(istype(O, /obj/item/storage/part_replacer)) + . = ..() + SStgui.update_uis(src) + return if(istype(O, /obj/item/storage/bag/plants)) var/obj/item/storage/P = O @@ -106,26 +110,32 @@ if(!seedable) to_chat(user, "There are no seeds or plants in [O].") return + to_chat(user, "You dump the plants in [O] into [src].") if(!O.use_tool(src, user, min(5, seedable/2) SECONDS)) return + for(var/thing in P) seedify(thing,-1, src, user) return - else if(istype(O, /obj/item/unsorted_seeds)) + if(istype(O, /obj/item/unsorted_seeds)) to_chat(user, "You need to sort [O] first!") return ..() - else if(istype(O, /obj/item/seeds)) + + if(istype(O, /obj/item/seeds)) add_seed(O, user) to_chat(user, "You add [O] to [name].") SStgui.update_uis(src) return - else if(seedify(O,-1, src, user)) + + if(seedify(O,-1, src, user)) to_chat(user, "You extract some seeds.") return - else if(user.a_intent != INTENT_HARM) + + if(user.a_intent != INTENT_HARM) to_chat(user, "You can't extract any seeds from \the [O.name]!") + return ..() /obj/machinery/seed_extractor/attack_ai(mob/user) diff --git a/code/modules/mining/machine_redemption.dm b/code/modules/mining/machine_redemption.dm index e4ce7921dca..6d21ffd940c 100644 --- a/code/modules/mining/machine_redemption.dm +++ b/code/modules/mining/machine_redemption.dm @@ -181,8 +181,9 @@ // Interactions /obj/machinery/mineral/ore_redemption/attackby(obj/item/I, mob/user, params) - if(exchange_parts(user, I)) - return + if(istype(I, /obj/item/storage/part_replacer)) + return ..() + if(!has_power()) return ..() @@ -202,18 +203,20 @@ add_fingerprint(usr) return - else if(istype(I, /obj/item/disk/design_disk)) + if(istype(I, /obj/item/disk/design_disk)) if(!user.drop_item()) return I.forceMove(src) inserted_disk = I SStgui.update_uis(src) interact(user) - user.visible_message("[user] inserts [I] into [src].", - "You insert [I] into [src].") + user.visible_message( + "[user] inserts [I] into [src].", + "You insert [I] into [src]." + ) return - else if(istype(I, /obj/item/gripper)) + if(istype(I, /obj/item/gripper)) if(!try_refill_storage(user)) to_chat(user, "You fail to retrieve any sheets from [src].") return diff --git a/code/modules/power/engines/singularity/emitter.dm b/code/modules/power/engines/singularity/emitter.dm index 096ccebc485..7cd160a97c1 100644 --- a/code/modules/power/engines/singularity/emitter.dm +++ b/code/modules/power/engines/singularity/emitter.dm @@ -147,25 +147,23 @@ step(src, get_dir(M, src)) /obj/machinery/power/emitter/attackby(obj/item/I, mob/user, params) - if(istype(I, /obj/item/card/id) || istype(I, /obj/item/pda)) - if(emagged) - to_chat(user, "The lock seems to be broken.") - return - if(allowed(user)) - if(active) - locked = !locked - to_chat(user, "The controls are now [locked ? "locked" : "unlocked"].") - else - locked = FALSE //just in case it somehow gets locked - to_chat(user, "The controls can only be locked when [src] is online!") - else - to_chat(user, "Access denied.") + if(!istype(I, /obj/item/card/id) || !istype(I, /obj/item/pda)) + return ..() + + if(emagged) + to_chat(user, "The lock seems to be broken.") return - if(exchange_parts(user, I)) + if(!allowed(user)) + to_chat(user, "Access denied.") return - return ..() + if(active) + locked = !locked + to_chat(user, "The controls are now [locked ? "locked" : "unlocked"].") + else + locked = FALSE //just in case it somehow gets locked + to_chat(user, "The controls can only be locked when [src] is online!") /obj/machinery/power/emitter/wrench_act(mob/living/user, obj/item/I) . = TRUE diff --git a/code/modules/power/engines/tesla/coil.dm b/code/modules/power/engines/tesla/coil.dm index d200ddc904d..15b5120a33a 100644 --- a/code/modules/power/engines/tesla/coil.dm +++ b/code/modules/power/engines/tesla/coil.dm @@ -44,12 +44,8 @@ . += "The status display reads: Power generation at [input_power_multiplier*100]%.
Shock interval at [zap_cooldown*0.1] seconds.
" /obj/machinery/power/tesla_coil/attackby(obj/item/W, mob/user, params) - if(exchange_parts(user, W)) - return - - else if(istype(W, /obj/item/assembly/signaler) && panel_open) + if(istype(W, /obj/item/assembly/signaler) && panel_open) wires.Interact(user) - else return ..() diff --git a/code/modules/power/generators/portable generators/pacman.dm b/code/modules/power/generators/portable generators/pacman.dm index 5e7b7102964..8111f4dd270 100644 --- a/code/modules/power/generators/portable generators/pacman.dm +++ b/code/modules/power/generators/portable generators/pacman.dm @@ -198,15 +198,13 @@ if(amount < 1) to_chat(user, "[src] is full!") return + to_chat(user, "You add [amount] sheet\s to [src].") sheets += amount addstack.use(amount) SStgui.update_uis(src) return - if(!active) - if(istype(O, /obj/item/storage/part_replacer) && panel_open) - exchange_parts(user, O) - return + return ..() /obj/machinery/power/port_gen/pacman/crowbar_act(mob/living/user, obj/item/I) diff --git a/code/modules/power/generators/turbine.dm b/code/modules/power/generators/turbine.dm index 591cd54a04b..8e0ac11eddb 100644 --- a/code/modules/power/generators/turbine.dm +++ b/code/modules/power/generators/turbine.dm @@ -145,8 +145,6 @@ stat |= BROKEN return - if(exchange_parts(user, I)) - return return ..() /obj/machinery/power/compressor/crowbar_act(mob/user, obj/item/I) @@ -352,11 +350,9 @@ stat |= BROKEN return - if(exchange_parts(user, I)) - return - if(default_deconstruction_crowbar(user, I)) return + return ..() /obj/machinery/power/turbine/attack_hand(mob/user) diff --git a/code/modules/power/smes.dm b/code/modules/power/smes.dm index bd5e8733862..f9526f1a758 100644 --- a/code/modules/power/smes.dm +++ b/code/modules/power/smes.dm @@ -120,10 +120,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) @@ -216,6 +212,7 @@ //crowbarring it ! if(default_deconstruction_crowbar(user, I)) return + return ..() /obj/machinery/power/smes/disconnect_terminal() diff --git a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm index f9f6e60e86d..28472534504 100644 --- a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm +++ b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm @@ -235,20 +235,20 @@ add_fingerprint(usr) /obj/machinery/chem_dispenser/attackby(obj/item/I, mob/user, params) - if(exchange_parts(user, I)) + if(istype(I, /obj/item/storage/part_replacer)) + . = ..() SStgui.update_uis(src) return - if(isrobot(user)) - return - if((istype(I, /obj/item/reagent_containers/glass) || istype(I, /obj/item/reagent_containers/drinks)) && user.a_intent != INTENT_HARM) if(panel_open) to_chat(user, "Close the maintenance panel first.") return + if(!user.drop_item()) to_chat(user, "[I] is stuck to you!") return + I.forceMove(src) if(beaker) to_chat(usr, "You swap [I] with [beaker].") diff --git a/code/modules/reagents/chemistry/machinery/chem_heater.dm b/code/modules/reagents/chemistry/machinery/chem_heater.dm index 86f009a60bb..bdbad39598c 100644 --- a/code/modules/reagents/chemistry/machinery/chem_heater.dm +++ b/code/modules/reagents/chemistry/machinery/chem_heater.dm @@ -63,23 +63,20 @@ stat |= NOPOWER /obj/machinery/chem_heater/attackby(obj/item/I, mob/user) - if(isrobot(user)) - return - if(istype(I, /obj/item/reagent_containers/glass) && user.a_intent != INTENT_HARM) if(beaker) to_chat(user, "A beaker is already loaded into the machine.") return - if(user.drop_item()) - beaker = I - I.forceMove(src) - to_chat(user, "You add the beaker to the machine!") - icon_state = "mixer1b" - SStgui.update_uis(src) + if(!user.drop_item()) + to_chat(user, "[I] is stuck to you!") return - if(exchange_parts(user, I)) + beaker = I + I.forceMove(src) + to_chat(user, "You add the beaker to the machine!") + icon_state = "mixer1b" + SStgui.update_uis(src) return return ..() diff --git a/code/modules/reagents/chemistry/machinery/chem_master.dm b/code/modules/reagents/chemistry/machinery/chem_master.dm index c90faeb4e0e..6f6feaa4bfb 100644 --- a/code/modules/reagents/chemistry/machinery/chem_master.dm +++ b/code/modules/reagents/chemistry/machinery/chem_master.dm @@ -112,8 +112,8 @@ update_icon() /obj/machinery/chem_master/attackby(obj/item/I, mob/user, params) - if(exchange_parts(user, I)) - return + if(istype(I, /obj/item/storage/part_replacer)) + return ..() if(panel_open) to_chat(user, "You can't use [src] while it's panel is opened!") @@ -123,6 +123,7 @@ if(!user.drop_item()) to_chat(user, "[I] is stuck to you!") return + I.forceMove(src) if(beaker) to_chat(usr, "You swap [I] with [beaker] inside.") diff --git a/code/modules/reagents/chemistry/machinery/reagentgrinder.dm b/code/modules/reagents/chemistry/machinery/reagentgrinder.dm index 195ee442f91..4ca089ac935 100644 --- a/code/modules/reagents/chemistry/machinery/reagentgrinder.dm +++ b/code/modules/reagents/chemistry/machinery/reagentgrinder.dm @@ -157,7 +157,8 @@ default_unfasten_wrench(user, I) /obj/machinery/reagentgrinder/attackby(obj/item/I, mob/user, params) - if(exchange_parts(user, I)) + if(istype(I, /obj/item/storage/part_replacer)) + ..() SStgui.update_uis(src) return @@ -169,6 +170,7 @@ else if(!user.drop_item()) return FALSE + beaker = I beaker.loc = src update_icon(UPDATE_ICON_STATE) @@ -206,6 +208,7 @@ if(length(B.contents) == original_contents_len) to_chat(user, "Nothing in [B] can be put into the All-In-One grinder.") return FALSE + else if(!length(B.contents)) to_chat(user, "You empty all of [B]'s contents into the All-In-One grinder.") else diff --git a/code/modules/research/circuitprinter.dm b/code/modules/research/circuitprinter.dm index e24bb030391..4728e195f69 100644 --- a/code/modules/research/circuitprinter.dm +++ b/code/modules/research/circuitprinter.dm @@ -75,15 +75,17 @@ using metal and glass, it uses glass and reagents (usually sulfuric acis). return round(A / max(1, (all_materials[M] * efficiency_coeff))) /obj/machinery/r_n_d/circuit_imprinter/attackby(obj/item/O as obj, mob/user as mob, params) - if(exchange_parts(user, O)) - return + if(istype(O, /obj/item/storage/part_replacer)) + return ..() + if(panel_open) to_chat(user, "You can't load [src] while it's opened.") return + if(O.is_open_container()) return FALSE - else - return ..() + + return ..() /obj/machinery/r_n_d/circuit_imprinter/crowbar_act(mob/living/user, obj/item/I) if(!panel_open) diff --git a/code/modules/research/destructive_analyzer.dm b/code/modules/research/destructive_analyzer.dm index 4b1dd9d3eae..ffb50d0c5e8 100644 --- a/code/modules/research/destructive_analyzer.dm +++ b/code/modules/research/destructive_analyzer.dm @@ -49,6 +49,9 @@ Note: Must be placed within 3 tiles of the R&D Console /obj/machinery/r_n_d/destructive_analyzer/attackby(obj/item/O as obj, mob/user as mob, params) + if(istype(O, /obj/item/storage/part_replacer)) + return ..() + if(default_deconstruction_screwdriver(user, "d_analyzer_t", "d_analyzer", O)) if(linked_console) linked_console.linked_destroy = null @@ -73,13 +76,16 @@ Note: Must be placed within 3 tiles of the R&D Console if(!O.origin_tech) to_chat(user, "This doesn't seem to have a tech origin!") return + var/list/temp_tech = ConvertReqString2List(O.origin_tech) if(length(temp_tech) == 0) to_chat(user, "You cannot deconstruct this item!") return + if(!user.drop_item()) to_chat(user, "[O] is stuck to your hand, you cannot put it in [src]!") return + busy = TRUE loaded_item = O O.loc = src diff --git a/code/modules/research/experimentor.dm b/code/modules/research/experimentor.dm index 1784c584970..edadddf3648 100644 --- a/code/modules/research/experimentor.dm +++ b/code/modules/research/experimentor.dm @@ -99,8 +99,8 @@ return TRUE /obj/machinery/r_n_d/experimentor/attackby(obj/item/O, mob/user, params) - if(exchange_parts(user, O)) - return + if(istype(O, /obj/item/storage/part_replacer)) + return ..() if(!checkCircumstances(O)) to_chat(user, "[O] is not yet valid for [src] and must be completed!") @@ -118,12 +118,15 @@ if(!O.origin_tech) to_chat(user, "This doesn't seem to have a tech origin!") return + var/list/temp_tech = ConvertReqString2List(O.origin_tech) if(length(temp_tech) == 0) to_chat(user, "You cannot experiment on this item!") return + if(!user.drop_item()) return + loaded_item = O O.loc = src to_chat(user, "You add [O] to the machine.") diff --git a/code/modules/research/protolathe.dm b/code/modules/research/protolathe.dm index 8708de882fc..eb0e7f7c2c9 100644 --- a/code/modules/research/protolathe.dm +++ b/code/modules/research/protolathe.dm @@ -77,23 +77,23 @@ Note: Must be placed west/left of and R&D console to function. return A /obj/machinery/r_n_d/protolathe/attackby(obj/item/O as obj, mob/user as mob, params) + if(istype(O, /obj/item/storage/part_replacer)) + return ..() + if(default_deconstruction_screwdriver(user, "protolathe_t", "protolathe", O)) if(linked_console) linked_console.linked_lathe = null linked_console = null return FALSE - if(exchange_parts(user, O)) - return FALSE - if(panel_open) to_chat(user, "You can't load [src] while it's opened.") return TRUE if(O.is_open_container()) return FALSE - else - return ..() + + return ..() /obj/machinery/r_n_d/protolathe/crowbar_act(mob/living/user, obj/item/I) if(!panel_open) diff --git a/code/modules/research/server.dm b/code/modules/research/server.dm index bf5e7e72d11..7cad823802a 100644 --- a/code/modules/research/server.dm +++ b/code/modules/research/server.dm @@ -147,11 +147,6 @@ removed.set_temperature(min((removed.temperature() * heat_capacity + server.heating_power) / heat_capacity, 1000)) env.merge(removed) -/obj/machinery/r_n_d/server/attackby(obj/item/O as obj, mob/user as mob, params) - if(exchange_parts(user, O)) - return TRUE - return ..() - /obj/machinery/r_n_d/server/crowbar_act(mob/living/user, obj/item/I) if(!panel_open) return diff --git a/code/modules/telesci/telepad.dm b/code/modules/telesci/telepad.dm index 002530787f0..e6975d8b195 100644 --- a/code/modules/telesci/telepad.dm +++ b/code/modules/telesci/telepad.dm @@ -35,11 +35,6 @@ E += C.rating efficiency = E -/obj/machinery/telepad/attackby(obj/item/I, mob/user, params) - if(exchange_parts(user, I)) - return - return ..() - /obj/machinery/telepad/screwdriver_act(mob/user, obj/item/I) . = TRUE default_deconstruction_screwdriver(user, "pad-idle-o", "pad-idle", I)