[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 22:33:03 +01:00
committed by GitHub
co-authored by eghughguhhhhhh Kashargul
parent bfbcf946eb
commit d00cd1e398
13 changed files with 77 additions and 70 deletions
@@ -201,7 +201,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))
@@ -1141,7 +1141,6 @@ GLOBAL_LIST_EMPTY(damage_icon_parts) //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/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
+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
@@ -39,10 +39,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()