Removes spawn() from some things

Yay, refactoring.
This commit is contained in:
Jack Edge
2016-06-05 19:47:17 +01:00
parent 94a5d5bfad
commit a01b48aa48
12 changed files with 134 additions and 112 deletions
+23 -23
View File
@@ -106,32 +106,32 @@
for(var/obj/item in hand_items)
if(ABSTRACT in item.flags || NODROP in item.flags)
continue
marked_item = item
marked_item = item
M << "<span class='warning'>You begin to focus your very being into the [item.name]...</span>"
break
if(!marked_item)
M << "<span class='caution'>You must hold an item you wish to make your phylactery...</span>"
return
spawn(50)
if(marked_item.loc != M) //I changed my mind I don't want to put my soul in a cheeseburger!
M << "<span class='warning'>Your soul snaps back to your body as you drop the [marked_item.name]!</span>"
marked_item = null
return
name = "RISE!"
desc = "Rise from the dead! You will reform at the location of your phylactery and your old body will crumble away."
charge_max = 1800 //3 minute cooldown, if you rise in sight of someone and killed again, you're probably screwed.
charge_counter = 1800
stat_allowed = 1
marked_item.name = "Ensouled [marked_item.name]"
marked_item.desc = "A terrible aura surrounds this item, its very existence is offensive to life itself..."
marked_item.color = "#003300"
M << "<span class='userdanger'>With a hideous feeling of emptiness you watch in horrified fascination as skin sloughs off bone! Blood boils, nerves disintegrate, eyes boil in their sockets! As your organs crumble to dust in your fleshless chest you come to terms with your choice. You're a lich!</span>"
M.set_species(/datum/species/skeleton)
current_body = M.mind.current
if(ishuman(M))
var/mob/living/carbon/human/H = M
H.unEquip(H.wear_suit)
H.unEquip(H.head)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/wizrobe/black(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/clothing/head/wizard/black(H), slot_head)
if(!do_after(M, 50, needhand=FALSE, target=marked_item))
M << "<span class='warning'>Your soul snaps back to your body as you stop ensouling [marked_item.name]!</span>"
marked_item = null
return
name = "RISE!"
desc = "Rise from the dead! You will reform at the location of your phylactery and your old body will crumble away."
charge_max = 1800 //3 minute cooldown, if you rise in sight of someone and killed again, you're probably screwed.
charge_counter = 1800
stat_allowed = 1
marked_item.name = "Ensouled [marked_item.name]"
marked_item.desc = "A terrible aura surrounds this item, its very existence is offensive to life itself..."
marked_item.color = "#003300"
M << "<span class='userdanger'>With a hideous feeling of emptiness you watch in horrified fascination as skin sloughs off bone! Blood boils, nerves disintegrate, eyes boil in their sockets! As your organs crumble to dust in your fleshless chest you come to terms with your choice. You're a lich!</span>"
M.set_species(/datum/species/skeleton)
current_body = M.mind.current
if(ishuman(M))
var/mob/living/carbon/human/H = M
H.unEquip(H.wear_suit)
H.unEquip(H.head)
H.equip_to_slot_or_del(new /obj/item/clothing/suit/wizrobe/black(H), slot_wear_suit)
H.equip_to_slot_or_del(new /obj/item/clothing/head/wizard/black(H), slot_head)
+4 -3
View File
@@ -319,9 +319,7 @@
AM.overlays += targeteffect
throwtarget = get_edge_target_turf(user, get_dir(user, get_step_away(AM, user)))
distfromcaster = get_dist(user, AM)
spawn(10)
AM.overlays -= targeteffect
qdel(targeteffect)
addtimer(src, "remove_sparkles", AM, targeteffect)
if(distfromcaster == 0)
if(istype(AM, /mob/living))
var/mob/living/M = AM
@@ -335,6 +333,9 @@
M << "<span class='userdanger'>You're thrown back by [user]!</span>"
AM.throw_at_fast(throwtarget, ((Clamp((maxthrow - (Clamp(distfromcaster - 2, 0, distfromcaster))), 3, maxthrow))), 1,user)//So stuff gets tossed around at the same time.
/obj/effect/proc_holder/spell/aoe_turf/repulse/proc/remove_sparkles(atom/movable/AM, obj/effect/overlay/targeteffect)
AM.overlays -= targeteffect
qdel(targeteffect)
/obj/effect/proc_holder/spell/aoe_turf/repulse/xeno //i fixed conflicts only to find out that this is in the WIZARD file instead of the xeno file?!
name = "Tail Sweep"