mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 11:43:31 +00:00
Merge pull request #11191 from PsiOmegaDelta/150925-RadioActivity
Makes more sources of radiation respect rad-protection.
This commit is contained in:
@@ -468,7 +468,7 @@
|
||||
else
|
||||
randmuti(src.connected.occupant)
|
||||
|
||||
src.connected.occupant.radiation += ((src.radiation_intensity*3)+src.radiation_duration*3)
|
||||
src.connected.occupant.apply_effect(((src.radiation_intensity*3)+src.radiation_duration*3), IRRADIATE, check_protection = 0)
|
||||
src.connected.locked = lock_state
|
||||
return 1 // return 1 forces an update to all Nano uis attached to src
|
||||
|
||||
@@ -562,7 +562,7 @@
|
||||
block = miniscrambletarget(num2text(selected_ui_target), src.radiation_intensity, src.radiation_duration)
|
||||
src.connected.occupant.dna.SetUISubBlock(src.selected_ui_block,src.selected_ui_subblock,block)
|
||||
src.connected.occupant.UpdateAppearance()
|
||||
src.connected.occupant.radiation += (src.radiation_intensity+src.radiation_duration)
|
||||
src.connected.occupant.apply_effect((src.radiation_intensity+src.radiation_duration), IRRADIATE, check_protection = 0)
|
||||
else
|
||||
if (prob(20+src.radiation_intensity))
|
||||
randmutb(src.connected.occupant)
|
||||
@@ -570,7 +570,7 @@
|
||||
else
|
||||
randmuti(src.connected.occupant)
|
||||
src.connected.occupant.UpdateAppearance()
|
||||
src.connected.occupant.radiation += ((src.radiation_intensity*2)+src.radiation_duration)
|
||||
src.connected.occupant.apply_effect(((src.radiation_intensity*2)+src.radiation_duration), IRRADIATE, check_protection = 0)
|
||||
src.connected.locked = lock_state
|
||||
return 1 // return 1 forces an update to all Nano uis attached to src
|
||||
|
||||
@@ -627,10 +627,10 @@
|
||||
|
||||
//testing("Irradiated SE block [real_SE_block]:[src.selected_se_subblock] ([original_block] now [block]) [(real_SE_block!=selected_se_block) ? "(SHIFTED)":""]!")
|
||||
connected.occupant.dna.SetSESubBlock(real_SE_block,selected_se_subblock,block)
|
||||
src.connected.occupant.radiation += (src.radiation_intensity+src.radiation_duration)
|
||||
src.connected.occupant.apply_effect((src.radiation_intensity+src.radiation_duration), IRRADIATE, check_protection = 0)
|
||||
domutcheck(src.connected.occupant,src.connected)
|
||||
else
|
||||
src.connected.occupant.radiation += ((src.radiation_intensity*2)+src.radiation_duration)
|
||||
src.connected.occupant.apply_effect(((src.radiation_intensity*2)+src.radiation_duration), IRRADIATE, check_protection = 0)
|
||||
if (prob(80-src.radiation_duration))
|
||||
//testing("Random bad mut!")
|
||||
randmutb(src.connected.occupant)
|
||||
@@ -752,7 +752,7 @@
|
||||
src.connected.occupant.dna.SE = buf.dna.SE
|
||||
src.connected.occupant.dna.UpdateSE()
|
||||
domutcheck(src.connected.occupant,src.connected)
|
||||
src.connected.occupant.radiation += rand(20,50)
|
||||
src.connected.occupant.apply_effect(rand(20,50), IRRADIATE, check_protection = 0)
|
||||
return 1
|
||||
|
||||
if (bufferOption == "createInjector")
|
||||
|
||||
@@ -330,7 +330,7 @@
|
||||
for(i=0,i<4,i++)
|
||||
sleep(50)
|
||||
if(src.OCCUPANT)
|
||||
OCCUPANT.radiation += 50
|
||||
OCCUPANT.apply_effect(50, IRRADIATE)
|
||||
var/obj/item/organ/diona/nutrients/rad_organ = locate() in OCCUPANT.internal_organs
|
||||
if (!rad_organ)
|
||||
if(src.issuperUV)
|
||||
@@ -925,7 +925,7 @@
|
||||
occupant.take_organ_damage(0,radiation_level*2 + rand(1,3))
|
||||
if(radiation_level > 1)
|
||||
occupant.take_organ_damage(0,radiation_level + rand(1,3))
|
||||
occupant.radiation += radiation_level*10
|
||||
occupant.apply_effect(radiation_level*10, IRRADIATE)
|
||||
|
||||
/obj/machinery/suit_cycler/proc/finished_job()
|
||||
var/turf/T = get_turf(src)
|
||||
|
||||
@@ -126,8 +126,8 @@
|
||||
/obj/item/mecha_parts/mecha_equipment/tool/drill/diamonddrill
|
||||
name = "diamond drill"
|
||||
desc = "This is an upgraded version of the drill that'll pierce the heavens! (Can be attached to: Combat and Engineering Exosuits)"
|
||||
icon_state = "mecha_diamond_drill"
|
||||
origin_tech = list(TECH_MATERIAL = 4, TECH_ENGINEERING = 3)
|
||||
icon_state = "mecha_diamond_drill"
|
||||
origin_tech = list(TECH_MATERIAL = 4, TECH_ENGINEERING = 3)
|
||||
equip_cooldown = 20
|
||||
force = 15
|
||||
|
||||
@@ -964,8 +964,8 @@
|
||||
/obj/item/mecha_parts/mecha_equipment/generator/nuclear
|
||||
name = "\improper ExoNuclear reactor"
|
||||
desc = "Generates power using uranium. Pollutes the environment."
|
||||
icon_state = "tesla"
|
||||
origin_tech = list(TECH_POWER = 3, TECH_ENGINEERING = 3)
|
||||
icon_state = "tesla"
|
||||
origin_tech = list(TECH_POWER = 3, TECH_ENGINEERING = 3)
|
||||
max_fuel = 50000
|
||||
fuel_per_cycle_idle = 10
|
||||
fuel_per_cycle_active = 30
|
||||
@@ -990,7 +990,7 @@
|
||||
if(istype(M,/mob/living/carbon/human))
|
||||
M.apply_effect((EG.rad_per_cycle*3),IRRADIATE,0)
|
||||
else
|
||||
M.radiation += EG.rad_per_cycle
|
||||
M.apply_effect(EG.rad_per_cycle, IRRADIATE)
|
||||
return 1
|
||||
|
||||
|
||||
|
||||
@@ -65,7 +65,8 @@
|
||||
|
||||
/obj/item/weapon/dnainjector/proc/inject(mob/M as mob, mob/user as mob)
|
||||
if(istype(M,/mob/living))
|
||||
M.radiation += rand(5,20)
|
||||
var/mob/living/L = M
|
||||
L.apply_effect(rand(5,20), IRRADIATE, check_protection = 0)
|
||||
|
||||
if (!(NOCLONE in M.mutations)) // prevents drained people from having their DNA changed
|
||||
if (buf.types & DNA2_BUF_UI)
|
||||
|
||||
@@ -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