diff --git a/_maps/map_files/MetaStation/MetaStation.v41A.II.dmm b/_maps/map_files/MetaStation/MetaStation.v41A.II.dmm index 3065afcb9c9..3b3270fe6c0 100644 --- a/_maps/map_files/MetaStation/MetaStation.v41A.II.dmm +++ b/_maps/map_files/MetaStation/MetaStation.v41A.II.dmm @@ -33441,7 +33441,6 @@ "bgD" = ( /obj/item/book/manual/security_space_law, /obj/machinery/newscaster{ - hitstaken = 1; pixel_y = -32 }, /obj/machinery/atmospherics/pipe/simple/hidden/supply{ diff --git a/_maps/map_files/templates/shelter_2.dmm b/_maps/map_files/templates/shelter_2.dmm index 281a1f43433..9bed101da97 100644 --- a/_maps/map_files/templates/shelter_2.dmm +++ b/_maps/map_files/templates/shelter_2.dmm @@ -126,8 +126,8 @@ dir = 1 }, /obj/structure/displaycase{ + alert = 0; desc = "A display case containing an expensive forgery, probably."; - locked = 1; pixel_y = -4; req_access_txt = "48"; start_showpiece_type = /obj/item/fakeartefact diff --git a/code/ATMOSPHERICS/components/binary_devices/circulator.dm b/code/ATMOSPHERICS/components/binary_devices/circulator.dm index 6bb16cb36c9..e2dd952213a 100644 --- a/code/ATMOSPHERICS/components/binary_devices/circulator.dm +++ b/code/ATMOSPHERICS/components/binary_devices/circulator.dm @@ -107,11 +107,11 @@ to_chat(user, "You reverse the circulator's valve settings. The inlet of the circulator is now on the [get_inlet_side(dir)] side.") desc = "A gas circulator pump and heat exchanger. Its input port is on the [get_inlet_side(dir)] side, and its output port is on the [get_outlet_side(dir)] side." else - ..() + return ..() /obj/machinery/atmospherics/binary/circulator/update_icon() ..() - + if(stat & (BROKEN|NOPOWER)) icon_state = "circ[side]-p" else if(last_pressure_delta > 0) diff --git a/code/ATMOSPHERICS/components/binary_devices/valve.dm b/code/ATMOSPHERICS/components/binary_devices/valve.dm index f9da99544b5..0f36a749722 100644 --- a/code/ATMOSPHERICS/components/binary_devices/valve.dm +++ b/code/ATMOSPHERICS/components/binary_devices/valve.dm @@ -17,7 +17,7 @@ /obj/machinery/atmospherics/binary/valve/update_icon(animation) ..() - + if(animation) flick("valve[src.open][!src.open]",src) else @@ -146,7 +146,7 @@ if(istype(W, /obj/item/multitool)) update_multitool_menu(user) return 1 - ..() + return ..() /obj/machinery/atmospherics/binary/valve/digital/multitool_menu(var/mob/user,var/obj/item/multitool/P) return {" diff --git a/code/datums/wires/wires.dm b/code/datums/wires/wires.dm index a201617682d..5220fd83a6d 100644 --- a/code/datums/wires/wires.dm +++ b/code/datums/wires/wires.dm @@ -5,6 +5,12 @@ #define MAX_FLAG 65535 +/proc/is_wire_tool(obj/item/I) + if(ismultitool(I)) + return TRUE + if(iswirecutter(I)) + return TRUE + var/list/same_wires = list() // 12 colours, if you're adding more than 12 wires then add more colours here var/list/wireColours = list("red", "blue", "green", "black", "orange", "brown", "gold", "gray", "cyan", "navy", "purple", "pink") diff --git a/code/game/dna/dna_modifier.dm b/code/game/dna/dna_modifier.dm index de5f6a65a8e..77771d48596 100644 --- a/code/game/dna/dna_modifier.dm +++ b/code/game/dna/dna_modifier.dm @@ -210,7 +210,7 @@ to_chat(user, "The maintenance panel is locked.") return default_deconstruction_screwdriver(user, "[icon_state]_maintenance", "[initial(icon_state)]", item) - + return if(exchange_parts(user, item)) return @@ -233,27 +233,27 @@ item.forceMove(src) user.visible_message("[user] adds \a [item] to \the [src]!", "You add \a [item] to \the [src]!") return - else if(!istype(item, /obj/item/grab)) + if(istype(item, /obj/item/grab)) + var/obj/item/grab/G = item + if(!ismob(G.affecting)) + return + if(src.occupant) + to_chat(user, "The scanner is already occupied!") + return + if(G.affecting.abiotic()) + to_chat(user, "Subject cannot have abiotic items on.") + return + if(G.affecting.has_buckled_mobs()) //mob attached to us + to_chat(user, "will not fit into the [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) + src.add_fingerprint(user) + qdel(G) return - var/obj/item/grab/G = item - if(!ismob(G.affecting)) - return - if(src.occupant) - to_chat(user, "The scanner is already occupied!") - return - if(G.affecting.abiotic()) - to_chat(user, "Subject cannot have abiotic items on.") - return - if(G.affecting.has_buckled_mobs()) //mob attached to us - to_chat(user, "will not fit into the [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) - src.add_fingerprint(user) - qdel(G) - return + return ..() /obj/machinery/dna_scannernew/relaymove(mob/user as mob) if(user.incapacitated()) @@ -353,7 +353,7 @@ SSnanoui.update_uis(src) // update all UIs attached to src() return else - ..() + return ..() /obj/machinery/computer/scan_consolenew/New() ..() diff --git a/code/game/gamemodes/cult/cult_structures.dm b/code/game/gamemodes/cult/cult_structures.dm index 9293bb94953..3eca8204fd3 100644 --- a/code/game/gamemodes/cult/cult_structures.dm +++ b/code/game/gamemodes/cult/cult_structures.dm @@ -29,23 +29,21 @@ //Cult versions cuase fuck map conflicts /obj/structure/cult/functional + max_integrity = 100 var/cooldowntime = 0 - var/health = 100 var/death_message = "The structure falls apart." //The message shown when the structure is destroyed var/death_sound = 'sound/items/bikehorn.ogg' var/heathen_message = "You're a huge nerd, go away. Also, a coder forgot to put a message here." var/selection_title = "Oops" var/selection_prompt = "Choose your weapon, nerdwad" var/creation_delay = 2400 - var/list/choosable_items = list( - "A coder forgot to set this" = /obj/item/grown/bananapeel - ) + var/list/choosable_items = list("A coder forgot to set this" = /obj/item/grown/bananapeel) var/creation_message = "A dank smoke comes out, and you pass out. When you come to, you notice a %ITEM%!" -/obj/structure/cult/functional/proc/destroy_structure() +/obj/structure/cult/functional/obj_destruction() visible_message(death_message) playsound(src, death_sound, 50, 1) - qdel(src) + ..() /obj/structure/cult/functional/examine(mob/user) . = ..() @@ -54,10 +52,6 @@ . += "\The [src] is [anchored ? "":"not "]secured to the floor." /obj/structure/cult/functional/attackby(obj/I, mob/user, params) - if(HULK in user.mutations) - to_chat(user, "You cannot seem to manipulate this structure with your bulky hands!") - return - if(istype(I, /obj/item/tome) && iscultist(user)) anchored = !anchored to_chat(user, "You [anchored ? "":"un"]secure \the [src] [anchored ? "to":"from"] the floor.") @@ -66,22 +60,16 @@ icon_state = "[initial(icon_state)]_off" else icon_state = initial(icon_state) - else - return ..() - -/obj/structure/cult/functional/proc/updatehealth() - if(health <= 0) - destroy_structure() - -/obj/structure/cult/functional/attackby(obj/item/I, mob/living/user) - ..() - take_damage(I.force, I.damtype) - playsound(loc, I.hitsound, 80, 1) + return + return ..() /obj/structure/cult/functional/attack_hand(mob/living/user) if(!iscultist(user)) to_chat(user, "[heathen_message]") return + if(HULK in user.mutations) + to_chat(user, "You cannot seem to manipulate this structure with your bulky hands!") + return if(!anchored) to_chat(user, "You need to anchor [src] to the floor with a tome first.") return @@ -107,7 +95,7 @@ name = "altar" desc = "A bloodstained altar dedicated to a cult." icon_state = "talismanaltar" - health = 150 //Sturdy + max_integrity = 150 //Sturdy death_message = "The altar breaks into splinters, releasing a cascade of spirits into the air!" death_sound = 'sound/effects/altar_break.ogg' heathen_message = "There is a foreboding aura to the altar and you want nothing to do with it." @@ -121,7 +109,7 @@ name = "daemon forge" desc = "A forge used in crafting the unholy weapons used by the armies of a cult." icon_state = "forge" - health = 300 //Made of metal + max_integrity = 300 //Made of metal death_message = "The forge falls apart, its lava cooling and winking away!" death_sound = 'sound/effects/forge_destroy.ogg' heathen_message = "Your hand feels like it's melting off as you try to touch the forge." @@ -155,8 +143,7 @@ C.apply_damage(30, BURN, "head") //30 fire damage because it's FUCKING LAVA head.disfigure() //Your face is unrecognizable because it's FUCKING LAVA return 1 - else - ..() + return ..() var/list/blacklisted_pylon_turfs = typecacheof(list( /turf/simulated/floor/engine/cult, @@ -174,7 +161,7 @@ var/list/blacklisted_pylon_turfs = typecacheof(list( icon_state = "pylon" light_range = 5 light_color = "#3e0000" - health = 50 //Very fragile + max_integrity = 50 //Very fragile death_message = "The pylon's crystal vibrates and glows fiercely before violently shattering!" death_sound = 'sound/effects/pylon_shatter.ogg' @@ -244,7 +231,7 @@ var/list/blacklisted_pylon_turfs = typecacheof(list( name = "archives" desc = "A desk covered in arcane manuscripts and tomes in unknown languages. Looking at the text makes your skin crawl." icon_state = "tomealtar" - health = 125 //Slightly sturdy + max_integrity = 125 //Slightly sturdy death_message = "The desk breaks apart, its books falling to the floor." death_sound = 'sound/effects/wood_break.ogg' heathen_message = "What do you hope to seek?" diff --git a/code/game/gamemodes/cult/runes.dm b/code/game/gamemodes/cult/runes.dm index 5b34530f704..59c6ac50e15 100644 --- a/code/game/gamemodes/cult/runes.dm +++ b/code/game/gamemodes/cult/runes.dm @@ -63,7 +63,7 @@ To draw a rune, use an arcane tome. to_chat(user, "You carefully erase the [lowertext(cultist_name)] rune.") qdel(src) return - else if(istype(I, /obj/item/nullrod)) + if(istype(I, /obj/item/nullrod)) if(iscultist(user))//cultist..what are doing..cultist..staph... user.drop_item() user.visible_message("[I] suddenly glows with white light, forcing [user] to drop it in pain!", \ @@ -72,6 +72,7 @@ To draw a rune, use an arcane tome. to_chat(user,"You disrupt the magic of [src] with [I].") qdel(src) return + return ..() /obj/effect/rune/attack_hand(mob/living/user) if(!iscultist(user)) @@ -541,14 +542,12 @@ var/list/teleport_runes = list() if(do_after(user, 50, target = src)) //Prevents accidental erasures. log_game("Summon Narsie rune erased by [key_name(user)] with a tome") message_admins("[key_name_admin(user)] erased a Narsie rune with a tome") - ..() - return - else - if(istype(I, /obj/item/nullrod)) //Begone foul magiks. You cannot hinder me. - log_game("Summon Narsie rune erased by [key_name(user)] using a null rod") - message_admins("[key_name_admin(user)] erased a Narsie rune with a null rod") - ..() - return + return + if(istype(I, /obj/item/nullrod)) //Begone foul magiks. You cannot hinder me. + log_game("Summon Narsie rune erased by [key_name(user)] using a null rod") + message_admins("[key_name_admin(user)] erased a Narsie rune with a null rod") + return + return ..() @@ -579,14 +578,12 @@ var/list/teleport_runes = list() if(do_after(user, 50, target = src)) //Prevents accidental erasures. log_game("Summon demon rune erased by [key_name(user)] with a tome") message_admins("[key_name_admin(user)] erased a demon rune with a tome") - ..() - return - else - if(istype(I, /obj/item/nullrod)) //Begone foul magiks. You cannot hinder me. - log_game("Summon demon rune erased by [key_name(user)] using a null rod") - message_admins("[key_name_admin(user)] erased a demon rune with a null rod") - ..() - return + return + if(istype(I, /obj/item/nullrod)) //Begone foul magiks. You cannot hinder me. + log_game("Summon demon rune erased by [key_name(user)] using a null rod") + message_admins("[key_name_admin(user)] erased a demon rune with a null rod") + return + return ..() /obj/effect/rune/slaughter/invoke(var/list/invokers) diff --git a/code/game/gamemodes/meteor/meteors.dm b/code/game/gamemodes/meteor/meteors.dm index f55d0ef7520..5dafcee72a7 100644 --- a/code/game/gamemodes/meteor/meteors.dm +++ b/code/game/gamemodes/meteor/meteors.dm @@ -160,9 +160,10 @@ /obj/effect/meteor/attackby(obj/item/W as obj, mob/user as mob, params) if(istype(W, /obj/item/pickaxe)) + make_debris() qdel(src) return - ..() + return ..() /obj/effect/meteor/proc/make_debris() for(var/throws = dropamt, throws > 0, throws--) diff --git a/code/game/gamemodes/miniantags/abduction/abduction_gear.dm b/code/game/gamemodes/miniantags/abduction/abduction_gear.dm index fbbebc3acfc..2d3ce8d0968 100644 --- a/code/game/gamemodes/miniantags/abduction/abduction_gear.dm +++ b/code/game/gamemodes/miniantags/abduction/abduction_gear.dm @@ -692,7 +692,7 @@ Congratulations! You are now trained for invasive xenobiology research!"} for(var/i = 1, i <= framestackamount, i++) new framestack(get_turf(src)) qdel(src) - return + return if(istype(I, /obj/item/stack/sheet/mineral/abductor)) var/obj/item/stack/sheet/P = I if(P.get_amount() < 1) @@ -714,6 +714,8 @@ Congratulations! You are now trained for invasive xenobiology research!"} P.use(1) new /obj/machinery/optable/abductor(loc) qdel(src) + return + return ..() /obj/structure/table/abductor name = "alien table" diff --git a/code/game/gamemodes/miniantags/abduction/machinery/experiment.dm b/code/game/gamemodes/miniantags/abduction/machinery/experiment.dm index 2128a101be2..04dda244a0c 100644 --- a/code/game/gamemodes/miniantags/abduction/machinery/experiment.dm +++ b/code/game/gamemodes/miniantags/abduction/machinery/experiment.dm @@ -200,6 +200,8 @@ icon_state = "experiment" add_fingerprint(user) qdel(G) + return + return ..() /obj/machinery/abductor/experiment/ex_act(severity) if(occupant) diff --git a/code/game/gamemodes/nuclear/nuclearbomb.dm b/code/game/gamemodes/nuclear/nuclearbomb.dm index 4508de4e6ba..1c4956d096e 100644 --- a/code/game/gamemodes/nuclear/nuclearbomb.dm +++ b/code/game/gamemodes/nuclear/nuclearbomb.dm @@ -88,7 +88,7 @@ var/bomb_set return attack_hand(user) else to_chat(user, "You need to deploy \the [src] first. Right click on the sprite, select 'Make Deployable' then click on \the [src] with an empty hand.") - return + return if(anchored) switch(removal_stage) @@ -157,7 +157,8 @@ var/bomb_set anchored = 0 removal_stage = 5 return - ..() + return + return ..() /obj/machinery/nuclearbomb/attack_ghost(mob/user as mob) if(extended) diff --git a/code/game/gamemodes/wizard/artefact.dm b/code/game/gamemodes/wizard/artefact.dm index 7b969089644..67f42b81285 100644 --- a/code/game/gamemodes/wizard/artefact.dm +++ b/code/game/gamemodes/wizard/artefact.dm @@ -172,7 +172,7 @@ user.visible_message("[user] seals \the [src] with \the [I].") qdel(src) return - ..() + return ..() /obj/effect/rend/singularity_pull() return @@ -806,7 +806,8 @@ var/global/list/multiverse = list() link = I to_chat(user, "You attach [I] to the doll.") update_targets() - ..() + return + return ..() /obj/item/voodoo/check_eye(mob/user as mob) if(loc != user) diff --git a/code/game/gamemodes/wizard/spellbook.dm b/code/game/gamemodes/wizard/spellbook.dm index d2842c21c24..2bac9aeac6a 100644 --- a/code/game/gamemodes/wizard/spellbook.dm +++ b/code/game/gamemodes/wizard/spellbook.dm @@ -614,6 +614,7 @@ to_chat(user, "You feed the contract back into the spellbook, refunding your points.") uses+=2 qdel(O) + return if(istype(O, /obj/item/antag_spawner/slaughter_demon)) to_chat(user, "On second thought, maybe summoning a demon is a bad idea. You refund your points.") @@ -628,6 +629,7 @@ if(!isnull(BB.limit)) BB.limit++ qdel(O) + return if(istype(O, /obj/item/antag_spawner/morph)) to_chat(user, "On second thought, maybe awakening a morph is a bad idea. You refund your points.") @@ -636,6 +638,8 @@ if(!isnull(OB.limit)) OB.limit++ qdel(O) + return + return ..() /obj/item/spellbook/proc/GetCategoryHeader(var/category) var/dat = "" diff --git a/code/game/machinery/Freezer.dm b/code/game/machinery/Freezer.dm index b958b9fc625..a6bf80f5fe3 100644 --- a/code/game/machinery/Freezer.dm +++ b/code/game/machinery/Freezer.dm @@ -77,8 +77,8 @@ break build_network() update_icon() - else - return ..() + return + return ..() /obj/machinery/atmospherics/unary/cold_sink/freezer/update_icon() if(panel_open) @@ -244,8 +244,8 @@ break build_network() update_icon() - else - return ..() + return + return ..() /obj/machinery/atmospherics/unary/heat_reservoir/heater/update_icon() if(panel_open) diff --git a/code/game/machinery/ai_slipper.dm b/code/game/machinery/ai_slipper.dm index 2c838a110cb..12ad51c8b28 100644 --- a/code/game/machinery/ai_slipper.dm +++ b/code/game/machinery/ai_slipper.dm @@ -37,21 +37,18 @@ return if(istype(user, /mob/living/silicon)) return attack_hand(user) - else // trying to unlock the interface - if(allowed(usr)) - locked = !locked - to_chat(user, "You [locked ? "lock" : "unlock"] the device.") - if(locked) - if(user.machine == src) - user.unset_machine() - user << browse(null, "window=ai_slipper") - else - if(user.machine == src) - attack_hand(usr) + if(allowed(usr)) // trying to unlock the interface + locked = !locked + to_chat(user, "You [locked ? "lock" : "unlock"] the device.") + if(locked) + if(user.machine == src) + user.unset_machine() + user << browse(null, "window=ai_slipper") else - to_chat(user, "Access denied.") - return - return + if(user.machine == src) + attack_hand(usr) + return + return ..() /obj/machinery/ai_slipper/proc/ToggleOn() if(stat & (NOPOWER|BROKEN)) diff --git a/code/game/machinery/atmo_control.dm b/code/game/machinery/atmo_control.dm index e704015589c..f0c6a81820f 100644 --- a/code/game/machinery/atmo_control.dm +++ b/code/game/machinery/atmo_control.dm @@ -82,8 +82,8 @@ new /obj/item/pipe_gsensor(src.loc) qdel(src) return 1 - if(..()) - return 1 + return + return ..() /obj/machinery/air_sensor/process_atmos() if(on) @@ -182,8 +182,8 @@ /obj/machinery/computer/general_air_control/attackby(I as obj, user as mob, params) if(istype(I, /obj/item/multitool)) update_multitool_menu(user) - if(..()) return 1 + return ..() /obj/machinery/computer/general_air_control/receive_signal(datum/signal/signal) @@ -386,8 +386,8 @@ /obj/machinery/computer/general_air_control/large_tank_control/attackby(I as obj, user as mob) if(istype(I, /obj/item/multitool)) update_multitool_menu(user) - if(..()) return 1 + return ..() /obj/machinery/computer/general_air_control/large_tank_control/multitool_menu(mob/user, obj/item/multitool/P) @@ -598,8 +598,8 @@ /obj/machinery/computer/general_air_control/fuel_injection/attackby(I as obj, user as mob, params) if(istype(I, /obj/item/multitool)) update_multitool_menu(user) - if(..()) return 1 + return ..() /obj/machinery/computer/general_air_control/fuel_injection/process() if(automation) diff --git a/code/game/machinery/atmoalter/portable_atmospherics.dm b/code/game/machinery/atmoalter/portable_atmospherics.dm index aebfc3e5f74..b7c2dd152da 100644 --- a/code/game/machinery/atmoalter/portable_atmospherics.dm +++ b/code/game/machinery/atmoalter/portable_atmospherics.dm @@ -125,8 +125,7 @@ T.loc = src src.holding = T update_icon() - return - + return else if(istype(W, /obj/item/wrench)) if(connected_port) disconnect() @@ -145,12 +144,11 @@ return else to_chat(user, "Nothing happens.") - return - - else if((istype(W, /obj/item/analyzer)) && get_dist(user, src) <= 1) + return + if((istype(W, /obj/item/analyzer)) && get_dist(user, src) <= 1) atmosanalyzer_scan(air_contents, user) - - return + return + return ..() /obj/machinery/portable_atmospherics/attacked_by(obj/item/I, mob/user) if(I.force < 10 && !(stat & BROKEN)) diff --git a/code/game/machinery/atmoalter/scrubber.dm b/code/game/machinery/atmoalter/scrubber.dm index eea0d8c20d7..2079b8cf915 100644 --- a/code/game/machinery/atmoalter/scrubber.dm +++ b/code/game/machinery/atmoalter/scrubber.dm @@ -206,8 +206,10 @@ to_chat(user, "You [anchored ? "wrench" : "unwrench"] \the [src].") return - else if((istype(W, /obj/item/analyzer)) && get_dist(user, src) <= 1) + if((istype(W, /obj/item/analyzer)) && get_dist(user, src) <= 1) atmosanalyzer_scan(air_contents, user) + return + return ..() /obj/machinery/portable_atmospherics/scrubber/huge/stationary name = "Stationary Air Scrubber" diff --git a/code/game/machinery/buttons.dm b/code/game/machinery/buttons.dm index e8da8014663..f91152b47e4 100644 --- a/code/game/machinery/buttons.dm +++ b/code/game/machinery/buttons.dm @@ -82,7 +82,7 @@ qdel(src) return 1 - return attack_hand(user) + return ..() /obj/machinery/driver_button/multitool_menu(var/mob/user, var/obj/item/multitool/P) return {" @@ -178,9 +178,6 @@ if(user.can_advanced_admin_interact()) return attack_hand(user) -/obj/machinery/ignition_switch/attackby(obj/item/W, mob/user, params) - return attack_hand(user) - /obj/machinery/ignition_switch/attack_hand(mob/user) if(stat & (NOPOWER|BROKEN)) return diff --git a/code/game/machinery/computer/aifixer.dm b/code/game/machinery/computer/aifixer.dm index e6a57f4a875..008dc26f834 100644 --- a/code/game/machinery/computer/aifixer.dm +++ b/code/game/machinery/computer/aifixer.dm @@ -19,7 +19,7 @@ else to_chat(user, "The screws on [name]'s screen won't budge and it emits a warning beep!.") else - ..() + return ..() /obj/machinery/computer/aifixer/attack_ai(var/mob/user as mob) ui_interact(user) diff --git a/code/game/machinery/computer/buildandrepair.dm b/code/game/machinery/computer/buildandrepair.dm index bf7225b3fcc..ab75682aeb3 100644 --- a/code/game/machinery/computer/buildandrepair.dm +++ b/code/game/machinery/computer/buildandrepair.dm @@ -406,7 +406,8 @@ return else to_chat(user, "DERP! BUG! Report this (And what you were doing to cause it) to Agouri") - return + return + return ..() /obj/item/circuitboard/rdconsole/attackby(obj/item/I as obj, mob/user as mob, params) if(istype(I,/obj/item/card/id)||istype(I, /obj/item/pda)) @@ -440,7 +441,8 @@ to_chat(user, "Access protocols set to [console_choice].") else to_chat(user, "Access Denied") - return + return + return ..() /obj/structure/computerframe/attackby(obj/item/P as obj, mob/user as mob, params) switch(state) @@ -461,6 +463,7 @@ if(!src || !WT.isOn()) return to_chat(user, "You deconstruct the frame.") deconstruct(TRUE) + return if(1) if(istype(P, /obj/item/wrench)) playsound(loc, P.usesound, 50, 1) @@ -491,6 +494,7 @@ icon_state = "0" circuit.loc = loc circuit = null + return if(2) if(istype(P, /obj/item/screwdriver) && circuit) playsound(loc, P.usesound, 50, 1) @@ -512,7 +516,7 @@ return else to_chat(user, "You need five lengths of cable to wire the frame.") - return + return if(3) if(istype(P, /obj/item/wirecutters)) playsound(loc, P.usesound, 50, 1) @@ -537,7 +541,7 @@ return else to_chat(user, "You need two sheets of glass for this.") - return + return if(4) if(istype(P, /obj/item/crowbar)) playsound(loc, P.usesound, 50, 1) @@ -558,6 +562,8 @@ var/obj/item/circuitboard/supplycomp/C = circuit SC.can_order_contraband = C.contraband_enabled qdel(src) + return + return ..() @@ -585,6 +591,7 @@ if(!src || !WT.isOn()) return to_chat(user, "You deconstruct the frame.") deconstruct(TRUE) + return if(1) if(istype(P, /obj/item/wrench)) playsound(loc, P.usesound, 50, 1) @@ -615,6 +622,7 @@ icon_state = "0" circuit.loc = loc circuit = null + return if(2) if(istype(P, /obj/item/screwdriver) && circuit) playsound(loc, P.usesound, 50, 1) @@ -636,7 +644,7 @@ return else to_chat(user, "You need five lengths of cable to wire the frame.") - return + return if(3) if(istype(P, /obj/item/wirecutters)) playsound(loc, P.usesound, 50, 1) @@ -661,7 +669,7 @@ return else to_chat(user, "You need two sheets of glass for this.") - return + return if(4) if(istype(P, /obj/item/crowbar)) playsound(loc, P.usesound, 50, 1) @@ -678,3 +686,5 @@ if(circuit.records) B:records = circuit.records if(circuit.frequency) B:frequency = circuit.frequency qdel(src) + return + return ..() \ No newline at end of file diff --git a/code/game/machinery/computer/camera.dm b/code/game/machinery/computer/camera.dm index 42c371fc4ee..45f390082a1 100644 --- a/code/game/machinery/computer/camera.dm +++ b/code/game/machinery/computer/camera.dm @@ -79,14 +79,6 @@ ui_interact(user) -/obj/machinery/computer/security/attackby(obj/item/I, user as mob, params) - if(isscrewdriver(I)) - ..() - else if(I.GetAccess()) // If hit by something with access. - attack_hand(user) - else - ..() - /obj/machinery/computer/security/telescreen/attackby(obj/item/I, mob/user, params) if(ismultitool(I)) var/direction = input(user, "Which direction?", "Select direction!") as null|anything in list("North", "East", "South", "West", "Centre") @@ -104,7 +96,7 @@ if("West") pixel_x = -32 else - ..() + return ..() /obj/machinery/computer/security/emag_act(user as mob) if(!emagged) @@ -116,7 +108,7 @@ /obj/machinery/computer/security/proc/get_user_access(mob/user) var/list/access = list() - + if(emagged) access = get_all_accesses() // Assume captain level access when emagged else if(ishuman(user)) diff --git a/code/game/machinery/computer/cloning.dm b/code/game/machinery/computer/cloning.dm index acdbc1110f3..539d4dfc0ed 100644 --- a/code/game/machinery/computer/cloning.dm +++ b/code/game/machinery/computer/cloning.dm @@ -36,10 +36,10 @@ if(scanner.occupant && can_autoprocess()) scan_mob(scanner.occupant) - + if(!LAZYLEN(records)) return - + for(var/obj/machinery/clonepod/pod in pods) if(!(pod.occupant || pod.mess) && (pod.efficiency > 5)) for(var/datum/dna2/record/R in records) @@ -103,8 +103,7 @@ P.name = "[initial(P.name)] #[pods.len]" to_chat(user, "You connect [P] to [src].") else - ..() - return + return ..() /obj/machinery/computer/cloning/attack_ai(mob/user as mob) diff --git a/code/game/machinery/computer/honkputer.dm b/code/game/machinery/computer/honkputer.dm index 33b809bd4ac..842a65b5f50 100644 --- a/code/game/machinery/computer/honkputer.dm +++ b/code/game/machinery/computer/honkputer.dm @@ -115,5 +115,4 @@ A.icon_state = "4" qdel(src) else - src.attack_hand(user) - return + return ..() \ No newline at end of file diff --git a/code/game/machinery/computer/medical.dm b/code/game/machinery/computer/medical.dm index dbe766a2c44..35a5c505b5b 100644 --- a/code/game/machinery/computer/medical.dm +++ b/code/game/machinery/computer/medical.dm @@ -34,7 +34,8 @@ O.forceMove(src) scan = O ui_interact(user) - ..() + return + return ..() /obj/machinery/computer/med_data/attack_hand(mob/user) if(..()) diff --git a/code/game/machinery/computer/message.dm b/code/game/machinery/computer/message.dm index d6e000d660d..fef40c9f93a 100644 --- a/code/game/machinery/computer/message.dm +++ b/code/game/machinery/computer/message.dm @@ -42,9 +42,7 @@ //Stops people from just unscrewing the monitor and putting it back to get the console working again. to_chat(user, "It is too hot to mess with!") return - - ..() - return + return ..() /obj/machinery/computer/message_monitor/emag_act(user as mob) // Will create sparks and print out the console's password. You will then have to wait a while for the console to be back online. diff --git a/code/game/machinery/computer/salvage_ship.dm b/code/game/machinery/computer/salvage_ship.dm index 93583eda0e8..ba7e7200c49 100644 --- a/code/game/machinery/computer/salvage_ship.dm +++ b/code/game/machinery/computer/salvage_ship.dm @@ -36,10 +36,6 @@ moving = 0 return 1 - -/obj/machinery/computer/salvage_ship/attackby(obj/item/I as obj, mob/user as mob, params) - return attack_hand(user) - /obj/machinery/computer/salvage_ship/attack_ai(mob/user as mob) src.add_hiddenprint(user) return attack_hand(user) diff --git a/code/game/machinery/computer/security.dm b/code/game/machinery/computer/security.dm index bed10bb0923..ce872e598f4 100644 --- a/code/game/machinery/computer/security.dm +++ b/code/game/machinery/computer/security.dm @@ -35,7 +35,8 @@ O.forceMove(src) scan = O ui_interact(user) - ..() + return + return ..() //Someone needs to break down the dat += into chunks instead of long ass lines. /obj/machinery/computer/secure_data/attack_hand(mob/user) diff --git a/code/game/machinery/computer/skills.dm b/code/game/machinery/computer/skills.dm index 5647ae73766..125b5294860 100644 --- a/code/game/machinery/computer/skills.dm +++ b/code/game/machinery/computer/skills.dm @@ -33,7 +33,8 @@ O.forceMove(src) scan = O ui_interact(user) - ..() + return + return ..() //Someone needs to break down the dat += into chunks instead of long ass lines. /obj/machinery/computer/skills/attack_hand(mob/user) diff --git a/code/game/machinery/computer/specops_shuttle.dm b/code/game/machinery/computer/specops_shuttle.dm index 4d53906297b..0602757944f 100644 --- a/code/game/machinery/computer/specops_shuttle.dm +++ b/code/game/machinery/computer/specops_shuttle.dm @@ -254,7 +254,7 @@ var/specops_shuttle_timeleft = 0 if(istype(I,/obj/item/card/emag)) to_chat(user, "The electronic systems in this console are far too advanced for your primitive hacking peripherals.") else - return attack_hand(user) + return ..() /obj/machinery/computer/specops_shuttle/attack_hand(var/mob/user as mob) if(!allowed(user)) diff --git a/code/game/machinery/computer/syndicate_specops_shuttle.dm b/code/game/machinery/computer/syndicate_specops_shuttle.dm index 9aaf1b39517..92ed453e71e 100644 --- a/code/game/machinery/computer/syndicate_specops_shuttle.dm +++ b/code/game/machinery/computer/syndicate_specops_shuttle.dm @@ -177,9 +177,6 @@ var/syndicate_elite_shuttle_timeleft = 0 if(syndicate_elite_shuttle_moving_to_station || syndicate_elite_shuttle_moving_to_mothership) return 0 else return 1 -/obj/machinery/computer/syndicate_elite_shuttle/attackby(I as obj, user as mob, params) - return attack_hand(user) - /obj/machinery/computer/syndicate_elite_shuttle/attack_ai(var/mob/user as mob) to_chat(user, "Access Denied.") return 1 @@ -188,7 +185,7 @@ var/syndicate_elite_shuttle_timeleft = 0 if(istype(I,/obj/item/card/emag)) to_chat(user, "The electronic systems in this console are far too advanced for your primitive hacking peripherals.") else - return attack_hand(user) + return ..() /obj/machinery/computer/syndicate_elite_shuttle/attack_hand(var/mob/user as mob) if(!allowed(user)) diff --git a/code/game/machinery/constructable_frame.dm b/code/game/machinery/constructable_frame.dm index b8a2f8fa64c..57a77ecad2e 100644 --- a/code/game/machinery/constructable_frame.dm +++ b/code/game/machinery/constructable_frame.dm @@ -94,6 +94,7 @@ playsound(src.loc, P.usesound, 75, 1) to_chat(user, "You dismantle the frame.") deconstruct(TRUE) + return if(2) if(istype(P, /obj/item/circuitboard)) var/obj/item/circuitboard/B = P @@ -111,6 +112,7 @@ update_req_desc() else to_chat(user, "This frame does not accept circuit boards of this type!") + return if(istype(P, /obj/item/wirecutters)) playsound(src.loc, P.usesound, 50, 1) to_chat(user, "You remove the cables.") @@ -118,6 +120,8 @@ icon_state = "box_0" var/obj/item/stack/cable_coil/A = new /obj/item/stack/cable_coil(src.loc,5) A.amount = 5 + return + return if(3) if(istype(P, /obj/item/crowbar)) @@ -135,6 +139,7 @@ req_components = null components = null icon_state = "box_1" + return if(istype(P, /obj/item/screwdriver)) var/component_check = 1 @@ -155,7 +160,7 @@ circuit.loc = null new_machine.RefreshParts() qdel(src) - return + return if(istype(P, /obj/item/storage/part_replacer) && P.contents.len && get_req_components_amt()) var/obj/item/storage/part_replacer/replacer = P @@ -208,6 +213,8 @@ if(!success) to_chat(user, "You cannot add that to the machine!") return 0 + return + return ..() //Machine Frame Circuit Boards /*Common Parts: Parts List: Ignitor, Timer, Infra-red laser, Infra-red sensor, t_scanner, Capacitor, Valve, sensor unit, @@ -329,6 +336,8 @@ to destroy them and players will be able to make replacements. build_path = /obj/machinery/atmospherics/unary/cold_sink/freezer name = "circuit board (Freezer)" to_chat(user, "You set the board to cooling.") + return + return ..() /obj/item/circuitboard/recharger name = "circuit board (Recharger)" @@ -515,6 +524,8 @@ to destroy them and players will be able to make replacements. /obj/item/circuitboard/smartfridge/attackby(obj/item/I, mob/user, params) if(istype(I, /obj/item/screwdriver)) set_type(null, user) + return + return ..() /obj/item/circuitboard/smartfridge/proc/set_type(typepath, mob/user) var/new_name = "" @@ -804,6 +815,8 @@ to destroy them and players will be able to make replacements. if(L.locked_location) target = get_turf(L.locked_location) to_chat(user, "You upload the data from [L]") + return + return ..() /obj/item/circuitboard/telesci_pad name = "Circuit board (Telepad)" @@ -1057,6 +1070,8 @@ to destroy them and players will be able to make replacements. /obj/item/circuitboard/logic_gate/attackby(obj/item/I, mob/user, params) if(istype(I, /obj/item/screwdriver)) set_type(null, user) + return + return ..() /obj/item/circuitboard/logic_gate/proc/set_type(typepath, mob/user) var/new_name = "Logic Base" diff --git a/code/game/machinery/cryo.dm b/code/game/machinery/cryo.dm index 6c3960176e1..3106e027f47 100644 --- a/code/game/machinery/cryo.dm +++ b/code/game/machinery/cryo.dm @@ -300,6 +300,7 @@ beaker = B add_attack_logs(user, null, "Added [B] containing [B.reagents.log_list()] to a cryo cell at [COORD(src)]") user.visible_message("[user] adds \a [B] to [src]!", "You add \a [B] to [src]!") + return if(istype(G, /obj/item/screwdriver)) @@ -312,7 +313,8 @@ if(exchange_parts(user, G)) return - default_deconstruction_crowbar(G) + if(default_deconstruction_crowbar(G)) + return if(istype(G, /obj/item/grab)) var/obj/item/grab/GG = G @@ -327,7 +329,8 @@ var/mob/M = GG.affecting if(put_mob(M)) qdel(GG) - return + return + return ..() /obj/machinery/atmospherics/unary/cryo_cell/update_icon() handle_update_icon() diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index 9d6be29c84f..ae8b3f5829c 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -18,6 +18,8 @@ density = 0 interact_offline = 1 req_one_access = list(access_heads, access_armory) //Heads of staff or the warden can go here to claim recover items from their department that people went were cryodormed with. + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF + flags = NODECONSTRUCT var/mode = null //Used for logging people entering cryosleep and important items they are carrying. @@ -193,7 +195,8 @@ icon_state = "body_scanner_0" density = 1 anchored = 1 - + resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF + flags = NODECONSTRUCT var/base_icon_state = "body_scanner_0" var/occupied_icon_state = "body_scanner_1" var/on_store_message = "has entered long-term storage." diff --git a/code/game/machinery/dance_machine.dm b/code/game/machinery/dance_machine.dm index a0c0d2234af..211f878231f 100644 --- a/code/game/machinery/dance_machine.dm +++ b/code/game/machinery/dance_machine.dm @@ -67,7 +67,7 @@ to_chat(user,"You unsecure and disconnect [src].") anchored = FALSE playsound(src, 'sound/items/deconstruct.ogg', 50, 1) - return + return return ..() /obj/machinery/disco/update_icon() diff --git a/code/game/machinery/door_control.dm b/code/game/machinery/door_control.dm index 17d734d7d14..f6bbbb3bc02 100644 --- a/code/game/machinery/door_control.dm +++ b/code/game/machinery/door_control.dm @@ -37,23 +37,9 @@ to_chat(user, "Error, no route to host.") /obj/machinery/door_control/attackby(obj/item/W, mob/user as mob, params) - /* For later implementation - if(istype(W, /obj/item/screwdriver)) - { - if(wiresexposed) - icon_state = "doorctrl0" - wiresexposed = 0 - - else - icon_state = "doorctrl-open" - wiresexposed = 1 - - return - } - */ if(istype(W, /obj/item/detective_scanner)) return - return attack_hand(user) + return ..() /obj/machinery/door_control/emag_act(user as mob) if(!emagged) diff --git a/code/game/machinery/doors/airlock_control.dm b/code/game/machinery/doors/airlock_control.dm index 9b42578cb3b..8113a9caace 100644 --- a/code/game/machinery/doors/airlock_control.dm +++ b/code/game/machinery/doors/airlock_control.dm @@ -254,7 +254,7 @@ if(istype(I, /obj/item/card/id) || istype(I, /obj/item/pda)) attack_hand(user) return - ..() + return ..() /obj/machinery/access_button/attack_ghost(mob/user) if(user.can_advanced_admin_interact()) diff --git a/code/game/machinery/doppler_array.dm b/code/game/machinery/doppler_array.dm index fef3d7c5e5e..d4dc8f854ef 100644 --- a/code/game/machinery/doppler_array.dm +++ b/code/game/machinery/doppler_array.dm @@ -51,12 +51,13 @@ var/list/doppler_arrays = list() power_change() to_chat(user, "You unfasten [src].") playsound(loc, I.usesound, 50, 1) + return if(istype(I, /obj/item/disk/tech_disk)) var/obj/item/disk/tech_disk/disk = I disk.load_tech(toxins_tech) to_chat(user, "You swipe the disk into [src].") - else - return ..() + return + return ..() /obj/machinery/doppler_array/attack_hand(mob/user) if(..()) diff --git a/code/game/machinery/dye_generator.dm b/code/game/machinery/dye_generator.dm index c4e0863364e..920a111496e 100644 --- a/code/game/machinery/dye_generator.dm +++ b/code/game/machinery/dye_generator.dm @@ -46,8 +46,8 @@ user.visible_message("[user] fills the [HD] up with some dye.","You fill the [HD] up with some hair dye.") HD.dye_color = dye_color HD.update_dye_overlay() - else - return ..() + return + return ..() //Hair Dye Bottle diff --git a/code/game/machinery/firealarm.dm b/code/game/machinery/firealarm.dm index 643cc500441..255d8d3cce1 100644 --- a/code/game/machinery/firealarm.dm +++ b/code/game/machinery/firealarm.dm @@ -142,8 +142,8 @@ FIRE ALARM playsound(get_turf(src), I.usesound, 50, 1) qdel(src) - else - return ..() + return + return ..() /obj/machinery/firealarm/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir) . = ..() diff --git a/code/game/machinery/flasher.dm b/code/game/machinery/flasher.dm index 0579e0ccbe7..30069ff0310 100644 --- a/code/game/machinery/flasher.dm +++ b/code/game/machinery/flasher.dm @@ -135,9 +135,6 @@ if(user.can_advanced_admin_interact()) return attack_hand(user) -/obj/machinery/flasher_button/attackby(obj/item/W, mob/user as mob, params) - return attack_hand(user) - /obj/machinery/flasher_button/attack_hand(mob/user as mob) if(stat & (NOPOWER|BROKEN)) return diff --git a/code/game/machinery/floodlight.dm b/code/game/machinery/floodlight.dm index 20e5c0f38e4..0cc6dda7098 100644 --- a/code/game/machinery/floodlight.dm +++ b/code/game/machinery/floodlight.dm @@ -106,6 +106,8 @@ " You have loosened \the [src]'s casters.", \ "You hear ratchet.") anchored = FALSE + updateicon() + return if(istype(W, /obj/item/screwdriver)) if(!open) if(unlocked) @@ -114,7 +116,8 @@ else unlocked = TRUE to_chat(user, "You unscrew the battery panel.") - + updateicon() + return if(istype(W, /obj/item/crowbar)) if(unlocked) if(open) @@ -125,7 +128,8 @@ if(unlocked) open = TRUE to_chat(user, "You remove the battery panel.") - + updateicon() + return if(istype(W, /obj/item/stock_parts/cell)) if(open) if(cell) @@ -135,7 +139,9 @@ W.loc = src cell = W to_chat(user, "You insert the power cell.") - updateicon() + updateicon() + return + return ..() /obj/machinery/floodlight/extinguish_light() on = 0 diff --git a/code/game/machinery/gameboard.dm b/code/game/machinery/gameboard.dm index ab93e69f36d..2df0496ae67 100644 --- a/code/game/machinery/gameboard.dm +++ b/code/game/machinery/gameboard.dm @@ -99,5 +99,4 @@ if(default_deconstruction_crowbar(I, ignore_panel = TRUE)) return - else - return ..() + return ..() diff --git a/code/game/machinery/guestpass.dm b/code/game/machinery/guestpass.dm index 4bc080fca67..35d5a6546d4 100644 --- a/code/game/machinery/guestpass.dm +++ b/code/game/machinery/guestpass.dm @@ -57,8 +57,8 @@ updateUsrDialog() else to_chat(user, "There is already ID card inside.") - else - return ..() + return + return ..() /obj/machinery/computer/guestpass/proc/get_changeable_accesses() return giver.access diff --git a/code/game/machinery/hologram.dm b/code/game/machinery/hologram.dm index be51ef7618a..10708ff9c0e 100644 --- a/code/game/machinery/hologram.dm +++ b/code/game/machinery/hologram.dm @@ -111,8 +111,7 @@ var/list/holopads = list() if(default_deconstruction_crowbar(I)) return - else - return ..() + return ..() /obj/machinery/hologram/holopad/attack_hand(mob/living/carbon/human/user) diff --git a/code/game/machinery/holosign.dm b/code/game/machinery/holosign.dm index 13ed8bebc23..aca4254b517 100644 --- a/code/game/machinery/holosign.dm +++ b/code/game/machinery/holosign.dm @@ -51,7 +51,7 @@ /obj/machinery/holosign_switch/attackby(obj/item/W, mob/user as mob, params) if(istype(W, /obj/item/detective_scanner)) return - return src.attack_hand(user) + return ..() /obj/machinery/holosign_switch/attack_hand(mob/user as mob) src.add_fingerprint(usr) diff --git a/code/game/machinery/igniter.dm b/code/game/machinery/igniter.dm index 008d6741ef1..45056369662 100755 --- a/code/game/machinery/igniter.dm +++ b/code/game/machinery/igniter.dm @@ -90,8 +90,8 @@ icon_state = "[base_state]" else icon_state = "[base_state]-p" - else - return ..() + return + return ..() /obj/machinery/sparker/attack_ai() if(src.anchored) diff --git a/code/game/machinery/lightswitch.dm b/code/game/machinery/lightswitch.dm index b1e335c1ce9..4d27ad6b5b5 100644 --- a/code/game/machinery/lightswitch.dm +++ b/code/game/machinery/lightswitch.dm @@ -160,7 +160,7 @@ qdel(src) return 1 - return src.attack_hand(user) + return ..() /obj/machinery/light_switch/multitool_menu(var/mob/user, var/obj/item/multitool/P) return {" diff --git a/code/game/machinery/mass_driver.dm b/code/game/machinery/mass_driver.dm index de14dce7d5b..68878e3ad13 100644 --- a/code/game/machinery/mass_driver.dm +++ b/code/game/machinery/mass_driver.dm @@ -122,6 +122,7 @@ build++ update_icon() return 1 + return if(1) // Fixed to the floor if(istype(W, /obj/item/wrench)) to_chat(user, "You begin to de-anchor \the [src] from the floor.") @@ -144,6 +145,7 @@ build++ update_icon() return 1 + return if(2) // Welded to the floor if(istype(W, /obj/item/weldingtool)) var/obj/item/weldingtool/WT = W @@ -165,6 +167,7 @@ to_chat(user, "You've added cables to \the [src].") build++ update_icon() + return if(3) // Wired if(istype(W, /obj/item/wirecutters)) to_chat(user, "You begin to remove the wiring from \the [src].") @@ -185,6 +188,7 @@ build++ update_icon() return 1 + return if(4) // Grille in place if(istype(W, /obj/item/crowbar)) to_chat(user, "You begin to pry off the grille from \the [src]...") @@ -201,7 +205,8 @@ M.dir = src.dir qdel(src) return 1 - ..() + return + return ..() /obj/machinery/mass_driver_frame/update_icon() icon_state = "mass_driver_b[build]" diff --git a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm index 1b566c95e42..fba07d684ac 100644 --- a/code/game/machinery/newscaster.dm +++ b/code/game/machinery/newscaster.dm @@ -799,6 +799,7 @@ var/list/obj/machinery/newscaster/allCasters = list() //Global list that will co scribble = s attack_self(user) return + return ..() ////////////////////////////////////helper procs diff --git a/code/game/machinery/pipe/construction.dm b/code/game/machinery/pipe/construction.dm index 1dc3fa70f4e..b4241b5f19d 100644 --- a/code/game/machinery/pipe/construction.dm +++ b/code/game/machinery/pipe/construction.dm @@ -324,8 +324,6 @@ return rotate() /obj/item/pipe/attackby(var/obj/item/W as obj, var/mob/user as mob, params) - ..() - if(!istype(W, /obj/item/wrench)) return ..() @@ -526,8 +524,6 @@ w_class = WEIGHT_CLASS_BULKY /obj/item/pipe_meter/attackby(var/obj/item/W as obj, var/mob/user as mob, params) - ..() - if(!istype(W, /obj/item/wrench)) return ..() if(!locate(/obj/machinery/atmospherics/pipe, src.loc)) @@ -553,7 +549,6 @@ w_class = WEIGHT_CLASS_BULKY /obj/item/pipe_gsensor/attackby(var/obj/item/W as obj, var/mob/user as mob) - ..() if(!istype(W, /obj/item/wrench)) return ..() new/obj/machinery/air_sensor( src.loc ) diff --git a/code/game/machinery/portable_turret.dm b/code/game/machinery/portable_turret.dm index df3d13b7378..a07c639c36f 100644 --- a/code/game/machinery/portable_turret.dm +++ b/code/game/machinery/portable_turret.dm @@ -13,9 +13,6 @@ idle_power_usage = 50 //when inactive, this turret takes up constant 50 Equipment power active_power_usage = 300 //when active, this turret takes up constant 300 Equipment power power_channel = EQUIP //drains power from the EQUIPMENT channel - - max_integrity = 160 //the turret's health - integrity_failure = 80 armor = list(melee = 50, bullet = 30, laser = 30, energy = 30, bomb = 30, bio = 0, rad = 0, fire = 90, acid = 90) var/raised = 0 //if the turret cover is "open" and the turret is raised var/raising= 0 //if the turret is currently opening or closing its cover @@ -418,6 +415,29 @@ var/list/turret_icons ..() +/obj/machinery/porta_turret/attack_animal(mob/living/simple_animal/M) + M.changeNext_move(CLICK_CD_MELEE) + M.do_attack_animation(src) + if(M.melee_damage_upper == 0 || (M.melee_damage_type != BRUTE && M.melee_damage_type != BURN)) + return + if(!(stat & BROKEN)) + visible_message("[M] [M.attacktext] [src]!") + take_damage(M.melee_damage_upper) + else + to_chat(M, "That object is useless to you.") + return + +/obj/machinery/porta_turret/attack_alien(mob/living/carbon/alien/humanoid/M) + M.changeNext_move(CLICK_CD_MELEE) + M.do_attack_animation(src) + if(!(stat & BROKEN)) + playsound(src.loc, 'sound/weapons/slash.ogg', 25, 1, -1) + visible_message("[M] has slashed at [src]!") + take_damage(15) + else + to_chat(M, "That object is useless to you.") + return + /obj/machinery/porta_turret/emag_act(user as mob) if(!emagged) //Emagging the turret makes it go bonkers and stun everyone. It also makes @@ -432,6 +452,33 @@ var/list/turret_icons sleep(60) //6 seconds for the traitor to gtfo of the area before the turret decides to ruin his shit enabled = 1 //turns it back on. The cover popUp() popDown() are automatically called in process(), no need to define it here +/obj/machinery/porta_turret/take_damage(force) + if(!raised && !raising) + force = force / 8 + if(force < 5) + return + + health -= force + if(force > 5 && prob(45) && spark_system) + spark_system.start() + if(health <= 0) + die() //the death process :( + +/obj/machinery/porta_turret/bullet_act(obj/item/projectile/Proj) + if(Proj.damage_type == STAMINA) + return + + if(enabled) + if(!attacked && !emagged) + attacked = 1 + spawn(60) + attacked = 0 + + ..() + + if((Proj.damage_type == BRUTE || Proj.damage_type == BURN)) + take_damage(Proj.damage) + /obj/machinery/porta_turret/emp_act(severity) if(enabled && emp_vulnerable) //if the turret is on, the EMP no matter how severe disables the turret for a while @@ -451,21 +498,6 @@ var/list/turret_icons ..() -/obj/machinery/porta_turret/take_damage(damage, damage_type = BRUTE, damage_flag = 0, sound_effect = 1) - . = ..() - if(. && obj_integrity > 0) //damage received - if(prob(30)) - spark_system.start() - if(enabled && !attacked && !emagged) - attacked = TRUE - addtimer(CALLBACK(src, .proc/reset_attacked), 60) - -/obj/machinery/porta_turret/proc/reset_attacked() - attacked = FALSE - -/obj/machinery/porta_turret/deconstruct(disassembled = TRUE) - qdel(src) - /obj/machinery/porta_turret/ex_act(severity) switch(severity) if(1) @@ -1047,4 +1079,4 @@ var/list/turret_icons desc = "Syndicate exterior defense turret chambered for 4.6x30mm rounds. Designed to be fitted to assault pods, it uses low calliber bullets to save space." health = 100 projectile = /obj/item/projectile/bullet/weakbullet3 - eprojectile = /obj/item/projectile/bullet/weakbullet3 + eprojectile = /obj/item/projectile/bullet/weakbullet3 \ No newline at end of file diff --git a/code/game/machinery/suit_storage_unit.dm b/code/game/machinery/suit_storage_unit.dm index 5833ec5db38..3437bafeb3b 100644 --- a/code/game/machinery/suit_storage_unit.dm +++ b/code/game/machinery/suit_storage_unit.dm @@ -305,6 +305,7 @@ return if(panel_open) wires.Interact(user) + return if(state_open) if(store_item(I, user)) @@ -313,6 +314,8 @@ to_chat(user, "You load the [I] into the storage compartment.") else to_chat(user, "The unit already contains that item.") + return + return ..() /obj/machinery/suit_storage_unit/proc/store_item(obj/item/I, mob/user) diff --git a/code/game/machinery/telecomms/logbrowser.dm b/code/game/machinery/telecomms/logbrowser.dm index ed8c531720b..ec5d63804f6 100644 --- a/code/game/machinery/telecomms/logbrowser.dm +++ b/code/game/machinery/telecomms/logbrowser.dm @@ -208,8 +208,9 @@ A.icon_state = "4" A.anchored = 1 qdel(src) - src.updateUsrDialog() - return + updateUsrDialog() + return + return ..() emag_act(user as mob) if(!emagged) diff --git a/code/game/machinery/telecomms/machine_interactions.dm b/code/game/machinery/telecomms/machine_interactions.dm index 16113f5bcfe..3ce5c316ba6 100644 --- a/code/game/machinery/telecomms/machine_interactions.dm +++ b/code/game/machinery/telecomms/machine_interactions.dm @@ -23,6 +23,7 @@ to_chat(user, "You unfasten the bolts.") playsound(src.loc, P.usesound, 50, 1) construct_op++ + return if(1) if(istype(P, /obj/item/screwdriver)) to_chat(user, "You fasten the bolts.") @@ -32,6 +33,7 @@ to_chat(user, "You dislodge the external plating.") playsound(src.loc, P.usesound, 75, 1) construct_op++ + return if(2) if(istype(P, /obj/item/wrench)) to_chat(user, "You secure the external plating.") @@ -44,6 +46,7 @@ var/obj/item/stack/cable_coil/A = new /obj/item/stack/cable_coil( user.loc ) A.amount = 5 stat |= BROKEN // the machine's been borked! + return if(3) if(istype(P, /obj/item/stack/cable_coil)) var/obj/item/stack/cable_coil/A = P @@ -56,6 +59,7 @@ qdel(A) construct_op-- stat &= ~BROKEN // the machine's not borked anymore! + return if(istype(P, /obj/item/crowbar)) to_chat(user, "You begin prying out the circuit board other components...") playsound(src.loc, P.usesound, 50, 1) @@ -85,6 +89,8 @@ var/obj/machinery/constructable_frame/machine_frame/F = new F.loc = src.loc qdel(src) + return + return ..() /obj/machinery/telecomms/proc/formatInput(var/label,var/varname, var/input) var/value = vars[varname] diff --git a/code/game/machinery/telecomms/telemonitor.dm b/code/game/machinery/telecomms/telemonitor.dm index 93c8da26253..73a9261feb0 100644 --- a/code/game/machinery/telecomms/telemonitor.dm +++ b/code/game/machinery/telecomms/telemonitor.dm @@ -150,8 +150,9 @@ A.icon_state = "4" A.anchored = 1 qdel(src) - src.updateUsrDialog() - return + updateUsrDialog() + return + return ..() emag_act(user as mob) if(!emagged) diff --git a/code/game/machinery/telecomms/traffic_control.dm b/code/game/machinery/telecomms/traffic_control.dm index d76debd7e34..1fe1490442a 100644 --- a/code/game/machinery/telecomms/traffic_control.dm +++ b/code/game/machinery/telecomms/traffic_control.dm @@ -13,10 +13,9 @@ /obj/machinery/computer/telecomms/traffic/attackby(obj/item/I, mob/user) if(ismultitool(I)) unlocked = !unlocked - to_chat(user, "This computer is now [unlocked ? "Unlocked" : "Locked"]. \ -Reopen the UI to see the difference.") + to_chat(user, "This computer is now [unlocked ? "Unlocked" : "Locked"]. Reopen the UI to see the difference.") return - . = ..() + return ..() /obj/machinery/computer/telecomms/traffic/attack_hand(mob/user) interact(user) @@ -26,7 +25,7 @@ Reopen the UI to see the difference.") return 0 if(GLOB.nttc_config.valid_languages.len == 1) - GLOB.nttc_config.update_languages() // this is silly but it has to be done because NTTC inits before languages do + GLOB.nttc_config.update_languages() // this is silly but it has to be done because NTTC inits before languages do var/datum/asset/assets = get_asset_datum(/datum/asset/simple/nttc) assets.send(user) diff --git a/code/game/machinery/washing_machine.dm b/code/game/machinery/washing_machine.dm index e1288a7b53d..1478016abba 100644 --- a/code/game/machinery/washing_machine.dm +++ b/code/game/machinery/washing_machine.dm @@ -208,10 +208,11 @@ user.drop_item() crayon = W crayon.loc = src + update_icon() else - ..() + return ..() else - ..() + return ..() else if(istype(W,/obj/item/grab)) if( (state == 1) && hacked) var/obj/item/grab/G = W @@ -219,8 +220,9 @@ G.affecting.loc = src qdel(G) state = 3 + update_icon() else - ..() + return ..() else if(istype(W,/obj/item/stack/sheet/hairlesshide) || \ istype(W,/obj/item/clothing/under) || \ istype(W,/obj/item/clothing/mask) || \ @@ -283,9 +285,9 @@ to_chat(user, "You can't put the item in right now.") else to_chat(user, "The washing machine is full.") + update_icon() else - ..() - update_icon() + return ..() /obj/machinery/washing_machine/attack_hand(mob/user as mob) switch(state) diff --git a/code/game/mecha/mecha_parts.dm b/code/game/mecha/mecha_parts.dm index 75b9fc6b1b8..6aff10eb423 100644 --- a/code/game/mecha/mecha_parts.dm +++ b/code/game/mecha/mecha_parts.dm @@ -23,7 +23,7 @@ /obj/item/mecha_parts/chassis/attackby(obj/item/W, mob/user, params) if(!construct || !construct.action(W, user)) - ..() + return ..() /obj/item/mecha_parts/chassis/attack_hand() return diff --git a/code/game/mecha/mecha_wreckage.dm b/code/game/mecha/mecha_wreckage.dm index 60605045b22..ebda1140c4b 100644 --- a/code/game/mecha/mecha_wreckage.dm +++ b/code/game/mecha/mecha_wreckage.dm @@ -76,8 +76,7 @@ else to_chat(user, "You don't see anything that can be pried with [W].") else - ..() - return + return ..() /obj/effect/decal/mecha_wreckage/gygax diff --git a/code/game/objects/effects/decals/contraband.dm b/code/game/objects/effects/decals/contraband.dm index 50d0a8f690e..88821ae34c6 100644 --- a/code/game/objects/effects/decals/contraband.dm +++ b/code/game/objects/effects/decals/contraband.dm @@ -94,6 +94,8 @@ else to_chat(user, "You carefully remove the poster from the wall.") roll_and_drop(user.loc) + return + return ..() /obj/structure/sign/poster/attack_hand(mob/user) if(ruined) diff --git a/code/game/objects/items/bodybag.dm b/code/game/objects/items/bodybag.dm index 01f8f2f2057..e68251f09bd 100644 --- a/code/game/objects/items/bodybag.dm +++ b/code/game/objects/items/bodybag.dm @@ -39,13 +39,13 @@ src.overlays += image(src.icon, "bodybag_label") else src.name = "body bag" - //..() //Doesn't need to run the parent. Since when can fucking bodybags be welded shut? -Agouri return - else if(istype(W, /obj/item/wirecutters)) + if(istype(W, /obj/item/wirecutters)) to_chat(user, "You cut the tag off the bodybag") src.name = "body bag" src.overlays.Cut() return + return ..() /obj/structure/closet/body_bag/close() diff --git a/code/game/objects/items/candle.dm b/code/game/objects/items/candle.dm index 6ef0338dd37..7b6d3612351 100644 --- a/code/game/objects/items/candle.dm +++ b/code/game/objects/items/candle.dm @@ -32,23 +32,27 @@ /obj/item/candle/attackby(obj/item/W, mob/user, params) - ..() if(istype(W, /obj/item/weldingtool)) var/obj/item/weldingtool/WT = W if(WT.isOn()) //Badasses dont get blinded by lighting their candle with a welding tool light("[user] casually lights [src] with [WT], what a badass.") - else if(istype(W, /obj/item/lighter)) + return + if(istype(W, /obj/item/lighter)) var/obj/item/lighter/L = W if(L.lit) light("After some fiddling, [user] manages to light [src] with [L].") - else if(istype(W, /obj/item/match)) + return + if(istype(W, /obj/item/match)) var/obj/item/match/M = W if(M.lit) light("[user] lights [src] with [M]") - else if(istype(W, /obj/item/candle)) + return + if(istype(W, /obj/item/candle)) var/obj/item/candle/C = W if(C.lit) light("[user] tilts [C] and lights [src] with it.") + return + return ..() /obj/item/candle/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume, global_overlay = TRUE) diff --git a/code/game/objects/items/flag.dm b/code/game/objects/items/flag.dm index 81ea26c2cf9..d0118d815fb 100644 --- a/code/game/objects/items/flag.dm +++ b/code/game/objects/items/flag.dm @@ -11,7 +11,7 @@ var/rolled = FALSE /obj/item/flag/attackby(obj/item/W, mob/user, params) - ..() + . = ..() if(is_hot(W) && !(resistance_flags & ON_FIRE)) user.visible_message("[user] lights [src] with [W].", "You light [src] with [W].", "You hear a low whoosh.") fire_act() @@ -251,7 +251,7 @@ boobytrap = null trapper = null else - ..() + return ..() /obj/item/flag/chameleon/attackby(obj/item/W, mob/user, params) if(is_hot(W) && !(resistance_flags & ON_FIRE) && boobytrap && trapper) @@ -260,7 +260,7 @@ message_admins("[key_name_admin(user)] has lit the [src] trapped with [boobytrap] by [key_name_admin(trapper)] at [A.name] (JMP).") log_game("[key_name_admin(user)] has lit the [src] trapped with [boobytrap] by [key_name_admin(trapper)] at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z]).") investigate_log("[key_name_admin(user)] has lit the [src] trapped with [boobytrap] by [key_name_admin(trapper)] at [A.name] ([bombturf.x],[bombturf.y],[bombturf.z]).", INVESTIGATE_BOMB) - ..() + return ..() /obj/item/flag/chameleon/burn() if(boobytrap) diff --git a/code/game/objects/items/mountable_frames/apc_frame.dm b/code/game/objects/items/mountable_frames/apc_frame.dm index fbdab5584f1..f6707775fb2 100644 --- a/code/game/objects/items/mountable_frames/apc_frame.dm +++ b/code/game/objects/items/mountable_frames/apc_frame.dm @@ -6,23 +6,26 @@ mount_reqs = list("simfloor", "nospace") /obj/item/mounted/frame/apc_frame/try_build(turf/on_wall, mob/user) - if(..()) - var/turf/turf_loc = get_turf(user) - var/area/area_loc = turf_loc.loc - if(area_loc.get_apc()) - to_chat(user, "This area already has an APC.") - return //only one APC per area - for(var/obj/machinery/power/terminal/T in turf_loc) - if(T.master) - to_chat(user, "There is another network terminal here.") - return - else - var/obj/item/stack/cable_coil/C = new /obj/item/stack/cable_coil(turf_loc) - C.amount = 10 - to_chat(user, "You cut the cables and disassemble the unused power terminal.") - qdel(T) - return 1 - return + if(!..()) + return + var/turf/T = get_turf(user) + var/area/A = get_area(T) + if(A.get_apc()) + to_chat(user, "This area already has an APC!") + return //only one APC per area + if(!A.requires_power) + to_chat(user, "You cannot place [src] in this area!") + return //can't place apcs in areas with no power requirement + for(var/obj/machinery/power/terminal/E in T) + if(E.master) + to_chat(user, "There is another network terminal here!") + return + else + var/obj/item/stack/cable_coil/C = new /obj/item/stack/cable_coil(T) + C.amount = 10 + to_chat(user, "You cut the cables and disassemble the unused power terminal.") + qdel(E) + return TRUE /obj/item/mounted/frame/apc_frame/do_build(turf/on_wall, mob/user) new /obj/machinery/power/apc(get_turf(src), get_dir(user, on_wall), 1) diff --git a/code/game/objects/structures/barsign.dm b/code/game/objects/structures/barsign.dm index 58a26d2b0da..604d80bb7a4 100644 --- a/code/game/objects/structures/barsign.dm +++ b/code/game/objects/structures/barsign.dm @@ -74,9 +74,6 @@ /obj/structure/sign/barsign/attackby(var/obj/item/I, var/mob/user) - if(!allowed(user)) - to_chat(user, "Access denied.") - return if( istype(I, /obj/item/screwdriver)) if(!panel_open) to_chat(user, "You open the maintenance panel.") @@ -106,6 +103,8 @@ broken = 0 else to_chat(user, "You need at least two lengths of cable!") + else + return ..() diff --git a/code/game/objects/structures/coathanger.dm b/code/game/objects/structures/coathanger.dm index 36b33965cc1..5a0a47150ca 100644 --- a/code/game/objects/structures/coathanger.dm +++ b/code/game/objects/structures/coathanger.dm @@ -25,7 +25,6 @@ coat.loc = src update_icon() else - to_chat(user, "You cannot hang [W] on [src]") return ..() /obj/structure/coatrack/CanPass(atom/movable/mover, turf/target, height=0) diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm index a0f578b7061..b58aecc7c78 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -213,6 +213,7 @@ else to_chat(user, "Out of charges.") return + return if(opened) if(istype(W, /obj/item/grab)) @@ -258,8 +259,10 @@ update_icon() for(var/mob/M in viewers(src)) M.show_message("[src] has been [welded?"welded shut":"unwelded"] by [user.name].", 3, "You hear welding.", 2) - else + else if(user.a_intent != INTENT_HARM) attack_hand(user) + else + return ..() /obj/structure/closet/MouseDrop_T(atom/movable/O, mob/user) ..() diff --git a/code/game/objects/structures/crates_lockers/closets/secure/personal.dm b/code/game/objects/structures/crates_lockers/closets/secure/personal.dm index 39ccdd14d5d..d8bc213f1cf 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/personal.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/personal.dm @@ -86,4 +86,4 @@ else if((istype(W, /obj/item/card/emag) || istype(W, /obj/item/melee/energy/blade)) && !broken) emag_act(user) else - to_chat(user, "Access Denied") + return ..() diff --git a/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm b/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm index dd8b1a4c08a..3ab0d94317b 100644 --- a/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm +++ b/code/game/objects/structures/crates_lockers/closets/secure/secure_closets.dm @@ -86,9 +86,11 @@ else if((istype(W, /obj/item/card/emag)||istype(W, /obj/item/melee/energy/blade)) && !broken) emag_act(user) else if(istype(W,/obj/item/stack/packageWrap) || istype(W,/obj/item/weldingtool)) - return ..(W,user) - else + return ..(W, user) + else if(user.a_intent != INTENT_HARM) togglelock(user) + else + return ..() /obj/structure/closet/secure_closet/emag_act(mob/user) if(!broken) diff --git a/code/game/objects/structures/crates_lockers/crates.dm b/code/game/objects/structures/crates_lockers/crates.dm index 1490385fb9a..1b116678151 100644 --- a/code/game/objects/structures/crates_lockers/crates.dm +++ b/code/game/objects/structures/crates_lockers/crates.dm @@ -176,7 +176,10 @@ playsound(loc, W.usesound, 100, 1) rigged = FALSE return - else return attack_hand(user) + else if(user.a_intent != INTENT_HARM) + attack_hand(user) + else + return ..() /obj/structure/closet/singularity_act() dump_contents() @@ -464,7 +467,7 @@ "You have secured [src]'s floor casters.") anchored = TRUE else - ..() + return ..() /obj/structure/closet/crate/radiation desc = "A crate with a radiation sign on it." diff --git a/code/game/objects/structures/crates_lockers/largecrate.dm b/code/game/objects/structures/crates_lockers/largecrate.dm index f54a0459b16..7b30dee1f73 100644 --- a/code/game/objects/structures/crates_lockers/largecrate.dm +++ b/code/game/objects/structures/crates_lockers/largecrate.dm @@ -45,8 +45,10 @@ "You pry open \the [src].", \ "You hear splitting wood.") qdel(src) + else if(user.a_intent != INTENT_HARM) + attack_hand(user) else - return attack_hand(user) + return ..() /obj/structure/largecrate/mule @@ -56,7 +58,7 @@ /obj/structure/largecrate/lisa/attackby(obj/item/W as obj, mob/user as mob) //ugly but oh well if(istype(W, /obj/item/crowbar)) new /mob/living/simple_animal/pet/dog/corgi/Lisa(loc) - ..() + return ..() /obj/structure/largecrate/cow name = "cow crate" @@ -65,7 +67,7 @@ /obj/structure/largecrate/cow/attackby(obj/item/W as obj, mob/user as mob, params) if(istype(W, /obj/item/crowbar)) new /mob/living/simple_animal/cow(loc) - ..() + return ..() /obj/structure/largecrate/goat name = "goat crate" @@ -74,7 +76,7 @@ /obj/structure/largecrate/goat/attackby(obj/item/W as obj, mob/user as mob, params) if(istype(W, /obj/item/crowbar)) new /mob/living/simple_animal/hostile/retaliate/goat(loc) - ..() + return ..() /obj/structure/largecrate/chick name = "chicken crate" @@ -85,7 +87,7 @@ var/num = rand(4, 6) for(var/i = 0, i < num, i++) new /mob/living/simple_animal/chick(loc) - ..() + return ..() /obj/structure/largecrate/cat name = "cat crate" @@ -94,4 +96,4 @@ /obj/structure/largecrate/cat/attackby(obj/item/W as obj, mob/user as mob, params) if(istype(W, /obj/item/crowbar)) new /mob/living/simple_animal/pet/cat(loc) - ..() \ No newline at end of file + return ..() \ No newline at end of file diff --git a/code/game/objects/structures/curtains.dm b/code/game/objects/structures/curtains.dm index b9f4e828892..7a3f787b91e 100644 --- a/code/game/objects/structures/curtains.dm +++ b/code/game/objects/structures/curtains.dm @@ -68,7 +68,7 @@ to_chat(user, "You cut apart [src].") deconstruct() else - . = ..() + return ..() /obj/structure/curtain/deconstruct(disassembled = TRUE) new /obj/item/stack/sheet/cloth(loc, 2) diff --git a/code/game/objects/structures/electricchair.dm b/code/game/objects/structures/electricchair.dm index b8f0d6c5cb5..995e86b5dfb 100644 --- a/code/game/objects/structures/electricchair.dm +++ b/code/game/objects/structures/electricchair.dm @@ -31,6 +31,7 @@ part = null qdel(src) return + return ..() /obj/structure/chair/e_chair/verb/activate_e_chair() set name = "Activate Electric Chair" diff --git a/code/game/objects/structures/extinguisher.dm b/code/game/objects/structures/extinguisher.dm index e7f6cce19df..0a8be5854ab 100644 --- a/code/game/objects/structures/extinguisher.dm +++ b/code/game/objects/structures/extinguisher.dm @@ -76,6 +76,7 @@ else playsound(loc, 'sound/machines/click.ogg', 15, TRUE, -3) opened = !opened + update_icon() else if(istype(O, /obj/item/weldingtool)) if(has_extinguisher) to_chat(user, "You need to remove the extinguisher before deconstructing the cabinet!") @@ -95,10 +96,13 @@ "You cut [src] apart with [WT].", "You hear welding.") deconstruct(TRUE) - else + else if(user.a_intent != INTENT_HARM) playsound(loc, 'sound/machines/click.ogg', 15, TRUE, -3) opened = !opened - update_icon() + update_icon() + else + return ..() + /obj/structure/extinguisher_cabinet/attack_hand(mob/user) if(isrobot(user) || isalien(user)) diff --git a/code/game/objects/structures/fluff.dm b/code/game/objects/structures/fluff.dm index a6a4f699314..c81b350f745 100644 --- a/code/game/objects/structures/fluff.dm +++ b/code/game/objects/structures/fluff.dm @@ -20,7 +20,7 @@ new/obj/item/stack/sheet/metal(drop_location()) qdel(src) return - ..() + return ..() /obj/structure/fluff/empty_terrarium //Empty terrariums are created when a preserved terrarium in a lavaland seed vault is activated. name = "empty terrarium" diff --git a/code/game/objects/structures/girders.dm b/code/game/objects/structures/girders.dm index 71ea97cb92f..de1d712b0a4 100644 --- a/code/game/objects/structures/girders.dm +++ b/code/game/objects/structures/girders.dm @@ -451,6 +451,8 @@ var/turf/T = get_turf(src) T.ChangeTurf(/turf/simulated/wall/cult) qdel(src) + else + return ..() /obj/structure/girder/cult/narsie_act() return diff --git a/code/game/objects/structures/kitchen_spike.dm b/code/game/objects/structures/kitchen_spike.dm index 9eb8f8b3184..6281d589c70 100644 --- a/code/game/objects/structures/kitchen_spike.dm +++ b/code/game/objects/structures/kitchen_spike.dm @@ -27,6 +27,9 @@ new /obj/structure/kitchenspike(loc) add_fingerprint(user) qdel(src) + return + else + return ..() /obj/structure/kitchenspike @@ -62,16 +65,15 @@ return if(has_buckled_mobs()) to_chat(user, "The spike already has something on it, finish collecting its meat first!") - else - if(isliving(G.affecting)) - if(!has_buckled_mobs()) - if(do_mob(user, src, 120)) - if(spike(G.affecting)) - G.affecting.visible_message("[user] slams [G.affecting] onto the meat spike!", "[user] slams you onto the meat spike!", "You hear a squishy wet noise.") - qdel(G) - return - to_chat(user, "You can't use that on the spike!") return + if(isliving(G.affecting)) + if(!has_buckled_mobs()) + if(do_mob(user, src, 120)) + if(spike(G.affecting)) + G.affecting.visible_message("[user] slams [G.affecting] onto the meat spike!", "[user] slams you onto the meat spike!", "You hear a squishy wet noise.") + qdel(G) + return + return ..() /obj/structure/kitchenspike/proc/spike(mob/living/victim) diff --git a/code/game/objects/structures/misc.dm b/code/game/objects/structures/misc.dm index 01fab63dd57..b6da99bf6dc 100644 --- a/code/game/objects/structures/misc.dm +++ b/code/game/objects/structures/misc.dm @@ -11,9 +11,6 @@ anchored = 1 density = 1 - attackby(obj/item/W as obj, mob/user as mob, params) - return attack_hand(user) - attack_hand(mob/user as mob) to_chat(user, "Civilians: NT is recruiting! Please head SOUTH to the NT Recruitment office to join the station's crew!") @@ -26,11 +23,6 @@ anchored = 1 density = 0 - attackby(obj/item/W as obj, mob/user as mob, params) - - return attack_hand(user) - - attack_hand(mob/user as mob) diff --git a/code/game/objects/structures/mop_bucket.dm b/code/game/objects/structures/mop_bucket.dm index f11193acb2f..05c6a66c733 100644 --- a/code/game/objects/structures/mop_bucket.dm +++ b/code/game/objects/structures/mop_bucket.dm @@ -32,4 +32,6 @@ to_chat(user, "You wet the mop") playsound(src.loc, 'sound/effects/slosh.ogg', 25, 1) if(src.reagents.total_volume < 1) - to_chat(user, "Out of water!") \ No newline at end of file + to_chat(user, "Out of water!") + return + return ..() \ No newline at end of file diff --git a/code/game/objects/structures/morgue.dm b/code/game/objects/structures/morgue.dm index 1b73feef730..b847657e5f5 100644 --- a/code/game/objects/structures/morgue.dm +++ b/code/game/objects/structures/morgue.dm @@ -133,8 +133,9 @@ else name = "Morgue" overlays.Cut() - add_fingerprint(user) - return + add_fingerprint(user) + return + return ..() /obj/structure/morgue/relaymove(mob/user as mob) if(user.stat) @@ -325,8 +326,9 @@ name = text("Crematorium- '[]'", t) else name = "Crematorium" - add_fingerprint(user) - return + add_fingerprint(user) + return + return ..() /obj/structure/crematorium/relaymove(mob/user as mob) if(user.stat || locked) diff --git a/code/game/objects/structures/noticeboard.dm b/code/game/objects/structures/noticeboard.dm index 381b904d4ae..aa6528ee118 100644 --- a/code/game/objects/structures/noticeboard.dm +++ b/code/game/objects/structures/noticeboard.dm @@ -30,6 +30,8 @@ to_chat(user, "You pin the paper to the noticeboard.") else to_chat(user, "You reach to pin your paper to the board but hesitate. You are certain your paper will not be seen among the many others already attached.") + return + return ..() /obj/structure/noticeboard/attack_hand(user as mob) var/dat = "Noticeboard
" diff --git a/code/game/objects/structures/plasticflaps.dm b/code/game/objects/structures/plasticflaps.dm index 7449112993d..2ce0918ac16 100644 --- a/code/game/objects/structures/plasticflaps.dm +++ b/code/game/objects/structures/plasticflaps.dm @@ -53,7 +53,7 @@ P.add_fingerprint(user) qdel(src) else - . = ..() + return ..() /obj/structure/plasticflaps/CanPass(atom/A, turf/T) if(istype(A) && A.checkpass(PASSGLASS)) diff --git a/code/game/objects/structures/reflector.dm b/code/game/objects/structures/reflector.dm index 9e50af57473..e3ebb0579a4 100644 --- a/code/game/objects/structures/reflector.dm +++ b/code/game/objects/structures/reflector.dm @@ -46,6 +46,7 @@ to_chat(user, "You dismantle [src].") new /obj/item/stack/sheet/metal(src.loc, 5) qdel(src) + return if(istype(W, /obj/item/weldingtool)) var/obj/item/weldingtool/WT = W if(!anchored) @@ -70,6 +71,7 @@ return anchored = 0 to_chat(user, "You cut [src] free from the floor.") + return //Finishing the frame if(istype(W,/obj/item/stack/sheet)) if(finished) @@ -96,6 +98,8 @@ S.use(1) new /obj/structure/reflector/box (src.loc) qdel(src) + return + return ..() /obj/structure/reflector/proc/get_reflection(srcdir,pdir) return 0 diff --git a/code/game/objects/structures/signs.dm b/code/game/objects/structures/signs.dm index 8d323fececb..707d30dbcfa 100644 --- a/code/game/objects/structures/signs.dm +++ b/code/game/objects/structures/signs.dm @@ -28,7 +28,8 @@ //S.icon = I.Scale(24, 24) S.sign_state = icon_state qdel(src) - else ..() + else + return ..() /obj/item/sign name = "sign" @@ -62,7 +63,8 @@ S.icon_state = sign_state to_chat(user, "You fasten \the [S] with your [tool].") qdel(src) - else ..() + else + return ..() /obj/structure/sign/double/map name = "station map" diff --git a/code/game/objects/structures/statues.dm b/code/game/objects/structures/statues.dm index 44a5cbc665b..6af52d6999b 100644 --- a/code/game/objects/structures/statues.dm +++ b/code/game/objects/structures/statues.dm @@ -80,7 +80,7 @@ /obj/structure/statue/uranium/attackby(obj/item/W, mob/user, params) radiate() - ..() + return ..() /obj/structure/statue/uranium/Bumped(atom/user) radiate() @@ -137,7 +137,7 @@ investigate_log("[key_name(user)] ignited a plasma statue at [COORD(loc)]", "atmos") ignite(is_hot(W)) return - ..() + return ..() /obj/structure/statue/plasma/proc/PlasmaBurn() atmos_spawn_air(SPAWN_HEAT | SPAWN_TOXINS, 160) @@ -230,7 +230,7 @@ /obj/structure/statue/bananium/attackby(obj/item/W, mob/user, params) honk() - ..() + return ..() /obj/structure/statue/bananium/attack_hand(mob/user) honk() diff --git a/code/game/objects/structures/stool_bed_chair_nest/bed.dm b/code/game/objects/structures/stool_bed_chair_nest/bed.dm index 380ddf2e6c0..23802cf56a5 100644 --- a/code/game/objects/structures/stool_bed_chair_nest/bed.dm +++ b/code/game/objects/structures/stool_bed_chair_nest/bed.dm @@ -78,6 +78,8 @@ user.visible_message("[user] collapses \the [name].", "You collapse \the [name].") new/obj/item/roller(get_turf(src)) qdel(src) + else + return ..() /obj/structure/bed/roller/post_buckle_mob(mob/living/M) density = TRUE diff --git a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm index 50b62451c74..2d8c44c2a48 100644 --- a/code/game/objects/structures/tables_racks.dm +++ b/code/game/objects/structures/tables_racks.dm @@ -542,7 +542,7 @@ to_chat(user, "You weaken the table.") deconstruction_ready = TRUE else - . = ..() + return ..() /obj/structure/table/reinforced/brass name = "brass table" @@ -753,7 +753,7 @@ new /obj/item/stack/sheet/metal(user.loc) qdel(src) else - . = ..() + return ..() /obj/item/rack_parts/attack_self(mob/user) if(building) diff --git a/code/game/objects/structures/tank_dispenser.dm b/code/game/objects/structures/tank_dispenser.dm index 0a23f204e22..6a16305a299 100644 --- a/code/game/objects/structures/tank_dispenser.dm +++ b/code/game/objects/structures/tank_dispenser.dm @@ -63,6 +63,7 @@ else to_chat(user, "[src] is full.") SSnanoui.update_uis(src) + return if(istype(I, /obj/item/tank/plasma)) if(plasmatanks < 10) user.drop_item() @@ -74,6 +75,7 @@ else to_chat(user, "[src] is full.") SSnanoui.update_uis(src) + return if(istype(I, /obj/item/wrench)) if(anchored) to_chat(user, "You lean down and unwrench [src].") @@ -81,6 +83,8 @@ else to_chat(user, "You wrench [src] into place.") anchored = 1 + return + return ..() /obj/structure/dispenser/Topic(href, href_list) if(..()) diff --git a/code/game/objects/structures/target_stake.dm b/code/game/objects/structures/target_stake.dm index 591157e8bd6..79e9c6cfab1 100644 --- a/code/game/objects/structures/target_stake.dm +++ b/code/game/objects/structures/target_stake.dm @@ -24,10 +24,7 @@ /obj/structure/target_stake/attackby(obj/item/W, mob/user, params) // Putting objects on the stake. Most importantly, targets - if(pinned_target) - return // get rid of that pinned target first! - - if(istype(W, /obj/item/target)) + if(istype(W, /obj/item/target) && !pinned_target) density = 0 W.density = 1 user.drop_item(src) @@ -35,6 +32,8 @@ W.layer = 3.1 pinned_target = W to_chat(user, "You slide the target into the stake.") + return + return ..() /obj/structure/target_stake/attack_hand(mob/user) // taking pinned targets off! diff --git a/code/modules/arcade/arcade_base.dm b/code/modules/arcade/arcade_base.dm index 38c034927bc..80d6cad031a 100644 --- a/code/modules/arcade/arcade_base.dm +++ b/code/modules/arcade/arcade_base.dm @@ -76,9 +76,11 @@ var/obj/item/stack/spacecash/C = O if(pay_with_cash(C, user)) tokens += 1 - return + return if(panel_open && component_parts && istype(O, /obj/item/crowbar)) default_deconstruction_crowbar(O) + return + return ..() /obj/machinery/arcade/update_icon() return diff --git a/code/modules/arcade/mob_hunt/battle_computer.dm b/code/modules/arcade/mob_hunt/battle_computer.dm index 4942f25ffbd..0d6e91b60d9 100644 --- a/code/modules/arcade/mob_hunt/battle_computer.dm +++ b/code/modules/arcade/mob_hunt/battle_computer.dm @@ -54,6 +54,8 @@ /obj/machinery/computer/mob_battle_terminal/attackby(obj/item/O, mob/user) if(istype(O, /obj/item/nanomob_card)) insert_card(O, user) + return + return ..() /obj/machinery/computer/mob_battle_terminal/proc/insert_card(obj/item/nanomob_card/new_card, mob/user) if(!new_card) @@ -287,6 +289,8 @@ /obj/machinery/computer/mob_healer_terminal/attackby(obj/item/O, mob/user) if(istype(O, /obj/item/nanomob_card)) heal_card(O, user) + return + return ..() /obj/machinery/computer/mob_healer_terminal/proc/heal_card(obj/item/nanomob_card/patient, mob/user) if(!patient) diff --git a/code/modules/arcade/prize_counter.dm b/code/modules/arcade/prize_counter.dm index d8666c36617..ca1a06d2a65 100644 --- a/code/modules/arcade/prize_counter.dm +++ b/code/modules/arcade/prize_counter.dm @@ -53,6 +53,8 @@ if(tickets) //save the tickets! print_tickets() default_deconstruction_crowbar(O) + return + return ..() /obj/machinery/prize_counter/attack_hand(mob/user as mob) if(..()) diff --git a/code/modules/assembly/assembly.dm b/code/modules/assembly/assembly.dm index d8ee727f2f8..d94e3243013 100644 --- a/code/modules/assembly/assembly.dm +++ b/code/modules/assembly/assembly.dm @@ -115,14 +115,14 @@ var/obj/item/assembly/A = W if(!A.secured && !secured) attach_assembly(A, user) - return + return if(isscrewdriver(W)) if(toggle_secure()) to_chat(user, "[src] is ready!") else to_chat(user, "[src] can now be attached!") return - ..() + return ..() /obj/item/assembly/process() STOP_PROCESSING(SSobj, src) diff --git a/code/modules/awaymissions/gateway.dm b/code/modules/awaymissions/gateway.dm index daa9788abcd..8bacd9a839c 100644 --- a/code/modules/awaymissions/gateway.dm +++ b/code/modules/awaymissions/gateway.dm @@ -162,6 +162,7 @@ var/obj/machinery/gateway/centerstation/the_gateway = null if(istype(W,/obj/item/multitool)) to_chat(user, "The gate is already calibrated, there is no work for you to do here.") return + return ..() /////////////////////////////////////Away//////////////////////// @@ -290,4 +291,5 @@ var/obj/machinery/gateway/centerstation/the_gateway = null else to_chat(user, "Recalibration successful!: This gate's systems have been fine tuned. Travel to this gate will now be on target.") calibrated = 1 - return + return + return ..() \ No newline at end of file diff --git a/code/modules/awaymissions/mission_code/UO71-terrorspiders.dm b/code/modules/awaymissions/mission_code/UO71-terrorspiders.dm index 7d045f0afcb..63dfd3f5e4d 100644 --- a/code/modules/awaymissions/mission_code/UO71-terrorspiders.dm +++ b/code/modules/awaymissions/mission_code/UO71-terrorspiders.dm @@ -256,4 +256,5 @@ to_chat(user, "Activating the machine has unlocked a way forward!") else to_chat(user, "Your ID card already has all the access this machine can give.") - . = 1 + return + return ..() diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index c2c74a8e9f0..a6fe3789aae 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -276,7 +276,7 @@ BLIND // can't see anything to_chat(user, "[src] have already been clipped!") return else - ..() + return ..() /obj/item/clothing/under/proc/set_sensors(mob/user as mob) var/mob/M = user @@ -474,9 +474,9 @@ BLIND // can't see anything update_icon() else to_chat(user, "[src] have already had [p_their()] toes cut open!") - return + return else - ..() + return ..() /obj/item/clothing/shoes/proc/step_action(var/mob/living/carbon/human/H) //squeek squeek SEND_SIGNAL(src, COMSIG_SHOES_STEP_ACTION) diff --git a/code/modules/economy/ATM.dm b/code/modules/economy/ATM.dm index e0dd80a1e6e..eafd038977d 100644 --- a/code/modules/economy/ATM.dm +++ b/code/modules/economy/ATM.dm @@ -105,7 +105,7 @@ log transactions SSnanoui.update_uis(src) C.use(C.amount) else - ..() + return ..() /obj/machinery/atm/attack_hand(mob/user) if(..()) diff --git a/code/modules/economy/EFTPOS.dm b/code/modules/economy/EFTPOS.dm index f3df3027780..98d99e667aa 100644 --- a/code/modules/economy/EFTPOS.dm +++ b/code/modules/economy/EFTPOS.dm @@ -71,7 +71,7 @@ else to_chat(user, "[bicon(src)]Unable to connect to accounts database.") else - ..() + return ..() /obj/item/eftpos/ui_interact(mob/user, ui_key = "main", var/datum/nanoui/ui = null, var/force_open = 1) ui = SSnanoui.try_update_ui(user, src, ui_key, ui, force_open) diff --git a/code/modules/economy/POS.dm b/code/modules/economy/POS.dm index 1164ead6c19..047c1636ece 100644 --- a/code/modules/economy/POS.dm +++ b/code/modules/economy/POS.dm @@ -533,4 +533,5 @@ var/const/POS_HEADER = {" if(credits_held) new /obj/item/stack/spacecash(loc, credits_held) credits_held=0 - ..() + return + return ..() \ No newline at end of file diff --git a/code/modules/food_and_drinks/kitchen_machinery/gibber.dm b/code/modules/food_and_drinks/kitchen_machinery/gibber.dm index edcb85e0d15..2aee35c225d 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/gibber.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/gibber.dm @@ -108,7 +108,9 @@ if(default_unfasten_wrench(user, P)) return - default_deconstruction_crowbar(P) + if(default_deconstruction_crowbar(P)) + return + return ..() /obj/machinery/gibber/MouseDrop_T(mob/target, mob/user) if(user.incapacitated() || !ishuman(user)) diff --git a/code/modules/food_and_drinks/kitchen_machinery/icecream_vat.dm b/code/modules/food_and_drinks/kitchen_machinery/icecream_vat.dm index 274605e554b..345bada5151 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/icecream_vat.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/icecream_vat.dm @@ -50,6 +50,8 @@ I.desc += ". This also has sprinkles." else to_chat(user, "This [I] already has sprinkles.") + return + return ..() /obj/machinery/icemachine/proc/validexchange(reag) diff --git a/code/modules/food_and_drinks/kitchen_machinery/icecream_vat_2.dm b/code/modules/food_and_drinks/kitchen_machinery/icecream_vat_2.dm index d39df221d8d..1554dbb0211 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/icecream_vat_2.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/icecream_vat_2.dm @@ -137,7 +137,7 @@ var/list/ingredients_source = list( R.reagents.clear_reagents() return 1 else - ..() + return ..() /obj/machinery/icecream_vat/proc/add(var/add_type, var/amount) if(add_type <= ingredients.len) diff --git a/code/modules/food_and_drinks/kitchen_machinery/monkeyrecycler.dm b/code/modules/food_and_drinks/kitchen_machinery/monkeyrecycler.dm index 1b8f61bb7bf..22394eaa9f9 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/monkeyrecycler.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/monkeyrecycler.dm @@ -54,7 +54,8 @@ GLOBAL_LIST_EMPTY(monkey_recyclers) power_change() return - default_deconstruction_crowbar(O) + if(default_deconstruction_crowbar(O)) + return if(istype(O, /obj/item/multitool)) if(!panel_open) @@ -76,6 +77,7 @@ GLOBAL_LIST_EMPTY(monkey_recyclers) var/obj/item/multitool/M = O M.buffer = src to_chat(user, "You log [src] in the [M]'s buffer.") + return if(stat != 0) //NOPOWER etc return if(istype(O, /obj/item/grab)) @@ -102,7 +104,8 @@ GLOBAL_LIST_EMPTY(monkey_recyclers) to_chat(user, "The machine only accepts monkeys!") else to_chat(user, "The machine only accepts monkeys!") - return + return + return ..() /obj/machinery/monkey_recycler/attack_hand(mob/user) if(stat != 0) //NOPOWER etc diff --git a/code/modules/hydroponics/gene_modder.dm b/code/modules/hydroponics/gene_modder.dm index 17246d6cba1..d9ab7ddb749 100644 --- a/code/modules/hydroponics/gene_modder.dm +++ b/code/modules/hydroponics/gene_modder.dm @@ -126,7 +126,7 @@ to_chat(user, "You add [I] to the machine.") interact(user) else - ..() + return ..() /obj/machinery/plantgenes/attack_hand(mob/user) diff --git a/code/modules/hydroponics/hydroponics.dm b/code/modules/hydroponics/hydroponics.dm index 6411935596b..620e69e97cb 100644 --- a/code/modules/hydroponics/hydroponics.dm +++ b/code/modules/hydroponics/hydroponics.dm @@ -1023,4 +1023,4 @@ to_chat(user, "You clear up [src]!") qdel(src) else - ..() + return ..() diff --git a/code/modules/library/computers/public.dm b/code/modules/library/computers/public.dm index c0f61d26eff..d0a6272970c 100644 --- a/code/modules/library/computers/public.dm +++ b/code/modules/library/computers/public.dm @@ -10,6 +10,7 @@ if(default_unfasten_wrench(user, W)) power_change() return + return ..() /obj/machinery/computer/library/public/interact(var/mob/user) if(interact_check(user)) diff --git a/code/modules/logic/converter.dm b/code/modules/logic/converter.dm index 76f5fb37d7b..c54e3fe4882 100644 --- a/code/modules/logic/converter.dm +++ b/code/modules/logic/converter.dm @@ -56,7 +56,7 @@ S.toggle_secure() to_chat(user, "You unsecure and detach \the [S] from the I/O connection port.") return - ..() + return ..() /obj/machinery/logic_gate/convert/multitool_menu(var/mob/user, var/obj/item/multitool/P) var/logic_state_string diff --git a/code/modules/logic/logic_base.dm b/code/modules/logic/logic_base.dm index e0e5f1265eb..50aecd79283 100644 --- a/code/modules/logic/logic_base.dm +++ b/code/modules/logic/logic_base.dm @@ -212,6 +212,7 @@ if(panel_open && istype(O, /obj/item/crowbar)) default_deconstruction_crowbar(O) return 1 + return ..() ////////////////////////////////////// // Attack procs // diff --git a/code/modules/mining/laborcamp/laborstacker.dm b/code/modules/mining/laborcamp/laborstacker.dm index 51f22097643..cf2076ecc6f 100644 --- a/code/modules/mining/laborcamp/laborstacker.dm +++ b/code/modules/mining/laborcamp/laborstacker.dm @@ -49,6 +49,7 @@ GLOBAL_LIST(labor_sheet_values) return else to_chat(user, "There's an ID inserted already.") + return return ..() /obj/machinery/mineral/labor_claim_console/attack_hand(mob/user) @@ -154,6 +155,7 @@ GLOBAL_LIST(labor_sheet_values) if(istype(I, /obj/item/stack/sheet) && user.canUnEquip(I)) var/obj/item/stack/sheet/inp = I points += inp.point_value * inp.amount + return return ..() /**********************Point Lookup Console**************************/ @@ -180,5 +182,5 @@ GLOBAL_LIST(labor_sheet_values) to_chat(user, "Collect points by bringing smelted minerals to the Labor Shuttle stacking machine. Reach your quota to earn your release.") else to_chat(user, "Error: Invalid ID") - else - return ..() \ No newline at end of file + return + return ..() \ No newline at end of file diff --git a/code/modules/mining/lavaland/loot/colossus_loot.dm b/code/modules/mining/lavaland/loot/colossus_loot.dm index 5a771aeb1d4..7b321474880 100644 --- a/code/modules/mining/lavaland/loot/colossus_loot.dm +++ b/code/modules/mining/lavaland/loot/colossus_loot.dm @@ -138,7 +138,7 @@ /obj/machinery/anomalous_crystal/attackby(obj/item/I, mob/user, params) ActivationReaction(user,"weapon") - ..() + return ..() /obj/machinery/anomalous_crystal/bullet_act(obj/item/projectile/P, def_zone) ..() diff --git a/code/modules/mining/machine_vending.dm b/code/modules/mining/machine_vending.dm index b6106499eff..3c94d84985f 100644 --- a/code/modules/mining/machine_vending.dm +++ b/code/modules/mining/machine_vending.dm @@ -194,7 +194,7 @@ return else RedeemVoucher(I, user) - return + return if(istype(I,/obj/item/card/id)) if(!powered()) return @@ -206,8 +206,8 @@ C.forceMove(src) inserted_id = C interact(user) - return - ..() + return + return ..() /obj/machinery/mineral/equipment_vendor/proc/RedeemVoucher(obj/item/mining_voucher/voucher, mob/redeemer) var/items = list("Survival Capsule and Explorer's Webbing", "Resonator Kit", "Minebot Kit", "Extraction and Rescue Kit", "Crusher Kit", "Mining Conscription Kit") diff --git a/code/modules/mining/satchel_ore_boxdm.dm b/code/modules/mining/satchel_ore_boxdm.dm index 77b270a7f76..ec7afa6e58a 100644 --- a/code/modules/mining/satchel_ore_boxdm.dm +++ b/code/modules/mining/satchel_ore_boxdm.dm @@ -10,10 +10,7 @@ pressure_resistance = 5 * ONE_ATMOSPHERE /obj/structure/ore_box/attackby(obj/item/W, mob/user, params) - if(istype(W, /obj/item/t_scanner/adv_mining_scanner)) - attack_hand(user) - return - else if(istype(W, /obj/item/stack/ore)) + if(istype(W, /obj/item/stack/ore)) if(!user.drop_item()) return W.forceMove(src) @@ -30,6 +27,8 @@ if(do_after(user, 50 * C.toolspeed, target = src)) user.visible_message("[user] pries [src] apart.", "You pry apart [src].", "You hear splitting wood.") deconstruct(TRUE, user) + else + return ..() /obj/structure/ore_box/attack_hand(mob/user) if(Adjacent(user)) diff --git a/code/modules/paperwork/filingcabinet.dm b/code/modules/paperwork/filingcabinet.dm index f6e52eb2fc2..7d6144bee1b 100644 --- a/code/modules/paperwork/filingcabinet.dm +++ b/code/modules/paperwork/filingcabinet.dm @@ -50,8 +50,10 @@ playsound(loc, P.usesound, 50, 1) anchored = !anchored to_chat(user, "You [anchored ? "wrench" : "unwrench"] \the [src].") + else if(user.a_intent != INTENT_HARM) + to_chat(user, "You can't put [P] in [src]!") else - to_chat(user, "You can't put [P] in [src]!") + return ..() /obj/structure/filingcabinet/deconstruct(disassembled = TRUE) if(!(flags & NODECONSTRUCT)) diff --git a/code/modules/paperwork/photocopier.dm b/code/modules/paperwork/photocopier.dm index f1487e2e7d2..5a09e1a55a9 100644 --- a/code/modules/paperwork/photocopier.dm +++ b/code/modules/paperwork/photocopier.dm @@ -182,6 +182,8 @@ copyitem.forceMove(get_turf(src)) copyitem = null updateUsrDialog() + else + return ..() /obj/machinery/photocopier/proc/copy(var/obj/item/paper/copy) var/obj/item/paper/c = new /obj/item/paper (loc) diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm index 54ef828936f..23b51fc899b 100644 --- a/code/modules/power/apc.dm +++ b/code/modules/power/apc.dm @@ -149,7 +149,7 @@ terminal.connect_to_network() /obj/machinery/power/apc/New(turf/loc, ndir, building = 0) - if (!armor) + if(!armor) armor = list("melee" = 20, "bullet" = 20, "laser" = 10, "energy" = 100, "bomb" = 30, "bio" = 100, "rad" = 100, "fire" = 90, "acid" = 50) ..() GLOB.apcs += src @@ -435,227 +435,242 @@ //attack with an item - open/close cover, insert cell, or (un)lock interface /obj/machinery/power/apc/attackby(obj/item/W, mob/living/user, params) - if(istype(user, /mob/living/silicon) && get_dist(src,user)>1) + if(issilicon(user) && get_dist(src,user)>1) return src.attack_hand(user) - if(istype(W, /obj/item/crowbar) && opened) - if(has_electronics==1) - if(terminal) - to_chat(user, "Disconnect wires first.") + if(istype(W, /obj/item/crowbar)) //Using crowbar + if(opened) // a) on open apc + if(has_electronics==1) + if(terminal) + to_chat(user, "Disconnect the wires first!") + return + playsound(src.loc, W.usesound, 50, 1) + to_chat(user, "You are trying to remove the power control board..." ) + if(do_after(user, 50*W.toolspeed, target = src)) + if(has_electronics==1) + has_electronics = 0 + if(stat & BROKEN) + user.visible_message(\ + "[user.name] has broken the power control board inside [src.name]!", + "You break the charred power control board and remove the remains.", + "You hear a crack.") + return + //SSticker.mode:apcs-- //XSI said no and I agreed. -rastaf0 + else if(emagged) // We emag board, not APC's frame + emagged = FALSE + user.visible_message( + "[user.name] has discarded emaged power control board from [src.name]!", + "You discarded shorten board.") + return + else if(malfhack) // AI hacks board, not APC's frame + user.visible_message(\ + "[user.name] has discarded strangely programmed power control board from [src.name]!", + "You discarded strangely programmed board.") + malfai = null + malfhack = 0 + return + else + user.visible_message(\ + "[user.name] has removed the power control board from [src.name]!", + "You remove the power control board.") + new /obj/item/apc_electronics(loc) + return + else if(opened!=2) //cover isn't removed + opened = 0 + coverlocked = TRUE //closing cover relocks it + update_icon() + return + else if(!(stat & BROKEN)) // b) on closed and not broken APC + if(coverlocked && !(stat & MAINT)) // locked... + to_chat(user, "The cover is locked and cannot be opened!") + return + else if(panel_open) // wires are exposed + to_chat(user, "Exposed wires prevents you from opening it!") + return + else + opened = 1 + update_icon() return - playsound(src.loc, W.usesound, 50, 1) - to_chat(user, "You are trying to remove the power control board...")//lpeters - fixed grammar issues - if(do_after(user, 50 * W.toolspeed, target = src)) - if(has_electronics==1) - has_electronics = 0 - if((stat & BROKEN) || malfhack) - user.visible_message(\ - "[user.name] has broken the power control board inside [src.name]!",\ - "You broke the charred power control board and remove the remains.", - "You hear a crack!") - //ticker.mode:apcs-- //XSI said no and I agreed. -rastaf0 - else - user.visible_message(\ - "[user.name] has removed the power control board from [src.name]!",\ - "You remove the power control board.") - new /obj/item/apc_electronics(loc) - else if(opened!=2) //cover isn't removed - opened = 0 - update_icon() - else if(istype(W, /obj/item/crowbar) && !((stat & BROKEN) || malfhack) ) - if(coverlocked && !(stat & MAINT)) - to_chat(user, "The cover is locked and cannot be opened.") - return - else - opened = 1 - update_icon() - else if(istype(W, /obj/item/stock_parts/cell) && opened) // trying to put a cell inside + else if (istype(W, /obj/item/stock_parts/cell) && opened) // trying to put a cell inside if(cell) - to_chat(user, "There is a power cell already installed.") + to_chat(user, "There is a power cell already installed!") return else if(stat & MAINT) - to_chat(user, "There is no connector for your power cell.") + to_chat(user, "There is no connector for your power cell!") return - user.drop_item() - W.loc = src + if(!user.drop_item()) + return + W.forceMove(src) cell = W user.visible_message(\ - "[user.name] has inserted the power cell to [src.name]!",\ - "You insert the power cell.") - playsound(loc, W.usesound, 50, 1) + "[user.name] has inserted the power cell to [src.name]!",\ + "You insert the power cell.") chargecount = 0 update_icon() + else if(istype(W, /obj/item/screwdriver)) // haxing if(opened) if(cell) - to_chat(user, "Close the APC first.")//Less hints more mystery! - + to_chat(user, "Close the APC first!") //Less hints more mystery! return else - if(has_electronics==1 && terminal) + if(has_electronics==1) has_electronics = 2 stat &= ~MAINT playsound(src.loc, W.usesound, 50, 1) - to_chat(user, "You screw the circuit electronics into place.") + to_chat(user, "You screw the circuit electronics into place.") else if(has_electronics==2) has_electronics = 1 stat |= MAINT playsound(src.loc, W.usesound, 50, 1) - to_chat(user, "You unfasten the electronics.") + to_chat(user, "You unfasten the electronics.") else /* has_electronics==0 */ - to_chat(user, "There is nothing to secure.") + to_chat(user, "There is nothing to secure!") return update_icon() else if(emagged) - to_chat(user, "The interface is broken.") + to_chat(user, "The interface is broken!") + else if((stat & MAINT) && !opened) + ..() //its an empty closed frame... theres no wires to expose! else - wiresexposed = !wiresexposed - to_chat(user, "The wires have been [wiresexposed ? "exposed" : "unexposed"].") + panel_open = !panel_open + to_chat(user, "The wires have been [panel_open ? "exposed" : "unexposed"]") update_icon() - else if(istype(W, /obj/item/card/id)||istype(W, /obj/item/pda)) // trying to unlock the interface with an ID card - if(emagged) - to_chat(user, "The interface is broken.") - else if(opened) - to_chat(user, "You must close the cover to swipe an ID card.") - else if(wiresexposed) - to_chat(user, "You must close the panel.") - else if(stat & (BROKEN|MAINT)) - to_chat(user, "Nothing happens.") - else - if(src.allowed(usr) && !isWireCut(APC_WIRE_IDSCAN)) - locked = !locked - to_chat(user, "You [ locked ? "lock" : "unlock"] the APC interface.") - update_icon() - else - to_chat(user, "Access denied.") - else if(istype(W, /obj/item/stack/cable_coil) && !terminal && opened && has_electronics!=2) - if(src.loc:intact) - to_chat(user, "You must remove the floor plating in front of the APC first.") + else if(W.GetID()) // trying to unlock the interface with an ID card + togglelock(user) + + else if(istype(W, /obj/item/stack/cable_coil) && opened) + var/turf/host_turf = get_turf(src) + if(!host_turf) + throw EXCEPTION("attackby on APC when it's not on a turf") return + if(host_turf.intact) + to_chat(user, "You must remove the floor plating in front of the APC first!") + return + else if(terminal) // it already have terminal + to_chat(user, "This APC is already wired!") + return + else if(has_electronics == 0) + to_chat(user, "There is nothing to wire!") + return + var/obj/item/stack/cable_coil/C = W - if(C.amount < 10) - to_chat(user, "You need more wires.") + if(C.get_amount() < 10) + to_chat(user, "You need ten lengths of cable for APC!") return - to_chat(user, "You start adding cables to the APC frame...") - playsound(src.loc, C.usesound, 50, 1) - if(do_after(user, 20 * C.toolspeed, target = src)) - if(C.amount >= 10 && !terminal && opened && has_electronics != 2) + user.visible_message("[user.name] adds cables to the APC frame.", \ + "You start adding cables to the APC frame...") + playsound(src.loc, 'sound/items/deconstruct.ogg', 50, 1) + if(do_after(user, 20, target = src)) + if(C.get_amount() < 10 || !C) + return + if(C.get_amount() >= 10 && !terminal && opened && has_electronics > 0) var/turf/T = get_turf(src) var/obj/structure/cable/N = T.get_cable_node() if(prob(50) && electrocute_mob(usr, N, N, 1, TRUE)) - do_sparks(5, 1, src) + do_sparks(5, TRUE, src) return C.use(10) - user.visible_message(\ - "[user.name] has added cables to the APC frame!",\ - "You add cables to the APC frame.") + to_chat(user, "You add cables to the APC frame.") make_terminal() terminal.connect_to_network() - else if(istype(W, /obj/item/wirecutters) && terminal && opened && has_electronics!=2) - if(src.loc:intact) - to_chat(user, "You must remove the floor plating in front of the APC first.") + + else if(istype(W, /obj/item/wirecutters) && terminal && opened) + terminal.dismantle(user, W) + + else if(istype(W, /obj/item/apc_electronics) && opened) + if(has_electronics!=0) // there are already electronicks inside + to_chat(user, "You cannot put the board inside, there already is one!") return - to_chat(user, "You begin to cut the cables...") - playsound(src.loc, W.usesound, 50, 1) - if(do_after(user, 50 * W.toolspeed, target = src)) - if(terminal && opened && has_electronics!=2) - if(prob(50) && electrocute_mob(usr, terminal.powernet, terminal)) - do_sparks(5, 1, src) - return - new /obj/item/stack/cable_coil(loc,10) - to_chat(user, "You cut the cables and dismantle the power terminal.") - qdel(terminal) // qdel - else if(istype(W, /obj/item/apc_electronics) && opened && has_electronics==0 && !((stat & BROKEN) || malfhack)) - to_chat(user, "You trying to insert the power control board into the frame...") - playsound(src.loc, W.usesound, 50, 1) - if(do_after(user, 10 * W.toolspeed, target = src)) + else if(stat & BROKEN) + to_chat(user, "You cannot put the board inside, the frame is damaged!") + return + + user.visible_message("[user.name] inserts the power control board into [src].", \ + "You start to insert the power control board into the frame...") + playsound(src.loc, 'sound/items/deconstruct.ogg', 50, 1) + if(do_after(user, 10, target = src)) if(has_electronics==0) has_electronics = 1 - locked = 0 + locked = FALSE to_chat(user, "You place the power control board inside the frame.") - qdel(W) // qdel - else if(istype(W, /obj/item/apc_electronics) && opened && has_electronics==0 && ((stat & BROKEN) || malfhack)) - to_chat(user, "You cannot put the board inside, the frame is damaged.") - return + qdel(W) + else if(istype(W, /obj/item/weldingtool) && opened && has_electronics==0 && !terminal) var/obj/item/weldingtool/WT = W if(WT.get_fuel() < 3) - to_chat(user, "You need more welding fuel to complete this task.") + to_chat(user, "You need more welding fuel to complete this task!") return - user.visible_message("[user.name] welds [src].", \ - "You start welding the APC frame...", \ - "You hear welding.") + user.visible_message("[user.name] welds [src].", \ + "You start welding the APC frame...", \ + "You hear welding.") playsound(src.loc, WT.usesound, 50, 1) - if(do_after(user, 50 * WT.toolspeed, target = src)) - if(!src || !WT.remove_fuel(3, user)) return - if(emagged || malfhack || (stat & BROKEN) || opened==2) + if(do_after(user, 50*W.toolspeed, target = src)) + if(!src || !WT.remove_fuel(3, user)) + return + if((stat & BROKEN) || opened==2) new /obj/item/stack/sheet/metal(loc) user.visible_message(\ - "[src] has been cut apart by [user.name] with the weldingtool.",\ - "You disassembled the broken APC frame.",\ - "You hear welding.") + "[user.name] has cut [src] apart with [W].",\ + "You disassembled the broken APC frame.") else new /obj/item/mounted/frame/apc_frame(loc) user.visible_message(\ - "[src] has been cut from the wall by [user.name] with the weldingtool.",\ - "You cut the APC frame from the wall.",\ - "You hear welding.") - qdel(src) // qdel + "[user.name] has cut [src] from the wall with [W].",\ + "You cut the APC frame from the wall.") + qdel(src) + return + + else if(istype(W, /obj/item/mounted/frame/apc_frame) && opened) + if(!(stat & BROKEN || opened==2 || obj_integrity < max_integrity)) // There is nothing to repair + to_chat(user, "You found no reason for repairing this APC") + return + if(!(stat & BROKEN) && opened==2) // Cover is the only thing broken, we do not need to remove elctronicks to replace cover + user.visible_message("[user.name] replaces missing APC's cover.",\ + "You begin to replace APC's cover...") + if(do_after(user, 20, target = src)) // replacing cover is quicker than replacing whole frame + to_chat(user, "You replace missing APC's cover.") + qdel(W) + opened = 1 + update_icon() return - else if(istype(W, /obj/item/mounted/frame/apc_frame) && opened && emagged) - emagged = 0 - if(opened==2) - opened = 1 - user.visible_message(\ - "[user.name] has replaced the damaged APC frontal panel with a new one.",\ - "You replace the damaged APC frontal panel with a new one.") - qdel(W) - update_icon() - else if(istype(W, /obj/item/mounted/frame/apc_frame) && opened && ((stat & BROKEN) || malfhack)) if(has_electronics) - to_chat(user, "You cannot repair this APC until you remove the electronics still inside.") + to_chat(user, "You cannot repair this APC until you remove the electronics still inside!") return - to_chat(user, "You begin to replace the damaged APC frame...") - if(do_after(user, 50 * W.toolspeed, target = src)) - user.visible_message(\ - "[user.name] has replaced the damaged APC frame with new one.",\ - "You replace the damaged APC frame with new one.") + user.visible_message("[user.name] replaces the damaged APC frame with a new one.",\ + "You begin to replace the damaged APC frame...") + if(do_after(user, 50, target = src)) + to_chat(user, "You replace the damaged APC frame with a new one.") qdel(W) stat &= ~BROKEN - malfai = null - malfhack = 0 + obj_integrity = max_integrity if(opened==2) opened = 1 update_icon() + return + else if(panel_open && !opened && is_wire_tool(W)) + wires.Interact(user) else - if(((stat & BROKEN) || malfhack) \ - && !opened \ - && ( \ - (W.force >= 5 && W.w_class >= WEIGHT_CLASS_NORMAL) \ - || istype(W,/obj/item/crowbar) \ - ) \ - && prob(20) ) - opened = 2 - user.visible_message("The APC cover was knocked down with the [W.name] by [user.name]!", \ - "You knock down the APC cover with your [W.name]!", \ - "You hear a bang.") + return ..() + +/obj/machinery/power/apc/proc/togglelock(mob/living/user) + if(emagged) + to_chat(user, "The interface is broken!") + else if(opened) + to_chat(user, "You must close the cover to swipe an ID card!") + else if(panel_open) + to_chat(user, "You must close the panel!") + else if(stat & (BROKEN|MAINT)) + to_chat(user, "Nothing happens!") + else + if(allowed(usr) && !isWireCut(APC_WIRE_IDSCAN) && !malfhack) + locked = !locked + to_chat(user, "You [ locked ? "lock" : "unlock"] the APC interface.") update_icon() else - if(istype(user, /mob/living/silicon)) - return src.attack_hand(user) - if(!opened && wiresexposed && \ - (istype(W, /obj/item/multitool) || \ - istype(W, /obj/item/wirecutters) || istype(W, /obj/item/assembly/signaler))) - return src.attack_hand(user) - if(W.flags & NOBLUDGEON) - return - user.changeNext_move(CLICK_CD_MELEE) - user.do_attack_animation(src) - user.visible_message("The [src.name] has been hit with the [W.name] by [user.name]!", \ - "You hit the [src.name] with your [W.name]!", \ - "You hear a bang.") + to_chat(user, "Access denied.") /obj/machinery/power/apc/run_obj_armor(damage_amount, damage_type, damage_flag = 0, attack_dir) if((!(stat & BROKEN) || malfai)) diff --git a/code/modules/power/generator.dm b/code/modules/power/generator.dm index 7bbb5ac20f9..3d137a3c298 100644 --- a/code/modules/power/generator.dm +++ b/code/modules/power/generator.dm @@ -185,7 +185,7 @@ to_chat(user, "You reverse the generator's circulator settings. The cold circulator is now on the [dir2text(cold_dir)] side, and the heat circulator is now on the [dir2text(hot_dir)] side.") update_desc() else - ..() + return ..() /obj/machinery/power/generator/proc/get_menu(include_link = 1) var/t = "" diff --git a/code/modules/power/gravitygenerator.dm b/code/modules/power/gravitygenerator.dm index 255ffd98adc..08464600487 100644 --- a/code/modules/power/gravitygenerator.dm +++ b/code/modules/power/gravitygenerator.dm @@ -179,13 +179,14 @@ var/const/GRAV_NEEDS_WRENCH = 3 // Fixing the gravity generator. /obj/machinery/gravity_generator/main/attackby(obj/item/I as obj, mob/user as mob, params) - var/old_broken_state = broken_state switch(broken_state) if(GRAV_NEEDS_SCREWDRIVER) if(istype(I, /obj/item/screwdriver)) to_chat(user, "You secure the screws of the framework.") playsound(src.loc, I.usesound, 50, 1) broken_state++ + update_icon() + return if(GRAV_NEEDS_WELDING) if(istype(I, /obj/item/weldingtool)) var/obj/item/weldingtool/WT = I @@ -193,6 +194,8 @@ var/const/GRAV_NEEDS_WRENCH = 3 to_chat(user, "You mend the damaged framework.") playsound(src.loc, WT.usesound, 50, 1) broken_state++ + update_icon() + return if(GRAV_NEEDS_PLASTEEL) if(istype(I, /obj/item/stack/sheet/plasteel)) var/obj/item/stack/sheet/plasteel/PS = I @@ -201,17 +204,17 @@ var/const/GRAV_NEEDS_WRENCH = 3 to_chat(user, "You add the plating to the framework.") playsound(src.loc, PS.usesound, 75, 1) broken_state++ + update_icon() else to_chat(user, "You need 10 sheets of plasteel.") + return if(GRAV_NEEDS_WRENCH) if(istype(I, /obj/item/wrench)) to_chat(user, "You secure the plating to the framework.") playsound(src.loc, I.usesound, 75, 1) set_fix() - else - ..() - if(old_broken_state != broken_state) - update_icon() + return + return ..() /obj/machinery/gravity_generator/main/attack_hand(mob/user as mob) if(!..()) diff --git a/code/modules/power/port_gen.dm b/code/modules/power/port_gen.dm index 203fbd9b734..ee0924578ff 100644 --- a/code/modules/power/port_gen.dm +++ b/code/modules/power/port_gen.dm @@ -307,6 +307,8 @@ return else if(istype(O, /obj/item/crowbar) && panel_open) default_deconstruction_crowbar(O) + else + return ..() /obj/machinery/power/port_gen/pacman/attack_hand(mob/user as mob) ..() diff --git a/code/modules/power/singularity/collector.dm b/code/modules/power/singularity/collector.dm index 45fa6fa06cd..efdd6ab2681 100644 --- a/code/modules/power/singularity/collector.dm +++ b/code/modules/power/singularity/collector.dm @@ -95,8 +95,7 @@ var/global/list/rad_collectors = list() to_chat(user, "Access denied!") return 1 else - ..() - return 1 + return ..() /obj/machinery/power/rad_collector/obj_break(damage_flag) if(!(stat & BROKEN) && !(flags & NODECONSTRUCT)) diff --git a/code/modules/power/singularity/emitter.dm b/code/modules/power/singularity/emitter.dm index 1726d5bd43b..8977062c947 100644 --- a/code/modules/power/singularity/emitter.dm +++ b/code/modules/power/singularity/emitter.dm @@ -342,10 +342,10 @@ if(exchange_parts(user, W)) return - default_deconstruction_crowbar(W) + if(default_deconstruction_crowbar(W)) + return - ..() - return + return ..() /obj/machinery/power/emitter/emag_act(var/mob/living/user as mob) if(!emagged) diff --git a/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm b/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm index 5c07f662baa..2942acfdb35 100644 --- a/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm +++ b/code/modules/power/singularity/particle_accelerator/particle_accelerator.dm @@ -140,8 +140,7 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin if(istool(W)) if(process_tool_hit(W,user)) return - ..() - return + return..() /obj/structure/particle_accelerator/deconstruct(disassembled = TRUE) if(!(flags & NODECONSTRUCT)) @@ -310,7 +309,7 @@ So, hopefully this is helpful if any more icons are to be added/changed/wonderin if(istool(W)) if(process_tool_hit(W,user)) return - ..() + return ..() /obj/machinery/particle_accelerator/proc/update_state() return 0 diff --git a/code/modules/power/smes.dm b/code/modules/power/smes.dm index 2c59a0a5b22..4773df11395 100644 --- a/code/modules/power/smes.dm +++ b/code/modules/power/smes.dm @@ -224,7 +224,9 @@ return //crowbarring it ! - default_deconstruction_crowbar(I) + if(default_deconstruction_crowbar(I)) + return + return ..() /obj/machinery/power/smes/disconnect_terminal() if(terminal) diff --git a/code/modules/power/solar.dm b/code/modules/power/solar.dm index f9d290438d4..f3ca60effda 100644 --- a/code/modules/power/solar.dm +++ b/code/modules/power/solar.dm @@ -243,14 +243,14 @@ qdel(W) user.visible_message("[user] inserts the electronics into the solar assembly.", "You insert the electronics into the solar assembly.") return 1 + else if(istype(W, /obj/item/crowbar)) + new /obj/item/tracker_electronics(src.loc) + tracker = 0 + playsound(loc, W.usesound, 50, 1) + user.visible_message("[user] takes out the electronics from the solar assembly.", "You take out the electronics from the solar assembly.") + return 1 else - if(istype(W, /obj/item/crowbar)) - new /obj/item/tracker_electronics(src.loc) - tracker = 0 - playsound(loc, W.usesound, 50, 1) - user.visible_message("[user] takes out the electronics from the solar assembly.", "You take out the electronics from the solar assembly.") - return 1 - ..() + return ..() // // Solar Control Computer @@ -425,8 +425,7 @@ A.anchored = 1 qdel(src) else - src.attack_hand(user) - return + return ..() /obj/machinery/power/solar_control/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0) switch(damage_type) diff --git a/code/modules/power/terminal.dm b/code/modules/power/terminal.dm index 80c38e0a9fe..058872cde6d 100644 --- a/code/modules/power/terminal.dm +++ b/code/modules/power/terminal.dm @@ -33,3 +33,44 @@ invisibility = 0 icon_state = "term" +/obj/machinery/power/proc/can_terminal_dismantle() + . = 0 + +/obj/machinery/power/apc/can_terminal_dismantle() + . = 0 + if(opened) + . = 1 + +/obj/machinery/power/smes/can_terminal_dismantle() + . = 0 + if(panel_open) + . = 1 + + +/obj/machinery/power/terminal/proc/dismantle(mob/living/user, obj/item/W) + if(isturf(loc)) + var/turf/T = loc + if(T.intact) + to_chat(user, "You must first expose the power terminal!") + return + + if(!master || master.can_terminal_dismantle()) + user.visible_message("[user.name] dismantles the power terminal from [master].", \ + "You begin to cut the cables...") + + playsound(src.loc, 'sound/items/deconstruct.ogg', 50, 1) + if(do_after(user, 50*W.toolspeed, target = src)) + if(!master || master.can_terminal_dismantle()) + if(prob(50) && electrocute_mob(user, powernet, src, 1, TRUE)) + do_sparks(5, TRUE, master) + return + new /obj/item/stack/cable_coil(loc, 10) + to_chat(user, "You cut the cables and dismantle the power terminal.") + qdel(src) + + +/obj/machinery/power/terminal/attackby(obj/item/W, mob/living/user, params) + if(istype(W, /obj/item/wirecutters)) + dismantle(user, W) + else + return ..() \ No newline at end of file diff --git a/code/modules/power/tesla/coil.dm b/code/modules/power/tesla/coil.dm index cc564c98d4c..6f1e84da526 100644 --- a/code/modules/power/tesla/coil.dm +++ b/code/modules/power/tesla/coil.dm @@ -54,7 +54,7 @@ wires.Interact(user) else - ..() + return ..() /obj/machinery/power/tesla_coil/tesla_act(var/power) if(anchored && !panel_open) diff --git a/code/modules/power/treadmill.dm b/code/modules/power/treadmill.dm index 5a1cc12c701..39c5d732128 100644 --- a/code/modules/power/treadmill.dm +++ b/code/modules/power/treadmill.dm @@ -106,7 +106,7 @@ speed = 0 update_icon() return - ..() + return ..() #undef BASE_MOVE_DELAY #undef MAX_SPEED diff --git a/code/modules/power/turbine.dm b/code/modules/power/turbine.dm index c38382cb962..6f3c0856406 100644 --- a/code/modules/power/turbine.dm +++ b/code/modules/power/turbine.dm @@ -128,7 +128,9 @@ if(exchange_parts(user, I)) return - default_deconstruction_crowbar(I) + if(default_deconstruction_crowbar(I)) + return + return ..() /obj/machinery/power/compressor/CanAtmosPass(turf/T) return !density @@ -283,7 +285,9 @@ if(exchange_parts(user, I)) return - default_deconstruction_crowbar(I) + if(default_deconstruction_crowbar(I)) + return + return ..() /obj/machinery/power/turbine/interact(mob/user) diff --git a/code/modules/reagents/chemistry/machinery/chem_heater.dm b/code/modules/reagents/chemistry/machinery/chem_heater.dm index ec7e51b6359..c4f07385aae 100644 --- a/code/modules/reagents/chemistry/machinery/chem_heater.dm +++ b/code/modules/reagents/chemistry/machinery/chem_heater.dm @@ -87,6 +87,8 @@ eject_beaker() default_deconstruction_crowbar(I) return 1 + return + return ..() /obj/machinery/chem_heater/attack_hand(mob/user) ui_interact(user) diff --git a/code/modules/reagents/chemistry/machinery/pandemic.dm b/code/modules/reagents/chemistry/machinery/pandemic.dm index 610778bff37..ced53381c9f 100644 --- a/code/modules/reagents/chemistry/machinery/pandemic.dm +++ b/code/modules/reagents/chemistry/machinery/pandemic.dm @@ -343,8 +343,6 @@ else if(istype(I, /obj/item/screwdriver)) if(beaker) - beaker.loc = get_turf(src) - ..() - return + beaker.forceMove(get_turf(src)) else - ..() + return ..() diff --git a/code/modules/reagents/reagent_dispenser.dm b/code/modules/reagents/reagent_dispenser.dm index db7a38d88e7..c1e4b89e774 100644 --- a/code/modules/reagents/reagent_dispenser.dm +++ b/code/modules/reagents/reagent_dispenser.dm @@ -21,7 +21,7 @@ /obj/structure/reagent_dispensers/attackby(obj/item/I, mob/user, params) if(I.is_refillable()) return FALSE //so we can refill them via their afterattack. - . = ..() + return ..() /obj/structure/reagent_dispensers/New() create_reagents(tank_volume) @@ -260,6 +260,8 @@ user.visible_message("[user] has secured [src]'s floor casters.", \ "You have secured [src]'s floor casters.") anchored = 1 + return + return ..() /obj/structure/reagent_dispensers/beerkeg name = "beer keg" diff --git a/code/modules/recycling/sortingmachinery.dm b/code/modules/recycling/sortingmachinery.dm index 23d415e0e57..fd94341d93c 100755 --- a/code/modules/recycling/sortingmachinery.dm +++ b/code/modules/recycling/sortingmachinery.dm @@ -76,6 +76,8 @@ new /obj/item/c_tube( get_turf(user) ) else to_chat(user, "You need more paper.") + else + return ..() /obj/item/smallDelivery name = "small parcel" @@ -141,6 +143,8 @@ new /obj/item/c_tube( get_turf(user) ) else to_chat(user, "You need more paper.") + else + return ..() /obj/item/stack/packageWrap name = "package wrapper" diff --git a/code/modules/research/server.dm b/code/modules/research/server.dm index 33fc484dba7..abb20ac091a 100644 --- a/code/modules/research/server.dm +++ b/code/modules/research/server.dm @@ -148,6 +148,8 @@ griefProtection() default_deconstruction_crowbar(O) return 1 + else + return ..() /obj/machinery/r_n_d/server/attack_hand(mob/user as mob) if(disabled) diff --git a/code/modules/research/xenobiology/xenobio_camera.dm b/code/modules/research/xenobiology/xenobio_camera.dm index f6df6ece19b..db6a195fe2d 100644 --- a/code/modules/research/xenobiology/xenobio_camera.dm +++ b/code/modules/research/xenobiology/xenobio_camera.dm @@ -131,7 +131,7 @@ monkeys++ to_chat(user, "You feed [O] to [src]. It now has [monkeys] monkey cubes stored.") qdel(O) - return + return else if(istype(O, /obj/item/slimepotion/slime)) var/replaced = FALSE if(user.drop_item()) @@ -140,7 +140,7 @@ replaced = TRUE current_potion = O to_chat(user, "You load [O] in the console's potion slot[replaced ? ", replacing the one that was there before" : ""].") - return + return else if(istype(O, /obj/item/storage/bag)) var/obj/item/storage/P = O var/loaded = 0 @@ -159,7 +159,7 @@ connected_recycler = I.buffer connected_recycler.connected += src return - ..() + return ..() /datum/action/innate/slime_place name = "Place Slimes" diff --git a/code/modules/security_levels/keycard authentication.dm b/code/modules/security_levels/keycard authentication.dm index 25083e6262b..e1e3104e643 100644 --- a/code/modules/security_levels/keycard authentication.dm +++ b/code/modules/security_levels/keycard authentication.dm @@ -48,6 +48,8 @@ broadcast_request() //This is the device making the initial event request. It needs to broadcast to other devices else to_chat(user, "Access denied.") + return + return ..() /obj/machinery/keycard_auth/power_change() if(powered(ENVIRON)) diff --git a/code/modules/spacepods/construction.dm b/code/modules/spacepods/construction.dm index 95c2f31ca56..a6a7ddb0927 100644 --- a/code/modules/spacepods/construction.dm +++ b/code/modules/spacepods/construction.dm @@ -25,8 +25,7 @@ /obj/structure/spacepod_frame/attackby(obj/item/W as obj, mob/user as mob, params) if(!construct || !construct.action(W, user)) - ..() - return + return ..() /obj/structure/spacepod_frame/attack_hand() return diff --git a/code/modules/spacepods/equipment.dm b/code/modules/spacepods/equipment.dm index d509b4f745c..c52eca0b342 100644 --- a/code/modules/spacepods/equipment.dm +++ b/code/modules/spacepods/equipment.dm @@ -159,7 +159,7 @@ enabled = 1 user.show_message("You enable \the [src]'s power.") else - ..() + return ..() /* /////////////////////////////////////// @@ -272,4 +272,4 @@ else to_chat(user, "This key is already ground!") else - ..() + return ..() diff --git a/code/modules/telesci/telepad.dm b/code/modules/telesci/telepad.dm index 8ff937eea6f..5e9de355664 100644 --- a/code/modules/telesci/telepad.dm +++ b/code/modules/telesci/telepad.dm @@ -45,11 +45,14 @@ var/obj/item/multitool/M = I M.buffer = src to_chat(user, "You save the data in the [I.name]'s buffer.") + return if(exchange_parts(user, I)) return - default_deconstruction_crowbar(I) + if(default_deconstruction_crowbar(I)) + return + return ..() //CARGO TELEPAD// @@ -87,6 +90,8 @@ new /obj/item/stack/sheet/metal(get_turf(src)) new /obj/item/stack/sheet/glass(get_turf(src)) qdel(src) + else + return ..() ///TELEPAD CALLER/// /obj/item/telepad_beacon diff --git a/code/modules/telesci/telesci_computer.dm b/code/modules/telesci/telesci_computer.dm index 0f737823d5b..2835a445f1c 100644 --- a/code/modules/telesci/telesci_computer.dm +++ b/code/modules/telesci/telesci_computer.dm @@ -73,7 +73,7 @@ to_chat(user, "You upload the data from the [W.name]'s buffer.") updateUsrDialog() else - ..() + return ..() /obj/machinery/computer/telescience/emag_act(user as mob) if(!emagged) diff --git a/icons/obj/power.dmi b/icons/obj/power.dmi index 8ab87cba4bd..7eb6484038c 100644 Binary files a/icons/obj/power.dmi and b/icons/obj/power.dmi differ