Changes intents to defines.

This commit is contained in:
ComicIronic
2015-02-09 20:25:52 +00:00
parent d50bbb0cbc
commit 7e75c6ae53
73 changed files with 164 additions and 157 deletions

View File

@@ -157,7 +157,7 @@
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))
if(density == 0)
user.visible_message("<span class='notice'>[user] pulls [src] back down.</span>")
src.density = 1
@@ -173,7 +173,7 @@
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" && ((!is_sharp(W) && src.allowed(user))))
if(user.a_intent == I_HELP && ((!is_sharp(W) && src.allowed(user))))
user << "<span class='notice'>You can't break [src] with that!</span>"
return
user.visible_message("<span class='warning'>[user] breaks [src]!</span>")

View File

@@ -185,7 +185,7 @@
*/
/mob/proc/RangedAttack(var/atom/A, var/params)
if(!mutations || !mutations.len) return
if((M_LASER in mutations) && a_intent == "hurt")
if((M_LASER in mutations) && a_intent == I_HURT)
LaserEyes(A) // moved into a proc below
else if(M_TK in mutations)
/*switch(get_dist(src,A))

View File

@@ -10,7 +10,7 @@
using.name = "act_intent"
using.dir = SOUTHWEST
using.icon = 'icons/mob/screen1_alien.dmi'
using.icon_state = (mymob.a_intent == "hurt" ? "harm" : mymob.a_intent)
using.icon_state = (mymob.a_intent == I_HURT ? "harm" : mymob.a_intent)
using.screen_loc = ui_acti
using.layer = 20
src.adding += using

View File

@@ -9,7 +9,7 @@
using.name = "act_intent"
using.dir = SOUTHWEST
using.icon = 'icons/mob/screen1_alien.dmi'
using.icon_state = (mymob.a_intent == "hurt" ? "harm" : mymob.a_intent)
using.icon_state = (mymob.a_intent == I_HURT ? "harm" : mymob.a_intent)
using.screen_loc = ui_acti
using.layer = 20
src.adding += using

View File

@@ -10,7 +10,7 @@
using.name = "act_intent"
using.dir = SOUTHWEST
using.icon = ui_style
using.icon_state = (mymob.a_intent == "hurt" ? "harm" : mymob.a_intent)
using.icon_state = (mymob.a_intent == I_HURT ? "harm" : mymob.a_intent)
using.screen_loc = ui_acti
using.layer = 20
src.adding += using

View File

@@ -55,7 +55,7 @@
using.name = "act_intent"
using.dir = SOUTHWEST
using.icon = 'icons/mob/screen1_robot.dmi'
using.icon_state = (mymob.a_intent == "hurt" ? "harm" : mymob.a_intent)
using.icon_state = (mymob.a_intent == I_HURT ? "harm" : mymob.a_intent)
using.screen_loc = ui_acti
using.layer = 20
src.adding += using

View File

@@ -366,16 +366,16 @@
if("act_intent")
usr.a_intent_change("right")
if("help")
usr.a_intent = "help"
usr.a_intent = I_HELP
usr.hud_used.action_intent.icon_state = "intent_help"
if("harm")
usr.a_intent = "hurt"
usr.a_intent = I_HURT
usr.hud_used.action_intent.icon_state = "intent_hurt"
if("grab")
usr.a_intent = "grab"
usr.a_intent = I_GRAB
usr.hud_used.action_intent.icon_state = "intent_grab"
if("disarm")
usr.a_intent = "disarm"
usr.a_intent = I_DISARM
usr.hud_used.action_intent.icon_state = "intent_disarm"
if("pull")

View File

@@ -45,7 +45,7 @@
if(istype(G) && G.Touch(A, src, 0)) // for magic gloves
return
if(mutations.len)
if((M_LASER in mutations) && a_intent == "hurt")
if((M_LASER in mutations) && a_intent == I_HURT)
LaserEyes(A) // moved into a proc below
else if(M_TK in mutations)
@@ -95,7 +95,7 @@
things considerably
*/
/mob/living/carbon/monkey/RestrainedClickOn(var/atom/A)
if(a_intent != "hurt" || !ismob(A)) return
if(a_intent != I_HURT || !ismob(A)) return
if(istype(wear_mask, /obj/item/clothing/mask/muzzle))
return
var/mob/living/carbon/ML = A

View File

@@ -532,13 +532,13 @@
thoughts = "haunted by their own mortality"
switch(M.a_intent)
if ("help")
if (I_HELP)
usr << "<span class='notice'> <b>Mood</b>: You sense benevolent thoughts from [M.name].</span>"
if ("disarm")
if (I_DISARM)
usr << "<span class='notice'> <b>Mood</b>: You sense cautious thoughts from [M.name].</span>"
if ("grab")
if (I_GRAB)
usr << "<span class='notice'> <b>Mood</b>: You sense hostile thoughts from [M.name].</span>"
if ("hurt")
if (I_HURT)
usr << "<span class='notice'> <b>Mood</b>: You sense cruel thoughts from [M.name].</span>"
for(var/mob/living/L in view(7,M))
if (L == M)

View File

@@ -79,7 +79,7 @@
O.adjustToxLoss(M.getToxLoss() + 20)
O.adjustOxyLoss(M.getOxyLoss())
O.stat = M.stat
O.a_intent = "hurt"
O.a_intent = I_HURT
for (var/obj/item/weapon/implant/I in implants)
I.loc = O
I.implanted = O

View File

@@ -301,7 +301,7 @@
O.setOxyLoss(C.getOxyLoss())
O.adjustFireLoss(C.getFireLoss())
O.stat = C.stat
O.a_intent = "hurt"
O.a_intent = I_HURT
for(var/obj/item/weapon/implant/I in implants)
I.loc = O
I.implanted = O

