mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-11 10:22:13 +00:00
Merge pull request #13069 from Chiirno/radioactive-port
Ports TG #51879 - Makes rads glow, buffs rad goggles
This commit is contained in:
@@ -131,6 +131,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"
|
||||
|
||||
@@ -29,10 +29,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()
|
||||
@@ -46,6 +54,13 @@
|
||||
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, _strength, _source, _half_life, _can_contaminate)
|
||||
if(!i_am_original)
|
||||
return
|
||||
|
||||
@@ -105,7 +105,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,
|
||||
|
||||
@@ -97,14 +97,14 @@
|
||||
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 = "<span class='maptext'>[strength]k</span>"
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user