bioluminescent kidan! 🐜 🏮 (#7137)

* bioluminescent kidan! 🐜 🏮

Gives Kidan an IC tab ability that makes them glow! wow!!!!!

This adds body and head markings, a new glowy organ to kidan lower body,
and glowing space ants! wow!!!!!!

Bioluminescence eats away nutriment, you can be glowing for some 13
minutes at roundstart before you starve out and the light goes out.
Dying also turns off the light. And shadowlings veil too.

Light color is based on a mix between head and body markings colors,
where the body markings color is slightly more predominant.

How bright you are depends on how much clothing you have. A full nakey
kidan is as bright as a flashlight, while a fully suited kidan isn't
bright at all. Rolling down jumpsuits makes you more bright too. Basic
idea is less clothes in the way, more brightness.

Oh you can also remove the light organ and implant it on other things,
and they will gain the ability to be bioluminescent. Yes you can be a
hot pink glowing neon green in the dark vulp. If you implant the organ
on someone else, the light will be based on the original kidan's colors.

kudos to Traveling Merchant for the sprite work, and KasparoVv for
helping me out with the markings part. Only one set of body markings is
done yet, but hey they're easy to make

🆑 pinatacolada, Travelling Merchant
add: Glowing kidan!
add: Kidan body markings
🆑

* address all the things

literally everything

* fixit

* death comes

* death goes

* i ded

* all the small things
This commit is contained in:
pinatacolada
2017-04-29 23:31:27 -07:00
committed by Crazy Lemon
parent bb93c95067
commit e52886734f
10 changed files with 157 additions and 20 deletions
+12 -12
View File
@@ -310,11 +310,11 @@ var/global/list/special_role_times = list( //minimum age (in days) for accounts
dat += "<a href='?_src_=prefs;preference=ha_style;task=input'>[ha_style]</a> "
dat += "<a href='?_src_=prefs;preference=headaccessory;task=input'>Color</a> [color_square(r_headacc, g_headacc, b_headacc)]<br>"
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 += "<b>Head Markings:</b> "
dat += "<a href='?_src_=prefs;preference=m_style_head;task=input'>[m_styles["head"]]</a>"
dat += "<a href='?_src_=prefs;preference=m_head_colour;task=input'>Color</a> [color_square(color2R(m_colours["head"]), color2G(m_colours["head"]), color2B(m_colours["head"]))]<br>"
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 += "<b>Body Markings:</b> "
dat += "<a href='?_src_=prefs;preference=m_style_body;task=input'>[m_styles["body"]]</a>"
dat += "<a href='?_src_=prefs;preference=m_body_colour;task=input'>Color</a> [color_square(color2R(m_colours["body"]), color2G(m_colours["body"]), color2B(m_colours["body"]))]<br>"
@@ -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)
+3
View File
@@ -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)
@@ -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"
@@ -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")
+1 -1
View File
@@ -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"])
..()
..()
@@ -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!
@@ -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("<span class='notice'>[owner] starts to glow!</span>", "<span class='notice'>You enable your bioluminescence.</span>")
else
owner.visible_message("<span class='notice'>[owner] fades to dark.</span>", "<span class='notice'>You disable your bioluminescence.</span>")
/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, "<span class='warning'>You're too hungry to be bioluminescent!</span>")
return
if(owner.stat)
toggle_biolum(1)
owner.visible_message("<span class='notice'>[owner] fades to dark.</span>")
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, "<span class='warning'>You cannot alter your bioluminescence in your current state.</span>")
return 0
if(!statoverride && owner.nutrition < KIDAN_LANTERN_MINHUNGER)
to_chat(owner, "<span class='warning'>You're too hungry to be bioluminescent!</span>")
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