mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2026-08-23 12:47:13 +01:00
Fix cosmetic glow quirk runtime
This commit is contained in:
@@ -1507,7 +1507,8 @@
|
||||
var/mob/living/carbon/human/action_mob = owner
|
||||
|
||||
// Add outline effect
|
||||
action_mob.add_filter("rad_fiend_glow", 1, list("type" = "outline", "color" = glow_color+"30", "size" = glow_range))
|
||||
if(glow_color && glow_range)
|
||||
action_mob.add_filter("rad_fiend_glow", 1, list("type" = "outline", "color" = glow_color+"30", "size" = glow_range))
|
||||
|
||||
/datum/action/cosglow/update_glow/Remove()
|
||||
. = ..()
|
||||
@@ -1532,16 +1533,19 @@
|
||||
glow_color = (input_color ? input_color : glow_color)
|
||||
|
||||
// Ask user for range input
|
||||
var/input_range = input(action_mob, "How much do you glow? Value may range between 1 to 2.", "Select Glow Range", glow_range) as num|null
|
||||
var/input_range = input(action_mob, "How much do you glow? Value may range between 0 to 4. 0 disables glow.", "Select Glow Range", glow_range) as num|null
|
||||
|
||||
// Check if range input was given
|
||||
// Reset to stored color when not given input
|
||||
// Input is clamped in the 1-4 range
|
||||
glow_range = (input_range ? clamp(input_range, 0, 4) : glow_range) //More customisable, so you know when you're looking at someone with Radfiend (doom) or a normal player.
|
||||
// Disable glow if input is 0.
|
||||
// Reset to stored range when input is null.
|
||||
// Input is clamped in the 0-4 range
|
||||
glow_range = isnull(input_range) ? glow_range : clamp(input_range, 0, 4) //More customisable, so you know when you're looking at someone with Radfiend (doom) or a normal player.
|
||||
|
||||
// Update outline effect
|
||||
action_mob.remove_filter("rad_fiend_glow")
|
||||
action_mob.add_filter("rad_fiend_glow", 1, list("type" = "outline", "color" = glow_color+"30", "size" = glow_range))
|
||||
if(glow_range && glow_color)
|
||||
action_mob.add_filter("rad_fiend_glow", 1, list("type" = "outline", "color" = glow_color+"30", "size" = glow_range))
|
||||
else
|
||||
action_mob.remove_filter("rad_fiend_glow")
|
||||
|
||||
//
|
||||
// Quirk: Rad Fiend
|
||||
|
||||
Reference in New Issue
Block a user