From 1dfac16f41e86bc46b976c5e87ad8df5b9a5e355 Mon Sep 17 00:00:00 2001 From: Iajret Creature <122297233+Steals-The-PRs@users.noreply.github.com> Date: Thu, 8 Feb 2024 02:49:22 +0300 Subject: [PATCH] [MIRROR] Fixes a spurious runtime in AI code (#1826) * [MIRROR] Fixes a spurious runtime in AI code (#784) * Fixes a spurious runtime in AI code * Update TODO * Fixes this nonmodular edit --------- Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com> * Update ghost_role.dm --------- Co-authored-by: NovaBot <154629622+NovaBot13@users.noreply.github.com> Co-authored-by: Bloop <13398309+vinylspiders@users.noreply.github.com> Co-authored-by: Iajret --- code/datums/ai/generic/find_and_set.dm | 4 +--- code/modules/jobs/job_types/spawner/ghost_role.dm | 1 - code/modules/mob/living/basic/bots/cleanbot/cleanbot_ai.dm | 2 -- .../code/modules/jobs/job_types/spawner/ghost_role.dm | 2 ++ tgstation.dme | 1 + 5 files changed, 4 insertions(+), 6 deletions(-) create mode 100644 modular_nova/master_files/code/modules/jobs/job_types/spawner/ghost_role.dm diff --git a/code/datums/ai/generic/find_and_set.dm b/code/datums/ai/generic/find_and_set.dm index 27545a9a6be..fbddc33075c 100644 --- a/code/datums/ai/generic/find_and_set.dm +++ b/code/datums/ai/generic/find_and_set.dm @@ -11,13 +11,11 @@ if (controller.blackboard_key_exists(set_key)) finish_action(controller, TRUE) return - // NOVA EDIT ADDITION START - TODO: REVERT TO TG ONCE FIX COMES IN if(QDELETED(controller.pawn)) finish_action(controller, FALSE) return - // NOVA ADDITION END var/find_this_thing = search_tactic(controller, locate_path, search_range) - if(isnull(find_this_thing)) // NOVA EDIT CHANGE - TODO: REVERT TO TG ONCE FIX COMES IN + if(isnull(find_this_thing)) finish_action(controller, FALSE) return controller.set_blackboard_key(set_key, find_this_thing) diff --git a/code/modules/jobs/job_types/spawner/ghost_role.dm b/code/modules/jobs/job_types/spawner/ghost_role.dm index 8d8a7b64874..df49b67302e 100644 --- a/code/modules/jobs/job_types/spawner/ghost_role.dm +++ b/code/modules/jobs/job_types/spawner/ghost_role.dm @@ -3,4 +3,3 @@ /datum/job/ghost_role title = ROLE_GHOST_ROLE policy_index = ROLE_GHOST_ROLE - paycheck = PAYCHECK_ZERO // nuh uh diff --git a/code/modules/mob/living/basic/bots/cleanbot/cleanbot_ai.dm b/code/modules/mob/living/basic/bots/cleanbot/cleanbot_ai.dm index 686cd1580ee..537490c8431 100644 --- a/code/modules/mob/living/basic/bots/cleanbot/cleanbot_ai.dm +++ b/code/modules/mob/living/basic/bots/cleanbot/cleanbot_ai.dm @@ -75,10 +75,8 @@ var/list/found = typecache_filter_list(oview(search_range, controller.pawn), locate_paths) var/list/ignore_list = controller.blackboard[BB_TEMPORARY_IGNORE_LIST] for(var/atom/found_item in found) - // NOVA EDIT ADDITION START - TODO: REVERT TO TG ONCE FIX COMES IN if(QDELETED(controller.pawn)) break - // NOVA EDIT ADDITION END if(LAZYACCESS(ignore_list, REF(found_item))) continue var/list/path = get_path_to(controller.pawn, found_item, max_distance = BOT_CLEAN_PATH_LIMIT, access = controller.get_access()) diff --git a/modular_nova/master_files/code/modules/jobs/job_types/spawner/ghost_role.dm b/modular_nova/master_files/code/modules/jobs/job_types/spawner/ghost_role.dm new file mode 100644 index 00000000000..fa622912aee --- /dev/null +++ b/modular_nova/master_files/code/modules/jobs/job_types/spawner/ghost_role.dm @@ -0,0 +1,2 @@ +/datum/job/ghost_role + paycheck = PAYCHECK_ZERO diff --git a/tgstation.dme b/tgstation.dme index 86221dddd07..da0e385e0e9 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -6442,6 +6442,7 @@ #include "modular_nova\master_files\code\modules\jobs\job_types\spawner\blackmarket.dm" #include "modular_nova\master_files\code\modules\jobs\job_types\spawner\ds2.dm" #include "modular_nova\master_files\code\modules\jobs\job_types\spawner\freighter_crew.dm" +#include "modular_nova\master_files\code\modules\jobs\job_types\spawner\ghost_role.dm" #include "modular_nova\master_files\code\modules\jobs\job_types\spawner\ghostcafe.dm" #include "modular_nova\master_files\code\modules\jobs\job_types\spawner\interdyne_planetary_base.dm" #include "modular_nova\master_files\code\modules\jobs\job_types\spawner\tarkon.dm"