View File

@@ -174,7 +174,7 @@
new_mob.setBrainLoss(100)
new_mob.a_intent = "hurt"
new_mob.a_intent = I_HURT
if(M.mind)
M.mind.transfer_to(new_mob)
else

View File

@@ -25,7 +25,7 @@
if(!melee_can_hit || !istype(target, /atom)) return
if(istype(target, /mob/living))
var/mob/living/M = target
if(src.occupant.a_intent == "hurt")
if(src.occupant.a_intent == I_HURT)
playsound(src, 'sound/mecha/mechsmash.ogg', 50, 1)
if(damtype == "brute")
step_away(M,src,15)

View File

@@ -53,7 +53,7 @@
else if(istype(target,/mob/living))
var/mob/living/M = target
if(M.stat>1) return
if(chassis.occupant.a_intent == "hurt")
if(chassis.occupant.a_intent == I_HURT)
M.take_overall_damage(dam_force)
M.adjustOxyLoss(round(dam_force/2))
M.updatehealth()
@@ -1070,10 +1070,10 @@
else if(istype(target,/mob/living))
var/mob/living/M = target
if(M.stat>1) return
if(chassis.occupant.a_intent == "hurt")
if(chassis.occupant.a_intent == I_HURT)
chassis.occupant_message("\red You obliterate [target] with [src.name], leaving blood and guts everywhere.")
chassis.visible_message("\red [chassis] destroys [target] in an unholy fury.")
if(chassis.occupant.a_intent == "disarm")
if(chassis.occupant.a_intent == I_DISARM)
chassis.occupant_message("\red You tear [target]'s limbs off with [src.name].")
chassis.visible_message("\red [chassis] rips [target]'s arms off.")
else

View File

@@ -739,7 +739,7 @@
user << "There's already a powercell installed."
return
else if(istype(W, /obj/item/weapon/weldingtool) && user.a_intent != "hurt")
else if(istype(W, /obj/item/weapon/weldingtool) && user.a_intent != I_HURT)
var/obj/item/weapon/weldingtool/WT = W
if (WT.remove_fuel(0,user))
if (hasInternalDamage(MECHA_INT_TANK_BREACH))

View File

@@ -116,7 +116,7 @@
var/mob/living/L = M
if(user.a_intent == "hurt")
if(user.a_intent == I_HURT)
..()
playsound(loc, "swing_hit", 50, 1, -1)

View File

@@ -45,7 +45,7 @@
log_attack("<font color='red'>[user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])</font>")
*/
if (user.a_intent == "hurt")
if (user.a_intent == I_HURT)
if(!..()) return
playsound(get_turf(src), "swing_hit", 50, 1, -1)
if (M.stuttering < 8 && (!(M_HULK in M.mutations)) /*&& (!istype(H:wear_suit, /obj/item/clothing/suit/judgerobe))*/)
@@ -131,7 +131,7 @@
else
user.take_organ_damage(2*force)
return
if (user.a_intent == "hurt")
if (user.a_intent == I_HURT)
if(!..()) return
if(!isrobot(target))
playsound(get_turf(src), "swing_hit", 50, 1, -1)

View File

@@ -532,7 +532,7 @@
if(hasorgans(M))
var/datum/organ/external/S = M:organs_by_name[user.zone_sel.selecting]
if (!S) return
if(!(S.status & ORGAN_ROBOT) || user.a_intent != "help")
if(!(S.status & ORGAN_ROBOT) || user.a_intent != I_HELP)
return ..()
if(S.brute_dam)
S.heal_damage(15,0,0,1)

View File

@@ -211,7 +211,7 @@
circuit=null
new /obj/machinery/constructable_frame/machine_frame(T)
del(src)
else if(user.a_intent == "hurt")
else if(user.a_intent == I_HURT)
user.delayNextAttack(8)
src.health -= W.force
src.healthcheck()
@@ -240,7 +240,7 @@
src.add_fingerprint(user)
update_icon()
else
if(user.a_intent == "hurt")
if(user.a_intent == I_HURT)
user.delayNextAttack(8)
user.visible_message("<span class='danger'>[user.name] kicks \the [src]!</span>", \
"<span class='danger'>You kick \the [src]!</span>", \

View File

@@ -331,7 +331,7 @@
if (istype(G.affecting, /mob/living))
var/mob/living/M = G.affecting
if (G.state < 2)
if(user.a_intent == "hurt")
if(user.a_intent == I_HURT)
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]!")

View File

