mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-10 06:37:05 +01:00
Make the belly Visibility pref a client one as opposed to a per-character one. (#17375)
* Automatic changelog compile [ci skip] * Make Belly pref global as opposed to per-character --------- Co-authored-by: vorestation-ci[bot] <199609141+vorestation-ci[bot]@users.noreply.github.com>
This commit is contained in:
@@ -11,7 +11,6 @@
|
||||
pref.capture_crystal = save_data["capture_crystal"]
|
||||
pref.auto_backup_implant = save_data["auto_backup_implant"]
|
||||
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)
|
||||
save_data["show_in_directory"] = pref.show_in_directory
|
||||
@@ -22,7 +21,6 @@
|
||||
save_data["capture_crystal"] = pref.capture_crystal
|
||||
save_data["auto_backup_implant"] = pref.auto_backup_implant
|
||||
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)
|
||||
if(pref.sensorpref > 5 || pref.sensorpref < 1)
|
||||
@@ -30,7 +28,6 @@
|
||||
character.sensorpref = pref.sensorpref
|
||||
character.capture_crystal = pref.capture_crystal
|
||||
//Vore Stomach Sprite Preference
|
||||
character.stomach_vision = pref.stomach_vision
|
||||
character.recalculate_vis()
|
||||
|
||||
/datum/category_item/player_setup_item/vore/misc/sanitize_character()
|
||||
@@ -41,7 +38,6 @@
|
||||
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.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)
|
||||
. += "<br>"
|
||||
@@ -53,7 +49,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("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("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))
|
||||
. += span_bold("Private Notes: <a href='byond://?src=\ref[src];edit_private_notes=1'>Edit</a>") + "<br>"
|
||||
|
||||
@@ -93,9 +88,6 @@
|
||||
else if(href_list["toggle_borg_petting"])
|
||||
pref.borg_petting = pref.borg_petting ? 0 : 1;
|
||||
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"])
|
||||
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))
|
||||
|
||||
@@ -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
|
||||
@@ -44,12 +44,6 @@
|
||||
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
|
||||
|
||||
/datum/preference/toggle/show_lore_news
|
||||
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
|
||||
savefile_key = "NEWS_POPUP"
|
||||
|
||||
@@ -129,25 +129,6 @@
|
||||
default_value = TRUE
|
||||
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 = 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/numeric/ambience_freq
|
||||
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
|
||||
savefile_key = "ambience_freq"
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
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/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_med = 0
|
||||
|
||||
@@ -197,7 +197,7 @@
|
||||
if(vantag_hud)
|
||||
compiled_vis |= VIS_CH_VANTAG
|
||||
|
||||
if(stomach_vision)
|
||||
if(client?.prefs.read_preference(/datum/preference/toggle/tummy_sprites))
|
||||
compiled_vis += VIS_CH_STOMACH
|
||||
|
||||
if(soulgem?.flag_check(SOULGEM_SEE_SR_SOULS))
|
||||
|
||||
@@ -1112,7 +1112,6 @@ var/global/list/damage_icon_parts = list() //see UpdateDamageIcon()
|
||||
|
||||
var/image/wing_image = get_wing_image(FALSE)
|
||||
|
||||
var/obj/item/organ/external/chest = organs_by_name[BP_TORSO]
|
||||
|
||||
if(wing_image)
|
||||
wing_image.layer = BODY_LAYER+WING_LAYER
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
/mob
|
||||
var/vantag_hud = 0 // Do I have the HUD enabled?
|
||||
var/stomach_vision = 1 // By default, you will see stomachs.
|
||||
var/mob/temporary_form // For holding onto a temporary form
|
||||
|
||||
var/disconnect_time = null //Time of client loss, set by Logout(), for timekeeping
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
if(!plane_holder || !vis_enabled)
|
||||
return
|
||||
|
||||
var/stomach_vision = client?.prefs.read_preference(/datum/preference/toggle/tummy_sprites)
|
||||
if(stomach_vision && !(VIS_CH_STOMACH in vis_enabled))
|
||||
plane_holder.set_vis(VIS_CH_STOMACH,TRUE)
|
||||
vis_enabled += VIS_CH_STOMACH
|
||||
@@ -40,10 +40,10 @@
|
||||
if(!toggle)
|
||||
return
|
||||
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!")
|
||||
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!")
|
||||
recalculate_vis()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user