Probably fixes the bug with voresprite turbo updates (#6947)

This commit is contained in:
Verkister
2023-09-10 10:50:06 +03:00
committed by GitHub
parent b8d9aaef0b
commit f8bd23d59b
3 changed files with 9 additions and 7 deletions

View File

@@ -453,10 +453,12 @@
// Called whenever an atom leaves this belly
/obj/belly/Exited(atom/movable/thing, atom/OldLoc)
. = ..()
thing.exit_belly(src) // CHOMPedit - atom movable proc, does nothing by default. Overridden in children for special behavior.
if(isbelly(thing.loc)) //CHOMPEdit
if(count_items_for_sprite) //CHOMPEdit
owner.update_fullness() //CHOMPEdit
thing.exit_belly(src) // CHOMPEdit - atom movable proc, does nothing by default. Overridden in children for special behavior.
if(isbelly(thing.loc)) //CHOMPEdit Start
var/obj/belly/NB = thing.loc
if(count_items_for_sprite && !NB.count_items_for_sprite)
owner.update_fullness()
return //CHOMPEdit End
if(isliving(thing) && !isbelly(thing.loc))
owner.update_fullness() //CHOMPEdit - This is run whenever a belly's contents are changed.
var/mob/living/L = thing

View File

@@ -34,6 +34,8 @@
updating_fullness = TRUE
spawn(2)
updating_fullness = FALSE
src.update_fullness(TRUE)
return
var/list/new_fullness = list()
vore_fullness = 0
for(var/belly_class in vore_icon_bellies)
@@ -56,6 +58,7 @@
if(vore_fullness < 0)
vore_fullness = 0
vore_fullness = min(vore_capacity, vore_fullness)
updating_fullness = FALSE
return new_fullness

View File

@@ -2,9 +2,6 @@
if(!returning)
if(updating_fullness)
return
updating_fullness = TRUE
spawn(2)
updating_fullness = FALSE
var/previous_stomach_fullness = vore_fullness_ex["stomach"]
var/previous_taur_fullness = vore_fullness_ex["taur belly"]
//update_vore_tail_sprite()