mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-25 04:57:47 +01:00
Light-Based Damage Component For Zaddat and Shadows (#17714)
* implimentation * some small improvements, photodegeneration trait
This commit is contained in:
@@ -232,8 +232,11 @@
|
||||
|
||||
return in_stasis
|
||||
|
||||
//This determines if, RIGHT NOW, the life() tick is being skipped due to stasis
|
||||
/mob/living/carbon/human/proc/inStasisNow()
|
||||
/// This determines if, RIGHT NOW, the life() tick is being skipped due to stasis
|
||||
/mob/proc/inStasisNow() // For components to be more easily compatible with both simple and human mobs, only humans can stasis.
|
||||
return FALSE
|
||||
|
||||
/mob/living/carbon/human/inStasisNow()
|
||||
var/stasisValue = getStasis()
|
||||
if(stasisValue && (life_tick % stasisValue))
|
||||
return 1
|
||||
|
||||
@@ -1157,15 +1157,6 @@
|
||||
if(status_flags & GODMODE)
|
||||
return 0 //godmode
|
||||
|
||||
if(species.light_dam)
|
||||
var/light_amount = 0
|
||||
if(isturf(loc))
|
||||
var/turf/T = loc
|
||||
light_amount = T.get_lumcount() * 10
|
||||
if(light_amount > species.light_dam) //if there's enough light, start dying
|
||||
take_overall_damage(1,1)
|
||||
else //heal in the dark
|
||||
heal_overall_damage(1,1)
|
||||
// nutrition decrease
|
||||
if(noisy == TRUE && nutrition < 250 && prob(10))
|
||||
var/sound/growlsound = sound(get_sfx("hunger_sounds"))
|
||||
|
||||
@@ -7,7 +7,6 @@
|
||||
|
||||
language = "Sol Common" //todo?
|
||||
unarmed_types = list(/datum/unarmed_attack/claws/strong, /datum/unarmed_attack/bite/sharp)
|
||||
light_dam = 2
|
||||
darksight = 8
|
||||
has_organ = list()
|
||||
siemens_coefficient = 0
|
||||
@@ -27,6 +26,8 @@
|
||||
|
||||
assisted_langs = list()
|
||||
|
||||
species_component = /datum/component/burninlight/shadow // Until a parent component like xenochimera have is needed, only handles burning in light.
|
||||
|
||||
/datum/species/shadow/handle_death(var/mob/living/carbon/human/H)
|
||||
spawn(1)
|
||||
new /obj/effect/decal/cleanable/ash(H.loc)
|
||||
|
||||
@@ -202,7 +202,6 @@
|
||||
var/warning_low_pressure = WARNING_LOW_PRESSURE // Low pressure warning.
|
||||
var/hazard_low_pressure = HAZARD_LOW_PRESSURE // Dangerously low pressure.
|
||||
var/safe_pressure = ONE_ATMOSPHERE
|
||||
var/light_dam // If set, mob will be damaged in light over this value and heal in light below its negative.
|
||||
var/minimum_breath_pressure = 16 // Minimum required pressure for breath, in kPa
|
||||
|
||||
|
||||
|
||||
@@ -489,6 +489,8 @@
|
||||
|
||||
reagent_tag = IS_ZADDAT
|
||||
|
||||
species_component = /datum/component/burninlight // Until a parent component like xenochimera have is needed, only handles burning in light.
|
||||
|
||||
heat_discomfort_strings = list(
|
||||
"Your joints itch.",
|
||||
"You feel uncomfortably warm.",
|
||||
@@ -531,24 +533,6 @@
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/mask/gas/zaddat/(H), slot_wear_mask) // mask has to come first or Shroud helmet will get in the way
|
||||
H.equip_to_slot_or_del(new /obj/item/clothing/suit/space/void/zaddat/(H), slot_wear_suit)
|
||||
|
||||
/datum/species/zaddat/handle_environment_special(var/mob/living/carbon/human/H)
|
||||
|
||||
if(H.inStasisNow())
|
||||
return
|
||||
|
||||
var/damageable = H.get_damageable_organs()
|
||||
var/covered = H.get_coverage()
|
||||
|
||||
var/light_amount = 0 //how much light there is in the place, affects damage
|
||||
if(isturf(H.loc)) //else, there's considered to be no light
|
||||
var/turf/T = H.loc
|
||||
light_amount = T.get_lumcount() * 5
|
||||
|
||||
|
||||
for(var/K in damageable)
|
||||
if(!(K in covered))
|
||||
H.apply_damage(light_amount/4, BURN, K, 0, 0)
|
||||
|
||||
/datum/species/diona
|
||||
|
||||
name = SPECIES_DIONA
|
||||
|
||||
@@ -760,6 +760,14 @@
|
||||
category = 0
|
||||
custom_only = FALSE
|
||||
|
||||
/datum/trait/negative/photodegeneration
|
||||
name = "Photodegeneration"
|
||||
desc = "Without the protection of darkness or a suit your body quickly begins to break down when exposed to light."
|
||||
cost = -4
|
||||
is_genetrait = TRUE // There is no upside, a neat landmine for genetics
|
||||
hidden = TRUE //Disabled on Virgo
|
||||
can_take = ORGANICS
|
||||
added_component_path = /datum/component/burninlight // Literally just Zaddat, but you don't start with any suit. Good luck.
|
||||
|
||||
// Addictions
|
||||
/datum/trait/neutral/addiction_alcohol
|
||||
|
||||
Reference in New Issue
Block a user