From 5faa1a65f1e7112f4a5b0ffbc7e3b787ac323241 Mon Sep 17 00:00:00 2001 From: Iajret Creature <122297233+Steals-The-PRs@users.noreply.github.com> Date: Fri, 19 Apr 2024 10:31:09 +0300 Subject: [PATCH] [MIRROR] makes slimes not idle (#2075) (#2968) * 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 <154629622+NovaBot13@users.noreply.github.com> Co-authored-by: Ben10Omintrix <138636438+Ben10Omintrix@users.noreply.github.com> --- code/datums/ai/_ai_controller.dm | 4 +++- code/modules/mob/living/basic/slime/ai/controller.dm | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/code/datums/ai/_ai_controller.dm b/code/datums/ai/_ai_controller.dm index 7ed49e95a5a..f79ddd5f606 100644 --- a/code/datums/ai/_ai_controller.dm +++ b/code/datums/ai/_ai_controller.dm @@ -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) @@ -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)) diff --git a/code/modules/mob/living/basic/slime/ai/controller.dm b/code/modules/mob/living/basic/slime/ai/controller.dm index 9ecf66ad744..41466b29734 100644 --- a/code/modules/mob/living/basic/slime/ai/controller.dm +++ b/code/modules/mob/living/basic/slime/ai/controller.dm @@ -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() ..()