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
+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