From c692f60e048c2377d157592af98e04057a34fc00 Mon Sep 17 00:00:00 2001 From: NovaBot <154629622+NovaBot13@users.noreply.github.com> Date: Thu, 18 Apr 2024 22:32:22 -0400 Subject: [PATCH] [MIRROR] makes slimes not idle (#2075) * 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: 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 436b4912b18..806009398ee 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() ..()