[MIRROR] Make the belly Visibility pref a client one as opposed to a per-character one. (#10467)

Co-authored-by: eghughguhhhhhh <Hawoogabooga@gmail.com>
Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2025-03-19 14:33:03 -07:00
committed by GitHub
parent bfbcf946eb
commit d00cd1e398
13 changed files with 77 additions and 70 deletions

View File

@@ -15,7 +15,6 @@
pref.capture_crystal = save_data["capture_crystal"] pref.capture_crystal = save_data["capture_crystal"]
pref.auto_backup_implant = save_data["auto_backup_implant"] pref.auto_backup_implant = save_data["auto_backup_implant"]
pref.borg_petting = save_data["borg_petting"] pref.borg_petting = save_data["borg_petting"]
pref.stomach_vision = save_data["stomach_vision"]
/datum/category_item/player_setup_item/vore/misc/save_character(list/save_data) /datum/category_item/player_setup_item/vore/misc/save_character(list/save_data)
save_data["show_in_directory"] = pref.show_in_directory save_data["show_in_directory"] = pref.show_in_directory
@@ -30,7 +29,6 @@
save_data["capture_crystal"] = pref.capture_crystal save_data["capture_crystal"] = pref.capture_crystal
save_data["auto_backup_implant"] = pref.auto_backup_implant save_data["auto_backup_implant"] = pref.auto_backup_implant
save_data["borg_petting"] = pref.borg_petting save_data["borg_petting"] = pref.borg_petting
save_data["stomach_vision"] = pref.stomach_vision
/datum/category_item/player_setup_item/vore/misc/copy_to_mob(var/mob/living/carbon/human/character) /datum/category_item/player_setup_item/vore/misc/copy_to_mob(var/mob/living/carbon/human/character)
if(pref.sensorpref > 5 || pref.sensorpref < 1) if(pref.sensorpref > 5 || pref.sensorpref < 1)
@@ -38,7 +36,6 @@
character.sensorpref = pref.sensorpref character.sensorpref = pref.sensorpref
character.capture_crystal = pref.capture_crystal character.capture_crystal = pref.capture_crystal
//Vore Stomach Sprite Preference //Vore Stomach Sprite Preference
character.stomach_vision = pref.stomach_vision
character.recalculate_vis() character.recalculate_vis()
/datum/category_item/player_setup_item/vore/misc/sanitize_character() /datum/category_item/player_setup_item/vore/misc/sanitize_character()
@@ -51,7 +48,6 @@
pref.capture_crystal = sanitize_integer(pref.capture_crystal, 0, 1, initial(pref.capture_crystal)) pref.capture_crystal = sanitize_integer(pref.capture_crystal, 0, 1, initial(pref.capture_crystal))
pref.auto_backup_implant = sanitize_integer(pref.auto_backup_implant, 0, 1, initial(pref.auto_backup_implant)) pref.auto_backup_implant = sanitize_integer(pref.auto_backup_implant, 0, 1, initial(pref.auto_backup_implant))
pref.borg_petting = sanitize_integer(pref.borg_petting, 0, 1, initial(pref.borg_petting)) pref.borg_petting = sanitize_integer(pref.borg_petting, 0, 1, initial(pref.borg_petting))
pref.stomach_vision = sanitize_integer(pref.stomach_vision, 0, 1, initial(pref.stomach_vision))
/datum/category_item/player_setup_item/vore/misc/content(var/mob/user) /datum/category_item/player_setup_item/vore/misc/content(var/mob/user)
. += "<br>" . += "<br>"
@@ -65,7 +61,6 @@
. += span_bold("Capture Crystal Preference:") + " <a [pref.capture_crystal ? "class='linkOn'" : ""] href='byond://?src=\ref[src];toggle_capture_crystal=1'><b>[pref.capture_crystal ? "Yes" : "No"]</b></a><br>" . += span_bold("Capture Crystal Preference:") + " <a [pref.capture_crystal ? "class='linkOn'" : ""] href='byond://?src=\ref[src];toggle_capture_crystal=1'><b>[pref.capture_crystal ? "Yes" : "No"]</b></a><br>"
. += span_bold("Spawn With Backup Implant:") + " <a [pref.auto_backup_implant ? "class='linkOn'" : ""] href='byond://?src=\ref[src];toggle_implant=1'><b>[pref.auto_backup_implant ? "Yes" : "No"]</b></a><br>" . += span_bold("Spawn With Backup Implant:") + " <a [pref.auto_backup_implant ? "class='linkOn'" : ""] href='byond://?src=\ref[src];toggle_implant=1'><b>[pref.auto_backup_implant ? "Yes" : "No"]</b></a><br>"
. += span_bold("Allow petting as robot:") + " <a [pref.borg_petting ? "class='linkOn'" : ""] href='byond://?src=\ref[src];toggle_borg_petting=1'><b>[pref.borg_petting ? "Yes" : "No"]</b></a><br>" . += span_bold("Allow petting as robot:") + " <a [pref.borg_petting ? "class='linkOn'" : ""] href='byond://?src=\ref[src];toggle_borg_petting=1'><b>[pref.borg_petting ? "Yes" : "No"]</b></a><br>"
. += span_bold("Enable Stomach Sprites:") + " <a [pref.stomach_vision ? "class='linkOn'" : ""] href='byond://?src=\ref[src];toggle_stomach_vision=1'><b>[pref.stomach_vision ? "Yes" : "No"]</b></a><br>"
if(CONFIG_GET(flag/allow_metadata)) if(CONFIG_GET(flag/allow_metadata))
. += span_bold("Private Notes: <a href='byond://?src=\ref[src];edit_private_notes=1'>Edit</a>") + "<br>" . += span_bold("Private Notes: <a href='byond://?src=\ref[src];edit_private_notes=1'>Edit</a>") + "<br>"
@@ -119,9 +114,6 @@
else if(href_list["toggle_borg_petting"]) else if(href_list["toggle_borg_petting"])
pref.borg_petting = pref.borg_petting ? 0 : 1; pref.borg_petting = pref.borg_petting ? 0 : 1;
return TOPIC_REFRESH return TOPIC_REFRESH
else if(href_list["toggle_stomach_vision"])
pref.stomach_vision = pref.stomach_vision ? 0 : 1;
return TOPIC_REFRESH
else if(href_list["edit_private_notes"]) else if(href_list["edit_private_notes"])
var/new_metadata = sanitize(tgui_input_text(user,"Write some notes for yourself. These can be anything that is useful, whether it's character events that you want to remember or a bit of lore. Things that you would normally stick in a txt file for yourself!", "Private Notes", html_decode(pref.read_preference(/datum/preference/text/living/private_notes)), multiline = TRUE, prevent_enter = TRUE), extra = 0) var/new_metadata = sanitize(tgui_input_text(user,"Write some notes for yourself. These can be anything that is useful, whether it's character events that you want to remember or a bit of lore. Things that you would normally stick in a txt file for yourself!", "Private Notes", html_decode(pref.read_preference(/datum/preference/text/living/private_notes)), multiline = TRUE, prevent_enter = TRUE), extra = 0)
if(new_metadata && CanUseTopic(user)) if(new_metadata && CanUseTopic(user))

View File

@@ -0,0 +1,34 @@
/datum/preference/toggle/tummy_sprites
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
savefile_key = "VISIBLE_TUMMIES"
savefile_identifier = PREFERENCE_PLAYER
default_value = TRUE //it IS a vore server
/datum/preference/toggle/tummy_sprites/apply_to_client_updated(client/client, value)
client.mob.recalculate_vis()
. = ..()
// Vorey sounds
/datum/preference/toggle/belch_noises // Belching noises - pref toggle for 'em
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
savefile_key = "BELCH_NOISES"
default_value = TRUE
savefile_identifier = PREFERENCE_PLAYER
/datum/preference/toggle/eating_noises
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
savefile_key = "EATING_NOISES"
default_value = TRUE
savefile_identifier = PREFERENCE_PLAYER
/datum/preference/toggle/digestion_noises
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
savefile_key = "DIGEST_NOISES"
default_value = TRUE
savefile_identifier = PREFERENCE_PLAYER
/datum/preference/toggle/vore_health_bars
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
savefile_key = "VORE_HEALTH_BARS"
default_value = TRUE
savefile_identifier = PREFERENCE_PLAYER

View File

@@ -44,12 +44,6 @@
default_value = TRUE default_value = TRUE
savefile_identifier = PREFERENCE_PLAYER savefile_identifier = PREFERENCE_PLAYER
/datum/preference/toggle/vore_health_bars
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
savefile_key = "VORE_HEALTH_BARS"
default_value = TRUE
savefile_identifier = PREFERENCE_PLAYER
/datum/preference/toggle/show_lore_news /datum/preference/toggle/show_lore_news
category = PREFERENCE_CATEGORY_GAME_PREFERENCES category = PREFERENCE_CATEGORY_GAME_PREFERENCES
savefile_key = "NEWS_POPUP" savefile_key = "NEWS_POPUP"

View File

@@ -129,25 +129,6 @@
default_value = TRUE default_value = TRUE
savefile_identifier = PREFERENCE_PLAYER savefile_identifier = PREFERENCE_PLAYER
// Vorey sounds
/datum/preference/toggle/belch_noises // Belching noises - pref toggle for 'em
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
savefile_key = "BELCH_NOISES"
default_value = FALSE //CHOMPEdit
savefile_identifier = PREFERENCE_PLAYER
/datum/preference/toggle/eating_noises
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
savefile_key = "EATING_NOISES"
default_value = TRUE
savefile_identifier = PREFERENCE_PLAYER
/datum/preference/toggle/digestion_noises
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
savefile_key = "DIGEST_NOISES"
default_value = TRUE
savefile_identifier = PREFERENCE_PLAYER
/datum/preference/numeric/ambience_freq /datum/preference/numeric/ambience_freq
category = PREFERENCE_CATEGORY_GAME_PREFERENCES category = PREFERENCE_CATEGORY_GAME_PREFERENCES
savefile_key = "ambience_freq" savefile_key = "ambience_freq"

View File

@@ -11,7 +11,6 @@
var/capture_crystal = 1 //Whether or not someone is able to be caught with capture crystals var/capture_crystal = 1 //Whether or not someone is able to be caught with capture crystals
var/auto_backup_implant = FALSE //Whether someone starts with a backup implant or not. var/auto_backup_implant = FALSE //Whether someone starts with a backup implant or not.
var/borg_petting = TRUE //Whether someone can be petted as a borg or not. var/borg_petting = TRUE //Whether someone can be petted as a borg or not.
var/stomach_vision = TRUE //Whether or not someone can view stomach sprites
var/job_talon_high = 0 var/job_talon_high = 0
var/job_talon_med = 0 var/job_talon_med = 0

View File

@@ -201,7 +201,7 @@
if(vantag_hud) if(vantag_hud)
compiled_vis |= VIS_CH_VANTAG compiled_vis |= VIS_CH_VANTAG
if(stomach_vision) if(client?.prefs.read_preference(/datum/preference/toggle/tummy_sprites))
compiled_vis += VIS_CH_STOMACH compiled_vis += VIS_CH_STOMACH
if(soulgem?.flag_check(SOULGEM_SEE_SR_SOULS)) if(soulgem?.flag_check(SOULGEM_SEE_SR_SOULS))

View File

@@ -1141,7 +1141,6 @@ GLOBAL_LIST_EMPTY(damage_icon_parts) //see UpdateDamageIcon()
var/image/wing_image = get_wing_image(FALSE) var/image/wing_image = get_wing_image(FALSE)
var/obj/item/organ/external/chest = organs_by_name[BP_TORSO]
if(wing_image) if(wing_image)
wing_image.layer = BODY_LAYER+WING_LAYER wing_image.layer = BODY_LAYER+WING_LAYER

View File

@@ -1,6 +1,5 @@
/mob /mob
var/vantag_hud = 0 // Do I have the HUD enabled? var/vantag_hud = 0 // Do I have the HUD enabled?
var/stomach_vision = 1 // By default, you will see stomachs.
var/mob/living/simple_mob/temporary_form // For holding onto a temporary form //CHOMPEdit - should be mob/living/simple_mob, not /mob var/mob/living/simple_mob/temporary_form // For holding onto a temporary form //CHOMPEdit - should be mob/living/simple_mob, not /mob
var/disconnect_time = null //Time of client loss, set by Logout(), for timekeeping var/disconnect_time = null //Time of client loss, set by Logout(), for timekeeping

View File

@@ -3,7 +3,7 @@
if(!plane_holder || !vis_enabled) if(!plane_holder || !vis_enabled)
return return
var/stomach_vision = client?.prefs.read_preference(/datum/preference/toggle/tummy_sprites)
if(stomach_vision && !(VIS_CH_STOMACH in vis_enabled)) if(stomach_vision && !(VIS_CH_STOMACH in vis_enabled))
plane_holder.set_vis(VIS_CH_STOMACH,TRUE) plane_holder.set_vis(VIS_CH_STOMACH,TRUE)
vis_enabled += VIS_CH_STOMACH vis_enabled += VIS_CH_STOMACH
@@ -39,10 +39,10 @@
if(!toggle) if(!toggle)
return return
if(toggle =="Yes") if(toggle =="Yes")
stomach_vision = 1 //Simple! Easy! client?.prefs.write_preference_by_type(/datum/preference/toggle/tummy_sprites,TRUE) //Simple! Easy!
to_chat(src, "You can now see stomachs!") to_chat(src, "You can now see stomachs!")
else else
stomach_vision = 0 client?.prefs.write_preference_by_type(/datum/preference/toggle/tummy_sprites,FALSE)
to_chat(src, "You will no longer see stomachs!") to_chat(src, "You will no longer see stomachs!")
recalculate_vis() recalculate_vis()

View File

@@ -0,0 +1,38 @@
import { CheckboxInput, FeatureToggle } from '../base';
// Vorey sounds
export const BELCH_NOISES: FeatureToggle = {
name: 'Belch Noises',
category: 'ADULT CONTENT',
description: 'Enable hearing burping noises.',
component: CheckboxInput,
};
export const EATING_NOISES: FeatureToggle = {
name: 'Eating Noises',
category: 'ADULT CONTENT',
description: 'Enable hearing vore eating noises.',
component: CheckboxInput,
};
export const DIGEST_NOISES: FeatureToggle = {
name: 'Digestion Noises',
category: 'ADULT CONTENT',
description: 'Enable hearing vore digestion noises.',
component: CheckboxInput,
};
export const VORE_HEALTH_BARS: FeatureToggle = {
name: 'Vore Health Bars',
category: 'ADULT CONTENT',
description:
'Periodically shows status health bars in chat occasionally during vore absorption/digestion.',
component: CheckboxInput,
};
export const VISIBLE_TUMMIES: FeatureToggle = {
name: 'Visible Stomach Sprites',
category: 'ADULT CONTENT',
description: 'Enable Seeing the various stomach sprites.',
component: CheckboxInput,
};

View File

@@ -50,14 +50,6 @@ export const CHAT_MENTION: FeatureToggle = {
component: CheckboxInput, component: CheckboxInput,
}; };
export const VORE_HEALTH_BARS: FeatureToggle = {
name: 'Vore Health Bars',
category: 'CHAT',
description:
'Periodically shows status health bars in chat occasionally during vore absorption/digestion.',
component: CheckboxInput,
};
export const NEWS_POPUP: FeatureToggle = { export const NEWS_POPUP: FeatureToggle = {
name: 'Lore News Popups', name: 'Lore News Popups',
category: 'CHAT', category: 'CHAT',

View File

@@ -138,28 +138,6 @@ export const SOUND_MENTORHELP: FeatureToggle = {
component: CheckboxInput, component: CheckboxInput,
}; };
// Vorey sounds
export const BELCH_NOISES: FeatureToggle = {
name: 'Belch Noises',
category: 'SOUNDS',
description: 'Enable hearing burping noises.',
component: CheckboxInput,
};
export const EATING_NOISES: FeatureToggle = {
name: 'Eating Noises',
category: 'SOUNDS',
description: 'Enable hearing vore eating noises.',
component: CheckboxInput,
};
export const DIGEST_NOISES: FeatureToggle = {
name: 'Digestion Noises',
category: 'SOUNDS',
description: 'Enable hearing vore digestion noises.',
component: CheckboxInput,
};
export const ambience_freq: FeatureNumeric = { export const ambience_freq: FeatureNumeric = {
name: 'Ambience Frequency', name: 'Ambience Frequency',
category: 'SOUNDS', category: 'SOUNDS',

View File

@@ -2304,6 +2304,7 @@
#include "code\modules\client\preferences\types\character\general\01_basic.dm" #include "code\modules\client\preferences\types\character\general\01_basic.dm"
#include "code\modules\client\preferences\types\character\general\03_body.dm" #include "code\modules\client\preferences\types\character\general\03_body.dm"
#include "code\modules\client\preferences\types\game\admin.dm" #include "code\modules\client\preferences\types\game\admin.dm"
#include "code\modules\client\preferences\types\game\adult.dm"
#include "code\modules\client\preferences\types\game\auto_fit_viewport.dm" #include "code\modules\client\preferences\types\game\auto_fit_viewport.dm"
#include "code\modules\client\preferences\types\game\chat.dm" #include "code\modules\client\preferences\types\game\chat.dm"
#include "code\modules\client\preferences\types\game\fps.dm" #include "code\modules\client\preferences\types\game\fps.dm"