diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm index 3cf139cd8f9..9625cf5efa9 100644 --- a/code/game/objects/objs.dm +++ b/code/game/objects/objs.dm @@ -307,16 +307,15 @@ return FALSE if(!(obj_flags & CAN_BE_HIT) || CHECK_BITFIELD(resistance_flags, PLASMACUTTER_IMMUNE) || CHECK_BITFIELD(resistance_flags, INDESTRUCTIBLE)) return FALSE - var/obj/item/tool/pickaxe/plasmacutter/plasmacutter = I - if(!plasmacutter.powered || (plasmacutter.flags_item & NOBLUDGEON)) + if(!I.powered || (I.flags_item & NOBLUDGEON)) return FALSE if(user.a_intent == INTENT_HARM) // Attack normally. return FALSE - if(!plasmacutter.start_cut(user, name, src)) + if(!I.start_cut(user, name, src)) return FALSE - if(!do_after(user, plasmacutter.calc_delay(user), NONE, src, BUSY_ICON_HOSTILE)) + if(!do_after(user, I.calc_delay(user), NONE, src, BUSY_ICON_HOSTILE)) return TRUE - plasmacutter.cut_apart(user, name, src) + I.cut_apart(user, name, src) deconstruct(FALSE) return TRUE diff --git a/code/game/objects/structures/mineral_doors.dm b/code/game/objects/structures/mineral_doors.dm index 190b33d4a73..1f94e29ee30 100644 --- a/code/game/objects/structures/mineral_doors.dm +++ b/code/game/objects/structures/mineral_doors.dm @@ -138,16 +138,16 @@ return FALSE if(!(obj_flags & CAN_BE_HIT) || CHECK_BITFIELD(resistance_flags, PLASMACUTTER_IMMUNE) || CHECK_BITFIELD(resistance_flags, INDESTRUCTIBLE)) return FALSE - if(!plasmacutter.powered || (plasmacutter.flags_item & NOBLUDGEON)) + if(!I.powered || (I.flags_item & NOBLUDGEON)) return FALSE var/charge_cost = PLASMACUTTER_BASE_COST * PLASMACUTTER_VLOW_MOD - if(!plasmacutter.start_cut(user, name, src, charge_cost, no_string = TRUE)) + if(!I.start_cut(user, name, src, charge_cost, no_string = TRUE)) return FALSE - user.changeNext_move(plasmacutter.attack_speed) - user.do_attack_animation(src, used_item = plasmacutter) - plasmacutter.cut_apart(user, name, src, charge_cost) - take_damage(max(0, plasmacutter.force * (1 + PLASMACUTTER_RESIN_MULTIPLIER)), plasmacutter.damtype, MELEE) + user.changeNext_move(I.attack_speed) + user.do_attack_animation(src, used_item = I) + I.cut_apart(user, name, src, charge_cost) + take_damage(max(0, I.force * (1 + PLASMACUTTER_RESIN_MULTIPLIER)), I.damtype, MELEE) playsound(src, SFX_ALIEN_RESIN_BREAK, 25) return TRUE diff --git a/code/game/turfs/closed.dm b/code/game/turfs/closed.dm index 9cb816520a8..49a24bd7bc4 100644 --- a/code/game/turfs/closed.dm +++ b/code/game/turfs/closed.dm @@ -77,15 +77,14 @@ if(CHECK_BITFIELD(resistance_flags, PLASMACUTTER_IMMUNE) || CHECK_BITFIELD(resistance_flags, INDESTRUCTIBLE)) to_chat(user, span_warning("[I] can't cut through this!")) return FALSE - var/obj/item/tool/pickaxe/plasmacutter/plasmacutter = I - if(!plasmacutter.powered || (plasmacutter.flags_item & NOBLUDGEON)) + if(!I.powered || (I.flags_item & NOBLUDGEON)) return FALSE - if(!plasmacutter.start_cut(user, name, src)) + if(!I.start_cut(user, name, src)) return FALSE if(!do_after(user, PLASMACUTTER_CUT_DELAY, NONE, src, BUSY_ICON_FRIENDLY)) return FALSE - plasmacutter.cut_apart(user, name, src) + I.cut_apart(user, name, src) // Change targetted turf to a new one to simulate deconstruction. ChangeTurf(open_turf_type) return TRUE