Fixes vorepanel reload.

Adds a proc argument var for the vorebelly reload to bypass the 1-belly vore init load optimization thingy.
This commit is contained in:
Verkister
2021-04-07 13:28:26 +03:00
parent 1b9c7ace1a
commit df3288aa99
2 changed files with 6 additions and 5 deletions

View File

@@ -208,12 +208,12 @@
return TRUE
/mob/living/proc/apply_vore_prefs()
/mob/living/proc/apply_vore_prefs(var/full_vorgans = FALSE) //CHOMPedit: full_vorgans var to bypass 1-belly load optimization.
if(!client || !client.prefs_vr)
return FALSE
if(!client.prefs_vr.load_vore())
return FALSE
if(!copy_from_prefs_vr())
if(!copy_from_prefs_vr(full_vorgans = full_vorgans)) //CHOMPedit: full_vorgans var to bypass 1-belly load optimization.
return FALSE
return TRUE
@@ -259,7 +259,7 @@
//
// Proc for applying vore preferences, given bellies
//
/mob/living/proc/copy_from_prefs_vr(var/bellies = TRUE)
/mob/living/proc/copy_from_prefs_vr(var/bellies = TRUE, var/full_vorgans = FALSE) //CHOMPedit: full_vorgans var to bypass 1-belly load optimization.
if(!client || !client.prefs_vr)
to_chat(src,"<span class='warning'>You attempted to apply your vore prefs but somehow you're in this character without a client.prefs_vr variable. Tell a dev.</span>")
return FALSE
@@ -291,6 +291,7 @@
vore_organs.Cut()
for(var/entry in P.belly_prefs)
list_to_object(entry,src)
if(!full_vorgans) //CHOMPedit: full_vorgans var to bypass 1-belly load optimization.
break //CHOMPedit: Belly load optimization. Only load first belly, save the rest for vorepanel.
return TRUE

View File

@@ -355,7 +355,7 @@
var/alert = alert("Are you sure you want to reload character slot preferences? This will remove your current vore organs and eject their contents.","Confirmation","Reload","Cancel")
if(alert != "Reload")
return FALSE
if(!host.apply_vore_prefs())
if(!host.apply_vore_prefs(TRUE)) //CHOMPedit: full_vorgans var to bypass 1-belly load optimization.
alert("ERROR: Chomp-specific preferences failed to apply!","Error")
else
to_chat(usr,"<span class='notice'>Chomp-specific preferences applied from active slot!</span>")