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:
eghughguhhhhhh
2025-03-18 20:44:40 -03:00
committed by GitHub
parent 46a3d2a9b6
commit dfeaa5f5ed
13 changed files with 77 additions and 70 deletions
@@ -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
View File
@@ -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 -3
View File
@@ -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()