Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 8 additions & 5 deletions code/game/mecha/mecha.dm
Original file line number Diff line number Diff line change
Expand Up @@ -527,6 +527,8 @@
target = safepick(oview(1,src))
if(!melee_can_hit || !istype(target, /atom))
return
if(equipment_disabled)
return
target.mech_melee_attack(src)
melee_can_hit = 0
spawn(melee_cooldown)
Expand Down Expand Up @@ -669,11 +671,12 @@
if(..()) //mech was thrown
return
if(bumpsmash && occupant) //Need a pilot to push the PUNCH button.
if(nextsmash < world.time)
obstacle.mech_melee_attack(src)
nextsmash = world.time + smashcooldown
if(!obstacle || obstacle.CanPass(src,newloc))
step(src,dir)
if(!equipment_disabled)
if(nextsmash < world.time)
obstacle.mech_melee_attack(src)
nextsmash = world.time + smashcooldown
if(!obstacle || obstacle.CanPass(src,newloc))
step(src,dir)
if(isobj(obstacle))
var/obj/O = obstacle
if(!O.anchored)
Expand Down
4 changes: 3 additions & 1 deletion code/game/mecha/mecha_actions.dm
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,8 @@
button_icon_state = "mech_overload_off"

/datum/action/innate/mecha/mech_overload_mode/Activate(forced_state = null)
if(chassis.equipment_disabled)
return
if(!owner || !chassis || chassis.occupant != owner)
return
if(!isnull(forced_state))
Expand All @@ -207,7 +209,7 @@
chassis.occupant_message("<span class='danger'>You enable leg actuators overload.</span>")
else
chassis.leg_overload_mode = 0
chassis.bumpsmash = 0
chassis.bumpsmash = initial(chassis.bumpsmash)
chassis.step_in = initial(chassis.step_in)
chassis.step_energy_drain = chassis.normal_step_energy_drain
chassis.occupant_message("<span class='notice'>You disable leg actuators overload.</span>")
Expand Down
3 changes: 2 additions & 1 deletion code/game/mecha/mecha_defense.dm
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@
occupant?.update_mouse_pointer()
if(!equipment_disabled && occupant) //prevent spamming this message with back-to-back EMPs
to_chat(occupant, "<span=danger>Error -- Connection to equipment control unit has been lost.</span>")
overload_action.Activate(0)
addtimer(CALLBACK(src, /obj/mecha/proc/restore_equipment), 3 SECONDS, TIMER_UNIQUE | TIMER_OVERRIDE)
equipment_disabled = 1

Expand Down Expand Up @@ -375,4 +376,4 @@
WR.crowbar_salvage += internal_tank
internal_tank.forceMove(WR)
cell = null
. = ..()
. = ..()