@@ -135,7 +135,7 @@
log_admin("Window destroyed by hulk [user.real_name] ([user.ckey]) with pdiff [pdiff] at [loc]!")
user.delayNextAttack(8)
destroy()
else if (usr.a_intent == "hurt")
else if (usr.a_intent == I_HURT)
user.delayNextAttack(8) // not so polite
playsound(get_turf(src), 'sound/effects/glassknock.ogg', 80, 1)
usr.visible_message("<span class='warning'>[usr.name] bangs against the [src.name]!</span>", \

View File

@@ -399,7 +399,7 @@ BLIND // can't see anything
if(istype(usr.get_active_hand(),/obj) && istype(usr.get_inactive_hand(),/obj))
usr << "<span class='warning'>You need an empty hand to draw the gun!</span>"
else
if(usr.a_intent == "hurt")
if(usr.a_intent == I_HURT)
usr.visible_message("<span class='warning'>\The [usr] draws \the [H.holstered], ready to shoot!</span>", \
"<span class='warning'>You draw \the [H.holstered], ready to shoot!</span>")
else

View File

@@ -12,7 +12,7 @@
var/next_shock = 0
/obj/item/clothing/gloves/yellow/power/Touch(var/atom/A, mob/living/user, prox)
if(prox == 0 && user.a_intent == "hurt")
if(prox == 0 && user.a_intent == I_HURT)
var/time = 100
var/turf/T = get_turf(user)
var/turf/U = get_turf(A)

View File

@@ -33,7 +33,7 @@
/obj/item/clothing/tie/stethoscope/attack(mob/living/carbon/human/M, mob/living/user)
if(ishuman(M) && isliving(user))
if(user.a_intent == "help")
if(user.a_intent == I_HELP)
var/body_part = parse_zone(user.zone_sel.selecting)
if(body_part)
var/their = "their"

View File

@@ -67,7 +67,7 @@
/obj/effect/plantsegment/attack_hand(mob/user as mob)
if(user.a_intent == "help" && seed && harvest)
if(user.a_intent == I_HELP && seed && harvest)
seed.harvest(user,1)
harvest = 0
lastproduce = age

View File

@@ -534,7 +534,7 @@
status_flags = CANSTUN|CANWEAKEN|CANPUSH
mouse_opacity = 1
faction = "neutral"
a_intent = "hurt"
a_intent = I_HURT
min_oxy = 0
max_oxy = 0
min_tox = 0
@@ -595,7 +595,7 @@
SetCollectBehavior()
/mob/living/simple_animal/hostile/mining_drone/attack_hand(mob/living/carbon/human/M)
if(M.a_intent == "help")
if(M.a_intent == I_HELP)
switch(search_objects)
if(0)
SetCollectBehavior()

View File

@@ -113,7 +113,7 @@
switch(M.a_intent)
if("help")
if(I_HELP)
help_shake_act(M)
else
if(istype(wear_mask, /obj/item/clothing/mask/muzzle))
@@ -207,7 +207,7 @@
if(M.gloves && istype(M.gloves,/obj/item/clothing/gloves))
var/obj/item/clothing/gloves/G = M.gloves
if(G.cell)
if(M.a_intent == "hurt")//Stungloves. Any contact will stun the alien.
if(M.a_intent == I_HURT)//Stungloves. Any contact will stun the alien.
if(G.cell.charge >= 2500)
G.cell.charge -= 2500
@@ -223,7 +223,7 @@
switch(M.a_intent)
if("help")
if(I_HELP)
if(health > 0)
help_shake_act(M)
else
@@ -242,7 +242,7 @@
O.process()
return
if("grab")
if(I_GRAB)
if(M == src)
return
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab(M, src)
@@ -257,7 +257,7 @@
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
visible_message("<span class='warning'>[M] has grabbed \the [src] passively!</span>")
if("hurt")
if(I_HURT)
var/damage = rand(1, 9)
if(prob(90))
if(M_HULK in M.mutations) //M_HULK SMASH
@@ -278,7 +278,7 @@
playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1)
visible_message("<span class='danger'>[M] has attempted to punch \the [src] !</span>")
if("disarm")
if(I_DISARM)
if(!lying)
if(prob(5)) //Very small chance to push an alien down.
Weaken(2)
@@ -313,7 +313,7 @@ In all, this is a lot like the monkey code. /N
switch(M.a_intent)
if("help")
if(I_HELP)
sleeping = max(0,sleeping-5)
resting = 0
AdjustParalysis(-3)

View File

@@ -133,7 +133,7 @@
switch(M.a_intent)
if("help")
if(I_HELP)
help_shake_act(M)
else
if(istype(wear_mask, /obj/item/clothing/mask/muzzle))
@@ -185,7 +185,7 @@
if(M.gloves && istype(M.gloves,/obj/item/clothing/gloves))
var/obj/item/clothing/gloves/G = M.gloves
if(G.cell)
if(M.a_intent == "hurt")//Stungloves. Any contact will stun the alien.
if(M.a_intent == I_HURT)//Stungloves. Any contact will stun the alien.
if(G.cell.charge >= 2500)
G.cell.use(2500)
@@ -202,7 +202,7 @@
switch(M.a_intent)
if("help")
if(I_HELP)
if(health > 0)
help_shake_act(M)
else
@@ -221,7 +221,7 @@
O.process()
return
if("grab")
if(I_GRAB)
if(M == src)
return
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M, src )
@@ -271,7 +271,7 @@
switch(M.a_intent)
if("help")
if(I_HELP)
sleeping = max(0,sleeping-5)
resting = 0
AdjustParalysis(-3)

View File

@@ -5,9 +5,9 @@
return 0
switch(M.a_intent)
if ("help")
if (I_HELP)
visible_message(text("\blue [M] caresses [src] with its scythe like arm."))
if ("grab")
if (I_GRAB)
if(M == src || anchored)
return
if (w_uniform)
@@ -23,7 +23,7 @@
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
visible_message(text("\red [] has grabbed [] passively!", M, src))
if("hurt")
if(I_HURT)
if (w_uniform)
w_uniform.add_fingerprint(M)
var/damage = rand(15, 30)
@@ -43,7 +43,7 @@
apply_effect(rand(0.5,3), WEAKEN, armor_block)
updatehealth()
if("disarm")
if(I_DISARM)
if (prob(80))
playsound(loc, 'sound/weapons/pierce.ogg', 25, 1, -1)
Weaken(rand(3,4))

View File

