From 9319b62bd19605644527b4ab5843435aa93abe43 Mon Sep 17 00:00:00 2001 From: Verkister Date: Sat, 14 Dec 2019 11:12:41 +0200 Subject: [PATCH] Some runtime spam fixes. Also fixes fake AO. -Fixes several instances of runtime spam caused by lack of sanity checks in nifsoft procs. -Fixes a runtime spam caused by 512>513 transition having renamed a fake ao filter argument. -This also fixes the fake ao. --- code/__defines/lighting.dm | 2 +- code/modules/nifsoft/nifsoft.dm | 6 ++++-- code/modules/nifsoft/software/13_soulcatcher.dm | 4 ++++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/code/__defines/lighting.dm b/code/__defines/lighting.dm index 0425c3fa63e..60513c5a8ff 100644 --- a/code/__defines/lighting.dm +++ b/code/__defines/lighting.dm @@ -84,4 +84,4 @@ #define LIGHT_COLOR_INCANDESCENT_FLASHLIGHT "#FFCC66" //Fake ambient occlusion filter -#define AMBIENT_OCCLUSION filter(type="drop_shadow", x=0, y=-2, size=4, border=4, color="#04080FAA") +#define AMBIENT_OCCLUSION filter(type="drop_shadow", x=0, y=-2, size=4, offset=4, color="#04080FAA") diff --git a/code/modules/nifsoft/nifsoft.dm b/code/modules/nifsoft/nifsoft.dm index 6f110de8566..0df241799fb 100644 --- a/code/modules/nifsoft/nifsoft.dm +++ b/code/modules/nifsoft/nifsoft.dm @@ -61,13 +61,15 @@ //Called when the software is installed in the NIF /datum/nifsoft/proc/install() + if(!nif) + return return nif.install(src) //Called when the software is removed from the NIF /datum/nifsoft/proc/uninstall() - if(active) - deactivate() if(nif) + if(active) + deactivate() . = nif.uninstall(src) nif = null if(!QDESTROYING(src)) diff --git a/code/modules/nifsoft/software/13_soulcatcher.dm b/code/modules/nifsoft/software/13_soulcatcher.dm index 48ca4324204..1dd2c354c65 100644 --- a/code/modules/nifsoft/software/13_soulcatcher.dm +++ b/code/modules/nifsoft/software/13_soulcatcher.dm @@ -55,10 +55,14 @@ nif.human.verbs -= /mob/living/carbon/human/proc/nme proc/save_settings() + if(!nif) + return nif.save_data["[list_pos]"] = inside_flavor return TRUE proc/load_settings() + if(!nif) + return var/load = nif.save_data["[list_pos]"] if(load) inside_flavor = load