Skip to content

Commit

Permalink
resting -> set_resting()
Browse files Browse the repository at this point in the history
  • Loading branch information
xDanilcusx committed Jan 25, 2024
1 parent a78f52b commit ad847d0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
return FALSE

processing_xeno.current_target = parent
processing_xeno.resting = FALSE
processing_xeno.set_resting(FALSE, FALSE, TRUE)
if(prob(5))
processing_xeno.emote("hiss")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,13 @@
if(potential_weeds && IS_SAME_HIVENUMBER(idle_xeno, potential_weeds) && !potential_home.density && get_dist(idle_xeno, potential_home) < shortest_distance)
home_turf = potential_home
shortest_distance = get_dist(idle_xeno, potential_home)
if(idle_xeno.resting)
idle_xeno.lay_down()

idle_xeno.set_resting(FALSE, FALSE, TRUE)
if(!home_turf)
return

if(idle_xeno.move_to_next_turf(home_turf, home_locate_range))
if(get_dist(home_turf, idle_xeno) <= 0 && !idle_xeno.resting)
idle_xeno.lay_down()
if(get_dist(home_turf, idle_xeno) <= 0)
idle_xeno.set_resting(TRUE, FALSE, TRUE)
else
home_turf = null

Expand Down
5 changes: 2 additions & 3 deletions code/modules/mob/living/carbon/xenomorph/ai/movement/drone.dm
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,10 @@
home_turf = potential_home

if(!home_turf)
if(!idle_xeno.resting)
idle_xeno.lay_down()
idle_xeno.set_resting(TRUE, FALSE, TRUE)
return

idle_xeno.resting = FALSE
idle_xeno.set_resting(FALSE, FALSE, TRUE)

if(home_turf == last_home_turf)
blacklisted_turfs += home_turf
Expand Down

0 comments on commit ad847d0

Please sign in to comment.