Skip to content

Commit

Permalink
Fixeki 4
Browse files Browse the repository at this point in the history
  • Loading branch information
CheBokJam committed Dec 13, 2024
1 parent bf4a96d commit eacf74b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 15 deletions.
9 changes: 4 additions & 5 deletions code/game/objects/objs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
12 changes: 6 additions & 6 deletions code/game/objects/structures/mineral_doors.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
7 changes: 3 additions & 4 deletions code/game/turfs/closed.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit eacf74b

Please sign in to comment.