From 6071eb3b636e435fa864645b02e4cdc02f21a473 Mon Sep 17 00:00:00 2001 From: ccomp5950 Date: Fri, 15 Jan 2016 21:19:53 -0500 Subject: [PATCH 1/3] Doesn't spawn inactive AI on malf. --- code/modules/mob/living/silicon/ai/latejoin.dm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/modules/mob/living/silicon/ai/latejoin.dm b/code/modules/mob/living/silicon/ai/latejoin.dm index 7c60bb75e43..e8796a4b1c7 100644 --- a/code/modules/mob/living/silicon/ai/latejoin.dm +++ b/code/modules/mob/living/silicon/ai/latejoin.dm @@ -1,6 +1,8 @@ var/global/list/empty_playable_ai_cores = list() /hook/roundstart/proc/spawn_empty_ai() + if(ticker && ticker.mode && ticker.mode.name == "Ai malfunction") + return 1 // Don't make empty AI's on malf. for(var/obj/effect/landmark/start/S in landmarks_list) if(S.name != "AI") continue From 58b9740df670796c51d9e0e7d5a8024d164dd440 Mon Sep 17 00:00:00 2001 From: ccomp5950 Date: Fri, 15 Jan 2016 21:22:36 -0500 Subject: [PATCH 2/3] Fixes runtime I noticed during Malf. Something spawns out on random space tiles during round start, might be malf but eh. runtime error: Cannot execute null.HasProximity(). proc name: Entered (/turf/Entered) source file: turf.dm,147 usr: null src: space (246,55,4) (/turf/space) call stack: space (246,55,4) (/turf/space): Entered(null) --- code/game/turfs/turf.dm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index 94e8726d368..559672bc40b 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -144,9 +144,10 @@ var/const/enterloopsanity = 100 if(objects > enterloopsanity) break objects++ spawn(0) - A.HasProximity(thing, 1) - if ((thing && A) && (thing.flags & PROXMOVE)) - thing.HasProximity(A, 1) + if(A) + A.HasProximity(thing, 1) + if ((thing && A) && (thing.flags & PROXMOVE)) + thing.HasProximity(A, 1) return /turf/proc/adjacent_fire_act(turf/simulated/floor/source, temperature, volume) From 64931a3fa59c929ec0375c7c507923a3600c0fe0 Mon Sep 17 00:00:00 2001 From: ccomp5950 Date: Sun, 17 Jan 2016 20:22:57 -0500 Subject: [PATCH 3/3] Uses "Disabled_Jobs" instead to block the empty ai_core. --- code/modules/mob/living/silicon/ai/latejoin.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/mob/living/silicon/ai/latejoin.dm b/code/modules/mob/living/silicon/ai/latejoin.dm index e8796a4b1c7..0ea59bb7347 100644 --- a/code/modules/mob/living/silicon/ai/latejoin.dm +++ b/code/modules/mob/living/silicon/ai/latejoin.dm @@ -1,8 +1,8 @@ var/global/list/empty_playable_ai_cores = list() /hook/roundstart/proc/spawn_empty_ai() - if(ticker && ticker.mode && ticker.mode.name == "Ai malfunction") - return 1 // Don't make empty AI's on malf. + if("AI" in ticker.mode.disabled_jobs) + return 1 // Don't make empty AI's if you can't have them (also applies to Malf) for(var/obj/effect/landmark/start/S in landmarks_list) if(S.name != "AI") continue