From 2f5cf51bd6575e5169a001795eae97d559485f75 Mon Sep 17 00:00:00 2001 From: MrMelbert Date: Sun, 9 Feb 2025 22:14:01 -0600 Subject: [PATCH 1/3] Silverscale Swag --- .../human/species_types/lizardpeople.dm | 28 ------------- .../carbon/human/species_types/silverscale.dm | 40 ++++++++++++++----- 2 files changed, 29 insertions(+), 39 deletions(-) diff --git a/code/modules/mob/living/carbon/human/species_types/lizardpeople.dm b/code/modules/mob/living/carbon/human/species_types/lizardpeople.dm index 44e3e2b79eed..85c03ceac322 100644 --- a/code/modules/mob/living/carbon/human/species_types/lizardpeople.dm +++ b/code/modules/mob/living/carbon/human/species_types/lizardpeople.dm @@ -221,36 +221,8 @@ Lizard subspecies: SILVER SCALED mutanttongue = /obj/item/organ/internal/tongue/lizard/silver changesource_flags = MIRROR_BADMIN | MIRROR_MAGIC | RACE_SWAP | ERT_SPAWN examine_limb_id = SPECIES_LIZARD - ///stored mutcolor for when we turn back off of a silverscale. - var/old_mutcolor - ///stored horn color for when we turn back off of a silverscale. - var/old_horncolor - ///stored eye color for when we turn back off of a silverscale. - var/old_eye_color_left - ///See above - var/old_eye_color_right /datum/species/lizard/silverscale/get_physical_attributes() return "Silver Scales are to lizardpeople what angels are to humans. \ Mostly identical, they are holy, don't breathe, don't get viruses, their hide cannot be pierced, love the taste of wine, \ and their tongue allows them to turn into a statue, for some reason." - -/datum/species/lizard/silverscale/on_species_gain(mob/living/carbon/human/new_silverscale, datum/species/old_species, pref_load) - old_mutcolor = new_silverscale.dna.features["mcolor"] - old_horncolor = new_silverscale.dna.features["lizard_horn_color"] - old_eye_color_left = new_silverscale.eye_color_left - old_eye_color_right = new_silverscale.eye_color_right - new_silverscale.dna.features["mcolor"] = "#eeeeee" - new_silverscale.dna.features["lizard_horn_color"] = "#eeeeee" - new_silverscale.eye_color_left = "#0000a0" - new_silverscale.eye_color_right = "#0000a0" - . = ..() - new_silverscale.add_filter("silver_glint", 2, list("type" = "outline", "color" = "#ffffff63", "size" = 2)) - -/datum/species/lizard/silverscale/on_species_loss(mob/living/carbon/human/was_silverscale, datum/species/new_species, pref_load) - was_silverscale.dna.features["mcolor"] = old_mutcolor - was_silverscale.dna.features["lizard_horn_color"] = old_horncolor - was_silverscale.eye_color_left = old_eye_color_left - was_silverscale.eye_color_right = old_eye_color_right - was_silverscale.remove_filter("silver_glint") - return ..() diff --git a/maplestation_modules/code/modules/mob/living/carbon/human/species_types/silverscale.dm b/maplestation_modules/code/modules/mob/living/carbon/human/species_types/silverscale.dm index 16bb77f22cfe..dc2e34ae9382 100644 --- a/maplestation_modules/code/modules/mob/living/carbon/human/species_types/silverscale.dm +++ b/maplestation_modules/code/modules/mob/living/carbon/human/species_types/silverscale.dm @@ -22,15 +22,17 @@ /obj/item/organ/internal/tongue/lizard/silver /// Stored skin color for turning back off of a silverscale. - var/old_skincolor + VAR_PRIVATE/old_skincolor ///stored mutcolor for when we turn back off of a silverscale. - var/old_mutcolor + VAR_PRIVATE/old_mutcolor ///stored horn color for when we turn back off of a silverscale. - var/old_horncolor + VAR_PRIVATE/old_horncolor ///stored eye color for when we turn back off of a silverscale. - var/old_eye_color_left + VAR_PRIVATE/old_eye_color_left ///See above - var/old_eye_color_right + VAR_PRIVATE/old_eye_color_right + /// Tracks what color our glint is, to prevent unnecessary updates + VAR_PRIVATE/glint_color /obj/item/organ/internal/tongue/lizard/silver/Initialize(mapload) . = ..() @@ -64,11 +66,6 @@ old_eye_color_right = he_who_was_blessed_with_silver.eye_color_right if (istype(organ_owner.dna.species, /datum/species/lizard/silverscale)) - var/datum/species/lizard/silverscale/silver_species = organ_owner.dna.species - old_mutcolor = silver_species.old_mutcolor - old_eye_color_left = silver_species.old_eye_color_left - old_eye_color_right = silver_species.old_eye_color_right - organ_owner.clear_mood_event(SILVERSCALE_LOST_TONGUE_MOOD_ID) if (!special) to_chat(organ_owner, span_blue("You feel a sense of security as you feel the familiar metallic taste of a silvery tongue... \ @@ -79,7 +76,7 @@ he_who_was_blessed_with_silver.dna.features["lizard_horn_color"] = "#eeeeee" he_who_was_blessed_with_silver.eye_color_left = "#0000a0" he_who_was_blessed_with_silver.eye_color_right = "#0000a0" - he_who_was_blessed_with_silver.add_filter("silver_glint", 2, list("type" = "outline", "color" = "#ffffff63", "size" = 2)) + update_glint() he_who_was_blessed_with_silver.physiology?.damage_resistance += 10 he_who_was_blessed_with_silver.dna.species.exotic_bloodtype = /datum/blood_type/silver/lizard @@ -122,6 +119,27 @@ organ_owner.forceMove(statue.statue.loc) organ_owner.Paralyze(12 SECONDS) +/obj/item/organ/internal/tongue/lizard/silver/on_life(seconds_per_tick, times_fired) + update_glint() + +/// Updates the alpha of the "glow" effect +/obj/item/organ/internal/tongue/lizard/silver/proc/update_glint() + var/turf/owner_turf = get_turf(owner) + var/lums = owner_turf?.get_lumcount() - LIGHTING_TILE_IS_DARK + if(lums <= 0) + if(owner.get_filter("silver_glint")) + owner.transition_filter("silver_glint", outline_filter(1.5, "#FFFFFF00"), 1 SECONDS) + addtimer(CALLBACK(owner, TYPE_PROC_REF(/datum, remove_filter), "silver_glint"), 1 SECONDS) + glint_color = null + return + var/new_glint_color = "#ffffff[num2text(0.5 * lums * 255, 2, 16)]" + if(glint_color == new_glint_color) + return + glint_color = new_glint_color + if(!owner.get_filter("silver_glint")) + owner.add_filter("silver_glint", 2, outline_filter(1.5, "#FFFFFF00")) + owner.transition_filter("silver_glint", outline_filter(1.5, glint_color), 1 SECONDS) + /datum/action/cooldown/turn_to_statue /// Traits granted to the mob when in statue form /// Overlaps with Silverscale traits a bit, don't really care, we're just being thorough From 2d41fdd767c8c54ce30b864e3772396e515d59a7 Mon Sep 17 00:00:00 2001 From: MrMelbert Date: Thu, 13 Feb 2025 20:07:31 -0600 Subject: [PATCH 2/3] Fixes --- .../code/modules/client/preferences/species/lizard.dm | 4 ++-- .../mob/living/carbon/human/species_types/silverscale.dm | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/maplestation_modules/code/modules/client/preferences/species/lizard.dm b/maplestation_modules/code/modules/client/preferences/species/lizard.dm index ae971056daf6..dab25ce2c40c 100644 --- a/maplestation_modules/code/modules/client/preferences/species/lizard.dm +++ b/maplestation_modules/code/modules/client/preferences/species/lizard.dm @@ -76,7 +76,7 @@ color_source = ORGAN_COLOR_OVERRIDE /datum/bodypart_overlay/mutant/horns/inherit_color(obj/item/bodypart/bodypart_owner, force) - draw_color = bodypart_owner?.owner?.dna?.features["lizard_horn_color"] || "#FFFFFF" + draw_color = bodypart_owner?.owner?.dna?.features["lizard_horn_color"] || "#dddddd" return TRUE // The actual preference @@ -91,7 +91,7 @@ target.dna.features["lizard_horn_color"] = value /datum/preference/color/horn_color/create_default_value() - return "#FFFFFF" + return "#dddddd" // -- Lizard Horn Layer selection -- // Makes it actually work diff --git a/maplestation_modules/code/modules/mob/living/carbon/human/species_types/silverscale.dm b/maplestation_modules/code/modules/mob/living/carbon/human/species_types/silverscale.dm index dc2e34ae9382..73e0ce4bf1e8 100644 --- a/maplestation_modules/code/modules/mob/living/carbon/human/species_types/silverscale.dm +++ b/maplestation_modules/code/modules/mob/living/carbon/human/species_types/silverscale.dm @@ -67,7 +67,7 @@ if (istype(organ_owner.dna.species, /datum/species/lizard/silverscale)) organ_owner.clear_mood_event(SILVERSCALE_LOST_TONGUE_MOOD_ID) - if (!special) + if(!special) to_chat(organ_owner, span_blue("You feel a sense of security as you feel the familiar metallic taste of a silvery tongue... \ you are once again Silverscale.")) @@ -97,7 +97,7 @@ if (istype(organ_owner.dna.species, /datum/species/lizard/silverscale)) organ_owner.add_mood_event(SILVERSCALE_LOST_TONGUE_MOOD_ID, /datum/mood_event/silverscale_lost_tongue) - if (!special) + if(!special) to_chat(organ_owner, span_userdanger("You can feel the arcane powers of the silver tongue slip away - \ you've lost your silver heritage! Without it, you are less than Silverscale... you MUST get it back!")) @@ -117,7 +117,8 @@ for(var/datum/action/cooldown/turn_to_statue/statue in actions) if(organ_owner.loc == statue.statue) organ_owner.forceMove(statue.statue.loc) - organ_owner.Paralyze(12 SECONDS) + if(!special) + organ_owner.Paralyze(12 SECONDS) /obj/item/organ/internal/tongue/lizard/silver/on_life(seconds_per_tick, times_fired) update_glint() From a2271f709a724b1d974f37798065ec57a1690908 Mon Sep 17 00:00:00 2001 From: MrMelbert Date: Fri, 14 Feb 2025 00:37:24 -0600 Subject: [PATCH 3/3] Feex --- .../modules/mob/living/carbon/human/species_types/silverscale.dm | 1 + 1 file changed, 1 insertion(+) diff --git a/maplestation_modules/code/modules/mob/living/carbon/human/species_types/silverscale.dm b/maplestation_modules/code/modules/mob/living/carbon/human/species_types/silverscale.dm index 73e0ce4bf1e8..8a870d808a36 100644 --- a/maplestation_modules/code/modules/mob/living/carbon/human/species_types/silverscale.dm +++ b/maplestation_modules/code/modules/mob/living/carbon/human/species_types/silverscale.dm @@ -21,6 +21,7 @@ . += " This will be invaluable towards our research of silverscale biology - please send more samples if you have any!" /obj/item/organ/internal/tongue/lizard/silver + visual = TRUE /// Stored skin color for turning back off of a silverscale. VAR_PRIVATE/old_skincolor ///stored mutcolor for when we turn back off of a silverscale.