mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-18 18:44:48 +01:00
supermatter gets darker as it delams, rather than brighter, below 50% it darkens the area (#21639)
* supermatter gets darker as it delams, rather than brighter, below 50% it darkens the area * invert logic * removes excess lines * removes else and returns * fixes bad return
This commit is contained in:
@@ -175,6 +175,8 @@
|
||||
var/obj/effect/warp_effect/supermatter/warp
|
||||
///A variable to have the warp effect for singulo SM work properly
|
||||
var/pulse_stage = 0
|
||||
///This list will hold 4 supermatter darkness effects when the supermatter is delaminating to a singulo delam. This lets me darken the area to look better, as it turns out, walls make the effect look ugly as shit.
|
||||
var/list/darkness_effects = list()
|
||||
|
||||
///Boolean used for logging if we've been powered
|
||||
var/has_been_powered = FALSE
|
||||
@@ -233,6 +235,7 @@
|
||||
if(is_main_engine && GLOB.main_supermatter_engine == src)
|
||||
GLOB.main_supermatter_engine = null
|
||||
QDEL_NULL(soundloop)
|
||||
QDEL_NULL(darkness_effects)
|
||||
return ..()
|
||||
|
||||
/obj/machinery/atmospherics/supermatter_crystal/examine(mob/user)
|
||||
@@ -912,13 +915,34 @@
|
||||
l_power = 3,
|
||||
l_color = SUPERMATTER_TESLA_COLOUR,
|
||||
)
|
||||
if(combined_gas > MOLE_PENALTY_THRESHOLD)
|
||||
if(combined_gas > MOLE_PENALTY_THRESHOLD && get_integrity() > SUPERMATTER_DANGER_PERCENT)
|
||||
set_light(
|
||||
l_range = 4 + clamp(damage / 2, 10, 50),
|
||||
l_range = 4 + clamp((450 - damage) / 10, 1, 50),
|
||||
l_power = 3,
|
||||
l_color = SUPERMATTER_SINGULARITY_LIGHT_COLOUR,
|
||||
)
|
||||
if(!combined_gas > MOLE_PENALTY_THRESHOLD || !get_integrity() < SUPERMATTER_DANGER_PERCENT)
|
||||
for(var/obj/D in darkness_effects)
|
||||
qdel(D)
|
||||
return
|
||||
|
||||
var/darkness_strength = clamp((damage - 450) / 75, 1, 8) / 2
|
||||
var/darkness_aoe = clamp((damage - 450) / 25, 1, 25)
|
||||
set_light(
|
||||
l_range = 4 + darkness_aoe,
|
||||
l_power = -1 - darkness_strength,
|
||||
l_color = "#ddd6cf")
|
||||
if(!length(darkness_effects) && moveable) //Don't do this on movable sms oh god. Ideally don't do this at all, but hey, that's lightning for you
|
||||
darkness_effects += new /obj/effect/abstract(locate(x-3,y+3,z))
|
||||
darkness_effects += new /obj/effect/abstract(locate(x+3,y+3,z))
|
||||
darkness_effects += new /obj/effect/abstract(locate(x-3,y-3,z))
|
||||
darkness_effects += new /obj/effect/abstract(locate(x+3,y-3,z))
|
||||
else
|
||||
for(var/obj/O in darkness_effects)
|
||||
O.set_light(
|
||||
l_range = 0 + darkness_aoe,
|
||||
l_power = -1 - darkness_strength / 1.25,
|
||||
l_color = "#ddd6cf")
|
||||
|
||||
/obj/effect/warp_effect/supermatter
|
||||
plane = GRAVITY_PULSE_PLANE
|
||||
|
||||
Reference in New Issue
Block a user