diff --git a/code/__DEFINES/misc.dm b/code/__DEFINES/misc.dm index fab0cc3577b..9bc414d4e63 100644 --- a/code/__DEFINES/misc.dm +++ b/code/__DEFINES/misc.dm @@ -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" diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm index b463ddbcb21..de691d80480 100644 --- a/code/_onclick/hud/screen_objects.dm +++ b/code/_onclick/hud/screen_objects.dm @@ -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' diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm index 7a6e820a2f6..526c374fac6 100644 --- a/code/_onclick/item_attack.dm +++ b/code/_onclick/item_attack.dm @@ -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 << "You begin to butcher [src]..." diff --git a/code/_onclick/other_mobs.dm b/code/_onclick/other_mobs.dm index 014af79e688..b13862d865d 100644 --- a/code/_onclick/other_mobs.dm +++ b/code/_onclick/other_mobs.dm @@ -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 diff --git a/code/datums/diseases/transformation.dm b/code/datums/diseases/transformation.dm index 33c394e5bcc..46744d81b89 100644 --- a/code/datums/diseases/transformation.dm +++ b/code/datums/diseases/transformation.dm @@ -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("Your appendages are melting away.", "Your limbs begin to lose their shape.") stage4 = list("You're ravenous.") stage5 = list("You have become a morph.") - new_form = /mob/living/simple_animal/hostile/morph \ No newline at end of file + new_form = /mob/living/simple_animal/hostile/morph diff --git a/code/datums/martial.dm b/code/datums/martial.dm index dd503f76ddd..b9139980108 100644 --- a/code/datums/martial.dm +++ b/code/datums/martial.dm @@ -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 << "It would be dishonorable to attack a foe while they cannot retaliate." return - if(user.a_intent == "disarm") + if(user.a_intent == INTENT_DISARM) if(!wielded) return ..() if(!ishuman(target)) diff --git a/code/datums/mutations.dm b/code/datums/mutations.dm index 1dddd656616..91f7d962923 100644 --- a/code/datums/mutations.dm +++ b/code/datums/mutations.dm @@ -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) diff --git a/code/game/gamemodes/blob/blobs/blob_mobs.dm b/code/game/gamemodes/blob/blobs/blob_mobs.dm index 483f0ab1a8a..baa7a618583 100644 --- a/code/game/gamemodes/blob/blobs/blob_mobs.dm +++ b/code/game/gamemodes/blob/blobs/blob_mobs.dm @@ -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 diff --git a/code/game/gamemodes/clock_cult/clock_effects/clock_sigils.dm b/code/game/gamemodes/clock_cult/clock_effects/clock_sigils.dm index defffe64968..22f4b2db710 100644 --- a/code/game/gamemodes/clock_cult/clock_effects/clock_sigils.dm +++ b/code/game/gamemodes/clock_cult/clock_effects/clock_sigils.dm @@ -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("[user] stamps out [src]!", "You stomp on [src], scattering it into thousands of particles.") qdel(src) return 1 diff --git a/code/game/gamemodes/clock_cult/clock_effects/spatial_gateway.dm b/code/game/gamemodes/clock_cult/clock_effects/spatial_gateway.dm index e84150ee0de..e9dbcbf86be 100644 --- a/code/game/gamemodes/clock_cult/clock_effects/spatial_gateway.dm +++ b/code/game/gamemodes/clock_cult/clock_effects/spatial_gateway.dm @@ -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 diff --git a/code/game/gamemodes/devil/imp/imp.dm b/code/game/gamemodes/devil/imp/imp.dm index c5f662f5186..211a343b525 100644 --- a/code/game/gamemodes/devil/imp/imp.dm +++ b/code/game/gamemodes/devil/imp/imp.dm @@ -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' diff --git a/code/game/gamemodes/miniantags/morph/morph.dm b/code/game/gamemodes/miniantags/morph/morph.dm index 7dd333eb5f7..cd862ff1700 100644 --- a/code/game/gamemodes/miniantags/morph/morph.dm +++ b/code/game/gamemodes/miniantags/morph/morph.dm @@ -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 diff --git a/code/game/gamemodes/miniantags/slaughter/slaughter.dm b/code/game/gamemodes/miniantags/slaughter/slaughter.dm index e424b85fefc..c4f1b50b3d3 100644 --- a/code/game/gamemodes/miniantags/slaughter/slaughter.dm +++ b/code/game/gamemodes/miniantags/slaughter/slaughter.dm @@ -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' diff --git a/code/game/machinery/PDApainter.dm b/code/game/machinery/PDApainter.dm index e1bf3e23433..4a4b70fd6f4 100644 --- a/code/game/machinery/PDApainter.dm +++ b/code/game/machinery/PDApainter.dm @@ -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)) diff --git a/code/game/machinery/autolathe.dm b/code/game/machinery/autolathe.dm index f5c38986ead..7d52d398425 100644 --- a/code/game/machinery/autolathe.dm +++ b/code/game/machinery/autolathe.dm @@ -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) diff --git a/code/game/machinery/buttons.dm b/code/game/machinery/buttons.dm index 75d06eadf48..5f085df687c 100644 --- a/code/game/machinery/buttons.dm +++ b/code/game/machinery/buttons.dm @@ -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 ..() diff --git a/code/game/machinery/computer/buildandrepair.dm b/code/game/machinery/computer/buildandrepair.dm index 1f42cf05963..0becc8e1257 100644 --- a/code/game/machinery/computer/buildandrepair.dm +++ b/code/game/machinery/computer/buildandrepair.dm @@ -132,7 +132,7 @@ transfer_fingerprints_to(B) qdel(src) return - if(user.a_intent == "harm") + if(user.a_intent == INTENT_HARM) return ..() diff --git a/code/game/machinery/constructable_frame.dm b/code/game/machinery/constructable_frame.dm index de90e7e936a..2c93330b0d6 100644 --- a/code/game/machinery/constructable_frame.dm +++ b/code/game/machinery/constructable_frame.dm @@ -250,7 +250,7 @@ return 1 user << "You cannot add that to the machine!" return 0 - if(user.a_intent == "harm") + if(user.a_intent == INTENT_HARM) return ..() diff --git a/code/game/machinery/deployable.dm b/code/game/machinery/deployable.dm index 1fe145e5565..7f420530153 100644 --- a/code/game/machinery/deployable.dm +++ b/code/game/machinery/deployable.dm @@ -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)) diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm index dff49af80d3..2aeadab1ab3 100644 --- a/code/game/machinery/doors/door.dm +++ b/code/game/machinery/doors/door.dm @@ -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 diff --git a/code/game/machinery/limbgrower.dm b/code/game/machinery/limbgrower.dm index 112b8f028cc..6040ab642e7 100644 --- a/code/game/machinery/limbgrower.dm +++ b/code/game/machinery/limbgrower.dm @@ -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) diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm index ae017293dee..a9ed694d8be 100644 --- a/code/game/machinery/machinery.dm +++ b/code/game/machinery/machinery.dm @@ -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) diff --git a/code/game/machinery/newscaster.dm b/code/game/machinery/newscaster.dm index a6a675d4ec4..edd28df385d 100644 --- a/code/game/machinery/newscaster.dm +++ b/code/game/machinery/newscaster.dm @@ -728,7 +728,7 @@ var/list/obj/machinery/newscaster/allCasters = list() user << "You [anchored ? "un" : ""]secure [name]." 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 << "The newscaster controls are far too complicated for your tiny brain!" else take_damage(5, BRUTE, "melee") diff --git a/code/game/machinery/washing_machine.dm b/code/game/machinery/washing_machine.dm index d5c7528ff3e..a7f9125cd22 100644 --- a/code/game/machinery/washing_machine.dm +++ b/code/game/machinery/washing_machine.dm @@ -193,7 +193,7 @@ update_icon() return - else if(user.a_intent != "harm") + else if(user.a_intent != INTENT_HARM) if (!state_open) user << "Open the door first!" @@ -224,7 +224,7 @@ user << "[src] is busy." 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 diff --git a/code/game/mecha/equipment/tools/work_tools.dm b/code/game/mecha/equipment/tools/work_tools.dm index 586e67bebb5..fdfe4916e0a 100644 --- a/code/game/mecha/equipment/tools/work_tools.dm +++ b/code/game/mecha/equipment/tools/work_tools.dm @@ -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("[chassis] destroys [target] in an unholy fury.", \ "[chassis] destroys [target] in an unholy fury.") - if(chassis.occupant.a_intent == "disarm") + if(chassis.occupant.a_intent == INTENT_DISARM) target.visible_message("[chassis] rips [target]'s arms off.", \ "[chassis] rips [target]'s arms off.") else diff --git a/code/game/mecha/mecha_defense.dm b/code/game/mecha/mecha_defense.dm index bd2c8586d51..3e8876456ef 100644 --- a/code/game/mecha/mecha_defense.dm +++ b/code/game/mecha/mecha_defense.dm @@ -208,7 +208,7 @@ else user << "You need two lengths of cable to fix this mech!" 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 << "You repair the damaged temperature controller." @@ -239,7 +239,7 @@ user << "There's already a powercell installed." 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[user] pushes over [src]!", "You push over [src]!") playsound(src, 'sound/weapons/Genhit.ogg', 50, 1) diff --git a/code/game/objects/items/devices/geiger_counter.dm b/code/game/objects/items/devices/geiger_counter.dm index bea587bef21..e328ad74f66 100644 --- a/code/game/objects/items/devices/geiger_counter.dm +++ b/code/game/objects/items/devices/geiger_counter.dm @@ -99,7 +99,7 @@ user << "\icon[src] You switch [scanning ? "on" : "off"] [src]." /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("[user] scans [M] with [src].", "You scan [M]'s radiation levels with [src]...") if(!M.radiation) diff --git a/code/game/objects/items/weapons/cigs_lighters.dm b/code/game/objects/items/weapons/cigs_lighters.dm index c62a778a486..2f2ff9a1d02 100644 --- a/code/game/objects/items/weapons/cigs_lighters.dm +++ b/code/game/objects/items/weapons/cigs_lighters.dm @@ -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 << "The [cig.name] is already lit." 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 << "The [cig.name] is already lit." 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 << "The [cig.name] is already lit." if(M == user) diff --git a/code/game/objects/items/weapons/defib.dm b/code/game/objects/items/weapons/defib.dm index 81141b2d729..536f0331522 100644 --- a/code/game/objects/items/weapons/defib.dm +++ b/code/game/objects/items/weapons/defib.dm @@ -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 << "You need to target your patient's \ chest with [src]!" return - if(user.a_intent == "harm") + if(user.a_intent == INTENT_HARM) if(req_defib && defib.safety) return if(!req_defib && !combat) diff --git a/code/game/objects/items/weapons/extinguisher.dm b/code/game/objects/items/weapons/extinguisher.dm index 61b31ae11c1..f70c7db2904 100644 --- a/code/game/objects/items/weapons/extinguisher.dm +++ b/code/game/objects/items/weapons/extinguisher.dm @@ -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 ..() diff --git a/code/game/objects/items/weapons/melee/misc.dm b/code/game/objects/items/weapons/melee/misc.dm index 642e2175eb9..8c5e3074fef 100644 --- a/code/game/objects/items/weapons/melee/misc.dm +++ b/code/game/objects/items/weapons/melee/misc.dm @@ -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)) diff --git a/code/game/objects/items/weapons/pneumaticCannon.dm b/code/game/objects/items/weapons/pneumaticCannon.dm index 72c61944621..a8701e24cb8 100644 --- a/code/game/objects/items/weapons/pneumaticCannon.dm +++ b/code/game/objects/items/weapons/pneumaticCannon.dm @@ -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 diff --git a/code/game/objects/items/weapons/stunbaton.dm b/code/game/objects/items/weapons/stunbaton.dm index 4cbfd7d6e7e..0d814b73d98 100644 --- a/code/game/objects/items/weapons/stunbaton.dm +++ b/code/game/objects/items/weapons/stunbaton.dm @@ -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) diff --git a/code/game/objects/items/weapons/tools.dm b/code/game/objects/items/weapons/tools.dm index 3d10dca27da..f55d87d1642 100644 --- a/code/game/objects/items/weapons/tools.dm +++ b/code/game/objects/items/weapons/tools.dm @@ -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("[user] starts to fix some of the dents on [H]'s [affecting.name].", "You start fixing some of the dents on [H]'s [affecting.name].") diff --git a/code/game/objects/obj_defense.dm b/code/game/objects/obj_defense.dm index 8e8e375f123..3991dc1e54a 100644 --- a/code/game/objects/obj_defense.dm +++ b/code/game/objects/obj_defense.dm @@ -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("[user] smashes [src]!", null, null, COMBAT_MESSAGE_RANGE) if(density) diff --git a/code/game/objects/structures/beds_chairs/alien_nest.dm b/code/game/objects/structures/beds_chairs/alien_nest.dm index 786d0af9b88..0b768660c2d 100644 --- a/code/game/objects/structures/beds_chairs/alien_nest.dm +++ b/code/game/objects/structures/beds_chairs/alien_nest.dm @@ -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 ..() \ No newline at end of file diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm index 8eb1fccd93e..dc90fdfff03 100644 --- a/code/game/objects/structures/crates_lockers/closets.dm +++ b/code/game/objects/structures/crates_lockers/closets.dm @@ -250,7 +250,7 @@ user.visible_message("[user] [anchored ? "anchored" : "unanchored"] \the [src] [anchored ? "to" : "from"] the ground.", \ "You [anchored ? "anchored" : "unanchored"] \the [src] [anchored ? "to" : "from"] the ground.", \ "You hear a ratchet.") - 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 diff --git a/code/game/objects/structures/displaycase.dm b/code/game/objects/structures/displaycase.dm index 17474760f0e..a1f18e18f98 100644 --- a/code/game/objects/structures/displaycase.dm +++ b/code/game/objects/structures/displaycase.dm @@ -121,7 +121,7 @@ toggle_lock(user) else user << "Access denied." - 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 << "You begin repairing [src]." diff --git a/code/game/objects/structures/extinguisher.dm b/code/game/objects/structures/extinguisher.dm index 0b5e1ed3977..632f6e65c01 100644 --- a/code/game/objects/structures/extinguisher.dm +++ b/code/game/objects/structures/extinguisher.dm @@ -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 ..() diff --git a/code/game/objects/structures/fireaxe.dm b/code/game/objects/structures/fireaxe.dm index 0dfe105c7af..1dcf22f2e63 100644 --- a/code/game/objects/structures/fireaxe.dm +++ b/code/game/objects/structures/fireaxe.dm @@ -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 << "You begin repairing [src]." diff --git a/code/game/objects/structures/grille.dm b/code/game/objects/structures/grille.dm index f29d08fe739..a10fd266d85 100644 --- a/code/game/objects/structures/grille.dm +++ b/code/game/objects/structures/grille.dm @@ -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 diff --git a/code/game/objects/structures/guncase.dm b/code/game/objects/structures/guncase.dm index c2511923ef3..6f33866175e 100644 --- a/code/game/objects/structures/guncase.dm +++ b/code/game/objects/structures/guncase.dm @@ -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 diff --git a/code/game/objects/structures/kitchen_spike.dm b/code/game/objects/structures/kitchen_spike.dm index 99593f51ebe..470effab3cb 100644 --- a/code/game/objects/structures/kitchen_spike.dm +++ b/code/game/objects/structures/kitchen_spike.dm @@ -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 diff --git a/code/game/objects/structures/mineral_doors.dm b/code/game/objects/structures/mineral_doors.dm index d32b5e3b687..f6903d5d26a 100644 --- a/code/game/objects/structures/mineral_doors.dm +++ b/code/game/objects/structures/mineral_doors.dm @@ -131,7 +131,7 @@ if(do_after(user,digTool.digspeed*(1+round(max_integrity*0.01)), target = src) && src) user << "You finish digging." deconstruct(TRUE) - else if(user.a_intent != "harm") + else if(user.a_intent != INTENT_HARM) attack_hand(user) else return ..() diff --git a/code/game/objects/structures/mirror.dm b/code/game/objects/structures/mirror.dm index da76fbd7211..7d1a16b8e98 100644 --- a/code/game/objects/structures/mirror.dm +++ b/code/game/objects/structures/mirror.dm @@ -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) diff --git a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm index eb8dbe2615c..2614d438c6a 100644 --- a/code/game/objects/structures/tables_racks.dm +++ b/code/game/objects/structures/tables_racks.dm @@ -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 << "[pushed_mob] is buckled to [pushed_mob.buckled]!" @@ -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) diff --git a/code/game/objects/structures/tank_dispenser.dm b/code/game/objects/structures/tank_dispenser.dm index 1a95786b56a..649e2e46cd9 100644 --- a/code/game/objects/structures/tank_dispenser.dm +++ b/code/game/objects/structures/tank_dispenser.dm @@ -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 << "[I] does not fit into [src]." return else diff --git a/code/game/objects/structures/transit_tubes/station.dm b/code/game/objects/structures/transit_tubes/station.dm index 3f535a5167e..fe86ac68a83 100644 --- a/code/game/objects/structures/transit_tubes/station.dm +++ b/code/game/objects/structures/transit_tubes/station.dm @@ -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) diff --git a/code/game/objects/structures/watercloset.dm b/code/game/objects/structures/watercloset.dm index 2f6d968420f..db3e3f9d2fc 100644 --- a/code/game/objects/structures/watercloset.dm +++ b/code/game/objects/structures/watercloset.dm @@ -23,7 +23,7 @@ swirlie.visible_message("[user] slams the toilet seat onto [swirlie]'s head!", "[user] slams the toilet seat onto your head!", "You hear reverberating porcelain.") 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 << "[I] does not fit!" 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 << "You start washing [O]..." busy = 1 if(!do_after(user, 40, target = src)) diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index 1abcc780256..69d0dc8744b 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -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)) diff --git a/code/modules/atmospherics/machinery/portable/canister.dm b/code/modules/atmospherics/machinery/portable/canister.dm index 0e722acfba4..45ae4d90dae 100644 --- a/code/modules/atmospherics/machinery/portable/canister.dm +++ b/code/modules/atmospherics/machinery/portable/canister.dm @@ -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)) diff --git a/code/modules/clothing/neck/ties.dm b/code/modules/clothing/neck/ties.dm index 33eaa672790..7c5086a999c 100644 --- a/code/modules/clothing/neck/ties.dm +++ b/code/modules/clothing/neck/ties.dm @@ -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" diff --git a/code/modules/clothing/under/ties.dm b/code/modules/clothing/under/ties.dm index b8bb371f8ee..135df2ef4ab 100644 --- a/code/modules/clothing/under/ties.dm +++ b/code/modules/clothing/under/ties.dm @@ -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 diff --git a/code/modules/detectivework/footprints_and_rag.dm b/code/modules/detectivework/footprints_and_rag.dm index 7342e998b1e..b65da2e91cd 100644 --- a/code/modules/detectivework/footprints_and_rag.dm +++ b/code/modules/detectivework/footprints_and_rag.dm @@ -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("[user] has smothered \the [C] with \the [src]!", "[user] has smothered you with \the [src]!", "You hear some struggling and muffled cries of surprise.") diff --git a/code/modules/food_and_drinks/drinks/drinks.dm b/code/modules/food_and_drinks/drinks/drinks.dm index 8c6770865f7..e2bf191bd27 100644 --- a/code/modules/food_and_drinks/drinks/drinks.dm +++ b/code/modules/food_and_drinks/drinks/drinks.dm @@ -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("[user] crushes the can of [src] on \his forehead!", "You crush the can of [src] on your forehead.") 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) diff --git a/code/modules/food_and_drinks/drinks/drinks/bottle.dm b/code/modules/food_and_drinks/drinks/drinks/bottle.dm index 55f7f8ef7c5..dbbf7cdff51 100644 --- a/code/modules/food_and_drinks/drinks/drinks/bottle.dm +++ b/code/modules/food_and_drinks/drinks/drinks/bottle.dm @@ -53,7 +53,7 @@ if(!target) return - if(user.a_intent != "harm" || !isGlass) + if(user.a_intent != INTENT_HARM || !isGlass) return ..() diff --git a/code/modules/food_and_drinks/drinks/drinks/drinkingglass.dm b/code/modules/food_and_drinks/drinks/drinks/drinkingglass.dm index 426514e8fc0..a74fe73f2d3 100644 --- a/code/modules/food_and_drinks/drinks/drinks/drinkingglass.dm +++ b/code/modules/food_and_drinks/drinks/drinks/drinkingglass.dm @@ -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("[user] splashes the contents of [src] onto [target]!", \ "[user] splashes the contents of [src] onto [target]!") 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("[user] splashes the contents of [src] onto [target]!", \ "You splash the contents of [src] onto [target].") reagents.reaction(target, TOUCH) diff --git a/code/modules/food_and_drinks/food/snacks.dm b/code/modules/food_and_drinks/food/snacks.dm index e5f54087bba..020cd6b48cc 100644 --- a/code/modules/food_and_drinks/food/snacks.dm +++ b/code/modules/food_and_drinks/food/snacks.dm @@ -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") diff --git a/code/modules/food_and_drinks/kitchen_machinery/gibber.dm b/code/modules/food_and_drinks/kitchen_machinery/gibber.dm index 041a05a9f6e..fa975e12ce9 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/gibber.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/gibber.dm @@ -95,7 +95,7 @@ user << "It's locked and running." 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 << "This item is not suitable for the gibber!" diff --git a/code/modules/food_and_drinks/kitchen_machinery/microwave.dm b/code/modules/food_and_drinks/kitchen_machinery/microwave.dm index 7daf6ff3a03..2d2a9c6b498 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/microwave.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/microwave.dm @@ -149,7 +149,7 @@ user << "You insert [loaded] items into [src]." - 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 << "[src] is full, you can't put anything in!" return 1 diff --git a/code/modules/food_and_drinks/kitchen_machinery/processor.dm b/code/modules/food_and_drinks/kitchen_machinery/processor.dm index f6a1cc52e7f..2c52f2889c2 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/processor.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/processor.dm @@ -216,7 +216,7 @@ O.loc = src return 1 else - if(user.a_intent != "harm") + if(user.a_intent != INTENT_HARM) user << "That probably won't blend!" return 1 else @@ -228,7 +228,7 @@ if(src.processing) user << "The processor is in the process of processing!" 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 << "You need a better grip to do that!" return diff --git a/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm b/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm index 505f314e18c..b3ac193c3c2 100644 --- a/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm +++ b/code/modules/food_and_drinks/kitchen_machinery/smartfridge.dm @@ -124,7 +124,7 @@ user << "There is nothing in [O] to put in [src]!" return 0 - if(user.a_intent != "harm") + if(user.a_intent != INTENT_HARM) user << "\The [src] smartly refuses [O]." updateUsrDialog() return 0 diff --git a/code/modules/holodeck/items.dm b/code/modules/holodeck/items.dm index 90eba34a123..c146cb2f89e 100644 --- a/code/modules/holodeck/items.dm +++ b/code/modules/holodeck/items.dm @@ -102,7 +102,7 @@ visible_message(" [user] dunks [W] into \the [src]!") /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 << "You need a better grip to do that!" diff --git a/code/modules/hydroponics/biogenerator.dm b/code/modules/hydroponics/biogenerator.dm index 82287601089..06528c78e53 100644 --- a/code/modules/hydroponics/biogenerator.dm +++ b/code/modules/hydroponics/biogenerator.dm @@ -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) diff --git a/code/modules/hydroponics/seed_extractor.dm b/code/modules/hydroponics/seed_extractor.dm index 1d146cdff00..3cd619c0d8b 100644 --- a/code/modules/hydroponics/seed_extractor.dm +++ b/code/modules/hydroponics/seed_extractor.dm @@ -106,7 +106,7 @@ user << "You add [O] to [src.name]." updateUsrDialog() return - else if(user.a_intent != "harm") + else if(user.a_intent != INTENT_HARM) user << "You can't extract any seeds from \the [O.name]!" else return ..() diff --git a/code/modules/mining/minebot.dm b/code/modules/mining/minebot.dm index 177c604c370..9a241ec9e99 100644 --- a/code/modules/mining/minebot.dm +++ b/code/modules/mining/minebot.dm @@ -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) diff --git a/code/modules/mob/interactive.dm b/code/modules/mob/interactive.dm index 3f72bef2d97..dd43d3b90b9 100644 --- a/code/modules/mob/interactive.dm +++ b/code/modules/mob/interactive.dm @@ -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" - ..() \ No newline at end of file + ..() diff --git a/code/modules/mob/living/carbon/alien/humanoid/humanoid_defense.dm b/code/modules/mob/living/carbon/alien/humanoid/humanoid_defense.dm index bd8a1322460..b6c3b4427be 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/humanoid_defense.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/humanoid_defense.dm @@ -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" diff --git a/code/modules/mob/living/carbon/alien/larva/larva_defense.dm b/code/modules/mob/living/carbon/alien/larva/larva_defense.dm index a5b406612ea..e976375b6ab 100644 --- a/code/modules/mob/living/carbon/alien/larva/larva_defense.dm +++ b/code/modules/mob/living/carbon/alien/larva/larva_defense.dm @@ -19,7 +19,7 @@ "[M] has attempted to kick [src]!", 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() diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 8e67654daad..3269e7c5fb9 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -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 @@ "[src] is attempting to devour you!") 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("[src] devours [C]!", \ "[src] devours you!") C.forceMove(src) diff --git a/code/modules/mob/living/carbon/carbon_defense.dm b/code/modules/mob/living/carbon/carbon_defense.dm index 4f75dfab952..d619d6f54bf 100644 --- a/code/modules/mob/living/carbon/carbon_defense.dm +++ b/code/modules/mob/living/carbon/carbon_defense.dm @@ -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 diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index 35a0929c65b..9cb27e4a1ac 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -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("[M] disarmed [src]!", \ @@ -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) diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index 1affad7562c..52760dcd628 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -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("[M] attempted to touch [H]!") return 0 diff --git a/code/modules/mob/living/carbon/human/species_types.dm b/code/modules/mob/living/carbon/human/species_types.dm index 610981f041f..7fbd2fd55a2 100644 --- a/code/modules/mob/living/carbon/human/species_types.dm +++ b/code/modules/mob/living/carbon/human/species_types.dm @@ -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 diff --git a/code/modules/mob/living/carbon/monkey/monkey_defense.dm b/code/modules/mob/living/carbon/monkey/monkey_defense.dm index b9400a3d30f..ecf5ce584a6 100644 --- a/code/modules/mob/living/carbon/monkey/monkey_defense.dm +++ b/code/modules/mob/living/carbon/monkey/monkey_defense.dm @@ -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("[M] has attempted to lunge at [name]!", \ "[M] has attempted to lunge at [name]!", 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) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index ffbf0c43505..75a8ed51bd6 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -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 diff --git a/code/modules/mob/living/living_defense.dm b/code/modules/mob/living/living_defense.dm index bbb851796cc..53d6614d420 100644 --- a/code/modules/mob/living/living_defense.dm +++ b/code/modules/mob/living/living_defense.dm @@ -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 @@ "[user] starts to tighten [user.p_their()] grip on you!") 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 << "You can't bite with your mouth covered!" return 0 diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index bc0109bf697..35e9b0e8fa0 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -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 diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 8f999da6f03..9002b16850e 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -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()) diff --git a/code/modules/mob/living/silicon/robot/robot_defense.dm b/code/modules/mob/living/silicon/robot/robot_defense.dm index 7e317bf00c3..346a77a3824 100644 --- a/code/modules/mob/living/silicon/robot/robot_defense.dm +++ b/code/modules/mob/living/silicon/robot/robot_defense.dm @@ -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()) diff --git a/code/modules/mob/living/silicon/silicon_defense.dm b/code/modules/mob/living/silicon/silicon_defense.dm index 93c568e56d0..b9d27aebb62 100644 --- a/code/modules/mob/living/silicon/silicon_defense.dm +++ b/code/modules/mob/living/silicon/silicon_defense.dm @@ -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) diff --git a/code/modules/mob/living/simple_animal/animal_defense.dm b/code/modules/mob/living/simple_animal/animal_defense.dm index af3d9de7d6c..a7e2f803f10 100644 --- a/code/modules/mob/living/simple_animal/animal_defense.dm +++ b/code/modules/mob/living/simple_animal/animal_defense.dm @@ -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("[user] has punched [src]!", \ @@ -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("[M.name] [response_help] [src].") 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("[M] [response_disarm] [name]!", \ "[M] [response_disarm] [name]!", null, COMBAT_MESSAGE_RANGE) diff --git a/code/modules/mob/living/simple_animal/bot/bot.dm b/code/modules/mob/living/simple_animal/bot/bot.dm index 042de50dcad..08cbde06660 100644 --- a/code/modules/mob/living/simple_animal/bot/bot.dm +++ b/code/modules/mob/living/simple_animal/bot/bot.dm @@ -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 << "[src] does not need a repair!" return diff --git a/code/modules/mob/living/simple_animal/bot/ed209bot.dm b/code/modules/mob/living/simple_animal/bot/ed209bot.dm index 2ae182b7c06..33229ce97b0 100644 --- a/code/modules/mob/living/simple_animal/bot/ed209bot.dm +++ b/code/modules/mob/living/simple_animal/bot/ed209bot.dm @@ -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. diff --git a/code/modules/mob/living/simple_animal/bot/mulebot.dm b/code/modules/mob/living/simple_animal/bot/mulebot.dm index 79efe3c5aee..6b5bf1e48b9 100644 --- a/code/modules/mob/living/simple_animal/bot/mulebot.dm +++ b/code/modules/mob/living/simple_animal/bot/mulebot.dm @@ -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 diff --git a/code/modules/mob/living/simple_animal/bot/secbot.dm b/code/modules/mob/living/simple_animal/bot/secbot.dm index 9a709560132..8b441d3ed4a 100644 --- a/code/modules/mob/living/simple_animal/bot/secbot.dm +++ b/code/modules/mob/living/simple_animal/bot/secbot.dm @@ -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) diff --git a/code/modules/mob/living/simple_animal/constructs.dm b/code/modules/mob/living/simple_animal/constructs.dm index 5a7eceaf92e..a103ef0a6cd 100644 --- a/code/modules/mob/living/simple_animal/constructs.dm +++ b/code/modules/mob/living/simple_animal/constructs.dm @@ -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' diff --git a/code/modules/mob/living/simple_animal/friendly/cat.dm b/code/modules/mob/living/simple_animal/friendly/cat.dm index 61990c8e8f2..fe2a34f1360 100644 --- a/code/modules/mob/living/simple_animal/friendly/cat.dm +++ b/code/modules/mob/living/simple_animal/friendly/cat.dm @@ -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) diff --git a/code/modules/mob/living/simple_animal/friendly/farm_animals.dm b/code/modules/mob/living/simple_animal/friendly/farm_animals.dm index 9751db4b4c2..277bb22e818 100644 --- a/code/modules/mob/living/simple_animal/friendly/farm_animals.dm +++ b/code/modules/mob/living/simple_animal/friendly/farm_animals.dm @@ -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("[M] tips over [src].", "You tip over [src].") src << "You are tipped over by [M]!" diff --git a/code/modules/mob/living/simple_animal/guardian/guardian.dm b/code/modules/mob/living/simple_animal/guardian/guardian.dm index e1eeda4aada..0adbf952a7b 100644 --- a/code/modules/mob/living/simple_animal/guardian/guardian.dm +++ b/code/modules/mob/living/simple_animal/guardian/guardian.dm @@ -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' diff --git a/code/modules/mob/living/simple_animal/guardian/types/fire.dm b/code/modules/mob/living/simple_animal/guardian/types/fire.dm index 2ede8928032..05c7fcc146e 100644 --- a/code/modules/mob/living/simple_animal/guardian/types/fire.dm +++ b/code/modules/mob/living/simple_animal/guardian/types/fire.dm @@ -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' diff --git a/code/modules/mob/living/simple_animal/guardian/types/ranged.dm b/code/modules/mob/living/simple_animal/guardian/types/ranged.dm index 842bc5e7200..be69f8624ed 100644 --- a/code/modules/mob/living/simple_animal/guardian/types/ranged.dm +++ b/code/modules/mob/living/simple_animal/guardian/types/ranged.dm @@ -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 diff --git a/code/modules/mob/living/simple_animal/guardian/types/support.dm b/code/modules/mob/living/simple_animal/guardian/types/support.dm index 7bbcb87c079..792e2dda494 100644 --- a/code/modules/mob/living/simple_animal/guardian/types/support.dm +++ b/code/modules/mob/living/simple_animal/guardian/types/support.dm @@ -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 << "You switch to combat mode." 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 diff --git a/code/modules/mob/living/simple_animal/hostile/alien.dm b/code/modules/mob/living/simple_animal/hostile/alien.dm index 32c330d2cd5..be00d14a180 100644 --- a/code/modules/mob/living/simple_animal/hostile/alien.dm +++ b/code/modules/mob/living/simple_animal/hostile/alien.dm @@ -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 diff --git a/code/modules/mob/living/simple_animal/hostile/bosses/boss.dm b/code/modules/mob/living/simple_animal/hostile/bosses/boss.dm index ae3cec51a75..17e5856ca50 100644 --- a/code/modules/mob/living/simple_animal/hostile/bosses/boss.dm +++ b/code/modules/mob/living/simple_animal/hostile/bosses/boss.dm @@ -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 diff --git a/code/modules/mob/living/simple_animal/hostile/illusion.dm b/code/modules/mob/living/simple_animal/hostile/illusion.dm index fdde147b9ef..eef563eda31 100644 --- a/code/modules/mob/living/simple_animal/hostile/illusion.dm +++ b/code/modules/mob/living/simple_animal/hostile/illusion.dm @@ -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 diff --git a/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm b/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm index cfc8ab40d36..29e0dfcbabd 100644 --- a/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm +++ b/code/modules/mob/living/simple_animal/hostile/megafauna/megafauna.dm @@ -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 diff --git a/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm b/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm index 39613d44b33..a297813ab7d 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm @@ -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 diff --git a/code/modules/mob/living/simple_animal/hostile/mushroom.dm b/code/modules/mob/living/simple_animal/hostile/mushroom.dm index 3e19b2de01e..a4f33242ddd 100644 --- a/code/modules/mob/living/simple_animal/hostile/mushroom.dm +++ b/code/modules/mob/living/simple_animal/hostile/mushroom.dm @@ -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) diff --git a/code/modules/mob/living/simple_animal/hostile/nanotrasen.dm b/code/modules/mob/living/simple_animal/hostile/nanotrasen.dm index e935422f151..112370b2b20 100644 --- a/code/modules/mob/living/simple_animal/hostile/nanotrasen.dm +++ b/code/modules/mob/living/simple_animal/hostile/nanotrasen.dm @@ -20,7 +20,7 @@ melee_damage_upper = 15 attacktext = "punches" attack_sound = 'sound/weapons/punch1.ogg' - a_intent = "harm" + a_intent = INTENT_HARM loot = list(/obj/effect/mob_spawn/human/corpse/nanotrasensoldier) atmos_requirements = list("min_oxy" = 5, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 1, "min_co2" = 0, "max_co2" = 5, "min_n2" = 0, "max_n2" = 0) unsuitable_atmos_damage = 15 diff --git a/code/modules/mob/living/simple_animal/hostile/retaliate/clown.dm b/code/modules/mob/living/simple_animal/hostile/retaliate/clown.dm index ee7af62269b..46b72b5db85 100644 --- a/code/modules/mob/living/simple_animal/hostile/retaliate/clown.dm +++ b/code/modules/mob/living/simple_animal/hostile/retaliate/clown.dm @@ -12,7 +12,7 @@ speak = list("HONK", "Honk!", "Welcome to clown planet!") emote_see = list("honks", "squeaks") speak_chance = 1 - a_intent = "harm" + a_intent = INTENT_HARM maxHealth = 75 health = 75 speed = 0 diff --git a/code/modules/mob/living/simple_animal/hostile/retaliate/ghost.dm b/code/modules/mob/living/simple_animal/hostile/retaliate/ghost.dm index 3c74f7b3447..3880b6a1fee 100644 --- a/code/modules/mob/living/simple_animal/hostile/retaliate/ghost.dm +++ b/code/modules/mob/living/simple_animal/hostile/retaliate/ghost.dm @@ -9,7 +9,7 @@ response_help = "passes through" response_disarm = "shoves" response_harm = "hits" - a_intent = "harm" + a_intent = INTENT_HARM healable = 0 speed = 0 maxHealth = 40 diff --git a/code/modules/mob/living/simple_animal/hostile/retaliate/spaceman.dm b/code/modules/mob/living/simple_animal/hostile/retaliate/spaceman.dm index a1257d71e34..4a8c99a111e 100644 --- a/code/modules/mob/living/simple_animal/hostile/retaliate/spaceman.dm +++ b/code/modules/mob/living/simple_animal/hostile/retaliate/spaceman.dm @@ -10,7 +10,7 @@ response_help = "pokes" response_disarm = "gently pushes aside" response_harm = "punches" - a_intent = "harm" + a_intent = INTENT_HARM maxHealth = 100 health = 100 speed = 0 diff --git a/code/modules/mob/living/simple_animal/hostile/russian.dm b/code/modules/mob/living/simple_animal/hostile/russian.dm index 524c7317e95..b47d8216799 100644 --- a/code/modules/mob/living/simple_animal/hostile/russian.dm +++ b/code/modules/mob/living/simple_animal/hostile/russian.dm @@ -18,7 +18,7 @@ melee_damage_upper = 15 attacktext = "punches" attack_sound = 'sound/weapons/punch1.ogg' - a_intent = "harm" + a_intent = INTENT_HARM loot = list(/obj/effect/mob_spawn/human/corpse/russian, /obj/item/weapon/kitchen/knife) atmos_requirements = list("min_oxy" = 5, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 1, "min_co2" = 0, "max_co2" = 5, "min_n2" = 0, "max_n2" = 0) diff --git a/code/modules/mob/living/simple_animal/hostile/skeleton.dm b/code/modules/mob/living/simple_animal/hostile/skeleton.dm index f318f7ae15c..833e70dac0b 100644 --- a/code/modules/mob/living/simple_animal/hostile/skeleton.dm +++ b/code/modules/mob/living/simple_animal/hostile/skeleton.dm @@ -8,7 +8,7 @@ turns_per_move = 5 speak_emote = list("rattles") emote_see = list("rattles") - a_intent = "harm" + a_intent = INTENT_HARM maxHealth = 40 health = 40 speed = 1 diff --git a/code/modules/mob/living/simple_animal/hostile/statue.dm b/code/modules/mob/living/simple_animal/hostile/statue.dm index 30dbb43e153..0385cc8a7c2 100644 --- a/code/modules/mob/living/simple_animal/hostile/statue.dm +++ b/code/modules/mob/living/simple_animal/hostile/statue.dm @@ -8,7 +8,7 @@ icon_living = "human_male" icon_dead = "human_male" gender = NEUTER - a_intent = "harm" + a_intent = INTENT_HARM response_help = "touches" response_disarm = "pushes" diff --git a/code/modules/mob/living/simple_animal/hostile/stickman.dm b/code/modules/mob/living/simple_animal/hostile/stickman.dm index 5d56f16a336..3fcdc3e37a7 100644 --- a/code/modules/mob/living/simple_animal/hostile/stickman.dm +++ b/code/modules/mob/living/simple_animal/hostile/stickman.dm @@ -23,7 +23,7 @@ melee_damage_upper = 10 attacktext = "punches" attack_sound = 'sound/weapons/punch1.ogg' - a_intent = "harm" + a_intent = INTENT_HARM atmos_requirements = list("min_oxy" = 5, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 1, "min_co2" = 0, "max_co2" = 5, "min_n2" = 0, "max_n2" = 0) unsuitable_atmos_damage = 15 faction = list("hostile","stickman") diff --git a/code/modules/mob/living/simple_animal/hostile/syndicate.dm b/code/modules/mob/living/simple_animal/hostile/syndicate.dm index e6168088f9f..3da996b475b 100644 --- a/code/modules/mob/living/simple_animal/hostile/syndicate.dm +++ b/code/modules/mob/living/simple_animal/hostile/syndicate.dm @@ -31,7 +31,7 @@ melee_damage_upper = 10 attacktext = "punches" attack_sound = 'sound/weapons/punch1.ogg' - a_intent = "harm" + a_intent = INTENT_HARM loot = list(/obj/effect/mob_spawn/human/corpse/syndicatesoldier) atmos_requirements = list("min_oxy" = 5, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 1, "min_co2" = 0, "max_co2" = 5, "min_n2" = 0, "max_n2" = 0) unsuitable_atmos_damage = 15 diff --git a/code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm b/code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm index 6bc9aa07972..ddea7d64f98 100644 --- a/code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm +++ b/code/modules/mob/living/simple_animal/hostile/venus_human_trap.dm @@ -58,7 +58,7 @@ obj_damage = 60 melee_damage_lower = 25 melee_damage_upper = 25 - 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 = 0 diff --git a/code/modules/mob/living/simple_animal/hostile/wizard.dm b/code/modules/mob/living/simple_animal/hostile/wizard.dm index bf5c614d637..ca9bb1130ee 100644 --- a/code/modules/mob/living/simple_animal/hostile/wizard.dm +++ b/code/modules/mob/living/simple_animal/hostile/wizard.dm @@ -17,7 +17,7 @@ melee_damage_upper = 5 attacktext = "punches" attack_sound = 'sound/weapons/punch1.ogg' - a_intent = "harm" + a_intent = INTENT_HARM atmos_requirements = list("min_oxy" = 5, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 1, "min_co2" = 0, "max_co2" = 5, "min_n2" = 0, "max_n2" = 0) unsuitable_atmos_damage = 15 faction = list("wizard") diff --git a/code/modules/mob/living/simple_animal/parrot.dm b/code/modules/mob/living/simple_animal/parrot.dm index 170aa24452b..1abad69751f 100644 --- a/code/modules/mob/living/simple_animal/parrot.dm +++ b/code/modules/mob/living/simple_animal/parrot.dm @@ -53,7 +53,7 @@ response_disarm = "gently moves aside" response_harm = "swats" stop_automated_movement = 1 - a_intent = "harm" //parrots now start "aggressive" since only player parrots will nuzzle. + a_intent = INTENT_HARM //parrots now start "aggressive" since only player parrots will nuzzle. attacktext = "chomps" friendly = "grooms" mob_size = MOB_SIZE_SMALL @@ -280,7 +280,7 @@ ..() if(client) return - if(!stat && M.a_intent == "harm") + if(!stat && M.a_intent == INTENT_HARM) icon_state = "parrot_fly" //It is going to be flying regardless of whether it flees or attacks @@ -295,7 +295,7 @@ else parrot_state |= PARROT_FLEE //Otherwise, fly like a bat out of hell! drop_held_item(0) - if(!stat && M.a_intent == "help") + if(!stat && M.a_intent == INTENT_HELP) handle_automated_speech(1) //assured speak/emote return @@ -561,7 +561,7 @@ var/mob/living/L = parrot_interest if(melee_damage_upper == 0) melee_damage_upper = parrot_damage_upper - a_intent = "harm" + a_intent = INTENT_HARM //If the mob is close enough to interact with if(Adjacent(parrot_interest)) @@ -856,10 +856,10 @@ if(melee_damage_upper) melee_damage_upper = 0 - a_intent = "help" + a_intent = INTENT_HELP else melee_damage_upper = parrot_damage_upper - a_intent = "harm" + a_intent = INTENT_HARM src << "You will now [a_intent] others..." return diff --git a/code/modules/mob/living/simple_animal/slime/powers.dm b/code/modules/mob/living/simple_animal/slime/powers.dm index 1c723809aa0..89fa968e241 100644 --- a/code/modules/mob/living/simple_animal/slime/powers.dm +++ b/code/modules/mob/living/simple_animal/slime/powers.dm @@ -169,7 +169,7 @@ feedback_add_details("slime_babies_born","slimebirth_[replacetext(M.colour," ","_")]") var/mob/living/simple_animal/slime/new_slime = pick(babies) - new_slime.a_intent = "harm" + new_slime.a_intent = INTENT_HARM new_slime.languages_spoken = languages_spoken new_slime.languages_understood = languages_understood if(src.mind) diff --git a/code/modules/mob/living/simple_animal/slime/slime.dm b/code/modules/mob/living/simple_animal/slime/slime.dm index dcf9a98f51c..62d0aa3b41a 100644 --- a/code/modules/mob/living/simple_animal/slime/slime.dm +++ b/code/modules/mob/living/simple_animal/slime/slime.dm @@ -260,7 +260,7 @@ var/list/slime_colours = list("rainbow", "grey", "purple", "metal", "orange", attacked += 10 /mob/living/simple_animal/slime/attack_hulk(mob/living/carbon/human/user, does_attack_animation = 0) - if(user.a_intent == "harm") + if(user.a_intent == INTENT_HARM) discipline_slime(user) return ..() @@ -292,7 +292,7 @@ var/list/slime_colours = list("rainbow", "grey", "purple", "metal", "orange", discipline_slime(M) else if(stat == DEAD && surgeries.len) - if(M.a_intent == "help") + if(M.a_intent == INTENT_HELP) for(var/datum/surgery/S in surgeries) if(S.next_step(M)) return 1 @@ -307,7 +307,7 @@ var/list/slime_colours = list("rainbow", "grey", "purple", "metal", "orange", /mob/living/simple_animal/slime/attackby(obj/item/W, mob/living/user, params) if(stat == DEAD && 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 diff --git a/code/modules/mob/living/simple_animal/spawner.dm b/code/modules/mob/living/simple_animal/spawner.dm index 5811a1ef766..def9423807f 100644 --- a/code/modules/mob/living/simple_animal/spawner.dm +++ b/code/modules/mob/living/simple_animal/spawner.dm @@ -13,7 +13,7 @@ status_flags = 0 anchored = 1 AIStatus = AI_OFF - a_intent = "harm" + a_intent = INTENT_HARM stop_automated_movement = 1 wander = 0 atmos_requirements = list("min_oxy" = 0, "max_oxy" = 0, "min_tox" = 0, "max_tox" = 0, "min_co2" = 0, "max_co2" = 5, "min_n2" = 0, "max_n2" = 0) diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index a28820fe7e1..28fe9de5e47 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -72,7 +72,7 @@ var/stunned = 0 var/weakened = 0 var/losebreath = 0//Carbon - var/a_intent = "help"//Living + var/a_intent = INTENT_HELP//Living var/m_intent = MOVE_INTENT_RUN//Living var/lastKnownIP = null var/atom/movable/buckled = null//Living diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index 425530f6274..1bb16d72502 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -280,29 +280,6 @@ It's fairly easy to fix if dealing with single letters but not so much with comp return 1 return 0 -//converts intent-strings into numbers and back -/proc/intent_numeric(argument) - if(istext(argument)) - switch(argument) - if("help") - return 0 - if("disarm") - return 1 - if("grab") - return 2 - else - return 3 - else - switch(argument) - if(0) - return "help" - if(1) - return "disarm" - if(2) - return "grab" - else - return "harm" - //change a mob's act-intent. Input the intent as a string such as "help" or use "right"/"left /mob/verb/a_intent_change(input as text) set name = "a-intent" @@ -310,24 +287,38 @@ It's fairly easy to fix if dealing with single letters but not so much with comp if(ishuman(src) || isalienadult(src) || isbrain(src)) switch(input) - if("help", "disarm", "grab", "harm") + if(INTENT_HELP, INTENT_DISARM, INTENT_GRAB, INTENT_HARM) a_intent = input - if("right") - a_intent = intent_numeric((intent_numeric(a_intent) + 1) % 4) - if("left") - a_intent = intent_numeric((intent_numeric(a_intent) + 3) % 4) + if(INTENT_NEXT) + switch (a_intent) + if(INTENT_HELP) + a_intent = INTENT_DISARM + if(INTENT_DISARM) + a_intent = INTENT_GRAB + if(INTENT_GRAB) + a_intent = INTENT_HARM + if(INTENT_HARM) + a_intent = INTENT_HELP if(hud_used && hud_used.action_intent) hud_used.action_intent.icon_state = "[a_intent]" else if(iscyborg(src) || ismonkey(src) || islarva(src)) switch(input) - if("help") - a_intent = "help" - if("harm") - a_intent = "harm" - if("right","left") - a_intent = intent_numeric(intent_numeric(a_intent) - 3) + if(INTENT_HELP) + a_intent = INTENT_HELP + if(INTENT_HARM) + a_intent = INTENT_HARM + if(INTENT_NEXT) + switch (a_intent) + if(INTENT_HELP) + a_intent = INTENT_DISARM + if(INTENT_DISARM) + a_intent = INTENT_GRAB + if(INTENT_GRAB) + a_intent = INTENT_HARM + if(INTENT_HARM) + a_intent = INTENT_HELP if(hud_used && hud_used.action_intent) hud_used.action_intent.icon_state = "[a_intent]" diff --git a/code/modules/mob/transform_procs.dm b/code/modules/mob/transform_procs.dm index 14c7d9c4294..1ce5ff82485 100644 --- a/code/modules/mob/transform_procs.dm +++ b/code/modules/mob/transform_procs.dm @@ -65,7 +65,7 @@ if(hellbound) O.hellbound = hellbound O.loc = loc - O.a_intent = "harm" + O.a_intent = INTENT_HARM //keep viruses? if (tr_flags & TR_KEEPVIRUS) @@ -277,7 +277,7 @@ for(var/obj/effect/proc_holder/changeling/humanform/HF in O.mind.changeling.purchasedpowers) mind.changeling.purchasedpowers -= HF - O.a_intent = "help" + O.a_intent = INTENT_HELP if (tr_flags & TR_DEFAULTMSG) O << "You are now a human." @@ -446,7 +446,7 @@ if("Drone") new_xeno = new /mob/living/carbon/alien/humanoid/drone(loc) - new_xeno.a_intent = "harm" + new_xeno.a_intent = INTENT_HARM new_xeno.key = key new_xeno << "You are now an alien." @@ -478,7 +478,7 @@ new_slime = pick(babies) else new_slime = new /mob/living/simple_animal/slime(loc) - new_slime.a_intent = "harm" + new_slime.a_intent = INTENT_HARM new_slime.key = key new_slime << "You are now a slime. Skreee!" @@ -509,7 +509,7 @@ qdel(t) var/mob/living/simple_animal/pet/dog/corgi/new_corgi = new /mob/living/simple_animal/pet/dog/corgi (loc) - new_corgi.a_intent = "harm" + new_corgi.a_intent = INTENT_HARM new_corgi.key = key new_corgi << "You are now a Corgi. Yap Yap!" @@ -542,7 +542,7 @@ var/mob/new_mob = new mobpath(src.loc) new_mob.key = key - new_mob.a_intent = "harm" + new_mob.a_intent = INTENT_HARM new_mob << "You suddenly feel more... animalistic." @@ -561,7 +561,7 @@ var/mob/new_mob = new mobpath(src.loc) new_mob.key = key - new_mob.a_intent = "harm" + new_mob.a_intent = INTENT_HARM new_mob << "You feel more... animalistic" . = new_mob diff --git a/code/modules/paperwork/filingcabinet.dm b/code/modules/paperwork/filingcabinet.dm index 6d5a27fe467..8cf41f3a6bd 100644 --- a/code/modules/paperwork/filingcabinet.dm +++ b/code/modules/paperwork/filingcabinet.dm @@ -59,7 +59,7 @@ if(do_after(user, 20, target = src)) user << "You successfully [anchored ? "wrench" : "unwrench"] [src]." anchored = !anchored - else if(user.a_intent != "harm") + else if(user.a_intent != INTENT_HARM) user << "You can't put [P] in [src]!" else return ..() diff --git a/code/modules/power/rtg.dm b/code/modules/power/rtg.dm index e88891254bd..5d920097be0 100644 --- a/code/modules/power/rtg.dm +++ b/code/modules/power/rtg.dm @@ -61,7 +61,7 @@ return ..() /obj/machinery/power/rtg/attack_hand(mob/user) - if(can_buckle && isliving(user.pulling) && user.a_intent == "grab" && !has_buckled_mobs()) + if(can_buckle && isliving(user.pulling) && user.a_intent == INTENT_GRAB && !has_buckled_mobs()) var/mob/living/L = user.pulling if(L.buckled) return diff --git a/code/modules/power/solar.dm b/code/modules/power/solar.dm index a2d6a5b1c7a..ba78aef45a0 100644 --- a/code/modules/power/solar.dm +++ b/code/modules/power/solar.dm @@ -441,7 +441,7 @@ A.icon_state = "4" A.anchored = 1 qdel(src) - else if(user.a_intent != "harm" && !(I.flags & NOBLUDGEON)) + else if(user.a_intent != INTENT_HARM && !(I.flags & NOBLUDGEON)) src.attack_hand(user) else return ..() diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index 1afcd8e5db0..63ef4d91839 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -130,7 +130,7 @@ if(flag) //It's adjacent, is the user, or is on the user's person if(target in user.contents) //can't shoot stuff inside us. return - if(!ismob(target) || user.a_intent == "harm") //melee attack + if(!ismob(target) || user.a_intent == INTENT_HARM) //melee attack return if(target == user && user.zone_selected != "mouth") //so we can't shoot ourselves (unless mouth selected) return @@ -167,7 +167,7 @@ //DUAL (or more!) WIELDING var/bonus_spread = 0 var/loop_counter = 0 - if(ishuman(user) && user.a_intent == "harm") + if(ishuman(user) && user.a_intent == INTENT_HARM) var/mob/living/carbon/human/H = user for(var/obj/item/weapon/gun/G in H.held_items) if(G == src || G.weapon_weight >= WEAPON_MEDIUM) @@ -269,7 +269,7 @@ feedback_add_details("gun_fired","[src.type]") /obj/item/weapon/gun/attack(mob/M as mob, mob/user) - if(user.a_intent == "harm") //Flogging + if(user.a_intent == INTENT_HARM) //Flogging ..() else return diff --git a/code/modules/projectiles/guns/ballistic/revolver.dm b/code/modules/projectiles/guns/ballistic/revolver.dm index 193a3fae8fd..5c3c4515014 100644 --- a/code/modules/projectiles/guns/ballistic/revolver.dm +++ b/code/modules/projectiles/guns/ballistic/revolver.dm @@ -217,7 +217,7 @@ /obj/item/weapon/gun/ballistic/revolver/russian/afterattack(atom/target, mob/living/user, flag, params) if(flag) if(!(target in user.contents) && ismob(target)) - if(user.a_intent == "harm") // Flogging action + if(user.a_intent == INTENT_HARM) // Flogging action return if(isliving(user)) diff --git a/code/modules/projectiles/projectile/magic.dm b/code/modules/projectiles/projectile/magic.dm index 56b8aeadbc6..787aaffa5b6 100644 --- a/code/modules/projectiles/projectile/magic.dm +++ b/code/modules/projectiles/projectile/magic.dm @@ -316,7 +316,7 @@ M.attack_log += text("\[[time_stamp()]\] [M.real_name] ([M.ckey]) became [new_mob.real_name].") - new_mob.a_intent = "harm" + new_mob.a_intent = INTENT_HARM M.wabbajack_act(new_mob) diff --git a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm index f941ab453bb..dbfb62af751 100644 --- a/code/modules/reagents/chemistry/machinery/chem_dispenser.dm +++ b/code/modules/reagents/chemistry/machinery/chem_dispenser.dm @@ -188,7 +188,7 @@ icon_beaker = image('icons/obj/chemical.dmi', src, "disp_beaker") //randomize beaker overlay position. icon_beaker.pixel_x = rand(-10,5) add_overlay(icon_beaker) - else if(user.a_intent != "harm" && !istype(I, /obj/item/weapon/card/emag)) + else if(user.a_intent != INTENT_HARM && !istype(I, /obj/item/weapon/card/emag)) user << "You can't load \the [I] into the machine!" else return ..() diff --git a/code/modules/reagents/chemistry/machinery/reagentgrinder.dm b/code/modules/reagents/chemistry/machinery/reagentgrinder.dm index d51accd6325..76c9c72c72e 100644 --- a/code/modules/reagents/chemistry/machinery/reagentgrinder.dm +++ b/code/modules/reagents/chemistry/machinery/reagentgrinder.dm @@ -161,7 +161,7 @@ return 1 if (!is_type_in_list(I, blend_items) && !is_type_in_list(I, juice_items)) - if(user.a_intent == "harm") + if(user.a_intent == INTENT_HARM) return ..() else user << "Cannot refine into a reagent!" diff --git a/code/modules/reagents/reagent_containers.dm b/code/modules/reagents/reagent_containers.dm index d9bd3c33b3a..843856acc54 100644 --- a/code/modules/reagents/reagent_containers.dm +++ b/code/modules/reagents/reagent_containers.dm @@ -38,7 +38,7 @@ return /obj/item/weapon/reagent_containers/attack(mob/M, mob/user, def_zone) - if(user.a_intent == "harm") + if(user.a_intent == INTENT_HARM) return ..() /obj/item/weapon/reagent_containers/afterattack(obj/target, mob/user , flag) diff --git a/code/modules/reagents/reagent_containers/glass.dm b/code/modules/reagents/reagent_containers/glass.dm index 225c7185638..b66393a09d2 100644 --- a/code/modules/reagents/reagent_containers/glass.dm +++ b/code/modules/reagents/reagent_containers/glass.dm @@ -20,7 +20,7 @@ return if(istype(M)) - if(user.a_intent == "harm") + if(user.a_intent == INTENT_HARM) var/R M.visible_message("[user] splashes the contents of [src] onto [M]!", \ "[user] splashes the contents of [src] onto [M]!") @@ -79,7 +79,7 @@ user << "You transfer [trans] unit\s of the solution to [target]." else if(reagents.total_volume) - if(user.a_intent == "harm") + if(user.a_intent == INTENT_HARM) user.visible_message("[user] splashes the contents of [src] onto [target]!", \ "You splash the contents of [src] onto [target].") reagents.reaction(target, TOUCH) diff --git a/code/modules/recycling/conveyor2.dm b/code/modules/recycling/conveyor2.dm index 1fa3fcdaea2..40a4bcc6340 100644 --- a/code/modules/recycling/conveyor2.dm +++ b/code/modules/recycling/conveyor2.dm @@ -136,7 +136,7 @@ update_move_direction() user << "You reverse [src]'s direction." - else if(user.a_intent != "harm") + else if(user.a_intent != INTENT_HARM) if(user.drop_item()) I.loc = src.loc else diff --git a/code/modules/recycling/disposal-unit.dm b/code/modules/recycling/disposal-unit.dm index 3b7922de278..2523ddea82b 100644 --- a/code/modules/recycling/disposal-unit.dm +++ b/code/modules/recycling/disposal-unit.dm @@ -98,7 +98,7 @@ deconstruct() return - if(user.a_intent != "harm") + if(user.a_intent != INTENT_HARM) if(!user.drop_item() || (I.flags & ABSTRACT)) return place_item_in_disposal(I, user) diff --git a/code/modules/research/circuitprinter.dm b/code/modules/research/circuitprinter.dm index a235391790b..746ccd45a6c 100644 --- a/code/modules/research/circuitprinter.dm +++ b/code/modules/research/circuitprinter.dm @@ -113,7 +113,7 @@ using metal and glass, it uses glass and reagents (usually sulfuric acis). user << "You add [amount_inserted] sheets to the [src.name]." updateUsrDialog() - else if(user.a_intent != "harm") + else if(user.a_intent != INTENT_HARM) user << "You cannot insert this item into the [name]!" return 1 else diff --git a/code/modules/research/destructive_analyzer.dm b/code/modules/research/destructive_analyzer.dm index a32e0daaf9b..26766f8957b 100644 --- a/code/modules/research/destructive_analyzer.dm +++ b/code/modules/research/destructive_analyzer.dm @@ -45,7 +45,7 @@ Note: Must be placed within 3 tiles of the R&D Console ..() /obj/machinery/r_n_d/destructive_analyzer/Insert_Item(obj/item/O, mob/user) - if(user.a_intent != "harm") + if(user.a_intent != INTENT_HARM) . = 1 if(!is_insertion_ready(user)) return diff --git a/code/modules/research/experimentor.dm b/code/modules/research/experimentor.dm index 99feab94858..c7ee3e805e7 100644 --- a/code/modules/research/experimentor.dm +++ b/code/modules/research/experimentor.dm @@ -115,7 +115,7 @@ return TRUE /obj/machinery/r_n_d/experimentor/Insert_Item(obj/item/O, mob/user) - if(user.a_intent != "harm") + if(user.a_intent != INTENT_HARM) . = 1 if(!is_insertion_ready(user)) return diff --git a/code/modules/research/protolathe.dm b/code/modules/research/protolathe.dm index 7f7c58186cf..9c5c9148b70 100644 --- a/code/modules/research/protolathe.dm +++ b/code/modules/research/protolathe.dm @@ -119,7 +119,7 @@ Note: Must be placed west/left of and R&D console to function. busy = 0 updateUsrDialog() - else if(user.a_intent != "harm") + else if(user.a_intent != INTENT_HARM) user << "You cannot insert this item into the [name]!" return 1 else diff --git a/code/modules/surgery/surgery_step.dm b/code/modules/surgery/surgery_step.dm index 62067171862..6017784f611 100644 --- a/code/modules/surgery/surgery_step.dm +++ b/code/modules/surgery/surgery_step.dm @@ -30,7 +30,7 @@ else user << "You need to expose [target]'s [parse_zone(target_zone)] to perform surgery on it!" return 1 //returns 1 so we don't stab the guy in the dick or wherever. - if(iscyborg(user) && user.a_intent != "harm") //to save asimov borgs a LOT of heartache + if(iscyborg(user) && user.a_intent != INTENT_HARM) //to save asimov borgs a LOT of heartache return 1 return 0