From ec7265d783251c8ee816c8a979597728cb0e3f1b Mon Sep 17 00:00:00 2001 From: deathride58 Date: Wed, 3 Apr 2019 00:12:09 -0400 Subject: [PATCH] Attempts to fix the bug where voreprefs sometimes fail to load at all by making client login force voreprefs to load if vore has been initialized but voreprefs havent --- code/modules/mob/living/login.dm | 4 +++- modular_citadel/code/modules/vore/eating/living_vr.dm | 4 ++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/code/modules/mob/living/login.dm b/code/modules/mob/living/login.dm index 611d9dbc4c..046d25a4b2 100644 --- a/code/modules/mob/living/login.dm +++ b/code/modules/mob/living/login.dm @@ -22,4 +22,6 @@ to_chat(src, "You can ventcrawl! Use alt+click on vents to quickly travel about the station.") if(ranged_ability) - ranged_ability.add_ranged_ability(src, "You currently have [ranged_ability] active!") \ No newline at end of file + ranged_ability.add_ranged_ability(src, "You currently have [ranged_ability] active!") + if(vore_init && !vorepref_init) //Vore's been initialized, voreprefs haven't. If this triggers then that means that voreprefs failed to load due to the client being missing. + apply_vore_prefs() diff --git a/modular_citadel/code/modules/vore/eating/living_vr.dm b/modular_citadel/code/modules/vore/eating/living_vr.dm index 7848f1f913..ee503c3c7e 100644 --- a/modular_citadel/code/modules/vore/eating/living_vr.dm +++ b/modular_citadel/code/modules/vore/eating/living_vr.dm @@ -12,6 +12,8 @@ var/noisy = TRUE // tummies are rumbly? var/absorbed = FALSE //are we absorbed? var/next_preyloop + var/vore_init = FALSE //Has this mob's vore been initialized yet? + var/vorepref_init = FALSE //Has this mob's voreprefs been initialized? // // Hook for generic creation of stuff on new creatures @@ -34,6 +36,7 @@ return 1 /mob/living/proc/init_vore() + vore_init = TRUE //Something else made organs, meanwhile. if(LAZYLEN(vore_organs)) return TRUE @@ -407,6 +410,7 @@ if(!client || !client.prefs_vr) to_chat(src,"You attempted to apply your vore prefs but somehow you're in this character without a client.prefs_vr variable. Tell a dev.") return 0 + vorepref_init = TRUE var/datum/vore_preferences/P = client.prefs_vr