[MIRROR] Supermatter code cleanup (#1964)

* Supermatter code cleanup

* Delete supermatter.dm.rej

* Update supermatter.dm
This commit is contained in:
CitadelStationBot
2017-07-13 08:38:17 -05:00
committed by kevinz000
parent 2892a3710d
commit da324257fe

View File

@@ -485,25 +485,40 @@
rip_u.dismember(BURN) //nice try jedi
/obj/machinery/power/supermatter_shard/attack_paw(mob/user)
return attack_hand(user)
dust_mob(user, cause = "monkey attack")
/obj/machinery/power/supermatter_shard/attack_animal(mob/living/simple_animal/S)
var/murder
if(!S.melee_damage_upper && !S.melee_damage_lower)
murder = S.friendly
else
murder = S.attacktext
dust_mob(S, \
"<span class='danger'>[S] unwisely [murder] [src], and [S.p_their()] body burns brilliantly before flashing into ash!</span>", \
"<span class='userdanger'>You unwisely touch [src], and your vision glows brightly as your body crumbles to dust. Oops.</span>", \
"simple animal attack")
/obj/machinery/power/supermatter_shard/attack_robot(mob/user)
if(Adjacent(user))
return attack_hand(user)
dust_mob(user, cause = "cyborg attack")
/obj/machinery/power/supermatter_shard/attack_ai(mob/user)
return
/obj/machinery/power/supermatter_shard/attack_hand(mob/living/user)
if(!istype(user))
return
user.visible_message("<span class='danger'>\The [user] reaches out and touches \the [src], inducing a resonance... [user.p_their()] body starts to glow and bursts into flames before flashing into ash.</span>",\
"<span class='userdanger'>You reach out and touch \the [src]. Everything starts burning and all you can hear is ringing. Your last thought is \"That was not a wise decision.\"</span>",\
"<span class='italics'>You hear an unearthly noise as a wave of heat washes over you.</span>")
investigate_log("has been attacked (hand) by [user]", INVESTIGATE_SUPERMATTER)
playsound(get_turf(src), 'sound/effects/supermatter.ogg', 50, 1)
dust_mob(user, cause = "hand")
Consume(user)
/obj/machinery/power/supermatter_shard/proc/dust_mob(mob/living/nom, vis_msg, mob_msg, cause)
if(!vis_msg)
vis_msg = "<span class='danger'>[nom] reaches out and touches [src], inducing a resonance... [nom.p_their()] body starts to glow and bursts into flames before flashing into ash"
if(!mob_msg)
mob_msg = "<span class='userdanger'>You reach out and touch [src]. Everything starts burning and all you can hear is ringing. Your last thought is \"That was not a wise decision.\"</span>"
if(!cause)
cause = "contact"
nom.visible_message(vis_msg, mob_msg, "<span class='italics'>You hear an unearthly noise as a wave of heat washes over you.</span>")
investigate_log("has been attacked ([cause]) by [nom]", INVESTIGATE_SUPERMATTER)
playsound(get_turf(src), 'sound/effects/supermatter.ogg', 50, 1)
Consume(nom)
/obj/machinery/power/supermatter_shard/proc/transfer_energy()
for(var/obj/machinery/power/rad_collector/R in GLOB.rad_collectors)