Diona Refactor

This commit is contained in:
Fox-McCloud
2016-04-12 23:54:12 -04:00
parent 1d04645730
commit 5081e6d892
4 changed files with 37 additions and 59 deletions
+2 -32
View File
@@ -192,7 +192,7 @@
if (radiation > 100)
radiation = 100
if(!(species.flags & RAD_ABSORB))
if(!get_int_organ(/obj/item/organ/internal/heart/diona))
Weaken(10)
if(!lying)
to_chat(src, "<span class='alert'>You feel weak.</span>")
@@ -202,14 +202,7 @@
radiation = 0
else
if(species.flags & RAD_ABSORB)
var/rads = radiation/25
radiation -= rads
nutrition += rads
adjustBruteLoss(-(rads))
adjustOxyLoss(-(rads))
adjustToxLoss(-(rads))
updatehealth()
if(get_int_organ(/obj/item/organ/internal/heart/diona))
return
var/damage = 0
@@ -676,24 +669,6 @@
if(status_flags & GODMODE)
return 0 //godmode
if(species.flags & REQUIRE_LIGHT)
var/light_amount = 0 //how much light there is in the place, affects receiving nutrition and healing
if(isturf(loc)) //else, there's considered to be no light
var/turf/T = loc
light_amount = min(T.get_lumcount()*10, 5) //hardcapped so it's not abused by having a ton of flashlights
nutrition += light_amount
traumatic_shock -= light_amount
if(species.flags & IS_PLANT)
if(nutrition > 450)
nutrition = 450
if((light_amount >= 5) && !suiciding) //if there's enough light, heal
adjustBruteLoss(-(light_amount/2))
adjustFireLoss(-(light_amount/4))
//adjustToxLoss(-(light_amount))
adjustOxyLoss(-(light_amount))
//TODO: heal wounds, heal broken limbs.
//The fucking FAT mutation is the greatest shit ever. It makes everyone so hot and bothered.
if(species.flags & CAN_BE_FAT)
if(FAT in mutations)
@@ -728,11 +703,6 @@
else
overeatduration -= 2
if(species.flags & REQUIRE_LIGHT)
if(nutrition < 200)
take_overall_damage(10,0)
traumatic_shock++
if (drowsyness)
drowsyness--
eye_blurry = max(2, eye_blurry)
@@ -622,7 +622,7 @@
even the simplest concepts of other minds. Their alien physiology allows them survive happily off a diet of nothing but light, \
water and other radiation."
flags = NO_BREATHE | REQUIRE_LIGHT | IS_PLANT | RAD_ABSORB | NO_BLOOD | NO_PAIN
flags = NO_BREATHE | IS_PLANT | NO_BLOOD | NO_PAIN
clothing_flags = HAS_SOCKS
dietflags = 0 //Diona regenerate nutrition in light, no diet necessary
@@ -672,23 +672,32 @@
return ..()
/* //overpowered and dumb as hell; they get cloning back, though.
/datum/species/diona/handle_death(var/mob/living/carbon/human/H)
/datum/species/diona/handle_life(var/mob/living/carbon/human/H)
var/rads = H.radiation/25
H.radiation -= rads
H.nutrition += rads
H.adjustBruteLoss(-(rads))
H.adjustOxyLoss(-(rads))
H.adjustToxLoss(-(rads))
var/mob/living/simple_animal/diona/S = new(get_turf(H))
var/light_amount = 0 //how much light there is in the place, affects receiving nutrition and healing
if(isturf(H.loc)) //else, there's considered to be no light
var/turf/T = H.loc
light_amount = min(T.get_lumcount()*10, 5) //hardcapped so it's not abused by having a ton of flashlights
H.nutrition += light_amount
H.traumatic_shock -= light_amount
if(H.mind)
H.mind.transfer_to(S)
else
S.key = H.key
if(H.nutrition > 450)
H.nutrition = 450
for(var/mob/living/simple_animal/diona/D in H.contents)
if(D.client)
D.loc = H.loc
else
qdel(D)
if((light_amount >= 5) && !H.suiciding) //if there's enough light, heal
H.adjustBruteLoss(-(light_amount/2))
H.adjustFireLoss(-(light_amount/4))
H.adjustOxyLoss(-(light_amount))
H.visible_message("<span class='danger">[H] splits apart with a wet slithering noise!"</span>) */
if(H.nutrition < 200)
H.take_overall_damage(10,0)
H.traumatic_shock++
/datum/species/machine
name = "Machine"
@@ -157,6 +157,7 @@
origin_tech = "biotech=3"
parent_organ = "chest"
slot = "heart"
vital = 1
/obj/item/organ/internal/brain/diona
name = "gas bladder"