mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-23 05:07:51 +01:00
Adds new preference for vore privacy
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
selective_preference = client.prefs_vr.selective_preference
|
||||
appendage_color = client.prefs_vr.appendage_color
|
||||
appendage_alt_setting = client.prefs_vr.appendage_alt_setting
|
||||
eating_privacy_global = client.prefs_vr.eating_privacy_global
|
||||
|
||||
drop_vore = client.prefs_vr.drop_vore
|
||||
stumble_vore = client.prefs_vr.stumble_vore
|
||||
|
||||
@@ -55,7 +55,11 @@
|
||||
var/emote_active = TRUE // Are we even giving emotes out at all or not?
|
||||
var/next_emote = 0 // When we're supposed to print our next emote, as a world.time
|
||||
var/selective_preference = DM_DIGEST // Which type of selective bellymode do we default to?
|
||||
<<<<<<< HEAD
|
||||
var/is_feedable = TRUE // If this belly shows up in belly selections for others. //CHOMPAdd
|
||||
=======
|
||||
var/eating_privacy_local = "default" //Overrides eating_privacy_global if not "default". Determines if attempt/success messages are subtle/loud
|
||||
>>>>>>> b17b584f03... Merge pull request #14874 from Runa-Dacino/subtlenoms
|
||||
|
||||
// Generally just used by AI
|
||||
var/autotransferchance = 0 // % Chance of prey being autotransferred to transfer location
|
||||
@@ -296,7 +300,8 @@
|
||||
"egg_name",
|
||||
"is_feedable", //CHOMP end of variables from CHOMP
|
||||
"egg_type",
|
||||
"save_digest_mode"
|
||||
"save_digest_mode",
|
||||
"eating_privacy_local"
|
||||
)
|
||||
|
||||
if (save_digest_mode == 1)
|
||||
@@ -605,16 +610,32 @@
|
||||
if(!ishuman(owner))
|
||||
owner.update_icons()
|
||||
|
||||
//Determines privacy
|
||||
var/privacy_range = world.view
|
||||
var/privacy_volume = 100
|
||||
switch(eating_privacy_local) //Third case of if("loud") not defined, as it'd just leave privacy_range and volume untouched
|
||||
if("default")
|
||||
if(owner.eating_privacy_global)
|
||||
privacy_range = 1
|
||||
privacy_volume = 25
|
||||
if("subtle")
|
||||
privacy_range = 1
|
||||
privacy_volume = 25
|
||||
|
||||
//Print notifications/sound if necessary
|
||||
if(!silent && count)
|
||||
owner.visible_message("<font color='green'><b>[owner] [release_verb] everything from their [lowertext(name)]!</b></font>")
|
||||
owner.visible_message("<font color='green'><b>[owner] [release_verb] everything from their [lowertext(name)]!</b></font>", range = privacy_range)
|
||||
var/soundfile
|
||||
if(!fancy_vore)
|
||||
soundfile = classic_release_sounds[release_sound]
|
||||
else
|
||||
soundfile = fancy_release_sounds[release_sound]
|
||||
if(soundfile)
|
||||
<<<<<<< HEAD
|
||||
playsound(src, soundfile, vol = sound_volume, vary = 1, falloff = VORE_SOUND_FALLOFF, preference = /datum/client_preference/eating_noises, volume_channel = VOLUME_CHANNEL_VORE) //CHOPEdit
|
||||
=======
|
||||
playsound(src, soundfile, vol = privacy_volume, vary = 1, falloff = VORE_SOUND_FALLOFF, preference = /datum/client_preference/eating_noises, volume_channel = VOLUME_CHANNEL_VORE)
|
||||
>>>>>>> b17b584f03... Merge pull request #14874 from Runa-Dacino/subtlenoms
|
||||
|
||||
return count
|
||||
|
||||
@@ -673,18 +694,34 @@
|
||||
if(!ishuman(owner))
|
||||
owner.update_icons()
|
||||
|
||||
//Determines privacy
|
||||
var/privacy_range = world.view
|
||||
var/privacy_volume = 100
|
||||
switch(eating_privacy_local) //Third case of if("loud") not defined, as it'd just leave privacy_range and volume untouched
|
||||
if("default")
|
||||
if(owner.eating_privacy_global)
|
||||
privacy_range = 1
|
||||
privacy_volume = 25
|
||||
if("subtle")
|
||||
privacy_range = 1
|
||||
privacy_volume = 25
|
||||
|
||||
//Print notifications/sound if necessary
|
||||
if(istype(M, /mob/observer)) //CHOMPEdit
|
||||
silent = TRUE
|
||||
if(!silent)
|
||||
owner.visible_message("<font color='green'><b>[owner] [release_verb] [M] from their [lowertext(name)]!</b></font>")
|
||||
owner.visible_message("<font color='green'><b>[owner] [release_verb] [M] from their [lowertext(name)]!</b></font>",range = privacy_range)
|
||||
var/soundfile
|
||||
if(!fancy_vore)
|
||||
soundfile = classic_release_sounds[release_sound]
|
||||
else
|
||||
soundfile = fancy_release_sounds[release_sound]
|
||||
if(soundfile)
|
||||
<<<<<<< HEAD
|
||||
playsound(src, soundfile, vol = sound_volume, vary = 1, falloff = VORE_SOUND_FALLOFF, preference = /datum/client_preference/eating_noises, volume_channel = VOLUME_CHANNEL_VORE) //CHOPEdit
|
||||
=======
|
||||
playsound(src, soundfile, vol = privacy_volume, vary = 1, falloff = VORE_SOUND_FALLOFF, preference = /datum/client_preference/eating_noises, volume_channel = VOLUME_CHANNEL_VORE)
|
||||
>>>>>>> b17b584f03... Merge pull request #14874 from Runa-Dacino/subtlenoms
|
||||
//Should fix your view not following you out of mobs sometimes!
|
||||
if(ismob(M))
|
||||
var/mob/ourmob = M
|
||||
@@ -1537,6 +1574,7 @@
|
||||
dupe.emote_active = emote_active
|
||||
dupe.selective_preference = selective_preference
|
||||
dupe.save_digest_mode = save_digest_mode
|
||||
dupe.eating_privacy_local = eating_privacy_local
|
||||
|
||||
//// Object-holding variables
|
||||
//struggle_messages_outside - strings
|
||||
|
||||
@@ -52,7 +52,11 @@
|
||||
var/selective_preference = DM_DEFAULT // Preference for selective bellymode
|
||||
var/appendage_color = "#e03997" //Default pink. Used for the 'long_vore' trait.
|
||||
var/appendage_alt_setting = FALSE // Dictates if 'long_vore' user pulls prey to them or not. 1 = user thrown towards target.
|
||||
<<<<<<< HEAD
|
||||
var/digestion_in_progress = FALSE // CHOMPEdit: Gradual corpse gurgles
|
||||
=======
|
||||
var/eating_privacy_global = FALSE //Makes eating attempt/success messages only reach for subtle range if true, overwritten by belly-specific var
|
||||
>>>>>>> b17b584f03... Merge pull request #14874 from Runa-Dacino/subtlenoms
|
||||
var/regen_sounds = list(
|
||||
'sound/effects/mob_effects/xenochimera/regen_1.ogg',
|
||||
'sound/effects/mob_effects/xenochimera/regen_2.ogg',
|
||||
@@ -289,6 +293,7 @@
|
||||
P.slip_vore = src.slip_vore
|
||||
P.throw_vore = src.throw_vore
|
||||
P.stumble_vore = src.stumble_vore
|
||||
P.eating_privacy_global = src.eating_privacy_global
|
||||
|
||||
P.nutrition_message_visible = src.nutrition_message_visible
|
||||
P.nutrition_messages = src.nutrition_messages
|
||||
@@ -347,6 +352,7 @@
|
||||
slip_vore = P.slip_vore
|
||||
throw_vore = P.throw_vore
|
||||
stumble_vore = P.stumble_vore
|
||||
eating_privacy_global = P.eating_privacy_global
|
||||
|
||||
nutrition_message_visible = P.nutrition_message_visible
|
||||
nutrition_messages = P.nutrition_messages
|
||||
@@ -638,6 +644,18 @@
|
||||
to_chat(user, "<span class='warning'>They aren't aren't in a state to be devoured.</span>")
|
||||
return FALSE
|
||||
|
||||
//Determining vore attempt privacy
|
||||
var/message_range = world.view
|
||||
if(!pred.is_slipping && !prey.is_slipping) //We only care about privacy preference if it's NOT a spontaneous vore.
|
||||
switch(belly.eating_privacy_local) //if("loud") case not added, as it would not modify message_range
|
||||
if("default")
|
||||
if(pred.eating_privacy_global)
|
||||
message_range = 1
|
||||
if("subtle")
|
||||
message_range = 1
|
||||
|
||||
|
||||
|
||||
// Slipnoms from chompstation downstream, credit to cadyn for the original PR.
|
||||
// Prepare messages
|
||||
if(prey.is_slipping)
|
||||
@@ -654,7 +672,10 @@
|
||||
success_msg = "<span class='warning'>[user] manages to make [pred] [lowertext(belly.vore_verb)] [prey] into their [lowertext(belly.name)]!</span>"
|
||||
|
||||
// Announce that we start the attempt!
|
||||
user.visible_message(attempt_msg)
|
||||
|
||||
|
||||
user.visible_message(attempt_msg, range = message_range)
|
||||
|
||||
|
||||
// Now give the prey time to escape... return if they did
|
||||
var/swallow_time
|
||||
@@ -671,7 +692,7 @@
|
||||
return FALSE // Prey escpaed (or user disabled) before timer expired.
|
||||
|
||||
// If we got this far, nom successful! Announce it!
|
||||
user.visible_message(success_msg)
|
||||
user.visible_message(success_msg, range = message_range)
|
||||
|
||||
// Actually shove prey into the belly.
|
||||
if(istype(prey.loc, /obj/item/weapon/holder))
|
||||
@@ -1138,7 +1159,11 @@
|
||||
dispvoreprefs += "<b>Spontaneous transformation:</b> [allow_spontaneous_tf ? "Enabled" : "Disabled"]<br>"
|
||||
dispvoreprefs += "<b>Can be stepped on/over:</b> [step_mechanics_pref ? "Allowed" : "Disallowed"]<br>"
|
||||
dispvoreprefs += "<b>Can be picked up:</b> [pickup_pref ? "Allowed" : "Disallowed"]<br>"
|
||||
<<<<<<< HEAD
|
||||
dispvoreprefs += "<b>Current active belly:</b> [vore_selected ? vore_selected.name : "None"]<br>"
|
||||
=======
|
||||
dispvoreprefs += "<b>Global Vore Privacy is:</b> [eating_privacy_global ? "Subtle" : "Loud"]<br>"
|
||||
>>>>>>> b17b584f03... Merge pull request #14874 from Runa-Dacino/subtlenoms
|
||||
user << browse("<html><head><title>Vore prefs: [src]</title></head><body><center>[dispvoreprefs]</center></body></html>", "window=[name]mvp;size=300x400;can_resize=1;can_minimize=0")
|
||||
onclose(user, "[name]")
|
||||
return
|
||||
|
||||
@@ -54,6 +54,7 @@ V::::::V V::::::VO:::::::OOO:::::::ORR:::::R R:::::REE::::::EEEEEE
|
||||
var/allowmobvore = TRUE
|
||||
var/permit_healbelly = TRUE
|
||||
var/noisy = FALSE
|
||||
var/eating_privacy_global = FALSE //Makes eating attempt/success messages only reach for subtle range if true, overwritten by belly-specific var
|
||||
|
||||
// These are 'modifier' prefs, do nothing on their own but pair with drop_prey/drop_pred settings.
|
||||
var/drop_vore = TRUE
|
||||
@@ -205,6 +206,7 @@ V::::::V V::::::VO:::::::OOO:::::::ORR:::::R R:::::REE::::::EEEEEE
|
||||
nutrition_messages = json_from_file["nutrition_messages"]
|
||||
weight_message_visible = json_from_file["weight_message_visible"]
|
||||
weight_messages = json_from_file["weight_messages"]
|
||||
eating_privacy_global = json_from_file["eating_privacy_global"]
|
||||
|
||||
|
||||
//CHOMP stuff
|
||||
@@ -268,6 +270,8 @@ V::::::V V::::::VO:::::::OOO:::::::ORR:::::R R:::::REE::::::EEEEEE
|
||||
nutrition_message_visible = TRUE
|
||||
if(isnull(weight_message_visible))
|
||||
weight_message_visible = TRUE
|
||||
if(isnull(eating_privacy_global))
|
||||
eating_privacy_global = FALSE
|
||||
if(isnull(nutrition_messages))
|
||||
nutrition_messages = list(
|
||||
"They are starving! You can hear their stomach snarling from across the room!",
|
||||
@@ -358,8 +362,12 @@ V::::::V V::::::VO:::::::OOO:::::::ORR:::::R R:::::REE::::::EEEEEE
|
||||
"nutrition_messages" = nutrition_messages,
|
||||
"weight_message_visible" = weight_message_visible,
|
||||
"weight_messages" = weight_messages,
|
||||
<<<<<<< HEAD
|
||||
"vore_sprite_color" = vore_sprite_color, //CHOMPEdit
|
||||
"vore_sprite_multiply" = vore_sprite_multiply, //CHOMPEdit
|
||||
=======
|
||||
"eating_privacy_global" = eating_privacy_global,
|
||||
>>>>>>> b17b584f03... Merge pull request #14874 from Runa-Dacino/subtlenoms
|
||||
)
|
||||
|
||||
//List to JSON
|
||||
|
||||
@@ -206,6 +206,7 @@
|
||||
"belly_fullscreen_color4" = selected.belly_fullscreen_color4,
|
||||
"belly_fullscreen_alpha" = selected.belly_fullscreen_alpha,
|
||||
"colorization_enabled" = selected.colorization_enabled,
|
||||
<<<<<<< HEAD
|
||||
"vorespawn_blacklist" = selected.vorespawn_blacklist,
|
||||
"sound_volume" = selected.sound_volume,
|
||||
"affects_voresprite" = selected.affects_vore_sprites,
|
||||
@@ -230,6 +231,9 @@
|
||||
"tail_extra_overlay2" = selected.tail_extra_overlay2
|
||||
//"marking_to_add" = selected.marking_to_add
|
||||
//CHOMPEdit end
|
||||
=======
|
||||
"eating_privacy_local" = selected.eating_privacy_local
|
||||
>>>>>>> b17b584f03... Merge pull request #14874 from Runa-Dacino/subtlenoms
|
||||
)
|
||||
|
||||
var/list/addons = list()
|
||||
@@ -390,10 +394,14 @@
|
||||
"nutrition_messages" = host.nutrition_messages,
|
||||
"weight_message_visible" = host.weight_message_visible,
|
||||
"weight_messages" = host.weight_messages,
|
||||
<<<<<<< HEAD
|
||||
//CHOMPEdit start, vore sprites
|
||||
"vore_sprite_color" = host.vore_sprite_color,
|
||||
"vore_sprite_multiply" = host.vore_sprite_multiply
|
||||
//CHOMPEdit end
|
||||
=======
|
||||
"eating_privacy_global" = host.eating_privacy_global
|
||||
>>>>>>> b17b584f03... Merge pull request #14874 from Runa-Dacino/subtlenoms
|
||||
)
|
||||
|
||||
return data
|
||||
@@ -1409,6 +1417,12 @@
|
||||
host.client.prefs_vr.digestable = host.digestable
|
||||
unsaved_changes = TRUE
|
||||
return TRUE
|
||||
if("toggle_global_privacy")
|
||||
host.eating_privacy_global = !host.eating_privacy_global
|
||||
if(host.client.prefs_vr)
|
||||
host.eating_privacy_global = host.eating_privacy_global
|
||||
unsaved_changes = TRUE
|
||||
return TRUE
|
||||
if("toggle_devour")
|
||||
host.devourable = !host.devourable
|
||||
if(host.client.prefs_vr)
|
||||
@@ -2278,6 +2292,12 @@
|
||||
|
||||
host.vore_selected.release_verb = new_release_verb
|
||||
. = TRUE
|
||||
if("b_eating_privacy")
|
||||
var/privacy_choice = tgui_input_list(usr, "Choose your belly-specific preference. Default uses global preference!", "Eating message privacy", list("default", "subtle", "loud"), "default")
|
||||
if(privacy_choice == null)
|
||||
return FALSE
|
||||
host.vore_selected.eating_privacy_local = privacy_choice
|
||||
. = TRUE
|
||||
if("b_fancy_sound")
|
||||
host.vore_selected.fancy_vore = !host.vore_selected.fancy_vore
|
||||
host.vore_selected.vore_sound = "Gulp"
|
||||
|
||||
@@ -249,6 +249,7 @@
|
||||
new_mob.vore_smell = vore_smell
|
||||
new_mob.nutrition_message_visible = nutrition_message_visible
|
||||
new_mob.allow_spontaneous_tf = allow_spontaneous_tf
|
||||
new_mob.eating_privacy_global = eating_privacy_global
|
||||
|
||||
/////SUBTYPES/////
|
||||
|
||||
|
||||
@@ -594,7 +594,11 @@ const VoreSelectedBellyOptions = (props, context) => {
|
||||
egg_name,
|
||||
selective_preference,
|
||||
save_digest_mode,
|
||||
<<<<<<< HEAD
|
||||
vorespawn_blacklist,
|
||||
=======
|
||||
eating_privacy_local,
|
||||
>>>>>>> b17b584f03... Merge pull request #14874 from Runa-Dacino/subtlenoms
|
||||
} = belly;
|
||||
|
||||
return (
|
||||
@@ -664,6 +668,12 @@ const VoreSelectedBellyOptions = (props, context) => {
|
||||
content={display_absorbed_examine ? 'True' : 'False'}
|
||||
/>
|
||||
</LabeledList.Item>
|
||||
<LabeledList.Item label="Toggle Vore Privacy">
|
||||
<Button
|
||||
onClick={() => act('set_attribute', { attribute: 'b_eating_privacy' })}
|
||||
content={capitalize(eating_privacy_local)}
|
||||
/>
|
||||
</LabeledList.Item>
|
||||
|
||||
<LabeledList.Item label="Save Digest Mode">
|
||||
<Button
|
||||
@@ -1525,6 +1535,7 @@ const VoreUserPreferences = (props, context) => {
|
||||
throw_vore,
|
||||
nutrition_message_visible,
|
||||
weight_message_visible,
|
||||
eating_privacy_global,
|
||||
} = data.prefs;
|
||||
|
||||
const { show_pictures } = data;
|
||||
@@ -1871,6 +1882,7 @@ const VoreUserPreferences = (props, context) => {
|
||||
disabled: 'Examine Weight Messages Inactive',
|
||||
},
|
||||
},
|
||||
<<<<<<< HEAD
|
||||
liquid_receive: {
|
||||
action: 'toggle_liq_rec',
|
||||
test: liq_rec,
|
||||
@@ -1908,6 +1920,22 @@ const VoreUserPreferences = (props, context) => {
|
||||
content: {
|
||||
enabled: 'Auto-Transfer Allowed',
|
||||
disabled: 'Do Not Allow Auto-Transfer',
|
||||
=======
|
||||
eating_privacy_global: {
|
||||
action: 'toggle_global_privacy',
|
||||
test: eating_privacy_global,
|
||||
tooltip: {
|
||||
main:
|
||||
'Sets default belly behaviour for vorebellies for announcing' +
|
||||
' ingesting or expelling prey' +
|
||||
' Overwritten by belly-specific preferences if set.',
|
||||
enable: ' Click here to turn your messages subtle',
|
||||
disable: ' Click here to turn your messages loud',
|
||||
},
|
||||
content: {
|
||||
enabled: 'Global Vore Privacy: Subtle',
|
||||
disabled: 'Global Vore Privacy: Loud',
|
||||
>>>>>>> b17b584f03... Merge pull request #14874 from Runa-Dacino/subtlenoms
|
||||
},
|
||||
},
|
||||
};
|
||||
@@ -1990,6 +2018,7 @@ const VoreUserPreferences = (props, context) => {
|
||||
<Flex.Item basis="32%">
|
||||
<Button fluid content="Selective Mode Preference" onClick={() => act('switch_selective_mode_pref')} />
|
||||
</Flex.Item>
|
||||
<<<<<<< HEAD
|
||||
<Flex.Item basis="32%">
|
||||
<VoreUserPreferenceItem spec={preferences.autotransferable} />
|
||||
</Flex.Item>
|
||||
@@ -1998,6 +2027,10 @@ const VoreUserPreferences = (props, context) => {
|
||||
</Flex.Item>
|
||||
<Flex.Item basis="49%">
|
||||
<VoreUserPreferenceItem spec={preferences.liquid_give} tooltipPosition="top" />
|
||||
=======
|
||||
<Flex.Item basis="32%" grow={3}>
|
||||
<VoreUserPreferenceItem spec={preferences.eating_privacy_global} />
|
||||
>>>>>>> b17b584f03... Merge pull request #14874 from Runa-Dacino/subtlenoms
|
||||
</Flex.Item>
|
||||
</Flex>
|
||||
<Section title="Aesthetic Preferences">
|
||||
|
||||
Reference in New Issue
Block a user