mirror of
https://github.com/PolarisSS13/Polaris.git
synced 2025-12-24 00:51:46 +00:00
Merge pull request #11191 from PsiOmegaDelta/150925-RadioActivity
Makes more sources of radiation respect rad-protection.
This commit is contained in:
@@ -41,7 +41,7 @@
|
||||
|
||||
|
||||
|
||||
/mob/living/proc/apply_effect(var/effect = 0,var/effecttype = STUN, var/blocked = 0)
|
||||
/mob/living/proc/apply_effect(var/effect = 0,var/effecttype = STUN, var/blocked = 0, var/check_protection = 1)
|
||||
if(!effect || (blocked >= 2)) return 0
|
||||
switch(effecttype)
|
||||
if(STUN)
|
||||
@@ -53,7 +53,7 @@
|
||||
if(AGONY)
|
||||
halloss += effect // Useful for objects that cause "subdual" damage. PAIN!
|
||||
if(IRRADIATE)
|
||||
var/rad_protection = getarmor(null, "rad")/100
|
||||
var/rad_protection = check_protection ? getarmor(null, "rad")/100 : 0
|
||||
radiation += max((1-rad_protection)*effect/(blocked+1),0)//Rads auto check armor
|
||||
if(STUTTER)
|
||||
if(status_flags & CANSTUN) // stun is usually associated with stutter
|
||||
|
||||
@@ -253,7 +253,7 @@
|
||||
if(prob(5))
|
||||
M.antibodies |= V.antigen
|
||||
if(prob(50))
|
||||
M.radiation += 50 // curing it that way may kill you instead
|
||||
M.apply_effect(50, IRRADIATE, check_protection = 0) // curing it that way may kill you instead
|
||||
var/absorbed = 0
|
||||
var/obj/item/organ/diona/nutrients/rad_organ = locate() in M.internal_organs
|
||||
if(rad_organ && !rad_organ.is_broken())
|
||||
|
||||
@@ -1166,7 +1166,7 @@
|
||||
|
||||
/datum/reagent/ethanol/vodka/affect_ingest(var/mob/living/carbon/M, var/alien, var/removed)
|
||||
..()
|
||||
M.radiation = max(M.radiation - 1 * removed, 0)
|
||||
M.apply_effect(max(M.radiation - 1 * removed, 0), IRRADIATE, check_protection = 0)
|
||||
|
||||
/datum/reagent/ethanol/whiskey
|
||||
name = "Whiskey"
|
||||
|
||||
@@ -344,7 +344,7 @@
|
||||
scannable = 1
|
||||
|
||||
/datum/reagent/hyronalin/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
|
||||
M.radiation = max(M.radiation - 30 * removed, 0)
|
||||
M.apply_effect(max(M.radiation - 30 * removed, 0), IRRADIATE, check_protection = 0)
|
||||
|
||||
/datum/reagent/arithrazine
|
||||
name = "Arithrazine"
|
||||
@@ -357,7 +357,7 @@
|
||||
scannable = 1
|
||||
|
||||
/datum/reagent/arithrazine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
|
||||
M.radiation = max(M.radiation - 70 * removed, 0)
|
||||
M.apply_effect(max(M.radiation - 70 * removed, 0), IRRADIATE, check_protection = 0)
|
||||
M.adjustToxLoss(-10 * removed)
|
||||
if(prob(60))
|
||||
M.take_organ_damage(4 * removed, 0)
|
||||
|
||||
@@ -8,13 +8,13 @@
|
||||
var/weakness = GetAnomalySusceptibility(toucher)
|
||||
if(iscarbon(toucher) && prob(weakness * 100))
|
||||
var/mob/living/carbon/C = toucher
|
||||
C << "\red A painful discharge of energy strikes you!"
|
||||
C << "<span class='danger'>A painful discharge of energy strikes you!</span>"
|
||||
C.adjustOxyLoss(rand(5,25) * weakness)
|
||||
C.adjustToxLoss(rand(5,25) * weakness)
|
||||
C.adjustBruteLoss(rand(5,25) * weakness)
|
||||
C.adjustFireLoss(rand(5,25) * weakness)
|
||||
C.adjustBrainLoss(rand(5,25) * weakness)
|
||||
C.radiation += 25 * weakness
|
||||
C.apply_effect(25 * weakness, IRRADIATE)
|
||||
C.nutrition -= min(50 * weakness, C.nutrition)
|
||||
C.make_dizzy(6 * weakness)
|
||||
C.weakened += 6 * weakness
|
||||
@@ -26,7 +26,7 @@
|
||||
var/weakness = GetAnomalySusceptibility(C)
|
||||
if(prob(weakness * 100))
|
||||
if(prob(10))
|
||||
C << "\red You feel a painful force radiating from something nearby."
|
||||
C << "<span class='danger'>You feel a painful force radiating from something nearby.</span>"
|
||||
C.adjustBruteLoss(1 * weakness)
|
||||
C.adjustFireLoss(1 * weakness)
|
||||
C.adjustToxLoss(1 * weakness)
|
||||
@@ -40,7 +40,7 @@
|
||||
for (var/mob/living/carbon/C in range(effectrange, T))
|
||||
var/weakness = GetAnomalySusceptibility(C)
|
||||
if(prob(weakness * 100))
|
||||
C << "\red A wave of painful energy strikes you!"
|
||||
C << "<span class='danger'>A wave of painful energy strikes you!</span>"
|
||||
C.adjustBruteLoss(3 * weakness)
|
||||
C.adjustFireLoss(3 * weakness)
|
||||
C.adjustToxLoss(3 * weakness)
|
||||
|
||||
@@ -98,7 +98,7 @@
|
||||
maxm = 3
|
||||
badness = 2
|
||||
activate(var/mob/living/carbon/mob,var/multiplier)
|
||||
mob.radiation += (2*multiplier)
|
||||
mob.apply_effect(2*multiplier, IRRADIATE, check_protection = 0)
|
||||
|
||||
/datum/disease2/effect/deaf
|
||||
name = "Dead Ear Syndrome"
|
||||
|
||||
Reference in New Issue
Block a user