Skip to content

Commit

Permalink
oh my god...
Browse files Browse the repository at this point in the history
  • Loading branch information
BaraBarax committed Jan 29, 2024
1 parent 2ca6efc commit f0a7487
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 29 deletions.
4 changes: 3 additions & 1 deletion code/game/mecha/combat/honker.dm
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,16 @@
output += "</div>"
return output

/obj/mecha/combat/honker/mechstep(direction)
/obj/mecha/combat/honker/mechstep(direction, old_dir)
var/result = step(src, direction)
if(result)
if(!squeak)
playsound(src, SFX_CLOWN, 70, 1)
squeak = 1
else
squeak = 0
if(strafe)
set_dir(old_dir)
return result

/obj/mecha/combat/honker/Topic(href, href_list)
Expand Down
48 changes: 21 additions & 27 deletions code/game/mecha/combat/marauder.dm
Original file line number Diff line number Diff line change
Expand Up @@ -82,49 +82,43 @@

return ..()

/obj/mecha/combat/marauder/relaymove(mob/user,direction)
if(user != src.occupant) //While not "realistic", this piece is player friendly.
user.forceMove(get_turf(src))
to_chat(user, "You climb out from [src]")
return 0
/obj/mecha/combat/marauder/do_move(direction)
if(!can_move)
return 0
if(zoom)
if(world.time - last_message > 20)
src.occupant_message("Unable to move while in zoom mode.")
last_message = world.time
return 0
if(connected_port)
if(world.time - last_message > 20)
src.occupant_message("Unable to move while connected to the air system port")
last_message = world.time
return 0
return FALSE

if(!thrusters && src.pr_inertial_movement.active())
return 0
return FALSE

if(state || !has_charge(step_energy_drain))
return 0
var/tmp_step_in = step_in
return FALSE

var/tmp_step_energy_drain = step_energy_drain
var/move_result = 0
if(internal_damage&MECHA_INT_CONTROL_LOST)
var/old_dir = dir
if(internal_damage & MECHA_INT_CONTROL_LOST)
move_result = mechsteprand()
else if(src.dir!=direction)
else if(dir != direction && !strafe)
move_result = mechturn(direction)
else
move_result = mechstep(direction)
move_result = mechstep(direction, old_dir)
if(move_result)
can_move = 0
if(istype(src.loc, /turf/space))
if(!src.check_for_support())
src.pr_inertial_movement.start(list(src,direction))
if(thrusters)
src.pr_inertial_movement.set_process_args(list(src,direction))
tmp_step_energy_drain = step_energy_drain*2

can_move = 0
spawn(tmp_step_in) can_move = 1
else
src.log_message("Movement control lost. Inertial movement started.")
spawn(step_in)
can_move = 1
use_power(tmp_step_energy_drain)
return 1
return 0
return TRUE

return FALSE




/obj/mecha/combat/marauder/verb/toggle_thrusters()
Expand Down
4 changes: 3 additions & 1 deletion code/game/mecha/medical/medical.dm
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,12 @@
playsound(src,'sound/mecha/mechmove01.ogg',40,1)
return 1

/obj/mecha/medical/mechstep(direction)
/obj/mecha/medical/mechstep(direction, old_dir)
var/result = step(src,direction)
if(result)
playsound(src,'sound/mecha/mechstep.ogg',25,1)
if(strafe)
set_dir(old_dir)
return result

/obj/mecha/medical/mechsteprand()
Expand Down

0 comments on commit f0a7487

Please sign in to comment.