Merge pull request #8486 from BlackMajor/Ooga

Supermatter no longer works while inside of a turf.
This commit is contained in:
kevinz000
2019-05-31 17:40:30 -07:00
committed by GitHub
2 changed files with 14 additions and 13 deletions
+2 -13
View File
@@ -283,7 +283,7 @@
else
var/turf/T = get_turf(src)
if(!isspaceturf(T))
consume_turf(T)
shard.consume_turf(T)
/obj/item/melee/supermatter_sword/afterattack(target, mob/user, proximity_flag)
. = ..()
@@ -330,18 +330,7 @@
else if(!isturf(target))
shard.Bumped(target)
else
consume_turf(target)
/obj/item/melee/supermatter_sword/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>")
shard.Consume()
T.CalculateAdjacentTurfs()
shard.consume_turf(target)
/obj/item/melee/supermatter_sword/add_blood_DNA(list/blood_dna)
return FALSE
@@ -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