Grabs no longer endless loop runtime.

This commit is contained in:
PsiOmega
2015-05-07 13:11:25 +02:00
parent 9fbdc5ba31
commit fff5ea7840
5 changed files with 12 additions and 12 deletions
+1 -1
View File
@@ -155,7 +155,7 @@ var/list/slot_equipment_priority = list( \
Target = loc
remove_from_mob(W)
if(!W) return 1 // self destroying objects (tk, grabs)
if(!(W && W.loc)) return 1 // self destroying objects (tk, grabs)
W.forceMove(Target)
update_icons()
+1 -1
View File
@@ -226,7 +226,7 @@
beacon_freq = freq
if("screw")
screwloose = !screwloose
usr << "<span class='notice>You twiddle the screw.</span>"
usr << "<span class='notice'>You twiddle the screw.</span>"
if("oddbutton")
oddbutton = !oddbutton
usr << "<span class='notice'>You press the weird button.</span>"
@@ -277,9 +277,9 @@
qdel(MED)
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
M.show_message("<span class='notice>[user] applies the [MED] on [src].</span>")
M.show_message("<span class='notice'>[user] applies the [MED] on [src].</span>")
else
user << "<span class='notice>\The [src] is dead, medical items won't bring it back to life.</span>"
user << "<span class='notice'>\The [src] is dead, medical items won't bring it back to life.</span>"
if(meat_type && (stat == DEAD)) //if the animal has a meat, and if it is dead.
if(istype(O, /obj/item/weapon/kitchenknife) || istype(O, /obj/item/weapon/butch))
harvest(user)
@@ -300,7 +300,7 @@
usr << "<span class='danger>This weapon is ineffective, it does no damage.</span>"
for(var/mob/M in viewers(src, null))
if ((M.client && !( M.blinded )))
M.show_message("<span class='notice>[user] gently taps [src] with the [O].</span>")
M.show_message("<span class='notice'>[user] gently taps [src] with \the [O].</span>")
/mob/living/simple_animal/movement_delay()
var/tally = 0 //Incase I need to add stuff other than "speed" later
+6 -6
View File
@@ -24,7 +24,7 @@
assailant = user
affecting = victim
if(affecting.anchored)
if(affecting.anchored || !assailant.Adjacent(victim))
qdel(src)
return
@@ -36,7 +36,6 @@
hud.master = src
/obj/item/weapon/grab/Destroy()
//make sure the grabbed_by list doesn't fill up with nulls
if(affecting)
affecting.grabbed_by -= src
affecting = null
@@ -45,6 +44,7 @@
assailant.client.screen -= hud
assailant = null
qdel(hud)
hud = null
..()
//Used by throw code to hand over the mob, instead of throwing the grab. The grab is then deleted by the throw code.
@@ -68,6 +68,9 @@
/obj/item/weapon/grab/process()
confirm()
if(!assailant)
qdel(src)
return
if(assailant.client)
assailant.client.screen -= hud
@@ -227,8 +230,5 @@
/obj/item/weapon/grab/dropped()
loc = null
qdel(src)
/obj/item/weapon/grab/Destroy()
qdel(hud)
..()
+1 -1
View File
@@ -147,7 +147,7 @@
R << "<span class='danger'>Law Notice</span>"
R.laws.show_laws(R)
if(usr != owner)
usr << "<span class='notice>Laws displayed.</span>"
usr << "<span class='notice'>Laws displayed.</span>"
return 1
return 0