Adds belly overlay setting for solid contents to affect mush level (#6706)

This commit is contained in:
Verkister
2023-08-02 09:01:49 +03:00
committed by GitHub
parent 6779440c8e
commit a7c7b8f31e
6 changed files with 38 additions and 6 deletions

View File

@@ -21,6 +21,7 @@
var/mush_alpha = 255 //Mush overlay transparency.
var/max_mush = 500 //How much nutrition for full mush overlay
var/min_mush = 0 //Manual setting for lowest mush level
var/item_mush_val = 0 //How much solid belly contents raise mush level per item
var/nutri_reagent_gen = FALSE //if belly produces reagent over time using nutrition, needs to be optimized to use subsystem - Jack
var/list/generated_reagents = list("water" = 1) //Any number of reagents, the associated value is how many units are generated per process()

View File

@@ -268,6 +268,7 @@
"mush_alpha",
"max_mush",
"min_mush",
"item_mush_val",
"custom_reagentcolor",
"custom_reagentalpha",
"gen_cost",
@@ -535,7 +536,8 @@
I = image('modular_chomp/icons/mob/vore_fullscreens/bubbles.dmi', "mush")
I.color = mush_color
I.alpha = mush_alpha
I.pixel_y = -450 + (450 / max(max_mush, 1) * max(min(max_mush, owner.nutrition), 1))
var/total_mush_content = owner.nutrition + LAZYLEN(contents) * item_mush_val
I.pixel_y = -450 + (450 / max(max_mush, 1) * max(min(max_mush, total_mush_content), 1))
if(I.pixel_y < -450 + (450 / 100 * min_mush))
I.pixel_y = -450 + (450 / 100 * min_mush)
F.add_overlay(I)
@@ -568,7 +570,8 @@
I = image('modular_chomp/icons/mob/vore_fullscreens/bubbles.dmi', "mush")
I.color = mush_color
I.alpha = mush_alpha
I.pixel_y = -450 + (450 / max(max_mush, 1) * max(min(max_mush, owner.nutrition), 1))
var/total_mush_content = owner.nutrition + LAZYLEN(contents) * item_mush_val
I.pixel_y = -450 + (450 / max(max_mush, 1) * max(min(max_mush, total_mush_content), 1))
if(I.pixel_y < -450 + (450 / 100 * min_mush))
I.pixel_y = -450 + (450 / 100 * min_mush)
F.add_overlay(I)
@@ -648,7 +651,8 @@
I = image('modular_chomp/icons/mob/vore_fullscreens/bubbles.dmi', "mush")
I.color = mush_color
I.alpha = mush_alpha
I.pixel_y = -450 + (450 / max(max_mush, 1) * max(min(max_mush, owner.nutrition), 1))
var/total_mush_content = owner.nutrition + LAZYLEN(contents) * item_mush_val
I.pixel_y = -450 + (450 / max(max_mush, 1) * max(min(max_mush, total_mush_content), 1))
if(I.pixel_y < -450 + (450 / 100 * min_mush))
I.pixel_y = -450 + (450 / 100 * min_mush)
F.add_overlay(I)
@@ -680,7 +684,8 @@
I = image('modular_chomp/icons/mob/vore_fullscreens/bubbles.dmi', "mush")
I.color = mush_color
I.alpha = mush_alpha
I.pixel_y = -450 + (450 / max(max_mush, 1) * max(min(max_mush, owner.nutrition), 1))
var/total_mush_content = owner.nutrition + LAZYLEN(contents) * item_mush_val
I.pixel_y = -450 + (450 / max(max_mush, 1) * max(min(max_mush, total_mush_content), 1))
if(I.pixel_y < -450 + (450 / 100 * min_mush))
I.pixel_y = -450 + (450 / 100 * min_mush)
F.add_overlay(I)
@@ -1659,6 +1664,7 @@
dupe.mush_alpha = mush_alpha
dupe.max_mush = max_mush
dupe.min_mush = min_mush
dupe.item_mush_val = item_mush_val
dupe.custom_reagentcolor = custom_reagentcolor
dupe.custom_reagentalpha = custom_reagentalpha
dupe.gen_cost = gen_cost

View File

@@ -244,6 +244,7 @@ var/global/list/belly_colorable_only_fullscreens = list("a_synth_flesh_mono",
"mush_alpha" = selected.mush_alpha,
"max_mush" = selected.max_mush,
"min_mush" = selected.min_mush,
"item_mush_val" = selected.item_mush_val,
"vorespawn_blacklist" = selected.vorespawn_blacklist,
"sound_volume" = selected.sound_volume,
"affects_voresprite" = selected.affects_vore_sprites,
@@ -385,6 +386,7 @@ var/global/list/belly_colorable_only_fullscreens = list("a_synth_flesh_mono",
selected_list["liq_interacts"]["mush_alpha"] = selected.mush_alpha
selected_list["liq_interacts"]["max_mush"] = selected.max_mush
selected_list["liq_interacts"]["min_mush"] = selected.min_mush
selected_list["liq_interacts"]["item_mush_val"] = selected.item_mush_val
selected_list["show_liq_fullness"] = selected.show_fullness_messages
selected_list["liq_messages"] = list()
@@ -1278,6 +1280,10 @@ var/global/list/belly_colorable_only_fullscreens = list("a_synth_flesh_mono",
var/min_mush = belly_data["min_mush"]
new_belly.min_mush = CLAMP(min_mush, 0, 100)
if(isnum(belly_data["item_mush_val"]))
var/item_mush_val = belly_data["item_mush_val"]
new_belly.item_mush_val = CLAMP(item_mush_val, 0, 1000)
if(isnum(belly_data["liquid_overlay"]))
var/new_liquid_overlay = belly_data["liquid_overlay"]
if(new_liquid_overlay == 0)
@@ -3054,6 +3060,14 @@ var/global/list/belly_colorable_only_fullscreens = list("a_synth_flesh_mono",
host.vore_selected.min_mush = new_new_min_mush
host.vore_selected.update_internal_overlay()
. = TRUE
if("b_item_mush_val")
var/new_item_mush_val = input(user, "Set how much solid belly contents affect mush level. 0-1000 fullness per item.", "Set Item Mush Value.", host.vore_selected.item_mush_val) as num|null
if(new_item_mush_val == null)
return FALSE
var/new_new_item_mush_val = CLAMP(new_item_mush_val, 0, 1000)
host.vore_selected.item_mush_val = new_new_item_mush_val
host.vore_selected.update_internal_overlay()
. = TRUE
if("b_liq_purge")
var/alert = alert("Are you sure you want to delete the liquids in your [lowertext(host.vore_selected.name)]?","Confirmation","Delete","Cancel")
if(!(alert == "Delete"))

View File

@@ -1713,6 +1713,7 @@ const VoreSelectedBellyLiquidOptions = (props, context) => {
mush_alpha,
max_mush,
min_mush,
item_mush_val,
} = belly;
return (
@@ -1909,6 +1910,16 @@ const VoreSelectedBellyLiquidOptions = (props, context) => {
content={liq_interacts.min_mush + '%'}
/>
</LabeledList.Item>
<LabeledList.Item label="Item Mush Value">
<Button
onClick={() =>
act('liq_set_attribute', {
liq_attribute: 'b_item_mush_val',
})
}
content={liq_interacts.item_mush_val + ' fullness per item'}
/>
</LabeledList.Item>
<LabeledList.Item label="Purge Liquids">
<Button
color="red"

File diff suppressed because one or more lines are too long

View File

@@ -4772,8 +4772,8 @@
#include "modular_chomp\code\modules\vore\resizing\resize.dm"
#include "modular_chomp\code\modules\weapons\melee.dm"
#include "modular_chomp\code\modules\xenobio\machinery\monkey_processor.dm"
#include "modular_chomp\maps\overmap\aegis_carrier\aegis_objs.dm"
#include "modular_chomp\game\objects\effects\spiders.dm"
#include "modular_chomp\maps\overmap\aegis_carrier\aegis_objs.dm"
#include "modular_chomp\maps\overmap\space_pois\space_areas.dm"
#include "modular_chomp\maps\overmap\space_pois\space_pois.dm"
#include "modular_chomp\maps\submaps\engine_submaps\engine.dm"