Skip to content

Commit

Permalink
[MIRROR] Fixes a spurious runtime in AI code (#1826)
Browse files Browse the repository at this point in the history
* [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 <[email protected]>

* Update ghost_role.dm

---------

Co-authored-by: NovaBot <[email protected]>
Co-authored-by: Bloop <[email protected]>
Co-authored-by: Iajret <[email protected]>
  • Loading branch information
4 people authored Feb 7, 2024
1 parent d9d84ed commit 1dfac16
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 6 deletions.
4 changes: 1 addition & 3 deletions code/datums/ai/generic/find_and_set.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 0 additions & 1 deletion code/modules/jobs/job_types/spawner/ghost_role.dm
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@
/datum/job/ghost_role
title = ROLE_GHOST_ROLE
policy_index = ROLE_GHOST_ROLE
paycheck = PAYCHECK_ZERO // nuh uh
2 changes: 0 additions & 2 deletions code/modules/mob/living/basic/bots/cleanbot/cleanbot_ai.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/datum/job/ghost_role
paycheck = PAYCHECK_ZERO
1 change: 1 addition & 0 deletions tgstation.dme
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 1dfac16

Please sign in to comment.