Merge pull request #8486 from BlackMajor/Ooga
Supermatter no longer works while inside of a turf.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user