From 7e75c6ae537c241ca66db0af88f872037dd4494d Mon Sep 17 00:00:00 2001 From: ComicIronic Date: Mon, 9 Feb 2015 20:25:52 +0000 Subject: [PATCH] Changes intents to defines. --- code/WorkInProgress/Ported/policetape.dm | 4 +-- code/_onclick/click.dm | 2 +- code/_onclick/hud/alien.dm | 2 +- code/_onclick/hud/alien_larva.dm | 2 +- code/_onclick/hud/monkey.dm | 2 +- code/_onclick/hud/robot.dm | 2 +- code/_onclick/hud/screen_objects.dm | 8 ++--- code/_onclick/other_mobs.dm | 4 +-- code/game/dna/genes/goon_powers.dm | 8 ++--- code/game/dna/genes/monkey.dm | 2 +- .../gamemodes/changeling/changeling_powers.dm | 2 +- code/game/gamemodes/cult/cult_structures.dm | 2 +- code/game/mecha/combat/combat.dm | 2 +- code/game/mecha/equipment/tools/tools.dm | 6 ++-- code/game/mecha/mecha.dm | 2 +- code/game/objects/items/weapons/stunbaton.dm | 2 +- .../objects/items/weapons/swords_axes_etc.dm | 4 +-- code/game/objects/items/weapons/tools.dm | 2 +- code/game/objects/structures/displaycase.dm | 4 +-- code/game/objects/structures/tables_racks.dm | 2 +- code/game/objects/structures/window.dm | 2 +- code/modules/clothing/clothing.dm | 2 +- code/modules/clothing/gloves/color.dm | 2 +- code/modules/clothing/under/ties.dm | 2 +- code/modules/hydroponics/vines.dm | 2 +- code/modules/mining/equipment_locker.dm | 4 +-- .../living/carbon/alien/humanoid/humanoid.dm | 14 ++++---- .../mob/living/carbon/alien/larva/larva.dm | 10 +++--- .../living/carbon/human/human_attackalien.dm | 8 ++--- .../living/carbon/human/human_attackhand.dm | 10 +++--- .../living/carbon/human/human_attackpaw.dm | 2 +- .../mob/living/carbon/human/human_defense.dm | 2 +- .../mob/living/carbon/metroid/metroid.dm | 16 +++++----- .../mob/living/carbon/metroid/powers.dm | 4 +-- .../modules/mob/living/carbon/monkey/diona.dm | 2 +- .../mob/living/carbon/monkey/monkey.dm | 20 ++++++------ code/modules/mob/living/living.dm | 2 +- code/modules/mob/living/silicon/ai/ai.dm | 2 +- code/modules/mob/living/silicon/mommi/hud.dm | 2 +- .../modules/mob/living/silicon/mommi/mommi.dm | 2 +- code/modules/mob/living/silicon/pai/pai.dm | 2 +- .../modules/mob/living/silicon/robot/robot.dm | 10 +++--- .../modules/mob/living/simple_animal/borer.dm | 2 +- .../mob/living/simple_animal/constructs.dm | 2 +- .../living/simple_animal/friendly/corgi.dm | 4 +-- .../simple_animal/friendly/farm_animals.dm | 2 +- .../mob/living/simple_animal/hostile/alien.dm | 2 +- .../hostile/giant_spider/spiderling.dm | 2 +- .../simple_animal/hostile/mining_mobs.dm | 6 ++-- .../living/simple_animal/hostile/mushroom.dm | 2 +- .../simple_animal/hostile/retaliate/clown.dm | 2 +- .../simple_animal/hostile/retaliate/cluwne.dm | 2 +- .../simple_animal/hostile/retaliate/drone.dm | 2 +- .../living/simple_animal/hostile/russian.dm | 2 +- .../living/simple_animal/hostile/syndicate.dm | 2 +- .../mob/living/simple_animal/parrot.dm | 10 +++--- .../mob/living/simple_animal/simple_animal.dm | 14 ++++---- code/modules/mob/living/simple_animal/worm.dm | 2 +- code/modules/mob/mob_defines.dm | 2 +- code/modules/mob/mob_helpers.dm | 32 +++++++++---------- code/modules/mob/transform_procs.dm | 12 +++---- code/modules/organs/organ_objects.dm | 2 +- code/modules/power/cable.dm | 2 +- code/modules/power/lighting.dm | 2 +- code/modules/projectiles/gun.dm | 2 +- .../projectiles/guns/projectile/pneumatic.dm | 2 +- code/modules/projectiles/projectile/change.dm | 2 +- code/modules/reagents/Chemistry-Reagents.dm | 2 +- .../reagent_containers/food/drinks.dm | 2 +- .../reagents/reagent_containers/syringes.dm | 2 +- .../artifact/effects/unknown_effect_hurt.dm | 2 +- code/modules/surgery/surgery.dm | 4 +-- code/setup.dm | 7 ++++ 73 files changed, 164 insertions(+), 157 deletions(-) diff --git a/code/WorkInProgress/Ported/policetape.dm b/code/WorkInProgress/Ported/policetape.dm index 5894c8b9d88..960e140078f 100644 --- a/code/WorkInProgress/Ported/policetape.dm +++ b/code/WorkInProgress/Ported/policetape.dm @@ -157,7 +157,7 @@ breaktape(W, user) /obj/item/tape/attack_hand(mob/user as mob) - if (user.a_intent == "help" && src.allowed(user)) + if (user.a_intent == I_HELP && src.allowed(user)) if(density == 0) user.visible_message("[user] pulls [src] back down.") src.density = 1 @@ -173,7 +173,7 @@ breaktape(/obj/item/weapon/wirecutters,user) /obj/item/tape/proc/breaktape(obj/item/weapon/W as obj, mob/user as mob) - if(user.a_intent == "help" && ((!is_sharp(W) && src.allowed(user)))) + if(user.a_intent == I_HELP && ((!is_sharp(W) && src.allowed(user)))) user << "You can't break [src] with that!" return user.visible_message("[user] breaks [src]!") diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm index 97885b5e25b..3da04a66673 100644 --- a/code/_onclick/click.dm +++ b/code/_onclick/click.dm @@ -185,7 +185,7 @@ */ /mob/proc/RangedAttack(var/atom/A, var/params) if(!mutations || !mutations.len) return - if((M_LASER in mutations) && a_intent == "hurt") + if((M_LASER in mutations) && a_intent == I_HURT) LaserEyes(A) // moved into a proc below else if(M_TK in mutations) /*switch(get_dist(src,A)) diff --git a/code/_onclick/hud/alien.dm b/code/_onclick/hud/alien.dm index ef8be54d288..783cb692bc8 100644 --- a/code/_onclick/hud/alien.dm +++ b/code/_onclick/hud/alien.dm @@ -10,7 +10,7 @@ using.name = "act_intent" using.dir = SOUTHWEST using.icon = 'icons/mob/screen1_alien.dmi' - using.icon_state = (mymob.a_intent == "hurt" ? "harm" : mymob.a_intent) + using.icon_state = (mymob.a_intent == I_HURT ? "harm" : mymob.a_intent) using.screen_loc = ui_acti using.layer = 20 src.adding += using diff --git a/code/_onclick/hud/alien_larva.dm b/code/_onclick/hud/alien_larva.dm index d8182db12da..1335cefc60e 100644 --- a/code/_onclick/hud/alien_larva.dm +++ b/code/_onclick/hud/alien_larva.dm @@ -9,7 +9,7 @@ using.name = "act_intent" using.dir = SOUTHWEST using.icon = 'icons/mob/screen1_alien.dmi' - using.icon_state = (mymob.a_intent == "hurt" ? "harm" : mymob.a_intent) + using.icon_state = (mymob.a_intent == I_HURT ? "harm" : mymob.a_intent) using.screen_loc = ui_acti using.layer = 20 src.adding += using diff --git a/code/_onclick/hud/monkey.dm b/code/_onclick/hud/monkey.dm index 6880ac2eddd..667b99eac68 100644 --- a/code/_onclick/hud/monkey.dm +++ b/code/_onclick/hud/monkey.dm @@ -10,7 +10,7 @@ using.name = "act_intent" using.dir = SOUTHWEST using.icon = ui_style - using.icon_state = (mymob.a_intent == "hurt" ? "harm" : mymob.a_intent) + using.icon_state = (mymob.a_intent == I_HURT ? "harm" : mymob.a_intent) using.screen_loc = ui_acti using.layer = 20 src.adding += using diff --git a/code/_onclick/hud/robot.dm b/code/_onclick/hud/robot.dm index 872411f93e4..fc0b6928cb9 100644 --- a/code/_onclick/hud/robot.dm +++ b/code/_onclick/hud/robot.dm @@ -55,7 +55,7 @@ using.name = "act_intent" using.dir = SOUTHWEST using.icon = 'icons/mob/screen1_robot.dmi' - using.icon_state = (mymob.a_intent == "hurt" ? "harm" : mymob.a_intent) + using.icon_state = (mymob.a_intent == I_HURT ? "harm" : mymob.a_intent) using.screen_loc = ui_acti using.layer = 20 src.adding += using diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm index ac31161c28c..3e7800983b9 100644 --- a/code/_onclick/hud/screen_objects.dm +++ b/code/_onclick/hud/screen_objects.dm @@ -366,16 +366,16 @@ if("act_intent") usr.a_intent_change("right") if("help") - usr.a_intent = "help" + usr.a_intent = I_HELP usr.hud_used.action_intent.icon_state = "intent_help" if("harm") - usr.a_intent = "hurt" + usr.a_intent = I_HURT usr.hud_used.action_intent.icon_state = "intent_hurt" if("grab") - usr.a_intent = "grab" + usr.a_intent = I_GRAB usr.hud_used.action_intent.icon_state = "intent_grab" if("disarm") - usr.a_intent = "disarm" + usr.a_intent = I_DISARM usr.hud_used.action_intent.icon_state = "intent_disarm" if("pull") diff --git a/code/_onclick/other_mobs.dm b/code/_onclick/other_mobs.dm index a4b43ec2a61..b7838622cf9 100644 --- a/code/_onclick/other_mobs.dm +++ b/code/_onclick/other_mobs.dm @@ -45,7 +45,7 @@ if(istype(G) && G.Touch(A, src, 0)) // for magic gloves return if(mutations.len) - if((M_LASER in mutations) && a_intent == "hurt") + if((M_LASER in mutations) && a_intent == I_HURT) LaserEyes(A) // moved into a proc below else if(M_TK in mutations) @@ -95,7 +95,7 @@ things considerably */ /mob/living/carbon/monkey/RestrainedClickOn(var/atom/A) - if(a_intent != "hurt" || !ismob(A)) return + if(a_intent != I_HURT || !ismob(A)) return if(istype(wear_mask, /obj/item/clothing/mask/muzzle)) return var/mob/living/carbon/ML = A diff --git a/code/game/dna/genes/goon_powers.dm b/code/game/dna/genes/goon_powers.dm index eb956c72ed2..a9b28521b98 100644 --- a/code/game/dna/genes/goon_powers.dm +++ b/code/game/dna/genes/goon_powers.dm @@ -532,13 +532,13 @@ thoughts = "haunted by their own mortality" switch(M.a_intent) - if ("help") + if (I_HELP) usr << " Mood: You sense benevolent thoughts from [M.name]." - if ("disarm") + if (I_DISARM) usr << " Mood: You sense cautious thoughts from [M.name]." - if ("grab") + if (I_GRAB) usr << " Mood: You sense hostile thoughts from [M.name]." - if ("hurt") + if (I_HURT) usr << " Mood: You sense cruel thoughts from [M.name]." for(var/mob/living/L in view(7,M)) if (L == M) diff --git a/code/game/dna/genes/monkey.dm b/code/game/dna/genes/monkey.dm index 95e3a0510e9..380b6bafd81 100644 --- a/code/game/dna/genes/monkey.dm +++ b/code/game/dna/genes/monkey.dm @@ -79,7 +79,7 @@ O.adjustToxLoss(M.getToxLoss() + 20) O.adjustOxyLoss(M.getOxyLoss()) O.stat = M.stat - O.a_intent = "hurt" + O.a_intent = I_HURT for (var/obj/item/weapon/implant/I in implants) I.loc = O I.implanted = O diff --git a/code/game/gamemodes/changeling/changeling_powers.dm b/code/game/gamemodes/changeling/changeling_powers.dm index 80ab95e7e98..baf9330ff54 100644 --- a/code/game/gamemodes/changeling/changeling_powers.dm +++ b/code/game/gamemodes/changeling/changeling_powers.dm @@ -301,7 +301,7 @@ O.setOxyLoss(C.getOxyLoss()) O.adjustFireLoss(C.getFireLoss()) O.stat = C.stat - O.a_intent = "hurt" + O.a_intent = I_HURT for(var/obj/item/weapon/implant/I in implants) I.loc = O I.implanted = O diff --git a/code/game/gamemodes/cult/cult_structures.dm b/code/game/gamemodes/cult/cult_structures.dm index 4e2cdf12c82..fc9f22c7c59 100644 --- a/code/game/gamemodes/cult/cult_structures.dm +++ b/code/game/gamemodes/cult/cult_structures.dm @@ -174,7 +174,7 @@ new_mob.setBrainLoss(100) - new_mob.a_intent = "hurt" + new_mob.a_intent = I_HURT if(M.mind) M.mind.transfer_to(new_mob) else diff --git a/code/game/mecha/combat/combat.dm b/code/game/mecha/combat/combat.dm index e03e5ac125f..6e1d3a0ac9b 100644 --- a/code/game/mecha/combat/combat.dm +++ b/code/game/mecha/combat/combat.dm @@ -25,7 +25,7 @@ if(!melee_can_hit || !istype(target, /atom)) return if(istype(target, /mob/living)) var/mob/living/M = target - if(src.occupant.a_intent == "hurt") + if(src.occupant.a_intent == I_HURT) playsound(src, 'sound/mecha/mechsmash.ogg', 50, 1) if(damtype == "brute") step_away(M,src,15) diff --git a/code/game/mecha/equipment/tools/tools.dm b/code/game/mecha/equipment/tools/tools.dm index f835e697165..b61f0ae8fac 100644 --- a/code/game/mecha/equipment/tools/tools.dm +++ b/code/game/mecha/equipment/tools/tools.dm @@ -53,7 +53,7 @@ else if(istype(target,/mob/living)) var/mob/living/M = target if(M.stat>1) return - if(chassis.occupant.a_intent == "hurt") + if(chassis.occupant.a_intent == I_HURT) M.take_overall_damage(dam_force) M.adjustOxyLoss(round(dam_force/2)) M.updatehealth() @@ -1070,10 +1070,10 @@ else if(istype(target,/mob/living)) var/mob/living/M = target if(M.stat>1) return - if(chassis.occupant.a_intent == "hurt") + if(chassis.occupant.a_intent == I_HURT) chassis.occupant_message("\red You obliterate [target] with [src.name], leaving blood and guts everywhere.") chassis.visible_message("\red [chassis] destroys [target] in an unholy fury.") - if(chassis.occupant.a_intent == "disarm") + if(chassis.occupant.a_intent == I_DISARM) chassis.occupant_message("\red You tear [target]'s limbs off with [src.name].") chassis.visible_message("\red [chassis] rips [target]'s arms off.") else diff --git a/code/game/mecha/mecha.dm b/code/game/mecha/mecha.dm index 80847a63968..7050f81093f 100644 --- a/code/game/mecha/mecha.dm +++ b/code/game/mecha/mecha.dm @@ -739,7 +739,7 @@ user << "There's already a powercell installed." return - else if(istype(W, /obj/item/weapon/weldingtool) && user.a_intent != "hurt") + else if(istype(W, /obj/item/weapon/weldingtool) && user.a_intent != I_HURT) var/obj/item/weapon/weldingtool/WT = W if (WT.remove_fuel(0,user)) if (hasInternalDamage(MECHA_INT_TANK_BREACH)) diff --git a/code/game/objects/items/weapons/stunbaton.dm b/code/game/objects/items/weapons/stunbaton.dm index 53f708cb778..20dbc7cfb9c 100644 --- a/code/game/objects/items/weapons/stunbaton.dm +++ b/code/game/objects/items/weapons/stunbaton.dm @@ -116,7 +116,7 @@ var/mob/living/L = M - if(user.a_intent == "hurt") + if(user.a_intent == I_HURT) ..() playsound(loc, "swing_hit", 50, 1, -1) diff --git a/code/game/objects/items/weapons/swords_axes_etc.dm b/code/game/objects/items/weapons/swords_axes_etc.dm index 2e89502ddce..b5938007ca9 100644 --- a/code/game/objects/items/weapons/swords_axes_etc.dm +++ b/code/game/objects/items/weapons/swords_axes_etc.dm @@ -45,7 +45,7 @@ log_attack("[user.name] ([user.ckey]) attacked [M.name] ([M.ckey]) with [src.name] (INTENT: [uppertext(user.a_intent)])") */ - if (user.a_intent == "hurt") + if (user.a_intent == I_HURT) if(!..()) return playsound(get_turf(src), "swing_hit", 50, 1, -1) if (M.stuttering < 8 && (!(M_HULK in M.mutations)) /*&& (!istype(H:wear_suit, /obj/item/clothing/suit/judgerobe))*/) @@ -131,7 +131,7 @@ else user.take_organ_damage(2*force) return - if (user.a_intent == "hurt") + if (user.a_intent == I_HURT) if(!..()) return if(!isrobot(target)) playsound(get_turf(src), "swing_hit", 50, 1, -1) diff --git a/code/game/objects/items/weapons/tools.dm b/code/game/objects/items/weapons/tools.dm index 8108837aecc..d6b247e2ba9 100644 --- a/code/game/objects/items/weapons/tools.dm +++ b/code/game/objects/items/weapons/tools.dm @@ -532,7 +532,7 @@ if(hasorgans(M)) var/datum/organ/external/S = M:organs_by_name[user.zone_sel.selecting] if (!S) return - if(!(S.status & ORGAN_ROBOT) || user.a_intent != "help") + if(!(S.status & ORGAN_ROBOT) || user.a_intent != I_HELP) return ..() if(S.brute_dam) S.heal_damage(15,0,0,1) diff --git a/code/game/objects/structures/displaycase.dm b/code/game/objects/structures/displaycase.dm index 5ae76663225..e36606d0bfa 100644 --- a/code/game/objects/structures/displaycase.dm +++ b/code/game/objects/structures/displaycase.dm @@ -211,7 +211,7 @@ circuit=null new /obj/machinery/constructable_frame/machine_frame(T) del(src) - else if(user.a_intent == "hurt") + else if(user.a_intent == I_HURT) user.delayNextAttack(8) src.health -= W.force src.healthcheck() @@ -240,7 +240,7 @@ src.add_fingerprint(user) update_icon() else - if(user.a_intent == "hurt") + if(user.a_intent == I_HURT) user.delayNextAttack(8) user.visible_message("[user.name] kicks \the [src]!", \ "You kick \the [src]!", \ diff --git a/code/game/objects/structures/tables_racks.dm b/code/game/objects/structures/tables_racks.dm index acf7dba4252..43cfd122216 100644 --- a/code/game/objects/structures/tables_racks.dm +++ b/code/game/objects/structures/tables_racks.dm @@ -331,7 +331,7 @@ if (istype(G.affecting, /mob/living)) var/mob/living/M = G.affecting if (G.state < 2) - if(user.a_intent == "hurt") + if(user.a_intent == I_HURT) if (prob(15)) M.Weaken(5) M.apply_damage(8,def_zone = "head") visible_message("\red [G.assailant] slams [G.affecting]'s face against \the [src]!") diff --git a/code/game/objects/structures/window.dm b/code/game/objects/structures/window.dm index 3b2487072c2..2e406dffefb 100644 --- a/code/game/objects/structures/window.dm +++ b/code/game/objects/structures/window.dm @@ -135,7 +135,7 @@ log_admin("Window destroyed by hulk [user.real_name] ([user.ckey]) with pdiff [pdiff] at [loc]!") user.delayNextAttack(8) destroy() - else if (usr.a_intent == "hurt") + else if (usr.a_intent == I_HURT) user.delayNextAttack(8) // not so polite playsound(get_turf(src), 'sound/effects/glassknock.ogg', 80, 1) usr.visible_message("[usr.name] bangs against the [src.name]!", \ diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index bc345521331..54e99ad0ffc 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -399,7 +399,7 @@ BLIND // can't see anything if(istype(usr.get_active_hand(),/obj) && istype(usr.get_inactive_hand(),/obj)) usr << "You need an empty hand to draw the gun!" else - if(usr.a_intent == "hurt") + if(usr.a_intent == I_HURT) usr.visible_message("\The [usr] draws \the [H.holstered], ready to shoot!", \ "You draw \the [H.holstered], ready to shoot!") else diff --git a/code/modules/clothing/gloves/color.dm b/code/modules/clothing/gloves/color.dm index 798080f45a8..dc34974e82a 100644 --- a/code/modules/clothing/gloves/color.dm +++ b/code/modules/clothing/gloves/color.dm @@ -12,7 +12,7 @@ var/next_shock = 0 /obj/item/clothing/gloves/yellow/power/Touch(var/atom/A, mob/living/user, prox) - if(prox == 0 && user.a_intent == "hurt") + if(prox == 0 && user.a_intent == I_HURT) var/time = 100 var/turf/T = get_turf(user) var/turf/U = get_turf(A) diff --git a/code/modules/clothing/under/ties.dm b/code/modules/clothing/under/ties.dm index 973bb853bdc..da99461db61 100644 --- a/code/modules/clothing/under/ties.dm +++ b/code/modules/clothing/under/ties.dm @@ -33,7 +33,7 @@ /obj/item/clothing/tie/stethoscope/attack(mob/living/carbon/human/M, mob/living/user) if(ishuman(M) && isliving(user)) - if(user.a_intent == "help") + if(user.a_intent == I_HELP) var/body_part = parse_zone(user.zone_sel.selecting) if(body_part) var/their = "their" diff --git a/code/modules/hydroponics/vines.dm b/code/modules/hydroponics/vines.dm index 3892a123f48..79ff6751fe5 100644 --- a/code/modules/hydroponics/vines.dm +++ b/code/modules/hydroponics/vines.dm @@ -67,7 +67,7 @@ /obj/effect/plantsegment/attack_hand(mob/user as mob) - if(user.a_intent == "help" && seed && harvest) + if(user.a_intent == I_HELP && seed && harvest) seed.harvest(user,1) harvest = 0 lastproduce = age diff --git a/code/modules/mining/equipment_locker.dm b/code/modules/mining/equipment_locker.dm index 130638a066a..a7c0151e625 100644 --- a/code/modules/mining/equipment_locker.dm +++ b/code/modules/mining/equipment_locker.dm @@ -534,7 +534,7 @@ status_flags = CANSTUN|CANWEAKEN|CANPUSH mouse_opacity = 1 faction = "neutral" - a_intent = "hurt" + a_intent = I_HURT min_oxy = 0 max_oxy = 0 min_tox = 0 @@ -595,7 +595,7 @@ SetCollectBehavior() /mob/living/simple_animal/hostile/mining_drone/attack_hand(mob/living/carbon/human/M) - if(M.a_intent == "help") + if(M.a_intent == I_HELP) switch(search_objects) if(0) SetCollectBehavior() diff --git a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm index b266119d10a..0f98103e6a6 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm @@ -113,7 +113,7 @@ switch(M.a_intent) - if("help") + if(I_HELP) help_shake_act(M) else if(istype(wear_mask, /obj/item/clothing/mask/muzzle)) @@ -207,7 +207,7 @@ if(M.gloves && istype(M.gloves,/obj/item/clothing/gloves)) var/obj/item/clothing/gloves/G = M.gloves if(G.cell) - if(M.a_intent == "hurt")//Stungloves. Any contact will stun the alien. + if(M.a_intent == I_HURT)//Stungloves. Any contact will stun the alien. if(G.cell.charge >= 2500) G.cell.charge -= 2500 @@ -223,7 +223,7 @@ switch(M.a_intent) - if("help") + if(I_HELP) if(health > 0) help_shake_act(M) else @@ -242,7 +242,7 @@ O.process() return - if("grab") + if(I_GRAB) if(M == src) return var/obj/item/weapon/grab/G = new /obj/item/weapon/grab(M, src) @@ -257,7 +257,7 @@ playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1) visible_message("[M] has grabbed \the [src] passively!") - if("hurt") + if(I_HURT) var/damage = rand(1, 9) if(prob(90)) if(M_HULK in M.mutations) //M_HULK SMASH @@ -278,7 +278,7 @@ playsound(loc, 'sound/weapons/punchmiss.ogg', 25, 1, -1) visible_message("[M] has attempted to punch \the [src] !") - if("disarm") + if(I_DISARM) if(!lying) if(prob(5)) //Very small chance to push an alien down. Weaken(2) @@ -313,7 +313,7 @@ In all, this is a lot like the monkey code. /N switch(M.a_intent) - if("help") + if(I_HELP) sleeping = max(0,sleeping-5) resting = 0 AdjustParalysis(-3) diff --git a/code/modules/mob/living/carbon/alien/larva/larva.dm b/code/modules/mob/living/carbon/alien/larva/larva.dm index 3fc5fca0888..7589af507da 100644 --- a/code/modules/mob/living/carbon/alien/larva/larva.dm +++ b/code/modules/mob/living/carbon/alien/larva/larva.dm @@ -133,7 +133,7 @@ switch(M.a_intent) - if("help") + if(I_HELP) help_shake_act(M) else if(istype(wear_mask, /obj/item/clothing/mask/muzzle)) @@ -185,7 +185,7 @@ if(M.gloves && istype(M.gloves,/obj/item/clothing/gloves)) var/obj/item/clothing/gloves/G = M.gloves if(G.cell) - if(M.a_intent == "hurt")//Stungloves. Any contact will stun the alien. + if(M.a_intent == I_HURT)//Stungloves. Any contact will stun the alien. if(G.cell.charge >= 2500) G.cell.use(2500) @@ -202,7 +202,7 @@ switch(M.a_intent) - if("help") + if(I_HELP) if(health > 0) help_shake_act(M) else @@ -221,7 +221,7 @@ O.process() return - if("grab") + if(I_GRAB) if(M == src) return var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M, src ) @@ -271,7 +271,7 @@ switch(M.a_intent) - if("help") + if(I_HELP) sleeping = max(0,sleeping-5) resting = 0 AdjustParalysis(-3) diff --git a/code/modules/mob/living/carbon/human/human_attackalien.dm b/code/modules/mob/living/carbon/human/human_attackalien.dm index 1d500ad0085..fc901901109 100644 --- a/code/modules/mob/living/carbon/human/human_attackalien.dm +++ b/code/modules/mob/living/carbon/human/human_attackalien.dm @@ -5,9 +5,9 @@ return 0 switch(M.a_intent) - if ("help") + if (I_HELP) visible_message(text("\blue [M] caresses [src] with its scythe like arm.")) - if ("grab") + if (I_GRAB) if(M == src || anchored) return if (w_uniform) @@ -23,7 +23,7 @@ playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, 1, -1) visible_message(text("\red [] has grabbed [] passively!", M, src)) - if("hurt") + if(I_HURT) if (w_uniform) w_uniform.add_fingerprint(M) var/damage = rand(15, 30) @@ -43,7 +43,7 @@ apply_effect(rand(0.5,3), WEAKEN, armor_block) updatehealth() - if("disarm") + if(I_DISARM) if (prob(80)) playsound(loc, 'sound/weapons/pierce.ogg', 25, 1, -1) Weaken(rand(3,4)) diff --git a/code/modules/mob/living/carbon/human/human_attackhand.dm b/code/modules/mob/living/carbon/human/human_attackhand.dm index c529e183d04..be0022e1210 100644 --- a/code/modules/mob/living/carbon/human/human_attackhand.dm +++ b/code/modules/mob/living/carbon/human/human_attackhand.dm @@ -21,7 +21,7 @@ if(M.gloves && istype(M.gloves,/obj/item/clothing/gloves)) var/obj/item/clothing/gloves/G = M.gloves if(G.cell) - if(M.a_intent == "hurt")//Stungloves. Any contact will stun the alien. + if(M.a_intent == I_HURT)//Stungloves. Any contact will stun the alien. if(G.cell.charge >= 2500) G.cell.use(2500) visible_message("\red [src] has been touched with the stun gloves by [M]!") @@ -71,7 +71,7 @@ switch(M.a_intent) - if("help") + if(I_HELP) if(health >= config.health_threshold_crit) help_shake_act(M) return 1 @@ -95,7 +95,7 @@ O.process() return 1 - if("grab") + if(I_GRAB) if(M == src || anchored) return 0 if(w_uniform) @@ -115,7 +115,7 @@ visible_message("\red [M] has grabbed [src] passively!") return 1 - if("hurt") + if(I_HURT) //Vampire code if(M.zone_sel && M.zone_sel.selecting == "head" && src != M) if(M.mind && M.mind.vampire && (M.mind in ticker.mode.vampires) && !M.mind.vampire.draining) @@ -213,7 +213,7 @@ src.throw_at(target,100,M.species.punch_throw_speed) - if("disarm") + if(I_DISARM) M.attack_log += text("\[[time_stamp()]\] Disarmed [src.name] ([src.ckey])") src.attack_log += text("\[[time_stamp()]\] Has been disarmed by [M.name] ([M.ckey])") diff --git a/code/modules/mob/living/carbon/human/human_attackpaw.dm b/code/modules/mob/living/carbon/human/human_attackpaw.dm index 0e8912e413f..333ae6c2e3b 100644 --- a/code/modules/mob/living/carbon/human/human_attackpaw.dm +++ b/code/modules/mob/living/carbon/human/human_attackpaw.dm @@ -1,7 +1,7 @@ /mob/living/carbon/human/attack_paw(mob/M as mob) ..() //M.delayNextAttack(10) - if (M.a_intent == "help") + if (M.a_intent == I_HELP) help_shake_act(M) else if (istype(wear_mask, /obj/item/clothing/mask/muzzle)) diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index c13d03373bd..974027d9047 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -172,7 +172,7 @@ emp_act if(!target_zone && !src.stat) visible_message("\red [user] misses [src] with \the [I]!") return - if(istype(I, /obj/item/weapon/kitchen/utensil/knife/large/butch/meatcleaver) && src.stat == DEAD && user.a_intent == "hurt") + if(istype(I, /obj/item/weapon/kitchen/utensil/knife/large/butch/meatcleaver) && src.stat == DEAD && user.a_intent == I_HURT) var/obj/item/weapon/reagent_containers/food/snacks/meat/human/newmeat = new /obj/item/weapon/reagent_containers/food/snacks/meat/human(get_turf(src.loc)) newmeat.name = src.real_name + newmeat.name newmeat.subjectname = src.real_name diff --git a/code/modules/mob/living/carbon/metroid/metroid.dm b/code/modules/mob/living/carbon/metroid/metroid.dm index aaeabbdbde8..72810370c2c 100644 --- a/code/modules/mob/living/carbon/metroid/metroid.dm +++ b/code/modules/mob/living/carbon/metroid/metroid.dm @@ -344,7 +344,7 @@ switch(M.a_intent) - if ("help") + if (I_HELP) help_shake_act(M) else if (istype(wear_mask, /obj/item/clothing/mask/muzzle)) @@ -438,7 +438,7 @@ if(M.gloves && istype(M.gloves,/obj/item/clothing/gloves)) var/obj/item/clothing/gloves/G = M.gloves if(G.cell) - if(M.a_intent == "hurt")//Stungloves. Any contact will stun the alien. + if(M.a_intent == I_HURT)//Stungloves. Any contact will stun the alien. if(G.cell.charge >= 2500) G.cell.use(2500) for(var/mob/O in viewers(src, null)) @@ -451,10 +451,10 @@ switch(M.a_intent) - if ("help") + if (I_HELP) help_shake_act(M) - if ("grab") + if (I_GRAB) if (M == src) return var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M, src ) @@ -517,12 +517,12 @@ return switch(M.a_intent) - if ("help") + if (I_HELP) for(var/mob/O in viewers(src, null)) if ((O.client && !( O.blinded ))) O.show_message(text("\blue [M] caresses [src] with its scythe like arm."), 1) - if ("hurt") + if (I_HURT) if ((prob(95) && health > 0)) attacked += 10 @@ -545,7 +545,7 @@ if ((O.client && !( O.blinded ))) O.show_message(text("\red [] has attempted to lunge at [name]!", M), 1) - if ("grab") + if (I_GRAB) if (M == src) return var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M, src ) @@ -561,7 +561,7 @@ for(var/mob/O in viewers(src, null)) O.show_message(text("\red [] has grabbed [name] passively!", M), 1) - if ("disarm") + if (I_DISARM) playsound(loc, 'sound/weapons/pierce.ogg', 25, 1, -1) var/damage = 5 attacked += 10 diff --git a/code/modules/mob/living/carbon/metroid/powers.dm b/code/modules/mob/living/carbon/metroid/powers.dm index ebb9dfe78cb..a7b7dd221f8 100644 --- a/code/modules/mob/living/carbon/metroid/powers.dm +++ b/code/modules/mob/living/carbon/metroid/powers.dm @@ -178,7 +178,7 @@ var/mob/living/carbon/slime/adult/new_slime = new adulttype(loc) new_slime.nutrition = nutrition new_slime.powerlevel = max(0, powerlevel-1) - new_slime.a_intent = "hurt" + new_slime.a_intent = I_HURT if(src.mind) src.mind.transfer_to(new_slime) else @@ -224,7 +224,7 @@ feedback_add_details("slime_babies_born","slimebirth_[replacetext(M.colour," ","_")]") var/mob/living/carbon/slime/new_slime = pick(babies) - new_slime.a_intent = "hurt" + new_slime.a_intent = I_HURT new_slime.languages = languages if(src.mind) src.mind.transfer_to(new_slime) diff --git a/code/modules/mob/living/carbon/monkey/diona.dm b/code/modules/mob/living/carbon/monkey/diona.dm index 021df3ad406..2eca6213254 100644 --- a/code/modules/mob/living/carbon/monkey/diona.dm +++ b/code/modules/mob/living/carbon/monkey/diona.dm @@ -55,7 +55,7 @@ /mob/living/carbon/monkey/diona/attack_hand(mob/living/carbon/human/M as mob) //Let people pick the little buggers up. - if(M.a_intent == "help") + if(M.a_intent == I_HELP) var/obj/item/weapon/holder/diona/D = new(loc) src.loc = D D.name = loc.name diff --git a/code/modules/mob/living/carbon/monkey/monkey.dm b/code/modules/mob/living/carbon/monkey/monkey.dm index 39211a8635d..01f580901d5 100644 --- a/code/modules/mob/living/carbon/monkey/monkey.dm +++ b/code/modules/mob/living/carbon/monkey/monkey.dm @@ -299,10 +299,10 @@ /mob/living/carbon/monkey/attack_paw(mob/M as mob) ..() - if (M.a_intent == "help") + if (M.a_intent == I_HELP) help_shake_act(M) else - if ((M.a_intent == "hurt" && !( istype(wear_mask, /obj/item/clothing/mask/muzzle) ))) + if ((M.a_intent == I_HURT && !( istype(wear_mask, /obj/item/clothing/mask/muzzle) ))) if ((prob(75) && health > 0)) playsound(loc, 'sound/weapons/bite.ogg', 50, 1, -1) for(var/mob/O in viewers(src, null)) @@ -330,7 +330,7 @@ if(M.gloves && istype(M.gloves,/obj/item/clothing/gloves)) var/obj/item/clothing/gloves/G = M.gloves if(G.cell) - if(M.a_intent == "hurt")//Stungloves. Any contact will stun the alien. + if(M.a_intent == I_HURT)//Stungloves. Any contact will stun the alien. if(G.cell.charge >= 2500) G.cell.use(2500) Weaken(5) @@ -346,10 +346,10 @@ M << "\red Not enough charge! " return - if (M.a_intent == "help") + if (M.a_intent == I_HELP) help_shake_act(M) else - if (M.a_intent == "hurt") + if (M.a_intent == I_HURT) if ((prob(75) && health > 0)) for(var/mob/O in viewers(src, null)) if ((O.client && !( O.blinded ))) @@ -374,7 +374,7 @@ if ((O.client && !( O.blinded ))) O.show_message(text("\red [] has attempted to punch [name]!", M), 1) else - if (M.a_intent == "grab") + if (M.a_intent == I_GRAB) if (M == src || anchored) return @@ -416,12 +416,12 @@ return switch(M.a_intent) - if ("help") + if (I_HELP) for(var/mob/O in viewers(src, null)) if ((O.client && !( O.blinded ))) O.show_message(text("\blue [M] caresses [src] with its scythe like arm."), 1) - if ("hurt") + if (I_HURT) if ((prob(95) && health > 0)) playsound(loc, 'sound/weapons/slice.ogg', 25, 1, -1) var/damage = rand(15, 30) @@ -444,7 +444,7 @@ if ((O.client && !( O.blinded ))) O.show_message(text("\red [] has attempted to lunge at [name]!", M), 1) - if ("grab") + if (I_GRAB) if (M == src) return var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M, src ) @@ -460,7 +460,7 @@ for(var/mob/O in viewers(src, null)) O.show_message(text("\red [] has grabbed [name] passively!", M), 1) - if ("disarm") + if (I_DISARM) playsound(loc, 'sound/weapons/pierce.ogg', 25, 1, -1) var/damage = 5 if(prob(95)) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 7f3a7b081b8..709e3a90ad5 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -914,7 +914,7 @@ default behaviour is: else dense = 1 if(dense) break - if((tmob.a_intent == "help" || tmob.restrained()) && (a_intent == "help" || src.restrained()) && tmob.canmove && canmove && !dense && can_move_mob(tmob, 1, 0)) // mutual brohugs all around! + if((tmob.a_intent == I_HELP || tmob.restrained()) && (a_intent == I_HELP || src.restrained()) && tmob.canmove && canmove && !dense && can_move_mob(tmob, 1, 0)) // mutual brohugs all around! var/turf/oldloc = loc loc = tmob.loc tmob.loc = oldloc diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index e56a2637704..f0c436441c3 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -434,7 +434,7 @@ var/list/ai_list = list() switch(M.a_intent) - if ("help") + if (I_HELP) for(var/mob/O in viewers(src, null)) if ((O.client && !( O.blinded ))) O.show_message(text("\blue [M] caresses [src]'s plating with its scythe like arm."), 1) diff --git a/code/modules/mob/living/silicon/mommi/hud.dm b/code/modules/mob/living/silicon/mommi/hud.dm index ef0cd12bf18..9bd4b95beba 100644 --- a/code/modules/mob/living/silicon/mommi/hud.dm +++ b/code/modules/mob/living/silicon/mommi/hud.dm @@ -56,7 +56,7 @@ using.name = "act_intent" using.dir = SOUTHWEST using.icon = 'icons/mob/screen1_robot.dmi' - using.icon_state = (mymob.a_intent == "hurt" ? "harm" : mymob.a_intent) + using.icon_state = (mymob.a_intent == I_HURT ? "harm" : mymob.a_intent) using.screen_loc = ui_acti using.layer = 20 src.adding += using diff --git a/code/modules/mob/living/silicon/mommi/mommi.dm b/code/modules/mob/living/silicon/mommi/mommi.dm index c9dccd7f969..57b804206d0 100644 --- a/code/modules/mob/living/silicon/mommi/mommi.dm +++ b/code/modules/mob/living/silicon/mommi/mommi.dm @@ -299,7 +299,7 @@ They can only use one tool at a time, they can't choose modules, and they have 1 if(!istype(user, /mob/living/silicon)) switch(user.a_intent) - if("disarm") + if(I_DISARM) user.attack_log += text("\[[time_stamp()]\] Disarmed [src.name] ([src.ckey])") src.attack_log += text("\[[time_stamp()]\] Has been disarmed by [user.name] ([user.ckey])") log_admin("ATTACK: [user.name] ([user.ckey]) disarmed [src.name] ([src.ckey])") diff --git a/code/modules/mob/living/silicon/pai/pai.dm b/code/modules/mob/living/silicon/pai/pai.dm index d8b97f974f4..acf9a6400ff 100644 --- a/code/modules/mob/living/silicon/pai/pai.dm +++ b/code/modules/mob/living/silicon/pai/pai.dm @@ -193,7 +193,7 @@ switch(M.a_intent) - if ("help") + if (I_HELP) for(var/mob/O in viewers(src, null)) if ((O.client && !( O.blinded ))) O.show_message(text("\blue [M] caresses [src]'s casing with its scythe like arm."), 1) diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm index 2528b5a0edc..1588329a43e 100644 --- a/code/modules/mob/living/silicon/robot/robot.dm +++ b/code/modules/mob/living/silicon/robot/robot.dm @@ -908,12 +908,12 @@ switch(M.a_intent) - if ("help") + if (I_HELP) for(var/mob/O in viewers(src, null)) if ((O.client && !( O.blinded ))) O.show_message(text("[M] caresses [src]'s plating with its scythe like arm."), 1) - if ("grab") + if (I_GRAB) if (M == src) return var/obj/item/weapon/grab/G = new /obj/item/weapon/grab( M, src ) @@ -927,7 +927,7 @@ if ((O.client && !( O.blinded ))) O.show_message(text("[] has grabbed [] passively!", M, src), 1) - if ("hurt") + if (I_HURT) var/damage = rand(10, 20) if (prob(90)) /* @@ -951,7 +951,7 @@ if ((O.client && !( O.blinded ))) O.show_message(text("[] took a swipe at []!", M, src), 1) - if ("disarm") + if (I_DISARM) if(!(lying)) if (rand(1,100) <= 85) Stun(7) @@ -1069,7 +1069,7 @@ call(/obj/item/clothing/gloves/space_ninja/proc/drain)("CYBORG",src,user:wear_suit) return else - if (user:a_intent == "help") + if (user:a_intent == I_HELP) help_shake_act(user) return diff --git a/code/modules/mob/living/simple_animal/borer.dm b/code/modules/mob/living/simple_animal/borer.dm index 4f8b00189c3..ff13c1fa536 100644 --- a/code/modules/mob/living/simple_animal/borer.dm +++ b/code/modules/mob/living/simple_animal/borer.dm @@ -80,7 +80,7 @@ var/global/borer_chem_types = typesof(/datum/borer_chem) - /datum/borer_chem speed = 5 small = 1 density = 0 - a_intent = "hurt" + a_intent = I_HURT stop_automated_movement = 1 status_flags = CANPUSH attacktext = "nips" diff --git a/code/modules/mob/living/simple_animal/constructs.dm b/code/modules/mob/living/simple_animal/constructs.dm index 31cdff9c914..ae737eac941 100644 --- a/code/modules/mob/living/simple_animal/constructs.dm +++ b/code/modules/mob/living/simple_animal/constructs.dm @@ -10,7 +10,7 @@ response_harm = "punches" icon_dead = "shade_dead" speed = -1 - a_intent = "hurt" + a_intent = I_HURT stop_automated_movement = 1 status_flags = CANPUSH attack_sound = 'sound/weapons/spiderlunge.ogg' diff --git a/code/modules/mob/living/simple_animal/friendly/corgi.dm b/code/modules/mob/living/simple_animal/friendly/corgi.dm index 188c5e9e181..37ed2aac1cb 100644 --- a/code/modules/mob/living/simple_animal/friendly/corgi.dm +++ b/code/modules/mob/living/simple_animal/friendly/corgi.dm @@ -520,8 +520,8 @@ /mob/living/simple_animal/corgi/attack_hand(mob/living/carbon/human/M) . = ..() switch(M.a_intent) - if("help") wuv(1,M) - if("hurt") wuv(-1,M) + if(I_HELP) wuv(1,M) + if(I_HURT) wuv(-1,M) /mob/living/simple_animal/corgi/proc/wuv(change, mob/M) if(change) 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 8858ae006d3..8f34163957e 100644 --- a/code/modules/mob/living/simple_animal/friendly/farm_animals.dm +++ b/code/modules/mob/living/simple_animal/friendly/farm_animals.dm @@ -130,7 +130,7 @@ udder.add_reagent("milk", rand(5, 10)) /mob/living/simple_animal/cow/attack_hand(mob/living/carbon/M as mob) - if(!stat && M.a_intent == "disarm" && icon_state != icon_dead) + if(!stat && M.a_intent == I_DISARM && icon_state != icon_dead) M.visible_message("[M] tips over [src].","You tip over [src].") Weaken(30) icon_state = icon_dead diff --git a/code/modules/mob/living/simple_animal/hostile/alien.dm b/code/modules/mob/living/simple_animal/hostile/alien.dm index a982c2beb58..1e6880ce599 100644 --- a/code/modules/mob/living/simple_animal/hostile/alien.dm +++ b/code/modules/mob/living/simple_animal/hostile/alien.dm @@ -17,7 +17,7 @@ melee_damage_lower = 25 melee_damage_upper = 25 attacktext = "slashes" - a_intent = "hurt" + a_intent = I_HURT attack_sound = 'sound/weapons/bladeslice.ogg' min_oxy = 0 max_oxy = 0 diff --git a/code/modules/mob/living/simple_animal/hostile/giant_spider/spiderling.dm b/code/modules/mob/living/simple_animal/hostile/giant_spider/spiderling.dm index 9533b68f9e3..ff6791b7d96 100644 --- a/code/modules/mob/living/simple_animal/hostile/giant_spider/spiderling.dm +++ b/code/modules/mob/living/simple_animal/hostile/giant_spider/spiderling.dm @@ -29,7 +29,7 @@ melee_damage_lower = 0 melee_damage_upper = 0 attacktext = "barrels into" - a_intent = "help" + a_intent = I_HELP //throw_message = "sinks in slowly, before being pushed out of " //status_flags = CANPUSH search_objects = 0 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 255c18ffe12..624d60aca2d 100644 --- a/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm +++ b/code/modules/mob/living/simple_animal/hostile/mining_mobs.dm @@ -17,7 +17,7 @@ response_disarm = "shoves" response_harm = "strikes" status_flags = 0 - a_intent = "hurt" + a_intent = I_HURT var/throw_message = "bounces off of" var/icon_aggro = null // for swapping to when we get aggressive @@ -71,7 +71,7 @@ melee_damage_lower = 12 melee_damage_upper = 12 attacktext = "bites into" - a_intent = "hurt" + a_intent = I_HURT attack_sound = 'sound/weapons/spiderlunge.ogg' ranged_cooldown_cap = 4 aggro_vision_range = 9 @@ -137,7 +137,7 @@ melee_damage_lower = 0 melee_damage_upper = 0 attacktext = "barrels into" - a_intent = "help" + a_intent = I_HELP throw_message = "sinks in slowly, before being pushed out of " status_flags = CANPUSH search_objects = 1 diff --git a/code/modules/mob/living/simple_animal/hostile/mushroom.dm b/code/modules/mob/living/simple_animal/hostile/mushroom.dm index 8998aa310d5..dd1a40e402f 100644 --- a/code/modules/mob/living/simple_animal/hostile/mushroom.dm +++ b/code/modules/mob/living/simple_animal/hostile/mushroom.dm @@ -135,7 +135,7 @@ /mob/living/simple_animal/hostile/mushroom/attack_hand(mob/living/carbon/human/M as mob) ..() - if(M.a_intent == "hurt") + if(M.a_intent == I_HURT) Bruise() /mob/living/simple_animal/hostile/mushroom/hitby(atom/movable/AM) 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 f7a7aeec384..cfc23174dff 100644 --- a/code/modules/mob/living/simple_animal/hostile/retaliate/clown.dm +++ b/code/modules/mob/living/simple_animal/hostile/retaliate/clown.dm @@ -13,7 +13,7 @@ speak = list("HONK", "Honk!", "Welcome to clown planet!") emote_see = list("honks") speak_chance = 1 - a_intent = "hurt" + a_intent = I_HURT stop_automated_movement_when_pulled = 0 maxHealth = 75 health = 75 diff --git a/code/modules/mob/living/simple_animal/hostile/retaliate/cluwne.dm b/code/modules/mob/living/simple_animal/hostile/retaliate/cluwne.dm index 6e09a16ebaa..0ff259ad714 100644 --- a/code/modules/mob/living/simple_animal/hostile/retaliate/cluwne.dm +++ b/code/modules/mob/living/simple_animal/hostile/retaliate/cluwne.dm @@ -19,7 +19,7 @@ speak_emote = list("squeals", "cries","sobs") emote_see = list("honks sadly") speak_chance = 1 - a_intent = "help" + a_intent = I_HELP var/footstep=0 // For clownshoe noises //deny_client_move=1 // HONK // Doesn't work right yet diff --git a/code/modules/mob/living/simple_animal/hostile/retaliate/drone.dm b/code/modules/mob/living/simple_animal/hostile/retaliate/drone.dm index fcccabeaed5..2c999a5346c 100644 --- a/code/modules/mob/living/simple_animal/hostile/retaliate/drone.dm +++ b/code/modules/mob/living/simple_animal/hostile/retaliate/drone.dm @@ -15,7 +15,7 @@ response_harm = "hits the" speak = list("ALERT.","Hostile-ile-ile entities dee-twhoooo-wected.","Threat parameterszzzz- szzet.","Bring sub-sub-sub-systems uuuup to combat alert alpha-a-a.") emote_see = list("beeps menacingly","whirrs threateningly","scans its immediate vicinity") - a_intent = "hurt" + a_intent = I_HURT stop_automated_movement_when_pulled = 0 health = 300 maxHealth = 300 diff --git a/code/modules/mob/living/simple_animal/hostile/russian.dm b/code/modules/mob/living/simple_animal/hostile/russian.dm index fef478221eb..f3197a721a3 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_lower = 15 melee_damage_upper = 15 attacktext = "punches" - a_intent = "hurt" + a_intent = I_HURT var/corpse = /obj/effect/landmark/mobcorpse/russian var/weapon1 = /obj/item/weapon/kitchen/utensil/knife/large min_oxy = 5 diff --git a/code/modules/mob/living/simple_animal/hostile/syndicate.dm b/code/modules/mob/living/simple_animal/hostile/syndicate.dm index 112aa83d4bb..e29f76248ae 100644 --- a/code/modules/mob/living/simple_animal/hostile/syndicate.dm +++ b/code/modules/mob/living/simple_animal/hostile/syndicate.dm @@ -18,7 +18,7 @@ melee_damage_lower = 10 melee_damage_upper = 10 attacktext = "punches" - a_intent = "hurt" + a_intent = I_HURT var/corpse = /obj/effect/landmark/mobcorpse/syndicatesoldier var/weapon1 var/weapon2 diff --git a/code/modules/mob/living/simple_animal/parrot.dm b/code/modules/mob/living/simple_animal/parrot.dm index 17c38fe62ef..5e48a9334d2 100644 --- a/code/modules/mob/living/simple_animal/parrot.dm +++ b/code/modules/mob/living/simple_animal/parrot.dm @@ -51,7 +51,7 @@ response_disarm = "gently moves aside" response_harm = "swats" stop_automated_movement = 1 - a_intent = "hurt" //parrots now start "aggressive" since only player parrots will nuzzle. + a_intent = I_HURT //parrots now start "aggressive" since only player parrots will nuzzle. attacktext = "chomps" friendly = "grooms" @@ -264,7 +264,7 @@ /mob/living/simple_animal/parrot/attack_hand(mob/living/carbon/M as mob) ..() if(client) return - if(!stat && M.a_intent == "hurt") + if(!stat && M.a_intent == I_HURT) icon_state = "parrot_fly" //It is going to be flying regardless of whether it flees or attacks @@ -541,7 +541,7 @@ var/mob/living/L = parrot_interest if(melee_damage_upper == 0) melee_damage_upper = parrot_damage_upper - a_intent = "hurt" + a_intent = I_HURT //If the mob is close enough to interact with if(in_range(src, parrot_interest)) @@ -789,10 +789,10 @@ if(melee_damage_upper) melee_damage_upper = 0 - a_intent = "help" + a_intent = I_HELP else melee_damage_upper = parrot_damage_upper - a_intent = "hurt" + a_intent = I_HURT return /* diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index 4aada9b0b87..b58568cc536 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -302,13 +302,13 @@ switch(M.a_intent) - if("help") + if(I_HELP) if (health > 0) for(var/mob/O in viewers(src, null)) if ((O.client && !( O.blinded ))) O.show_message("\blue [M] [response_help] [src].") - if("grab") + if(I_GRAB) if (M == src || anchored) return if (!(status_flags & CANPUSH)) @@ -327,7 +327,7 @@ if ((O.client && !( O.blinded ))) O.show_message(text("\red [] has grabbed [] passively!", M, src), 1) - if("hurt", "disarm") + if(I_HURT, I_DISARM) adjustBruteLoss(harm_intent_damage) for(var/mob/O in viewers(src, null)) if ((O.client && !( O.blinded ))) @@ -339,12 +339,12 @@ switch(M.a_intent) - if ("help") + if (I_HELP) for(var/mob/O in viewers(src, null)) if ((O.client && !( O.blinded ))) O.show_message(text("\blue [M] caresses [src] with its scythe like arm."), 1) - if ("grab") + if (I_GRAB) if(M == src || anchored) return if(!(status_flags & CANPUSH)) @@ -364,7 +364,7 @@ if ((O.client && !( O.blinded ))) O.show_message(text("\red [] has grabbed [] passively!", M, src), 1) - if("hurt", "disarm") + if(I_HURT, I_DISARM) var/damage = rand(15, 30) visible_message("\red [M] has slashed at [src]!") adjustBruteLoss(damage) @@ -374,7 +374,7 @@ /mob/living/simple_animal/attack_larva(mob/living/carbon/alien/larva/L as mob) switch(L.a_intent) - if("help") + if(I_HELP) visible_message("\blue [L] rubs it's head against [src]") diff --git a/code/modules/mob/living/simple_animal/worm.dm b/code/modules/mob/living/simple_animal/worm.dm index 012ab665ebb..9b2fd22d5f3 100644 --- a/code/modules/mob/living/simple_animal/worm.dm +++ b/code/modules/mob/living/simple_animal/worm.dm @@ -28,7 +28,7 @@ max_co2 = 0 max_tox = 0 - a_intent = "hurt" //so they don't get pushed around + a_intent = I_HURT //so they don't get pushed around environment_smash = 2 diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index 0807dc83002..b359d35f7d5 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -133,7 +133,7 @@ var/losebreath = 0.0//Carbon var/intent = null//Living var/shakecamera = 0 - var/a_intent = "help"//Living + var/a_intent = I_HELP//Living var/m_int = null//Living var/m_intent = "run"//Living var/lastKnownIP = null diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index a9166083574..ac2cf6556f7 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -215,7 +215,7 @@ proc/Gibberish(t, p)//t is the inputted message, and any value higher than 70 fo message = replacetext(message, " is ", " ") message = replacetext(message, " are ", " ") message = replacetext(message, "you", "u") - message = replacetext(message, "help", "halp") + message = replacetext(message, I_HELP, "halp") message = replacetext(message, "grief", "grife") message = replacetext(message, "space", "spess") message = replacetext(message, "carp", "crap") @@ -293,29 +293,29 @@ It's fairly easy to fix if dealing with single letters but not so much with comp return 0 //converts intent-strings into numbers and back -var/list/intents = list("help","disarm","grab","hurt") +var/list/intents = list(I_HELP,I_DISARM,I_GRAB,I_HURT) /proc/intent_numeric(argument) if(istext(argument)) switch(argument) - if("help") return 0 - if("disarm") return 1 - if("grab") return 2 + if(I_HELP) return 0 + if(I_DISARM) return 1 + if(I_GRAB) return 2 else return 3 else switch(argument) - if(0) return "help" - if(1) return "disarm" - if(2) return "grab" - else return "hurt" + if(0) return I_HELP + if(1) return I_DISARM + if(2) return I_GRAB + else return I_HURT -//change a mob's act-intent. Input the intent as a string such as "help" or use "right"/"left +//change a mob's act-intent. Input the intent as a string such as I_HELP or use "right"/"left /mob/verb/a_intent_change(input as text) set name = "a-intent" set hidden = 1 if(ishuman(src) || isalienadult(src) || isbrain(src)) switch(input) - if("help","disarm","grab","hurt") + if(I_HELP,I_DISARM,I_GRAB,I_HURT) a_intent = input if("right") a_intent = intent_numeric((intent_numeric(a_intent)+1) % 4) @@ -326,14 +326,14 @@ var/list/intents = list("help","disarm","grab","hurt") else if(isrobot(src) || ismonkey(src) || islarva(src)) switch(input) - if("help") - a_intent = "help" - if("hurt") - a_intent = "hurt" + if(I_HELP) + a_intent = I_HELP + if(I_HURT) + a_intent = I_HURT if("right","left") a_intent = intent_numeric(intent_numeric(a_intent) - 3) if(hud_used && hud_used.action_intent) - if(a_intent == "hurt") + if(a_intent == I_HURT) hud_used.action_intent.icon_state = "harm" else hud_used.action_intent.icon_state = "help" diff --git a/code/modules/mob/transform_procs.dm b/code/modules/mob/transform_procs.dm index 5352061bb7f..51b1efaf523 100644 --- a/code/modules/mob/transform_procs.dm +++ b/code/modules/mob/transform_procs.dm @@ -73,7 +73,7 @@ new_mob.mutations += M_CLUMSY new_mob.mutations += M_FAT new_mob.setBrainLoss(100) - new_mob.a_intent = "hurt" + new_mob.a_intent = I_HURT new_mob.key = key new_mob << "Instantly, what was your clothes fall off, and are replaced with a mockery of all that is clowning; Disgusting-looking garb that the foulest of creatures would be afraid of wearing. Your very face begins to shape, mold, into something truely disgusting. A mask made of flesh. Your body is feeling the worst pain it has ever felt. As you think it cannot get any worse, one of your arms turns into a horrific meld of flesh and plastic, making a limb made entirely of bike horns." @@ -286,7 +286,7 @@ if("Drone") new_xeno = new /mob/living/carbon/alien/humanoid/drone(loc) - new_xeno.a_intent = "hurt" + new_xeno.a_intent = I_HURT new_xeno.key = key new_xeno << "You are now an alien." @@ -322,7 +322,7 @@ new_slime = new /mob/living/carbon/slime/adult(loc) else new_slime = new /mob/living/carbon/slime(loc) - new_slime.a_intent = "hurt" + new_slime.a_intent = I_HURT new_slime.key = key new_slime << "You are now a slime. Skreee!" @@ -344,7 +344,7 @@ del(t) var/mob/living/simple_animal/corgi/new_corgi = new /mob/living/simple_animal/corgi (loc) - new_corgi.a_intent = "hurt" + new_corgi.a_intent = I_HURT new_corgi.key = key new_corgi << "You are now a Corgi. Yap Yap!" @@ -378,7 +378,7 @@ var/mob/new_mob = new mobpath(src.loc) new_mob.key = key - new_mob.a_intent = "hurt" + new_mob.a_intent = I_HURT new_mob << "You suddenly feel more... animalistic." @@ -398,7 +398,7 @@ var/mob/new_mob = new mobpath(src.loc) new_mob.key = key - new_mob.a_intent = "hurt" + new_mob.a_intent = I_HURT new_mob << "You feel more... animalistic" del(src) diff --git a/code/modules/organs/organ_objects.dm b/code/modules/organs/organ_objects.dm index 3622f717da1..794276e772b 100644 --- a/code/modules/organs/organ_objects.dm +++ b/code/modules/organs/organ_objects.dm @@ -18,7 +18,7 @@ /obj/item/organ/attack_self(mob/user as mob) // Convert it to an edible form, yum yum. - if(!robotic && user.a_intent == "help" && user.zone_sel.selecting == "mouth") + if(!robotic && user.a_intent == I_HELP && user.zone_sel.selecting == "mouth") bitten(user) return diff --git a/code/modules/power/cable.dm b/code/modules/power/cable.dm index b49e0f655c6..d182b7b96a1 100644 --- a/code/modules/power/cable.dm +++ b/code/modules/power/cable.dm @@ -535,7 +535,7 @@ By design, d1 is the smallest direction and d2 is the highest if(hasorgans(M)) var/datum/organ/external/S = M:get_organ(user.zone_sel.selecting) - if(!(S.status & ORGAN_ROBOT) || user.a_intent != "help") + if(!(S.status & ORGAN_ROBOT) || user.a_intent != I_HELP) return ..() if(S.burn_dam > 0 && use(1)) diff --git a/code/modules/power/lighting.dm b/code/modules/power/lighting.dm index ab1a9195c98..78849074553 100644 --- a/code/modules/power/lighting.dm +++ b/code/modules/power/lighting.dm @@ -670,7 +670,7 @@ /obj/item/weapon/light/afterattack(atom/target, mob/user) if(istype(target, /obj/machinery/light)) return - if(user.a_intent != "hurt") + if(user.a_intent != I_HURT) return shatter() diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index 05392a93b4e..a8988598059 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -217,7 +217,7 @@ if (src.process_chambered()) //Point blank shooting if on harm intent or target we were targeting. - if(user.a_intent == "hurt") + if(user.a_intent == I_HURT) user.visible_message("\red \The [user] fires \the [src] point blank at [M]!") in_chamber.damage *= 1.3 src.Fire(M,user,0,0,1) diff --git a/code/modules/projectiles/guns/projectile/pneumatic.dm b/code/modules/projectiles/guns/projectile/pneumatic.dm index 771029465c5..21542a79d01 100644 --- a/code/modules/projectiles/guns/projectile/pneumatic.dm +++ b/code/modules/projectiles/guns/projectile/pneumatic.dm @@ -90,7 +90,7 @@ /obj/item/weapon/storage/pneumatic/attack(mob/living/M as mob, mob/living/user as mob, def_zone) if (length(contents) > 0) - if(user.a_intent == "hurt") + if(user.a_intent == I_HURT) user.visible_message("\The [user] fires \the [src] point blank at [M]!") Fire(M,user) return diff --git a/code/modules/projectiles/projectile/change.dm b/code/modules/projectiles/projectile/change.dm index 245ebfc5cab..208e5b96751 100644 --- a/code/modules/projectiles/projectile/change.dm +++ b/code/modules/projectiles/projectile/change.dm @@ -148,7 +148,7 @@ for (var/obj/effect/proc_holder/spell/S in M.spell_list) new_mob.spell_list += new S.type - new_mob.a_intent = "hurt" + new_mob.a_intent = I_HURT if(M.mind) M.mind.transfer_to(new_mob) else diff --git a/code/modules/reagents/Chemistry-Reagents.dm b/code/modules/reagents/Chemistry-Reagents.dm index 5c44fe8910a..9e2cd30e908 100644 --- a/code/modules/reagents/Chemistry-Reagents.dm +++ b/code/modules/reagents/Chemistry-Reagents.dm @@ -555,7 +555,7 @@ W.loc = M.loc W.dropped(M) var/mob/living/carbon/slime/new_mob = new /mob/living/carbon/slime(M.loc) - new_mob.a_intent = "hurt" + new_mob.a_intent = I_HURT if(M.mind) M.mind.transfer_to(new_mob) else diff --git a/code/modules/reagents/reagent_containers/food/drinks.dm b/code/modules/reagents/reagent_containers/food/drinks.dm index 284bebb845d..79a1b6a1bc5 100644 --- a/code/modules/reagents/reagent_containers/food/drinks.dm +++ b/code/modules/reagents/reagent_containers/food/drinks.dm @@ -46,7 +46,7 @@ var/fillevel = gulp_size //smashing on someone - if(user.a_intent == "hurt" && isGlass && molotov != 1) //to smash on someone, must be harm intent, breakable glass, and have no rag inside + if(user.a_intent == I_HURT && isGlass && molotov != 1) //to smash on someone, must be harm intent, breakable glass, and have no rag inside if(!M) return diff --git a/code/modules/reagents/reagent_containers/syringes.dm b/code/modules/reagents/reagent_containers/syringes.dm index 15768bd2858..3d74d0b5bf6 100644 --- a/code/modules/reagents/reagent_containers/syringes.dm +++ b/code/modules/reagents/reagent_containers/syringes.dm @@ -64,7 +64,7 @@ user << "\red This syringe is broken!" return - if (user.a_intent == "hurt" && ismob(target)) + if (user.a_intent == I_HURT && ismob(target)) if((M_CLUMSY in user.mutations) && prob(50)) target = user syringestab(target, user) diff --git a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_hurt.dm b/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_hurt.dm index f0ff1b6e1c9..6ba187dc84d 100644 --- a/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_hurt.dm +++ b/code/modules/research/xenoarchaeology/artifact/effects/unknown_effect_hurt.dm @@ -1,6 +1,6 @@ /datum/artifact_effect/hurt - effecttype = "hurt" + effecttype = I_HURT effect_type = 5 /datum/artifact_effect/hurt/DoEffectTouch(var/mob/toucher) diff --git a/code/modules/surgery/surgery.dm b/code/modules/surgery/surgery.dm index fce175a3cfc..a2b503643ed 100644 --- a/code/modules/surgery/surgery.dm +++ b/code/modules/surgery/surgery.dm @@ -90,7 +90,7 @@ proc/spread_germs_to_organ(datum/organ/external/E, mob/living/carbon/human/user) proc/do_surgery(mob/living/M, mob/living/user, obj/item/tool) if(!istype(M,/mob/living/carbon/human)) return 0 - if (user.a_intent == "hurt") //check for Hippocratic Oath + if (user.a_intent == I_HURT) //check for Hippocratic Oath return 0 var/sleep_fail = 0 var/clumsy = 0 @@ -120,7 +120,7 @@ proc/do_surgery(mob/living/M, mob/living/user, obj/item/tool) else S.doing_surgery.Remove(null) //get rid of that now null reference return 1 //don't want to do weapony things after surgery - if (user.a_intent == "help") + if (user.a_intent == I_HELP) user << "You can't see any useful way to use [tool] on [M]." return 1 return 0 diff --git a/code/setup.dm b/code/setup.dm index e7929ed4087..2606435ea47 100644 --- a/code/setup.dm +++ b/code/setup.dm @@ -502,6 +502,13 @@ var/list/global_mutations = list() // list of hidden mutation things #define EYE_BLUR "eye_blur" #define DROWSY "drowsy" + +//intent flags yay +#define I_HELP "help" +#define I_DISARM "disarm" +#define I_GRAB "grab" +#define I_HURT "hurt" + //I hate adding defines like this but I'd much rather deal with bitflags than lists and string searches #define BRUTELOSS 1 #define FIRELOSS 2