diff --git a/code/__DEFINES/devices.dm b/code/__DEFINES/devices.dm
index 7086e9f649bcf..5aa3279722f11 100644
--- a/code/__DEFINES/devices.dm
+++ b/code/__DEFINES/devices.dm
@@ -1,6 +1,5 @@
// Role disk defines
-#define DISK_POWER (1<<0)
#define DISK_ATMOS (1<<1)
#define DISK_MED (1<<2)
#define DISK_CHEM (1<<3)
diff --git a/code/datums/mutations/radioactive.dm b/code/datums/mutations/radioactive.dm
index 2ede583cb1467..0df32130d25c5 100644
--- a/code/datums/mutations/radioactive.dm
+++ b/code/datums/mutations/radioactive.dm
@@ -6,13 +6,23 @@
difficulty = 8
power_coeff = 1
+ COOLDOWN_DECLARE(last_radioactive_pulse)
+
/datum/mutation/radioactive/New(class_ = MUT_OTHER, timer, datum/mutation/copymut)
..()
if(!(type in visual_indicators))
visual_indicators[type] = list(mutable_appearance('icons/effects/genetics.dmi', "radiation"))
/datum/mutation/radioactive/on_life()
- radiation_pulse(owner, 20 * GET_MUTATION_POWER(src))
+ if (!COOLDOWN_FINISHED(src, last_radioactive_pulse))
+ return
+
+ COOLDOWN_START(src, last_radioactive_pulse, 5 SECONDS)
+ radiation_pulse(
+ owner,
+ max_range = 1 * (GET_MUTATION_POWER(src) * 2),
+ threshold = RAD_MEDIUM_INSULATION,
+ )
/datum/mutation/radioactive/get_visual_indicator()
return visual_indicators[type][1]
diff --git a/code/datums/radiation_wave.dm b/code/datums/radiation_wave.dm
deleted file mode 100644
index df670cbe73b87..0000000000000
--- a/code/datums/radiation_wave.dm
+++ /dev/null
@@ -1,289 +0,0 @@
-#define PRC_FLAG_HL (1<<0) // Send half of current strength to the upper "left"
-#define PRC_FLAG_L (1<<1) // Send the whole current strength to the upper "left": direct succession
-#define PRC_FLAG_HR (1<<2) // Send half of current strength to the upper "right"
-#define PRC_FLAG_R (1<<3) // Send the whole current strength to the upper "right": direct succession
-
-/**
- * Crash Course: Understanding PRC_BEHAVIOR
- * We move forward, and in square-by-square manner, so we need a list 8 entries larger than the current one, and future squares are determined from the current square.
- * We move clockwise: "left" means intensity_new[i + j], "right" means intensity_new[i + j + 1]. `j` here is offset.
- * Most squares are on branch: It moves "left"(L) or "right"(R).
- * But, sometimes, a branch can't decide which way to go; then it splits(D) and merges(HL, HR).
- * Then there are squares not on branch; those don't go anywhere else(N).
- * But branchless squares still need to act radiation; does branchless square's does one time transient succession from both of immediate predecessors
- * ... in contrast to "on-branch" squares where there are only one meaningful predecessor.
- * Since we are calculating future squares, we need to see if there are any branchless squares needing our attention: (*STAR)
- * And, of course, branchless squares might have to draw from another preceding branchless squares. (NWL, NWR)
- */
-
-#define PRC_BEHAVIOR_N (1<<4) // Not on branch, and both upper squares are on branch
- // So we don't calculate prc_behavior every time (setting to 0 would do that)
-#define PRC_BEHAVIOR_NWL PRC_FLAG_HL // Not on branch, but will send half of its strength to the "left" since it also is not on branch
-#define PRC_BEHAVIOR_NWR PRC_FLAG_HR // Not on branch, but will send half of its strength to the "left" since it also is not on branch
-#define PRC_BEHAVIOR_L PRC_FLAG_L // On branch, going "left"
-#define PRC_BEHAVIOR_LSTAR (PRC_FLAG_L|PRC_FLAG_HR) // On branch, going "left", but there's branchless square on the "right"
-#define PRC_BEHAVIOR_R PRC_FLAG_R // On branch, going "right"
-#define PRC_BEHAVIOR_RSTAR (PRC_FLAG_R|PRC_FLAG_HL) // On branch, going "left", but there's branchless square on the "left"
-#define PRC_BEHAVIOR_D (PRC_FLAG_L|PRC_FLAG_R) // On branch, double successor.
-#define PRC_BEHAVIOR_HL PRC_FLAG_HL // From one of the double successor; single successor on the "left"
-#define PRC_BEHAVIOR_HLSTAR (PRC_FLAG_HL|PRC_FLAG_HR) // From one of the double successor; single successor on the "left", but there's branchless square on the "right"
-#define PRC_BEHAVIOR_HR PRC_FLAG_HR // From one of the double successor; single successor on the "right"
-#define PRC_BEHAVIOR_HRSTAR (PRC_FLAG_HR|PRC_FLAG_HL) // From one of the double successor; single successor on the "right", but there's branchless square on the "left"
-
-/datum/radiation_wave
- var/source
- var/turf/master_turf //The center of the wave
- var/steps = 0 //How far we've moved
- var/intensity[8] //How strong it is, except the distance falloff
- var/range_modifier //Higher than 1 makes it drop off faster, 0.5 makes it drop off half etc
- var/can_contaminate
- var/static/list/prc_behavior_cache
-
-/datum/radiation_wave/New(atom/_source, _intensity=0, _range_modifier=RAD_DISTANCE_COEFFICIENT, _can_contaminate=TRUE)
-
- source = "[_source] \[[REF(_source)]\]"
-
- master_turf = get_turf(_source)
-
- // Yes, it causes (8 / range_modifier ** 2) times the strength you gave to the radiation_pulse().
- for(var/i in 1 to 8)
- intensity[i] = _intensity
- range_modifier = _range_modifier
- can_contaminate = _can_contaminate
-
- START_PROCESSING(SSradiation, src)
-
-/datum/radiation_wave/Destroy()
- . = QDEL_HINT_IWILLGC
- intensity = null
- STOP_PROCESSING(SSradiation, src)
- ..()
-
-/datum/radiation_wave/process(delta_time)
- // If master_turf is no more, then we can't know where to irradiate. This is a very bad situation.
- if(!master_turf)
- qdel(src)
- return
- // If none of the turfs could be irradiated, then the wave should no longer exist
- var/futile = TRUE
- // Cache of unlucky atoms
- var/list/atoms = list()
- // The actual distance
- var/distance = steps + 1
- // Represents decreasing radiation power over distance
- var/falloff = 1 / (distance * range_modifier) ** 2
- // Caching
- var/turf/cmaster_turf = master_turf
- // Original intensity it is using
- var/list/cintensity = intensity
- // New intensity that'll be written; always larger than the previous one
- var/list/intensity_new[(distance + 1) * 8]
- // "Class" it belongs to
- var/branchclass = 2 ** round(log(2, distance))
- // The secondary i, or the offset for i
- var/j
-
- for(var/i in 1 to distance * 8)
- //Culls invalid intensities
- if(cintensity[i] * falloff < RAD_WAVE_MINIMUM)
- continue
- var/xpos
- var/ypos
- switch(i / distance)
- if(0 to 2)
- //Yes it starts one step off of what you'd expect. Blame BYOND.
- xpos = cmaster_turf.x + distance
- ypos = cmaster_turf.y + distance - i
- if(2 to 4)
- xpos = cmaster_turf.x + distance * 3 - i
- ypos = cmaster_turf.y - distance
- if(4 to 6)
- xpos = cmaster_turf.x - distance
- ypos = cmaster_turf.y - distance * 5 + i
- if(6 to 8)
- xpos = cmaster_turf.x - distance * 7 + i
- ypos = cmaster_turf.y + distance
- //Culls invalid coords
- if(xpos < 1 || xpos > world.maxx || ypos < 1 || ypos > world.maxy)
- continue
-
- //The radiation is considered alive
- futile = FALSE
- var/turf/place = locate(xpos, ypos, cmaster_turf.z)
- atoms = get_rad_contents(place)
-
- //Actual radiation spending
- cintensity[i] *= radiate(atoms, cintensity[i] * falloff)
-
- //Obstruction handling
- check_obstructions(atoms, i)
-
- /*
- * This is what I call pseudo-raycasting (PRC). Real raycasting would be ridiculously expensive,
- * So this is the solution I came up with. Don't try to understand it by seeing the code.
- * You have been warned. If you find yourself really having to touch this cursed code,
- * consider axing this away before contacting me via git-fu email digging.
- *
- * Therefore, I urge you not to hastily assume this code a culprit of your problem.
- * This code is responsible just for *keeping the rads going forward* more reasonably
- * in regard to obstruction and contamination cost. But, of course, if you are rewriting
- * (notwithstanding how questionable rewriting something major of a mature codebase like
- * every normal SS13 codebase is) the entire radiation code, then this code should be
- * considered for deletion.
- *
- * On a side note, this implementation isn't very ideal. So please remove this instead of
- * trying to improve it when its time has come. (i.e. another total overhaul)
- *
- * ~Xenomedes, Christmas 2020
- */
-
- // Handling eight fundamental (read: perfectly straight) branches
- if((j = i / distance) == (j = round(j)))
- distance + 1 == branchclass * 2 \
- ? (i == distance * 8 \
- ? (intensity_new[j - 1] += (intensity_new[1] += ((intensity_new[(j += i)] = cintensity[i]) / 2)) && cintensity[i] / 2) \
- : (intensity_new[j - 1] += intensity_new[j + 1] = ((intensity_new[(j += i)] = cintensity[i]) / 2))) \
- : (intensity_new[i + j] = cintensity[i])
- continue
-
- var/list/cachecache
-
- if(!prc_behavior_cache)
- prc_behavior_cache = list()
- if(length(prc_behavior_cache) < distance)
- prc_behavior_cache.len++
- // We don't reserve spaces for fundamental branches
- var/L[distance - 1]
- // distance == 1 is where every ray is fundamental branch
- cachecache = prc_behavior_cache[distance - 1] = L
- else
- cachecache = prc_behavior_cache[distance - 1]
-
- // i % distance == 0 cases were already handled above
- var/prc_behavior = cachecache[i % distance]
-
- if(!prc_behavior)
- // Necessary local variables
- var/idx // index
- var/lp // loop position
- var/vl // velocity of loop
- var/bt // branch threshold
-
- // The actual behavior calculation
- cachecache[i % distance] = prc_behavior = distance & 1 \
- ? ((lp = ((idx = i % distance) * (vl = distance - branchclass + 1)) % (distance + 1)) < (bt = branchclass - (idx - round(idx * vl / (distance + 1)))) \
- ? (lp \
- ? (lp + vl >= bt ? PRC_BEHAVIOR_LSTAR : PRC_BEHAVIOR_L) \
- : (vl >= bt ? PRC_BEHAVIOR_HLSTAR : PRC_BEHAVIOR_HL)) \
- : (lp > branchclass \
- ? (lp - vl <= bt ? PRC_BEHAVIOR_NWL : (lp - bt > branchclass ? PRC_BEHAVIOR_NWR : PRC_BEHAVIOR_N)) \
- : (lp == branchclass \
- ? (lp - vl <= bt ? PRC_BEHAVIOR_HRSTAR : PRC_BEHAVIOR_HR) \
- : (lp - vl <= bt ? PRC_BEHAVIOR_RSTAR : PRC_BEHAVIOR_R)))) \
- : ((lp = ((idx = i % distance) * (vl = distance - branchclass + 1)) % (distance + 1)) == (bt = branchclass - (idx - round(idx * vl / (distance + 1)))) \
- ? PRC_BEHAVIOR_D \
- : (lp > branchclass \
- ? (lp - vl <= bt ? PRC_BEHAVIOR_NWL : (lp - bt > branchclass ? PRC_BEHAVIOR_NWR : PRC_BEHAVIOR_N)) \
- : (lp < bt \
- ? (lp + vl >= bt ? PRC_BEHAVIOR_LSTAR : PRC_BEHAVIOR_L) \
- : (lp - vl <= bt ? PRC_BEHAVIOR_RSTAR : PRC_BEHAVIOR_R))))
-
- prc_behavior & PRC_FLAG_HL \
- ? (intensity_new[i + j] += cintensity[i] / 2) \
- : (prc_behavior & PRC_FLAG_L \
- ? (intensity_new[i + j] = cintensity[i]) \
- : null)
-
- prc_behavior & PRC_FLAG_HR \
- ? (intensity_new[i + j + 1] += cintensity[i] / 2) \
- : (prc_behavior & PRC_FLAG_R \
- ? (intensity_new[i + j + 1] = cintensity[i]) \
- : null)
-
- if(futile)
- qdel(src)
- return
-
- // Now is time to move forward
- intensity = intensity_new
- steps += delta_time
-
-/datum/radiation_wave/proc/check_obstructions(list/atoms, index)
- for(var/k in 1 to atoms.len)
- var/atom/thing = atoms[k]
- if(!thing)
- continue
- if (SEND_SIGNAL(thing, COMSIG_ATOM_RAD_WAVE_PASSING, src, index) & COMPONENT_RAD_WAVE_HANDLED)
- continue
- if (thing.rad_insulation != RAD_NO_INSULATION)
- intensity[index] *= thing.rad_insulation
-
-// Returns post-radiation strength power scale of a ray
-// If this proc returns a number lower than 1, it means that the some radiation was spent on contaminating something.
-/datum/radiation_wave/proc/radiate(list/atoms, strength)
- // returning 1 means no radiation was spent on contamination
- . = 1
- var/list/moblist = list()
- var/list/atomlist = list()
- var/contam_strength = strength * (RAD_CONTAMINATION_STR_COEFFICIENT * RAD_CONTAMINATION_BUDGET_SIZE) // The budget for each list
- var/is_contaminating = contam_strength > RAD_COMPONENT_MINIMUM && can_contaminate
- for(var/k in 1 to atoms.len)
- var/atom/thing = atoms[k]
- if(!thing)
- continue
- thing.rad_act(strength)
-
- // This list should only be for types which don't get contaminated but you want to look in their contents
- // If you don't want to look in their contents and you don't want to rad_act them:
- // modify the ignored_things list in __HELPERS/radiation.dm instead
- var/static/list/blacklisted = typecacheof(list(
- /turf,
- /obj/structure/cable,
- /obj/machinery/atmospherics,
- /obj/item/ammo_casing,
- /obj/item/implant,
- /obj/anomaly,
- /obj/eldritch/narsie
- ))
- // Insulating objects won't get contaminated
- if(!is_contaminating || blacklisted[thing.type] || SEND_SIGNAL(thing, COMSIG_ATOM_RAD_CONTAMINATING, strength) & COMPONENT_BLOCK_CONTAMINATION)
- continue
- if(ismob(thing))
- moblist += thing
- else
- atomlist += thing
-
- // We don't randomly choose one from the list since that can result in zero meaningful contamination
-
- if(atomlist.len)
- . -= RAD_CONTAMINATION_BUDGET_SIZE
- var/affordance = min(round(contam_strength / RAD_COMPONENT_MINIMUM), atomlist.len)
- var/contam_strength_divided = contam_strength / affordance
- for(var/k in 1 to affordance)
- var/atom/poor_thing = atomlist[k]
- poor_thing.AddComponent(/datum/component/radioactive, contam_strength_divided, source)
-
- if(moblist.len)
- . -= RAD_CONTAMINATION_BUDGET_SIZE
- var/affordance = min(round(contam_strength / RAD_COMPONENT_MINIMUM), moblist.len)
- var/contam_strength_divided = contam_strength / affordance
- for(var/k in 1 to affordance)
- var/mob/poor_mob = moblist[k]
- poor_mob.AddComponent(/datum/component/radioactive, contam_strength_divided, source)
-
-#undef PRC_FLAG_HL
-#undef PRC_FLAG_L
-#undef PRC_FLAG_HR
-#undef PRC_FLAG_R
-#undef PRC_BEHAVIOR_N
-#undef PRC_BEHAVIOR_NWL
-#undef PRC_BEHAVIOR_NWR
-#undef PRC_BEHAVIOR_L
-#undef PRC_BEHAVIOR_LSTAR
-#undef PRC_BEHAVIOR_R
-#undef PRC_BEHAVIOR_RSTAR
-#undef PRC_BEHAVIOR_D
-#undef PRC_BEHAVIOR_HL
-#undef PRC_BEHAVIOR_HLSTAR
-#undef PRC_BEHAVIOR_HR
-#undef PRC_BEHAVIOR_HRSTAR
diff --git a/code/datums/weather/weather_types/radiation_storm.dm b/code/datums/weather/weather_types/radiation_storm.dm
index 8c714e6eda9f0..f4870c0c5126d 100644
--- a/code/datums/weather/weather_types/radiation_storm.dm
+++ b/code/datums/weather/weather_types/radiation_storm.dm
@@ -30,20 +30,28 @@
/datum/weather/rad_storm/weather_act(mob/living/L)
- var/resist = L.getarmor(null, RAD)
- if(prob(40))
- if(ishuman(L))
- var/mob/living/carbon/human/H = L
- if(H.dna && !HAS_TRAIT(H, TRAIT_RADIMMUNE))
- if(prob(max(0,100-resist)))
- H.randmuti()
- if(prob(50))
- if(prob(90))
- H.easy_randmut(NEGATIVE+MINOR_NEGATIVE)
- else
- H.easy_randmut(POSITIVE)
- H.domutcheck()
- L.rad_act(20)
+ if(!prob(40))
+ return
+
+ if(!ishuman(L))
+ return
+
+ var/mob/living/carbon/human/H = L
+ if(!H.dna || HAS_TRAIT(H, TRAIT_GENELESS))
+ return
+
+ if (SSradiation.wearing_rad_protected_clothing(H))
+ return
+
+ H.random_mutate_unique_identity()
+ H.random_mutate_unique_features()
+
+ if(prob(50))
+ if(prob(90))
+ H.easy_random_mutate(NEGATIVE+MINOR_NEGATIVE)
+ else
+ H.easy_random_mutate(POSITIVE)
+ H.domutcheck()
/datum/weather/rad_storm/end()
if(..())
diff --git a/code/game/atoms.dm b/code/game/atoms.dm
index 0deec87f6c61d..dd0550ee7aaf6 100644
--- a/code/game/atoms.dm
+++ b/code/game/atoms.dm
@@ -944,14 +944,6 @@
if(!SEND_SIGNAL(src, COMSIG_ATOM_SHOULD_EMAG, user))
SEND_SIGNAL(src, COMSIG_ATOM_ON_EMAG, user, hacker)
-/**
- * Respond to a radioactive wave hitting this atom
- *
- * Default behaviour is to send COMSIG_ATOM_RAD_ACT and return
- */
-/atom/proc/rad_act(strength)
- SEND_SIGNAL(src, COMSIG_ATOM_RAD_ACT, strength)
-
/**
* Respond to narsie eating our atom
*
@@ -1247,7 +1239,6 @@
VV_DROPDOWN_OPTION(VV_HK_ADD_REAGENT, "Add Reagent")
VV_DROPDOWN_OPTION(VV_HK_TRIGGER_EMP, "EMP Pulse")
VV_DROPDOWN_OPTION(VV_HK_TRIGGER_EXPLOSION, "Explosion")
- VV_DROPDOWN_OPTION(VV_HK_RADIATE, "Radiate")
VV_DROPDOWN_OPTION(VV_HK_EDIT_FILTERS, "Edit Filters")
VV_DROPDOWN_OPTION(VV_HK_EDIT_COLOR_MATRIX, "Edit Color as Matrix")
VV_DROPDOWN_OPTION(VV_HK_ADD_AI, "Add AI controller")
@@ -1300,11 +1291,6 @@
if(href_list[VV_HK_TRIGGER_EMP] && check_rights(R_FUN))
usr.client.cmd_admin_emp(src)
- if(href_list[VV_HK_RADIATE] && check_rights(R_FUN))
- var/strength = input(usr, "Choose the radiation strength.", "Choose the strength.") as num|null
- if(!isnull(strength))
- AddComponent(/datum/component/radioactive, strength, src)
-
if(href_list[VV_HK_MODIFY_TRANSFORM] && check_rights(R_VAREDIT))
var/result = input(usr, "Choose the transformation to apply","Transform Mod") as null|anything in list("Scale","Translate","Rotate")
var/matrix/M = transform
diff --git a/code/game/machinery/computer/dna_console.dm b/code/game/machinery/computer/dna_console.dm
index 17334db4e8ded..d1d396154571e 100644
--- a/code/game/machinery/computer/dna_console.dm
+++ b/code/game/machinery/computer/dna_console.dm
@@ -4,16 +4,21 @@
#define JOKER_TIMEOUT 12000 //20 minutes
#define JOKER_UPGRADE 1800
-#define RADIATION_STRENGTH_MAX 15
-#define RADIATION_STRENGTH_MULTIPLIER 1 //larger has more range
+/// Maximum value for genetic damage strength when pulsing enzymes
+#define GENETIC_DAMAGE_STRENGTH_MAX 15
+/// Larger multipliers will affect the range of values when pulsing enzymes
+#define GENETIC_DAMAGE_STRENGTH_MULTIPLIER 1
-#define RADIATION_DURATION_MAX 30
-#define RADIATION_ACCURACY_MULTIPLIER 3 //larger is less accurate
+/// Maximum value for the genetic damage pulse duration when pulsing enzymes
+#define GENETIC_DAMAGE_DURATION_MAX 30
+/// Large values reduce pulse accuracy and may pulse other enzymes than selected
+#define GENETIC_DAMAGE_ACCURACY_MULTIPLIER 3
/// Special status indicating a scanner occupant is transforming eg. from monkey to human
#define STATUS_TRANSFORMING 4
-#define RADIATION_IRRADIATION_MULTIPLIER 1 //multiplier for how much radiation a test subject receives
+/// Multiplier for how much genetic damage received from DNA Console functionality
+#define GENETIC_DAMAGE_IRGENETIC_DAMAGE_MULTIPLIER 1
#define SEARCH_OCCUPANT 1
/// Flag for the mutation ref search system. Search will include console storage
@@ -63,8 +68,10 @@
var/datum/techweb/stored_research
var/max_storage = 6
var/combine
- var/radduration = 2
- var/radstrength = 1
+ /// Duration for enzyme genetic damage pulses
+ var/pulse_duration = 2
+ /// Strength for enzyme genetic damage pulses
+ var/pulse_strength = 1
var/max_chromosomes = 5
///Amount of mutations we can store
var/list/genetic_makeup_buffer[NUMBER_OF_BUFFERS]
@@ -111,9 +118,9 @@
var/list/delayed_action = null
/// Index of the enzyme being modified during delayed enzyme pulse operations
- var/rad_pulse_index = 0
+ var/genetic_damage_pulse_index = 0
/// World time when the enzyme pulse should complete
- COOLDOWN_DECLARE(rad_pulse_timer)
+ COOLDOWN_DECLARE(genetic_damage_pulse_timer)
/// Used for setting tgui data - Whether the connected DNA Scanner is usable
var/can_use_scanner = FALSE
@@ -126,7 +133,7 @@
/// Used for setting tgui data - Whether injectors are ready to be printed
var/is_injector_ready = FALSE
/// Used for setting tgui data - Wheher an enzyme pulse operation is ongoing
- var/is_pulsing_rads = FALSE
+ var/is_pulsing = FALSE
/// Used for setting tgui data - Time until scramble is ready
var/time_to_scramble = 0
/// Used for setting tgui data - Time until joker is ready
@@ -162,10 +169,10 @@
/obj/machinery/computer/scan_consolenew/process()
. = ..()
- // This is for pulsing the UI element with radiation as part of genetic makeup
- // If rad_pulse_index > 0 then it means we're attempting a rad pulse
- if((rad_pulse_index > 0) && !COOLDOWN_FINISHED(src, rad_pulse_timer))
- rad_pulse()
+ // This is for pulsing the UI element with genetic damage as part of genetic makeup
+ // If genetic_damage_pulse_index > 0 then it means we're attempting a pulse
+ if((genetic_damage_pulse_index > 0) && (genetic_damage_pulse_timer <= world.time) && (genetic_damage_pulse_type == GENETIC_DAMAGE_PULSE_UNIQUE_IDENTITY || genetic_damage_pulse_type == GENETIC_DAMAGE_PULSE_UNIQUE_FEATURES))
+ genetic_damage_pulse()
return
/obj/machinery/computer/scan_consolenew/attackby(obj/item/I, mob/user, params)
@@ -305,8 +312,8 @@
is_joker_ready = COOLDOWN_FINISHED(src, joker_cooldown)
time_to_joker = round(COOLDOWN_TIMELEFT(src, joker_cooldown) / 10)
- is_pulsing_rads = ((rad_pulse_index > 0) && !COOLDOWN_FINISHED(src, rad_pulse_timer))
- time_to_pulse = round(COOLDOWN_TIMELEFT(src, rad_pulse_timer) / 10)
+ is_pulsing = ((genetic_damage_pulse_index > 0) && (genetic_damage_pulse_timer > world.time))
+ time_to_pulse = round((genetic_damage_pulse_timer - world.time)/10)
// Attempt to update tgui ui, open and update if needed.
ui = SStgui.try_update_ui(user, src, ui)
@@ -340,10 +347,10 @@
data["scannerOpen"] = connected_scanner.state_open
data["scannerLocked"] = connected_scanner.locked
data["scannerBoltWireCut"] = connected_scanner.wires.is_cut(WIRE_BOLTS)
- data["radStrength"] = radstrength
- data["radDuration"] = radduration
- data["stdDevStr"] = radstrength * RADIATION_STRENGTH_MULTIPLIER
- switch(RADIATION_ACCURACY_MULTIPLIER / (radduration + (connected_scanner.precision_coeff ** 2))) //hardcoded values from a z-table for a normal distribution
+ data["pulseStrength"] = pulse_strength
+ data["pulseDuration"] = pulse_duration
+ data["stdDevStr"] = pulse_strength * GENETIC_DAMAGE_STRENGTH_MULTIPLIER
+ switch(GENETIC_DAMAGE_ACCURACY_MULTIPLIER / (pulse_duration + (connected_scanner.precision_coeff ** 2))) //hardcoded values from a z-table for a normal distribution
if(0 to 0.25)
data["stdDevAcc"] = ">95 %"
if(0.25 to 0.5)
@@ -361,19 +368,18 @@
else
data["subjectStatus"] = scanner_occupant.stat
data["subjectHealth"] = scanner_occupant.health
- data["subjectRads"] = scanner_occupant.radiation/(RAD_MOB_SAFE/100)
data["subjectEnzymes"] = scanner_occupant.dna.unique_enzymes
data["isMonkey"] = ismonkey(scanner_occupant)
data["subjectUNI"] = scanner_occupant.dna.uni_identity
data["storage"]["occupant"] = tgui_occupant_mutations
- //data["subjectMutations"] = tgui_occupant_mutations
+ var/datum/component/genetic_damage/genetic_damage = scanner_occupant.GetComponent(/datum/component/genetic_damage)
+ data["subjectDamage"] = genetic_damage ? round((genetic_damage.total_damage / genetic_damage.minimum_before_damage) * 100, 0.1) : 0
else
data["subjectName"] = null
data["subjectStatus"] = null
data["subjectHealth"] = null
- data["subjectRads"] = null
+ data["subjectDamage"] = null
data["subjectEnzymes"] = null
- //data["subjectMutations"] = null
data["storage"]["occupant"] = null
data["hasDelayedAction"] = (delayed_action != null)
@@ -383,8 +389,8 @@
data["scrambleSeconds"] = time_to_scramble
data["jokerSeconds"] = time_to_joker
data["injectorSeconds"] = time_to_injector
- data["isPulsingRads"] = is_pulsing_rads
- data["radPulseSeconds"] = time_to_pulse
+ data["isPulsing"] = is_pulsing
+ data["timeToPulse"] = time_to_pulse
if(diskette != null)
data["hasDisk"] = TRUE
@@ -466,7 +472,7 @@
scanner_occupant.dna.generate_dna_blocks()
COOLDOWN_START(src, scramble_cooldown, SCRAMBLE_TIMEOUT)
to_chat(usr, "DNA scrambled.")
- scanner_occupant.radiation += RADIATION_STRENGTH_MULTIPLIER * 50 / (connected_scanner.damage_coeff ** 2)
+ scanner_occupant.AddComponent(/datum/component/genetic_damage, GENETIC_DAMAGE_STRENGTH_MULTIPLIER*50/(connected_scanner.damage_coeff ** 2))
return
// Check whether a specific mutation is eligible for discovery within the
@@ -574,10 +580,10 @@
scanner_occupant.dna.default_mutation_genes[path] = defaultseq
// Copy genome to scanner occupant and do some basic mutation checks as
- // we've increased the occupant rads
+ // we've increased the occupant genetic damage
sequence = copytext_char(sequence, 1, genepos) + newgene + copytext_char(sequence, genepos + 1)
scanner_occupant.dna.mutation_index[path] = sequence
- scanner_occupant.radiation += RADIATION_STRENGTH_MULTIPLIER / connected_scanner.damage_coeff
+ scanner_occupant.AddComponent(/datum/component/genetic_damage, GENETIC_DAMAGE_STRENGTH_MULTIPLIER/connected_scanner.damage_coeff)
scanner_occupant.domutcheck()
// GUARD CHECK - Modifying genetics can lead to edge cases where the
@@ -707,7 +713,7 @@
I.name = "DNA activator"
I.research = TRUE
// If there's an operational connected scanner, we can use its upgrades
- // to improve our injector's radiation generation
+ // to improve our injector's genetic damage generation
if(scanner_operational())
I.damage_coeff = connected_scanner.damage_coeff * 4
COOLDOWN_START(src, injector_cooldown, activator_timeout)
@@ -718,7 +724,7 @@
I.desc = "Adds the current mutation on injection, at the cost of genetic stability."
I.doitanyway = TRUE
// If there's an operational connected scanner, we can use its upgrades
- // to improve our injector's radiation generation
+ // to improve our injector's genetic damage generation
if(scanner_operational())
I.damage_coeff = connected_scanner.damage_coeff
COOLDOWN_START(src, injector_cooldown, mutator_timeout)
@@ -1064,7 +1070,7 @@
// later on in code
if("set_pulse_strength")
var/value = round(text2num(params["val"]))
- radstrength = WRAP(value, 1, RADIATION_STRENGTH_MAX+1)
+ pulse_strength = WRAP(value, 1, GENETIC_DAMAGE_STRENGTH_MAX+1)
return
// Sets the Genetic Makeup pulse duration
@@ -1073,7 +1079,7 @@
// later on in code
if("set_pulse_duration")
var/value = round(text2num(params["val"]))
- radduration = WRAP(value, 1, RADIATION_DURATION_MAX+1)
+ pulse_duration = WRAP(value, 1, GENETIC_DAMAGE_DURATION_MAX+1)
return
// Saves Genetic Makeup information to disk
@@ -1235,7 +1241,7 @@
I.fields = list("UI" = buffer_slot["UI"])
// If there is a connected scanner, we can use its upgrades to reduce
- // the radiation generated by this injector
+ // the genetic damage generated by this injector
if(scanner_operational())
I.damage_coeff = connected_scanner.damage_coeff
if("ue")
@@ -1254,7 +1260,7 @@
)
// If there is a connected scanner, we can use its upgrades to reduce
- // the radiation generated by this injector
+ // the genetic damage generated by this injector
if(scanner_operational())
I.damage_coeff = connected_scanner.damage_coeff
if("mixed")
@@ -1274,7 +1280,7 @@
)
// If there is a connected scanner, we can use its upgrades to reduce
- // the radiation generated by this injector
+ // the genetic damage generated by this injector
if(scanner_operational())
I.damage_coeff = connected_scanner.damage_coeff
@@ -1365,12 +1371,12 @@
// Set the appropriate timer and index to pulse. This is then managed
// later on in process()
var/len = length_char(scanner_occupant.dna.uni_identity)
- COOLDOWN_START(src, rad_pulse_timer, radduration * 10)
- rad_pulse_index = WRAP(text2num(params["index"]), 1, len + 1)
+ COOLDOWN_START(src, genetic_damage_pulse_timer, radduration * 10)
+ genetic_damage_pulse_index = WRAP(text2num(params["index"]), 1, len + 1)
START_PROCESSING(SSobj, src)
return
- // Cancels the delayed action - In this context it is not the radiation
+ // Cancels the delayed action - In this context it is not the genetic damage
// pulse from "makeup_pulse", which can not be cancelled. It is instead
// the delayed genetic transfer from "makeup_delay"
if("cancel_delay")
@@ -1451,7 +1457,7 @@
I.name = "Advanced [inj_name] injector"
// If there's an operational connected scanner, we can use its upgrades
- // to improve our injector's radiation generation
+ // to improve our injector's genetic damage generation
if(scanner_operational())
I.damage_coeff = connected_scanner.damage_coeff
COOLDOWN_START(src, injector_cooldown, advanced_timeout)
@@ -1577,9 +1583,9 @@
// necessary occupant guard checks. If you call this code yourself, please
// apply can_modify_occupant() or equivalent checks first.
- // Pre-calc the rad increase since we'll be using it in all the possible
+ // Pre-calc the damage increase since we'll be using it in all the possible
// operations
- var/rad_increase = rand(100 / (connected_scanner.damage_coeff ** 2), 250 / (connected_scanner.damage_coeff ** 2))
+ var/damage_increase = rand(100/(connected_scanner.damage_coeff ** 2),250/(connected_scanner.damage_coeff ** 2))
switch(type)
if("ui")
@@ -1591,7 +1597,7 @@
return FALSE
scanner_occupant.dna.uni_identity = buffer_slot["UI"]
scanner_occupant.updateappearance(mutations_overlay_update = 1)
- scanner_occupant.radiation += rad_increase
+ scanner_occupant.AddComponent(/datum/component/genetic_damage, damage_increase)
scanner_occupant.domutcheck()
return TRUE
if("ue")
@@ -1605,7 +1611,7 @@
scanner_occupant.name = buffer_slot["name"]
scanner_occupant.dna.unique_enzymes = buffer_slot["UE"]
scanner_occupant.dna.blood_type = buffer_slot["blood_type"]
- scanner_occupant.radiation += rad_increase
+ scanner_occupant.AddComponent(/datum/component/genetic_damage, damage_increase)
scanner_occupant.domutcheck()
return TRUE
if("mixed")
@@ -1621,7 +1627,7 @@
scanner_occupant.name = buffer_slot["name"]
scanner_occupant.dna.unique_enzymes = buffer_slot["UE"]
scanner_occupant.dna.blood_type = buffer_slot["blood_type"]
- scanner_occupant.radiation += rad_increase
+ scanner_occupant.AddComponent(/datum/component/genetic_damage, damage_increase)
scanner_occupant.domutcheck()
return TRUE
@@ -1656,7 +1662,7 @@
// DNA Modification:
// requires DNA
// this DNA can not be bad
- // is done via radiation bursts, so radiation immune carbons are not viable
+ // is done via genetic damage bursts, so genetic damage immune carbons are not viable
// And the DNA Scanner itself must have a valid scan level
if(scanner_occupant.has_dna() && !HAS_TRAIT(scanner_occupant, TRAIT_RADIMMUNE) && !HAS_TRAIT(scanner_occupant, TRAIT_BADDNA) || (connected_scanner.scan_level >= 3))
return TRUE
@@ -1697,10 +1703,10 @@
*/
/obj/machinery/computer/scan_consolenew/proc/on_scanner_open()
SIGNAL_HANDLER
- // If we had a radiation pulse action ongoing, we want to stop this.
+ // If we had a genetic damage pulse action ongoing, we want to stop this.
// Imagine it being like a microwave stopping when you open the door.
- rad_pulse_index = 0
- COOLDOWN_RESET(src, rad_pulse_timer)
+ genetic_damage_pulse_index = 0
+ COOLDOWN_RESET(src, genetic_damage_pulse_timer)
STOP_PROCESSING(SSobj, src)
scanner_occupant = null
@@ -2041,11 +2047,11 @@
*
* Arguments:
* * position - Index of the intended enzyme element to pulse
- * * radduration - Duration of intended radiation pulse
+ * * pulse_duration - Duration of intended genetic damage pulse
* * number_of_blocks - Number of individual data blocks in the pulsed enzyme
*/
-/obj/machinery/computer/scan_consolenew/proc/randomize_radiation_accuracy(position, radduration, number_of_blocks)
- var/val = round(gaussian(0, RADIATION_ACCURACY_MULTIPLIER/radduration) + position, 1)
+/obj/machinery/computer/scan_consolenew/proc/randomize_GENETIC_DAMAGE_accuracy(position, pulse_duration, number_of_blocks)
+ var/val = round(gaussian(0, GENETIC_DAMAGE_ACCURACY_MULTIPLIER/pulse_duration) + position, 1)
return WRAP(val, 1, number_of_blocks + 1)
/**
@@ -2055,11 +2061,11 @@
*
* Arguments:
* * input - Enzyme identity element to scramble, expected hex value
- * * rs - Strength of radiation pulse, increases the range of possible outcomes
+ * * rs - Strength of genetic damage pulse, increases the range of possible outcomes
*/
/obj/machinery/computer/scan_consolenew/proc/scramble(input,rs)
var/length = length(input)
- var/ran = gaussian(0, rs * RADIATION_STRENGTH_MULTIPLIER)
+ var/ran = gaussian(0, rs*GENETIC_DAMAGE_STRENGTH_MULTIPLIER)
switch(ran)
if(0)
ran = pick(-1, 1) //hacky, statistically should almost never happen. 0-chance makes people mad though
@@ -2070,29 +2076,29 @@
return num2hex(WRAP(hex2num(input) + ran, 0, 16 ** length), length)
/**
- * Performs the enzyme radiation pulse.
+ * Performs the enzyme genetic damage pulse.
*
* Donor code from previous DNA Console iteration. Called from process() when
- * there is a radiation pulse in progress. Ends processing.
+ * there is a genetic damage pulse in progress. Ends processing.
*/
-/obj/machinery/computer/scan_consolenew/proc/rad_pulse()
+/obj/machinery/computer/scan_consolenew/proc/genetic_damage_pulse()
// GUARD CHECK - Can we genetically modify the occupant? Includes scanner
// operational guard checks.
// If we can't, abort the procedure.
if(!can_modify_occupant())
- rad_pulse_index = 0
+ genetic_damage_pulse_index = 0
STOP_PROCESSING(SSobj, src)
return
var/len = length_char(scanner_occupant.dna.uni_identity)
- var/num = randomize_radiation_accuracy(rad_pulse_index, radduration + (connected_scanner.precision_coeff ** 2), len) //Each manipulator level above 1 makes randomization as accurate as selected time + manipulator lvl^2 //Value is this high for the same reason as with laser - not worth the hassle of upgrading if the bonus is low
+ var/num = randomize_GENETIC_DAMAGE_accuracy(genetic_damage_pulse_index, pulse_duration + (connected_scanner.precision_coeff ** 2), len) //Each manipulator level above 1 makes randomization as accurate as selected time + manipulator lvl^2 //Value is this high for the same reason as with laser - not worth the hassle of upgrading if the bonus is low
var/hex = copytext_char(scanner_occupant.dna.uni_identity, num, num + 1)
- hex = scramble(hex, radstrength, radduration)
+ hex = scramble(hex, pulse_strength, pulse_duration)
scanner_occupant.dna.uni_identity = copytext_char(scanner_occupant.dna.uni_identity, 1, num) + hex + copytext_char(scanner_occupant.dna.uni_identity, num + 1)
scanner_occupant.updateappearance(mutations_overlay_update = 1)
- rad_pulse_index = 0
+ genetic_damage_pulse_index = 0
STOP_PROCESSING(SSobj, src)
return
@@ -2161,13 +2167,13 @@
#undef JOKER_TIMEOUT
#undef JOKER_UPGRADE
-#undef RADIATION_STRENGTH_MAX
-#undef RADIATION_STRENGTH_MULTIPLIER
+#undef GENETIC_DAMAGE_STRENGTH_MAX
+#undef GENETIC_DAMAGE_STRENGTH_MULTIPLIER
-#undef RADIATION_DURATION_MAX
-#undef RADIATION_ACCURACY_MULTIPLIER
+#undef GENETIC_DAMAGE_DURATION_MAX
+#undef GENETIC_DAMAGE_ACCURACY_MULTIPLIER
-#undef RADIATION_IRRADIATION_MULTIPLIER
+#undef GENETIC_DAMAGE_IRGENETIC_DAMAGE_MULTIPLIER
#undef STATUS_TRANSFORMING
diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm
index c946c241ddef8..991af6fb71d6c 100644
--- a/code/game/machinery/doors/airlock.dm
+++ b/code/game/machinery/doors/airlock.dm
@@ -101,9 +101,6 @@
var/prying_so_hard = FALSE
var/protected_door = FALSE // Protects the door against any form of power outage, AI control, screwdrivers and welders.
- rad_flags = RAD_PROTECT_CONTENTS | RAD_NO_CONTAMINATE
- rad_insulation = RAD_MEDIUM_INSULATION
-
var/electrification_timing // Set to true while electrified_loop is running, to prevent multiple being started
network_id = NETWORK_DOOR_AIRLOCKS
diff --git a/code/game/machinery/doors/airlock_types.dm b/code/game/machinery/doors/airlock_types.dm
index c205806191deb..fcbea0496338d 100644
--- a/code/game/machinery/doors/airlock_types.dm
+++ b/code/game/machinery/doors/airlock_types.dm
@@ -206,7 +206,7 @@
..()
/obj/machinery/door/airlock/uranium/proc/radiate()
- radiation_pulse(get_turf(src), 150)
+ radiation_pulse(src, max_range = 2, threshold = RAD_LIGHT_INSULATION, chance = URANIUM_IRRADIATION_CHANCE, minimum_exposure_time = URANIUM_RADIATION_MINIMUM_EXPOSURE_TIME)
return
/obj/machinery/door/airlock/uranium/glass
diff --git a/code/game/machinery/suit_storage_unit.dm b/code/game/machinery/suit_storage_unit.dm
index cb3b618366e5e..356ba3c32c981 100644
--- a/code/game/machinery/suit_storage_unit.dm
+++ b/code/game/machinery/suit_storage_unit.dm
@@ -421,7 +421,7 @@
toasted = TRUE
if(mob_occupant)
visible_message("[src]'s door creaks open with a loud whining noise. A foul stench and a cloud of smoke exit the chamber.")
- mob_occupant.radiation = 0 //The guy inside is toasted to a crisp, no need to leave him with the rads
+ qdel(mob_occupant.GetComponent(/datum/component/irradiated)) //The guy inside is toasted to a crisp, no need to leave him with the rads
else
visible_message("[src]'s door creaks open with a loud whining noise. A cloud of foul black smoke escapes from its chamber.")
playsound(src, 'sound/machines/airlock_alien_prying.ogg', 50, TRUE)
@@ -438,7 +438,7 @@
if(!toasted) //Special toast check to prevent a double finishing message.
if(mob_occupant)
visible_message("[src]'s door slides open, barraging you with the nauseating smell of charred flesh.")
- mob_occupant.radiation = 0
+ qdel(mob_occupant.GetComponent(/datum/component/irradiated))
else
visible_message("[src]'s door slides open. The glowing yellow lights dim to a gentle green.")
toasted = FALSE
diff --git a/code/game/machinery/teleporter.dm b/code/game/machinery/teleporter.dm
index f703c91d3107c..7701a86ebdf25 100644
--- a/code/game/machinery/teleporter.dm
+++ b/code/game/machinery/teleporter.dm
@@ -86,8 +86,6 @@
log_game("[M] ([key_name(M)]) was turned into a fly person")
to_chat(M, "You hear a buzzing in your ears.")
human.set_species(/datum/species/fly)
-
- human.apply_effect((rand(160 - accuracy * 40, 240 - accuracy * 60)), EFFECT_IRRADIATE, 0)
calibrated = 0
return
diff --git a/code/game/objects/items/devices/geiger_counter.dm b/code/game/objects/items/devices/geiger_counter.dm
index c433e287215ad..31a3580e0d093 100644
--- a/code/game/objects/items/devices/geiger_counter.dm
+++ b/code/game/objects/items/devices/geiger_counter.dm
@@ -1,9 +1,3 @@
-#define RAD_LEVEL_NORMAL 9
-#define RAD_LEVEL_MODERATE 100
-#define RAD_LEVEL_HIGH 400
-#define RAD_LEVEL_VERY_HIGH 800
-#define RAD_LEVEL_CRITICAL 1500
-
/obj/item/geiger_counter //DISCLAIMER: I know nothing about how real-life Geiger counters work. This will not be realistic. ~Xhuis
name = "\improper Geiger counter"
desc = "A handheld device used for detecting and measuring radiation pulses."
@@ -17,187 +11,102 @@
slot_flags = ITEM_SLOT_BELT
custom_materials = list(/datum/material/iron = 150, /datum/material/glass = 150)
- var/grace = RAD_GEIGER_GRACE_PERIOD
- var/datum/looping_sound/geiger/soundloop
+ var/last_perceived_radiation_danger = null
var/scanning = FALSE
- var/radiation_count = 0
- var/current_tick_amount = 0
- var/last_tick_amount = 0
- var/fail_to_receive = 0
- var/current_warning = 1
/obj/item/geiger_counter/Initialize(mapload)
. = ..()
- START_PROCESSING(SSobj, src)
-
- soundloop = new(src, FALSE)
-
-/obj/item/geiger_counter/Destroy()
- QDEL_NULL(soundloop)
- STOP_PROCESSING(SSobj, src)
- return ..()
-
-/obj/item/geiger_counter/process(delta_time)
- if(scanning)
- radiation_count = LPFILTER(radiation_count, current_tick_amount, delta_time, RAD_GEIGER_RC)
-
- if(current_tick_amount)
- grace = RAD_GEIGER_GRACE_PERIOD
- last_tick_amount = current_tick_amount
-
- else if(!(obj_flags & EMAGGED))
- grace -= delta_time
- if(grace <= 0)
- radiation_count = 0
-
- current_tick_amount = 0
-
- update_icon()
- update_sound()
+ RegisterSignal(src, COMSIG_IN_RANGE_OF_IRRADIATION, .proc/on_pre_potential_irradiation)
/obj/item/geiger_counter/examine(mob/user)
. = ..()
if(!scanning)
return
. += "Alt-click it to clear stored radiation levels."
- if(obj_flags & EMAGGED)
- . += "The display seems to be incomprehensible."
- return
- switch(radiation_count)
- if(-INFINITY to RAD_LEVEL_NORMAL)
+ switch(last_perceived_radiation_danger)
+ if(null)
. += "Ambient radiation level count reports that all is well."
- if(RAD_LEVEL_NORMAL + 1 to RAD_LEVEL_MODERATE)
+ if(PERCEIVED_RADIATION_DANGER_LOW)
. += "Ambient radiation levels slightly above average."
- if(RAD_LEVEL_MODERATE + 1 to RAD_LEVEL_HIGH)
+ if(PERCEIVED_RADIATION_DANGER_MEDIUM)
. += "Ambient radiation levels above average."
- if(RAD_LEVEL_HIGH + 1 to RAD_LEVEL_VERY_HIGH)
+ if(PERCEIVED_RADIATION_DANGER_HIGH)
. += "Ambient radiation levels highly above average."
- if(RAD_LEVEL_VERY_HIGH + 1 to RAD_LEVEL_CRITICAL)
- . += "Ambient radiation levels nearing critical level."
- if(RAD_LEVEL_CRITICAL + 1 to INFINITY)
+ if(PERCEIVED_RADIATION_DANGER_EXTREME)
. += "Ambient radiation levels above critical level!"
- . += "The last radiation amount detected was [last_tick_amount]"
-
/obj/item/geiger_counter/update_icon_state()
if(!scanning)
icon_state = "geiger_off"
return ..()
- else if(obj_flags & EMAGGED)
- icon_state = "geiger_on_emag"
- return ..()
- switch(radiation_count)
- if(-INFINITY to RAD_LEVEL_NORMAL)
+ switch(last_perceived_radiation_danger)
+ if(null)
icon_state = "geiger_on_1"
- if(RAD_LEVEL_NORMAL + 1 to RAD_LEVEL_MODERATE)
+ if(PERCEIVED_RADIATION_DANGER_LOW)
icon_state = "geiger_on_2"
- if(RAD_LEVEL_MODERATE + 1 to RAD_LEVEL_HIGH)
+ if(PERCEIVED_RADIATION_DANGER_MEDIUM)
icon_state = "geiger_on_3"
- if(RAD_LEVEL_HIGH + 1 to RAD_LEVEL_VERY_HIGH)
- icon_state = "geiger_on_4"
- if(RAD_LEVEL_VERY_HIGH + 1 to RAD_LEVEL_CRITICAL)
+ if(PERCEIVED_RADIATION_DANGER_HIGH)
icon_state = "geiger_on_4"
- if(RAD_LEVEL_CRITICAL + 1 to INFINITY)
+ if(PERCEIVED_RADIATION_DANGER_EXTREME)
icon_state = "geiger_on_5"
return ..()
-/obj/item/geiger_counter/proc/update_sound()
- var/datum/looping_sound/geiger/loop = soundloop
- if(!scanning)
- loop.stop()
- return
- if(!radiation_count)
- loop.stop()
- return
- loop.last_radiation = radiation_count
- loop.start()
-
-/obj/item/geiger_counter/rad_act(amount)
- . = ..()
- if(amount <= RAD_BACKGROUND_RADIATION || !scanning)
- return
- current_tick_amount += amount
- update_icon()
-
/obj/item/geiger_counter/attack_self(mob/user)
scanning = !scanning
+ if (scanning)
+ AddComponent(/datum/component/geiger_sound)
+ else
+ qdel(GetComponent(/datum/component/geiger_sound))
update_icon()
to_chat(user, "[icon2html(src, user)] You switch [scanning ? "on" : "off"] [src].")
-/obj/item/geiger_counter/afterattack(atom/target, mob/user)
+/obj/item/geiger_counter/afterattack(atom/target, mob/living/user, params)
. = ..()
- if(user.a_intent == INTENT_HELP)
- if(!(obj_flags & EMAGGED))
- user.visible_message("[user] scans [target] with [src].", "You scan [target]'s radiation levels with [src]...")
- addtimer(CALLBACK(src, PROC_REF(scan), target, user), 20, TIMER_UNIQUE) // Let's not have spamming GetAllContents
- else
- user.visible_message("[user] scans [target] with [src].", "You project [src]'s stored radiation into [target]!")
- target.rad_act(radiation_count)
- radiation_count = 0
- return TRUE
-
-/obj/item/geiger_counter/proc/scan(atom/A, mob/user)
- var/rad_strength = 0
- for(var/i in get_rad_contents(A)) // Yes it's intentional that you can't detect radioactive things under rad protection. Gives traitors a way to hide their glowing green rocks.
- var/atom/thing = i
- if(!thing)
- continue
- var/datum/component/radioactive/radiation = thing.GetComponent(/datum/component/radioactive)
- if(radiation)
- rad_strength += radiation.strength
-
- if(isliving(A))
- var/mob/living/M = A
- if(!M.radiation)
- to_chat(user, "[icon2html(src, user)] Radiation levels within normal boundaries.")
- else
- to_chat(user, "[icon2html(src, user)] Subject is irradiated. Radiation levels: [M.radiation].")
-
- if(rad_strength)
- to_chat(user, "[icon2html(src, user)] Target contains radioactive contamination. Radioactive strength: [rad_strength]")
- else
- to_chat(user, "[icon2html(src, user)] Target is free of radioactive contamination.")
-
-/obj/item/geiger_counter/attackby(obj/item/I, mob/user, params)
- if(I.tool_behaviour == TOOL_SCREWDRIVER && (obj_flags & EMAGGED))
- if(scanning)
- to_chat(user, "Turn off [src] before you perform this action!")
- return 0
- user.visible_message("[user] unscrews [src]'s maintenance panel and begins fiddling with its innards...", "You begin resetting [src]...")
- if(!I.use_tool(src, user, 40, volume=50))
- return 0
- user.visible_message("[user] refastens [src]'s maintenance panel!", "You reset [src] to its factory settings!")
- obj_flags &= ~EMAGGED
- radiation_count = 0
+ if (!CAN_IRRADIATE(target))
+ return
+ user.visible_message("[user] scans [target] with [src].", "You scan [target]'s radiation levels with [src]...")
+ addtimer(CALLBACK(src, PROC_REF(scan), target, user), 20, TIMER_UNIQUE) // Let's not have spamming GetAllContents
+ return TRUE
+
+/obj/item/geiger_counter/equipped(mob/user, slot, initial)
+ . = ..()
+ RegisterSignal(user, COMSIG_IN_RANGE_OF_IRRADIATION, PROC_REF(on_pre_potential_irradiation))
+
+/obj/item/geiger_counter/dropped(mob/user, silent = FALSE)
+ . = ..()
+ UnregisterSignal(user, COMSIG_IN_RANGE_OF_IRRADIATION)
+
+/obj/item/geiger_counter/proc/on_pre_potential_irradiation(datum/source, datum/radiation_pulse_information/pulse_information, insulation_to_target)
+ SIGNAL_HANDLER
+ last_perceived_radiation_danger = get_perceived_radiation_danger(pulse_information, insulation_to_target)
+ addtimer(CALLBACK(src, PROC_REF(reset_perceived_danger)), TIME_WITHOUT_RADIATION_BEFORE_RESET, TIMER_UNIQUE | TIMER_OVERRIDE)
+ if(scanning)
update_icon()
- return 1
- else
- return ..()
+
+/obj/item/geiger_counter/proc/reset_perceived_danger()
+ last_perceived_radiation_danger = null
+ if (scanning)
+ update_icon()
+
+/obj/item/geiger_counter/proc/scan(atom/target, mob/user)
+ if (SEND_SIGNAL(target, COMSIG_GEIGER_COUNTER_SCAN, user, src) & COMSIG_GEIGER_COUNTER_SCAN_SUCCESSFUL)
+ return
+ to_chat(user, "[icon2html(src, user)] [isliving(target) ? "Subject" : "Target"] is free of radioactive contamination.")
/obj/item/geiger_counter/AltClick(mob/living/user)
- if(!istype(user) || !user.canUseTopic(src, BE_CLOSE))
- return ..()
+ . = ..()
+ (mob/living/user)
if(!scanning)
to_chat(usr, "[src] must be on to reset its radiation level!")
- return 0
- radiation_count = 0
+ return FALSE
to_chat(usr, "You flush [src]'s radiation counts, resetting it to normal.")
+ last_perceived_radiation_danger = null
update_icon()
-
-/obj/item/geiger_counter/should_emag(mob/user)
- if(!..())
- return FALSE
- if(scanning)
- to_chat(user, "Turn off \the [src] before you perform this action!")
- return FALSE
return TRUE
-/obj/item/geiger_counter/on_emag(mob/user)
- ..()
- to_chat(user, "You override [src]'s radiation storing protocols. It will now generate small doses of radiation, and stored rads are now projected into creatures you scan.")
-
/obj/item/geiger_counter/cyborg
var/mob/listeningTo
diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm
index d702c879b1213..6f972025c2d51 100644
--- a/code/game/objects/items/devices/scanners.dm
+++ b/code/game/objects/items/devices/scanners.dm
@@ -216,6 +216,8 @@ GENE SCANNER
message += "Analyzing results for [M]:\n\tOverall status: [mob_status]"
+ SEND_SIGNAL(M, COMSIG_LIVING_HEALTHSCAN, message, advanced, user, mode)
+
// Damage descriptions
if(brute_loss > 10)
message += "\t[brute_loss > 50 ? "Severe" : "Minor"] tissue damage detected."
@@ -256,10 +258,8 @@ GENE SCANNER
if(advanced)
message += "\tBrain Activity Level: [(200 - M.getOrganLoss(ORGAN_SLOT_BRAIN))/2]%."
- if(M.radiation)
- message += "\tSubject is irradiated."
- if(advanced)
- message += "\tRadiation Level: [M.radiation]%."
+ if(HAS_TRAIT(M, TRAIT_IRRADIATED))
+ render_list += "Subject is irradiated. Supply toxin healing.\n"
if(advanced && M.hallucinating())
message += "\tSubject is hallucinating."
diff --git a/code/game/objects/items/devices/traitordevices.dm b/code/game/objects/items/devices/traitordevices.dm
index 9b98b13ad763e..651f0acd9e694 100644
--- a/code/game/objects/items/devices/traitordevices.dm
+++ b/code/game/objects/items/devices/traitordevices.dm
@@ -95,7 +95,6 @@ effective or pretty fucking useless.
if(M)
if(intensity >= 5)
M.apply_effect(round(intensity/0.075), EFFECT_UNCONSCIOUS)
- M.rad_act(intensity*10)
else
to_chat(user, "The radioactive microlaser is still recharging.")
diff --git a/code/game/objects/items/dna_injector.dm b/code/game/objects/items/dna_injector.dm
index df204a488435e..b8affd406bb89 100644
--- a/code/game/objects/items/dna_injector.dm
+++ b/code/game/objects/items/dna_injector.dm
@@ -22,7 +22,6 @@
/obj/item/dnainjector/proc/inject(mob/living/carbon/M, mob/user)
if(M.has_dna() && !HAS_TRAIT(M, TRAIT_RADIMMUNE) && !HAS_TRAIT(M, TRAIT_BADDNA))
- M.radiation += rand(20/(damage_coeff ** 2),50/(damage_coeff ** 2))
var/log_msg = "[key_name(user)] injected [key_name(M)] with the [name]"
for(var/HM in remove_mutations)
M.dna.remove_mutation(HM)
@@ -500,7 +499,6 @@
return FALSE
if(M.has_dna() && !(HAS_TRAIT(M, TRAIT_BADDNA)))
- M.radiation += rand(20/(damage_coeff ** 2),50/(damage_coeff ** 2))
var/log_msg = "[key_name(user)] injected [key_name(M)] with the [name]"
var/endtime = world.time+duration
for(var/mutation in remove_mutations)
@@ -562,7 +560,6 @@
/obj/item/dnainjector/activator/inject(mob/living/carbon/M, mob/user)
if(M.has_dna() && !HAS_TRAIT(M, TRAIT_RADIMMUNE) && !HAS_TRAIT(M, TRAIT_BADDNA))
- M.radiation += rand(20/(damage_coeff ** 2),50/(damage_coeff ** 2))
var/log_msg = "[key_name(user)] injected [key_name(M)] with the [name]"
for(var/mutation in add_mutations)
var/datum/mutation/HM = mutation
diff --git a/code/game/objects/items/grenades/syndieminibomb.dm b/code/game/objects/items/grenades/syndieminibomb.dm
index 4fb86a51ea9b5..531fa9bef638b 100644
--- a/code/game/objects/items/grenades/syndieminibomb.dm
+++ b/code/game/objects/items/grenades/syndieminibomb.dm
@@ -53,8 +53,9 @@
icon = 'icons/obj/grenade.dmi'
icon_state = "bluefrag"
item_state = "flashbang"
+ var/rad_range = 4
+ var/rad_threshold = RAD_EXTREME_INSULATION
var/freeze_range = 4
- var/rad_damage = 350
var/stamina_damage = 30
/obj/item/grenade/gluon/prime(mob/living/lanced_by)
@@ -63,7 +64,7 @@
return
update_mob()
playsound(loc, 'sound/effects/empulse.ogg', 50, 1)
- radiation_pulse(src, rad_damage)
+ radiation_pulse(src, max_range = rad_range, threshold = rad_threshold, chance = 100)
for(var/turf/open/floor/F in view(freeze_range,loc))
F.MakeSlippery(TURF_WET_PERMAFROST, 6 MINUTES)
for(var/mob/living/carbon/L in F)
diff --git a/code/game/objects/items/religion.dm b/code/game/objects/items/religion.dm
index 46838cd44f9aa..62b626933a41c 100644
--- a/code/game/objects/items/religion.dm
+++ b/code/game/objects/items/religion.dm
@@ -184,7 +184,7 @@
inspiration_available = FALSE
/obj/item/banner/engineering/special_inspiration(mob/living/carbon/human/H)
- H.radiation = 0
+ qdel(H.GetComponent(/datum/component/irradiated))
/datum/crafting_recipe/engineering_banner
name = "Engitopia Banner"
diff --git a/code/game/objects/items/storage/bags.dm b/code/game/objects/items/storage/bags.dm
index fed6580a6761b..bd761697e62ac 100644
--- a/code/game/objects/items/storage/bags.dm
+++ b/code/game/objects/items/storage/bags.dm
@@ -137,7 +137,6 @@
/obj/item/storage/bag/ore/ComponentInitialize()
. = ..()
- AddComponent(/datum/component/rad_insulation, 0.05) //please datum mats no more cancer
var/datum/component/storage/concrete/stack/STR = GetComponent(/datum/component/storage/concrete/stack)
STR.allow_quick_empty = TRUE
STR.can_hold = typecacheof(list(/obj/item/stack/ore))
diff --git a/code/game/objects/items/theft_tools.dm b/code/game/objects/items/theft_tools.dm
index 4e579bfddd7b9..f8368c4104cfd 100644
--- a/code/game/objects/items/theft_tools.dm
+++ b/code/game/objects/items/theft_tools.dm
@@ -34,7 +34,7 @@
if(cooldown < world.time - 60)
cooldown = world.time
flick(pulseicon, src)
- radiation_pulse(src, 400, 2)
+ radiation_pulse(src, max_range = 2, threshold = RAD_EXTREME_INSULATION)
/obj/item/nuke_core/suicide_act(mob/living/user)
user.visible_message("[user] is rubbing [src] against [user.p_them()]self! It looks like [user.p_theyre()] trying to commit suicide!")
@@ -147,7 +147,7 @@
return
else
to_chat(user, "As it touches \the [src], both \the [src] and \the [W] burst into dust!")
- radiation_pulse(user, 100)
+ radiation_pulse(user, max_range = 2, threshold = RAD_EXTREME_INSULATION, chance = 40)
playsound(src, 'sound/effects/supermatter.ogg', 50, 1)
qdel(W)
qdel(src)
@@ -160,7 +160,7 @@
user.visible_message("[victim] reaches out and tries to pick up [src]. [victim.p_their()] body starts to glow and bursts into flames before flashing into dust!",\
"You reach for [src] with your hands. That was dumb.",\
"Everything suddenly goes silent.")
- radiation_pulse(user, 500, 2)
+ radiation_pulse(user, max_range = 2, threshold = RAD_EXTREME_INSULATION, chance = 40)
playsound(get_turf(user), 'sound/effects/supermatter.ogg', 50, 1)
victim.investigate_log("has been dusted by [src].", INVESTIGATE_DEATHS)
victim.dust()
@@ -264,7 +264,7 @@
"Everything suddenly goes silent.")
user.investigate_log("has been dusted by [src].", INVESTIGATE_DEATHS)
user.dust()
- radiation_pulse(src, 500, 2)
+ radiation_pulse(src, max_range = 2, threshold = RAD_EXTREME_INSULATION, chance = 40)
playsound(src, 'sound/effects/supermatter.ogg', 50, 1)
QDEL_NULL(sliver)
update_icon()
diff --git a/code/game/objects/items/tools/wirebrush.dm b/code/game/objects/items/tools/wirebrush.dm
index 9b05d50cbb5bd..a2a59e4648a17 100644
--- a/code/game/objects/items/tools/wirebrush.dm
+++ b/code/game/objects/items/tools/wirebrush.dm
@@ -10,49 +10,3 @@
tool_behaviour = TOOL_RUSTSCRAPER
toolspeed = 1
-/**
- * An advanced form of the wirebrush that trades the safety of the user for instant rust removal.
- * If the person using this is unlucky they are going to die painfully.
- */
-/obj/item/wirebrush/advanced
- name = "advanced wirebrush"
- desc = "An advanced wirebrush; uses radiation to almost instantly liquify rust."
- icon_state = "wirebrush_adv"
- toolspeed = 0.1
-
- /// The amount of radiation to give to the user of this tool; regardless of what they did with it.
- var/radiation_on_use = 20
-
- /// How likely is a critical fail?
- var/crit_fail_prob = 1
-
- /// The amount of radiation to give to the user if they roll the worst effects. Negative numbers will heal radiation instead!
- var/crit_fail_rads = 50
-
- /// The amount of damage to take in BOTH Tox and Oxy on critical fail
- var/crit_fail_damage = 15
-
- /// We only apply damage and force vomit if the user has OVER this many rads
- var/crit_fail_rads_threshold = 300
-
-/obj/item/wirebrush/advanced/examine(mob/user)
- . = ..()
- . += "There is a warning label that indicates extended use of [src] may result in loss of hair, yellowing skin, and death."
-
-/obj/item/wirebrush/advanced/proc/irradiate(mob/living/user)
- if(!istype(user))
- return
-
- if(prob(crit_fail_prob))
- to_chat(user, "You feel a sharp pain as your entire body grows oddly warm.")
- user.radiation += crit_fail_rads
- if(user.radiation > crit_fail_rads_threshold) // If you ignore the warning signs you get punished
- user.emote("vomit")
- user.adjustToxLoss(crit_fail_damage, forced=TRUE)
- user.adjustOxyLoss(crit_fail_damage, forced=TRUE)
- return
-
- user.radiation += radiation_on_use
-
- if(prob(25))
- user.emote("cough")
diff --git a/code/game/objects/objs.dm b/code/game/objects/objs.dm
index b2613c87ab729..b4551394ec20a 100644
--- a/code/game/objects/objs.dm
+++ b/code/game/objects/objs.dm
@@ -310,8 +310,8 @@
rad = text2num(result["values"][RAD]),\
fire = text2num(result["values"][FIRE]),\
acid = text2num(result["values"][ACID]))
- log_admin("[key_name(usr)] modified the armor on [src] ([type]) to melee: [armor.melee], bullet: [armor.bullet], laser: [armor.laser], energy: [armor.energy], bomb: [armor.bomb], bio: [armor.bio], rad: [armor.rad], fire: [armor.fire], acid: [armor.acid]")
- message_admins("[key_name_admin(usr)] modified the armor on [src] ([type]) to melee: [armor.melee], bullet: [armor.bullet], laser: [armor.laser], energy: [armor.energy], bomb: [armor.bomb], bio: [armor.bio], rad: [armor.rad], fire: [armor.fire], acid: [armor.acid]")
+ log_admin("[key_name(usr)] modified the armor on [src] ([type]) to melee: [armor.melee], bullet: [armor.bullet], laser: [armor.laser], energy: [armor.energy], bomb: [armor.bomb], bio: [armor.bio], fire: [armor.fire], acid: [armor.acid]")
+ message_admins("[key_name_admin(usr)] modified the armor on [src] ([type]) to melee: [armor.melee], bullet: [armor.bullet], laser: [armor.laser], energy: [armor.energy], bomb: [armor.bomb], bio: [armor.bio], fire: [armor.fire], acid: [armor.acid]")
if(href_list[VV_HK_MASS_DEL_TYPE])
if(check_rights(R_DEBUG|R_SERVER))
var/action_type = alert("Strict type ([type]) or type and all subtypes?",,"Strict type","Type and subtypes","Cancel")
diff --git a/code/game/objects/structures/false_walls.dm b/code/game/objects/structures/false_walls.dm
index deaa9387817f0..cd1f5e8e39810 100644
--- a/code/game/objects/structures/false_walls.dm
+++ b/code/game/objects/structures/false_walls.dm
@@ -17,8 +17,6 @@
max_integrity = 100
can_be_unanchored = FALSE
CanAtmosPass = ATMOS_PASS_DENSITY
- rad_flags = RAD_PROTECT_CONTENTS | RAD_NO_CONTAMINATE
- rad_insulation = RAD_MEDIUM_INSULATION
var/mineral = /obj/item/stack/sheet/iron
var/mineral_amount = 2
var/walltype = /turf/closed/wall
@@ -189,7 +187,7 @@
if(!active)
if(world.time > last_event+15)
active = 1
- radiation_pulse(src, 150)
+ radiation_pulse(src, max_range = 2, threshold = RAD_LIGHT_INSULATION, chance = URANIUM_IRRADIATION_CHANCE, minimum_exposure_time = URANIUM_RADIATION_MINIMUM_EXPOSURE_TIME)
for(var/turf/closed/wall/mineral/uranium/T in (RANGE_TURFS(1,src)-src))
T.radiate()
last_event = world.time
diff --git a/code/game/objects/structures/girders.dm b/code/game/objects/structures/girders.dm
index c1f0df23f3199..6f33b8ff20e1f 100644
--- a/code/game/objects/structures/girders.dm
+++ b/code/game/objects/structures/girders.dm
@@ -10,8 +10,6 @@
var/girderpasschance = 20 // percentage chance that a projectile passes through the girder.
var/can_displace = TRUE //If the girder can be moved around by wrenching it
max_integrity = 200
- rad_flags = RAD_PROTECT_CONTENTS | RAD_NO_CONTAMINATE
- rad_insulation = RAD_VERY_LIGHT_INSULATION
/obj/structure/girder/examine(mob/user)
. = ..()
diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm
index 32c34df0d9fea..cb3b0bb996e1d 100644
--- a/code/game/objects/structures/grille.dm
+++ b/code/game/objects/structures/grille.dm
@@ -19,7 +19,6 @@
var/rods_type = /obj/item/stack/rods
var/rods_amount = 2
var/rods_broken = TRUE
- rad_flags = RAD_PROTECT_CONTENTS | RAD_NO_CONTAMINATE
FASTDMM_PROP(\
pipe_astar_cost = 1\
)
diff --git a/code/game/objects/structures/holosign.dm b/code/game/objects/structures/holosign.dm
index afa56ecde9fbf..de43b1a8ca7dd 100644
--- a/code/game/objects/structures/holosign.dm
+++ b/code/game/objects/structures/holosign.dm
@@ -82,8 +82,6 @@
/obj/structure/holosign/barrier/engineering
icon_state = "holosign_engi"
- rad_flags = RAD_PROTECT_CONTENTS | RAD_NO_CONTAMINATE
- rad_insulation = RAD_LIGHT_INSULATION
/obj/structure/holosign/barrier/atmos
name = "holofirelock"
@@ -93,8 +91,6 @@
anchored = TRUE
CanAtmosPass = ATMOS_PASS_NO
alpha = 150
- rad_flags = RAD_PROTECT_CONTENTS | RAD_NO_CONTAMINATE
- rad_insulation = RAD_LIGHT_INSULATION
/obj/structure/holosign/barrier/atmos/robust
name = "holo blast door"
diff --git a/code/game/objects/structures/mineral_doors.dm b/code/game/objects/structures/mineral_doors.dm
index c7f1eacf3dc4d..9f7e762b252e5 100644
--- a/code/game/objects/structures/mineral_doors.dm
+++ b/code/game/objects/structures/mineral_doors.dm
@@ -13,8 +13,6 @@
max_integrity = 200
armor = list(MELEE = 10, BULLET = 0, LASER = 0, ENERGY = 100, BOMB = 10, BIO = 100, FIRE = 50, ACID = 50, STAMINA = 0, BLEED = 0)
CanAtmosPass = ATMOS_PASS_DENSITY
- rad_flags = RAD_PROTECT_CONTENTS | RAD_NO_CONTAMINATE
- rad_insulation = RAD_MEDIUM_INSULATION
var/door_opened = FALSE //if it's open or not.
var/isSwitchingStates = FALSE //don't try to change stats if we're already opening
diff --git a/code/game/objects/structures/shower.dm b/code/game/objects/structures/shower.dm
index 63fb24346264a..9d512e12e576c 100644
--- a/code/game/objects/structures/shower.dm
+++ b/code/game/objects/structures/shower.dm
@@ -133,8 +133,7 @@
INVOKE_ASYNC(src, PROC_REF(wash_atom), AM)
/obj/machinery/shower/proc/wash_atom(atom/A)
- A.wash(CLEAN_RAD | CLEAN_TYPE_WEAK) // Clean radiation non-instantly
- A.wash(CLEAN_WASH)
+ A.wash(CLEAN_RAD | CLEAN_WASH)
SEND_SIGNAL(A, COMSIG_ADD_MOOD_EVENT, "shower", /datum/mood_event/nice_shower)
reagents.reaction(A, TOUCH, reaction_volume)
diff --git a/code/game/objects/structures/signs/_signs.dm b/code/game/objects/structures/signs/_signs.dm
index 43d3d6adec9d7..c26461d991570 100644
--- a/code/game/objects/structures/signs/_signs.dm
+++ b/code/game/objects/structures/signs/_signs.dm
@@ -7,7 +7,6 @@
max_integrity = 100
armor = list(MELEE = 50, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, FIRE = 50, ACID = 50, STAMINA = 0, BLEED = 0)
var/buildable_sign = 1 //unwrenchable and modifiable
- rad_flags = RAD_PROTECT_CONTENTS | RAD_NO_CONTAMINATE
/obj/structure/sign/basic
name = "blank sign"
diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm
index badcea1ce0b35..164cc76c37723 100644
--- a/code/game/objects/structures/window.dm
+++ b/code/game/objects/structures/window.dm
@@ -12,8 +12,6 @@
resistance_flags = ACID_PROOF
armor = list(MELEE = 0, BULLET = 0, LASER = 0, ENERGY = 0, BOMB = 0, BIO = 0, FIRE = 80, ACID = 100, STAMINA = 0, BLEED = 0)
CanAtmosPass = ATMOS_PASS_PROC
- rad_insulation = RAD_VERY_LIGHT_INSULATION
- rad_flags = RAD_PROTECT_CONTENTS
pass_flags_self = PASSTRANSPARENT
z_flags = Z_BLOCK_IN_DOWN | Z_BLOCK_IN_UP
var/ini_dir = null
diff --git a/code/game/turfs/closed/_closed.dm b/code/game/turfs/closed/_closed.dm
index 739d65c64f941..1851f7e011fa5 100644
--- a/code/game/turfs/closed/_closed.dm
+++ b/code/game/turfs/closed/_closed.dm
@@ -3,8 +3,6 @@
opacity = TRUE
density = TRUE
init_air = FALSE
- rad_flags = RAD_PROTECT_CONTENTS | RAD_NO_CONTAMINATE
- rad_insulation = RAD_MEDIUM_INSULATION
pass_flags_self = PASSCLOSEDTURF
/turf/closed/Initialize(mapload)
diff --git a/code/game/turfs/closed/wall/mineral_walls.dm b/code/game/turfs/closed/wall/mineral_walls.dm
index 6dcd409cc3e94..c032ac07b5926 100644
--- a/code/game/turfs/closed/wall/mineral_walls.dm
+++ b/code/game/turfs/closed/wall/mineral_walls.dm
@@ -110,7 +110,7 @@
if(!active)
if(world.time > last_event+15)
active = 1
- radiation_pulse(src, 40)
+ radiation_pulse(src, max_range = 3, threshold = RAD_LIGHT_INSULATION, chance = URANIUM_IRRADIATION_CHANCE, minimum_exposure_time = URANIUM_RADIATION_MINIMUM_EXPOSURE_TIME)
for(var/turf/closed/wall/mineral/uranium/T in (RANGE_TURFS(1,src)-src))
T.radiate()
last_event = world.time
diff --git a/code/game/turfs/open/_open.dm b/code/game/turfs/open/_open.dm
index 9f33454d776b7..6978a63ddabc5 100644
--- a/code/game/turfs/open/_open.dm
+++ b/code/game/turfs/open/_open.dm
@@ -278,14 +278,6 @@
/turf/open/proc/ClearWet()//Nuclear option of immediately removing slipperyness from the tile instead of the natural drying over time
qdel(GetComponent(/datum/component/wet_floor))
-/turf/open/rad_act(pulse_strength)
- . = ..()
- if (air.get_moles(GAS_CO2) && air.get_moles(GAS_O2))
- pulse_strength = min(pulse_strength,air.get_moles(GAS_CO2)*1000,air.get_moles(GAS_O2)*2000) //Ensures matter is conserved properly
- air.set_moles(GAS_CO2, max(air.get_moles(GAS_CO2)-(pulse_strength/1000),0))
- air.set_moles(GAS_O2, max(air.get_moles(GAS_O2)-(pulse_strength/2000),0))
- air.adjust_moles(GAS_PLUOXIUM, pulse_strength/4000)
-
/turf/open/proc/break_tile(force, allow_base)
LAZYINITLIST(damage_overlays)
var/list/options = list()
diff --git a/code/game/turfs/open/floor/mineral_floor.dm b/code/game/turfs/open/floor/mineral_floor.dm
index 99d133c7ed1f8..d5fdd018e40d0 100644
--- a/code/game/turfs/open/floor/mineral_floor.dm
+++ b/code/game/turfs/open/floor/mineral_floor.dm
@@ -278,7 +278,7 @@
if(!active)
if(world.time > last_event+15)
active = 1
- radiation_pulse(src, 10)
+ radiation_pulse(src, max_range = 1, threshold = RAD_VERY_LIGHT_INSULATION, chance = (URANIUM_IRRADIATION_CHANCE / 3), minimum_exposure_time = URANIUM_RADIATION_MINIMUM_EXPOSURE_TIME)
for(var/turf/open/floor/mineral/uranium/T in (RANGE_TURFS(1,src)-src))
T.radiate()
last_event = world.time
diff --git a/code/modules/atmospherics/gasmixtures/reactions.dm b/code/modules/atmospherics/gasmixtures/reactions.dm
index 23e7c52f50a80..16ef2b0df09f8 100644
--- a/code/modules/atmospherics/gasmixtures/reactions.dm
+++ b/code/modules/atmospherics/gasmixtures/reactions.dm
@@ -143,7 +143,7 @@
/proc/radiation_burn(turf/open/location, energy_released)
if(istype(location) && prob(10))
- radiation_pulse(location, energy_released/TRITIUM_BURN_RADIOACTIVITY_FACTOR)
+ radiation_pulse(location, max_range = energy_released/TRITIUM_BURN_RADIOACTIVITY_FACTOR, threshold = RAD_MEDIUM_INSULATION, chance = (DEFAULT_RADIATION_CHANCE / 3))
/datum/gas_reaction/tritfire/react(datum/gas_mixture/air, datum/holder)
var/energy_released = 0
@@ -167,7 +167,7 @@
if(burned_fuel)
energy_released += (FIRE_HYDROGEN_ENERGY_RELEASED * burned_fuel)
if(location && prob(10) && burned_fuel > TRITIUM_MINIMUM_RADIATION_ENERGY) //woah there let's not crash the server
- radiation_pulse(location, energy_released/TRITIUM_BURN_RADIOACTIVITY_FACTOR)
+ radiation_burn(location, energy_released/TRITIUM_BURN_RADIOACTIVITY_FACTOR)
//oxygen+more-or-less hydrogen=H2O
air.adjust_moles(GAS_H2O, burned_fuel )// Yogs -- Conservation of Mass
@@ -426,7 +426,7 @@
var/standard_energy = 400 * air.get_moles(GAS_PLASMA) * air.return_temperature() //Prevents putting meaningless waste gases to achieve high rads.
if(prob(PERCENT(((PARTICLE_CHANCE_CONSTANT)/(reaction_energy-PARTICLE_CHANCE_CONSTANT)) + 1))) //Asymptopically approaches 100% as the energy of the reaction goes up.
location.fire_nuclear_particle(customize = TRUE, custompower = standard_energy)
- radiation_pulse(location, max(2000 * 3 ** (log(10,standard_energy) - FUSION_RAD_MIDPOINT), 0))
+ radiation_burn(location, max(2000 * 3 ** (log(10,standard_energy) - FUSION_RAD_MIDPOINT), 0))
var/new_heat_capacity = air.heat_capacity()
if(new_heat_capacity > MINIMUM_HEAT_CAPACITY)
air.set_temperature(clamp(thermal_energy/new_heat_capacity, TCMB, INFINITY))
diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm
index 723509ef40772..9df32f00946a3 100644
--- a/code/modules/clothing/clothing.dm
+++ b/code/modules/clothing/clothing.dm
@@ -333,7 +333,7 @@
compare_to = thing
break
var/list/readout = list("PROTECTION CLASSES")
- if(armor.bio || armor.bomb || armor.bullet || armor.energy || armor.laser || armor.melee || armor.rad || armor.stamina || armor.bleed)
+ if(armor.bio || armor.bomb || armor.bullet || armor.energy || armor.laser || armor.melee || armor.stamina || armor.bleed)
readout += "
ARMOR (I-X)"
if(armor.bio || compare_to?.armor?.bio)
readout += "
TOXIN [armor_to_protection_class(armor.bio, compare_to?.armor?.bio)]"
@@ -347,8 +347,6 @@
readout += "
LASER [armor_to_protection_class(armor.laser, compare_to?.armor?.laser)]"
if(armor.melee || compare_to?.armor?.melee)
readout += "
MELEE [armor_to_protection_class(armor.melee, compare_to?.armor?.melee)]"
- if(armor.rad || compare_to?.armor?.rad)
- readout += "
RADIATION [armor_to_protection_class(armor.rad, compare_to?.armor?.rad)]"
if(armor.stamina || compare_to?.armor?.stamina)
readout += "
STAMINA [armor_to_protection_class(armor.stamina, compare_to?.armor?.stamina)]"
if(armor.bleed || compare_to?.armor?.bleed)
diff --git a/code/modules/clothing/glasses/engine_goggles.dm b/code/modules/clothing/glasses/engine_goggles.dm
index 35f4c2a09b928..f9e8a078c43c2 100644
--- a/code/modules/clothing/glasses/engine_goggles.dm
+++ b/code/modules/clothing/glasses/engine_goggles.dm
@@ -3,7 +3,6 @@
#define MODE_NONE ""
#define MODE_MESON "meson"
#define MODE_TRAY "t-ray"
-#define MODE_RAD "radiation"
#define MODE_SHUTTLE "shuttle"
/obj/item/clothing/glasses/meson/engine
@@ -18,7 +17,7 @@
lighting_alpha = null
invis_view = SEE_INVISIBLE_LIVING
- var/list/modes = list(MODE_NONE = MODE_MESON, MODE_MESON = MODE_TRAY, MODE_TRAY = MODE_RAD, MODE_RAD = MODE_NONE)
+ var/list/modes = list(MODE_NONE = MODE_MESON, MODE_MESON = MODE_TRAY, MODE_TRAY = MODE_NONE)
var/mode = MODE_NONE
var/range = 1
@@ -66,35 +65,9 @@
switch(mode)
if(MODE_TRAY)
t_ray_scan(user, 16, range)
- if(MODE_RAD)
- show_rads()
if(MODE_SHUTTLE)
show_shuttle()
-/obj/item/clothing/glasses/meson/engine/proc/show_rads()
- var/mob/living/carbon/human/user = loc
- var/list/rad_places = list()
- for(var/datum/component/radioactive/thing in SSradiation.processing)
- var/atom/owner = thing.parent
- var/turf/place = get_turf(owner)
- if(rad_places[place])
- rad_places[place] += thing.strength
- else
- rad_places[place] = thing.strength
-
- for(var/i in rad_places)
- var/turf/place = i
- if(get_dist(user, place) >= range*5) //Rads are easier to see than wires under the floor
- continue
- var/strength = round(rad_places[i] / 1000, 0.1)
- var/image/pic = image(loc = place)
- var/mutable_appearance/MA = new()
- MA.maptext = MAPTEXT("[strength]k")
- MA.color = "#04e66d"
- MA.plane = TEXT_EFFECT_PLANE
- pic.appearance = MA
- flick_overlay(pic, list(user.client), 10)
-
/obj/item/clothing/glasses/meson/engine/proc/show_shuttle()
var/mob/living/carbon/human/user = loc
var/obj/docking_port/mobile/port = SSshuttle.get_containing_shuttle(user)
@@ -145,5 +118,4 @@
#undef MODE_NONE
#undef MODE_MESON
#undef MODE_TRAY
-#undef MODE_RAD
#undef MODE_SHUTTLE
diff --git a/code/modules/clothing/suits/utility.dm b/code/modules/clothing/suits/utility.dm
index 3d4a536936264..55864ad770af7 100644
--- a/code/modules/clothing/suits/utility.dm
+++ b/code/modules/clothing/suits/utility.dm
@@ -137,7 +137,6 @@
strip_delay = 60
equip_delay_other = 60
flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH
- rad_flags = RAD_PROTECT_CONTENTS
/obj/item/clothing/suit/utility/radiation
name = "radiation suit"
@@ -155,7 +154,6 @@
strip_delay = 60
equip_delay_other = 60
flags_inv = HIDEJUMPSUIT
- rad_flags = RAD_PROTECT_CONTENTS
/obj/item/clothing/suit/utility/radiation/ComponentInitialize()
. = ..()
diff --git a/code/modules/mining/satchel_ore_box.dm b/code/modules/mining/satchel_ore_box.dm
index 1a74da52873b1..9d3636c7ce74d 100644
--- a/code/modules/mining/satchel_ore_box.dm
+++ b/code/modules/mining/satchel_ore_box.dm
@@ -26,10 +26,6 @@
else
return ..()
-/obj/structure/ore_box/ComponentInitialize()
- . = ..()
- AddComponent(/datum/component/rad_insulation, 0.01) //please datum mats no more cancer
-
/obj/structure/ore_box/crowbar_act(mob/living/user, obj/item/I)
if(I.use_tool(src, user, 50, volume=50))
user.visible_message("[user] pries \the [src] apart.",
diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm
index 090928d713575..ae1b2bbb5a53d 100644
--- a/code/modules/mob/living/carbon/human/human.dm
+++ b/code/modules/mob/living/carbon/human/human.dm
@@ -549,7 +549,6 @@
if(prob(current_size * 5) && hand.w_class >= ((11-current_size)/2) && dropItemToGround(hand))
step_towards(hand, src)
to_chat(src, "\The [S] pulls \the [hand] from your grip!")
- rad_act(current_size * 3)
/mob/living/carbon/human/proc/do_cpr(mob/living/carbon/C)
CHECK_DNA_AND_SPECIES(C)
diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm
index 71bb4a23a6177..faec4f53c0de8 100644
--- a/code/modules/mob/living/carbon/human/life.dm
+++ b/code/modules/mob/living/carbon/human/life.dm
@@ -72,10 +72,6 @@
SEND_SIGNAL(src, COMSIG_CLEAR_MOOD_EVENT, "brain_damage")
return ..()
-/mob/living/carbon/human/handle_mutations_and_radiation()
- if(!dna || !dna.species.handle_mutations_and_radiation(src))
- ..()
-
/mob/living/carbon/human/breathe()
if(!dna.species.breathe(src))
..()
diff --git a/code/modules/mob/living/silicon/silicon.dm b/code/modules/mob/living/silicon/silicon.dm
index c87e661c05e05..e9eb55093bc08 100644
--- a/code/modules/mob/living/silicon/silicon.dm
+++ b/code/modules/mob/living/silicon/silicon.dm
@@ -12,7 +12,6 @@
possible_a_intents = list(INTENT_HELP, INTENT_HARM)
mob_biotypes = list(MOB_ROBOTIC)
flags_1 = PREVENT_CONTENTS_EXPLOSION_1
- rad_flags = RAD_PROTECT_CONTENTS | RAD_NO_CONTAMINATE
deathsound = 'sound/voice/borg_deathsound.ogg'
speech_span = SPAN_ROBOT
var/datum/ai_laws/laws = null//Now... THEY ALL CAN ALL HAVE LAWS
diff --git a/code/modules/modular_computers/file_system/programs/phys_scanner.dm b/code/modules/modular_computers/file_system/programs/phys_scanner.dm
index d98c8d71917f8..4305332478cc5 100644
--- a/code/modules/modular_computers/file_system/programs/phys_scanner.dm
+++ b/code/modules/modular_computers/file_system/programs/phys_scanner.dm
@@ -24,8 +24,6 @@
reads += "Reagent"
if(mode_holder & DISK_MED)
reads += "Health"
- if(mode_holder & DISK_POWER)
- reads += "Radiation"
if(mode_holder & DISK_ATMOS)
reads += "Gas"
if(!length(reads))
@@ -64,16 +62,6 @@
user.visible_message("[user] analyzes [carbon]'s vitals.", "You analyze [carbon]'s vitals.")
last_record = healthscan(user, carbon, 1, to_chat = FALSE)
return FALSE
- if(DISK_POWER)
- var/mob/living/carbon/carbon = target
- if(istype(carbon))
- user.visible_message("[user] analyzes [carbon]'s radiation levels.", "You analyze [carbon]'s radiation levels.")
- last_record = "Analyzing Results for [carbon]:\n"
- if(carbon.radiation)
- last_record += "Radiation Level: [carbon.radiation]%"
- else
- last_record += "No radiation detected."
- return FALSE
return ..()
/datum/computer_file/program/phys_scanner/attack_obj(obj/target, mob/living/user)
@@ -98,8 +86,6 @@
current_mode = DISK_CHEM
if("Health")
current_mode = DISK_MED
- if("Radiation")
- current_mode = DISK_POWER
if("Gas")
current_mode = DISK_ATMOS
diff --git a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm
index c38ccc49a781d..2662845dc91bc 100644
--- a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm
@@ -56,7 +56,7 @@
M.reagents.remove_all_type(/datum/reagent/toxin, 5*REM, 0, 1)
M.setCloneLoss(0, 0)
M.setOxyLoss(0, 0)
- M.radiation = 0
+ qdel(M.GetComponent(/datum/component/irradiated))
M.heal_bodypart_damage(5,5)
M.adjustToxLoss(-5, 0, TRUE)
M.hallucination = 0
diff --git a/code/modules/recycling/disposal/pipe.dm b/code/modules/recycling/disposal/pipe.dm
index 24a9bfe49b3cf..581bf912c5915 100644
--- a/code/modules/recycling/disposal/pipe.dm
+++ b/code/modules/recycling/disposal/pipe.dm
@@ -11,7 +11,6 @@
max_integrity = 200
armor = list(MELEE = 25, BULLET = 10, LASER = 10, ENERGY = 100, BOMB = 0, BIO = 100, FIRE = 90, ACID = 30, STAMINA = 0, BLEED = 0)
layer = DISPOSAL_PIPE_LAYER // slightly lower than wires and other pipes
- rad_flags = RAD_PROTECT_CONTENTS | RAD_NO_CONTAMINATE
var/dpdir = NONE // bitmask of pipe directions
var/initialize_dirs = NONE // bitflags of pipe directions added on init, see \code\_DEFINES\pipe_construction.dm
var/flip_type // If set, the pipe is flippable and becomes this type when flipped