Replace magic intent words with defines, grab fixes

This commit does the following:
 - Replaces all instances of magic intent words, like "harm" and
 "help" with defines, I_HELP, I_DISARM, I_GRAB, I_HARM

 - Fixes a few manual grab instances left over in attack_alien, they
 will now used grabbedby()
This commit is contained in:
Tigercat2000
2015-09-07 11:51:00 -07:00
parent e97e6d1cc9
commit be92665871
74 changed files with 233 additions and 282 deletions
+2 -2
View File
@@ -164,7 +164,7 @@ var/list/tape_roll_applications = list()
breaktape(W, user)
/obj/item/tape/attack_hand(mob/user as mob)
if (user.a_intent == "help" && src.allowed(user))
if (user.a_intent == I_HELP && src.allowed(user))
user.show_viewers("\blue [user] lifts [src], allowing passage.")
src.density = 0
spawn(200)
@@ -176,7 +176,7 @@ var/list/tape_roll_applications = list()
breaktape(/obj/item/weapon/wirecutters,user)
/obj/item/tape/proc/breaktape(obj/item/weapon/W as obj, mob/user as mob)
if(user.a_intent == "help" && ((!can_puncture(W) && src.allowed(user))))
if(user.a_intent == I_HELP && ((!can_puncture(W) && src.allowed(user))))
user << "You can't break the [src] with that!"
return
user.show_viewers("\blue [user] breaks the [src]!")
+2 -2
View File
@@ -320,7 +320,7 @@
user << "<span class='notice'>The instructions on [defib] don't mention how to revive that...</span>"
return
else
if(user.a_intent == "harm" && !defib.safety)
if(user.a_intent == I_HARM && !defib.safety)
busy = 1
H.visible_message("<span class='danger'>[user] has touched [H.name] with [src]!</span>", \
"<span class='userdanger'>[user] has touched [H.name] with [src]!</span>")
@@ -435,7 +435,7 @@
user << "<span class='notice'>This unit is only designed to work on humanoid lifeforms.</span>"
return
else
if(user.a_intent == "harm" && !safety)
if(user.a_intent == I_HARM && !safety)
busy = 1
H.visible_message("<span class='danger'>[user] has touched [H.name] with [src]!</span>", \
"<span class='userdanger'>[user] has touched [H.name] with [src]!</span>")
+1 -1
View File
@@ -63,7 +63,7 @@ var/last_chew = 0
var/mob/living/carbon/human/H = A
if (!H.handcuffed)
return
if (H.a_intent != "harm")
if (H.a_intent != I_HARM)
return
if (H.zone_sel.selecting != "mouth")
return
+1 -1
View File
@@ -40,7 +40,7 @@
if(!istype(M))
return ..()
if(user.a_intent != "help")
if(user.a_intent != I_HELP)
if(user.zone_sel.selecting == "head" || user.zone_sel.selecting == "eyes")
if((CLUMSY in user.mutations) && prob(50))
M = user
+1 -1
View File
@@ -117,7 +117,7 @@
var/mob/living/L = M
if(user.a_intent != "harm")
if(user.a_intent != I_HARM)
if(status)
user.do_attack_animation(L)
baton_stun(L, user)
@@ -126,7 +126,7 @@
return
if(!isliving(target))
return
if (user.a_intent == "harm")
if (user.a_intent == I_HARM)
if(!..()) return
if(!isrobot(target)) return
else
+2 -2
View File
@@ -83,7 +83,7 @@
return
/obj/item/weapon/screwdriver/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob)
if(!istype(M) || user.a_intent == "help")
if(!istype(M) || user.a_intent == I_HELP)
return ..()
if(user.zone_sel.selecting != "eyes" && user.zone_sel.selecting != "head")
return ..()
@@ -475,7 +475,7 @@
if (!S)
return
if(!(S.status & ORGAN_ROBOT) || user.a_intent != "help" || S.open == 2)
if(!(S.status & ORGAN_ROBOT) || user.a_intent != I_HELP || S.open == 2)
return ..()
if(S.brute_dam)