@@ -21,7 +21,7 @@
if(M.gloves && istype(M.gloves,/obj/item/clothing/gloves))
var/obj/item/clothing/gloves/G = M.gloves
if(G.cell)
if(M.a_intent == "hurt")//Stungloves. Any contact will stun the alien.
if(M.a_intent == I_HURT)//Stungloves. Any contact will stun the alien.
if(G.cell.charge >= 2500)
G.cell.use(2500)
visible_message("\red <B>[src] has been touched with the stun gloves by [M]!</B>")
@@ -71,7 +71,7 @@
switch(M.a_intent)
if("help")
if(I_HELP)
if(health >= config.health_threshold_crit)
help_shake_act(M)
return 1
@@ -95,7 +95,7 @@
O.process()
return 1
if("grab")
if(I_GRAB)
if(M == src || anchored)
return 0
if(w_uniform)
@@ -115,7 +115,7 @@
visible_message("\red [M] has grabbed [src] passively!")
return 1
if("hurt")
if(I_HURT)
//Vampire code
if(M.zone_sel && M.zone_sel.selecting == "head" && src != M)
if(M.mind && M.mind.vampire && (M.mind in ticker.mode.vampires) && !M.mind.vampire.draining)
@@ -213,7 +213,7 @@
src.throw_at(target,100,M.species.punch_throw_speed)
if("disarm")
if(I_DISARM)
M.attack_log += text("\[[time_stamp()]\] <font color='red'>Disarmed [src.name] ([src.ckey])</font>")
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been disarmed by [M.name] ([M.ckey])</font>")

View File

@@ -1,7 +1,7 @@
/mob/living/carbon/human/attack_paw(mob/M as mob)
..()
//M.delayNextAttack(10)
if (M.a_intent == "help")
if (M.a_intent == I_HELP)
help_shake_act(M)
else
if (istype(wear_mask, /obj/item/clothing/mask/muzzle))

View File

@@ -172,7 +172,7 @@ emp_act
if(!target_zone && !src.stat)
visible_message("\red <B>[user] misses [src] with \the [I]!")
return
if(istype(I, /obj/item/weapon/kitchen/utensil/knife/large/butch/meatcleaver) && src.stat == DEAD && user.a_intent == "hurt")
if(istype(I, /obj/item/weapon/kitchen/utensil/knife/large/butch/meatcleaver) && src.stat == DEAD && user.a_intent == I_HURT)
var/obj/item/weapon/reagent_containers/food/snacks/meat/human/newmeat = new /obj/item/weapon/reagent_containers/food/snacks/meat/human(get_turf(src.loc))
newmeat.name = src.real_name + newmeat.name
newmeat.subjectname = src.real_name

View File

@@ -344,7 +344,7 @@
switch(M.a_intent)
if ("help")
if (I_HELP)
help_shake_act(M)
else
if (istype(wear_mask, /obj/item/clothing/mask/muzzle))
@@ -438,7 +438,7 @@
if(M.gloves && istype(M.gloves,/obj/item/clothing/gloves))
var/obj/item/clothing/gloves/G = M.gloves
if(G.cell)
if(M.a_intent == "hurt")//Stungloves. Any contact will stun the alien.
if(M.a_intent == I_HURT)//Stungloves. Any contact will stun the alien.
if(G.cell.charge >= 2500)
G.cell.use(2500)
for(var/mob/O in viewers(src, null))
@@ -451,10 +451,10 @@
switch(M.a_intent)
if ("help")
if (I_HELP)
help_shake_act(M)
if ("grab")
if (I_GRAB)
if (M == src)
return
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M, src )
@@ -517,12 +517,12 @@
return
switch(M.a_intent)
if ("help")
if (I_HELP)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\blue [M] caresses [src] with its scythe like arm."), 1)
if ("hurt")
if (I_HURT)
if ((prob(95) && health > 0))
attacked += 10
@@ -545,7 +545,7 @@
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has attempted to lunge at [name]!</B>", M), 1)
if ("grab")
if (I_GRAB)
if (M == src)
return
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M, src )
@@ -561,7 +561,7 @@
for(var/mob/O in viewers(src, null))
O.show_message(text("\red [] has grabbed [name] passively!", M), 1)
if ("disarm")
if (I_DISARM)
playsound(loc, 'sound/weapons/pierce.ogg', 25, 1, -1)
var/damage = 5
attacked += 10

View File

@@ -178,7 +178,7 @@
var/mob/living/carbon/slime/adult/new_slime = new adulttype(loc)
new_slime.nutrition = nutrition
new_slime.powerlevel = max(0, powerlevel-1)
new_slime.a_intent = "hurt"
new_slime.a_intent = I_HURT
if(src.mind)
src.mind.transfer_to(new_slime)
else
@@ -224,7 +224,7 @@
feedback_add_details("slime_babies_born","slimebirth_[replacetext(M.colour," ","_")]")
var/mob/living/carbon/slime/new_slime = pick(babies)
new_slime.a_intent = "hurt"
new_slime.a_intent = I_HURT
new_slime.languages = languages
if(src.mind)
src.mind.transfer_to(new_slime)

View File

@@ -55,7 +55,7 @@
/mob/living/carbon/monkey/diona/attack_hand(mob/living/carbon/human/M as mob)
//Let people pick the little buggers up.
if(M.a_intent == "help")
if(M.a_intent == I_HELP)
var/obj/item/weapon/holder/diona/D = new(loc)
src.loc = D
D.name = loc.name

View File

