mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 19:47:22 +01:00
Adds explosion particles! (#25410)
* Adds explosion particles * Adds back the smoke explosion system * Removes whitespace * Fixes CI * Adds TGMC explosion * Fixes explosions, removes smoke explosions * More particle tweaks * Removes a random extra kickup * Fixes CI by properly removing kickups
This commit is contained in:
@@ -3,35 +3,6 @@
|
||||
* Originally from https://github.com/tgstation/TerraGov-Marine-Corps/pull/12752
|
||||
*/
|
||||
|
||||
/particles/debris
|
||||
icon = 'icons/effects/particles/generic_particles.dmi'
|
||||
width = 500
|
||||
height = 500
|
||||
count = 10
|
||||
spawning = 10
|
||||
lifespan = 0.5 SECONDS
|
||||
fade = 0.3 SECONDS
|
||||
drift = generator("circle", 0, 7)
|
||||
scale = 0.3
|
||||
velocity = list(50, 0)
|
||||
friction = generator("num", 0.1, 0.15)
|
||||
spin = generator("num", -20, 20)
|
||||
|
||||
/particles/impact_smoke
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
icon_state = "smoke"
|
||||
width = 500
|
||||
height = 500
|
||||
count = 20
|
||||
spawning = 20
|
||||
lifespan = 0.8 SECONDS
|
||||
fade = 10 SECONDS
|
||||
grow = 0.1
|
||||
scale = 0.2
|
||||
spin = generator("num", -20, 20)
|
||||
velocity = list(50, 0)
|
||||
friction = generator("num", 0.1, 0.5)
|
||||
|
||||
/datum/component/debris
|
||||
/// Icon state of debris when impacted by a projectile
|
||||
var/debris
|
||||
@@ -76,7 +47,7 @@
|
||||
|
||||
if(debris && P.damage_type == BRUTE)
|
||||
debris_visuals = new(parent, /particles/debris)
|
||||
debris_visuals.particles.position = generator("circle", position_offset, position_offset)
|
||||
debris_visuals.particles.position = generator(GEN_CIRCLE, position_offset, position_offset)
|
||||
debris_visuals.particles.velocity = list(x_component, y_component)
|
||||
debris_visuals.layer = ABOVE_OBJ_LAYER + 0.02
|
||||
debris_visuals.particles.icon_state = debris
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
/// Handles the actual shattering part, throwing shards of whatever is defined on the component everywhere
|
||||
/datum/element/shatters_when_thrown/proc/shatter(atom/movable/source, atom/hit_atom)
|
||||
var/generator/scatter_gen = generator("circle", 0, 48, NORMAL_RAND)
|
||||
var/generator/scatter_gen = generator(GEN_CIRCLE, 0, 48, NORMAL_RAND)
|
||||
var/scatter_turf = get_turf(hit_atom)
|
||||
|
||||
for(var/obj/item/scattered_item as anything in source.contents)
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
/*
|
||||
MARK: Impact debris + smoke
|
||||
*/
|
||||
|
||||
/particles/debris
|
||||
icon = 'icons/effects/particles/generic_particles.dmi'
|
||||
width = 500
|
||||
height = 500
|
||||
count = 10
|
||||
spawning = 10
|
||||
lifespan = 0.5 SECONDS
|
||||
fade = 0.3 SECONDS
|
||||
drift = generator(GEN_CIRCLE, 0, 7)
|
||||
scale = 0.3
|
||||
velocity = list(50, 0)
|
||||
friction = generator(GEN_NUM, 0.1, 0.15)
|
||||
spin = generator(GEN_NUM, -20, 20)
|
||||
|
||||
/particles/impact_smoke
|
||||
icon = 'icons/effects/effects.dmi'
|
||||
icon_state = "smoke"
|
||||
width = 500
|
||||
height = 500
|
||||
count = 20
|
||||
spawning = 20
|
||||
lifespan = 0.8 SECONDS
|
||||
fade = 10 SECONDS
|
||||
grow = 0.1
|
||||
scale = 0.2
|
||||
spin = generator(GEN_NUM, -20, 20)
|
||||
velocity = list(50, 0)
|
||||
friction = generator(GEN_NUM, 0.1, 0.5)
|
||||
|
||||
/*
|
||||
MARK: Explosion smoke
|
||||
*/
|
||||
|
||||
/particles/explosion_smoke
|
||||
icon = 'icons/effects/96x96.dmi'
|
||||
icon_state = "smoke3"
|
||||
width = 1000
|
||||
height = 1000
|
||||
count = 45
|
||||
spawning = 45
|
||||
gradient = list("#FA9632", "#C3630C", "#333333", "#808080", "#FFFFFF")
|
||||
lifespan = 2.5 SECONDS
|
||||
fade = 2 SECONDS
|
||||
color = generator(GEN_NUM, 0, 0.25)
|
||||
color_change = generator(GEN_NUM, 0.04, 0.05)
|
||||
velocity = generator(GEN_CIRCLE, 15, 15)
|
||||
drift = generator(GEN_CIRCLE, 0, 1, NORMAL_RAND)
|
||||
spin = generator(GEN_NUM, -20, 20)
|
||||
friction = generator(GEN_NUM, 0.1, 0.5)
|
||||
gravity = list(1, 2)
|
||||
scale = 0.25
|
||||
grow = 0.05
|
||||
|
||||
/particles/explosion_smoke/deva
|
||||
scale = 0.5
|
||||
velocity = generator(GEN_CIRCLE, 23, 23)
|
||||
|
||||
/particles/explosion_smoke/small
|
||||
count = 15
|
||||
spawning = 15
|
||||
scale = 0.25
|
||||
velocity = generator(GEN_CIRCLE, 10, 10)
|
||||
|
||||
/particles/smoke_wave
|
||||
icon = 'icons/effects/96x96.dmi'
|
||||
icon_state = "smoke3"
|
||||
width = 750
|
||||
height = 750
|
||||
count = 75
|
||||
spawning = 75
|
||||
lifespan = 3 SECONDS
|
||||
fade = 6 SECONDS
|
||||
gradient = list("#BA9F6D", "#808080", "#FFFFFF")
|
||||
color = generator(GEN_NUM, 0, 0.25)
|
||||
color_change = generator(GEN_NUM, 0.08, 0.07)
|
||||
velocity = generator(GEN_CIRCLE, 15, 15)
|
||||
rotation = generator(GEN_NUM, -45, 45)
|
||||
scale = 0.15
|
||||
grow = 0.05
|
||||
friction = 0.1
|
||||
|
||||
/particles/smoke_wave/small
|
||||
count = 45
|
||||
spawning = 45
|
||||
scale = 0.05
|
||||
lifespan = 2 SECONDS
|
||||
fade = 5 SECONDS
|
||||
|
||||
/particles/sparks_outwards
|
||||
icon = 'icons/effects/64x64.dmi'
|
||||
icon_state = "flare"
|
||||
width = 750
|
||||
height = 750
|
||||
count = 40
|
||||
spawning = 20
|
||||
lifespan = 5 SECONDS
|
||||
fade = 2 SECONDS
|
||||
position = generator(GEN_SPHERE, 8, 8)
|
||||
velocity = generator(GEN_CIRCLE, 30, 30)
|
||||
scale = 0.1
|
||||
friction = 0.1
|
||||
Reference in New Issue
Block a user