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
+5 -5
View File
@@ -491,7 +491,7 @@
/obj/machinery/fishtank/attack_animal(mob/living/simple_animal/M as mob)
if(istype(M, /mob/living/simple_animal/pet/cat))
if(M.a_intent == "help") //Cats can try to fish in open tanks on help intent
if(M.a_intent == I_HELP) //Cats can try to fish in open tanks on help intent
if(lid_switch) //Can't fish in a closed tank. Fishbowls are ALWAYS open.
M.visible_message("[M.name] stares at into \the [src] while sitting perfectly still.", "The lid is closed, so you stare into \the [src] intently.")
else
@@ -513,7 +513,7 @@
else
attack_generic(M, M.harm_intent_damage)
else if(istype(M, /mob/living/simple_animal/hostile/bear))
if(M.a_intent == "help") //Bears can try to fish in open tanks on help intent
if(M.a_intent == I_HELP) //Bears can try to fish in open tanks on help intent
if(lid_switch) //Can't fish in a closed tank. Fishbowls are ALWAYS open.
M.visible_message("[M.name] scrapes it's claws along \the [src]'s lid.", "The lid is closed, so you scrape your claws against \the [src]'s lid.")
else
@@ -533,7 +533,7 @@
else
if(M.melee_damage_upper > 0) //If the simple_animal has a melee_damage_upper defined, use that for the damage
attack_generic(M, M.melee_damage_upper)
else if(M.a_intent == "harm") //Let any simple_animal try to break tanks when on harm intent
else if(M.a_intent == I_HARM) //Let any simple_animal try to break tanks when on harm intent
if(M.harm_intent_damage <= 0) return //If it doesn't do damage, don't bother with the attack
attack_generic(M, M.harm_intent_damage)
check_health()
@@ -553,7 +553,7 @@
user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!"))
user.visible_message("<span class='danger'>[user] smashes through [src]!</span>")
destroy()
else if (usr.a_intent == "harm")
else if (usr.a_intent == I_HARM)
user.changeNext_move(CLICK_CD_MELEE)
playsound(get_turf(src), 'sound/effects/glassknock.ogg', 80, 1)
usr.visible_message("<span class='danger'>[usr.name] bangs against the [src.name]!</span>", \
@@ -589,7 +589,7 @@
//Welders repair damaged tanks on help intent, damage on all others
if(istype(O, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/W = O
if(user.a_intent == "help")
if(user.a_intent == I_HELP)
if(W.isOn())
if(cur_health < max_health)
usr << "You repair some of the cracks on \the [src]."