diff --git a/code/modules/mob/living/silicon/robot/robot_vr.dm b/code/modules/mob/living/silicon/robot/robot_vr.dm index cc142c9217..2d0f550c0e 100644 --- a/code/modules/mob/living/silicon/robot/robot_vr.dm +++ b/code/modules/mob/living/silicon/robot/robot_vr.dm @@ -109,7 +109,7 @@ if(dogborg == TRUE && stat == CONSCIOUS) //update_fullness() // CHOMPEdit - Needed so that we can have the vore sprites when only using vore bellies //CHOMPEdit begin - Add multiple belly size support - //Add a check when selecting a chassis if you add in support for this, to set vore_capacity to 2 or however many states you have. + //Add a check when selecting an icon in robot.dm if you add in support for this, to set vore_capacity to 2 or however many states you have. var/fullness_extension = "" if(vore_capacity_ex["stomach"] > 1 && vore_fullness_ex["stomach"] > 1) fullness_extension = "_[vore_fullness_ex["stomach"]]" diff --git a/code/modules/vore/eating/belly_obj_ch.dm b/code/modules/vore/eating/belly_obj_ch.dm index c6f034702d..b475d67d49 100644 --- a/code/modules/vore/eating/belly_obj_ch.dm +++ b/code/modules/vore/eating/belly_obj_ch.dm @@ -119,13 +119,13 @@ var/fullness_to_add = 0 if(I.w_class == ITEMSIZE_TINY) fullness_to_add = ITEMSIZE_COST_TINY - if(I.w_class == ITEMSIZE_SMALL) + else if(I.w_class == ITEMSIZE_SMALL) fullness_to_add = ITEMSIZE_COST_SMALL - if(I.w_class == ITEMSIZE_NORMAL) + else if(I.w_class == ITEMSIZE_NORMAL) fullness_to_add = ITEMSIZE_COST_NORMAL - if(I.w_class == ITEMSIZE_LARGE) + else if(I.w_class == ITEMSIZE_LARGE) fullness_to_add = ITEMSIZE_COST_LARGE - if(I.w_class == ITEMSIZE_HUGE) + else if(I.w_class == ITEMSIZE_HUGE) fullness_to_add = ITEMSIZE_COST_HUGE else fullness_to_add = ITEMSIZE_COST_NO_CONTAINER @@ -161,6 +161,8 @@ owner.nutrition -= gen_cost for(var/reagent in generated_reagents) reagents.add_reagent(reagent, generated_reagents[reagent]) + if(count_liquid_for_sprite) + owner.update_fullness() //CHOMPEdit - This is run whenever a belly's contents are changed. //////////////////////////// REAGENT_DIGEST //////////////////////// diff --git a/code/modules/vore/eating/belly_obj_vr.dm b/code/modules/vore/eating/belly_obj_vr.dm index c9f7e1cba8..d6493b3842 100644 --- a/code/modules/vore/eating/belly_obj_vr.dm +++ b/code/modules/vore/eating/belly_obj_vr.dm @@ -364,6 +364,8 @@ //Stop AI processing in bellies if(M.ai_holder) M.ai_holder.go_sleep() + else if(count_items_for_sprite) //CHOMPEdit - If this is enabled also update fullness for non-living things + owner.update_fullness() //CHOMPEdit - This is run whenever a belly's contents are changed. if(istype(thing, /obj/item/capture_crystal)) //CHOMPEdit: Capture crystal occupant gets to see belly text too. var/obj/item/capture_crystal/CC = thing if(CC.bound_mob && desc) @@ -392,6 +394,8 @@ if((L.stat != DEAD) && L.ai_holder) L.ai_holder.go_wake() if(isitem(thing) && !isbelly(thing.loc)) //CHOMPEdit: Digest stage effects. Don't bother adding overlays to stuff that won't make it back out. + if(count_items_for_sprite) //CHOMPEdit - If this is enabled also update fullness for non-living things + owner.update_fullness() //CHOMPEdit - This is run whenever a belly's contents are changed. var/obj/item/I = thing if(I.gurgled) I.cut_overlay(gurgled_overlays[I.gurgled_color]) //No double-overlay for worn items. diff --git a/code/modules/vore/eating/bellymodes_datum_vr.dm b/code/modules/vore/eating/bellymodes_datum_vr.dm index 10bca8b781..a7ee0df51e 100644 --- a/code/modules/vore/eating/bellymodes_datum_vr.dm +++ b/code/modules/vore/eating/bellymodes_datum_vr.dm @@ -52,6 +52,8 @@ GLOBAL_LIST_INIT(digest_modes, list()) L.adjust_nutrition(paratox) L.adjustBruteLoss(-paratox*2) //Should automaticaly clamp to 0 L.adjustFireLoss(-paratox*2) //Should automaticaly clamp to 0 + if(B.health_impacts_size) //CHOMPEdit - Health probably changed so... + B.owner.update_fullness() //CHOMPEdit - This is run whenever a belly's contents are changed. return //CHOMPedit end @@ -77,6 +79,8 @@ GLOBAL_LIST_INIT(digest_modes, list()) damage_gain = damage_gain * 0.5 var/offset = (1 + ((L.weight - 137) / 137)) // 130 pounds = .95 140 pounds = 1.02 var/difference = B.owner.size_multiplier / L.size_multiplier + if(B.health_impacts_size) //CHOMPEdit - Health probably changed so... + B.owner.update_fullness() //CHOMPEdit - This is run whenever a belly's contents are changed. if(isrobot(B.owner)) if(B.reagent_mode_flags & DM_FLAG_REAGENTSDIGEST && B.reagents.total_volume < B.reagents.maximum_volume) //CHOMPedit start: digestion producing reagents var/mob/living/silicon/robot/R = B.owner @@ -133,6 +137,7 @@ GLOBAL_LIST_INIT(digest_modes, list()) /datum/digest_mode/drain/shrink/process_mob(obj/belly/B, mob/living/L) if(L.size_multiplier > B.shrink_grow_size) L.resize(L.size_multiplier - 0.01) // Shrink by 1% per tick + B.owner.update_fullness() //CHOMPEdit - This is run whenever a belly's contents are changed. . = ..() /datum/digest_mode/grow @@ -142,6 +147,7 @@ GLOBAL_LIST_INIT(digest_modes, list()) /datum/digest_mode/grow/process_mob(obj/belly/B, mob/living/L) if(L.size_multiplier < B.shrink_grow_size) L.resize(L.size_multiplier + 0.01) // Shrink by 1% per tick + B.owner.update_fullness() //CHOMPEdit - This is run whenever a belly's contents are changed. /datum/digest_mode/drain/sizesteal id = DM_SIZE_STEAL @@ -150,6 +156,7 @@ GLOBAL_LIST_INIT(digest_modes, list()) if(L.size_multiplier > B.shrink_grow_size && B.owner.size_multiplier < 2) //Grow until either pred is large or prey is small. B.owner.resize(B.owner.size_multiplier + 0.01) //Grow by 1% per tick. L.resize(L.size_multiplier - 0.01) //Shrink by 1% per tick + B.owner.update_fullness() //CHOMPEdit - This is run whenever a belly's contents are changed. . = ..() /datum/digest_mode/heal @@ -167,11 +174,15 @@ GLOBAL_LIST_INIT(digest_modes, list()) if(O.brute_dam > 0 || O.burn_dam > 0) //Making sure healing continues until fixed. O.heal_damage(0.5, 0.5, 0, 1) // Less effective healing as able to fix broken limbs B.owner.adjust_nutrition(-5) // More costly for the pred, since metals and stuff + if(B.health_impacts_size) //CHOMPEdit - Health probably changed so... + B.owner.update_fullness() //CHOMPEdit - This is run whenever a belly's contents are changed. if(L.health < L.maxHealth) L.adjustToxLoss(-2) L.adjustOxyLoss(-2) L.adjustCloneLoss(-1) B.owner.adjust_nutrition(-1) // Normal cost per old functionality + if(B.health_impacts_size) //CHOMPEdit - Health probably changed so... + B.owner.update_fullness() //CHOMPEdit - This is run whenever a belly's contents are changed. if(B.owner.nutrition > 90 && (L.health < L.maxHealth) && !H.isSynthetic()) L.adjustBruteLoss(-2.5) L.adjustFireLoss(-2.5) @@ -179,6 +190,8 @@ GLOBAL_LIST_INIT(digest_modes, list()) L.adjustOxyLoss(-5) L.adjustCloneLoss(-1.25) B.owner.adjust_nutrition(-2) + if(B.health_impacts_size) //CHOMPEdit - Health probably changed so... + B.owner.update_fullness() //CHOMPEdit - This is run whenever a belly's contents are changed. if(L.nutrition <= 400) L.adjust_nutrition(1) else if(B.owner.nutrition > 90 && (L.nutrition <= 400)) @@ -326,4 +339,4 @@ GLOBAL_LIST_INIT(digest_modes, list()) tempmode = DM_DIGEST // If not absorbable, are they digestible? Then digest. else tempmode = DM_DRAIN // Otherwise drain. - return tempmode \ No newline at end of file + return tempmode diff --git a/code/modules/vore/eating/living_ch.dm b/code/modules/vore/eating/living_ch.dm index 46bd2fb3c5..e74336cf49 100644 --- a/code/modules/vore/eating/living_ch.dm +++ b/code/modules/vore/eating/living_ch.dm @@ -154,6 +154,8 @@ user.custom_emote_vr(1, "[RTB.reagent_transfer_verb] [RTB.reagent_name] from [TG]'s [lowertext(RTB.name)] into their [lowertext(TB.name)].") add_attack_logs(user,TR,"Transfered [RTB.reagent_name] from [TG]'s [RTB] to [TR]'s [TB]") //Bonus for staff so they can see if people have abused transfer and done pref breaks RTB.reagents.vore_trans_to_mob(TR, transfer_amount, CHEM_VORE, 1, 0, TB) + if(RTB.count_liquid_for_sprite || TB.count_liquid_for_sprite) + update_fullness() else if(TR.receive_reagents == FALSE) to_chat(user, "This person's prefs dont allow that!") @@ -176,6 +178,10 @@ RTB.reagents.vore_trans_to_mob(TR, transfer_amount, CHEM_VORE, 1, 0, TB) add_attack_logs(user,TR,"Transfered reagents from [TG]'s [RTB] to [TR]'s [TB]") //Bonus for staff so they can see if people have abused transfer and done pref breaks + if(RTB.count_liquid_for_sprite) + update_fullness() + if(TB.count_liquid_for_sprite) + TR.update_fullness() if("Stomach") @@ -191,6 +197,8 @@ user.custom_emote_vr(1, "[RTB.reagent_transfer_verb] [RTB.reagent_name] from [TG]'s [lowertext(RTB.name)] into their stomach.") RTB.reagents.vore_trans_to_mob(TR, transfer_amount, CHEM_INGEST, 1, 0, null) add_attack_logs(user,TR,"Transfered [RTB.reagent_name] from [TG]'s [RTB] to [TR]'s Stomach") + if(RTB.count_liquid_for_sprite) + update_fullness() else if(TR.receive_reagents == FALSE) to_chat(user, "This person's prefs dont allow that!") @@ -204,6 +212,8 @@ RTB.reagents.vore_trans_to_mob(TR, transfer_amount, CHEM_INGEST, 1, 0, null) add_attack_logs(user,TR,"Transfered [RTB.reagent_name] from [TG]'s [RTB] to [TR]'s Stomach") //Bonus for staff so they can see if people have abused transfer and done pref breaks + if(RTB.count_liquid_for_sprite) + update_fullness() if("Container") var/list/choices = list() @@ -222,10 +232,14 @@ RTB.reagents.vore_trans_to_con(T, transfer_amount, 1, 0) add_attack_logs(user, T,"Transfered [RTB.reagent_name] from [TG]'s [RTB] to a [T]") //Bonus for staff so they can see if people have abused transfer and done pref breaks + if(RTB.count_liquid_for_sprite) + update_fullness() if("Floor") if(RTB.reagentid == "water") return var/amount_removed = RTB.reagents.remove_any(transfer_amount) + if(RTB.count_liquid_for_sprite) + update_fullness() var/puddle_amount = round(amount_removed/5) if(puddle_amount == 0) diff --git a/tgui/packages/tgui/interfaces/VorePanel.js b/tgui/packages/tgui/interfaces/VorePanel.js index 25ea1a6b3f..0c159870ed 100644 --- a/tgui/packages/tgui/interfaces/VorePanel.js +++ b/tgui/packages/tgui/interfaces/VorePanel.js @@ -933,6 +933,14 @@ const VoreSelectedBellyVisuals = (props, context) => { content={item_multiplier} /> + +