mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-26 13:37:58 +01:00
Supermatter slivers (cut off from the SM) have a slightly glowy ray effect to them, and soul shards (#21261)
* she supers my matter till I delam * incorrect delamination alarm * now soulstones glow to make them not get lost * Helper proc, also fixes supermatter visual bugging out on high mole pressure * moved
This commit is contained in:
@@ -318,3 +318,8 @@ GLOBAL_LIST_INIT(master_filter_info, list(
|
||||
filter = in_atom.get_filter("wibbly-[i]")
|
||||
animate(filter)
|
||||
in_atom.remove_filter("wibbly-[i]")
|
||||
|
||||
/// Used to create rays on an item. Make sure to removefilter("rays") when done with it
|
||||
/atom/proc/ray_filter_helper(_priority = 1, _size = 40, _color = "#FFFFFF", _factor = 6, _density = 20)
|
||||
add_filter(name = "ray", priority = _priority, params = list(type = "rays", size = _size, color = _color , factor = _factor, density = _density))
|
||||
|
||||
|
||||
@@ -79,8 +79,21 @@
|
||||
for(var/mob/living/simple_animal/shade/A in src)
|
||||
A.death()
|
||||
remove_held_body()
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
return ..()
|
||||
|
||||
/obj/item/soulstone/process()
|
||||
. = ..()
|
||||
if(held_body)
|
||||
var/new_filter = isnull(get_filter("ray"))
|
||||
if(!purified)
|
||||
ray_filter_helper(1, 40,"#c926ae", 6, 20)
|
||||
else
|
||||
ray_filter_helper(1, 40,"#268dc9", 6, 20)
|
||||
if(new_filter)
|
||||
animate(get_filter("ray"), offset = 10, time = 10 SECONDS, loop = -1)
|
||||
animate(offset = 0, time = 10 SECONDS)
|
||||
|
||||
//////////////////////////////Capturing////////////////////////////////////////////////////////
|
||||
/obj/item/soulstone/attack(mob/living/carbon/human/M, mob/living/user)
|
||||
if(M == user)
|
||||
@@ -162,6 +175,7 @@
|
||||
|
||||
add_attack_logs(user, M, "Stolestone'd with [name]")
|
||||
transfer_soul("VICTIM", M, user)
|
||||
START_PROCESSING(SSobj, src)
|
||||
return
|
||||
|
||||
/obj/item/soulstone/attackby(obj/item/O, mob/user)
|
||||
@@ -171,6 +185,7 @@
|
||||
to_chat(user, "<span class='notice'>You begin to exorcise [src].</span>")
|
||||
playsound(src, 'sound/hallucinations/veryfar_noise.ogg', 40, TRUE)
|
||||
if(do_after(user, 40, target = src))
|
||||
remove_filter("ray")
|
||||
usability = TRUE
|
||||
purified = TRUE
|
||||
optional = TRUE
|
||||
@@ -197,6 +212,7 @@
|
||||
return
|
||||
to_chat(user, "<span class='notice'>You begin to cleanse [src] of holy magic.</span>")
|
||||
if(do_after(user, 40, target = src))
|
||||
remove_filter("ray")
|
||||
usability = FALSE
|
||||
purified = FALSE
|
||||
optional = FALSE
|
||||
@@ -259,6 +275,8 @@
|
||||
else
|
||||
to_chat(A, "<span class='userdanger'>You have been released from your prison, but you are still bound to your [purified ? "saviour" : "creator"]'s will.</span>")
|
||||
was_used()
|
||||
remove_filter("ray")
|
||||
STOP_PROCESSING(SSobj, src)
|
||||
|
||||
///////////////////////////Transferring to constructs/////////////////////////////////////////////////////
|
||||
/obj/structure/constructshell
|
||||
@@ -343,6 +361,7 @@
|
||||
name = "soulstone : [T.name]"
|
||||
to_chat(T, "<span class='notice'>Your soul has been recaptured by the soul stone, its arcane energies are reknitting your ethereal form</span>")
|
||||
to_chat(user, "<span class='notice'>Capture successful!</span> [T.name]'s has been recaptured and stored within the soul stone.")
|
||||
START_PROCESSING(SSobj, src)
|
||||
|
||||
if("CONSTRUCT")
|
||||
var/obj/structure/constructshell/shell = target
|
||||
|
||||
@@ -158,6 +158,14 @@
|
||||
icon_state = "supermatter_sliver"
|
||||
pulseicon = "supermatter_sliver_pulse"
|
||||
|
||||
/obj/item/nuke_core/supermatter_sliver/process()
|
||||
. = ..()
|
||||
var/new_filter = isnull(get_filter("ray"))
|
||||
ray_filter_helper(1, 40,"#ffd04f", 6, 20)
|
||||
if(new_filter)
|
||||
animate(get_filter("ray"), offset = 10, time = 10 SECONDS, loop = -1)
|
||||
animate(offset = 0, time = 10 SECONDS)
|
||||
|
||||
/obj/item/nuke_core/supermatter_sliver/attack_tk(mob/user) // no TK dusting memes
|
||||
return
|
||||
|
||||
|
||||
@@ -173,6 +173,8 @@
|
||||
var/obj/item/radio/radio
|
||||
///Reference to the warp effect
|
||||
var/obj/effect/warp_effect/supermatter/warp
|
||||
///A variable to have the warp effect for singulo SM work properly
|
||||
var/pulse_stage = 0
|
||||
|
||||
///Boolean used for logging if we've been powered
|
||||
var/has_been_powered = FALSE
|
||||
@@ -840,15 +842,7 @@
|
||||
|
||||
/obj/machinery/atmospherics/supermatter_crystal/proc/sm_filters()
|
||||
var/new_filter = isnull(get_filter("ray"))
|
||||
|
||||
add_filter(name = "ray", priority = 1, params = list(
|
||||
type = "rays",
|
||||
size = power ? clamp((damage/100) * power, 50, 125) : 1,
|
||||
color = (gasmix_power_ratio> 0.8 ? SUPERMATTER_RED : SUPERMATTER_COLOUR),
|
||||
factor = clamp(damage/600, 1, 10),
|
||||
density = clamp(damage/10, 12, 100)
|
||||
))
|
||||
|
||||
ray_filter_helper(1, power ? clamp((damage/100) * power, 50, 125) : 1, (gasmix_power_ratio> 0.8 ? SUPERMATTER_RED : SUPERMATTER_COLOUR), clamp(damage/600, 1, 10), clamp(damage/10, 12, 100))
|
||||
// Filter animation persists even if the filter itself is changed externally.
|
||||
// Probably prone to breaking. Treat with suspicion.
|
||||
if(new_filter)
|
||||
@@ -856,13 +850,7 @@
|
||||
animate(offset = 0, time = 10 SECONDS)
|
||||
|
||||
if(power > POWER_PENALTY_THRESHOLD)
|
||||
add_filter(name = "ray", priority = 1, params = list(
|
||||
type = "rays",
|
||||
size = power ? clamp((damage/100) * power, 50, 175) : 1, //Higher power
|
||||
color = SUPERMATTER_TESLA_COLOUR,
|
||||
factor = clamp(damage/300, 1, 20),
|
||||
density = clamp(damage/5, 12, 200)
|
||||
))
|
||||
ray_filter_helper(1, power ? clamp((damage/100) * power, 50, 175) : 1, SUPERMATTER_TESLA_COLOUR, clamp(damage/300, 1, 20), clamp(damage/5, 12, 200))
|
||||
if(prob(25))
|
||||
new /obj/effect/warp_effect/bsg(get_turf(src)) //Some extra visual effect to the shocking sm which is a bit less interesting.
|
||||
if(final_countdown)
|
||||
@@ -875,13 +863,7 @@
|
||||
remove_filter("icon")
|
||||
|
||||
if(combined_gas > MOLE_PENALTY_THRESHOLD)
|
||||
add_filter(name = "ray", priority = 1, params=list(
|
||||
type = "rays",
|
||||
size = power ? clamp((damage/100) * power, 50, 125) : 1,
|
||||
color = SUPERMATTER_SINGULARITY_RAYS_COLOUR,
|
||||
factor = clamp(damage / 300, 1, 30),
|
||||
density = clamp(damage / 5, 12, 300) //More compressed due to gravity
|
||||
))
|
||||
ray_filter_helper(1, power ? clamp((damage/100) * power, 50, 125) : 1, SUPERMATTER_SINGULARITY_RAYS_COLOUR, clamp(damage / 300, 1, 30), clamp(damage / 5, 12, 300))
|
||||
|
||||
add_filter(name = "outline", priority = 2, params = list(
|
||||
type = "outline",
|
||||
@@ -891,8 +873,12 @@
|
||||
if(!warp)
|
||||
warp = new(src)
|
||||
vis_contents += warp
|
||||
animate(warp, time = 6, transform = matrix().Scale(0.5,0.5))
|
||||
animate(time = 14, transform = matrix())
|
||||
if(pulse_stage == 4)
|
||||
animate(warp, time = 6, transform = matrix().Scale(0.5,0.5))
|
||||
animate(time = 14, transform = matrix())
|
||||
pulse_stage = 0
|
||||
else
|
||||
pulse_stage++
|
||||
if(final_countdown)
|
||||
add_filter(name = "icon", priority = 3, params = list(
|
||||
type = "layer",
|
||||
|
||||
Reference in New Issue
Block a user