mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-27 05:57:24 +01:00
add fade out effect to all smoke (untested), move nanofrost smoke to effects_smoke.dm, make smoke effects OOP (unfinished)
This commit is contained in:
@@ -319,7 +319,9 @@
|
||||
pass_flags = PASSTABLE
|
||||
|
||||
/obj/effect/nanofrost_container/proc/Smoke()
|
||||
new /obj/effect/effect/freezing_smoke(src.loc, 6, 1)
|
||||
var/datum/effect/system/smoke_spread/freezing/S = new
|
||||
S.set_up(6, 0, loc, null, 1)
|
||||
S.start()
|
||||
var/obj/effect/decal/cleanable/flour/F = new /obj/effect/decal/cleanable/flour(src.loc)
|
||||
F.color = "#B2FFFF"
|
||||
F.name = "nanofrost residue"
|
||||
@@ -327,78 +329,6 @@
|
||||
playsound(src,'sound/effects/bamf.ogg',100,1)
|
||||
qdel(src)
|
||||
|
||||
/obj/effect/effect/freezing_smoke
|
||||
name = "nanofrost smoke"
|
||||
icon_state = "smoke"
|
||||
opacity = 0
|
||||
anchored = 0.0
|
||||
mouse_opacity = 0
|
||||
icon = 'icons/effects/96x96.dmi'
|
||||
pixel_x = -32
|
||||
pixel_y = -32
|
||||
color = "#B2FFFF"
|
||||
var/amount = 0
|
||||
|
||||
/obj/effect/effect/freezing_smoke/New(loc, var/amt, var/blast)
|
||||
..()
|
||||
spawn(100+rand(10,30))
|
||||
delete()
|
||||
amount = amt
|
||||
if(amount)
|
||||
var/datum/effect/system/freezing_smoke_spread/F = new /datum/effect/system/freezing_smoke_spread
|
||||
F.set_up(amount, 0, src.loc)
|
||||
F.start()
|
||||
if(blast)
|
||||
for(var/turf/T in spiral_range_turfs(2, src.loc))
|
||||
Chilled(T)
|
||||
return
|
||||
|
||||
/obj/effect/effect/freezing_smoke/proc/Chilled(atom/A)
|
||||
if(istype(A, /turf/simulated))
|
||||
var/turf/simulated/T = A
|
||||
if(T.air)
|
||||
var/datum/gas_mixture/G = T.air
|
||||
if(get_dist(T, src) < 2) // Otherwise we'll get silliness like people using Nanofrost to kill people through walls with cold air
|
||||
G.temperature = 2
|
||||
T.air_update_turf()
|
||||
for(var/obj/effect/hotspot/H in T)
|
||||
qdel(H)
|
||||
if(G.toxins)
|
||||
G.nitrogen += (G.toxins)
|
||||
G.toxins = 0
|
||||
for(var/obj/machinery/atmospherics/unary/vent_pump/V in T)
|
||||
V.welded = 1
|
||||
V.update_icon()
|
||||
V.visible_message("<span class='danger'>[V] was frozen shut!</span>")
|
||||
for(var/mob/living/L in T)
|
||||
L.ExtinguishMob()
|
||||
for(var/obj/item/Item in T)
|
||||
Item.extinguish()
|
||||
|
||||
/datum/effect/system/freezing_smoke_spread
|
||||
|
||||
/datum/effect/system/freezing_smoke_spread/set_up(n = 6, c = 0, loca)
|
||||
number = n
|
||||
if(istype(loca, /turf/))
|
||||
location = loca
|
||||
else
|
||||
location = get_turf(loca)
|
||||
|
||||
/datum/effect/system/freezing_smoke_spread/start()
|
||||
var/i = 0
|
||||
for(i=0, i<number, i++)
|
||||
spawn(0)
|
||||
var/obj/effect/effect/freezing_smoke/smoke = new /obj/effect/effect/freezing_smoke(location, 0, 0)
|
||||
smoke.amount = 0
|
||||
var/direction = pick(alldirs)
|
||||
for(i=0, i<rand(1,3), i++)
|
||||
sleep(5)
|
||||
step(smoke,direction)
|
||||
spawn(150+rand(10,30))
|
||||
if(smoke)
|
||||
fadeOut(smoke)
|
||||
smoke.delete()
|
||||
|
||||
#undef EXTINGUISHER
|
||||
#undef NANOFROST
|
||||
#undef METAL_FOAM
|
||||
|
||||
Reference in New Issue
Block a user