Supermatter eats the closed turf it's inside.

Because /turf/closed doesn't respect atmos and an SM engine in a plasmafire unharmed because it's inside a turf is questionable.
This commit is contained in:
BlackMajor
2019-05-30 16:17:33 +12:00
parent 20bbc0888d
commit 0d06605662
2 changed files with 14 additions and 13 deletions
@@ -295,6 +295,16 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
E.energy = power
qdel(src)
/obj/machinery/power/supermatter_crystal/proc/consume_turf(turf/T)
var/oldtype = T.type
var/turf/newT = T.ScrapeAway()
if(newT.type == oldtype)
return
playsound(T, 'sound/effects/supermatter.ogg', 50, 1)
T.visible_message("<span class='danger'>[T] smacks into [src] and rapidly flashes to ash.</span>",\
"<span class='italics'>You hear a loud crack as you are washed with a wave of heat.</span>")
T.CalculateAdjacentTurfs()
/obj/machinery/power/supermatter_crystal/process_atmos()
var/turf/T = loc
@@ -303,6 +313,8 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
if(!istype(T)) //We are in a crate or somewhere that isn't turf, if we return to turf resume processing but for now.
return //Yeah just stop.
if(istype(T, /turf/closed))
consume_turf(T)
if(power)
soundloop.volume = min(40, (round(power/100)/50)+1) // 5 +1 volume per 20 power. 2500 power is max