Skip to content

Commit

Permalink
Merge pull request #290 from TS-Rogue-Star/prefs
Browse files Browse the repository at this point in the history
Add TGUI buttons for some preferences.
  • Loading branch information
Very-Soft authored May 13, 2024
2 parents 87b8c9c + 52a89a7 commit adb6f59
Show file tree
Hide file tree
Showing 5 changed files with 93 additions and 3 deletions.
3 changes: 2 additions & 1 deletion code/modules/vore/eating/living_vr.dm
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
)

var/player_login_key_log //RS ADD: keeps track of a ckey if we join with one to help determine if we're a PC
var/ssd_vore = FALSE //RS ADD: if false, makes mob undevourable if player_login_key_log is set

//
// Hook for generic creation of stuff on new creatures
Expand Down Expand Up @@ -315,6 +314,8 @@

if (istype(src, /mob/living/carbon/human)) //RS edit
src:vore_sprite_color = P.vore_sprite_color //RS edit
src:allow_contaminate = P.allow_contaminate //RS edit
src:allow_stripping = P.allow_stripping //RS edit
if(isliving(src)) //RS ADD
src:ssd_vore = P.ssd_vore //RS ADD

Expand Down
1 change: 1 addition & 0 deletions code/modules/vore/eating/mob_vr.dm
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,4 @@
"They have a very fat frame with a bulging potbelly, squishy rolls of pudge, very wide hips, and plump set of jiggling thighs.",
"They are incredibly obese. Their massive potbelly sags over their waistline while their fat ass would probably require two chairs to sit down comfortably!",
"They are so morbidly obese, you wonder how they can even stand, let alone waddle around the station. They can't get any fatter without being immobilized.")
var/ssd_vore = FALSE //RS ADD: if false, makes mob undevourable if player_login_key_log is set
27 changes: 26 additions & 1 deletion code/modules/vore/eating/vorepanel_vr.dm
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,10 @@ var/global/list/belly_colorable_only_fullscreens = list("a_synth_flesh_mono",
"weight_message_visible" = host.weight_message_visible,
"weight_messages" = host.weight_messages,
"eating_privacy_global" = host.eating_privacy_global,
"vore_sprite_color" = istype(host, /mob/living/carbon/human) ? host:vore_sprite_color : "#FFFFFF" // RS edit
"vore_sprite_color" = istype(host, /mob/living/carbon/human) ? host:vore_sprite_color : "#FFFFFF", // RS edit
"allowcontamination" = istype(host, /mob/living/carbon/human) ? host:allow_contaminate : TRUE, // RS edit
"allowstripping" = istype(host, /mob/living/carbon/human) ? host:allow_stripping : TRUE, // RS edit
"allowssdvore" = host.ssd_vore, // RS edit
)

return data
Expand Down Expand Up @@ -643,6 +646,28 @@ var/global/list/belly_colorable_only_fullscreens = list("a_synth_flesh_mono",
hhost.vore_sprite_color[belly_choice] = newcolor
hhost.update_icons_body()
return TRUE
if("toggle_allowcontamination")
if (istype(host, /mob/living/carbon/human))
var/mob/living/carbon/human/hhost = host
hhost.allow_contaminate = !hhost.allow_contaminate
if(host.client.prefs_vr)
host.client.prefs_vr.allow_contaminate = hhost.allow_contaminate
unsaved_changes = TRUE
return TRUE
if("toggle_allowstripping")
if (istype(host, /mob/living/carbon/human))
var/mob/living/carbon/human/hhost = host
hhost.allow_stripping = !hhost.allow_stripping
if(host.client.prefs_vr)
host.client.prefs_vr.allow_stripping = hhost.allow_stripping
unsaved_changes = TRUE
return TRUE
if("toggle_allowssdvore")
host.ssd_vore = !host.ssd_vore
if(host.client.prefs_vr)
host.client.prefs_vr.ssd_vore = host.ssd_vore
unsaved_changes = TRUE
return TRUE
// End RS edit

/datum/vore_look/proc/pick_from_inside(mob/user, params)
Expand Down
63 changes: 63 additions & 0 deletions tgui/packages/tgui/interfaces/VorePanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -1416,6 +1416,9 @@ const VoreUserPreferences = (props, context) => {
nutrition_message_visible,
weight_message_visible,
eating_privacy_global,
allowstripping,
allowcontamination,
allowssdvore,
} = data.prefs;

const { show_pictures } = data;
Expand Down Expand Up @@ -1698,6 +1701,57 @@ const VoreUserPreferences = (props, context) => {
disabled: 'Do Not Allow Leaving Remains',
},
},
allow_contamination: {
action: 'toggle_allowcontamination',
test: allowcontamination,
tooltip: {
main: '',
enable:
'Regardless of Predator Setting, your worn items will not be contaminated.' +
' Click this to enable contamination.',
disable:
'This setting controls whether or not a pred is allowed to contaminate your worn items.' +
' Click to disable contamination.',
},
content: {
enabled: 'Allow Contamination',
disabled: 'Disallow Contamination',
},
},
allow_stripping: {
action: 'toggle_allowstripping',
test: allowstripping,
tooltip: {
main: '',
enable:
'Regardless of Predator Setting, your worn items will not be stripped.' +
' Click this to enable stripping.',
disable:
'This setting controls whether or not a pred is allowed to strip your worn items.' +
' Click to disable contamination.',
},
content: {
enabled: 'Allow Stripping',
disabled: 'Disallow Stripping',
},
},
allow_ssdvore: {
action: 'toggle_allowssdvore',
test: allowssdvore,
tooltip: {
main: '',
enable:
'You cannot be eaten while disconnected.' +
' Click this to enable SSD vore.',
disable:
'This setting controls whether or not you can be eaten while disconnected.' +
' Click to disable SSD vore.',
},
content: {
enabled: 'Allow SSD Vore',
disabled: 'Disallow SSD Vore',
},
},
pickuppref: {
action: 'toggle_pickuppref',
test: pickup_mechanics_active,
Expand Down Expand Up @@ -1864,6 +1918,15 @@ const VoreUserPreferences = (props, context) => {
<Flex.Item basis="32%">
<VoreUserPreferenceItem spec={preferences.spontaneous_tf} />
</Flex.Item>
<Flex.Item basis="32%">
<VoreUserPreferenceItem spec={preferences.allow_stripping} />
</Flex.Item>
<Flex.Item basis="32%" grow={1}>
<VoreUserPreferenceItem spec={preferences.allow_contamination} />
</Flex.Item>
<Flex.Item basis="32%">
<VoreUserPreferenceItem spec={preferences.allow_ssdvore} />
</Flex.Item>
<Flex.Item basis="32%">
<Button
fluid
Expand Down
2 changes: 1 addition & 1 deletion tgui/public/tgui.bundle.js

Large diffs are not rendered by default.

0 comments on commit adb6f59

Please sign in to comment.