Skip to content

Commit

Permalink
Adds borg sprinting
Browse files Browse the repository at this point in the history
  • Loading branch information
MrMelbert committed May 20, 2024
1 parent 54659eb commit 9475f45
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
6 changes: 6 additions & 0 deletions code/_onclick/hud/robot.dm
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,12 @@
action_intent.screen_loc = ui_combat_toggle
static_inventory += action_intent

using = new /atom/movable/screen/mov_intent(null, src)
using.screen_loc = ui_combat_toggle
using.icon = 'icons/hud/screen_slimecore.dmi'
using.update_appearance()
static_inventory += using

//Health
healths = new /atom/movable/screen/healths/robot(null, src)
infodisplay += healths
Expand Down
16 changes: 16 additions & 0 deletions code/modules/mob/living/silicon/robot/robot_movement.dm
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,19 @@
if(ionpulse())
return TRUE
return FALSE

/mob/living/silicon/robot
move_intent = MOVE_INTENT_WALK

/mob/living/silicon/robot/Move(NewLoc, direct)
. = ..()
if(!.)
return
if(move_intent != MOVE_INTENT_RUN || stat == DEAD || pulledby)
return
if((movement_type & (FLOATING|FLYING)) || !(mobility_flags & (MOBILITY_MOVE|MOBILITY_STAND)))
return
if(low_power_mode || cell?.charge <= STANDARD_CELL_CHARGE * 0.005)
set_move_intent(MOVE_INTENT_WALK)
return
cell.use(STANDARD_CELL_CHARGE * 0.005)

0 comments on commit 9475f45

Please sign in to comment.