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_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_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/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 // Generally just used by AI
var/autotransferchance = 0 // % Chance of prey being autotransferred to transfer location var/autotransferchance = 0 // % Chance of prey being autotransferred to transfer location
@@ -446,6 +447,7 @@
"is_feedable", "is_feedable",
"entrance_logs", "entrance_logs",
"noise_freq", "noise_freq",
"private_struggle",
"item_digest_logs", //CHOMP end of variables from CHOMP "item_digest_logs", //CHOMP end of variables from CHOMP
"egg_type", "egg_type",
"save_digest_mode", "save_digest_mode",
@@ -1782,25 +1784,33 @@
struggle_outer_message = "<span class='valert'>[struggle_outer_message]</span>" struggle_outer_message = "<span class='valert'>[struggle_outer_message]</span>"
struggle_user_message = "<span class='valert'>[struggle_user_message]</span>" struggle_user_message = "<span class='valert'>[struggle_user_message]</span>"
for(var/mob/M in hearers(4, owner)) //CHOMPEdit Start
M.show_message(struggle_outer_message, 2) // hearable 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_snuggle
var/sound/struggle_rustle = sound(get_sfx("rustle")) var/sound/struggle_rustle = sound(get_sfx("rustle"))
//CHOMPEdit Start - vore sprites struggle animation //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) owner.vs_animate(belly_sprite_to_affect)
//CHOMPEdit End //CHOMPEdit End
if(is_wet) //CHOMPEdit Start
if(!fancy_vore) if(!private_struggle)
struggle_snuggle = sound(get_sfx("classic_struggle_sounds")) 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 else
struggle_snuggle = sound(get_sfx("fancy_prey_struggle")) 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_snuggle, 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
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
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.
@@ -1840,8 +1850,11 @@
release_specific_contents(C) release_specific_contents(C)
to_chat(R, escape_item_prey_message) to_chat(R, escape_item_prey_message)
to_chat(owner, escape_item_owner_message) to_chat(owner, escape_item_owner_message)
for(var/mob/M in hearers(4, owner)) //CHOMPEdit Start
M.show_message(escape_item_outside_message, 2) if(!private_struggle)
for(var/mob/M in hearers(4, owner))
M.show_message(escape_item_outside_message, 2)
//CHOMPEdit End
return return
if(escapable && (R.loc == src) && !R.absorbed) //Does the owner still have escapable enabled? if(escapable && (R.loc == src) && !R.absorbed) //Does the owner still have escapable enabled?
var/escape_owner_message = pick(escape_messages_owner) var/escape_owner_message = pick(escape_messages_owner)
@@ -1872,8 +1885,11 @@
release_specific_contents(R) release_specific_contents(R)
to_chat(R, escape_prey_message) to_chat(R, escape_prey_message)
to_chat(owner, escape_owner_message) to_chat(owner, escape_owner_message)
for(var/mob/M in hearers(4, owner)) //CHOMPEdit Start
M.show_message(escape_outside_message, 2) if(!private_struggle)
for(var/mob/M in hearers(4, owner))
M.show_message(escape_outside_message, 2)
//CHOMPEdit End
return return
else if(!(R.loc == src)) //Aren't even in the belly. Quietly fail. else if(!(R.loc == src)) //Aren't even in the belly. Quietly fail.
return return
@@ -2044,20 +2060,28 @@
struggle_outer_message = "<span class='valert'>[struggle_outer_message]</span>" struggle_outer_message = "<span class='valert'>[struggle_outer_message]</span>"
struggle_user_message = "<span class='valert'>[struggle_user_message]</span>" struggle_user_message = "<span class='valert'>[struggle_user_message]</span>"
for(var/mob/M in hearers(4, owner)) //CHOMPEdit Start
M.show_message(struggle_outer_message, 2) // hearable 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_snuggle
var/sound/struggle_rustle = sound(get_sfx("rustle")) var/sound/struggle_rustle = sound(get_sfx("rustle"))
if(is_wet) //CHOMPEdit Start
if(!fancy_vore) if(!private_struggle)
struggle_snuggle = sound(get_sfx("classic_struggle_sounds")) 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 else
struggle_snuggle = sound(get_sfx("fancy_prey_struggle")) 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_snuggle, 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
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
//absorb resists //absorb resists
if(escapable || owner.stat) //If the stomach has escapable enabled or the owner is dead/unconscious if(escapable || owner.stat) //If the stomach has escapable enabled or the owner is dead/unconscious
@@ -2119,8 +2143,11 @@
release_specific_contents(R) release_specific_contents(R)
to_chat(R, escape_absorbed_prey_message) to_chat(R, escape_absorbed_prey_message)
to_chat(owner, escape_absorbed_owner_message) to_chat(owner, escape_absorbed_owner_message)
for(var/mob/M in hearers(4, owner)) //CHOMPEdit Start
M.show_message(escape_absorbed_outside_message, 2) if(!private_struggle)
for(var/mob/M in hearers(4, owner))
M.show_message(escape_absorbed_outside_message, 2)
//CHOMPEdit End
return return
else if(!(R.loc == src)) //Aren't even in the belly. Quietly fail. else if(!(R.loc == src)) //Aren't even in the belly. Quietly fail.
return 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, "tail_extra_overlay2" = selected.tail_extra_overlay2,
"noise_freq" = selected.noise_freq, "noise_freq" = selected.noise_freq,
"item_digest_logs" = selected.item_digest_logs, "item_digest_logs" = selected.item_digest_logs,
"private_struggle" = selected.private_struggle,
//"marking_to_add" = selected.marking_to_add //"marking_to_add" = selected.marking_to_add
//CHOMPEdit end //CHOMPEdit end
) )
@@ -1092,6 +1093,18 @@ var/global/list/belly_colorable_only_fullscreens = list("a_synth_flesh_mono",
if(new_selective_preference == "Absorb") if(new_selective_preference == "Absorb")
new_belly.selective_preference = DM_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 // Sounds
if(isnum(belly_data["is_wet"])) if(isnum(belly_data["is_wet"]))
var/new_is_wet = 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) qdel(host.vore_selected)
host.vore_selected = host.vore_organs[1] host.vore_selected = host.vore_organs[1]
. = TRUE . = TRUE
if("b_private_struggle") //CHOMP Addition
host.vore_selected.private_struggle = !host.vore_selected.private_struggle
. = TRUE
if("b_vorespawn_blacklist") //CHOMP Addition if("b_vorespawn_blacklist") //CHOMP Addition
host.vore_selected.vorespawn_blacklist = !host.vore_selected.vorespawn_blacklist host.vore_selected.vorespawn_blacklist = !host.vore_selected.vorespawn_blacklist
. = TRUE . = TRUE

View File

@@ -280,6 +280,8 @@
belly_data["storing_nutrition"] = B.storing_nutrition belly_data["storing_nutrition"] = B.storing_nutrition
belly_data["entrance_logs"] = B.entrance_logs belly_data["entrance_logs"] = B.entrance_logs
belly_data["item_digest_logs"] = B.item_digest_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 // Sounds
belly_data["is_wet"] = B.is_wet belly_data["is_wet"] = B.is_wet

View File

@@ -856,6 +856,7 @@ const VoreSelectedBellyOptions = (props, context) => {
belly_item_mult, belly_item_mult,
belly_overall_mult, belly_overall_mult,
vorespawn_blacklist, vorespawn_blacklist,
private_struggle,
} = belly; } = belly;
return ( return (
@@ -949,6 +950,16 @@ const VoreSelectedBellyOptions = (props, context) => {
content={capitalize(eating_privacy_local)} content={capitalize(eating_privacy_local)}
/> />
</LabeledList.Item> </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"> <LabeledList.Item label="Save Digest Mode">
<Button <Button

File diff suppressed because one or more lines are too long