@@ -299,10 +299,10 @@
/mob/living/carbon/monkey/attack_paw(mob/M as mob)
..()
if (M.a_intent == "help")
if (M.a_intent == I_HELP)
help_shake_act(M)
else
if ((M.a_intent == "hurt" && !( istype(wear_mask, /obj/item/clothing/mask/muzzle) )))
if ((M.a_intent == I_HURT && !( istype(wear_mask, /obj/item/clothing/mask/muzzle) )))
if ((prob(75) && health > 0))
playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1)
for(var/mob/O in viewers(src, null))
@@ -330,7 +330,7 @@
if(M.gloves && istype(M.gloves,/obj/item/clothing/gloves))
var/obj/item/clothing/gloves/G = M.gloves
if(G.cell)
if(M.a_intent == "hurt")//Stungloves. Any contact will stun the alien.
if(M.a_intent == I_HURT)//Stungloves. Any contact will stun the alien.
if(G.cell.charge >= 2500)
G.cell.use(2500)
Weaken(5)
@@ -346,10 +346,10 @@
M << "\red Not enough charge! "
return
if (M.a_intent == "help")
if (M.a_intent == I_HELP)
help_shake_act(M)
else
if (M.a_intent == "hurt")
if (M.a_intent == I_HURT)
if ((prob(75) && health > 0))
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
@@ -374,7 +374,7 @@
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has attempted to punch [name]!</B>", M), 1)
else
if (M.a_intent == "grab")
if (M.a_intent == I_GRAB)
if (M == src || anchored)
return
@@ -416,12 +416,12 @@
return
switch(M.a_intent)
if ("help")
if (I_HELP)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\blue [M] caresses [src] with its scythe like arm."), 1)
if ("hurt")
if (I_HURT)
if ((prob(95) && health > 0))
playsound(loc, 'sound/weapons/slice.ogg', 25, 1, -1)
var/damage = rand(15, 30)
@@ -444,7 +444,7 @@
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has attempted to lunge at [name]!</B>", M), 1)
if ("grab")
if (I_GRAB)
if (M == src)
return
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M, src )
@@ -460,7 +460,7 @@
for(var/mob/O in viewers(src, null))
O.show_message(text("\red [] has grabbed [name] passively!", M), 1)
if ("disarm")
if (I_DISARM)
playsound(loc, 'sound/weapons/pierce.ogg', 25, 1, -1)
var/damage = 5
if(prob(95))

View File

@@ -914,7 +914,7 @@ default behaviour is:
else
dense = 1
if(dense) break
if((tmob.a_intent == "help" || tmob.restrained()) && (a_intent == "help" || src.restrained()) && tmob.canmove && canmove && !dense && can_move_mob(tmob, 1, 0)) // mutual brohugs all around!
if((tmob.a_intent == I_HELP || tmob.restrained()) && (a_intent == I_HELP || src.restrained()) && tmob.canmove && canmove && !dense && can_move_mob(tmob, 1, 0)) // mutual brohugs all around!
var/turf/oldloc = loc
loc = tmob.loc
tmob.loc = oldloc

View File

@@ -434,7 +434,7 @@ var/list/ai_list = list()
switch(M.a_intent)
if ("help")
if (I_HELP)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\blue [M] caresses [src]'s plating with its scythe like arm."), 1)

View File

@@ -56,7 +56,7 @@
using.name = "act_intent"
using.dir = SOUTHWEST
using.icon = 'icons/mob/screen1_robot.dmi'
using.icon_state = (mymob.a_intent == "hurt" ? "harm" : mymob.a_intent)
using.icon_state = (mymob.a_intent == I_HURT ? "harm" : mymob.a_intent)
using.screen_loc = ui_acti
using.layer = 20
src.adding += using

View File

@@ -299,7 +299,7 @@ They can only use one tool at a time, they can't choose modules, and they have 1
if(!istype(user, /mob/living/silicon))
switch(user.a_intent)
if("disarm")
if(I_DISARM)
user.attack_log += text("\[[time_stamp()]\] <font color='red'>Disarmed [src.name] ([src.ckey])</font>")
src.attack_log += text("\[[time_stamp()]\] <font color='orange'>Has been disarmed by [user.name] ([user.ckey])</font>")
log_admin("ATTACK: [user.name] ([user.ckey]) disarmed [src.name] ([src.ckey])")

View File

@@ -193,7 +193,7 @@
switch(M.a_intent)
if ("help")
if (I_HELP)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\blue [M] caresses [src]'s casing with its scythe like arm."), 1)

View File

