diff --git a/code/game/gamemodes/shadowling/shadowling_abilities.dm b/code/game/gamemodes/shadowling/shadowling_abilities.dm index 8abe51675cb..d4d394a4598 100644 --- a/code/game/gamemodes/shadowling/shadowling_abilities.dm +++ b/code/game/gamemodes/shadowling/shadowling_abilities.dm @@ -99,10 +99,16 @@ hhat.visible_message("[hhat]'s light fades and turns off.") return I.light_range -/obj/effect/proc_holder/spell/aoe_turf/veil/proc/extinguishMob(var/mob/living/H) - for(var/obj/item/F in H) +/obj/effect/proc_holder/spell/aoe_turf/veil/proc/extinguishMob(mob/living/L) + for(var/obj/item/F in L) if(F.light_range > 0) extinguishItem(F) + if(ishuman(L)) + var/mob/living/carbon/human/H = L + var/obj/item/organ/internal/lantern/O = H.get_int_organ(/obj/item/organ/internal/lantern) + if(O && O.glowing) + O.toggle_biolum(1) + H.visible_message("[H] is engulfed in shadows and fades into the darkness.", "A sense of dread washes over you as you suddenly dim dark.") /obj/effect/proc_holder/spell/aoe_turf/veil/cast(list/targets, mob/user = usr) if(!shadowling_check(user)) diff --git a/code/modules/client/preference/preferences.dm b/code/modules/client/preference/preferences.dm index ed3a19a0ca5..b6980912397 100644 --- a/code/modules/client/preference/preferences.dm +++ b/code/modules/client/preference/preferences.dm @@ -310,11 +310,11 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts dat += "[ha_style] " dat += "Color [color_square(r_headacc, g_headacc, b_headacc)]
" - if(species in list("Machine", "Tajaran", "Unathi", "Vulpkanin")) //Species with head markings. + if(species in list("Machine", "Tajaran", "Unathi", "Vulpkanin", "Kidan")) //Species with head markings. dat += "Head Markings: " dat += "[m_styles["head"]]" dat += "Color [color_square(color2R(m_colours["head"]), color2G(m_colours["head"]), color2B(m_colours["head"]))]
" - if(species in list("Human", "Unathi", "Grey", "Vulpkanin", "Tajaran", "Skrell", "Vox", "Drask")) //Species with body markings/tattoos. + if(species in list("Human", "Unathi", "Grey", "Vulpkanin", "Tajaran", "Skrell", "Vox", "Drask", "Kidan")) //Species with body markings/tattoos. dat += "Body Markings: " dat += "[m_styles["body"]]" dat += "Color [color_square(color2R(m_colours["body"]), color2G(m_colours["body"]), color2B(m_colours["body"]))]
" @@ -1195,16 +1195,16 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts if(species in list("Unathi", "Vulpkanin", "Tajaran", "Machine")) //Species that have head accessories. ha_style = random_head_accessory(species) if("m_style_head") - if(species in list("Machine", "Tajaran", "Unathi", "Vulpkanin")) //Species with head markings. + if(species in list("Machine", "Tajaran", "Unathi", "Vulpkanin", "Kidan")) //Species with head markings. m_styles["head"] = random_marking_style("head", species, robohead, null, alt_head) if("m_head_colour") - if(species in list("Machine", "Tajaran", "Unathi", "Vulpkanin")) //Species with head markings. + if(species in list("Machine", "Tajaran", "Unathi", "Vulpkanin", "Kidan")) //Species with head markings. m_colours["head"] = rgb(rand(0,255), rand(0,255), rand(0,255)) if("m_style_body") - if(species in list("Human", "Unathi", "Grey", "Vulpkanin", "Tajaran", "Skrell", "Vox", "Drask")) //Species with body markings. + if(species in list("Human", "Unathi", "Grey", "Vulpkanin", "Tajaran", "Skrell", "Vox", "Drask", "Kidan")) //Species with body markings. m_styles["body"] = random_marking_style("body", species) if("m_body_colour") - if(species in list("Human", "Unathi", "Grey", "Vulpkanin", "Tajaran", "Skrell", "Vox", "Drask")) //Species with body markings. + if(species in list("Human", "Unathi", "Grey", "Vulpkanin", "Tajaran", "Skrell", "Vox", "Drask", "Kidan")) //Species with body markings. m_colours["body"] = rgb(rand(0,255), rand(0,255), rand(0,255)) if("m_style_tail") if(species in list("Vox", "Vulpkanin")) //Species with tail markings. @@ -1292,13 +1292,13 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts g_headacc = 0 b_headacc = 0 - if(species in list("Machine", "Tajaran", "Unathi", "Vulpkanin")) //Species with head markings. + if(species in list("Machine", "Tajaran", "Unathi", "Vulpkanin", "Kidan")) //Species with head markings. m_styles["head"] = random_marking_style("head", species, robohead, null, alt_head) else m_styles["head"] = "None" m_colours["head"] = "#000000" - if(species in list("Human", "Unathi", "Grey", "Vulpkanin", "Tajaran", "Skrell", "Vox", "Drask")) //Species with body markings/tattoos. + if(species in list("Human", "Unathi", "Grey", "Vulpkanin", "Tajaran", "Skrell", "Vox", "Drask", "Kidan")) //Species with body markings/tattoos. m_styles["body"] = random_marking_style("body", species) else m_styles["body"] = "None" @@ -1470,7 +1470,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts m_styles["head"] = "None" if("m_style_head") - if(species in list("Machine", "Tajaran", "Unathi", "Vulpkanin")) //Species with head markings. + if(species in list("Machine", "Tajaran", "Unathi", "Vulpkanin", "Kidan")) //Species with head markings. var/list/valid_markings = list() valid_markings["None"] = marking_styles_list["None"] for(var/markingstyle in marking_styles_list) @@ -1506,14 +1506,14 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts m_styles["head"] = new_marking_style if("m_head_colour") - if(species in list("Machine", "Tajaran", "Unathi", "Vulpkanin")) //Species with head markings. + if(species in list("Machine", "Tajaran", "Unathi", "Vulpkanin", "Kidan")) //Species with head markings. var/input = "Choose the colour of your your character's head markings:" var/new_markings = input(user, input, "Character Preference", m_colours["head"]) as color|null if(new_markings) m_colours["head"] = new_markings if("m_style_body") - if(species in list("Human", "Unathi", "Grey", "Vulpkanin", "Tajaran", "Skrell", "Vox", "Drask")) //Species with body markings/tattoos. + if(species in list("Human", "Unathi", "Grey", "Vulpkanin", "Tajaran", "Skrell", "Vox", "Drask", "Kidan")) //Species with body markings/tattoos. var/list/valid_markings = list() valid_markings["None"] = marking_styles_list["None"] for(var/markingstyle in marking_styles_list) @@ -1530,7 +1530,7 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts m_styles["body"] = new_marking_style if("m_body_colour") - if(species in list("Human", "Unathi", "Grey", "Vulpkanin", "Tajaran", "Skrell", "Vox", "Drask")) //Species with body markings/tattoos. + if(species in list("Human", "Unathi", "Grey", "Vulpkanin", "Tajaran", "Skrell", "Vox", "Drask", "Kidan")) //Species with body markings/tattoos. var/input = "Choose the colour of your your character's body markings:" var/new_markings = input(user, input, "Character Preference", m_colours["body"]) as color|null if(new_markings) diff --git a/code/modules/mob/living/carbon/death.dm b/code/modules/mob/living/carbon/death.dm index f8a9b38d098..2ad9b1ef6ab 100644 --- a/code/modules/mob/living/carbon/death.dm +++ b/code/modules/mob/living/carbon/death.dm @@ -6,4 +6,7 @@ if(reagents) reagents.death_metabolize(src) + for(var/obj/item/organ/internal/I in internal_organs) + I.on_owner_death() + ..(gibbed) diff --git a/code/modules/mob/living/carbon/human/species/station.dm b/code/modules/mob/living/carbon/human/species/station.dm index 10e39022315..4e33c7cdef8 100644 --- a/code/modules/mob/living/carbon/human/species/station.dm +++ b/code/modules/mob/living/carbon/human/species/station.dm @@ -487,7 +487,7 @@ flags = IS_WHITELISTED clothing_flags = HAS_UNDERWEAR | HAS_UNDERSHIRT | HAS_SOCKS - bodyflags = FEET_CLAWS | HAS_HEAD_ACCESSORY + bodyflags = FEET_CLAWS | HAS_HEAD_ACCESSORY | HAS_HEAD_MARKINGS | HAS_BODY_MARKINGS eyes = "kidan_eyes_s" dietflags = DIET_HERB blood_color = "#FB9800" @@ -503,7 +503,8 @@ "kidneys" = /obj/item/organ/internal/kidneys, "brain" = /obj/item/organ/internal/brain, "appendix" = /obj/item/organ/internal/appendix, - "eyes" = /obj/item/organ/internal/eyes //Default darksight of 2. + "eyes" = /obj/item/organ/internal/eyes, //Default darksight of 2. + "lantern" = /obj/item/organ/internal/lantern ) allowed_consumed_mobs = list(/mob/living/simple_animal/diona) @@ -515,7 +516,6 @@ "is cracking their exoskeleton!", "is stabbing themselves with their mandibles!", "is holding their breath!") - /datum/species/slime name = "Slime People" name_plural = "Slime People" diff --git a/code/modules/mob/new_player/sprite_accessories.dm b/code/modules/mob/new_player/sprite_accessories.dm index ea80c4def16..77593c8c74a 100644 --- a/code/modules/mob/new_player/sprite_accessories.dm +++ b/code/modules/mob/new_player/sprite_accessories.dm @@ -1981,13 +1981,13 @@ /datum/sprite_accessory/body_markings icon = 'icons/mob/body_accessory.dmi' - species_allowed = list("Unathi", "Tajaran", "Vulpkanin", "Machine", "Vox") + species_allowed = list("Unathi", "Tajaran", "Vulpkanin", "Machine", "Vox", "Kidan") icon_state = "accessory_none" marking_location = "body" /datum/sprite_accessory/body_markings/none name = "None" - species_allowed = list("Human", "Unathi", "Diona", "Grey", "Machine", "Tajaran", "Vulpkanin", "Skrell", "Slime People", "Skeleton", "Vox") + species_allowed = list("Human", "Unathi", "Diona", "Grey", "Machine", "Tajaran", "Vulpkanin", "Skrell", "Slime People", "Skeleton", "Vox", "Kidan") icon_state = "accessory_none" /datum/sprite_accessory/body_markings/tiger @@ -1995,6 +1995,13 @@ species_allowed = list("Unathi", "Tajaran", "Vulpkanin") icon_state = "markings_tiger" +/datum/sprite_accessory/body_markings/kidan + species_allowed = list("Kidan") + +/datum/sprite_accessory/body_markings/kidan/outline_kid + name = "Kidan Outline" + icon_state = "markings_outline_kid" + /datum/sprite_accessory/body_markings/unathi species_allowed = list("Unathi") @@ -2083,6 +2090,13 @@ marking_location = "head" species_allowed = list() +/datum/sprite_accessory/body_markings/head/kidan + species_allowed = list("Kidan") + +/datum/sprite_accessory/body_markings/head/kidan/outline_head_kid + name = "Kidan Outline Head" + icon_state = "markings_head_outline_kid" + /datum/sprite_accessory/body_markings/head/tajara species_allowed = list("Tajaran") diff --git a/code/modules/surgery/organs/organ.dm b/code/modules/surgery/organs/organ.dm index aa32375792e..dd0c9655384 100644 --- a/code/modules/surgery/organs/organ.dm +++ b/code/modules/surgery/organs/organ.dm @@ -372,4 +372,4 @@ I use this so that this can be made better once the organ overhaul rolls out -- // The only thing the official proc does is //instantiate the list and call this proc dna.deserialize(data["dna"]) - ..() + ..() \ No newline at end of file diff --git a/code/modules/surgery/organs/organ_internal.dm b/code/modules/surgery/organs/organ_internal.dm index 0906b3c63c5..4d331515606 100644 --- a/code/modules/surgery/organs/organ_internal.dm +++ b/code/modules/surgery/organs/organ_internal.dm @@ -87,6 +87,10 @@ /obj/item/organ/internal/proc/on_life() return +//abstract proc called by carbon/death() +/obj/item/organ/internal/proc/on_owner_death() + return + /obj/item/organ/internal/proc/prepare_eat() if(status == ORGAN_ROBOT) return //no eating cybernetic implants! diff --git a/code/modules/surgery/organs/subtypes/kidan.dm b/code/modules/surgery/organs/subtypes/kidan.dm index 848c0bca737..37fd74a6d2a 100644 --- a/code/modules/surgery/organs/subtypes/kidan.dm +++ b/code/modules/surgery/organs/subtypes/kidan.dm @@ -1,3 +1,113 @@ /obj/item/organ/internal/liver/kidan alcohol_intensity = 0.5 species = "Kidan" + +#define KIDAN_LANTERN_HUNGERCOST 0.5 +#define KIDAN_LANTERN_MINHUNGER 150 +#define KIDAN_LANTERN_LIGHT 4 + +/obj/item/organ/internal/lantern + name = "Bioluminescent Lantern" + desc = "A specialized tissue that reacts with oxygen, nutriment and blood to produce light in Kidan." + icon_state = "kid_lantern" + origin_tech = "biotech=2" + w_class = WEIGHT_CLASS_TINY + parent_organ = "groin" + slot = "lantern" + actions_types = list(/datum/action/item_action/organ_action/toggle) + var/colour + var/glowing = 0 + +/obj/item/organ/internal/lantern/ui_action_click() + if(toggle_biolum()) + if(glowing) + owner.visible_message("[owner] starts to glow!", "You enable your bioluminescence.") + else + owner.visible_message("[owner] fades to dark.", "You disable your bioluminescence.") + +/obj/item/organ/internal/lantern/on_life() + ..() + if(glowing)//i hate this but i couldnt figure out a better way + if(owner.nutrition < KIDAN_LANTERN_MINHUNGER) + toggle_biolum(1) + to_chat(owner, "You're too hungry to be bioluminescent!") + return + + if(owner.stat) + toggle_biolum(1) + owner.visible_message("[owner] fades to dark.") + return + + owner.nutrition = max(owner.nutrition - KIDAN_LANTERN_HUNGERCOST, KIDAN_LANTERN_HUNGERCOST) + + var/new_light = calculate_glow(KIDAN_LANTERN_LIGHT) + + if(!colour) //this should never happen in theory + colour = BlendRGB(owner.m_colours["body"], owner.m_colours["head"], 0.65) //then again im pretty bad at theoretics + + if(new_light != glowing) + var/obj/item/organ/external/groin/lbody = owner.get_organ(check_zone(parent_organ)) + lbody.set_light(new_light,l_color = colour) + glowing = new_light + + return + +/obj/item/organ/internal/lantern/on_owner_death() + if(glowing) + toggle_biolum(1) + +/obj/item/organ/internal/lantern/proc/toggle_biolum(statoverride) + if(!statoverride && owner.incapacitated()) + to_chat(owner, "You cannot alter your bioluminescence in your current state.") + return 0 + + if(!statoverride && owner.nutrition < KIDAN_LANTERN_MINHUNGER) + to_chat(owner, "You're too hungry to be bioluminescent!") + return 0 + + if(!colour) + colour = BlendRGB(owner.m_colours["head"], owner.m_colours["body"], 0.65) + + if(!glowing) + var/light = calculate_glow(KIDAN_LANTERN_LIGHT) + var/obj/item/organ/external/groin/lbody = owner.get_organ(check_zone(parent_organ)) + lbody.set_light(light,l_color = colour) + glowing = light + return 1 + + else + var/obj/item/organ/external/groin/lbody = owner.get_organ(check_zone(parent_organ)) + lbody.set_light(0) + glowing = 0 + return 1 + +/obj/item/organ/internal/lantern/proc/calculate_glow(light) + if(!light) + light = KIDAN_LANTERN_LIGHT //should never happen but just to prevent things from breaking + + var/occlusion = 0 //clothes occluding light + + if(!get_location_accessible(owner, "head")) + occlusion++ + if(owner.w_uniform && copytext(owner.w_uniform.item_color,-2) != "_d") //jumpsuit not rolled down + occlusion++ + if(owner.wear_suit) + occlusion++ + + return light - occlusion + +/obj/item/organ/internal/lantern/remove(mob/living/carbon/M, special = 0) + if(ishuman(M)) + var/mob/living/carbon/human/H = M + + if(!colour) //if its removed before used save the color + colour = BlendRGB(H.m_colours["body"], H.m_colours["head"], 0.65) + + if(glowing) + toggle_biolum(1) + + . = ..() + +#undef KIDAN_LANTERN_HUNGERCOST +#undef KIDAN_LANTERN_MINHUNGER +#undef KIDAN_LANTERN_LIGHT \ No newline at end of file diff --git a/icons/mob/body_accessory.dmi b/icons/mob/body_accessory.dmi index 5400c933c7f..b6d28330b69 100644 Binary files a/icons/mob/body_accessory.dmi and b/icons/mob/body_accessory.dmi differ diff --git a/icons/obj/surgery.dmi b/icons/obj/surgery.dmi index 2f055a0c491..64f049fbdd9 100644 Binary files a/icons/obj/surgery.dmi and b/icons/obj/surgery.dmi differ