mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-21 03:56:47 +01:00
Radiation Refactor (#19270)
* Part 1 * WIP * The rest of these * More stuff * Whoops, did that wrong * typo * gweeen * This all works * SHOWER * Rads * awa * rad * Update life.dm * edits * Makes lvl 3 rads give you a warning. You should already know by this point, but this makes it EXTRA clear you're getting fucked * Update vorestation.dme * aaa * propagate * gwah * more fixes * AAA * Update radiation.dm * Update radiation.dm * mobs rads * rads * fix this * Update _reagents.dm * these * Get rid of these * rad * Update config.txt * fixed * Update radiation_effects.dm
This commit is contained in:
@@ -23,10 +23,40 @@
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/decal/cleanable/greenglow
|
||||
var/last_event = 0
|
||||
/// Mutex to prevent infinite recursion when propagating radiation pulses
|
||||
var/active = null
|
||||
|
||||
/obj/effect/decal/cleanable/greenglow/Initialize(mapload, _age)
|
||||
. = ..()
|
||||
QDEL_IN(src, 2 MINUTES)
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/effect/decal/cleanable/greenglow/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
. = ..()
|
||||
|
||||
/obj/effect/decal/cleanable/greenglow/process()
|
||||
radiate()
|
||||
..()
|
||||
|
||||
/obj/effect/decal/cleanable/greenglow/proc/radiate()
|
||||
SIGNAL_HANDLER
|
||||
if(active)
|
||||
return
|
||||
if(world.time <= last_event + 1.5 SECONDS)
|
||||
return
|
||||
active = TRUE
|
||||
radiation_pulse(
|
||||
src,
|
||||
max_range = 5,
|
||||
threshold = RAD_LIGHT_INSULATION,
|
||||
chance = URANIUM_IRRADIATION_CHANCE,
|
||||
strength = 2
|
||||
)
|
||||
last_event = world.time
|
||||
active = FALSE
|
||||
|
||||
|
||||
/obj/effect/decal/cleanable/dirt
|
||||
name = "dirt"
|
||||
|
||||
@@ -2,7 +2,35 @@
|
||||
/obj/effect/map_effect/radiation_emitter
|
||||
name = "radiation emitter"
|
||||
icon_state = "radiation_emitter"
|
||||
var/range = 3
|
||||
var/radiation_power = 30 // Bigger numbers means more radiation.
|
||||
var/last_event = 0
|
||||
/// Mutex to prevent infinite recursion when propagating radiation pulses
|
||||
var/active = null
|
||||
var/strength = 50
|
||||
|
||||
/obj/effect/map_effect/radiation_emitter/process()
|
||||
radiate()
|
||||
..()
|
||||
|
||||
/obj/effect/map_effect/radiation_emitter/proc/radiate()
|
||||
SIGNAL_HANDLER
|
||||
if(active)
|
||||
return
|
||||
if(world.time <= last_event + 1.5 SECONDS)
|
||||
return
|
||||
active = TRUE
|
||||
radiation_pulse(
|
||||
src,
|
||||
max_range = range,
|
||||
threshold = RAD_LIGHT_INSULATION,
|
||||
chance = radiation_power,
|
||||
minimum_exposure_time = URANIUM_RADIATION_MINIMUM_EXPOSURE_TIME,
|
||||
strength = strength
|
||||
)
|
||||
last_event = world.time
|
||||
active = FALSE
|
||||
|
||||
|
||||
/obj/effect/map_effect/radiation_emitter/Initialize(mapload)
|
||||
START_PROCESSING(SSobj, src)
|
||||
@@ -12,8 +40,7 @@
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
/obj/effect/map_effect/radiation_emitter/process()
|
||||
SSradiation.radiate(src, radiation_power)
|
||||
|
||||
/obj/effect/map_effect/radiation_emitter/strong
|
||||
range = 7
|
||||
radiation_power = 100
|
||||
strength = 250
|
||||
|
||||
@@ -195,6 +195,7 @@
|
||||
syringe = null
|
||||
|
||||
/obj/structure/closet/body_bag/cryobag/Entered(atom/movable/AM)
|
||||
ADD_TRAIT(AM, TRAIT_STASIS, REF(src))
|
||||
if(ishuman(AM))
|
||||
var/mob/living/carbon/human/H = AM
|
||||
H.Stasis(stasis_level)
|
||||
@@ -209,6 +210,7 @@
|
||||
..()
|
||||
|
||||
/obj/structure/closet/body_bag/cryobag/Exited(atom/movable/AM)
|
||||
REMOVE_TRAIT(AM, TRAIT_STASIS, REF(src))
|
||||
if(ishuman(AM))
|
||||
var/mob/living/carbon/human/H = AM
|
||||
H.Stasis(0)
|
||||
|
||||
@@ -575,6 +575,9 @@
|
||||
/obj/item/shockpaddles/standalone
|
||||
desc = "A pair of shockpaddles powered by an experimental miniaturized reactor" //Inspired by the advanced e-gun
|
||||
var/fail_counter = 0
|
||||
var/last_event = 0
|
||||
/// Mutex to prevent infinite recursion when propagating radiation pulses
|
||||
var/active = null
|
||||
|
||||
/obj/item/shockpaddles/standalone/Destroy()
|
||||
. = ..()
|
||||
@@ -585,12 +588,25 @@
|
||||
return 1
|
||||
|
||||
/obj/item/shockpaddles/standalone/checked_use(var/charge_amt)
|
||||
SSradiation.radiate(src, charge_amt/12) //just a little bit of radiation. It's the price you pay for being powered by magic I guess
|
||||
radiation_pulse(
|
||||
src,
|
||||
max_range = 5,
|
||||
threshold = RAD_MEDIUM_INSULATION,
|
||||
chance = URANIUM_IRRADIATION_CHANCE,
|
||||
strength = 50
|
||||
)
|
||||
return 1
|
||||
|
||||
/obj/item/shockpaddles/standalone/process()
|
||||
if(fail_counter > 0)
|
||||
SSradiation.radiate(src, fail_counter--)
|
||||
radiation_pulse(
|
||||
src,
|
||||
max_range = 5,
|
||||
threshold = RAD_MEDIUM_INSULATION,
|
||||
chance = URANIUM_IRRADIATION_CHANCE,
|
||||
strength = 15
|
||||
)
|
||||
fail_counter--
|
||||
else
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
|
||||
|
||||
@@ -1,102 +1,136 @@
|
||||
//Geiger counter
|
||||
//Rewritten version of TG's geiger counter
|
||||
//I opted to show exact radiation levels
|
||||
|
||||
/obj/item/geiger
|
||||
name = "geiger counter"
|
||||
desc = "A handheld device used for detecting and measuring radiation in an area."
|
||||
icon = 'icons/obj/device.dmi'
|
||||
/obj/item/geiger //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."
|
||||
icon = 'icons/obj/devices/scanner.dmi'
|
||||
icon_state = "geiger_off"
|
||||
item_state = "multitool"
|
||||
item_icons = list(
|
||||
slot_l_hand_str = 'icons/mob/inhands/equipment/tools_lefthand.dmi',
|
||||
slot_r_hand_str = 'icons/mob/inhands/equipment/tools_righthand.dmi',
|
||||
)
|
||||
w_class = ITEMSIZE_SMALL
|
||||
var/scanning = 0
|
||||
var/radiation_count = 0
|
||||
var/datum/looping_sound/geiger/soundloop
|
||||
slot_flags = SLOT_BELT
|
||||
item_flags = NOBLUDGEON
|
||||
matter = list(/datum/material/steel = SHEET_MATERIAL_AMOUNT * 1.5, /datum/material/glass = SHEET_MATERIAL_AMOUNT * 1.5)
|
||||
|
||||
var/last_perceived_radiation_danger = null
|
||||
|
||||
var/scanning = FALSE
|
||||
|
||||
var/mounted = FALSE
|
||||
|
||||
pickup_sound = 'sound/items/pickup/device.ogg'
|
||||
drop_sound = 'sound/items/drop/device.ogg'
|
||||
|
||||
/obj/item/geiger/Initialize(mapload)
|
||||
soundloop = new(list(src), FALSE)
|
||||
return ..()
|
||||
. = ..()
|
||||
|
||||
/obj/item/geiger/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
QDEL_NULL(soundloop)
|
||||
return ..()
|
||||
|
||||
/obj/item/geiger/process()
|
||||
get_radiation()
|
||||
|
||||
/obj/item/geiger/proc/get_radiation()
|
||||
if(!scanning)
|
||||
return
|
||||
radiation_count = SSradiation.get_rads_at_turf(get_turf(src))
|
||||
update_icon()
|
||||
update_sound()
|
||||
RegisterSignal(src, COMSIG_IN_RANGE_OF_IRRADIATION, PROC_REF(on_pre_potential_irradiation))
|
||||
|
||||
/obj/item/geiger/examine(mob/user)
|
||||
. = ..()
|
||||
get_radiation()
|
||||
. += span_warning("[scanning ? "Ambient" : "Stored"] radiation level: [radiation_count ? radiation_count : "0"]Bq.")
|
||||
|
||||
/obj/item/geiger/rad_act(amount)
|
||||
if(!amount || !scanning)
|
||||
return FALSE
|
||||
|
||||
if(amount > radiation_count)
|
||||
radiation_count = amount
|
||||
|
||||
update_icon()
|
||||
update_sound()
|
||||
|
||||
/obj/item/geiger/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/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
if(mounted)
|
||||
return
|
||||
scanning = !scanning
|
||||
if(scanning)
|
||||
START_PROCESSING(SSobj, src)
|
||||
else
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
update_icon()
|
||||
update_sound()
|
||||
to_chat(user, span_notice("[icon2html(src, user.client)] You switch [scanning ? "on" : "off"] \the [src]."))
|
||||
. += span_info("Alt-click it to clear stored radiation levels.")
|
||||
switch(last_perceived_radiation_danger)
|
||||
if(null)
|
||||
. += span_notice("Ambient radiation level count reports that all is well.")
|
||||
if(PERCEIVED_RADIATION_DANGER_LOW)
|
||||
. += span_alert("Ambient radiation levels slightly above average.")
|
||||
if(PERCEIVED_RADIATION_DANGER_MEDIUM)
|
||||
. += span_warning("Ambient radiation levels above average.")
|
||||
if(PERCEIVED_RADIATION_DANGER_HIGH)
|
||||
. += span_danger("Ambient radiation levels highly above average.")
|
||||
if(PERCEIVED_RADIATION_DANGER_EXTREME)
|
||||
. += span_suicide("Ambient radiation levels reaching critical level!")
|
||||
|
||||
/obj/item/geiger/update_icon()
|
||||
if(!scanning)
|
||||
icon_state = "geiger_off"
|
||||
return 1
|
||||
return ..()
|
||||
|
||||
switch(radiation_count)
|
||||
switch(last_perceived_radiation_danger)
|
||||
if(null)
|
||||
icon_state = "geiger_on_1"
|
||||
if(-INFINITY to RAD_LEVEL_LOW)
|
||||
icon_state = "geiger_on_1"
|
||||
if(RAD_LEVEL_LOW to RAD_LEVEL_MODERATE)
|
||||
if(PERCEIVED_RADIATION_DANGER_LOW)
|
||||
icon_state = "geiger_on_2"
|
||||
if(RAD_LEVEL_MODERATE to RAD_LEVEL_HIGH)
|
||||
if(PERCEIVED_RADIATION_DANGER_MEDIUM)
|
||||
icon_state = "geiger_on_3"
|
||||
if(RAD_LEVEL_HIGH to RAD_LEVEL_VERY_HIGH)
|
||||
if(PERCEIVED_RADIATION_DANGER_HIGH)
|
||||
icon_state = "geiger_on_4"
|
||||
if(RAD_LEVEL_VERY_HIGH to INFINITY)
|
||||
if(PERCEIVED_RADIATION_DANGER_EXTREME)
|
||||
icon_state = "geiger_on_5"
|
||||
return ..()
|
||||
|
||||
///////////////////////
|
||||
/obj/item/geiger/attack_self(mob/user)
|
||||
. = ..()
|
||||
if(.)
|
||||
return TRUE
|
||||
scanning = !scanning
|
||||
|
||||
if (scanning)
|
||||
AddComponent(/datum/component/geiger_sound)
|
||||
else
|
||||
qdel(GetComponent(/datum/component/geiger_sound))
|
||||
|
||||
update_icon()
|
||||
balloon_alert(user, "switch [scanning ? "on" : "off"]")
|
||||
|
||||
/obj/item/geiger/afterattack(atom/interacting_with, mob/user, proximity_flag, click_parameters)
|
||||
. = ..()
|
||||
if(SHOULD_SKIP_INTERACTION(interacting_with, src, user))
|
||||
return NONE
|
||||
return attack_at_range(interacting_with, user, proximity_flag, click_parameters)
|
||||
|
||||
/obj/item/geiger/proc/attack_at_range(atom/interacting_with, mob/living/user, proximity_flag, click_parameters) //This is ranged_interact_with_atom on TG but we don't have that yet.
|
||||
if(!CAN_IRRADIATE(interacting_with))
|
||||
return NONE
|
||||
|
||||
user.visible_message(span_notice("[user] scans [interacting_with] with [src]."), span_notice("You scan [interacting_with]'s radiation levels with [src]..."))
|
||||
addtimer(CALLBACK(src, PROC_REF(scan), interacting_with, user), 20, TIMER_UNIQUE) // Let's not have spamming GetAllContents
|
||||
return ITEM_INTERACT_SUCCESS
|
||||
|
||||
/obj/item/geiger/equipped(mob/user, slot, initial)
|
||||
. = ..()
|
||||
|
||||
RegisterSignal(user, COMSIG_IN_RANGE_OF_IRRADIATION, PROC_REF(on_pre_potential_irradiation))
|
||||
|
||||
/obj/item/geiger/dropped(mob/user, silent = FALSE)
|
||||
. = ..()
|
||||
|
||||
UnregisterSignal(user, COMSIG_IN_RANGE_OF_IRRADIATION)
|
||||
|
||||
/obj/item/geiger/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()
|
||||
|
||||
/obj/item/geiger/proc/reset_perceived_danger()
|
||||
last_perceived_radiation_danger = null
|
||||
if (scanning)
|
||||
update_icon()
|
||||
|
||||
/obj/item/geiger/proc/scan(atom/target, mob/user)
|
||||
if (SEND_SIGNAL(target, COMSIG_GEIGER_COUNTER_SCAN, user, src) & COMSIG_GEIGER_COUNTER_SCAN_SUCCESSFUL)
|
||||
return
|
||||
|
||||
if(isliving(target))
|
||||
var/mob/living/living_target = target
|
||||
if(living_target.radiation)
|
||||
to_chat(user, span_notice("[icon2html(src, user)] [living_target] is reporting a radiation level of [living_target.radiation]."))
|
||||
return
|
||||
|
||||
to_chat(user, span_notice("[icon2html(src, user)] [isliving(target) ? "Subject" : "Target"] is free of radioactive contamination."))
|
||||
|
||||
/obj/item/geiger/click_alt(mob/living/user)
|
||||
if(!scanning)
|
||||
to_chat(user, span_warning("[src] must be on to reset its radiation level!"))
|
||||
return CLICK_ACTION_BLOCKING
|
||||
to_chat(user, span_notice("You flush [src]'s radiation counts, resetting it to normal."))
|
||||
last_perceived_radiation_danger = null
|
||||
update_icon()
|
||||
return CLICK_ACTION_SUCCESS
|
||||
|
||||
/obj/item/geiger/wall
|
||||
name = "mounted geiger counter"
|
||||
@@ -105,8 +139,7 @@
|
||||
icon_state = "geiger_wall"
|
||||
item_state = "geiger_wall"
|
||||
anchored = TRUE
|
||||
scanning = 1
|
||||
radiation_count = 0
|
||||
scanning = TRUE
|
||||
plane = TURF_PLANE
|
||||
layer = ABOVE_TURF_LAYER
|
||||
w_class = ITEMSIZE_LARGE
|
||||
@@ -118,41 +151,25 @@
|
||||
mounted = TRUE
|
||||
|
||||
/obj/item/geiger/wall/Initialize(mapload)
|
||||
START_PROCESSING(SSobj, src)
|
||||
soundloop = new(list(src), FALSE)
|
||||
return ..()
|
||||
. = ..()
|
||||
if(scanning)
|
||||
AddComponent(/datum/component/geiger_sound)
|
||||
|
||||
/obj/item/geiger/wall/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
QDEL_NULL(soundloop)
|
||||
return ..()
|
||||
|
||||
/obj/item/geiger/wall/attack_self(mob/user)
|
||||
. = ..(user)
|
||||
if(.)
|
||||
return TRUE
|
||||
scanning = !scanning
|
||||
update_icon()
|
||||
update_sound()
|
||||
to_chat(user, span_notice("[icon2html(src, user.client)] You switch [scanning ? "on" : "off"] \the [src]."))
|
||||
|
||||
/obj/item/geiger/wall/update_icon()
|
||||
if(!scanning)
|
||||
icon_state = "geiger_wall-p"
|
||||
return 1
|
||||
|
||||
switch(radiation_count)
|
||||
switch(last_perceived_radiation_danger)
|
||||
if(null)
|
||||
icon_state = "geiger_level_1"
|
||||
if(-INFINITY to RAD_LEVEL_LOW)
|
||||
icon_state = "geiger_level_1"
|
||||
if(RAD_LEVEL_LOW to RAD_LEVEL_MODERATE)
|
||||
if(PERCEIVED_RADIATION_DANGER_LOW)
|
||||
icon_state = "geiger_level_2"
|
||||
if(RAD_LEVEL_MODERATE to RAD_LEVEL_HIGH)
|
||||
if(PERCEIVED_RADIATION_DANGER_MEDIUM)
|
||||
icon_state = "geiger_level_3"
|
||||
if(RAD_LEVEL_HIGH to RAD_LEVEL_VERY_HIGH)
|
||||
if(PERCEIVED_RADIATION_DANGER_HIGH)
|
||||
icon_state = "geiger_level_4"
|
||||
if(RAD_LEVEL_VERY_HIGH to INFINITY)
|
||||
if(PERCEIVED_RADIATION_DANGER_EXTREME)
|
||||
icon_state = "geiger_level_5"
|
||||
|
||||
/obj/item/geiger/wall/attack_ai(mob/user as mob)
|
||||
|
||||
@@ -27,18 +27,58 @@
|
||||
name = "misshapen manhole cover"
|
||||
desc = "The top of this twisted chunk of metal is faintly stamped with a five pointed star. 'Property of US Army, Pascal B - 1957'."
|
||||
catalogue_data = list(/datum/category_item/catalogue/information/objects/pascalb)
|
||||
var/last_event = 0
|
||||
/// Mutex to prevent infinite recursion when propagating radiation pulses
|
||||
var/active = null
|
||||
|
||||
/obj/item/poi/pascalb/Initialize(mapload)
|
||||
. = ..()
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/poi/pascalb/process()
|
||||
SSradiation.radiate(src, 5)
|
||||
radiate()
|
||||
..()
|
||||
|
||||
/obj/item/poi/pascalb/proc/radiate()
|
||||
SIGNAL_HANDLER
|
||||
if(active)
|
||||
return
|
||||
if(world.time <= last_event + 1.5 SECONDS)
|
||||
return
|
||||
active = TRUE
|
||||
radiation_pulse(
|
||||
src,
|
||||
max_range = 3,
|
||||
threshold = RAD_MEDIUM_INSULATION,
|
||||
chance = URANIUM_IRRADIATION_CHANCE,
|
||||
minimum_exposure_time = URANIUM_RADIATION_MINIMUM_EXPOSURE_TIME,
|
||||
strength = 25
|
||||
)
|
||||
last_event = world.time
|
||||
active = FALSE
|
||||
|
||||
/obj/item/poi/pascalb/Destroy()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
/obj/item/poi/pascalb/deadly //For testing purposes, mainly.
|
||||
|
||||
/obj/item/poi/pascalb/deadly/radiate()
|
||||
if(active)
|
||||
return
|
||||
if(world.time <= last_event + 1.5 SECONDS)
|
||||
return
|
||||
active = TRUE
|
||||
radiation_pulse(
|
||||
src,
|
||||
max_range = 3,
|
||||
threshold = RAD_MEDIUM_INSULATION,
|
||||
chance = 100,
|
||||
strength = 250
|
||||
)
|
||||
last_event = world.time
|
||||
active = FALSE
|
||||
|
||||
/datum/category_item/catalogue/information/objects/oldreactor
|
||||
name = "Object - Zorren Fission Reactor Rack"
|
||||
desc = "Prior to Humanity's arrival in the virgo-erigone space, introducing advanced phoron technologies, \
|
||||
@@ -78,15 +118,38 @@
|
||||
name = "ruptured fission reactor rack"
|
||||
desc = "This broken hunk of machinery looks extremely dangerous."
|
||||
catalogue_data = list(/datum/category_item/catalogue/information/objects/oldreactor)
|
||||
var/last_event = 0
|
||||
/// Mutex to prevent infinite recursion when propagating radiation pulses
|
||||
var/active = null
|
||||
|
||||
/obj/item/poi/brokenoldreactor/Initialize(mapload)
|
||||
. = ..()
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/item/poi/brokenoldreactor/process()
|
||||
SSradiation.radiate(src, 25)
|
||||
radiate()
|
||||
..()
|
||||
|
||||
/obj/item/poi/brokenoldreactor/proc/radiate()
|
||||
SIGNAL_HANDLER
|
||||
if(active)
|
||||
return
|
||||
if(world.time <= last_event + 1.5 SECONDS)
|
||||
return
|
||||
active = TRUE
|
||||
radiation_pulse(
|
||||
src,
|
||||
max_range = 5,
|
||||
threshold = RAD_MEDIUM_INSULATION,
|
||||
chance = URANIUM_IRRADIATION_CHANCE,
|
||||
minimum_exposure_time = URANIUM_RADIATION_MINIMUM_EXPOSURE_TIME,
|
||||
strength = 50
|
||||
)
|
||||
last_event = world.time
|
||||
active = FALSE
|
||||
|
||||
/obj/item/poi/brokenoldreactor/Destroy()
|
||||
UnregisterSignal(src, COMSIG_ATOM_PROPAGATE_RAD_PULSE)
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
|
||||
@@ -1100,9 +1100,13 @@ CIGARETTE PACKETS ARE IN FANCY.DM
|
||||
user.drop_from_inventory(e)
|
||||
log_and_message_admins("[user] dusted themselves and caused massive radiation with [src]!",user)
|
||||
user.dust()
|
||||
var/rads = 500
|
||||
SSradiation.radiate(src, rads)
|
||||
|
||||
radiation_pulse(
|
||||
src,
|
||||
max_range = 12,
|
||||
threshold = RAD_HEAVY_INSULATION,
|
||||
chance = URANIUM_IRRADIATION_CHANCE * 2,
|
||||
strength = 300
|
||||
)
|
||||
set_light(5)
|
||||
START_PROCESSING(SSobj, src)
|
||||
else
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
var/upgrading = FALSE
|
||||
var/applies_material_colour = 1
|
||||
var/wall_type = /turf/simulated/wall
|
||||
rad_insulation = RAD_VERY_LIGHT_INSULATION
|
||||
|
||||
/obj/structure/girder/Initialize(mapload, var/material_key)
|
||||
. = ..()
|
||||
@@ -42,9 +43,16 @@
|
||||
/obj/structure/girder/proc/radiate()
|
||||
var/total_radiation = girder_material.radioactivity + (reinf_material ? reinf_material.radioactivity / 2 : 0)
|
||||
if(!total_radiation)
|
||||
return
|
||||
return FALSE
|
||||
|
||||
SSradiation.radiate(src, total_radiation)
|
||||
radiation_pulse(
|
||||
src,
|
||||
max_range = 5,
|
||||
threshold = RAD_MEDIUM_INSULATION,
|
||||
chance = URANIUM_IRRADIATION_CHANCE,
|
||||
minimum_exposure_time = URANIUM_RADIATION_MINIMUM_EXPOSURE_TIME,
|
||||
strength = total_radiation
|
||||
)
|
||||
return total_radiation
|
||||
|
||||
|
||||
|
||||
@@ -59,6 +59,7 @@
|
||||
density = FALSE
|
||||
layer = ABOVE_TURF_LAYER
|
||||
can_atmos_pass = ATMOS_PASS_NO
|
||||
rad_insulation = RAD_LIGHT_INSULATION
|
||||
alpha = 150
|
||||
|
||||
/obj/structure/holosign/barrier/combifan/Destroy()
|
||||
@@ -75,6 +76,7 @@
|
||||
icon_state = "holo_medical"
|
||||
alpha = 125
|
||||
var/buzzed = 0
|
||||
rad_insulation = RAD_NO_INSULATION
|
||||
|
||||
/obj/structure/holosign/barrier/medical/CanPass(atom/movable/mover, border_dir)
|
||||
. = ..()
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
var/can_pick = TRUE //can it be picked/bypassed?
|
||||
var/lock_difficulty = 1 //multiplier to picking/bypassing time
|
||||
var/keysound = 'sound/items/toolbelt_equip.ogg'
|
||||
rad_insulation = RAD_MEDIUM_INSULATION
|
||||
|
||||
/obj/structure/simple_door/fire_act(datum/gas_mixture/air, exposed_temperature, exposed_volume)
|
||||
TemperatureAct(exposed_temperature)
|
||||
@@ -240,19 +241,57 @@
|
||||
/obj/structure/simple_door/process()
|
||||
if(!material.radioactivity)
|
||||
return
|
||||
SSradiation.radiate(src, round(material.radioactivity/3))
|
||||
radiation_pulse(
|
||||
src,
|
||||
max_range = 5,
|
||||
threshold = RAD_MEDIUM_INSULATION,
|
||||
chance = round((material.radioactivity * 0.33), 0.1),
|
||||
minimum_exposure_time = URANIUM_RADIATION_MINIMUM_EXPOSURE_TIME,
|
||||
strength = material.radioactivity
|
||||
)
|
||||
|
||||
/obj/structure/simple_door/iron/Initialize(mapload,var/material_name)
|
||||
. = ..(mapload, material_name || MAT_IRON)
|
||||
|
||||
/obj/structure/simple_door/silver
|
||||
rad_insulation = RAD_HEAVY_INSULATION
|
||||
|
||||
/obj/structure/simple_door/silver/Initialize(mapload,var/material_name)
|
||||
. = ..(mapload, material_name || MAT_SILVER)
|
||||
|
||||
/obj/structure/simple_door/gold
|
||||
rad_insulation = RAD_HEAVY_INSULATION
|
||||
|
||||
/obj/structure/simple_door/gold/Initialize(mapload,var/material_name)
|
||||
. = ..(mapload, material_name || MAT_GOLD)
|
||||
|
||||
/obj/structure/simple_door/uranium
|
||||
rad_insulation = RAD_NO_INSULATION
|
||||
var/last_event = 0
|
||||
/// Mutex to prevent infinite recursion when propagating radiation pulses
|
||||
var/active = null
|
||||
|
||||
/obj/structure/simple_door/uranium/Initialize(mapload,var/material_name)
|
||||
. = ..(mapload, material_name || MAT_URANIUM)
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
/obj/structure/simple_door/uranium/proc/radiate()
|
||||
SIGNAL_HANDLER
|
||||
if(active)
|
||||
return
|
||||
if(world.time <= last_event + 1.5 SECONDS)
|
||||
return
|
||||
active = TRUE
|
||||
radiation_pulse(
|
||||
src,
|
||||
max_range = 3,
|
||||
threshold = RAD_LIGHT_INSULATION,
|
||||
chance = URANIUM_IRRADIATION_CHANCE,
|
||||
minimum_exposure_time = URANIUM_RADIATION_MINIMUM_EXPOSURE_TIME,
|
||||
strength = 5
|
||||
)
|
||||
last_event = world.time
|
||||
active = FALSE
|
||||
|
||||
/obj/structure/simple_door/sandstone/Initialize(mapload,var/material_name)
|
||||
. = ..(mapload, material_name || MAT_SANDSTONE)
|
||||
@@ -260,9 +299,13 @@
|
||||
/obj/structure/simple_door/phoron/Initialize(mapload,var/material_name)
|
||||
. = ..(mapload, material_name || MAT_PHORON)
|
||||
|
||||
/obj/structure/simple_door/diamond
|
||||
rad_insulation = RAD_EXTREME_INSULATION
|
||||
|
||||
/obj/structure/simple_door/diamond/Initialize(mapload,var/material_name)
|
||||
. = ..(mapload, material_name || MAT_DIAMOND)
|
||||
|
||||
//I was going to give wooden doors RAD_VERY_LIGHT_INSULATION but they need a proper parent instead of this garbage.
|
||||
/obj/structure/simple_door/wood/Initialize(mapload,var/material_name)
|
||||
. = ..(mapload, material_name || MAT_WOOD)
|
||||
knock_sound = 'sound/machines/door/knock_wood.wav'
|
||||
|
||||
@@ -261,10 +261,8 @@
|
||||
|
||||
//Yes, showers are super powerful as far as washing goes.
|
||||
/obj/machinery/shower/proc/wash_atom(atom/A)
|
||||
/* //TG cleans rads and only does CLEAN_WASH, not sure if that's wanted here.
|
||||
A.wash(CLEAN_RAD | CLEAN_TYPE_WEAK) // Clean radiation non-instantly
|
||||
A.wash(CLEAN_WASH)
|
||||
*/
|
||||
A.wash(CLEAN_SCRUB)
|
||||
reagents.splash(A, reaction_volume / 20, 1, TRUE, min_spill = 0, max_spill = 0) //Reaction volume needs to be divided by 20 due to a larger internal volume
|
||||
|
||||
@@ -274,6 +272,7 @@
|
||||
check_heat(L)
|
||||
L.extinguish_mob()
|
||||
L.adjust_fire_stacks(-20) //Douse ourselves with water to avoid fire more easily
|
||||
L.radiation = CLAMP(L.radiation - 5, 0, RADIATION_CAP)
|
||||
|
||||
if(!iscarbon(A))
|
||||
return
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
var/glasstype = null // Set this in subtypes. Null is assumed strange or otherwise impossible to dismantle, such as for shuttle glass.
|
||||
var/silicate = 0 // number of units of silicate
|
||||
var/fulltile = FALSE // Set to true on full-tile variants.
|
||||
rad_insulation = RAD_VERY_LIGHT_INSULATION //Windows can have multiple placed on one tile, meaning you have to account for the potential that someone could just build a bunch of windows on one tile to prevent rads entirely.
|
||||
|
||||
/obj/structure/window/examine(mob/user)
|
||||
. = ..()
|
||||
@@ -514,6 +515,7 @@
|
||||
maxhealth = 80
|
||||
fulltile = TRUE
|
||||
flags = NONE
|
||||
rad_insulation = RAD_LIGHT_INSULATION
|
||||
|
||||
/obj/structure/window/phoronreinforced
|
||||
name = "reinforced borosilicate window"
|
||||
@@ -527,12 +529,14 @@
|
||||
damage_per_fire_tick = 1.0 // This should last for 80 fire ticks if the window is not damaged at all. The idea is that borosilicate windows have something like ablative layer that protects them for a while.
|
||||
maxhealth = 80.0
|
||||
force_threshold = 10
|
||||
rad_insulation = RAD_LIGHT_INSULATION
|
||||
|
||||
/obj/structure/window/phoronreinforced/full
|
||||
icon_state = "phoronrwindow-full"
|
||||
maxhealth = 160
|
||||
fulltile = TRUE
|
||||
flags = NONE
|
||||
rad_insulation = RAD_MEDIUM_INSULATION
|
||||
|
||||
/obj/structure/window/reinforced
|
||||
name = "reinforced window"
|
||||
@@ -578,6 +582,7 @@
|
||||
basestate = "w"
|
||||
dir = 5
|
||||
force_threshold = 7
|
||||
rad_insulation = RAD_MEDIUM_INSULATION
|
||||
|
||||
/obj/structure/window/reinforced/polarized
|
||||
name = "electrochromic window"
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
damage_per_fire_tick = 1.0
|
||||
maxhealth = 100.0
|
||||
force_threshold = 10
|
||||
rad_insulation = RAD_EXTREME_INSULATION
|
||||
|
||||
/obj/structure/window/titanium/full
|
||||
icon_state = "window-full"
|
||||
@@ -30,6 +31,7 @@
|
||||
damage_per_fire_tick = 1.0
|
||||
maxhealth = 120.0
|
||||
force_threshold = 10
|
||||
rad_insulation = RAD_EXTREME_INSULATION
|
||||
|
||||
/obj/structure/window/plastitanium/full
|
||||
icon_state = "window-full"
|
||||
|
||||
Reference in New Issue
Block a user