Add option to the interactions panel to trigger the belch emote on prey resisting. (#9106)

This commit is contained in:
NickBelmont
2024-10-02 16:43:43 -05:00
committed by GitHub
parent 8718256e1f
commit e45cf6a762
8 changed files with 31 additions and 1 deletions

View File

@@ -116,6 +116,7 @@
var/noise_freq = 42500 // Tasty sound prefs.
var/item_digest_logs = FALSE // Chat messages for digested items.
var/storing_nutrition = FALSE // Storing gained nutrition as paste instead of absorbing it.
var/belchchance = 0 // % Chance of pred belching on prey struggle
var/list/belly_surrounding = list() // A list of living mobs surrounded by this belly, including inside containers, food, on mobs, etc. Exclusing inside other bellies.

View File

@@ -359,6 +359,7 @@
"transferchance_secondary",
"transferlocation",
"transferlocation_secondary",
"belchchance", //CHOMPAdd
"bulge_size",
"display_absorbed_examine",
"shrink_grow_size",
@@ -1990,8 +1991,9 @@
playsound(src, struggle_snuggle, vary = 1, vol = 75, falloff = VORE_SOUND_FALLOFF, frequency = noise_freq, preference = /datum/preference/toggle/digestion_noises, volume_channel = VOLUME_CHANNEL_VORE) //CHOMPEdit
else
playsound(src, struggle_rustle, vary = 1, vol = 75, falloff = VORE_SOUND_FALLOFF, frequency = noise_freq, preference = /datum/preference/toggle/digestion_noises, volume_channel = VOLUME_CHANNEL_VORE) //CHOMPEdit
if(prob(belchchance))//Unsure if this should go in escapable or not, leaving it here for now.
owner.emote("belch")
//CHOMPEdit End
if(escapable) //If the stomach has escapable enabled.
if(prob(escapechance)) //Let's have it check to see if the prey escapes first.
to_chat(R, escape_attempt_prey_message)
@@ -2700,6 +2702,7 @@
dupe.noise_freq = noise_freq
dupe.item_digest_logs = item_digest_logs
dupe.show_fullness_messages = show_fullness_messages
dupe.belchchance = belchchance
dupe.digest_max = digest_max //CHOMP end of variables from CHOMP
dupe.belly_fullscreen = belly_fullscreen

View File

@@ -350,6 +350,7 @@ var/global/list/belly_colorable_only_fullscreens = list("a_synth_flesh_mono",
selected_list["interacts"]["transferlocation_secondary"] = selected.transferlocation_secondary
selected_list["interacts"]["absorbchance"] = selected.absorbchance
selected_list["interacts"]["digestchance"] = selected.digestchance
selected_list["interacts"]["belchchance"] = selected.belchchance
selected_list["autotransfer_enabled"] = selected.autotransfer_enabled
selected_list["autotransfer"] = list()
@@ -1607,6 +1608,10 @@ var/global/list/belly_colorable_only_fullscreens = list("a_synth_flesh_mono",
var/new_autotransfer_max_amount = belly_data["autotransfer_max_amount"]
new_belly.autotransfer_max_amount = sanitize_integer(new_autotransfer_max_amount, 0, 100, initial(new_belly.autotransfer_max_amount))
if(isnum(belly_data["belchchance"]))
var/new_belchchance = belly_data["belchchance"]
new_belly.belchchance = sanitize_integer(new_belchchance, 0, 100, initial(new_belly.belchchance))
// Liquid Options
if(isnum(belly_data["show_liquids"]))
var/new_show_liquids = belly_data["show_liquids"]
@@ -3610,6 +3615,11 @@ var/global/list/belly_colorable_only_fullscreens = list("a_synth_flesh_mono",
if(!isnull(escape_chance_input)) //These have to be 'null' because both cancel and 0 are valid, separate options
host.vore_selected.escapechance = sanitize_integer(escape_chance_input, 0, 100, initial(host.vore_selected.escapechance))
. = TRUE
if("b_belchchance")
var/belch_chance_input = tgui_input_number(user, "Set chance for belch emote on prey resist (as %)", "Resist Belch Chance", host.vore_selected.belchchance , 100, 0)
if(!isnull(belch_chance_input))
host.vore_selected.belchchance = sanitize_integer(belch_chance_input, 0, 100, initial(host.vore_selected.belchchance))
. = TRUE
if("b_escapechance_absorbed")
var/escape_absorbed_chance_input = tgui_input_number(user, "Set absorbed prey escape chance on resist (as %)", "Prey Absorbed Escape Chance", null, 100, 0)
if(!isnull(escape_absorbed_chance_input)) //These have to be 'null' because both cancel and 0 are valid, separate options

View File

@@ -356,6 +356,8 @@
belly_data["escapechance_absorbed"] = B.escapechance_absorbed
belly_data["escapetime"] = B.escapetime/10
belly_data["belchchance"] = B.belchchance
belly_data["transferchance"] = B.transferchance
belly_data["transferlocation"] = B.transferlocation

View File

@@ -117,6 +117,15 @@ export const VoreSelectedBellyInteractions = (props: {
{interacts.digestchance + '%'}
</Button>
</LabeledList.Item>
<LabeledList.Item label="Belch Chance">
<Button
onClick={() =>
act('set_attribute', { attribute: 'b_belchchance' })
}
>
{interacts.belchchance + '%'}
</Button>
</LabeledList.Item>
<LabeledList.Divider />
</LabeledList>
) : (

View File

@@ -177,6 +177,7 @@ export type interactData = {
transferlocation_secondary: string;
absorbchance: number;
digestchance: number;
belchchance: number;
};
export type autotransferData = {

View File

@@ -150,6 +150,8 @@ export const generateBellyString = (belly: Belly, index: number) => {
absorbchance,
digestchance,
belchchance,
// Interactions (Auto-Transfer)
autotransferwait,
autotransferchance,
@@ -715,6 +717,7 @@ export const generateBellyString = (belly: Belly, index: number) => {
result += '<li class="list-group-item">Secondary Transfer Location: ' + transferlocation_secondary + '</li>';
result += '<li class="list-group-item">Absorb Chance: ' + absorbchance + '%</li>';
result += '<li class="list-group-item">Digest Chance: ' + digestchance + '%</li>';
result += '<li class="list-group-item">Belch Chance: ' + belchchance + '%</li>';
result += '</ul>';
result += '<hr>';
result += '<b>Auto-Transfer Options (' +

View File

@@ -154,6 +154,7 @@ export type Belly = {
absorbchance: number;
digestchance: number;
belchchance: number;
// Interactions (Auto-Transfer)
autotransferwait: number;