Skip to content

Commit

Permalink
[MIRROR] makes slimes not idle (#2075) (#2968)
Browse files Browse the repository at this point in the history
* makes slimes not idle (#82742)

## About The Pull Request
slimes should still be able to do their everyday routine without needing
to be watched over

## Why It's Good For The Game
makes xenobiologist's lives easier

## Changelog
:cl:
qol: slimes will stay active without needing any one to watch over
/:cl:

* makes slimes not idle

---------

Co-authored-by: NovaBot <[email protected]>
Co-authored-by: Ben10Omintrix <[email protected]>
  • Loading branch information
3 people authored Apr 19, 2024
1 parent 8708ca9 commit 5faa1a6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
4 changes: 3 additions & 1 deletion code/datums/ai/_ai_controller.dm
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,8 @@ multiple modular subtrees with behaviors
set_new_cells()

/datum/ai_controller/proc/set_new_cells()
if(isnull(our_cells))
return

var/turf/our_turf = get_turf(pawn)

Expand All @@ -163,7 +165,7 @@ multiple modular subtrees with behaviors
recalculate_idle()

/datum/ai_controller/proc/should_idle()
if(!can_idle)
if(!can_idle || isnull(our_cells))
return FALSE
for(var/datum/spatial_grid_cell/grid as anything in our_cells.member_cells)
if(length(grid.client_contents))
Expand Down
1 change: 1 addition & 0 deletions code/modules/mob/living/basic/slime/ai/controller.dm
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
/datum/ai_planning_subtree/basic_melee_attack_subtree/slime,
/datum/ai_planning_subtree/random_speech/slime,
)
can_idle = FALSE

/datum/ai_controller/basic_controller/slime/CancelActions()
..()
Expand Down

0 comments on commit 5faa1a6

Please sign in to comment.