From 52a89a7524d210278078da890ff33ebca266416e Mon Sep 17 00:00:00 2001 From: Kenzie Date: Thu, 9 May 2024 19:49:03 -0400 Subject: [PATCH] Add TGUI buttons for some preferences. --- code/modules/vore/eating/living_vr.dm | 3 +- code/modules/vore/eating/mob_vr.dm | 1 + code/modules/vore/eating/vorepanel_vr.dm | 27 +++++++++- tgui/packages/tgui/interfaces/VorePanel.js | 63 ++++++++++++++++++++++ tgui/public/tgui.bundle.js | 2 +- 5 files changed, 93 insertions(+), 3 deletions(-) diff --git a/code/modules/vore/eating/living_vr.dm b/code/modules/vore/eating/living_vr.dm index 12643ecf70d..55a25a700f6 100644 --- a/code/modules/vore/eating/living_vr.dm +++ b/code/modules/vore/eating/living_vr.dm @@ -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 @@ -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 diff --git a/code/modules/vore/eating/mob_vr.dm b/code/modules/vore/eating/mob_vr.dm index 8796bf4a279..6bb4525034e 100644 --- a/code/modules/vore/eating/mob_vr.dm +++ b/code/modules/vore/eating/mob_vr.dm @@ -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 diff --git a/code/modules/vore/eating/vorepanel_vr.dm b/code/modules/vore/eating/vorepanel_vr.dm index af6e4efd5d3..6182bda7d3b 100644 --- a/code/modules/vore/eating/vorepanel_vr.dm +++ b/code/modules/vore/eating/vorepanel_vr.dm @@ -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 @@ -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) diff --git a/tgui/packages/tgui/interfaces/VorePanel.js b/tgui/packages/tgui/interfaces/VorePanel.js index 2ad12b35e29..04383cd6ba5 100644 --- a/tgui/packages/tgui/interfaces/VorePanel.js +++ b/tgui/packages/tgui/interfaces/VorePanel.js @@ -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; @@ -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, @@ -1864,6 +1918,15 @@ const VoreUserPreferences = (props, context) => { + + + + + + + + +