diff --git a/code/__DEFINES/layers.dm b/code/__DEFINES/layers.dm index 7591da38534..984b99dd133 100644 --- a/code/__DEFINES/layers.dm +++ b/code/__DEFINES/layers.dm @@ -107,6 +107,8 @@ #define LIGHTING_LAYER 15 #define LIGHTING_RENDER_TARGET "LIGHT_PLANE" +#define RAD_TEXT_LAYER 15.1 + #define ABOVE_LIGHTING_PLANE 16 #define ABOVE_LIGHTING_LAYER 16 #define ABOVE_LIGHTING_RENDER_TARGET "ABOVE_LIGHTING_PLANE" diff --git a/code/datums/components/radioactive.dm b/code/datums/components/radioactive.dm index 8127710e2d1..7e62afc5ae4 100644 --- a/code/datums/components/radioactive.dm +++ b/code/datums/components/radioactive.dm @@ -7,7 +7,6 @@ dupe_mode = COMPONENT_DUPE_UNIQUE_PASSARGS var/source - var/hl3_release_date //the half-life measured in ticks var/strength var/can_contaminate @@ -17,7 +16,6 @@ source = _source hl3_release_date = _half_life can_contaminate = _can_contaminate - if(istype(parent, /atom)) RegisterSignal(parent, COMSIG_PARENT_EXAMINE, .proc/rad_examine) if(istype(parent, /obj/item)) @@ -25,21 +23,25 @@ RegisterSignal(parent, COMSIG_ITEM_ATTACK_OBJ, .proc/rad_attack) else return COMPONENT_INCOMPATIBLE - 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() if(!prob(50)) return radiation_pulse(parent, strength, RAD_DISTANCE_COEFFICIENT*2, FALSE, can_contaminate) - if(!hl3_release_date) return strength -= strength / hl3_release_date @@ -47,6 +49,12 @@ qdel(src) 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, _strength, _source, _half_life, _can_contaminate) if(!i_am_original) return diff --git a/code/datums/radiation_wave.dm b/code/datums/radiation_wave.dm index b27b044ad2c..9a39f008c57 100644 --- a/code/datums/radiation_wave.dm +++ b/code/datums/radiation_wave.dm @@ -116,7 +116,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/game/atoms.dm b/code/game/atoms.dm index 373f47caa04..15282d346da 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -1327,6 +1327,11 @@ if(filter_data && filter_data[name]) return filters[filter_data.Find(name)] +/atom/movable/proc/remove_filter(name) + if(filter_data && filter_data[name]) + filter_data -= name + update_filters() + /atom/proc/intercept_zImpact(atom/movable/AM, levels = 1) . |= SEND_SIGNAL(src, COMSIG_ATOM_INTERCEPT_Z_FALL, AM, levels) diff --git a/code/modules/clothing/glasses/engine_goggles.dm b/code/modules/clothing/glasses/engine_goggles.dm index 16f8847d591..3783427adcc 100644 --- a/code/modules/clothing/glasses/engine_goggles.dm +++ b/code/modules/clothing/glasses/engine_goggles.dm @@ -101,17 +101,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*5) //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