diff --git a/_maps/map_files/BoxStation/BoxStation.dmm b/_maps/map_files/BoxStation/BoxStation.dmm index c1fe8ff733..0c890e8c8e 100644 --- a/_maps/map_files/BoxStation/BoxStation.dmm +++ b/_maps/map_files/BoxStation/BoxStation.dmm @@ -56995,25 +56995,30 @@ /turf/open/floor/plating, /area/engine/supermatter) "cEu" = ( -/obj/machinery/power/rad_collector/anchored, -/obj/structure/cable/yellow{ - d2 = 8; - icon_state = "0-8" - }, /obj/machinery/camera{ c_tag = "Supermatter Chamber"; dir = 2; network = list("Engine"); pixel_x = 23 }, +/obj/structure/cable/yellow{ + d1 = 4; + d2 = 8; + icon_state = "4-8" + }, /turf/open/floor/engine, /area/engine/supermatter) "cEv" = ( -/obj/effect/spawner/structure/window/plasma/reinforced, /obj/machinery/atmospherics/pipe/manifold/general/visible{ dir = 8 }, -/turf/open/floor/plating, +/obj/structure/window/plasma/reinforced/spawner/east, +/obj/machinery/power/rad_collector/anchored, +/obj/structure/cable/yellow{ + d2 = 8; + icon_state = "0-8" + }, +/turf/open/floor/engine, /area/engine/supermatter) "cEw" = ( /obj/machinery/atmospherics/components/unary/vent_scrubber/on{ @@ -57028,13 +57033,10 @@ /turf/open/floor/engine, /area/engine/supermatter) "cEy" = ( -/obj/effect/spawner/structure/window/plasma/reinforced, /obj/machinery/atmospherics/pipe/manifold/general/visible{ dir = 4 }, -/turf/open/floor/plating, -/area/engine/supermatter) -"cEz" = ( +/obj/structure/window/plasma/reinforced/spawner/west, /obj/machinery/power/rad_collector/anchored, /obj/structure/cable/yellow{ d2 = 4; @@ -57042,6 +57044,14 @@ }, /turf/open/floor/engine, /area/engine/supermatter) +"cEz" = ( +/obj/structure/cable/yellow{ + d1 = 4; + d2 = 8; + icon_state = "4-8" + }, +/turf/open/floor/engine, +/area/engine/supermatter) "cEA" = ( /obj/machinery/door/poddoor/shutters/preopen{ id = "engsm"; @@ -57210,18 +57220,28 @@ /turf/open/floor/engine, /area/engine/engineering) "cFe" = ( -/obj/effect/spawner/structure/window/plasma/reinforced, /obj/machinery/atmospherics/pipe/simple/general/visible{ dir = 5 }, -/turf/open/floor/plating, +/obj/structure/window/plasma/reinforced/spawner/east, +/obj/machinery/power/rad_collector/anchored, +/obj/structure/cable/yellow{ + d2 = 8; + icon_state = "0-8" + }, +/turf/open/floor/engine, /area/engine/supermatter) "cFh" = ( -/obj/effect/spawner/structure/window/plasma/reinforced, /obj/machinery/atmospherics/pipe/simple/general/visible{ dir = 9 }, -/turf/open/floor/plating, +/obj/structure/window/plasma/reinforced/spawner/west, +/obj/machinery/power/rad_collector/anchored, +/obj/structure/cable/yellow{ + d2 = 4; + icon_state = "0-4" + }, +/turf/open/floor/engine, /area/engine/supermatter) "cFj" = ( /obj/machinery/door/poddoor/shutters/preopen{ @@ -89084,8 +89104,8 @@ cDD cqU cMD cEu -cMI -cMI +cEz +cEz cMD cFL cGf diff --git a/_maps/map_files/Deltastation/DeltaStation2.dmm b/_maps/map_files/Deltastation/DeltaStation2.dmm index 7deff229f7..1b784a678b 100644 --- a/_maps/map_files/Deltastation/DeltaStation2.dmm +++ b/_maps/map_files/Deltastation/DeltaStation2.dmm @@ -8739,19 +8739,30 @@ /turf/open/floor/plating, /area/engine/supermatter) "auC" = ( +/obj/machinery/camera{ + c_tag = "Supermatter Chamber"; + dir = 2; + network = list("Engine"); + pixel_x = 23 + }, +/obj/structure/cable/yellow{ + d1 = 4; + d2 = 8; + icon_state = "4-8" + }, +/turf/open/floor/engine, +/area/engine/supermatter) +"auD" = ( +/obj/machinery/atmospherics/pipe/manifold/general/visible{ + dir = 8 + }, +/obj/structure/window/plasma/reinforced/spawner/east, /obj/machinery/power/rad_collector/anchored, -/obj/structure/cable{ +/obj/structure/cable/yellow{ d2 = 8; icon_state = "0-8" }, -/turf/open/floor/circuit/green, -/area/engine/supermatter) -"auD" = ( -/obj/machinery/atmospherics/pipe/simple/general/visible{ - dir = 6 - }, -/obj/effect/spawner/structure/window/plasma/reinforced, -/turf/open/floor/plating, +/turf/open/floor/engine, /area/engine/supermatter) "auE" = ( /obj/machinery/atmospherics/components/unary/vent_scrubber/on{ @@ -8766,24 +8777,24 @@ /turf/open/floor/engine, /area/engine/supermatter) "auG" = ( -/obj/machinery/atmospherics/pipe/simple/general/visible{ - dir = 10 +/obj/machinery/atmospherics/pipe/manifold/general/visible{ + dir = 4 }, -/obj/effect/spawner/structure/window/plasma/reinforced, -/turf/open/floor/plating, +/obj/structure/window/plasma/reinforced/spawner/west, +/obj/machinery/power/rad_collector/anchored, +/obj/structure/cable/yellow{ + d2 = 4; + icon_state = "0-4" + }, +/turf/open/floor/engine, /area/engine/supermatter) "auH" = ( -/obj/machinery/power/rad_collector/anchored, -/obj/structure/cable{ - icon_state = "0-4"; - d2 = 4 +/obj/structure/cable/yellow{ + d1 = 4; + d2 = 8; + icon_state = "4-8" }, -/obj/machinery/camera{ - c_tag = "Supermatter Chamber"; - name = "atmospherics camera"; - network = list("Engine") - }, -/turf/open/floor/circuit/green, +/turf/open/floor/engine, /area/engine/supermatter) "auI" = ( /obj/structure/cable{ @@ -9303,22 +9314,32 @@ /turf/open/floor/plasteel, /area/engine/atmospherics_engine) "avP" = ( -/obj/machinery/atmospherics/pipe/manifold/general/visible{ - dir = 8 +/obj/machinery/atmospherics/pipe/simple/general/visible{ + dir = 5 }, -/obj/effect/spawner/structure/window/plasma/reinforced, -/turf/open/floor/plating, +/obj/structure/window/plasma/reinforced/spawner/east, +/obj/machinery/power/rad_collector/anchored, +/obj/structure/cable/yellow{ + d2 = 8; + icon_state = "0-8" + }, +/turf/open/floor/engine, /area/engine/supermatter) "avQ" = ( /obj/machinery/power/supermatter_shard/crystal/engine, /turf/open/floor/engine, /area/engine/supermatter) "avR" = ( -/obj/machinery/atmospherics/pipe/manifold/general/visible{ - dir = 4 +/obj/machinery/atmospherics/pipe/simple/general/visible{ + dir = 9 }, -/obj/effect/spawner/structure/window/plasma/reinforced, -/turf/open/floor/plating, +/obj/structure/window/plasma/reinforced/spawner/west, +/obj/machinery/power/rad_collector/anchored, +/obj/structure/cable/yellow{ + d2 = 4; + icon_state = "0-4" + }, +/turf/open/floor/engine, /area/engine/supermatter) "avS" = ( /obj/structure/cable{ @@ -134418,8 +134439,8 @@ ard asi ehy auC -auC -auC +auH +auH ehy azc aAc @@ -134675,7 +134696,7 @@ are asj ehy auD -avP +auD avP axP ehJ @@ -135703,7 +135724,7 @@ ari asn ehy auG -avR +auG avR axT ehJ @@ -135960,8 +135981,8 @@ ebP aso ehy auH -ehF -ehF +auH +auH ehy azg aAe diff --git a/_maps/map_files/MetaStation/MetaStation.dmm b/_maps/map_files/MetaStation/MetaStation.dmm index 78b39c756a..1db625b12e 100644 --- a/_maps/map_files/MetaStation/MetaStation.dmm +++ b/_maps/map_files/MetaStation/MetaStation.dmm @@ -80901,16 +80901,21 @@ }, /area/maintenance/port/fore) "daY" = ( -/obj/machinery/power/rad_collector/anchored, -/obj/structure/cable, +/obj/structure/cable{ + d1 = 1; + d2 = 2; + icon_state = "1-2" + }, /turf/open/floor/engine, /area/engine/supermatter) "daZ" = ( /obj/machinery/atmospherics/pipe/manifold/general/visible{ dir = 1 }, -/obj/effect/spawner/structure/window/plasma/reinforced, -/turf/open/floor/plating, +/obj/structure/window/plasma/reinforced/spawner, +/obj/machinery/power/rad_collector/anchored, +/obj/structure/cable, +/turf/open/floor/engine, /area/engine/supermatter) "dbb" = ( /obj/machinery/atmospherics/components/unary/vent_pump/on{ @@ -82721,8 +82726,10 @@ /obj/machinery/atmospherics/pipe/simple/general/visible{ dir = 10 }, -/obj/effect/spawner/structure/window/plasma/reinforced, -/turf/open/floor/plating, +/obj/structure/window/plasma/reinforced/spawner, +/obj/machinery/power/rad_collector/anchored, +/obj/structure/cable, +/turf/open/floor/engine, /area/engine/supermatter) "deU" = ( /obj/effect/turf_decal/stripes/line{ @@ -82832,15 +82839,25 @@ /area/engine/supermatter) "dfk" = ( /obj/machinery/atmospherics/pipe/manifold/general/visible, -/obj/effect/spawner/structure/window/plasma/reinforced, -/turf/open/floor/plating, +/obj/structure/window/plasma/reinforced/spawner/north, +/obj/machinery/power/rad_collector/anchored, +/obj/structure/cable{ + icon_state = "0-2"; + d2 = 2 + }, +/turf/open/floor/engine, /area/engine/supermatter) "dfm" = ( /obj/machinery/atmospherics/pipe/simple/general/visible{ dir = 9 }, -/obj/effect/spawner/structure/window/plasma/reinforced, -/turf/open/floor/plating, +/obj/structure/window/plasma/reinforced/spawner/north, +/obj/machinery/power/rad_collector/anchored, +/obj/structure/cable{ + icon_state = "0-2"; + d2 = 2 + }, +/turf/open/floor/engine, /area/engine/supermatter) "dfp" = ( /obj/effect/turf_decal/bot{ @@ -82853,16 +82870,16 @@ /turf/open/floor/plasteel/black, /area/engine/engineering) "dfq" = ( -/obj/machinery/power/rad_collector/anchored, -/obj/structure/cable{ - icon_state = "0-2"; - d2 = 2 - }, /obj/machinery/camera{ c_tag = "Supermatter Chamber"; dir = 4; network = list("Engine") }, +/obj/structure/cable{ + d1 = 1; + d2 = 2; + icon_state = "1-2" + }, /turf/open/floor/engine, /area/engine/supermatter) "dft" = ( @@ -129531,7 +129548,7 @@ dbb dfa aNv dfk -dlS +daY djx dfG cXz @@ -129788,7 +129805,7 @@ dbb aMk aNv dfm -dlS +daY djt dbg dfR diff --git a/_maps/map_files/OmegaStation/OmegaStation.dmm b/_maps/map_files/OmegaStation/OmegaStation.dmm index 3e9d0e5f64..64c7a13896 100644 --- a/_maps/map_files/OmegaStation/OmegaStation.dmm +++ b/_maps/map_files/OmegaStation/OmegaStation.dmm @@ -1,4 +1,4 @@ -//MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE +//MAP CONVERTED BY dmm2tgm.py THIS HEADER COMMENT PREVENTS RECONVERSION, DO NOT REMOVE "aaa" = ( /turf/open/space/basic, /area/space) @@ -22155,25 +22155,30 @@ /turf/open/floor/plating, /area/engine/supermatter) "aMR" = ( -/obj/machinery/power/rad_collector/anchored, -/obj/structure/cable{ - d2 = 8; - icon_state = "0-8" - }, /obj/machinery/camera{ - c_tag = "Engineering Supermatter Chamber"; + c_tag = "Supermatter Chamber"; dir = 2; - network = list("SS13","Engine"); + network = list("Engine"); pixel_x = 23 }, -/turf/open/floor/circuit/green, +/obj/structure/cable/yellow{ + d1 = 4; + d2 = 8; + icon_state = "4-8" + }, +/turf/open/floor/engine, /area/engine/supermatter) "aMS" = ( /obj/machinery/atmospherics/pipe/manifold/general/visible{ dir = 8 }, -/obj/effect/spawner/structure/window/plasma/reinforced, -/turf/open/floor/plating, +/obj/structure/window/plasma/reinforced/spawner/east, +/obj/machinery/power/rad_collector/anchored, +/obj/structure/cable/yellow{ + d2 = 8; + icon_state = "0-8" + }, +/turf/open/floor/engine, /area/engine/supermatter) "aMT" = ( /obj/machinery/atmospherics/components/unary/vent_scrubber/on{ @@ -22194,16 +22199,21 @@ /obj/machinery/atmospherics/pipe/manifold/general/visible{ dir = 4 }, -/obj/effect/spawner/structure/window/plasma/reinforced, -/turf/open/floor/plating, +/obj/structure/window/plasma/reinforced/spawner/west, +/obj/machinery/power/rad_collector/anchored, +/obj/structure/cable/yellow{ + d2 = 4; + icon_state = "0-4" + }, +/turf/open/floor/engine, /area/engine/supermatter) "aMX" = ( -/obj/machinery/power/rad_collector/anchored, -/obj/structure/cable{ - icon_state = "0-4"; - d2 = 4 +/obj/structure/cable/yellow{ + d1 = 4; + d2 = 8; + icon_state = "4-8" }, -/turf/open/floor/circuit/green, +/turf/open/floor/engine, /area/engine/supermatter) "aMY" = ( /obj/structure/cable{ @@ -22838,14 +22848,7 @@ /turf/open/floor/plasteel, /area/engine/engineering) "aOa" = ( -/obj/machinery/power/supermatter_shard/engine{ - anchored = 1; - base_icon_state = "darkmatter"; - explosion_power = 20; - gasefficency = 0.15; - icon_state = "darkmatter"; - name = "supermatter crystal" - }, +/obj/machinery/power/supermatter_shard/crystal/engine, /turf/open/floor/engine, /area/engine/supermatter) "aOb" = ( @@ -23106,15 +23109,25 @@ /obj/machinery/atmospherics/pipe/simple/general/visible{ dir = 5 }, -/obj/effect/spawner/structure/window/plasma/reinforced, -/turf/open/floor/plating, +/obj/structure/window/plasma/reinforced/spawner/east, +/obj/machinery/power/rad_collector/anchored, +/obj/structure/cable/yellow{ + d2 = 8; + icon_state = "0-8" + }, +/turf/open/floor/engine, /area/engine/supermatter) "aOD" = ( /obj/machinery/atmospherics/pipe/simple/general/visible{ dir = 9 }, -/obj/effect/spawner/structure/window/plasma/reinforced, -/turf/open/floor/plating, +/obj/structure/window/plasma/reinforced/spawner/west, +/obj/machinery/power/rad_collector/anchored, +/obj/structure/cable/yellow{ + d2 = 4; + icon_state = "0-4" + }, +/turf/open/floor/engine, /area/engine/supermatter) "aOE" = ( /obj/structure/cable{ @@ -67194,8 +67207,8 @@ aJs aKz buW aMR -buZ -buZ +aMX +aMX buW aQK aRI diff --git a/code/__DEFINES/components.dm b/code/__DEFINES/components.dm index 6f20117d36..faf8238b6f 100644 --- a/code/__DEFINES/components.dm +++ b/code/__DEFINES/components.dm @@ -28,10 +28,12 @@ #define COMSIG_ATOM_BLOB_ACT "atom_blob_act" //from base of atom/blob_act(): (/obj/structure/blob) #define COMSIG_ATOM_ACID_ACT "atom_acid_act" //from base of atom/acid_act(): (acidpwr, acid_volume) #define COMSIG_ATOM_EMAG_ACT "atom_emag_act" //from base of atom/emag_act(): () +#define COMSIG_ATOM_RAD_ACT "atom_rad_act" //from base of atom/rad_act(intensity) #define COMSIG_ATOM_NARSIE_ACT "atom_narsie_act" //from base of atom/narsie_act(): () #define COMSIG_ATOM_RATVAR_ACT "atom_ratvar_act" //from base of atom/ratvar_act(): () #define COMSIG_ATOM_RCD_ACT "atom_rcd_act" //from base of atom/rcd_act(): (/mob, /obj/item/construction/rcd, passed_mode) #define COMSIG_ATOM_SING_PULL "atom_sing_pull" //from base of atom/singularity_pull(): (S, current_size) +#define COMSIG_ATOM_SET_LIGHT "atom_set_light" //from base of atom/set_light(): (l_range, l_power, l_color) #define COMSIG_CLICK "atom_click" //from base of atom/Click(): (location, control, params) #define COMSIG_CLICK_SHIFT "shift_click" //from base of atom/ShiftClick(): (/mob) diff --git a/code/__DEFINES/radiation.dm b/code/__DEFINES/radiation.dm new file mode 100644 index 0000000000..e6b38dd4af --- /dev/null +++ b/code/__DEFINES/radiation.dm @@ -0,0 +1,45 @@ +/* +These defines are the balancing points of various parts of the radiation system. +Changes here can have widespread effects: make sure you test well. +Ask ninjanomnom if they're around +*/ + +#define RAD_BACKGROUND_RADIATION 9 // How much radiation is harmless to a mob, this is also when radiation waves stop spreading + // WARNING: Lowering this value significantly increases SSradiation load +#define RAD_AMOUNT_LOW 50 +#define RAD_AMOUNT_MEDIUM 200 +#define RAD_AMOUNT_HIGH 500 +#define RAD_AMOUNT_EXTREME 1000 + +// apply_effect(amount * RAD_MOB_COEFFICIENT, IRRADIATE, blocked) +#define RAD_MOB_COEFFICIENT 0.25 // Radiation applied is multiplied by this + +#define RAD_LOSS_PER_TICK 1 +#define RAD_TOX_COEFFICIENT 0.1 // Toxin damage per tick coefficient + +#define RAD_MOB_SAFE 300 // How much stored radiation in a mob with no ill effects +#define RAD_MOB_KNOCKDOWN 1500 // How much stored radiation to start stunning +// If (mutate*21) + strength = InverseSquareLaw(intensity, max(range_modifier*steps, 1), 1) + else + strength = intensity + + if(strength 0) - radiation_count-- - update_icon() + update_icon() + + if(!scanning) + current_tick_amount = 0 + return + + radiation_count -= radiation_count/RAD_MEASURE_SMOOTHING + radiation_count += current_tick_amount/RAD_MEASURE_SMOOTHING + + if(current_tick_amount) + grace = RAD_GRACE_PERIOD + last_tick_amount = current_tick_amount + + else if(!emagged) + grace-- + if(grace <= 0) + radiation_count = 0 + + update_sound() + + current_tick_amount = 0 /obj/item/device/geiger_counter/examine(mob/user) ..() @@ -56,6 +91,8 @@ if(RAD_LEVEL_CRITICAL + 1 to INFINITY) to_chat(user, "Ambient radiation levels above critical level!") + to_chat(user, "The last radiation amount detected was [last_tick_amount]") + /obj/item/device/geiger_counter/update_icon() if(!scanning) icon_state = "geiger_off" @@ -78,24 +115,43 @@ icon_state = "geiger_on_5" ..() -/obj/item/device/geiger_counter/rad_act(amount) - if(!amount && scanning) - return 0 - if(emagged) - amount = Clamp(amount, 0, 25) //Emagged geiger counters can only accept 25 radiation at a time - radiation_count += amount - if(isliving(loc)) - var/mob/living/M = loc - if(!emagged) - to_chat(M, "[icon2html(src, M)] RADIATION PULSE DETECTED.") - to_chat(M, "[icon2html(src, M)] Severity: [amount]") +/obj/item/device/geiger_counter/proc/update_sound() + switch(radiation_count) + if(RAD_BACKGROUND_RADIATION to RAD_LEVEL_MODERATE) + danger = 1 + if(RAD_LEVEL_MODERATE to RAD_LEVEL_VERY_HIGH) + danger = 2 + if(RAD_LEVEL_VERY_HIGH to RAD_LEVEL_CRITICAL) + danger = 3 + if(RAD_LEVEL_CRITICAL to INFINITY) + danger = 4 else - to_chat(M, "[icon2html(src, M)] !@%$AT!(N P!LS! D/TEC?ED.") - to_chat(M, "[icon2html(src, M)] &!F2rity: <=[amount]#1") + danger = 0 + if(!danger) + muted = TRUE + else if(muted) + muted = FALSE + soundLoop() + +/obj/item/device/geiger_counter/proc/soundLoop() + if(muted || !danger) + return + playsound(src, pickweight(sounds[danger]), 25) + addtimer(CALLBACK(src, .proc/soundLoop), 2) + +/obj/item/device/geiger_counter/rad_act(amount) + if(amount <= RAD_BACKGROUND_RADIATION || !scanning) + return + current_tick_amount += amount update_icon() /obj/item/device/geiger_counter/attack_self(mob/user) scanning = !scanning + if(!scanning) + muted = TRUE + else + muted = FALSE + soundLoop() update_icon() to_chat(user, "[icon2html(src, user)] You switch [scanning ? "on" : "off"] [src].") @@ -103,12 +159,7 @@ if(user.a_intent == INTENT_HELP) if(!emagged) user.visible_message("[user] scans [M] with [src].", "You scan [M]'s radiation levels with [src]...") - if(!M.radiation) - to_chat(user, "[icon2html(src, user)] Radiation levels within normal boundaries.") - return 1 - else - to_chat(user, "[icon2html(src, user)] Subject is irradiated. Radiation levels: [M.radiation].") - return 1 + addtimer(CALLBACK(src, .proc/scan, M, user), 20, TIMER_UNIQUE) // Let's not have spamming GetAllContents else user.visible_message("[user] scans [M] with [src].", "You project [src]'s stored radiation into [M]'s body!") M.rad_act(radiation_count) @@ -116,6 +167,28 @@ return 1 ..() +/obj/item/device/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)] Subject has irradiated objects on them. Radioactive strength: [rad_strength]") + else + to_chat(user, "[icon2html(src, user)] Subject is free of radioactive contamination.") + /obj/item/device/geiger_counter/attackby(obj/item/I, mob/user, params) if(istype(I, /obj/item/screwdriver) && emagged) if(scanning) diff --git a/code/game/objects/items/grenades/syndieminibomb.dm b/code/game/objects/items/grenades/syndieminibomb.dm index 8c2c6d4980..8279dc399d 100644 --- a/code/game/objects/items/grenades/syndieminibomb.dm +++ b/code/game/objects/items/grenades/syndieminibomb.dm @@ -1,53 +1,53 @@ -/obj/item/grenade/syndieminibomb - desc = "A syndicate manufactured explosive used to sow destruction and chaos" - name = "syndicate minibomb" - icon = 'icons/obj/grenade.dmi' - icon_state = "syndicate" - item_state = "flashbang" - origin_tech = "materials=3;magnets=4;syndicate=3" - - -/obj/item/grenade/syndieminibomb/prime() - update_mob() - explosion(src.loc,1,2,4,flame_range = 2) - qdel(src) - -/obj/item/grenade/syndieminibomb/concussion - name = "HE Grenade" - desc = "A compact shrapnel grenade meant to devestate nearby organisms and cause some damage in the process. Pull pin and throw opposite direction." - icon_state = "concussion" - origin_tech = "materials=3;magnets=4;syndicate=2" - -/obj/item/grenade/syndieminibomb/concussion/prime() - update_mob() - explosion(src.loc,0,2,3,flame_range = 3) - qdel(src) - -/obj/item/grenade/syndieminibomb/concussion/frag - name = "frag grenade" - desc = "Fire in the hole." - icon_state = "frag" - -/obj/item/grenade/gluon - desc = "An advanced grenade that releases a harmful stream of gluons inducing radiation in those nearby. These gluon streams will also make victims feel exhausted, and induce shivering. This extreme coldness will also likely wet any nearby floors." - name = "gluon frag grenade" - icon = 'icons/obj/grenade.dmi' - icon_state = "bluefrag" - item_state = "flashbang" - var/freeze_range = 4 - var/rad_damage = 35 - var/stamina_damage = 30 - -/obj/item/grenade/gluon/prime() - update_mob() - playsound(loc, 'sound/effects/empulse.ogg', 50, 1) - radiation_pulse(loc,freeze_range,freeze_range+1,rad_damage) - for(var/turf/T in view(freeze_range,loc)) - if(isfloorturf(T)) - var/turf/open/floor/F = T - F.wet = TURF_WET_PERMAFROST - addtimer(CALLBACK(F, /turf/open/floor.proc/MakeDry, TURF_WET_PERMAFROST), rand(3000, 3100)) - for(var/mob/living/carbon/L in T) - L.adjustStaminaLoss(stamina_damage) - L.bodytemperature -= 230 - qdel(src) +/obj/item/grenade/syndieminibomb + desc = "A syndicate manufactured explosive used to sow destruction and chaos." + name = "syndicate minibomb" + icon = 'icons/obj/grenade.dmi' + icon_state = "syndicate" + item_state = "flashbang" + origin_tech = "materials=3;magnets=4;syndicate=3" + + +/obj/item/grenade/syndieminibomb/prime() + update_mob() + explosion(src.loc,1,2,4,flame_range = 2) + qdel(src) + +/obj/item/grenade/syndieminibomb/concussion + name = "HE Grenade" + desc = "A compact shrapnel grenade meant to devestate nearby organisms and cause some damage in the process. Pull pin and throw opposite direction." + icon_state = "concussion" + origin_tech = "materials=3;magnets=4;syndicate=2" + +/obj/item/grenade/syndieminibomb/concussion/prime() + update_mob() + explosion(src.loc,0,2,3,flame_range = 3) + qdel(src) + +/obj/item/grenade/syndieminibomb/concussion/frag + name = "frag grenade" + desc = "Fire in the hole." + icon_state = "frag" + +/obj/item/grenade/gluon + desc = "An advanced grenade that releases a harmful stream of gluons inducing radiation in those nearby. These gluon streams will also make victims feel exhausted, and induce shivering. This extreme coldness will also likely wet any nearby floors." + name = "gluon frag grenade" + icon = 'icons/obj/grenade.dmi' + icon_state = "bluefrag" + item_state = "flashbang" + var/freeze_range = 4 + var/rad_damage = 350 + var/stamina_damage = 30 + +/obj/item/grenade/gluon/prime() + update_mob() + playsound(loc, 'sound/effects/empulse.ogg', 50, 1) + radiation_pulse(get_turf(src), rad_damage) + for(var/turf/T in view(freeze_range,loc)) + if(isfloorturf(T)) + var/turf/open/floor/F = T + F.wet = TURF_WET_PERMAFROST + addtimer(CALLBACK(F, /turf/open/floor.proc/MakeDry, TURF_WET_PERMAFROST), rand(3000, 3100)) + for(var/mob/living/carbon/L in T) + L.adjustStaminaLoss(stamina_damage) + L.bodytemperature -= 230 + qdel(src) diff --git a/code/game/objects/items/theft_tools.dm b/code/game/objects/items/theft_tools.dm index d4432e0257..635229b70e 100644 --- a/code/game/objects/items/theft_tools.dm +++ b/code/game/objects/items/theft_tools.dm @@ -33,7 +33,7 @@ if(cooldown < world.time - 60) cooldown = world.time flick(pulseicon, src) - radiation_pulse(get_turf(src), 1, 4, 40, 1) + radiation_pulse(get_turf(src), 400, 2) //nuke core box, for carrying the core /obj/item/nuke_core_container @@ -140,7 +140,7 @@ return else to_chat(user, "As it touches \the [src], both \the [src] and \the [W] burst into dust!") - radiation_pulse(get_turf(user), 1, 2, 10, 1) + radiation_pulse(get_turf(user), 100) playsound(src, 'sound/effects/supermatter.ogg', 50, 1) qdel(W) qdel(src) @@ -151,7 +151,7 @@ return FALSE var/mob/ded = user to_chat(user, "You reach for the supermatter sliver with your hands. That was dumb.") - radiation_pulse(get_turf(user), 2, 4, 50, 1) + radiation_pulse(get_turf(user), 500, 2) playsound(get_turf(user), 'sound/effects/supermatter.ogg', 50, 1) ded.dust() @@ -240,7 +240,7 @@ user.visible_message("As [user] touches \the [AM] with \a [src], silence fills the room...",\ "You touch \the [AM] with \the [src], and everything suddenly goes silent.\n\The [AM] flashes into dust, and soon as you can register this, you do as well.",\ "Everything suddenly goes silent.") - radiation_pulse(get_turf(user), 2, 4, 50, 1) + radiation_pulse(get_turf(user), 500, 2) playsound(src, 'sound/effects/supermatter.ogg', 50, 1) user.dust() icon_state = "supermatter_tongs" diff --git a/code/game/objects/structures/false_walls.dm b/code/game/objects/structures/false_walls.dm index 460fc62bec..94d1b1ca7c 100644 --- a/code/game/objects/structures/false_walls.dm +++ b/code/game/objects/structures/false_walls.dm @@ -29,9 +29,13 @@ can_be_unanchored = FALSE CanAtmosPass = ATMOS_PASS_DENSITY -/obj/structure/falsewall/New(loc) - ..() - air_update_turf(1) +/obj/structure/falsewall/Initialize() + . = ..() + air_update_turf(TRUE) + +/obj/structure/falsewall/ComponentInitialize() + . = ..() + AddComponent(/datum/component/rad_insulation, RAD_MEDIUM_INSULATION) /obj/structure/falsewall/Destroy() density = FALSE @@ -195,7 +199,7 @@ if(!active) if(world.time > last_event+15) active = 1 - radiation_pulse(get_turf(src), 0, 3, 15, 1) + radiation_pulse(get_turf(src), 150) for(var/turf/closed/wall/mineral/uranium/T in orange(1,src)) T.radiate() last_event = world.time diff --git a/code/game/objects/structures/girders.dm b/code/game/objects/structures/girders.dm index b3b6022834..389e851404 100644 --- a/code/game/objects/structures/girders.dm +++ b/code/game/objects/structures/girders.dm @@ -10,6 +10,10 @@ var/can_displace = TRUE //If the girder can be moved around by wrenching it max_integrity = 200 +/obj/structure/girder/ComponentInitialize() + . = ..() + AddComponent(/datum/component/rad_insulation, RAD_VERY_LIGHT_INSULATION) + /obj/structure/girder/examine(mob/user) . = ..() switch(state) diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm index 1683ac00e6..841d142930 100644 --- a/code/game/objects/structures/grille.dm +++ b/code/game/objects/structures/grille.dm @@ -17,6 +17,10 @@ var/grille_type = null var/broken_type = /obj/structure/grille/broken +/obj/structure/grille/ComponentInitialize() + . = ..() + AddComponent(/datum/component/rad_insulation, RAD_NO_INSULATION) + /obj/structure/grille/examine(mob/user) ..() if(anchored) diff --git a/code/game/objects/structures/holosign.dm b/code/game/objects/structures/holosign.dm index dc9a1ee403..f89244c084 100644 --- a/code/game/objects/structures/holosign.dm +++ b/code/game/objects/structures/holosign.dm @@ -61,6 +61,10 @@ /obj/structure/holosign/barrier/engineering icon_state = "holosign_engi" +/obj/structure/holosign/barrier/engineering/ComponentInitialize() + . = ..() + AddComponent(/datum/component/rad_insulation, RAD_LIGHT_INSULATION) + /obj/structure/holosign/barrier/atmos name = "holo firelock" desc = "A holographic barrier resembling a firelock. Though it does not prevent solid objects from passing through, gas is kept out." diff --git a/code/game/objects/structures/mineral_doors.dm b/code/game/objects/structures/mineral_doors.dm index c767dd1c68..c124540d7d 100644 --- a/code/game/objects/structures/mineral_doors.dm +++ b/code/game/objects/structures/mineral_doors.dm @@ -22,10 +22,13 @@ var/closeSound = 'sound/effects/stonedoor_openclose.ogg' CanAtmosPass = ATMOS_PASS_DENSITY -/obj/structure/mineral_door/New(location) - ..() +/obj/structure/mineral_door/Initialize() + . = ..() initial_state = icon_state - air_update_turf(1) + air_update_turf(TRUE) + +/obj/structure/mineral_door/ComponentInitialize() + AddComponent(/datum/component/rad_insulation, RAD_MEDIUM_INSULATION) /obj/structure/mineral_door/Destroy() density = FALSE @@ -151,11 +154,17 @@ sheetType = /obj/item/stack/sheet/mineral/silver max_integrity = 300 +/obj/structure/mineral_door/silver/ComponentInitialize() + AddComponent(/datum/component/rad_insulation, RAD_HEAVY_INSULATION) + /obj/structure/mineral_door/gold name = "gold door" icon_state = "gold" sheetType = /obj/item/stack/sheet/mineral/gold +/obj/structure/mineral_door/gold/ComponentInitialize() + AddComponent(/datum/component/rad_insulation, RAD_HEAVY_INSULATION) + /obj/structure/mineral_door/uranium name = "uranium door" icon_state = "uranium" @@ -163,6 +172,9 @@ max_integrity = 300 light_range = 2 +/obj/structure/mineral_door/uranium/ComponentInitialize() + return + /obj/structure/mineral_door/sandstone name = "sandstone door" icon_state = "sandstone" @@ -172,6 +184,9 @@ /obj/structure/mineral_door/transparent opacity = FALSE +/obj/structure/mineral_door/transparent/ComponentInitialize() + AddComponent(/datum/component/rad_insulation, RAD_VERY_LIGHT_INSULATION) + /obj/structure/mineral_door/transparent/Close() ..() set_opacity(FALSE) @@ -181,6 +196,9 @@ icon_state = "plasma" sheetType = /obj/item/stack/sheet/mineral/plasma +/obj/structure/mineral_door/transparent/plasma/ComponentInitialize() + return + /obj/structure/mineral_door/transparent/plasma/attackby(obj/item/W, mob/user, params) if(W.is_hot()) var/turf/T = get_turf(src) @@ -204,6 +222,9 @@ sheetType = /obj/item/stack/sheet/mineral/diamond max_integrity = 1000 +/obj/structure/mineral_door/transparent/diamond/ComponentInitialize() + AddComponent(/datum/component/rad_insulation, RAD_EXTREME_INSULATION) + /obj/structure/mineral_door/wood name = "wood door" icon_state = "wood" @@ -213,6 +234,9 @@ resistance_flags = FLAMMABLE max_integrity = 200 +/obj/structure/mineral_door/wood/ComponentInitialize() + AddComponent(/datum/component/rad_insulation, RAD_VERY_LIGHT_INSULATION) + /obj/structure/mineral_door/paperframe name = "paper frame door" icon_state = "paperframe" @@ -227,6 +251,9 @@ . = ..() queue_smooth_neighbors(src) +/obj/structure/mineral_door/paperframe/ComponentInitialize() + return + /obj/structure/mineral_door/paperframe/Destroy() queue_smooth_neighbors(src) return ..() diff --git a/code/game/objects/structures/signs.dm b/code/game/objects/structures/signs.dm index fb46dd45de..fd5fd439bd 100644 --- a/code/game/objects/structures/signs.dm +++ b/code/game/objects/structures/signs.dm @@ -8,6 +8,10 @@ armor = list(melee = 50, bullet = 0, laser = 0, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 50) var/buildable_sign = 1 //unwrenchable and modifiable +/obj/structure/sign/ComponentInitialize() + . = ..() + AddComponent(/datum/component/rad_insulation, RAD_NO_INSULATION) // Since this is on a wall if it becomes irradiated it will smuggle the radiation past the wall + /obj/structure/sign/basic name = "blank sign" desc = "How can signs be real if our eyes aren't real?" diff --git a/code/game/objects/structures/statues.dm b/code/game/objects/structures/statues.dm index 63333ba07b..a046f687c4 100644 --- a/code/game/objects/structures/statues.dm +++ b/code/game/objects/structures/statues.dm @@ -131,7 +131,7 @@ if(!active) if(world.time > last_event+15) active = 1 - radiation_pulse(get_turf(src), 3, 3, 12, 0) + radiation_pulse(get_turf(src), 30) last_event = world.time active = null return diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index 59db363399..38251dc3ec 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -78,6 +78,10 @@ real_explosion_block = explosion_block explosion_block = EXPLOSION_BLOCK_PROC +/obj/structure/window/ComponentInitialize() + . = ..() + AddComponent(/datum/component/rad_insulation, RAD_VERY_LIGHT_INSULATION, TRUE, FALSE) + /obj/structure/window/rcd_vals(mob/user, obj/item/construction/rcd/the_rcd) switch(the_rcd.mode) if(RCD_DECONSTRUCT) @@ -432,6 +436,9 @@ explosion_block = 1 glass_type = /obj/item/stack/sheet/rglass +/obj/structure/window/reinforced/ComponentInitialize() + AddComponent(/datum/component/rad_insulation, RAD_HEAVY_INSULATION, TRUE, FALSE) + /obj/structure/window/reinforced/spawner/east dir = EAST @@ -455,6 +462,9 @@ explosion_block = 1 glass_type = /obj/item/stack/sheet/plasmaglass +/obj/structure/window/plasma/ComponentInitialize() + AddComponent(/datum/component/rad_insulation, RAD_NO_INSULATION, TRUE, FALSE) + /obj/structure/window/plasma/spawner/east dir = EAST diff --git a/code/game/turfs/closed.dm b/code/game/turfs/closed.dm index c9eb1a6762..b20ba49317 100644 --- a/code/game/turfs/closed.dm +++ b/code/game/turfs/closed.dm @@ -5,6 +5,10 @@ density = TRUE blocks_air = 1 +/turf/closed/ComponentInitialize() + . = ..() + AddComponent(/datum/component/rad_insulation, RAD_MEDIUM_INSULATION) + /turf/closed/get_smooth_underlay_icon(mutable_appearance/underlay_appearance, turf/asking_turf, adjacency_dir) return FALSE diff --git a/code/game/turfs/simulated/floor/mineral_floor.dm b/code/game/turfs/simulated/floor/mineral_floor.dm index 6f863d4bd0..2d68c06761 100644 --- a/code/game/turfs/simulated/floor/mineral_floor.dm +++ b/code/game/turfs/simulated/floor/mineral_floor.dm @@ -206,7 +206,7 @@ if(!active) if(world.time > last_event+15) active = 1 - radiation_pulse(get_turf(src), 3, 3, 1, 0) + radiation_pulse(get_turf(src), 10) for(var/turf/open/floor/mineral/uranium/T in orange(1,src)) T.radiate() last_event = world.time diff --git a/code/game/turfs/simulated/wall/mineral_walls.dm b/code/game/turfs/simulated/wall/mineral_walls.dm index 6ae60a6e49..7f1851004c 100644 --- a/code/game/turfs/simulated/wall/mineral_walls.dm +++ b/code/game/turfs/simulated/wall/mineral_walls.dm @@ -70,7 +70,7 @@ if(!active) if(world.time > last_event+15) active = 1 - radiation_pulse(get_turf(src), 3, 3, 4, 0) + radiation_pulse(get_turf(src), 40) for(var/turf/closed/wall/mineral/uranium/T in orange(1,src)) T.radiate() last_event = world.time diff --git a/code/game/turfs/simulated/wall/reinf_walls.dm b/code/game/turfs/simulated/wall/reinf_walls.dm index 5c95d108b4..c997d8dd55 100644 --- a/code/game/turfs/simulated/wall/reinf_walls.dm +++ b/code/game/turfs/simulated/wall/reinf_walls.dm @@ -13,6 +13,10 @@ girder_type = /obj/structure/girder/reinforced explosion_block = 2 +/turf/closed/wall/r_wall/ComponentInitialize() + . = ..() + AddComponent(/datum/component/rad_insulation, RAD_HEAVY_INSULATION) + /turf/closed/wall/r_wall/deconstruction_hints(mob/user) switch(d_state) if(INTACT) diff --git a/code/game/turfs/space/space.dm b/code/game/turfs/space/space.dm index a51030be2b..d391d4e7b7 100644 --- a/code/game/turfs/space/space.dm +++ b/code/game/turfs/space/space.dm @@ -44,6 +44,8 @@ if (opacity) has_opaque_atom = TRUE + ComponentInitialize() + return INITIALIZE_HINT_NORMAL /turf/open/space/attack_ghost(mob/dead/observer/user) diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index 77ef696714..1ec0ea8dcb 100755 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -56,6 +56,9 @@ if (opacity) has_opaque_atom = TRUE + + ComponentInitialize() + return INITIALIZE_HINT_NORMAL /turf/proc/Initalize_Atmos(times_fired) diff --git a/code/modules/atmospherics/machinery/atmosmachinery.dm b/code/modules/atmospherics/machinery/atmosmachinery.dm index ce68eecdc9..4cbca66a84 100644 --- a/code/modules/atmospherics/machinery/atmosmachinery.dm +++ b/code/modules/atmospherics/machinery/atmosmachinery.dm @@ -48,6 +48,10 @@ Pipelines + Other Objects -> Pipe network SSair.atmos_machinery += src SetInitDirections() +/obj/machinery/atmospherics/ComponentInitialize() + . = ..() + AddComponent(/datum/component/rad_insulation, RAD_NO_INSULATION) //This would be a bad idea + /obj/machinery/atmospherics/Destroy() for(DEVICE_TYPE_LOOP) nullifyNode(I) diff --git a/code/modules/clothing/spacesuits/hardsuit.dm b/code/modules/clothing/spacesuits/hardsuit.dm index 1ba0e72b14..0890e4de74 100644 --- a/code/modules/clothing/spacesuits/hardsuit.dm +++ b/code/modules/clothing/spacesuits/hardsuit.dm @@ -51,7 +51,8 @@ /obj/item/clothing/head/helmet/space/hardsuit/rad_act(severity) ..() - display_visor_message("Radiation pulse detected! Magnitude: [severity] RADs.") + if(severity > RAD_AMOUNT_EXTREME) + display_visor_message("Radiation pulse detected! Magnitude: [severity] RADs.") /obj/item/clothing/head/helmet/space/hardsuit/emp_act(severity) ..() diff --git a/code/modules/clothing/suits/utility.dm b/code/modules/clothing/suits/utility.dm index 3ea8721b7e..835ac2374b 100644 --- a/code/modules/clothing/suits/utility.dm +++ b/code/modules/clothing/suits/utility.dm @@ -116,6 +116,10 @@ flags_cover = HEADCOVERSEYES | HEADCOVERSMOUTH resistance_flags = 0 +/obj/item/clothing/head/radiation/ComponentInitialize() + . = ..() + AddComponent(/datum/component/rad_insulation, RAD_NO_INSULATION, TRUE, FALSE) + /obj/item/clothing/suit/radiation name = "radiation suit" desc = "A suit that protects against radiation. The label reads, 'Made with lead. Please do not consume insulation.'" @@ -133,3 +137,9 @@ equip_delay_other = 60 flags_inv = HIDEJUMPSUIT resistance_flags = 0 + +/obj/item/clothing/suit/radiation/ComponentInitialize() + . = ..() + AddComponent(/datum/component/rad_insulation, RAD_NO_INSULATION, TRUE, FALSE) + // Just don't want things to be irradiated inside this + // Except things on the mob aren't even inside the suit so ehhhhhh \ No newline at end of file diff --git a/code/modules/lighting/lighting_atom.dm b/code/modules/lighting/lighting_atom.dm index c64c8ad12a..537326fc45 100644 --- a/code/modules/lighting/lighting_atom.dm +++ b/code/modules/lighting/lighting_atom.dm @@ -23,6 +23,8 @@ if (l_color != NONSENSICAL_VALUE) light_color = l_color + SendSignal(COMSIG_ATOM_SET_LIGHT, l_range, l_power, l_color) + update_light() #undef NONSENSICAL_VALUE diff --git a/code/modules/mob/dead/new_player/new_player.dm b/code/modules/mob/dead/new_player/new_player.dm index 1eb4ced083..dd8c21894c 100644 --- a/code/modules/mob/dead/new_player/new_player.dm +++ b/code/modules/mob/dead/new_player/new_player.dm @@ -24,6 +24,9 @@ loc = pick(GLOB.newplayer_start) else loc = locate(1,1,1) + + ComponentInitialize() + . = ..() /mob/dead/new_player/prepare_huds() diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index 62cf6a535a..f1cacb0215 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -1135,36 +1135,31 @@ return 0 /datum/species/proc/handle_mutations_and_radiation(mob/living/carbon/human/H) + . = FALSE + var/radiation = H.radiation - if(!(RADIMMUNE in species_traits)) - if(H.radiation) - if (H.radiation > 100) - if(!H.IsKnockdown()) - H.emote("collapse") - H.Knockdown(200) - to_chat(H, "You feel weak.") - switch(H.radiation) - if(50 to 75) - if(prob(5)) - if(!H.IsKnockdown()) - H.emote("collapse") - H.Knockdown(60) - to_chat(H, "You feel weak.") + if(RADIMMUNE in species_traits) + radiation = 0 + return TRUE - if(prob(15)) - if(!( H.hair_style == "Shaved") || !(H.hair_style == "Bald") || (HAIR in species_traits)) - to_chat(H, "Your hair starts to fall out in clumps...") - addtimer(CALLBACK(src, .proc/go_bald, H), 50) + if(radiation > RAD_MOB_KNOCKDOWN) + if(!H.IsKnockdown()) + H.emote("collapse") + H.Knockdown(RAD_KNOCKDOWN_TIME) + to_chat(H, "You feel weak.") + + if(radiation > RAD_MOB_MUTATE) + if(prob(1)) + to_chat(H, "You mutate!") + H.randmutb() + H.emote("gasp") + H.domutcheck() - if(75 to 100) - if(prob(1)) - to_chat(H, "You mutate!") - H.randmutb() - H.emote("gasp") - H.domutcheck() - return 0 - H.radiation = 0 - return 1 + if(radiation > RAD_MOB_HAIRLOSS) + if(prob(15)) + if(!( H.hair_style == "Shaved") || !(H.hair_style == "Bald") || (HAIR in species_traits)) + to_chat(H, "Your hair starts to fall out in clumps...") + addtimer(CALLBACK(src, .proc/go_bald, H), 50) /datum/species/proc/go_bald(mob/living/carbon/human/H) if(QDELETED(H)) //may be called from a timer diff --git a/code/modules/mob/living/carbon/human/species_types/golems.dm b/code/modules/mob/living/carbon/human/species_types/golems.dm index 5f1591b996..519f7bf441 100644 --- a/code/modules/mob/living/carbon/human/species_types/golems.dm +++ b/code/modules/mob/living/carbon/human/species_types/golems.dm @@ -295,7 +295,7 @@ if(!active) if(world.time > last_event+30) active = 1 - radiation_pulse(get_turf(H), 3, 3, 5, 0) + radiation_pulse(get_turf(H), 50) last_event = world.time active = null ..() diff --git a/code/modules/mob/living/carbon/life.dm b/code/modules/mob/living/carbon/life.dm index 979bc2d89c..31f8eb3f73 100644 --- a/code/modules/mob/living/carbon/life.dm +++ b/code/modules/mob/living/carbon/life.dm @@ -280,24 +280,9 @@ HM.force_lose(src) dna.temporary_mutations.Remove(mut) - if(radiation) - radiation = Clamp(radiation, 0, 100) - switch(radiation) - if(0 to 50) - radiation = max(radiation-1,0) - if(prob(25)) - adjustToxLoss(1) - - if(50 to 75) - radiation = max(radiation-2,0) - adjustToxLoss(1) - if(prob(5)) - radiation = max(radiation-5,0) - - if(75 to 100) - radiation = max(radiation-3,0) - adjustToxLoss(3) - + radiation -= min(radiation, RAD_LOSS_PER_TICK) + if(radiation > RAD_MOB_SAFE) + adjustToxLoss(log(radiation-RAD_MOB_SAFE)*RAD_TOX_COEFFICIENT) /mob/living/carbon/handle_stomach() set waitfor = 0 diff --git a/code/modules/mob/living/carbon/monkey/life.dm b/code/modules/mob/living/carbon/monkey/life.dm index 1ecbcc6b67..714ba02a85 100644 --- a/code/modules/mob/living/carbon/monkey/life.dm +++ b/code/modules/mob/living/carbon/monkey/life.dm @@ -23,32 +23,23 @@ walk_to(src,0) /mob/living/carbon/monkey/handle_mutations_and_radiation() - - if (radiation) - if (radiation > 100) + if(radiation) + if(radiation > RAD_MOB_KNOCKDOWN) if(!IsKnockdown()) emote("collapse") Knockdown(200) to_chat(src, "You feel weak.") - if(radiation > 30 && prob((radiation - 30) * (radiation - 30) * 0.0002)) - gorillize() - return - switch(radiation) + if(radiation > RAD_MOB_MUTATE) + if(prob(1)) + to_chat(src, "You mutate!") + randmutb() + emote("gasp") + domutcheck() - if(50 to 75) - if(prob(5)) - if(!IsKnockdown()) - emote("collapse") - Knockdown(60) - to_chat(src, "You feel weak.") - - if(75 to 100) - if(prob(1)) - to_chat(src, "You mutate!") - randmutb() - emote("gasp") - domutcheck() - ..() + if(radiation > RAD_MOB_MUTATE * 2 && prob(50)) + gorillize() + return + return ..() /mob/living/carbon/monkey/handle_breath_temperature(datum/gas_mixture/breath) if(abs(310.15 - breath.temperature) > 50) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index eae437caf6..70edd55da6 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -885,6 +885,16 @@ G.Recall() to_chat(G, "Your summoner has changed form!") +/mob/living/rad_act(amount) + amount = max(amount-RAD_BACKGROUND_RADIATION, 0) + + if(amount) + var/blocked = getarmor(null, "rad") + + apply_effect(amount * RAD_MOB_COEFFICIENT, IRRADIATE, blocked) + if(amount > RAD_AMOUNT_EXTREME) + apply_damage((amount-RAD_AMOUNT_EXTREME)/RAD_AMOUNT_EXTREME, BURN, null, blocked) + /mob/living/proc/fakefireextinguish() return diff --git a/code/modules/power/gravitygenerator.dm b/code/modules/power/gravitygenerator.dm index 3ad3f6bc13..534460260f 100644 --- a/code/modules/power/gravitygenerator.dm +++ b/code/modules/power/gravitygenerator.dm @@ -363,7 +363,7 @@ GLOBAL_LIST_EMPTY(gravity_generators) // We will keep track of this by adding ne /obj/machinery/gravity_generator/main/proc/pulse_radiation() - radiation_pulse(get_turf(src), 3, 7, 20) + radiation_pulse(get_turf(src), 200) // Shake everyone on the z level to let them know that gravity was enagaged/disenagaged. /obj/machinery/gravity_generator/main/proc/shake_everyone() diff --git a/code/modules/power/rtg.dm b/code/modules/power/rtg.dm index 5ec2c868ad..c9a3db895f 100644 --- a/code/modules/power/rtg.dm +++ b/code/modules/power/rtg.dm @@ -28,7 +28,7 @@ ..() add_avail(power_gen) if(panel_open && irradiate) - radiation_pulse(get_turf(src), 2, 3, 6) // Weak but noticeable. + radiation_pulse(get_turf(src), 60) /obj/machinery/power/rtg/RefreshParts() var/part_level = 0 diff --git a/code/modules/power/singularity/collector.dm b/code/modules/power/singularity/collector.dm index b73285570a..f475e96028 100644 --- a/code/modules/power/singularity/collector.dm +++ b/code/modules/power/singularity/collector.dm @@ -1,5 +1,7 @@ - -GLOBAL_LIST_EMPTY(rad_collectors) +// last_power += (pulse_strength-RAD_COLLECTOR_EFFICIENCY)*RAD_COLLECTOR_COEFFICIENT +#define RAD_COLLECTOR_EFFICIENCY 80 // radiation needs to be over this amount to get power +#define RAD_COLLECTOR_COEFFICIENT 100 +#define RAD_COLLECTOR_STORED_OUT 0.04 // (this*100)% of stored power outputted per tick. Doesn't actualy change output total, lower numbers just means collectors output for longer in absence of a source /obj/machinery/power/rad_collector name = "Radiation Collector Array" @@ -21,12 +23,11 @@ GLOBAL_LIST_EMPTY(rad_collectors) /obj/machinery/power/rad_collector/anchored anchored = TRUE -/obj/machinery/power/rad_collector/Initialize() +/obj/machinery/power/rad_collector/ComponentInitialize() . = ..() - GLOB.rad_collectors += src + AddComponent(/datum/component/rad_insulation, RAD_EXTREME_INSULATION, FALSE, FALSE) /obj/machinery/power/rad_collector/Destroy() - GLOB.rad_collectors -= src return ..() /obj/machinery/power/rad_collector/process() @@ -37,8 +38,10 @@ GLOBAL_LIST_EMPTY(rad_collectors) else loaded_tank.air_contents.gases[/datum/gas/plasma][MOLES] -= 0.001*drainratio loaded_tank.air_contents.garbage_collect() - return + var/power_produced = min(last_power, (last_power*RAD_COLLECTOR_STORED_OUT)+1000) //Produces at least 1000 watts if it has more than that stored + add_avail(power_produced) + last_power-=power_produced /obj/machinery/power/rad_collector/attack_hand(mob/user) if(..()) @@ -76,7 +79,7 @@ GLOBAL_LIST_EMPTY(rad_collectors) /obj/machinery/power/rad_collector/attackby(obj/item/W, mob/user, params) if(istype(W, /obj/item/device/multitool)) - to_chat(user, "The [W.name] detects that [last_power]W were recently produced.") + to_chat(user, "The [W.name] detects that [last_power]W is being processed.") return TRUE else if(istype(W, /obj/item/device/analyzer) && loaded_tank) atmosanalyzer_scan(loaded_tank.air_contents, user) @@ -137,15 +140,9 @@ GLOBAL_LIST_EMPTY(rad_collectors) else update_icons() -/obj/machinery/power/rad_collector/proc/receive_pulse(pulse_strength) - if(loaded_tank && active) - var/power_produced = loaded_tank.air_contents.gases[/datum/gas/plasma] ? loaded_tank.air_contents.gases[/datum/gas/plasma][MOLES] : 0 - power_produced *= pulse_strength*10 - add_avail(power_produced) - last_power = power_produced - return - return - +/obj/machinery/power/rad_collector/rad_act(pulse_strength) + if(loaded_tank && active && pulse_strength > RAD_COLLECTOR_EFFICIENCY) + last_power += (pulse_strength-RAD_COLLECTOR_EFFICIENCY)*RAD_COLLECTOR_COEFFICIENT /obj/machinery/power/rad_collector/proc/update_icons() cut_overlays() @@ -167,3 +164,7 @@ GLOBAL_LIST_EMPTY(rad_collectors) flick("ca_deactive", src) update_icons() return + +#undef RAD_COLLECTOR_EFFICIENCY +#undef RAD_COLLECTOR_COEFFICIENT +#undef RAD_COLLECTOR_STORED_OUT \ No newline at end of file diff --git a/code/modules/power/singularity/singularity.dm b/code/modules/power/singularity/singularity.dm index 5b7d70b7f0..7ca49fbf3a 100644 --- a/code/modules/power/singularity/singularity.dm +++ b/code/modules/power/singularity/singularity.dm @@ -114,7 +114,7 @@ /obj/singularity/process() if(current_size >= STAGE_TWO) move() - pulse() + radiation_pulse(get_turf(src), energy, 0.5) if(prob(event_chance))//Chance for it to run a special event TODO:Come up with one or two more that fit event() eat() @@ -385,14 +385,10 @@ /obj/singularity/proc/toxmob() - var/toxrange = 10 var/radiation = 15 - var/radiationmin = 3 if (energy>200) radiation += round((energy-150)/10,1) - radiationmin = round((radiation/5),1) - for(var/mob/living/M in view(toxrange, src.loc)) - M.rad_act(rand(radiationmin,radiation)) + radiation_pulse(get_turf(src), radiation) /obj/singularity/proc/combust_mobs() @@ -428,12 +424,6 @@ empulse(src, 8, 10) return - -/obj/singularity/proc/pulse() - for(var/obj/machinery/power/rad_collector/R in GLOB.rad_collectors) - if(R.z == z && get_dist(R, src) <= 15) // Better than using orange() every process - R.receive_pulse(energy) - /obj/singularity/singularity_act() var/gain = (energy/2) var/dist = max((current_size - 2),1) diff --git a/code/modules/power/supermatter/supermatter.dm b/code/modules/power/supermatter/supermatter.dm index 1dc36f9097..8cdbb1af5f 100644 --- a/code/modules/power/supermatter/supermatter.dm +++ b/code/modules/power/supermatter/supermatter.dm @@ -331,8 +331,8 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_shard) power = max( (removed.temperature * temp_factor / T0C) * gasmix_power_ratio + power, 0) //Total laser power plus an overload - //We've generated power, now let's transfer it to the collectors for storing/usage - transfer_energy() + if(prob(50)) + radiation_pulse(get_turf(src), power * (1 + power_transmission_bonus/10 * freon_transmit_modifier)) var/device_energy = power * REACTION_POWER_MODIFIER @@ -527,11 +527,6 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_shard) playsound(get_turf(src), 'sound/effects/supermatter.ogg', 50, 1) Consume(nom) -/obj/machinery/power/supermatter_shard/proc/transfer_energy() - for(var/obj/machinery/power/rad_collector/R in GLOB.rad_collectors) - if(R.z == z && get_dist(R, src) <= 15) //Better than using orange() every process - R.receive_pulse(power * (1 + power_transmission_bonus)/10 * freon_transmit_modifier) - /obj/machinery/power/supermatter_shard/attackby(obj/item/W, mob/living/user, params) if(!istype(W) || (W.flags_1 & ABSTRACT_1) || !istype(user)) return @@ -550,7 +545,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_shard) Consume(W) playsound(get_turf(src), 'sound/effects/supermatter.ogg', 50, 1) - radiation_pulse(get_turf(src), 1, 1, 150, 1) + radiation_pulse(get_turf(src), 150, 4) /obj/machinery/power/supermatter_shard/CollidedWith(atom/movable/AM) @@ -584,7 +579,7 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_shard) matter_power += 200 //Some poor sod got eaten, go ahead and irradiate people nearby. - radiation_pulse(get_turf(src), 4, 10, 500, 1) + radiation_pulse(get_turf(src), 3000, 2, TRUE) for(var/mob/living/L in range(10)) investigate_log("has irradiated [L] after consuming [AM].", INVESTIGATE_SUPERMATTER) if(L in view()) diff --git a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm index 06f77361c3..23d2714b52 100644 --- a/code/modules/reagents/chemistry/reagents/medicine_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/medicine_reagents.dm @@ -454,7 +454,7 @@ /datum/reagent/medicine/potass_iodide/on_mob_life(mob/living/M) if(M.radiation > 0) - M.radiation-- + M.radiation-=2 ..() /datum/reagent/medicine/pen_acid @@ -466,11 +466,8 @@ metabolization_rate = 0.5 * REAGENTS_METABOLISM /datum/reagent/medicine/pen_acid/on_mob_life(mob/living/M) - if(M.radiation > 0) - M.radiation -= 4 + M.radiation -= min(M.radiation, 8) M.adjustToxLoss(-2*REM, 0) - if(M.radiation < 0) - M.radiation = 0 for(var/datum/reagent/R in M.reagents.reagent_list) if(R != src) M.reagents.remove_reagent(R.id,2) diff --git a/code/modules/recycling/disposal-structures.dm b/code/modules/recycling/disposal-structures.dm index 9b57c41826..97ee38357c 100644 --- a/code/modules/recycling/disposal-structures.dm +++ b/code/modules/recycling/disposal-structures.dm @@ -15,6 +15,10 @@ var/tomail = 0 //changes if contains wrapped package var/hasmob = 0 //If it contains a mob +/obj/structure/disposalholder/ComponentInitialize() + . = ..() + AddComponent(/datum/component/rad_insulation, RAD_NO_INSULATION) + /obj/structure/disposalholder/Destroy() qdel(gas) active = 0 @@ -176,6 +180,9 @@ if("pipe-j2s") stored.ptype = DISP_SORTJUNCTION_FLIP +/obj/structure/disposalpipe/ComponentInitialize() + . = ..() + AddComponent(/datum/component/rad_insulation, RAD_NO_INSULATION) // pipe is deleted // ensure if holder is present, it is expelled @@ -639,6 +646,7 @@ /obj/structure/disposaloutlet/Initialize(mapload, obj/structure/disposalconstruct/make_from) . = ..() + if(make_from) setDir(make_from.dir) make_from.loc = src @@ -652,6 +660,10 @@ if(trunk) trunk.linked = src // link the pipe trunk to self +/obj/structure/disposaloutlet/ComponentInitialize() + . = ..() + AddComponent(/datum/component/rad_insulation, RAD_NO_INSULATION) + /obj/structure/disposaloutlet/Destroy() if(trunk) trunk.linked = null diff --git a/code/modules/recycling/disposal-unit.dm b/code/modules/recycling/disposal-unit.dm index 9fdc62c8d2..aaaf2596ef 100644 --- a/code/modules/recycling/disposal-unit.dm +++ b/code/modules/recycling/disposal-unit.dm @@ -27,6 +27,7 @@ /obj/machinery/disposal/Initialize(mapload, obj/structure/disposalconstruct/make_from) . = ..() + if(make_from) setDir(make_from.dir) make_from.loc = 0 @@ -40,6 +41,12 @@ //gas.volume = 1.05 * CELLSTANDARD update_icon() + return INITIALIZE_HINT_LATELOAD //we need turfs to have air + +/obj/machinery/disposal/ComponentInitialize() + . = ..() + AddComponent(/datum/component/rad_insulation, RAD_NO_INSULATION) + /obj/machinery/disposal/proc/trunk_check() trunk = locate() in loc if(!trunk) @@ -62,10 +69,6 @@ if(current_size >= STAGE_FIVE) deconstruct() -/obj/machinery/disposal/Initialize(mapload) - ..() - return INITIALIZE_HINT_LATELOAD //we need turfs to have air - /obj/machinery/disposal/LateInitialize() //this will get a copy of the air turf and take a SEND PRESSURE amount of air from it var/atom/L = loc diff --git a/code/modules/research/experimentor.dm b/code/modules/research/experimentor.dm index 3a2b1f6b7f..b167da3487 100644 --- a/code/modules/research/experimentor.dm +++ b/code/modules/research/experimentor.dm @@ -255,7 +255,7 @@ ejectItem() else if(prob(EFFECT_PROB_VERYLOW-badThingCoeff)) visible_message("[src] malfunctions, melting [exp_on] and leaking radiation!") - radiation_pulse(get_turf(src), 1, 1, 25, 1) + radiation_pulse(get_turf(src), 50) ejectItem(TRUE) else if(prob(EFFECT_PROB_LOW-badThingCoeff)) visible_message("[src] malfunctions, spewing toxic waste!") diff --git a/sound/items/geiger/ext1.ogg b/sound/items/geiger/ext1.ogg new file mode 100644 index 0000000000..ca1b44e4d8 Binary files /dev/null and b/sound/items/geiger/ext1.ogg differ diff --git a/sound/items/geiger/ext2.ogg b/sound/items/geiger/ext2.ogg new file mode 100644 index 0000000000..c0c316245b Binary files /dev/null and b/sound/items/geiger/ext2.ogg differ diff --git a/sound/items/geiger/ext3.ogg b/sound/items/geiger/ext3.ogg new file mode 100644 index 0000000000..fc367d9466 Binary files /dev/null and b/sound/items/geiger/ext3.ogg differ diff --git a/sound/items/geiger/ext4.ogg b/sound/items/geiger/ext4.ogg new file mode 100644 index 0000000000..d3b00ebaac Binary files /dev/null and b/sound/items/geiger/ext4.ogg differ diff --git a/sound/items/geiger/high1.ogg b/sound/items/geiger/high1.ogg new file mode 100644 index 0000000000..8725affdd4 Binary files /dev/null and b/sound/items/geiger/high1.ogg differ diff --git a/sound/items/geiger/high2.ogg b/sound/items/geiger/high2.ogg new file mode 100644 index 0000000000..f1e3868898 Binary files /dev/null and b/sound/items/geiger/high2.ogg differ diff --git a/sound/items/geiger/high3.ogg b/sound/items/geiger/high3.ogg new file mode 100644 index 0000000000..bdc5282a5c Binary files /dev/null and b/sound/items/geiger/high3.ogg differ diff --git a/sound/items/geiger/high4.ogg b/sound/items/geiger/high4.ogg new file mode 100644 index 0000000000..8e185d6f78 Binary files /dev/null and b/sound/items/geiger/high4.ogg differ diff --git a/sound/items/geiger/low1.ogg b/sound/items/geiger/low1.ogg new file mode 100644 index 0000000000..9bdb8bd327 Binary files /dev/null and b/sound/items/geiger/low1.ogg differ diff --git a/sound/items/geiger/low2.ogg b/sound/items/geiger/low2.ogg new file mode 100644 index 0000000000..ce4855f25f Binary files /dev/null and b/sound/items/geiger/low2.ogg differ diff --git a/sound/items/geiger/low3.ogg b/sound/items/geiger/low3.ogg new file mode 100644 index 0000000000..70aaea064f Binary files /dev/null and b/sound/items/geiger/low3.ogg differ diff --git a/sound/items/geiger/low4.ogg b/sound/items/geiger/low4.ogg new file mode 100644 index 0000000000..f36e3b7699 Binary files /dev/null and b/sound/items/geiger/low4.ogg differ diff --git a/sound/items/geiger/med1.ogg b/sound/items/geiger/med1.ogg new file mode 100644 index 0000000000..c062c4d2a8 Binary files /dev/null and b/sound/items/geiger/med1.ogg differ diff --git a/sound/items/geiger/med2.ogg b/sound/items/geiger/med2.ogg new file mode 100644 index 0000000000..210119a287 Binary files /dev/null and b/sound/items/geiger/med2.ogg differ diff --git a/sound/items/geiger/med3.ogg b/sound/items/geiger/med3.ogg new file mode 100644 index 0000000000..ed6f0f4d7f Binary files /dev/null and b/sound/items/geiger/med3.ogg differ diff --git a/sound/items/geiger/med4.ogg b/sound/items/geiger/med4.ogg new file mode 100644 index 0000000000..70635a97a3 Binary files /dev/null and b/sound/items/geiger/med4.ogg differ diff --git a/tgstation.dme b/tgstation.dme index 4aece28f1f..a392a7e1ee 100755 --- a/tgstation.dme +++ b/tgstation.dme @@ -62,6 +62,7 @@ #include "code\__DEFINES\pipe_construction.dm" #include "code\__DEFINES\preferences.dm" #include "code\__DEFINES\qdel.dm" +#include "code\__DEFINES\radiation.dm" #include "code\__DEFINES\radio.dm" #include "code\__DEFINES\reagents.dm" #include "code\__DEFINES\robots.dm" @@ -96,6 +97,7 @@ #include "code\__HELPERS\names.dm" #include "code\__HELPERS\priority_announce.dm" #include "code\__HELPERS\pronouns.dm" +#include "code\__HELPERS\radiation.dm" #include "code\__HELPERS\radio.dm" #include "code\__HELPERS\sanitize_values.dm" #include "code\__HELPERS\shell.dm" @@ -238,6 +240,7 @@ #include "code\controllers\subsystem\pai.dm" #include "code\controllers\subsystem\parallax.dm" #include "code\controllers\subsystem\persistence.dm" +#include "code\controllers\subsystem\radiation.dm" #include "code\controllers\subsystem\radio.dm" #include "code\controllers\subsystem\religion.dm" #include "code\controllers\subsystem\server_maint.dm" @@ -284,6 +287,7 @@ #include "code\datums\mutations.dm" #include "code\datums\outfit.dm" #include "code\datums\progressbar.dm" +#include "code\datums\radiation_wave.dm" #include "code\datums\recipe.dm" #include "code\datums\riding.dm" #include "code\datums\ruins.dm" @@ -307,6 +311,8 @@ #include "code\datums\components\infective.dm" #include "code\datums\components\material_container.dm" #include "code\datums\components\paintable.dm" +#include "code\datums\components\rad_insulation.dm" +#include "code\datums\components\radioactive.dm" #include "code\datums\components\slippery.dm" #include "code\datums\components\squeek.dm" #include "code\datums\diseases\_disease.dm" @@ -735,7 +741,6 @@ #include "code\game\objects\items.dm" #include "code\game\objects\obj_defense.dm" #include "code\game\objects\objs.dm" -#include "code\game\objects\radiation.dm" #include "code\game\objects\structures.dm" #include "code\game\objects\weapons.dm" #include "code\game\objects\effects\alien_acid.dm"