Merge pull request #21910 from Mervill/a_intent

a_intent now uses defines
This commit is contained in:
Jordie
2016-12-04 20:08:10 +11:00
committed by GitHub
135 changed files with 237 additions and 237 deletions
+9
View File
@@ -616,3 +616,12 @@ var/global/list/ghost_others_options = list(GHOST_OTHERS_SIMPLE, GHOST_OTHERS_DE
#define VENTCRAWLER_NONE 0
#define VENTCRAWLER_NUDE 1
#define VENTCRAWLER_ALWAYS 2
// Intent
#define INTENT_HELP "help"
#define INTENT_GRAB "grab"
#define INTENT_DISARM "disarm"
#define INTENT_HARM "harm"
// NOTE: This is not a real intent! It's used to allow
// the alternate intent selection stlye (clockwise)
#define INTENT_NEXT "next"
+5 -5
View File
@@ -189,19 +189,19 @@
var/_y = text2num(params2list(params)["icon-y"])
if(_x<=16 && _y<=16)
usr.a_intent_change("harm")
usr.a_intent_change(INTENT_HARM)
else if(_x<=16 && _y>=17)
usr.a_intent_change("help")
usr.a_intent_change(INTENT_HELP)
else if(_x>=17 && _y<=16)
usr.a_intent_change("grab")
usr.a_intent_change(INTENT_GRAB)
else if(_x>=17 && _y>=17)
usr.a_intent_change("disarm")
usr.a_intent_change(INTENT_DISARM)
else
usr.a_intent_change("right")
usr.a_intent_change(INTENT_NEXT)
/obj/screen/act_intent/alien
icon = 'icons/mob/screen_alien.dmi'
+1 -1
View File
@@ -12,7 +12,7 @@
/mob/living/attackby(obj/item/I, mob/user, params)
user.changeNext_move(CLICK_CD_MELEE)
if(user.a_intent == "harm" && stat == DEAD && butcher_results) //can we butcher it?
if(user.a_intent == INTENT_HARM && stat == DEAD && butcher_results) //can we butcher it?
var/sharpness = I.is_sharp()
if(sharpness)
user << "<span class='notice'>You begin to butcher [src]...</span>"
+1 -1
View File
@@ -82,7 +82,7 @@
/mob/living/carbon/monkey/RestrainedClickOn(atom/A)
if(..())
return
if(a_intent != "harm" || !ismob(A))
if(a_intent != INTENT_HARM || !ismob(A))
return
if(is_muzzled())
return
+2 -2
View File
@@ -51,7 +51,7 @@
affected_mob.unEquip(I)
var/mob/living/new_mob = new new_form(affected_mob.loc)
if(istype(new_mob))
new_mob.a_intent = "harm"
new_mob.a_intent = INTENT_HARM
if(affected_mob.mind)
affected_mob.mind.transfer_to(new_mob)
else
@@ -236,4 +236,4 @@
stage3 = list("<span class='danger'>Your appendages are melting away.</span>", "<span class='danger'>Your limbs begin to lose their shape.</span>")
stage4 = list("<span class='danger'>You're ravenous.</span>")
stage5 = list("<span class='danger'>You have become a morph.</span>")
new_form = /mob/living/simple_animal/hostile/morph
new_form = /mob/living/simple_animal/hostile/morph
+2 -2
View File
@@ -349,7 +349,7 @@
if(A.pulling)
D.drop_all_held_items()
D.stop_pulling()
if(A.a_intent == "grab")
if(A.a_intent == INTENT_GRAB)
add_logs(A, D, "grabbed", addition="aggressively")
A.grab_state = GRAB_AGGRESSIVE //Instant aggressive grab
else
@@ -711,7 +711,7 @@
if(C.stat)
user << "<span class='warning'>It would be dishonorable to attack a foe while they cannot retaliate.</span>"
return
if(user.a_intent == "disarm")
if(user.a_intent == INTENT_DISARM)
if(!wielded)
return ..()
if(!ishuman(target))
+1 -1
View File
@@ -624,7 +624,7 @@
return visual_indicators[1]
/datum/mutation/human/laser_eyes/on_ranged_attack(mob/living/carbon/human/owner, atom/target)
if(owner.a_intent == "harm")
if(owner.a_intent == INTENT_HARM)
owner.LaserEyes(target)
+1 -1
View File
@@ -14,7 +14,7 @@
minbodytemp = 0
maxbodytemp = 360
unique_name = 1
a_intent = "harm"
a_intent = INTENT_HARM
var/mob/camera/blob/overmind = null
var/obj/structure/blob/factory/factory = null
@@ -20,7 +20,7 @@
return ..()
/obj/effect/clockwork/sigil/attack_hand(mob/user)
if(iscarbon(user) && !user.stat && (!is_servant_of_ratvar(user) || (is_servant_of_ratvar(user) && user.a_intent == "harm")))
if(iscarbon(user) && !user.stat && (!is_servant_of_ratvar(user) || (is_servant_of_ratvar(user) && user.a_intent == INTENT_HARM)))
user.visible_message("<span class='warning'>[user] stamps out [src]!</span>", "<span class='danger'>You stomp on [src], scattering it into thousands of particles.</span>")
qdel(src)
return 1
@@ -62,7 +62,7 @@
/obj/effect/clockwork/spatial_gateway/attack_hand(mob/living/user)
if(!uses)
return FALSE
if(user.pulling && user.a_intent == "grab" && isliving(user.pulling))
if(user.pulling && user.a_intent == INTENT_GRAB && isliving(user.pulling))
var/mob/living/L = user.pulling
if(L.buckled || L.anchored || L.has_buckled_mobs())
return FALSE
+1 -1
View File
@@ -13,7 +13,7 @@
icon_state = "imp"
icon_living = "imp"
speed = 1
a_intent = "harm"
a_intent = INTENT_HARM
stop_automated_movement = 1
status_flags = CANPUSH
attack_sound = 'sound/magic/demon_attack1.ogg'
@@ -11,7 +11,7 @@
icon_living = "morph"
icon_dead = "morph_dead"
speed = 2
a_intent = "harm"
a_intent = INTENT_HARM
stop_automated_movement = 1
status_flags = CANPUSH
pass_flags = PASSTABLE
@@ -13,7 +13,7 @@
icon_state = "daemon"
icon_living = "daemon"
speed = 1
a_intent = "harm"
a_intent = INTENT_HARM
stop_automated_movement = 1
status_flags = CANPUSH
attack_sound = 'sound/magic/demon_attack1.ogg'
+1 -1
View File
@@ -80,7 +80,7 @@
P.add_fingerprint(user)
update_icon()
else if(istype(O, /obj/item/weapon/weldingtool) && user.a_intent != "harm")
else if(istype(O, /obj/item/weapon/weldingtool) && user.a_intent != INTENT_HARM)
var/obj/item/weapon/weldingtool/WT = O
if(stat & BROKEN)
if(WT.remove_fuel(0,user))
+1 -1
View File
@@ -115,7 +115,7 @@
wires.interact(user)
return 1
if(user.a_intent == "harm") //so we can hit the machine
if(user.a_intent == INTENT_HARM) //so we can hit the machine
return ..()
if(stat)
+1 -1
View File
@@ -99,7 +99,7 @@
update_icon()
return
if(user.a_intent != "harm" && !(W.flags & NOBLUDGEON))
if(user.a_intent != INTENT_HARM && !(W.flags & NOBLUDGEON))
return src.attack_hand(user)
else
return ..()
@@ -132,7 +132,7 @@
transfer_fingerprints_to(B)
qdel(src)
return
if(user.a_intent == "harm")
if(user.a_intent == INTENT_HARM)
return ..()
+1 -1
View File
@@ -250,7 +250,7 @@
return 1
user << "<span class='warning'>You cannot add that to the machine!</span>"
return 0
if(user.a_intent == "harm")
if(user.a_intent == INTENT_HARM)
return ..()
+1 -1
View File
@@ -27,7 +27,7 @@
return
/obj/structure/barricade/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/weapon/weldingtool) && user.a_intent != "harm" && material == METAL)
if(istype(I, /obj/item/weapon/weldingtool) && user.a_intent != INTENT_HARM && material == METAL)
var/obj/item/weapon/weldingtool/WT = I
if(obj_integrity < max_integrity)
if(WT.remove_fuel(0,user))
+2 -2
View File
@@ -149,13 +149,13 @@
return
/obj/machinery/door/attackby(obj/item/I, mob/user, params)
if(user.a_intent != "harm" && (istype(I, /obj/item/weapon/crowbar) || istype(I, /obj/item/weapon/twohanded/fireaxe)))
if(user.a_intent != INTENT_HARM && (istype(I, /obj/item/weapon/crowbar) || istype(I, /obj/item/weapon/twohanded/fireaxe)))
try_to_crowbar(I, user)
return 1
else if(istype(I, /obj/item/weapon/weldingtool))
try_to_weld(I, user)
return 1
else if(!(I.flags & NOBLUDGEON) && user.a_intent != "harm")
else if(!(I.flags & NOBLUDGEON) && user.a_intent != INTENT_HARM)
try_to_activate_door(user)
return 1
else
+1 -1
View File
@@ -88,7 +88,7 @@
if(panel_open && default_deconstruction_crowbar(O))
return
if(user.a_intent == "harm") //so we can hit the machine
if(user.a_intent == INTENT_HARM) //so we can hit the machine
return ..()
/obj/machinery/limbgrower/Topic(href, href_list)
+1 -1
View File
@@ -242,7 +242,7 @@ Class Procs:
/obj/machinery/attack_paw(mob/living/user)
if(user.a_intent != "harm")
if(user.a_intent != INTENT_HARM)
return attack_hand(user)
else
user.changeNext_move(CLICK_CD_MELEE)
+2 -2
View File
@@ -728,7 +728,7 @@ var/list/obj/machinery/newscaster/allCasters = list()
user << "<span class='notice'>You [anchored ? "un" : ""]secure [name].</span>"
new /obj/item/wallframe/newscaster(loc)
qdel(src)
else if(istype(I, /obj/item/weapon/weldingtool) && user.a_intent != "harm")
else if(istype(I, /obj/item/weapon/weldingtool) && user.a_intent != INTENT_HARM)
var/obj/item/weapon/weldingtool/WT = I
if(stat & BROKEN)
if(WT.remove_fuel(0,user))
@@ -775,7 +775,7 @@ var/list/obj/machinery/newscaster/allCasters = list()
/obj/machinery/newscaster/attack_paw(mob/user)
if(user.a_intent != "harm")
if(user.a_intent != INTENT_HARM)
user << "<span class='warning'>The newscaster controls are far too complicated for your tiny brain!</span>"
else
take_damage(5, BRUTE, "melee")
+2 -2
View File
@@ -193,7 +193,7 @@
update_icon()
return
else if(user.a_intent != "harm")
else if(user.a_intent != INTENT_HARM)
if (!state_open)
user << "<span class='warning'>Open the door first!</span>"
@@ -224,7 +224,7 @@
user << "<span class='warning'>[src] is busy.</span>"
return
if(user.pulling && user.a_intent == "grab" && isliving(user.pulling))
if(user.pulling && user.a_intent == INTENT_GRAB && isliving(user.pulling))
var/mob/living/L = user.pulling
if(L.buckled || L.has_buckled_mobs())
return
@@ -53,7 +53,7 @@
else if(isliving(target))
var/mob/living/M = target
if(M.stat == DEAD) return
if(chassis.occupant.a_intent == "harm")
if(chassis.occupant.a_intent == INTENT_HARM)
M.take_overall_damage(dam_force)
if(!M)
return
@@ -104,10 +104,10 @@
else if(isliving(target))
var/mob/living/M = target
if(M.stat == DEAD) return
if(chassis.occupant.a_intent == "harm")
if(chassis.occupant.a_intent == INTENT_HARM)
target.visible_message("<span class='danger'>[chassis] destroys [target] in an unholy fury.</span>", \
"<span class='userdanger'>[chassis] destroys [target] in an unholy fury.</span>")
if(chassis.occupant.a_intent == "disarm")
if(chassis.occupant.a_intent == INTENT_DISARM)
target.visible_message("<span class='danger'>[chassis] rips [target]'s arms off.</span>", \
"<span class='userdanger'>[chassis] rips [target]'s arms off.</span>")
else
+2 -2
View File
@@ -208,7 +208,7 @@
else
user << "<span class='warning'>You need two lengths of cable to fix this mech!</span>"
return
else if(istype(W, /obj/item/weapon/screwdriver) && user.a_intent != "harm")
else if(istype(W, /obj/item/weapon/screwdriver) && user.a_intent != INTENT_HARM)
if(internal_damage & MECHA_INT_TEMP_CONTROL)
clearInternalDamage(MECHA_INT_TEMP_CONTROL)
user << "<span class='notice'>You repair the damaged temperature controller.</span>"
@@ -239,7 +239,7 @@
user << "<span class='notice'>There's already a powercell installed.</span>"
return
else if(istype(W, /obj/item/weapon/weldingtool) && user.a_intent != "harm")
else if(istype(W, /obj/item/weapon/weldingtool) && user.a_intent != INTENT_HARM)
user.changeNext_move(CLICK_CD_MELEE)
var/obj/item/weapon/weldingtool/WT = W
if(obj_integrity<max_integrity)
+1 -1
View File
@@ -19,7 +19,7 @@
var/lastattacker = null
/obj/item/cardboard_cutout/attack_hand(mob/living/user)
if(user.a_intent == "help" || pushed_over)
if(user.a_intent == INTENT_HELP || pushed_over)
return ..()
user.visible_message("<span class='warning'>[user] pushes over [src]!</span>", "<span class='danger'>You push over [src]!</span>")
playsound(src, 'sound/weapons/Genhit.ogg', 50, 1)
@@ -99,7 +99,7 @@
user << "<span class='notice'>\icon[src] You switch [scanning ? "on" : "off"] [src].</span>"
/obj/item/device/geiger_counter/attack(mob/living/M, mob/user)
if(user.a_intent == "help")
if(user.a_intent == INTENT_HELP)
if(!emagged)
user.visible_message("<span class='notice'>[user] scans [M] with [src].</span>", "<span class='notice'>You scan [M]'s radiation levels with [src]...</span>")
if(!M.radiation)
@@ -75,7 +75,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
message_admins("[key_name_admin(user)] set [key_name_admin(M)] on fire")
log_game("[key_name(user)] set [key_name(M)] on fire")
var/obj/item/clothing/mask/cigarette/cig = help_light_cig(M)
if(lit && cig && user.a_intent == "help")
if(lit && cig && user.a_intent == INTENT_HELP)
if(cig.lit)
user << "<span class='notice'>The [cig.name] is already lit.</span>"
if(M == user)
@@ -238,7 +238,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
if(!istype(M))
return ..()
var/obj/item/clothing/mask/cigarette/cig = help_light_cig(M)
if(lit && cig && user.a_intent == "help")
if(lit && cig && user.a_intent == INTENT_HELP)
if(cig.lit)
user << "<span class='notice'>The [cig.name] is already lit.</span>"
if(M == user)
@@ -524,7 +524,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM
message_admins("[key_name_admin(user)] set [key_name_admin(M)] on fire")
log_game("[key_name(user)] set [key_name(M)] on fire")
var/obj/item/clothing/mask/cigarette/cig = help_light_cig(M)
if(lit && cig && user.a_intent == "help")
if(lit && cig && user.a_intent == INTENT_HELP)
if(cig.lit)
user << "<span class='notice'>The [cig.name] is already lit.</span>"
if(M == user)
+2 -2
View File
@@ -373,7 +373,7 @@
return
var/mob/living/carbon/human/H = M
if(user.a_intent == "disarm")
if(user.a_intent == INTENT_DISARM)
if(req_defib && defib.safety)
return
if(!req_defib && !combat)
@@ -402,7 +402,7 @@
user << "<span class='warning'>You need to target your patient's \
chest with [src]!</span>"
return
if(user.a_intent == "harm")
if(user.a_intent == INTENT_HARM)
if(req_defib && defib.safety)
return
if(!req_defib && !combat)
@@ -51,7 +51,7 @@
return
/obj/item/weapon/extinguisher/attack(mob/M, mob/user)
if(user.a_intent == "help" && !safety) //If we're on help intent and going to spray people, don't bash them.
if(user.a_intent == INTENT_HELP && !safety) //If we're on help intent and going to spray people, don't bash them.
return FALSE
else
return ..()
@@ -94,7 +94,7 @@
return
if(!isliving(target))
return
if (user.a_intent == "harm")
if (user.a_intent == INTENT_HARM)
if(!..())
return
if(!iscyborg(target))
@@ -71,7 +71,7 @@
/obj/item/weapon/pneumatic_cannon/afterattack(atom/target, mob/living/carbon/human/user, flag, params)
if(flag && user.a_intent == "harm") //melee attack
if(flag && user.a_intent == INTENT_HARM) //melee attack
return
if(!istype(user))
return
+1 -1
View File
@@ -124,7 +124,7 @@
if(check_martial_counter(L, user))
return
if(user.a_intent != "harm")
if(user.a_intent != INTENT_HARM)
if(status)
if(baton_stun(L, user))
user.do_attack_animation(L)
+1 -1
View File
@@ -384,7 +384,7 @@
var/obj/item/bodypart/affecting = H.get_bodypart(check_zone(user.zone_selected))
if(affecting && affecting.status == BODYPART_ROBOTIC && user.a_intent != "harm")
if(affecting && affecting.status == BODYPART_ROBOTIC && user.a_intent != INTENT_HARM)
if(src.remove_fuel(1))
playsound(loc, 'sound/items/Welder.ogg', 50, 1)
user.visible_message("<span class='notice'>[user] starts to fix some of the dents on [H]'s [affecting.name].</span>", "<span class='notice'>You start fixing some of the dents on [H]'s [affecting.name].</span>")
+1 -1
View File
@@ -70,7 +70,7 @@
return 150 //the damage hulks do on punches to this object, is affected by melee armor
/obj/attack_hulk(mob/living/carbon/human/user, does_attack_animation = 0)
if(user.a_intent == "harm")
if(user.a_intent == INTENT_HARM)
..(user, 1)
visible_message("<span class='danger'>[user] smashes [src]!</span>", null, null, COMBAT_MESSAGE_RANGE)
if(density)
@@ -90,7 +90,7 @@
playsound(loc, 'sound/items/Welder.ogg', 100, 1)
/obj/structure/bed/nest/attack_alien(mob/living/carbon/alien/user)
if(user.a_intent != "harm")
if(user.a_intent != INTENT_HARM)
return attack_hand(user)
else
return ..()
@@ -250,7 +250,7 @@
user.visible_message("<span class='notice'>[user] [anchored ? "anchored" : "unanchored"] \the [src] [anchored ? "to" : "from"] the ground.</span>", \
"<span class='notice'>You [anchored ? "anchored" : "unanchored"] \the [src] [anchored ? "to" : "from"] the ground.</span>", \
"<span class='italics'>You hear a ratchet.</span>")
else if(user.a_intent != "harm" && !(W.flags & NOBLUDGEON))
else if(user.a_intent != INTENT_HARM && !(W.flags & NOBLUDGEON))
if(W.GetID() || !toggle(user))
togglelock(user)
return 1
+1 -1
View File
@@ -121,7 +121,7 @@
toggle_lock(user)
else
user << "<span class='warning'>Access denied.</span>"
else if(istype(W, /obj/item/weapon/weldingtool) && user.a_intent == "help" && !broken)
else if(istype(W, /obj/item/weapon/weldingtool) && user.a_intent == INTENT_HELP && !broken)
var/obj/item/weapon/weldingtool/WT = W
if(obj_integrity < max_integrity && WT.remove_fuel(5, user))
user << "<span class='notice'>You begin repairing [src].</span>"
+1 -1
View File
@@ -59,7 +59,7 @@
update_icon()
else
toggle_cabinet(user)
else if(user.a_intent != "harm")
else if(user.a_intent != INTENT_HARM)
toggle_cabinet(user)
else
return ..()
+1 -1
View File
@@ -26,7 +26,7 @@
/obj/structure/fireaxecabinet/attackby(obj/item/I, mob/user, params)
if(iscyborg(user) || istype(I,/obj/item/device/multitool))
toggle_lock(user)
else if(istype(I, /obj/item/weapon/weldingtool) && user.a_intent == "help" && !broken)
else if(istype(I, /obj/item/weapon/weldingtool) && user.a_intent == INTENT_HELP && !broken)
var/obj/item/weapon/weldingtool/WT = I
if(obj_integrity < max_integrity && WT.remove_fuel(2, user))
user << "<span class='notice'>You begin repairing [src].</span>"
+1 -1
View File
@@ -38,7 +38,7 @@
return 60
/obj/structure/grille/attack_hulk(mob/living/carbon/human/user, does_attack_animation = 0)
if(user.a_intent == "harm")
if(user.a_intent == INTENT_HARM)
if(!shock(user, 70))
..(user, 1)
return 1
+1 -1
View File
@@ -46,7 +46,7 @@
update_icon()
return
else if(user.a_intent != "harm")
else if(user.a_intent != INTENT_HARM)
open = !open
update_icon()
else
@@ -71,7 +71,7 @@
return ..()
/obj/structure/kitchenspike/attack_hand(mob/user)
if(isliving(user.pulling) && user.a_intent == "grab" && !has_buckled_mobs())
if(isliving(user.pulling) && user.a_intent == INTENT_GRAB && !has_buckled_mobs())
var/mob/living/L = user.pulling
if(do_mob(user, src, 120))
if(has_buckled_mobs()) //to prevent spam/queing up attacks
@@ -131,7 +131,7 @@
if(do_after(user,digTool.digspeed*(1+round(max_integrity*0.01)), target = src) && src)
user << "<span class='notice'>You finish digging.</span>"
deconstruct(TRUE)
else if(user.a_intent != "harm")
else if(user.a_intent != INTENT_HARM)
attack_hand(user)
else
return ..()
+1 -1
View File
@@ -57,7 +57,7 @@
qdel(src)
/obj/structure/mirror/attackby(obj/item/I, mob/living/user, params)
if(istype(I, /obj/item/weapon/weldingtool) && user.a_intent != "harm")
if(istype(I, /obj/item/weapon/weldingtool) && user.a_intent != INTENT_HARM)
var/obj/item/weapon/weldingtool/WT = I
if(broken)
user.changeNext_move(CLICK_CD_MELEE)
+3 -3
View File
@@ -58,7 +58,7 @@
attack_hand(user)
/obj/structure/table/attack_hand(mob/living/user)
if(user.a_intent == "grab" && user.pulling && isliving(user.pulling))
if(user.a_intent == INTENT_GRAB && user.pulling && isliving(user.pulling))
var/mob/living/pushed_mob = user.pulling
if(pushed_mob.buckled)
user << "<span class='warning'>[pushed_mob] is buckled to [pushed_mob.buckled]!</span>"
@@ -127,7 +127,7 @@
return
// If the tray IS empty, continue on (tray will be placed on the table like other items)
if(user.a_intent != "harm" && !(I.flags & ABSTRACT))
if(user.a_intent != INTENT_HARM && !(I.flags & ABSTRACT))
if(user.drop_item())
I.Move(loc)
var/list/click_params = params2list(params)
@@ -434,7 +434,7 @@
playsound(src.loc, W.usesound, 50, 1)
deconstruct(TRUE)
return
if(user.a_intent == "harm")
if(user.a_intent == INTENT_HARM)
return ..()
if(user.drop_item())
W.Move(loc)
@@ -53,7 +53,7 @@
else if(istype(I, /obj/item/weapon/wrench))
default_unfasten_wrench(user, I, time = 20)
return
else if(user.a_intent != "harm")
else if(user.a_intent != INTENT_HARM)
user << "<span class='notice'>[I] does not fit into [src].</span>"
return
else
@@ -59,7 +59,7 @@
/obj/structure/transit_tube/station/attack_hand(mob/user)
if(!pod_moving)
if(user.pulling && user.a_intent == "grab" && isliving(user.pulling))
if(user.pulling && user.a_intent == INTENT_GRAB && isliving(user.pulling))
if(open_status == STATION_TUBE_OPEN)
var/mob/living/GM = user.pulling
if(user.grab_state >= GRAB_AGGRESSIVE)
+4 -4
View File
@@ -23,7 +23,7 @@
swirlie.visible_message("<span class='danger'>[user] slams the toilet seat onto [swirlie]'s head!</span>", "<span class='userdanger'>[user] slams the toilet seat onto your head!</span>", "<span class='italics'>You hear reverberating porcelain.</span>")
swirlie.adjustBruteLoss(5)
else if(user.pulling && user.a_intent == "grab" && isliving(user.pulling))
else if(user.pulling && user.a_intent == INTENT_GRAB && isliving(user.pulling))
user.changeNext_move(CLICK_CD_MELEE)
var/mob/living/GM = user.pulling
if(user.grab_state >= GRAB_AGGRESSIVE)
@@ -80,7 +80,7 @@
update_icon()
else if(cistern)
if(user.a_intent != "harm")
if(user.a_intent != INTENT_HARM)
if(I.w_class > WEIGHT_CLASS_NORMAL)
user << "<span class='warning'>[I] does not fit!</span>"
return
@@ -118,7 +118,7 @@
hiddenitem = new /obj/item/weapon/reagent_containers/food/urinalcake
/obj/structure/urinal/attack_hand(mob/user)
if(user.pulling && user.a_intent == "grab" && isliving(user.pulling))
if(user.pulling && user.a_intent == INTENT_GRAB && isliving(user.pulling))
var/mob/living/GM = user.pulling
if(user.grab_state >= GRAB_AGGRESSIVE)
if(GM.loc != get_turf(src))
@@ -491,7 +491,7 @@
if(O.flags & ABSTRACT) //Abstract items like grabs won't wash. No-drop items will though because it's still technically an item in your hand.
return
if(user.a_intent != "harm")
if(user.a_intent != INTENT_HARM)
user << "<span class='notice'>You start washing [O]...</span>"
busy = 1
if(!do_after(user, 40, target = src))
+1 -1
View File
@@ -128,7 +128,7 @@
return 1 //skip the afterattack
add_fingerprint(user)
if(istype(I, /obj/item/weapon/weldingtool) && user.a_intent == "help")
if(istype(I, /obj/item/weapon/weldingtool) && user.a_intent == INTENT_HELP)
var/obj/item/weapon/weldingtool/WT = I
if(obj_integrity < max_integrity)
if(WT.remove_fuel(0,user))
@@ -198,7 +198,7 @@
qdel(src)
/obj/machinery/portable_atmospherics/canister/attackby(obj/item/weapon/W, mob/user, params)
if(user.a_intent != "harm" && istype(W, /obj/item/weapon/weldingtool))
if(user.a_intent != INTENT_HARM && istype(W, /obj/item/weapon/weldingtool))
var/obj/item/weapon/weldingtool/WT = W
if(stat & BROKEN)
if(!WT.remove_fuel(0, user))
+1 -1
View File
@@ -36,7 +36,7 @@
/obj/item/clothing/neck/stethoscope/attack(mob/living/carbon/human/M, mob/living/user)
if(ishuman(M) && isliving(user))
if(user.a_intent == "help")
if(user.a_intent == INTENT_HELP)
var/body_part = parse_zone(user.zone_selected)
if(body_part)
var/their = "their"
+2 -2
View File
@@ -93,7 +93,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 == INTENT_HELP)
var/body_part = parse_zone(user.zone_selected)
if(body_part)
var/their = "their"
@@ -140,7 +140,7 @@
//Pinning medals on people
/obj/item/clothing/tie/medal/attack(mob/living/carbon/human/M, mob/living/user)
if(ishuman(M) && (user.a_intent == "help"))
if(ishuman(M) && (user.a_intent == INTENT_HELP))
if(M.wear_suit)
if((M.wear_suit.flags_inv & HIDEJUMPSUIT)) //Check if the jumpsuit is covered
@@ -27,7 +27,7 @@
return
if(iscarbon(A) && A.reagents && reagents.total_volume)
var/mob/living/carbon/C = A
if(user.a_intent == "harm" && !C.is_mouth_covered())
if(user.a_intent == INTENT_HARM && !C.is_mouth_covered())
reagents.reaction(C, INGEST)
reagents.trans_to(C, reagents.total_volume)
C.visible_message("<span class='danger'>[user] has smothered \the [C] with \the [src]!</span>", "<span class='userdanger'>[user] has smothered you with \the [src]!</span>", "<span class='italics'>You hear some struggling and muffled cries of surprise.</span>")
@@ -309,7 +309,7 @@
name = "soda can"
/obj/item/weapon/reagent_containers/food/drinks/soda_cans/attack(mob/M, mob/user)
if(M == user && !src.reagents.total_volume && user.a_intent == "harm" && user.zone_selected == "head")
if(M == user && !src.reagents.total_volume && user.a_intent == INTENT_HARM && user.zone_selected == "head")
user.visible_message("<span class='warning'>[user] crushes the can of [src] on \his forehead!</span>", "<span class='notice'>You crush the can of [src] on your forehead.</span>")
playsound(user.loc,'sound/weapons/pierce.ogg', rand(10,50), 1)
var/obj/item/trash/can/crushed_can = new /obj/item/trash/can(user.loc)
@@ -53,7 +53,7 @@
if(!target)
return
if(user.a_intent != "harm" || !isGlass)
if(user.a_intent != INTENT_HARM || !isGlass)
return ..()
@@ -659,7 +659,7 @@
..()
/obj/item/weapon/reagent_containers/food/drinks/drinkingglass/attack(obj/target, mob/user)
if(user.a_intent == "harm" && ismob(target) && target.reagents && reagents.total_volume)
if(user.a_intent == INTENT_HARM && ismob(target) && target.reagents && reagents.total_volume)
target.visible_message("<span class='danger'>[user] splashes the contents of [src] onto [target]!</span>", \
"<span class='userdanger'>[user] splashes the contents of [src] onto [target]!</span>")
add_logs(user, target, "splashed", src)
@@ -672,7 +672,7 @@
if((!proximity) || !check_allowed_items(target,target_self=1))
return
else if(reagents.total_volume && user.a_intent == "harm")
else if(reagents.total_volume && user.a_intent == INTENT_HARM)
user.visible_message("<span class='danger'>[user] splashes the contents of [src] onto [target]!</span>", \
"<span class='notice'>You splash the contents of [src] onto [target].</span>")
reagents.reaction(target, TOUCH)
+1 -1
View File
@@ -35,7 +35,7 @@
/obj/item/weapon/reagent_containers/food/snacks/attack(mob/M, mob/user, def_zone)
if(user.a_intent == "harm")
if(user.a_intent == INTENT_HARM)
return ..()
if(!eatverb)
eatverb = pick("bite","chew","nibble","gnaw","gobble","chomp")
@@ -95,7 +95,7 @@
user << "<span class='danger'>It's locked and running.</span>"
return
if(user.pulling && user.a_intent == "grab" && isliving(user.pulling))
if(user.pulling && user.a_intent == INTENT_GRAB && isliving(user.pulling))
var/mob/living/L = user.pulling
if(!iscarbon(L))
user << "<span class='danger'>This item is not suitable for the gibber!</span>"
@@ -149,7 +149,7 @@
user << "<span class='notice'>You insert [loaded] items into [src].</span>"
else if(O.w_class <= WEIGHT_CLASS_NORMAL && !istype(O,/obj/item/weapon/storage) && user.a_intent == "help")
else if(O.w_class <= WEIGHT_CLASS_NORMAL && !istype(O,/obj/item/weapon/storage) && user.a_intent == INTENT_HELP)
if (contents.len>=max_n_of_items)
user << "<span class='warning'>[src] is full, you can't put anything in!</span>"
return 1
@@ -216,7 +216,7 @@
O.loc = src
return 1
else
if(user.a_intent != "harm")
if(user.a_intent != INTENT_HARM)
user << "<span class='warning'>That probably won't blend!</span>"
return 1
else
@@ -228,7 +228,7 @@
if(src.processing)
user << "<span class='warning'>The processor is in the process of processing!</span>"
return 1
if(user.a_intent == "grab" && user.pulling && (isslime(user.pulling) || ismonkey(user.pulling)))
if(user.a_intent == INTENT_GRAB && user.pulling && (isslime(user.pulling) || ismonkey(user.pulling)))
if(user.grab_state < GRAB_AGGRESSIVE)
user << "<span class='warning'>You need a better grip to do that!</span>"
return
@@ -124,7 +124,7 @@
user << "<span class='warning'>There is nothing in [O] to put in [src]!</span>"
return 0
if(user.a_intent != "harm")
if(user.a_intent != INTENT_HARM)
user << "<span class='warning'>\The [src] smartly refuses [O].</span>"
updateUsrDialog()
return 0
+1 -1
View File
@@ -102,7 +102,7 @@
visible_message("<span class='warning'> [user] dunks [W] into \the [src]!</span>")
/obj/structure/holohoop/attack_hand(mob/user)
if(user.pulling && user.a_intent == "grab" && isliving(user.pulling))
if(user.pulling && user.a_intent == INTENT_GRAB && isliving(user.pulling))
var/mob/living/L = user.pulling
if(user.grab_state < GRAB_AGGRESSIVE)
user << "<span class='warning'>You need a better grip to do that!</span>"
+1 -1
View File
@@ -81,7 +81,7 @@
return
/obj/machinery/biogenerator/attackby(obj/item/O, mob/user, params)
if(user.a_intent == "harm")
if(user.a_intent == INTENT_HARM)
return ..()
if(processing)
+1 -1
View File
@@ -106,7 +106,7 @@
user << "<span class='notice'>You add [O] to [src.name].</span>"
updateUsrDialog()
return
else if(user.a_intent != "harm")
else if(user.a_intent != INTENT_HARM)
user << "<span class='warning'>You can't extract any seeds from \the [O.name]!</span>"
else
return ..()
+2 -2
View File
@@ -11,7 +11,7 @@
status_flags = CANSTUN|CANWEAKEN|CANPUSH
mouse_opacity = 1
faction = list("neutral")
a_intent = "harm"
a_intent = INTENT_HARM
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
minbodytemp = 0
wander = 0
@@ -93,7 +93,7 @@
return
/mob/living/simple_animal/hostile/mining_drone/attack_hand(mob/living/carbon/human/M)
if(M.a_intent == "help")
if(M.a_intent == INTENT_HELP)
toggle_mode()
switch(mode)
if(MINEDRONE_COLLECT)
+6 -6
View File
@@ -411,9 +411,9 @@
var/mob/living/carbon/human/M = target
if(target)
if(health > 0)
if(M.a_intent == "help")
if(M.a_intent == INTENT_HELP)
chatter()
if(M.a_intent == "harm")
if(M.a_intent == INTENT_HARM)
retal = 1
retal_target = target
@@ -626,7 +626,7 @@
if(pulledby)
if(Adjacent(pulledby))
a_intent = "disarm"
a_intent = INTENT_DISARM
pulledby.attack_hand(src)
inactivity_period = 10
@@ -1469,7 +1469,7 @@
if(canmove)
if((graytide || (TRAITS & TRAIT_MEAN)) || retal)
interest += targetInterestShift
a_intent = "harm"
a_intent = INTENT_HARM
zone_selected = pick("chest","r_leg","l_leg","r_arm","l_arm","head")
doing |= FIGHTING
if(retal)
@@ -1589,7 +1589,7 @@
tryWalk(TARGET)
else
if(Adjacent(TARGET))
a_intent = pick("disarm","harm")
a_intent = pick(INTENT_DISARM, INTENT_HARM)
M.attack_hand(src)
timeout++
else if(timeout >= 10 || !(targetRange(M) > 14))
@@ -1640,4 +1640,4 @@
TRAITS |= TRAIT_ROBUST
TRAITS |= TRAIT_SMART
faction += "bot_power"
..()
..()
@@ -6,7 +6,7 @@
..()
/mob/living/carbon/alien/humanoid/attack_hulk(mob/living/carbon/human/user, does_attack_animation = 0)
if(user.a_intent == "harm")
if(user.a_intent == INTENT_HARM)
..(user, 1)
adjustBruteLoss(15)
var/hitverb = "punched"
@@ -19,7 +19,7 @@
"<span class='userdanger'>[M] has attempted to kick [src]!</span>", null, COMBAT_MESSAGE_RANGE)
/mob/living/carbon/alien/larva/attack_hulk(mob/living/carbon/human/user, does_attack_animation = 0)
if(user.a_intent == "harm")
if(user.a_intent == INTENT_HARM)
..(user, 1)
adjustBruteLoss(5 + rand(1,9))
spawn()
+2 -2
View File
@@ -85,7 +85,7 @@
/mob/living/carbon/attackby(obj/item/I, mob/user, params)
if(lying && surgeries.len)
if(user != src && user.a_intent == "help")
if(user != src && user.a_intent == INTENT_HELP)
for(var/datum/surgery/S in surgeries)
if(S.next_step(user))
return 1
@@ -734,7 +734,7 @@
"<span class='userdanger'>[src] is attempting to devour you!</span>")
if(!do_mob(src, C, devour_time))
return
if(pulling && pulling == C && grab_state >= GRAB_AGGRESSIVE && a_intent == "grab")
if(pulling && pulling == C && grab_state >= GRAB_AGGRESSIVE && a_intent == INTENT_GRAB)
C.visible_message("<span class='danger'>[src] devours [C]!</span>", \
"<span class='userdanger'>[src] devours you!</span>")
C.forceMove(src)
@@ -77,7 +77,7 @@
ContractDisease(D)
if(lying && surgeries.len)
if(user.a_intent == "help")
if(user.a_intent == INTENT_HELP)
for(var/datum/surgery/S in surgeries)
if(S.next_step(user))
return 1
@@ -93,7 +93,7 @@
if(D.IsSpreadByTouch())
ContractDisease(D)
if(M.a_intent == "help")
if(M.a_intent == INTENT_HELP)
help_shake_act(M)
return 0
@@ -185,7 +185,7 @@
/mob/living/carbon/human/attack_hulk(mob/living/carbon/human/user, does_attack_animation = 0)
if(user.a_intent == "harm")
if(user.a_intent == INTENT_HARM)
var/hulk_verb = pick("smash","pummel")
if(check_shields(15, "the [hulk_verb]ing"))
return
@@ -209,7 +209,7 @@
var/obj/item/bodypart/affecting = get_bodypart(ran_zone(dam_zone))
if(!affecting)
affecting = get_bodypart("chest")
if(M.a_intent == "help")
if(M.a_intent == INTENT_HELP)
..() //shaking
return 0
@@ -232,7 +232,7 @@
return 0
if(..())
if(M.a_intent == "harm")
if(M.a_intent == INTENT_HARM)
if (w_uniform)
w_uniform.add_fingerprint(M)
var/damage = prob(90) ? 20 : 0
@@ -255,7 +255,7 @@
apply_damage(damage, BRUTE, affecting, armor_block)
damage_clothes(damage, BRUTE, "melee", affecting.body_zone)
if(M.a_intent == "disarm") //Always drop item in hand, if no item, get stunned instead.
if(M.a_intent == INTENT_DISARM) //Always drop item in hand, if no item, get stunned instead.
if(get_active_held_item() && drop_item())
playsound(loc, 'sound/weapons/slash.ogg', 25, 1, -1)
visible_message("<span class='danger'>[M] disarmed [src]!</span>", \
@@ -322,7 +322,7 @@
/mob/living/carbon/human/mech_melee_attack(obj/mecha/M)
if(M.occupant.a_intent == "harm")
if(M.occupant.a_intent == INTENT_HARM)
M.do_attack_animation(src)
if(M.damtype == "brute")
step_away(src,M,15)
@@ -1080,7 +1080,7 @@
if(!istype(M)) //sanity check for drones.
return
if((M != H) && M.a_intent != "help" && H.check_shields(0, M.name, attack_type = UNARMED_ATTACK))
if((M != H) && M.a_intent != INTENT_HELP && H.check_shields(0, M.name, attack_type = UNARMED_ATTACK))
add_logs(M, H, "attempted to touch")
H.visible_message("<span class='warning'>[M] attempted to touch [H]!</span>")
return 0
@@ -867,7 +867,7 @@
/datum/species/golem/bluespace/spec_attack_hand(mob/living/carbon/human/M, mob/living/carbon/human/H, datum/martial_art/attacker_style = M.martial_art)
..()
if(world.time > last_teleport + teleport_cooldown && M != H && M.a_intent != "help")
if(world.time > last_teleport + teleport_cooldown && M != H && M.a_intent != INTENT_HELP)
reactive_teleport(H)
/datum/species/golem/bluespace/spec_attacked_by(obj/item/I, mob/living/user, obj/item/bodypart/affecting, intent, mob/living/carbon/human/H)
@@ -945,7 +945,7 @@
/datum/species/golem/bananium/spec_attack_hand(mob/living/carbon/human/M, mob/living/carbon/human/H, datum/martial_art/attacker_style = M.martial_art)
..()
if(world.time > last_banana + banana_cooldown && M != H && M.a_intent != "help")
if(world.time > last_banana + banana_cooldown && M != H && M.a_intent != INTENT_HELP)
new/obj/item/weapon/grown/bananapeel/specialpeel(get_turf(H))
last_banana = world.time
@@ -1064,7 +1064,7 @@
/datum/species/zombie/infectious/spec_life(mob/living/carbon/C)
. = ..()
C.a_intent = "harm" // THE SUFFERING MUST FLOW
C.a_intent = INTENT_HARM // THE SUFFERING MUST FLOW
if(C.InCritical())
C.death()
// Zombies only move around when not in crit, they instantly
@@ -90,7 +90,7 @@
/mob/living/carbon/monkey/attack_alien(mob/living/carbon/alien/humanoid/M)
if(..()) //if harm or disarm intent.
if (M.a_intent == "harm")
if (M.a_intent == INTENT_HARM)
if ((prob(95) && health > 0))
playsound(loc, 'sound/weapons/slice.ogg', 25, 1, -1)
var/damage = rand(15, 30)
@@ -117,7 +117,7 @@
playsound(loc, 'sound/weapons/slashmiss.ogg', 25, 1, -1)
visible_message("<span class='danger'>[M] has attempted to lunge at [name]!</span>", \
"<span class='userdanger'>[M] has attempted to lunge at [name]!</span>", null, COMBAT_MESSAGE_RANGE)
if (M.a_intent == "disarm")
if (M.a_intent == INTENT_DISARM)
playsound(loc, 'sound/weapons/pierce.ogg', 25, 1, -1)
if(prob(95))
Weaken(10)
+2 -2
View File
@@ -125,10 +125,10 @@
if(!M.buckled && !M.has_buckled_mobs())
var/mob_swap
//the puller can always swap with its victim if on grab intent
if(M.pulledby == src && a_intent == "grab")
if(M.pulledby == src && a_intent == INTENT_GRAB)
mob_swap = 1
//restrained people act if they were on 'help' intent to prevent a person being pulled from being seperated from their puller
else if((M.restrained() || M.a_intent == "help") && (restrained() || a_intent == "help"))
else if((M.restrained() || M.a_intent == INTENT_HELP) && (restrained() || a_intent == INTENT_HELP))
mob_swap = 1
if(mob_swap)
//switch our position with M
+3 -3
View File
@@ -92,7 +92,7 @@
/mob/living/mech_melee_attack(obj/mecha/M)
if(M.occupant.a_intent == "harm")
if(M.occupant.a_intent == INTENT_HARM)
M.do_attack_animation(src)
if(M.damtype == "brute")
step_away(src,M,15)
@@ -146,7 +146,7 @@
"<span class='userdanger'>[user] starts to tighten [user.p_their()] grip on you!</span>")
if(!do_mob(user, src, grab_upgrade_time))
return 0
if(!user.pulling || user.pulling != src || user.grab_state != old_grab_state || user.a_intent != "grab")
if(!user.pulling || user.pulling != src || user.grab_state != old_grab_state || user.a_intent != INTENT_GRAB)
return 0
user.grab_state++
switch(user.grab_state)
@@ -208,7 +208,7 @@
M << "No attacking people at spawn, you jackass."
return 0
if (M.a_intent == "harm")
if (M.a_intent == INTENT_HARM)
if(M.is_muzzled() || (M.wear_mask && M.wear_mask.flags_cover & MASKCOVERSMOUTH))
M << "<span class='warning'>You can't bite with your mouth covered!</span>"
return 0
+1 -1
View File
@@ -20,7 +20,7 @@ var/list/ai_list = list()
density = 1
canmove = 0
status_flags = CANSTUN|CANPUSH
a_intent = "harm" //so we always get pushed instead of trying to swap
a_intent = INTENT_HARM //so we always get pushed instead of trying to swap
force_compose = 1 //This ensures that the AI always composes it's own hear message. Needed for hrefs and job display.
sight = SEE_TURFS | SEE_MOBS | SEE_OBJS
see_in_dark = 8
@@ -327,7 +327,7 @@
return !cleared
/mob/living/silicon/robot/attackby(obj/item/weapon/W, mob/user, params)
if(istype(W, /obj/item/weapon/weldingtool) && (user.a_intent != "harm" || user == src))
if(istype(W, /obj/item/weapon/weldingtool) && (user.a_intent != INTENT_HARM || user == src))
user.changeNext_move(CLICK_CD_MELEE)
var/obj/item/weapon/weldingtool/WT = W
if (!getBruteLoss())
@@ -6,7 +6,7 @@
return ..()
/mob/living/silicon/robot/attack_alien(mob/living/carbon/alien/humanoid/M)
if (M.a_intent =="disarm")
if (M.a_intent == INTENT_DISARM)
if(!(lying))
M.do_attack_animation(src, ATTACK_EFFECT_DISARM)
if(get_active_held_item())
@@ -45,11 +45,11 @@
return attack_hand(user)
/mob/living/silicon/attack_larva(mob/living/carbon/alien/larva/L)
if(L.a_intent == "help")
if(L.a_intent == INTENT_HELP)
visible_message("[L.name] rubs its head against [src].")
/mob/living/silicon/attack_hulk(mob/living/carbon/human/user, does_attack_animation = 0)
if(user.a_intent == "harm")
if(user.a_intent == INTENT_HARM)
..(user, 1)
adjustBruteLoss(rand(10, 15))
playsound(loc, "punch", 25, 1, -1)
@@ -23,7 +23,7 @@
return 1
/mob/living/simple_animal/attack_hulk(mob/living/carbon/human/user, does_attack_animation = 0)
if(user.a_intent == "harm")
if(user.a_intent == INTENT_HARM)
..(user, 1)
playsound(loc, "punch", 25, 1, -1)
visible_message("<span class='danger'>[user] has punched [src]!</span>", \
@@ -37,7 +37,7 @@
var/damage = rand(1, 3)
attack_threshold_check(damage)
return 1
if (M.a_intent == "help")
if (M.a_intent == INTENT_HELP)
if (health > 0)
visible_message("<span class='notice'>[M.name] [response_help] [src].</span>")
playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1)
@@ -45,7 +45,7 @@
/mob/living/simple_animal/attack_alien(mob/living/carbon/alien/humanoid/M)
if(..()) //if harm or disarm intent.
if(M.a_intent == "disarm")
if(M.a_intent == INTENT_DISARM)
playsound(loc, 'sound/weapons/pierce.ogg', 25, 1, -1)
visible_message("<span class='danger'>[M] [response_disarm] [name]!</span>", \
"<span class='userdanger'>[M] [response_disarm] [name]!</span>", null, COMBAT_MESSAGE_RANGE)
@@ -226,7 +226,7 @@
/mob/living/simple_animal/bot/attack_hand(mob/living/carbon/human/H)
if(H.a_intent == "help")
if(H.a_intent == INTENT_HELP)
interact(H)
else
return ..()
@@ -271,7 +271,7 @@
ejectpai(user)
else
user.changeNext_move(CLICK_CD_MELEE)
if(istype(W, /obj/item/weapon/weldingtool) && user.a_intent != "harm")
if(istype(W, /obj/item/weapon/weldingtool) && user.a_intent != INTENT_HARM)
if(health >= maxHealth)
user << "<span class='warning'>[src] does not need a repair!</span>"
return
@@ -160,13 +160,13 @@ Auto Patrol[]"},
mode = BOT_HUNT
/mob/living/simple_animal/bot/ed209/attack_hand(mob/living/carbon/human/H)
if(H.a_intent == "harm")
if(H.a_intent == INTENT_HARM)
retaliate(H)
return ..()
/mob/living/simple_animal/bot/ed209/attackby(obj/item/weapon/W, mob/user, params)
..()
if(istype(W, /obj/item/weapon/weldingtool) && user.a_intent != "harm") // Any intent but harm will heal, so we shouldn't get angry.
if(istype(W, /obj/item/weapon/weldingtool) && user.a_intent != INTENT_HARM) // Any intent but harm will heal, so we shouldn't get angry.
return
if(!istype(W, /obj/item/weapon/screwdriver) && (!target)) // Added check for welding tool to fix #2432. Welding tool behavior is handled in superclass.
if(W.force && W.damtype != STAMINA)//If force is non-zero and damage type isn't stamina.
@@ -20,7 +20,7 @@ var/global/mulebot_count = 0
health = 50
maxHealth = 50
damage_coeff = list(BRUTE = 0.5, BURN = 0.7, TOX = 0, CLONE = 0, STAMINA = 0, OXY = 0)
a_intent = "harm" //No swapping
a_intent = INTENT_HARM //No swapping
buckle_lying = 0
mob_size = MOB_SIZE_LARGE
@@ -144,13 +144,13 @@ Auto Patrol: []"},
mode = BOT_HUNT
/mob/living/simple_animal/bot/secbot/attack_hand(mob/living/carbon/human/H)
if(H.a_intent == "harm")
if(H.a_intent == INTENT_HARM)
retaliate(H)
return ..()
/mob/living/simple_animal/bot/secbot/attackby(obj/item/weapon/W, mob/user, params)
..()
if(istype(W, /obj/item/weapon/weldingtool) && user.a_intent != "harm") // Any intent but harm will heal, so we shouldn't get angry.
if(istype(W, /obj/item/weapon/weldingtool) && user.a_intent != INTENT_HARM) // Any intent but harm will heal, so we shouldn't get angry.
return
if(!istype(W, /obj/item/weapon/screwdriver) && (W.force) && (!target) && (W.damtype != STAMINA) ) // Added check for welding tool to fix #2432. Welding tool behavior is handled in superclass.
retaliate(user)
@@ -10,7 +10,7 @@
speak_chance = 1
icon = 'icons/mob/mob.dmi'
speed = 0
a_intent = "harm"
a_intent = INTENT_HARM
stop_automated_movement = 1
status_flags = CANPUSH
attack_sound = 'sound/weapons/punch1.ogg'
@@ -268,6 +268,6 @@
/mob/living/simple_animal/pet/cat/cak/attack_hand(mob/living/L)
..()
if(L.a_intent == "harm" && L.reagents && !stat)
if(L.a_intent == INTENT_HARM && L.reagents && !stat)
L.reagents.add_reagent("nutriment", 0.4)
L.reagents.add_reagent("vitamin", 0.4)
@@ -128,7 +128,7 @@
udder.generateMilk()
/mob/living/simple_animal/cow/attack_hand(mob/living/carbon/M)
if(!stat && M.a_intent == "disarm" && icon_state != icon_dead)
if(!stat && M.a_intent == INTENT_DISARM && icon_state != icon_dead)
M.visible_message("<span class='warning'>[M] tips over [src].</span>",
"<span class='notice'>You tip over [src].</span>")
src << "<span class='userdanger'>You are tipped over by [M]!</span>"
@@ -19,7 +19,7 @@ var/global/list/parasites = list() //all currently existing/living guardians
icon_living = "magicOrange"
icon_dead = "magicOrange"
speed = 0
a_intent = "harm"
a_intent = INTENT_HARM
stop_automated_movement = 1
movement_type = FLYING // Immunity to chasms and landmines, etc.
attack_sound = 'sound/weapons/punch1.ogg'
@@ -1,6 +1,6 @@
//Fire
/mob/living/simple_animal/hostile/guardian/fire
a_intent = "help"
a_intent = INTENT_HELP
melee_damage_lower = 7
melee_damage_upper = 7
attack_sound = 'sound/items/Welder.ogg'
@@ -7,7 +7,7 @@
armour_penetration = 100
/mob/living/simple_animal/hostile/guardian/ranged
a_intent = "help"
a_intent = INTENT_HELP
friendly = "quietly assesses"
melee_damage_lower = 10
melee_damage_upper = 10
@@ -1,6 +1,6 @@
//Healer
/mob/living/simple_animal/hostile/guardian/healer
a_intent = "harm"
a_intent = INTENT_HARM
friendly = "heals"
speed = 0
damage_coeff = list(BRUTE = 0.7, BURN = 0.7, TOX = 0.7, CLONE = 0.7, STAMINA = 0, OXY = 0.7)
@@ -46,7 +46,7 @@
/mob/living/simple_animal/hostile/guardian/healer/ToggleMode()
if(src.loc == summoner)
if(toggle)
a_intent = "harm"
a_intent = INTENT_HARM
speed = 0
damage_coeff = list(BRUTE = 0.7, BURN = 0.7, TOX = 0.7, CLONE = 0.7, STAMINA = 0, OXY = 0.7)
melee_damage_lower = 15
@@ -54,7 +54,7 @@
src << "<span class='danger'><B>You switch to combat mode.</span></B>"
toggle = FALSE
else
a_intent = "help"
a_intent = INTENT_HELP
speed = 1
damage_coeff = list(BRUTE = 1, BURN = 1, TOX = 1, CLONE = 1, STAMINA = 0, OXY = 1)
melee_damage_lower = 0
@@ -22,7 +22,7 @@
attacktext = "slashes"
speak_emote = list("hisses")
bubble_icon = "alien"
a_intent = "harm"
a_intent = INTENT_HARM
attack_sound = 'sound/weapons/bladeslice.ogg'
atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 0, "min_n2" = 0, "max_n2" = 0)
unsuitable_atmos_damage = 15
@@ -155,7 +155,7 @@
name = "lusty xenomorph maid"
melee_damage_lower = 0
melee_damage_upper = 0
a_intent = "help"
a_intent = INTENT_HELP
friendly = "caresses"
obj_damage = 0
environment_smash = 0
@@ -4,7 +4,7 @@
robust_searching = 1
stat_attack = 1
status_flags = 0
a_intent = "harm"
a_intent = INTENT_HARM
gender = NEUTER
var/list/boss_abilities = list() //list of /datum/action/boss
var/datum/boss_active_timed_battle/atb
@@ -8,7 +8,7 @@
gender = NEUTER
melee_damage_lower = 5
melee_damage_upper = 5
a_intent = "harm"
a_intent = INTENT_HARM
attacktext = "gores"
maxHealth = 100
health = 100
@@ -6,7 +6,7 @@
desc = "Attack the weak point for massive damage."
health = 1000
maxHealth = 1000
a_intent = "harm"
a_intent = INTENT_HARM
sentience_type = SENTIENCE_BOSS
environment_smash = 3
obj_damage = 400
@@ -11,7 +11,7 @@
response_disarm = "shoves"
response_harm = "strikes"
status_flags = 0
a_intent = "harm"
a_intent = INTENT_HARM
var/throw_message = "bounces off of"
var/icon_aggro = null // for swapping to when we get aggressive
see_in_dark = 8
@@ -74,7 +74,7 @@
melee_damage_lower = 12
melee_damage_upper = 12
attacktext = "bites into"
a_intent = "harm"
a_intent = INTENT_HARM
speak_emote = list("chitters")
attack_sound = 'sound/weapons/bladeslice.ogg'
aggro_vision_range = 9
@@ -127,7 +127,7 @@
melee_damage_upper = 0
attacktext = "barrels into"
attack_sound = 'sound/weapons/punch1.ogg'
a_intent = "help"
a_intent = INTENT_HELP
speak_emote = list("screeches")
throw_message = "sinks in slowly, before being pushed out of "
deathmessage = "spits up the contents of its stomach before dying!"
@@ -709,7 +709,7 @@
melee_damage_lower = 15
melee_damage_upper = 15
attacktext = "impales"
a_intent = "harm"
a_intent = INTENT_HARM
speak_emote = list("telepathically cries")
attack_sound = 'sound/weapons/bladeslice.ogg'
stat_attack = 1
@@ -874,7 +874,7 @@
response_disarm = "gently pushes aside"
response_harm = "squishes"
friendly = "pinches"
a_intent = "help"
a_intent = INTENT_HELP
ventcrawler = VENTCRAWLER_ALWAYS
gold_core_spawnable = 2
stat_attack = 1
@@ -145,7 +145,7 @@
/mob/living/simple_animal/hostile/mushroom/attack_hand(mob/living/carbon/human/M)
..()
if(M.a_intent == "harm")
if(M.a_intent == INTENT_HARM)
Bruise()
/mob/living/simple_animal/hostile/mushroom/hitby(atom/movable/AM)

Some files were not shown because too many files have changed in this diff Show More