Files
Aurora.3/code/game/objects/effects/explosion_particles.dm
Fluffy 86f8d6fd4f Movement update v2 (#20548)
Refactored (second passage) how movement works, now it's mostly in line
with TG handling and avoids calling 3 gazillion Cross() Uncross() etc.
on every atom in a turf.
Fixed EMP protection from species not actually protecting (this includes
the surge prevention for IPCs).
Fixed EMP 3D calculation runtiming because I forgot to make the value
absolute and it was doing the square root of a negative number.
It's now possible to queue the round to start with the Start Round verb
even while the system is initializing, for an even faster pain train to
enter the round and test things.
2025-03-22 11:38:05 +00:00

73 lines
1.7 KiB
Plaintext

/obj/effect/expl_particles
name = "explosive particles"
icon = 'icons/effects/effects.dmi'
icon_state = "explosion_particle"
opacity = 1
anchored = 1
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
/obj/effect/expl_particles/New()
..()
QDEL_IN(src, 15)
return
/obj/effect/expl_particles/Move()
. = ..()
return
/obj/effect/expl_particles/Destroy()
. = ..()
GC_TEMPORARY_HARDDEL
/datum/effect/system/expl_particles
var/number = 10
var/turf/location
var/total_particles = 0
/datum/effect/system/expl_particles/proc/set_up(n = 10, loca)
number = n
if(istype(loca, /turf/)) location = loca
else location = get_turf(loca)
/datum/effect/system/expl_particles/proc/start()
var/i = 0
for(i=0, i<src.number, i++)
spawn(0)
var/obj/effect/expl_particles/expl = new /obj/effect/expl_particles(src.location)
var/direct = pick(GLOB.alldirs)
for(i=0, i<pick(1;25,2;50,3,4;200), i++)
sleep(1)
step(expl,direct)
/obj/effect/explosion
name = "explosive particles"
icon = 'icons/effects/96x96.dmi'
icon_state = "explosion"
opacity = 1
anchored = 1
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
pixel_x = -32
pixel_y = -32
/obj/effect/explosion/New()
..()
QDEL_IN(src, 10)
return
/datum/effect/system/explosion
var/turf/location
/datum/effect/system/explosion/proc/set_up(loca)
if(istype(loca, /turf/)) location = loca
else location = get_turf(loca)
/datum/effect/system/explosion/proc/start()
new/obj/effect/explosion( location )
var/datum/effect/system/expl_particles/P = new/datum/effect/system/expl_particles()
P.set_up(10,location)
P.start()
spawn(5)
var/datum/effect/effect/system/smoke_spread/S = new/datum/effect/effect/system/smoke_spread()
S.set_up(5,0,location,null)
S.start()