Adds on-demand belly loading for simplemobs.

-Voremob bellies only get loaded in when they either try to use the belly or open their vorepanel (in case of player-controlled mobs)
This commit is contained in:
Verkister
2021-03-22 13:09:22 +02:00
parent 2059c83bc2
commit bb3571c810
2 changed files with 12 additions and 1 deletions
@@ -50,6 +50,8 @@
var/obj/item/device/radio/headset/mob_headset/mob_radio //Adminbus headset for simplemob shenanigans.
does_spin = FALSE
var/voremob_loaded = FALSE //CHOMPedit: On-demand belly loading.
// Release belly contents before being gc'd!
/mob/living/simple_mob/Destroy()
release_vore_contents()
@@ -191,7 +193,7 @@
// Make sure you don't call ..() on this one, otherwise you duplicate work.
/mob/living/simple_mob/init_vore()
if(!vore_active || no_vore)
if(!vore_active || no_vore || !voremob_loaded) //CHOMPedit: On-demand belly loading.
return
if(LAZYLEN(vore_organs))
@@ -3,6 +3,12 @@
var/swallowTime = (3 SECONDS) //How long it takes to eat its prey in 1/10 of a second. The default is 3 seconds.
var/list/prey_excludes = list() //For excluding people from being eaten.
/mob/living/simple_mob/insidePanel() //CHOMPedit: On-demand belly loading.
if(vore_active && !voremob_loaded)
voremob_loaded = TRUE
init_vore()
..()
//
// Simple nom proc for if you get ckey'd into a simple_mob mob! Avoids grabs.
//
@@ -11,6 +17,9 @@
set category = "IC"
set desc = "Since you can't grab, you get a verb!"
if(vore_active && !voremob_loaded) //CHOMPedit: On-demand belly loading.
voremob_loaded = TRUE
init_vore()
if(stat != CONSCIOUS)
return
// Verbs are horrifying. They don't call overrides. So we're stuck with this.