@@ -908,12 +908,12 @@
switch(M.a_intent)
if ("help")
if (I_HELP)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("<span class='notice'>[M] caresses [src]'s plating with its scythe like arm.</span>"), 1)
if ("grab")
if (I_GRAB)
if (M == src)
return
var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M, src )
@@ -927,7 +927,7 @@
if ((O.client && !( O.blinded )))
O.show_message(text("<span class='attack'>[] has grabbed [] passively!</span>", M, src), 1)
if ("hurt")
if (I_HURT)
var/damage = rand(10, 20)
if (prob(90))
/*
@@ -951,7 +951,7 @@
if ((O.client && !( O.blinded )))
O.show_message(text("<span class='danger'>[] took a swipe at []!</span>", M, src), 1)
if ("disarm")
if (I_DISARM)
if(!(lying))
if (rand(1,100) <= 85)
Stun(7)
@@ -1069,7 +1069,7 @@
call(/obj/item/clothing/gloves/space_ninja/proc/drain)("CYBORG",src,user:wear_suit)
return
else
if (user:a_intent == "help")
if (user:a_intent == I_HELP)
help_shake_act(user)
return

View File

@@ -80,7 +80,7 @@ var/global/borer_chem_types = typesof(/datum/borer_chem) - /datum/borer_chem
speed = 5
small = 1
density = 0
a_intent = "hurt"
a_intent = I_HURT
stop_automated_movement = 1
status_flags = CANPUSH
attacktext = "nips"

View File

@@ -10,7 +10,7 @@
response_harm = "punches"
icon_dead = "shade_dead"
speed = -1
a_intent = "hurt"
a_intent = I_HURT
stop_automated_movement = 1
status_flags = CANPUSH
attack_sound = 'sound/weapons/spiderlunge.ogg'

View File

@@ -520,8 +520,8 @@
/mob/living/simple_animal/corgi/attack_hand(mob/living/carbon/human/M)
. = ..()
switch(M.a_intent)
if("help") wuv(1,M)
if("hurt") wuv(-1,M)
if(I_HELP) wuv(1,M)
if(I_HURT) wuv(-1,M)
/mob/living/simple_animal/corgi/proc/wuv(change, mob/M)
if(change)

View File

@@ -130,7 +130,7 @@
udder.add_reagent("milk", rand(5, 10))
/mob/living/simple_animal/cow/attack_hand(mob/living/carbon/M as mob)
if(!stat && M.a_intent == "disarm" && icon_state != icon_dead)
if(!stat && M.a_intent == I_DISARM && icon_state != icon_dead)
M.visible_message("<span class='warning'>[M] tips over [src].</span>","<span class='notice'>You tip over [src].</span>")
Weaken(30)
icon_state = icon_dead

View File

@@ -17,7 +17,7 @@
melee_damage_lower = 25
melee_damage_upper = 25
attacktext = "slashes"
a_intent = "hurt"
a_intent = I_HURT
attack_sound = 'sound/weapons/bladeslice.ogg'
min_oxy = 0
max_oxy = 0

View File

@@ -29,7 +29,7 @@
melee_damage_lower = 0
melee_damage_upper = 0
attacktext = "barrels into"
a_intent = "help"
a_intent = I_HELP
//throw_message = "sinks in slowly, before being pushed out of "
//status_flags = CANPUSH
search_objects = 0

View File

@@ -17,7 +17,7 @@
response_disarm = "shoves"
response_harm = "strikes"
status_flags = 0
a_intent = "hurt"
a_intent = I_HURT
var/throw_message = "bounces off of"
var/icon_aggro = null // for swapping to when we get aggressive
@@ -71,7 +71,7 @@
melee_damage_lower = 12
melee_damage_upper = 12
attacktext = "bites into"
a_intent = "hurt"
a_intent = I_HURT
attack_sound = 'sound/weapons/spiderlunge.ogg'
ranged_cooldown_cap = 4
aggro_vision_range = 9
@@ -137,7 +137,7 @@
melee_damage_lower = 0
melee_damage_upper = 0
attacktext = "barrels into"
a_intent = "help"
a_intent = I_HELP
throw_message = "sinks in slowly, before being pushed out of "
status_flags = CANPUSH
search_objects = 1

View File

@@ -135,7 +135,7 @@
/mob/living/simple_animal/hostile/mushroom/attack_hand(mob/living/carbon/human/M as mob)
..()
if(M.a_intent == "hurt")
if(M.a_intent == I_HURT)
Bruise()
/mob/living/simple_animal/hostile/mushroom/hitby(atom/movable/AM)

View File

@@ -13,7 +13,7 @@
speak = list("HONK", "Honk!", "Welcome to clown planet!")
emote_see = list("honks")
speak_chance = 1
a_intent = "hurt"
a_intent = I_HURT
stop_automated_movement_when_pulled = 0
maxHealth = 75
health = 75

View File

@@ -19,7 +19,7 @@
speak_emote = list("squeals", "cries","sobs")
emote_see = list("honks sadly")
speak_chance = 1
a_intent = "help"
a_intent = I_HELP
var/footstep=0 // For clownshoe noises
//deny_client_move=1 // HONK // Doesn't work right yet

View File

@@ -15,7 +15,7 @@
response_harm = "hits the"
speak = list("ALERT.","Hostile-ile-ile entities dee-twhoooo-wected.","Threat parameterszzzz- szzet.","Bring sub-sub-sub-systems uuuup to combat alert alpha-a-a.")
emote_see = list("beeps menacingly","whirrs threateningly","scans its immediate vicinity")
a_intent = "hurt"
a_intent = I_HURT
stop_automated_movement_when_pulled = 0
health = 300
maxHealth = 300

View File

@@ -18,7 +18,7 @@
melee_damage_lower = 15
melee_damage_upper = 15
attacktext = "punches"
a_intent = "hurt"
a_intent = I_HURT
var/corpse = /obj/effect/landmark/mobcorpse/russian
var/weapon1 = /obj/item/weapon/kitchen/utensil/knife/large
min_oxy = 5

View File

@@ -18,7 +18,7 @@
melee_damage_lower = 10
melee_damage_upper = 10
attacktext = "punches"
a_intent = "hurt"
a_intent = I_HURT
var/corpse = /obj/effect/landmark/mobcorpse/syndicatesoldier
var/weapon1
var/weapon2

View File

@@ -51,7 +51,7 @@
response_disarm = "gently moves aside"
response_harm = "swats"
stop_automated_movement = 1
a_intent = "hurt" //parrots now start "aggressive" since only player parrots will nuzzle.
a_intent = I_HURT //parrots now start "aggressive" since only player parrots will nuzzle.
attacktext = "chomps"
friendly = "grooms"
@@ -264,7 +264,7 @@
/mob/living/simple_animal/parrot/attack_hand(mob/living/carbon/M as mob)
..()
if(client) return
if(!stat && M.a_intent == "hurt")
if(!stat && M.a_intent == I_HURT)
icon_state = "parrot_fly" //It is going to be flying regardless of whether it flees or attacks
@@ -541,7 +541,7 @@
var/mob/living/L = parrot_interest
if(melee_damage_upper == 0)
melee_damage_upper = parrot_damage_upper
a_intent = "hurt"
a_intent = I_HURT
//If the mob is close enough to interact with
if(in_range(src, parrot_interest))
@@ -789,10 +789,10 @@
if(melee_damage_upper)
melee_damage_upper = 0
a_intent = "help"
a_intent = I_HELP
else
melee_damage_upper = parrot_damage_upper
a_intent = "hurt"
a_intent = I_HURT
return
/*

View File

@@ -302,13 +302,13 @@
switch(M.a_intent)
if("help")
if(I_HELP)
if (health > 0)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message("\blue [M] [response_help] [src].")
if("grab")
if(I_GRAB)
if (M == src || anchored)
return
if (!(status_flags & CANPUSH))
@@ -327,7 +327,7 @@
if ((O.client && !( O.blinded )))
O.show_message(text("\red [] has grabbed [] passively!", M, src), 1)
if("hurt", "disarm")
if(I_HURT, I_DISARM)
adjustBruteLoss(harm_intent_damage)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
@@ -339,12 +339,12 @@
switch(M.a_intent)
if ("help")
if (I_HELP)
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\blue [M] caresses [src] with its scythe like arm."), 1)
if ("grab")
if (I_GRAB)
if(M == src || anchored)
return
if(!(status_flags & CANPUSH))
@@ -364,7 +364,7 @@
if ((O.client && !( O.blinded )))
O.show_message(text("\red [] has grabbed [] passively!", M, src), 1)
if("hurt", "disarm")
if(I_HURT, I_DISARM)
var/damage = rand(15, 30)
visible_message("\red <B>[M] has slashed at [src]!</B>")
adjustBruteLoss(damage)
@@ -374,7 +374,7 @@
/mob/living/simple_animal/attack_larva(mob/living/carbon/alien/larva/L as mob)
switch(L.a_intent)
if("help")
if(I_HELP)
visible_message("\blue [L] rubs it's head against [src]")

View File

@@ -28,7 +28,7 @@
max_co2 = 0
max_tox = 0
a_intent = "hurt" //so they don't get pushed around
a_intent = I_HURT //so they don't get pushed around
environment_smash = 2

View File

@@ -133,7 +133,7 @@
var/losebreath = 0.0//Carbon
var/intent = null//Living
var/shakecamera = 0
var/a_intent = "help"//Living
var/a_intent = I_HELP//Living
var/m_int = null//Living
var/m_intent = "run"//Living
var/lastKnownIP = null

View File

@@ -215,7 +215,7 @@ proc/Gibberish(t, p)//t is the inputted message, and any value higher than 70 fo
message = replacetext(message, " is ", " ")
message = replacetext(message, " are ", " ")
message = replacetext(message, "you", "u")
message = replacetext(message, "help", "halp")
message = replacetext(message, I_HELP, "halp")
message = replacetext(message, "grief", "grife")
message = replacetext(message, "space", "spess")
message = replacetext(message, "carp", "crap")
@@ -293,29 +293,29 @@ It's fairly easy to fix if dealing with single letters but not so much with comp
return 0
//converts intent-strings into numbers and back
var/list/intents = list("help","disarm","grab","hurt")
var/list/intents = list(I_HELP,I_DISARM,I_GRAB,I_HURT)
/proc/intent_numeric(argument)
if(istext(argument))
switch(argument)
if("help") return 0
if("disarm") return 1
if("grab") return 2
if(I_HELP) return 0
if(I_DISARM) return 1
if(I_GRAB) return 2
else return 3
else
switch(argument)
if(0) return "help"
if(1) return "disarm"
if(2) return "grab"
else return "hurt"
if(0) return I_HELP
if(1) return I_DISARM
if(2) return I_GRAB
else return I_HURT
//change a mob's act-intent. Input the intent as a string such as "help" or use "right"/"left
//change a mob's act-intent. Input the intent as a string such as I_HELP or use "right"/"left
/mob/verb/a_intent_change(input as text)
set name = "a-intent"
set hidden = 1
if(ishuman(src) || isalienadult(src) || isbrain(src))
switch(input)
if("help","disarm","grab","hurt")
if(I_HELP,I_DISARM,I_GRAB,I_HURT)
a_intent = input
if("right")
a_intent = intent_numeric((intent_numeric(a_intent)+1) % 4)
@@ -326,14 +326,14 @@ var/list/intents = list("help","disarm","grab","hurt")
else if(isrobot(src) || ismonkey(src) || islarva(src))
switch(input)
if("help")
a_intent = "help"
if("hurt")
a_intent = "hurt"
if(I_HELP)
a_intent = I_HELP
if(I_HURT)
a_intent = I_HURT
if("right","left")
a_intent = intent_numeric(intent_numeric(a_intent) - 3)
if(hud_used && hud_used.action_intent)
if(a_intent == "hurt")
if(a_intent == I_HURT)
hud_used.action_intent.icon_state = "harm"
else
hud_used.action_intent.icon_state = "help"

View File

@@ -73,7 +73,7 @@
new_mob.mutations += M_CLUMSY
new_mob.mutations += M_FAT
new_mob.setBrainLoss(100)
new_mob.a_intent = "hurt"
new_mob.a_intent = I_HURT
new_mob.key = key
new_mob << "<span class='sinister'>Instantly, what was your clothes fall off, and are replaced with a mockery of all that is clowning; Disgusting-looking garb that the foulest of creatures would be afraid of wearing. Your very face begins to shape, mold, into something truely disgusting. A mask made of flesh. Your body is feeling the worst pain it has ever felt. As you think it cannot get any worse, one of your arms turns into a horrific meld of flesh and plastic, making a limb made entirely of bike horns.</span>"
@@ -286,7 +286,7 @@
if("Drone")
new_xeno = new /mob/living/carbon/alien/humanoid/drone(loc)
new_xeno.a_intent = "hurt"
new_xeno.a_intent = I_HURT
new_xeno.key = key
new_xeno << "<B>You are now an alien.</B>"
@@ -322,7 +322,7 @@
new_slime = new /mob/living/carbon/slime/adult(loc)
else
new_slime = new /mob/living/carbon/slime(loc)
new_slime.a_intent = "hurt"
new_slime.a_intent = I_HURT
new_slime.key = key
new_slime << "<B>You are now a slime. Skreee!</B>"
@@ -344,7 +344,7 @@
del(t)
var/mob/living/simple_animal/corgi/new_corgi = new /mob/living/simple_animal/corgi (loc)
new_corgi.a_intent = "hurt"
new_corgi.a_intent = I_HURT
new_corgi.key = key
new_corgi << "<B>You are now a Corgi. Yap Yap!</B>"
@@ -378,7 +378,7 @@
var/mob/new_mob = new mobpath(src.loc)
new_mob.key = key
new_mob.a_intent = "hurt"
new_mob.a_intent = I_HURT
new_mob << "You suddenly feel more... animalistic."
@@ -398,7 +398,7 @@
var/mob/new_mob = new mobpath(src.loc)
new_mob.key = key
new_mob.a_intent = "hurt"
new_mob.a_intent = I_HURT
new_mob << "You feel more... animalistic"
del(src)

View File

@@ -18,7 +18,7 @@
/obj/item/organ/attack_self(mob/user as mob)
// Convert it to an edible form, yum yum.
if(!robotic && user.a_intent == "help" && user.zone_sel.selecting == "mouth")
if(!robotic && user.a_intent == I_HELP && user.zone_sel.selecting == "mouth")
bitten(user)
return

View File

@@ -535,7 +535,7 @@ By design, d1 is the smallest direction and d2 is the highest
if(hasorgans(M))
var/datum/organ/external/S = M:get_organ(user.zone_sel.selecting)
if(!(S.status & ORGAN_ROBOT) || user.a_intent != "help")
if(!(S.status & ORGAN_ROBOT) || user.a_intent != I_HELP)
return ..()
if(S.burn_dam > 0 && use(1))

View File

@@ -670,7 +670,7 @@
/obj/item/weapon/light/afterattack(atom/target, mob/user)
if(istype(target, /obj/machinery/light))
return
if(user.a_intent != "hurt")
if(user.a_intent != I_HURT)
return
shatter()

View File

@@ -217,7 +217,7 @@
if (src.process_chambered())
//Point blank shooting if on harm intent or target we were targeting.
if(user.a_intent == "hurt")
if(user.a_intent == I_HURT)
user.visible_message("\red <b> \The [user] fires \the [src] point blank at [M]!</b>")
in_chamber.damage *= 1.3
src.Fire(M,user,0,0,1)

View File

@@ -90,7 +90,7 @@
/obj/item/weapon/storage/pneumatic/attack(mob/living/M as mob, mob/living/user as mob, def_zone)
if (length(contents) > 0)
if(user.a_intent == "hurt")
if(user.a_intent == I_HURT)
user.visible_message("<span class='danger'>\The [user] fires \the [src] point blank at [M]!</span>")
Fire(M,user)
return

View File

@@ -148,7 +148,7 @@
for (var/obj/effect/proc_holder/spell/S in M.spell_list)
new_mob.spell_list += new S.type
new_mob.a_intent = "hurt"
new_mob.a_intent = I_HURT
if(M.mind)
M.mind.transfer_to(new_mob)
else

View File

@@ -555,7 +555,7 @@
W.loc = M.loc
W.dropped(M)
var/mob/living/carbon/slime/new_mob = new /mob/living/carbon/slime(M.loc)
new_mob.a_intent = "hurt"
new_mob.a_intent = I_HURT
if(M.mind)
M.mind.transfer_to(new_mob)
else

View File

@@ -46,7 +46,7 @@
var/fillevel = gulp_size
//smashing on someone
if(user.a_intent == "hurt" && isGlass && molotov != 1) //to smash on someone, must be harm intent, breakable glass, and have no rag inside
if(user.a_intent == I_HURT && isGlass && molotov != 1) //to smash on someone, must be harm intent, breakable glass, and have no rag inside
if(!M)
return

View File

@@ -64,7 +64,7 @@
user << "\red This syringe is broken!"
return
if (user.a_intent == "hurt" && ismob(target))
if (user.a_intent == I_HURT && ismob(target))
if((M_CLUMSY in user.mutations) && prob(50))
target = user
syringestab(target, user)

View File

@@ -1,6 +1,6 @@
/datum/artifact_effect/hurt
effecttype = "hurt"
effecttype = I_HURT
effect_type = 5
/datum/artifact_effect/hurt/DoEffectTouch(var/mob/toucher)

View File

@@ -90,7 +90,7 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user)
proc/do_surgery(mob/living/M, mob/living/user, obj/item/tool)
if(!istype(M,/mob/living/carbon/human))
return 0
if (user.a_intent == "hurt") //check for Hippocratic Oath
if (user.a_intent == I_HURT) //check for Hippocratic Oath
return 0
var/sleep_fail = 0
var/clumsy = 0
@@ -120,7 +120,7 @@ proc/do_surgery(mob/living/M, mob/living/user, obj/item/tool)
else
S.doing_surgery.Remove(null) //get rid of that now null reference
return 1 //don't want to do weapony things after surgery
if (user.a_intent == "help")
if (user.a_intent == I_HELP)
user << "<span class='warning'>You can't see any useful way to use [tool] on [M].</span>"
return 1
return 0

View File

@@ -502,6 +502,13 @@ var/list/global_mutations = list() // list of hidden mutation things
#define EYE_BLUR "eye_blur"
#define DROWSY "drowsy"
//intent flags yay
#define I_HELP "help"
#define I_DISARM "disarm"
#define I_GRAB "grab"
#define I_HURT "hurt"
//I hate adding defines like this but I'd much rather deal with bitflags than lists and string searches
#define BRUTELOSS 1
#define FIRELOSS 2