mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 18:53:06 +00:00
Fixes vore belly icons not updating when content transfered from icon belly to iconless belly (#6731)
This commit is contained in:
@@ -453,6 +453,9 @@
|
|||||||
/obj/belly/Exited(atom/movable/thing, atom/OldLoc)
|
/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.
|
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
|
||||||
if(isliving(thing) && !isbelly(thing.loc))
|
if(isliving(thing) && !isbelly(thing.loc))
|
||||||
owner.update_fullness() //CHOMPEdit - This is run whenever a belly's contents are changed.
|
owner.update_fullness() //CHOMPEdit - This is run whenever a belly's contents are changed.
|
||||||
var/mob/living/L = thing
|
var/mob/living/L = thing
|
||||||
|
|||||||
@@ -22,10 +22,17 @@
|
|||||||
var/vore_sprite_color = list("stomach" = "#000", "taur belly" = "#000")
|
var/vore_sprite_color = list("stomach" = "#000", "taur belly" = "#000")
|
||||||
|
|
||||||
var/list/vore_icon_bellies = list("stomach")
|
var/list/vore_icon_bellies = list("stomach")
|
||||||
|
var/updating_fullness = FALSE
|
||||||
|
|
||||||
|
|
||||||
// Update fullness based on size & quantity of belly contents
|
// Update fullness based on size & quantity of belly contents
|
||||||
/mob/living/proc/update_fullness()
|
/mob/living/proc/update_fullness(var/returning = FALSE)
|
||||||
|
if(!returning)
|
||||||
|
if(updating_fullness)
|
||||||
|
return
|
||||||
|
updating_fullness = TRUE
|
||||||
|
spawn(2)
|
||||||
|
updating_fullness = FALSE
|
||||||
var/list/new_fullness = list()
|
var/list/new_fullness = list()
|
||||||
vore_fullness = 0
|
vore_fullness = 0
|
||||||
for(var/belly_class in vore_icon_bellies)
|
for(var/belly_class in vore_icon_bellies)
|
||||||
|
|||||||
@@ -1,9 +1,15 @@
|
|||||||
/mob/living/carbon/human/update_fullness()
|
/mob/living/carbon/human/update_fullness(var/returning = FALSE)
|
||||||
|
if(!returning)
|
||||||
|
if(updating_fullness)
|
||||||
|
return
|
||||||
|
updating_fullness = TRUE
|
||||||
|
spawn(2)
|
||||||
|
updating_fullness = FALSE
|
||||||
var/previous_stomach_fullness = vore_fullness_ex["stomach"]
|
var/previous_stomach_fullness = vore_fullness_ex["stomach"]
|
||||||
var/previous_taur_fullness = vore_fullness_ex["taur belly"]
|
var/previous_taur_fullness = vore_fullness_ex["taur belly"]
|
||||||
//update_vore_tail_sprite()
|
//update_vore_tail_sprite()
|
||||||
//update_vore_belly_sprite()
|
//update_vore_belly_sprite()
|
||||||
var/list/new_fullness = ..()
|
var/list/new_fullness = ..(TRUE)
|
||||||
. = new_fullness
|
. = new_fullness
|
||||||
for(var/datum/category_group/underwear/undergarment_class in global_underwear.categories)
|
for(var/datum/category_group/underwear/undergarment_class in global_underwear.categories)
|
||||||
if(!new_fullness[undergarment_class.name])
|
if(!new_fullness[undergarment_class.name])
|
||||||
|
|||||||
Reference in New Issue
Block a user