From 702485b0458bef0a0380bb3226427cca3096a854 Mon Sep 17 00:00:00 2001 From: Alphas00 <154434082+Alphas00@users.noreply.github.com> Date: Sat, 30 Nov 2024 11:51:18 +0100 Subject: [PATCH] Human genitals fix & Fat persistance Fixed sprites for human genitals (breasts, penis, vagina) Moved fat permanence changes to the GS13 folder Re-added fat permanence save on round end for all alive and present players --- GainStation13/code/mechanics/permanent_fat.dm | 22 ++++++++++++++++--- code/game/machinery/cryopod.dm | 6 ----- code/modules/arousal/genitals.dm | 15 ++++++++++--- 3 files changed, 31 insertions(+), 12 deletions(-) diff --git a/GainStation13/code/mechanics/permanent_fat.dm b/GainStation13/code/mechanics/permanent_fat.dm index fe9cba908f..91a0f3f950 100644 --- a/GainStation13/code/mechanics/permanent_fat.dm +++ b/GainStation13/code/mechanics/permanent_fat.dm @@ -5,7 +5,7 @@ /mob/living/carbon/proc/perma_fat_save(mob/living/carbon/character) var/key = savekey if(!key) - return FALSE + return FALSE var/filename = "preferences.sav" var/path = "data/player_saves/[key[1]]/[key]/[filename]" @@ -21,11 +21,27 @@ S["weight_gain_persistent"] >> persi if(persi) WRITE_FILE(S["starting_weight"] , character.fatness_real) - var/perma + var/perma S["weight_gain_permanent"] >> perma if(S["weight_gain_permanent"]) WRITE_FILE(S["permanent_fat"] , character.fatness_perma) +/datum/controller/subsystem/ticker/gather_roundend_feedback() + for(var/mob/m in GLOB.player_list) + if(iscarbon(m)) + var/mob/living/carbon/C = m + if(C) + C.perma_fat_save(C) + ..() + +/obj/machinery/cryopod/despawn_occupant() + var/mob/living/mob_occupant = occupant + if(iscarbon(mob_occupant)) + var/mob/living/carbon/C = mob_occupant + if(C) + C.perma_fat_save(C) + ..() + /* /datum/preferences/proc/perma_fat_save(character) if(iscarbon(character)) @@ -45,7 +61,7 @@ if(!S) return FALSE S.cd = "/character[default_slot]" - + if(C.client.prefs.weight_gain_persistent) WRITE_FILE(S["starting_weight"] , C.fatness_real) if(C.client.prefs.weight_gain_permanent) diff --git a/code/game/machinery/cryopod.dm b/code/game/machinery/cryopod.dm index 2ed0e7e61f..17a27b77ab 100644 --- a/code/game/machinery/cryopod.dm +++ b/code/game/machinery/cryopod.dm @@ -280,12 +280,6 @@ GLOBAL_LIST_EMPTY(cryopod_computers) var/mob/living/mob_occupant = occupant var/list/crew_member = list() - //GS13 Process permanent fat - if(iscarbon(mob_occupant)) - var/mob/living/carbon/C = mob_occupant - if(C) - C.perma_fat_save(C) - crew_member["name"] = mob_occupant.real_name if(mob_occupant.mind) diff --git a/code/modules/arousal/genitals.dm b/code/modules/arousal/genitals.dm index 3e0c85ddb0..528f17f344 100644 --- a/code/modules/arousal/genitals.dm +++ b/code/modules/arousal/genitals.dm @@ -359,13 +359,22 @@ if("belly_color") genital_overlay.color = "#[dna.features["belly_color"]]" - //GS13 Port - Specific check for belly since we need organ values specifically and not sprite_accessories, maybe can rewrite this more generically later? - // In any case I don't want any specific calculations done here + //GS13 - Because each genital's file has different naming schemes for their icon_states, + // I've made it so each type is checked and the icon_state built based on which genital it is if(G.slot == "belly") genital_overlay.icon = G.icon genital_overlay.icon_state = "[G.icon_state]_[aroused_state]_[layertext]" else - genital_overlay.icon_state = "[G.slot]_[S.icon_state]_[size][(dna.species.use_skintones && !dna.skin_tone_override) ? "_s" : ""]_[aroused_state]_[layertext]" + if(G.slot == "breasts") + genital_overlay.icon_state = "[G.slot]_[S.icon_state]_[size][(dna.species.use_skintones && !dna.skin_tone_override) ? "-s" : ""]_[aroused_state]_[layertext]" + else + if(G.slot == "penis") + genital_overlay.icon_state = "[G.slot]_[S.icon_state]_[size]_[aroused_state]_[layertext]" + else + if(G.slot == "vagina") + genital_overlay.icon_state = "[G.slot][(dna.species.use_skintones && !dna.skin_tone_override) ? "-s" : ""]_[S.icon_state]_[size]_[aroused_state]_[layertext]" + else + genital_overlay.icon_state = "[G.slot]_[S.icon_state]_[size][(dna.species.use_skintones && !dna.skin_tone_override) ? "_s" : ""]_[aroused_state]_[layertext]" if(layers_num[layer] == GENITALS_FRONT_LAYER && G.genital_flags & GENITAL_THROUGH_CLOTHES) genital_overlay.layer = -GENITALS_EXPOSED_LAYER