mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2025-12-31 12:01:47 +00:00
About The Pull Request Makes smoke propagate the fingerprints of the last person to touch the source of the smoke. This makes gunpowder smoke actually log the person responsible for the explosions. Why It's Good For The Game As of right now gunpowder smoke (and similar) doesn't actually have very good logging as as far as the smoke is concerned it's never been touched and so the resulting explosions are blameless. Obviously, scrolling up for a good minute looking for who has just obliterated the escape shuttle is slightly annoying for the admins. Ergo, making the explosions log who actually is responsible for making the smoke they originate from should reduce admin annoyance. Changelog cl admin: Smoke now logs the last person to touch the source of the smoke as the last person to touch the smoke itself. Gunpowder smoke should be less annoying to log dive as a result as every explosion will log that person. /cl
67 lines
1.8 KiB
Plaintext
67 lines
1.8 KiB
Plaintext
/obj/effect/particle_effect/expl_particles
|
|
name = "fire"
|
|
icon_state = "explosion_particle"
|
|
opacity = TRUE
|
|
anchored = TRUE
|
|
|
|
/obj/effect/particle_effect/expl_particles/Initialize(mapload)
|
|
..()
|
|
return INITIALIZE_HINT_LATELOAD
|
|
|
|
/obj/effect/particle_effect/expl_particles/LateInitialize()
|
|
var/step_amt = pick(25;1,50;2,100;3,200;4)
|
|
|
|
var/datum/move_loop/loop = SSmove_manager.move(src, pick(GLOB.alldirs), 1, timeout = step_amt, priority = MOVEMENT_ABOVE_SPACE_PRIORITY)
|
|
RegisterSignal(loop, COMSIG_PARENT_QDELETING, .proc/end_particle)
|
|
|
|
/obj/effect/particle_effect/expl_particles/proc/end_particle(datum/source)
|
|
SIGNAL_HANDLER
|
|
if(QDELETED(src))
|
|
return
|
|
qdel(src)
|
|
|
|
/datum/effect_system/expl_particles
|
|
number = 10
|
|
|
|
/datum/effect_system/expl_particles/start()
|
|
for(var/i in 1 to number)
|
|
new /obj/effect/particle_effect/expl_particles(location)
|
|
|
|
/obj/effect/explosion
|
|
name = "fire"
|
|
icon = 'icons/effects/96x96.dmi'
|
|
icon_state = "explosion"
|
|
opacity = TRUE
|
|
anchored = TRUE
|
|
layer = ABOVE_ALL_MOB_LAYER
|
|
plane = ABOVE_GAME_PLANE
|
|
mouse_opacity = MOUSE_OPACITY_TRANSPARENT
|
|
pixel_x = -32
|
|
pixel_y = -32
|
|
|
|
/obj/effect/explosion/Initialize(mapload)
|
|
. = ..()
|
|
QDEL_IN(src, 10)
|
|
|
|
/datum/effect_system/explosion
|
|
|
|
/datum/effect_system/explosion/set_up(location)
|
|
src.location = get_turf(location)
|
|
|
|
/datum/effect_system/explosion/start()
|
|
new/obj/effect/explosion( location )
|
|
var/datum/effect_system/expl_particles/P = new/datum/effect_system/expl_particles()
|
|
P.set_up(10, 0, location)
|
|
P.start()
|
|
|
|
/datum/effect_system/explosion/smoke
|
|
|
|
/datum/effect_system/explosion/smoke/proc/create_smoke()
|
|
var/datum/effect_system/fluid_spread/smoke/S = new
|
|
S.set_up(2, holder = holder, location = location)
|
|
S.start()
|
|
|
|
/datum/effect_system/explosion/smoke/start()
|
|
..()
|
|
addtimer(CALLBACK(src, .proc/create_smoke), 5)
|