From 4aded752bebc81998c0ded0aa24e48eb1927f15b Mon Sep 17 00:00:00 2001 From: Citinited Date: Sun, 1 Mar 2020 15:57:14 +0000 Subject: [PATCH] Fireaxe door fix; arg order fix --- code/game/machinery/doors/airlock.dm | 22 +++++++++---------- code/game/machinery/doors/door.dm | 6 ++--- code/game/machinery/doors/windowdoor.dm | 4 ++-- .../mecha/equipment/tools/medical_tools.dm | 2 +- code/modules/recycling/sortingmachinery.dm | 14 ++++++------ 5 files changed, 24 insertions(+), 24 deletions(-) diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 26f0e2a2400..444c319334b 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -1034,6 +1034,17 @@ About the new airlock wires panel: /obj/machinery/door/airlock/try_to_crowbar(mob/living/user, obj/item/I) //*scream if(operating) return + if(istype(I, /obj/item/twohanded/fireaxe)) //let's make this more specific //FUCK YOU + var/obj/item/twohanded/fireaxe/F = I + if(F.wielded) + spawn(0) + if(density) + open(1) + else + close(1) + else + to_chat(user, "You need to be wielding the fire axe to do that!") + return var/beingcrowbarred = FALSE if(I.tool_behaviour == TOOL_CROWBAR && I.tool_use_check(user, 0)) beingcrowbarred = TRUE @@ -1049,17 +1060,6 @@ About the new airlock wires panel: if(locked) to_chat(user, "The airlock's bolts prevent it from being forced!") return - if(istype(I, /obj/item/twohanded/fireaxe)) //let's make this more specific //FUCK YOU - var/obj/item/twohanded/fireaxe/F = I - if(F.wielded) - spawn(0) - if(density) - open(1) - else - close(1) - else - to_chat(user, "You need to be wielding the fire axe to do that!") - return else if(!arePowerSystemsOn()) spawn(0) if(density) diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm index 83ce512ebd9..14d1de97327 100644 --- a/code/game/machinery/doors/door.dm +++ b/code/game/machinery/doors/door.dm @@ -185,12 +185,12 @@ /obj/machinery/door/proc/unrestricted_side(mob/M) //Allows for specific side of airlocks to be unrestrected (IE, can exit maint freely, but need access to enter) return get_dir(src, M) & unres_sides -/obj/machinery/door/proc/try_to_crowbar(obj/item/I, mob/user) +/obj/machinery/door/proc/try_to_crowbar(mob/user, obj/item/I) return /obj/machinery/door/attackby(obj/item/I, mob/user, params) if(user.a_intent != INTENT_HARM && istype(I, /obj/item/twohanded/fireaxe)) - try_to_crowbar(I, user) + try_to_crowbar(user, I) return 1 else if(!(I.flags & NOBLUDGEON) && user.a_intent != INTENT_HARM) try_to_activate_door(user) @@ -206,7 +206,7 @@ return if(!I.use_tool(src, user, 0, volume = I.tool_volume)) return - try_to_crowbar(I, user) + try_to_crowbar(user, I) /obj/machinery/door/take_damage(damage_amount, damage_type = BRUTE, damage_flag = 0, sound_effect = 1, attack_dir) . = ..() diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm index a69535e9fc9..ae87480e929 100644 --- a/code/game/machinery/doors/windowdoor.dm +++ b/code/game/machinery/doors/windowdoor.dm @@ -302,9 +302,9 @@ qdel(src) else - try_to_crowbar(I, user) + try_to_crowbar(user, I) -/obj/machinery/door/window/try_to_crowbar(obj/item/I, mob/user) +/obj/machinery/door/window/try_to_crowbar(mob/user, obj/item/I) if(!hasPower()) if(density) open(2) diff --git a/code/game/mecha/equipment/tools/medical_tools.dm b/code/game/mecha/equipment/tools/medical_tools.dm index aacd605b730..0bfbef39289 100644 --- a/code/game/mecha/equipment/tools/medical_tools.dm +++ b/code/game/mecha/equipment/tools/medical_tools.dm @@ -535,7 +535,7 @@ if(!istype(target, /obj/machinery/door))//early return if we're not trying to open a door return var/obj/machinery/door/D = target //the door we want to open - D.try_to_crowbar(src, chassis.occupant)//use the door's crowbar function + D.try_to_crowbar(chassis.occupant, src)//use the door's crowbar function if(isliving(target)) //interact with living beings var/mob/living/M = target if(chassis.occupant.a_intent == INTENT_HARM)//the patented, medical rescue claw is incapable of doing harm. Worry not. diff --git a/code/modules/recycling/sortingmachinery.dm b/code/modules/recycling/sortingmachinery.dm index aa866f65d4b..95e076d2670 100755 --- a/code/modules/recycling/sortingmachinery.dm +++ b/code/modules/recycling/sortingmachinery.dm @@ -273,7 +273,7 @@ icon_state = "intake" required_mode_to_deconstruct = 1 deconstructs_to = PIPE_DISPOSALS_CHUTE - var/c_mode = 0 //1 = we can deconstruct, 0 means we cannot + var/can_deconstruct = FALSE /obj/machinery/disposal/deliveryChute/New() ..() @@ -348,12 +348,12 @@ . = TRUE if(!I.use_tool(src, user, 0, volume = I.tool_volume)) return - c_mode = !c_mode - to_chat(user, "You [c_mode ? "unfasten": "fasten"] the screws around the power connection.") + can_deconstruct = !can_deconstruct + to_chat(user, "You [can_deconstruct ? "unfasten": "fasten"] the screws around the power connection.") /obj/machinery/disposal/deliveryChute/welder_act(mob/user, obj/item/I) . = TRUE - if(!c_mode) + if(!can_deconstruct) return if(contents.len > 0) to_chat(user, "Eject the items first!") @@ -363,11 +363,11 @@ WELDER_ATTEMPT_FLOOR_SLICE_MESSAGE if(I.use_tool(src, user, 20, volume = I.tool_volume)) WELDER_FLOOR_SLICE_SUCCESS_MESSAGE - var/obj/structure/disposalconstruct/C = new (src.loc) + var/obj/structure/disposalconstruct/C = new (loc) C.ptype = deconstructs_to C.update() - C.anchored = 1 - C.density = 1 + C.anchored = TRUE + C.density = TRUE qdel(src) /obj/item/shippingPackage