Belly option to make struggles private (#7443)

This commit is contained in:
Eli
2023-12-20 04:27:59 +11:00
committed by GitHub
parent 1d7973e59f
commit b62969b10a
5 changed files with 99 additions and 43 deletions

View File

@@ -63,6 +63,7 @@
var/belly_mob_mult = 1 //Multiplier for how filling mob types are in borg bellies
var/belly_item_mult = 1 //Multiplier for how filling items are in borg borg bellies. Items are also weighted on item size
var/belly_overall_mult = 1 //Multiplier applied ontop of any other specific multipliers
var/private_struggle = FALSE // If struggles are made public or not //CHOMPAdd
// Generally just used by AI
var/autotransferchance = 0 // % Chance of prey being autotransferred to transfer location
@@ -446,6 +447,7 @@
"is_feedable",
"entrance_logs",
"noise_freq",
"private_struggle",
"item_digest_logs", //CHOMP end of variables from CHOMP
"egg_type",
"save_digest_mode",
@@ -1782,25 +1784,33 @@
struggle_outer_message = "<span class='valert'>[struggle_outer_message]</span>"
struggle_user_message = "<span class='valert'>[struggle_user_message]</span>"
for(var/mob/M in hearers(4, owner))
M.show_message(struggle_outer_message, 2) // hearable
//CHOMPEdit Start
if(private_struggle)
to_chat(owner, struggle_outer_message)
else
for(var/mob/M in hearers(4, owner))
M.show_message(struggle_outer_message, 2) // hearable
//CHOMPEdit End
var/sound/struggle_snuggle
var/sound/struggle_rustle = sound(get_sfx("rustle"))
//CHOMPEdit Start - vore sprites struggle animation
if((vore_sprite_flags & DM_FLAG_VORESPRITE_BELLY) && (owner.vore_capacity_ex[belly_sprite_to_affect] >= 1))
if((vore_sprite_flags & DM_FLAG_VORESPRITE_BELLY) && (owner.vore_capacity_ex[belly_sprite_to_affect] >= 1) && !private_struggle)
owner.vs_animate(belly_sprite_to_affect)
//CHOMPEdit End
if(is_wet)
if(!fancy_vore)
struggle_snuggle = sound(get_sfx("classic_struggle_sounds"))
//CHOMPEdit Start
if(!private_struggle)
if(is_wet)
if(!fancy_vore)
struggle_snuggle = sound(get_sfx("classic_struggle_sounds"))
else
struggle_snuggle = sound(get_sfx("fancy_prey_struggle"))
playsound(src, struggle_snuggle, vary = 1, vol = 75, falloff = VORE_SOUND_FALLOFF, frequency = noise_freq, preference = /datum/client_preference/digestion_noises, volume_channel = VOLUME_CHANNEL_VORE) //CHOMPEdit
else
struggle_snuggle = sound(get_sfx("fancy_prey_struggle"))
playsound(src, struggle_snuggle, vary = 1, vol = 75, falloff = VORE_SOUND_FALLOFF, frequency = noise_freq, preference = /datum/client_preference/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/client_preference/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/client_preference/digestion_noises, volume_channel = VOLUME_CHANNEL_VORE) //CHOMPEdit
//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.
@@ -1840,8 +1850,11 @@
release_specific_contents(C)
to_chat(R, escape_item_prey_message)
to_chat(owner, escape_item_owner_message)
for(var/mob/M in hearers(4, owner))
M.show_message(escape_item_outside_message, 2)
//CHOMPEdit Start
if(!private_struggle)
for(var/mob/M in hearers(4, owner))
M.show_message(escape_item_outside_message, 2)
//CHOMPEdit End
return
if(escapable && (R.loc == src) && !R.absorbed) //Does the owner still have escapable enabled?
var/escape_owner_message = pick(escape_messages_owner)
@@ -1872,8 +1885,11 @@
release_specific_contents(R)
to_chat(R, escape_prey_message)
to_chat(owner, escape_owner_message)
for(var/mob/M in hearers(4, owner))
M.show_message(escape_outside_message, 2)
//CHOMPEdit Start
if(!private_struggle)
for(var/mob/M in hearers(4, owner))
M.show_message(escape_outside_message, 2)
//CHOMPEdit End
return
else if(!(R.loc == src)) //Aren't even in the belly. Quietly fail.
return
@@ -2044,20 +2060,28 @@
struggle_outer_message = "<span class='valert'>[struggle_outer_message]</span>"
struggle_user_message = "<span class='valert'>[struggle_user_message]</span>"
for(var/mob/M in hearers(4, owner))
M.show_message(struggle_outer_message, 2) // hearable
//CHOMPEdit Start
if(private_struggle)
to_chat(owner, struggle_outer_message)
else
for(var/mob/M in hearers(4, owner))
M.show_message(struggle_outer_message, 2) // hearable
//CHOMPEdit End
var/sound/struggle_snuggle
var/sound/struggle_rustle = sound(get_sfx("rustle"))
if(is_wet)
if(!fancy_vore)
struggle_snuggle = sound(get_sfx("classic_struggle_sounds"))
//CHOMPEdit Start
if(!private_struggle)
if(is_wet)
if(!fancy_vore)
struggle_snuggle = sound(get_sfx("classic_struggle_sounds"))
else
struggle_snuggle = sound(get_sfx("fancy_prey_struggle"))
playsound(src, struggle_snuggle, vary = 1, vol = 75, falloff = VORE_SOUND_FALLOFF, frequency = noise_freq, preference = /datum/client_preference/digestion_noises, volume_channel = VOLUME_CHANNEL_VORE) //CHOMPEdit
else
struggle_snuggle = sound(get_sfx("fancy_prey_struggle"))
playsound(src, struggle_snuggle, vary = 1, vol = 75, falloff = VORE_SOUND_FALLOFF, frequency = noise_freq, preference = /datum/client_preference/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/client_preference/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/client_preference/digestion_noises, volume_channel = VOLUME_CHANNEL_VORE) //CHOMPEdit
//CHOMPEdit End
//absorb resists
if(escapable || owner.stat) //If the stomach has escapable enabled or the owner is dead/unconscious
@@ -2119,8 +2143,11 @@
release_specific_contents(R)
to_chat(R, escape_absorbed_prey_message)
to_chat(owner, escape_absorbed_owner_message)
for(var/mob/M in hearers(4, owner))
M.show_message(escape_absorbed_outside_message, 2)
//CHOMPEdit Start
if(!private_struggle)
for(var/mob/M in hearers(4, owner))
M.show_message(escape_absorbed_outside_message, 2)
//CHOMPEdit End
return
else if(!(R.loc == src)) //Aren't even in the belly. Quietly fail.
return

View File

@@ -292,6 +292,7 @@ var/global/list/belly_colorable_only_fullscreens = list("a_synth_flesh_mono",
"tail_extra_overlay2" = selected.tail_extra_overlay2,
"noise_freq" = selected.noise_freq,
"item_digest_logs" = selected.item_digest_logs,
"private_struggle" = selected.private_struggle,
//"marking_to_add" = selected.marking_to_add
//CHOMPEdit end
)
@@ -1092,6 +1093,18 @@ var/global/list/belly_colorable_only_fullscreens = list("a_synth_flesh_mono",
if(new_selective_preference == "Absorb")
new_belly.selective_preference = DM_ABSORB
if(isnum(belly_data["private_struggle"]))
var/new_private_struggle = belly_data["private_struggle"]
if(new_private_struggle == 0)
new_belly.private_struggle = FALSE
if(new_private_struggle == 1)
new_belly.private_struggle = TRUE
if(istext(belly_data["eating_privacy_local"]))
var/new_eating_privacy_local = html_encode(belly_data["eating_privacy_local"])
if(new_eating_privacy_local && (new_eating_privacy_local in list("default","subtle","loud")))
new_belly.eating_privacy_local = new_eating_privacy_local
// Sounds
if(isnum(belly_data["is_wet"]))
var/new_is_wet = belly_data["is_wet"]
@@ -3321,6 +3334,9 @@ var/global/list/belly_colorable_only_fullscreens = list("a_synth_flesh_mono",
qdel(host.vore_selected)
host.vore_selected = host.vore_organs[1]
. = TRUE
if("b_private_struggle") //CHOMP Addition
host.vore_selected.private_struggle = !host.vore_selected.private_struggle
. = TRUE
if("b_vorespawn_blacklist") //CHOMP Addition
host.vore_selected.vorespawn_blacklist = !host.vore_selected.vorespawn_blacklist
. = TRUE

View File

@@ -280,6 +280,8 @@
belly_data["storing_nutrition"] = B.storing_nutrition
belly_data["entrance_logs"] = B.entrance_logs
belly_data["item_digest_logs"] = B.item_digest_logs
belly_data["eating_privacy_local"] = B.eating_privacy_local
belly_data["private_struggle"] = B.private_struggle
// Sounds
belly_data["is_wet"] = B.is_wet

View File

@@ -856,6 +856,7 @@ const VoreSelectedBellyOptions = (props, context) => {
belly_item_mult,
belly_overall_mult,
vorespawn_blacklist,
private_struggle,
} = belly;
return (
@@ -949,6 +950,16 @@ const VoreSelectedBellyOptions = (props, context) => {
content={capitalize(eating_privacy_local)}
/>
</LabeledList.Item>
<LabeledList.Item label="Toggle Struggle Privacy">
<Button
onClick={() =>
act('set_attribute', { attribute: 'b_private_struggle' })
}
icon={private_struggle ? 'toggle-on' : 'toggle-off'}
selected={private_struggle}
content={private_struggle ? 'Private' : 'Loud'}
/>
</LabeledList.Item>
<LabeledList.Item label="Save Digest Mode">
<Button

File diff suppressed because one or more lines are too long