From 0a9ffc234a790ec70e940e707c1de00ed75c779f Mon Sep 17 00:00:00 2001 From: Dip Date: Sat, 19 Sep 2020 03:07:17 -0300 Subject: [PATCH] SON THIS IS RAD --- code/__DEFINES/layers.dm | 2 ++ code/datums/components/radioactive.dm | 16 +++++++++++++++- code/datums/radiation_wave.dm | 1 - code/modules/clothing/glasses/engine_goggles.dm | 14 +++++++------- 4 files changed, 24 insertions(+), 9 deletions(-) diff --git a/code/__DEFINES/layers.dm b/code/__DEFINES/layers.dm index 45fb2819..5bea58f3 100644 --- a/code/__DEFINES/layers.dm +++ b/code/__DEFINES/layers.dm @@ -80,6 +80,8 @@ #define LIGHTING_PLANE 15 #define LIGHTING_LAYER 15 +#define RAD_TEXT_LAYER 15.1 + #define ABOVE_LIGHTING_PLANE 16 #define ABOVE_LIGHTING_LAYER 16 diff --git a/code/datums/components/radioactive.dm b/code/datums/components/radioactive.dm index bf47793f..674ab2ef 100644 --- a/code/datums/components/radioactive.dm +++ b/code/datums/components/radioactive.dm @@ -30,10 +30,18 @@ if(strength > RAD_MINIMUM_CONTAMINATION) SSradiation.warn(src) + //Let's make er glow + //This relies on parent not being a turf or something. IF YOU CHANGE THAT, CHANGE THIS + var/atom/movable/master = parent + master.add_filter("rad_glow", 2, list("type" = "outline", "color" = "#39ff1430", "size" = 2)) + addtimer(CALLBACK(src, .proc/glow_loop, master), rand(1,19))//Things should look uneven + START_PROCESSING(SSradiation, src) /datum/component/radioactive/Destroy() STOP_PROCESSING(SSradiation, src) + var/atom/movable/master = parent + master.remove_filter("rad_glow") return ..() /datum/component/radioactive/process() @@ -47,6 +55,12 @@ if(strength <= RAD_BACKGROUND_RADIATION) return PROCESS_KILL +/datum/component/radioactive/proc/glow_loop(atom/movable/master) + var/filter = master.get_filter("rad_glow") + if(filter) + animate(filter, alpha = 110, time = 15, loop = -1) + animate(alpha = 40, time = 25) + /datum/component/radioactive/InheritComponent(datum/component/C, i_am_original, list/arguments) if(!i_am_original) return @@ -82,4 +96,4 @@ #undef RAD_AMOUNT_LOW #undef RAD_AMOUNT_MEDIUM #undef RAD_AMOUNT_HIGH -#undef RAD_AMOUNT_EXTREME \ No newline at end of file +#undef RAD_AMOUNT_EXTREME diff --git a/code/datums/radiation_wave.dm b/code/datums/radiation_wave.dm index 5fb777f9..1d1929b6 100644 --- a/code/datums/radiation_wave.dm +++ b/code/datums/radiation_wave.dm @@ -99,7 +99,6 @@ // modify the ignored_things list in __HELPERS/radiation.dm instead var/static/list/blacklisted = typecacheof(list( /turf, - /mob, /obj/structure/cable, /obj/machinery/atmospherics, /obj/item/ammo_casing, diff --git a/code/modules/clothing/glasses/engine_goggles.dm b/code/modules/clothing/glasses/engine_goggles.dm index 47706a3e..bbeabbe0 100644 --- a/code/modules/clothing/glasses/engine_goggles.dm +++ b/code/modules/clothing/glasses/engine_goggles.dm @@ -90,17 +90,17 @@ for(var/i in rad_places) var/turf/place = i - if(get_dist(user, place) >= range*2) //Rads are easier to see than wires under the floor + if(get_dist(user, place) >= range*8) //Rads are easier to see than wires under the floor continue var/strength = round(rad_places[i] / 1000, 0.1) - var/image/pic = new(loc = place) + var/image/pic = image(loc = place) var/mutable_appearance/MA = new() - MA.alpha = 180 - MA.maptext = "[strength]k" - MA.color = "#64C864" - MA.layer = FLY_LAYER + MA.maptext = "[strength]k" + MA.color = "#04e604" + MA.layer = RAD_TEXT_LAYER + MA.plane = GAME_PLANE pic.appearance = MA - flick_overlay(pic, list(user.client), 8) + flick_overlay(pic, list(user.client), 10) /obj/item/clothing/glasses/meson/engine/proc/show_shuttle() var/mob/living/carbon/human/user = loc