mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-25 13:07:46 +01:00
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:
@@ -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]!")
|
||||
|
||||
@@ -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>")
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -195,7 +195,7 @@
|
||||
circuit=null
|
||||
new /obj/machinery/constructable_frame/machine_frame(T)
|
||||
qdel(src)
|
||||
if(user.a_intent == "harm")
|
||||
if(user.a_intent == I_HARM)
|
||||
src.health -= W.force
|
||||
src.healthcheck()
|
||||
..()
|
||||
@@ -219,7 +219,7 @@
|
||||
src.add_fingerprint(user)
|
||||
update_icon()
|
||||
else
|
||||
if(user.a_intent == "harm")
|
||||
if(user.a_intent == I_HARM)
|
||||
user.changeNext_move(CLICK_CD_MELEE)
|
||||
user.do_attack_animation(src)
|
||||
user.visible_message("\red [user.name] kicks \the [src]!", \
|
||||
|
||||
@@ -133,7 +133,7 @@
|
||||
..()
|
||||
if(!buckled_mob) return
|
||||
|
||||
if(propelled || (pulling && (pulling.a_intent == "harm")))
|
||||
if(propelled || (pulling && (pulling.a_intent == I_HARM)))
|
||||
var/mob/living/occupant = buckled_mob
|
||||
unbuckle()
|
||||
|
||||
|
||||
@@ -299,8 +299,8 @@
|
||||
user.do_attack_animation(src)
|
||||
visible_message("<span class='danger'>[user] slices [src] apart!</span>")
|
||||
destroy()
|
||||
|
||||
/obj/structure/table/mech_melee_attack(obj/mecha/M)
|
||||
|
||||
/obj/structure/table/mech_melee_attack(obj/mecha/M)
|
||||
visible_message("<span class='danger'>[M] smashes [src] apart!</span>")
|
||||
destroy()
|
||||
|
||||
@@ -402,7 +402,7 @@
|
||||
if (istype(G.affecting, /mob/living))
|
||||
var/mob/living/M = G.affecting
|
||||
if (G.state < 2)
|
||||
if(user.a_intent == "harm")
|
||||
if(user.a_intent == I_HARM)
|
||||
if (prob(15)) M.Weaken(5)
|
||||
M.apply_damage(8,def_zone = "head")
|
||||
visible_message("\red [G.assailant] slams [G.affecting]'s face against \the [src]!")
|
||||
@@ -914,8 +914,8 @@
|
||||
visible_message("<span class='danger'>[user] smashes [src] apart!</span>")
|
||||
user.say(pick(";RAAAAAAAARGH!", ";HNNNNNNNNNGGGGGGH!", ";GWAAAAAAAARRRHHH!", "NNNNNNNNGGGGGGGGHH!", ";AAAAAAARRRGH!" ))
|
||||
destroy()
|
||||
|
||||
/obj/structure/rack/mech_melee_attack(obj/mecha/M)
|
||||
|
||||
/obj/structure/rack/mech_melee_attack(obj/mecha/M)
|
||||
visible_message("<span class='danger'>[M] smashes [src] apart!</span>")
|
||||
destroy()
|
||||
|
||||
|
||||
@@ -119,7 +119,7 @@ var/global/wcCommon = pick(list("#379963", "#0d8395", "#58b5c3", "#49e46e", "#8f
|
||||
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("\red [usr.name] bangs against the [src.name]!", \
|
||||
|
||||
Reference in New Issue
Block a user