mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 03:33:21 +00:00
Add option to the interactions panel to trigger the belch emote on prey resisting. (#9106)
This commit is contained in:
@@ -116,6 +116,7 @@
|
|||||||
var/noise_freq = 42500 // Tasty sound prefs.
|
var/noise_freq = 42500 // Tasty sound prefs.
|
||||||
var/item_digest_logs = FALSE // Chat messages for digested items.
|
var/item_digest_logs = FALSE // Chat messages for digested items.
|
||||||
var/storing_nutrition = FALSE // Storing gained nutrition as paste instead of absorbing it.
|
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.
|
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.
|
||||||
|
|
||||||
|
|||||||
@@ -359,6 +359,7 @@
|
|||||||
"transferchance_secondary",
|
"transferchance_secondary",
|
||||||
"transferlocation",
|
"transferlocation",
|
||||||
"transferlocation_secondary",
|
"transferlocation_secondary",
|
||||||
|
"belchchance", //CHOMPAdd
|
||||||
"bulge_size",
|
"bulge_size",
|
||||||
"display_absorbed_examine",
|
"display_absorbed_examine",
|
||||||
"shrink_grow_size",
|
"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
|
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
|
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
|
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
|
//CHOMPEdit End
|
||||||
|
|
||||||
if(escapable) //If the stomach has escapable enabled.
|
if(escapable) //If the stomach has escapable enabled.
|
||||||
if(prob(escapechance)) //Let's have it check to see if the prey escapes first.
|
if(prob(escapechance)) //Let's have it check to see if the prey escapes first.
|
||||||
to_chat(R, escape_attempt_prey_message)
|
to_chat(R, escape_attempt_prey_message)
|
||||||
@@ -2700,6 +2702,7 @@
|
|||||||
dupe.noise_freq = noise_freq
|
dupe.noise_freq = noise_freq
|
||||||
dupe.item_digest_logs = item_digest_logs
|
dupe.item_digest_logs = item_digest_logs
|
||||||
dupe.show_fullness_messages = show_fullness_messages
|
dupe.show_fullness_messages = show_fullness_messages
|
||||||
|
dupe.belchchance = belchchance
|
||||||
dupe.digest_max = digest_max //CHOMP end of variables from CHOMP
|
dupe.digest_max = digest_max //CHOMP end of variables from CHOMP
|
||||||
|
|
||||||
dupe.belly_fullscreen = belly_fullscreen
|
dupe.belly_fullscreen = belly_fullscreen
|
||||||
|
|||||||
@@ -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"]["transferlocation_secondary"] = selected.transferlocation_secondary
|
||||||
selected_list["interacts"]["absorbchance"] = selected.absorbchance
|
selected_list["interacts"]["absorbchance"] = selected.absorbchance
|
||||||
selected_list["interacts"]["digestchance"] = selected.digestchance
|
selected_list["interacts"]["digestchance"] = selected.digestchance
|
||||||
|
selected_list["interacts"]["belchchance"] = selected.belchchance
|
||||||
|
|
||||||
selected_list["autotransfer_enabled"] = selected.autotransfer_enabled
|
selected_list["autotransfer_enabled"] = selected.autotransfer_enabled
|
||||||
selected_list["autotransfer"] = list()
|
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"]
|
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))
|
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
|
// Liquid Options
|
||||||
if(isnum(belly_data["show_liquids"]))
|
if(isnum(belly_data["show_liquids"]))
|
||||||
var/new_show_liquids = 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
|
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))
|
host.vore_selected.escapechance = sanitize_integer(escape_chance_input, 0, 100, initial(host.vore_selected.escapechance))
|
||||||
. = TRUE
|
. = 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")
|
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)
|
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
|
if(!isnull(escape_absorbed_chance_input)) //These have to be 'null' because both cancel and 0 are valid, separate options
|
||||||
|
|||||||
@@ -356,6 +356,8 @@
|
|||||||
belly_data["escapechance_absorbed"] = B.escapechance_absorbed
|
belly_data["escapechance_absorbed"] = B.escapechance_absorbed
|
||||||
belly_data["escapetime"] = B.escapetime/10
|
belly_data["escapetime"] = B.escapetime/10
|
||||||
|
|
||||||
|
belly_data["belchchance"] = B.belchchance
|
||||||
|
|
||||||
belly_data["transferchance"] = B.transferchance
|
belly_data["transferchance"] = B.transferchance
|
||||||
belly_data["transferlocation"] = B.transferlocation
|
belly_data["transferlocation"] = B.transferlocation
|
||||||
|
|
||||||
|
|||||||
@@ -117,6 +117,15 @@ export const VoreSelectedBellyInteractions = (props: {
|
|||||||
{interacts.digestchance + '%'}
|
{interacts.digestchance + '%'}
|
||||||
</Button>
|
</Button>
|
||||||
</LabeledList.Item>
|
</LabeledList.Item>
|
||||||
|
<LabeledList.Item label="Belch Chance">
|
||||||
|
<Button
|
||||||
|
onClick={() =>
|
||||||
|
act('set_attribute', { attribute: 'b_belchchance' })
|
||||||
|
}
|
||||||
|
>
|
||||||
|
{interacts.belchchance + '%'}
|
||||||
|
</Button>
|
||||||
|
</LabeledList.Item>
|
||||||
<LabeledList.Divider />
|
<LabeledList.Divider />
|
||||||
</LabeledList>
|
</LabeledList>
|
||||||
) : (
|
) : (
|
||||||
|
|||||||
@@ -177,6 +177,7 @@ export type interactData = {
|
|||||||
transferlocation_secondary: string;
|
transferlocation_secondary: string;
|
||||||
absorbchance: number;
|
absorbchance: number;
|
||||||
digestchance: number;
|
digestchance: number;
|
||||||
|
belchchance: number;
|
||||||
};
|
};
|
||||||
|
|
||||||
export type autotransferData = {
|
export type autotransferData = {
|
||||||
|
|||||||
@@ -150,6 +150,8 @@ export const generateBellyString = (belly: Belly, index: number) => {
|
|||||||
absorbchance,
|
absorbchance,
|
||||||
digestchance,
|
digestchance,
|
||||||
|
|
||||||
|
belchchance,
|
||||||
|
|
||||||
// Interactions (Auto-Transfer)
|
// Interactions (Auto-Transfer)
|
||||||
autotransferwait,
|
autotransferwait,
|
||||||
autotransferchance,
|
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">Secondary Transfer Location: ' + transferlocation_secondary + '</li>';
|
||||||
result += '<li class="list-group-item">Absorb Chance: ' + absorbchance + '%</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">Digest Chance: ' + digestchance + '%</li>';
|
||||||
|
result += '<li class="list-group-item">Belch Chance: ' + belchchance + '%</li>';
|
||||||
result += '</ul>';
|
result += '</ul>';
|
||||||
result += '<hr>';
|
result += '<hr>';
|
||||||
result += '<b>Auto-Transfer Options (' +
|
result += '<b>Auto-Transfer Options (' +
|
||||||
|
|||||||
@@ -154,6 +154,7 @@ export type Belly = {
|
|||||||
|
|
||||||
absorbchance: number;
|
absorbchance: number;
|
||||||
digestchance: number;
|
digestchance: number;
|
||||||
|
belchchance: number;
|
||||||
|
|
||||||
// Interactions (Auto-Transfer)
|
// Interactions (Auto-Transfer)
|
||||||
autotransferwait: number;
|
autotransferwait: number;
|
||||||
|
|||||||
Reference in New Issue
Block a user