From 3094e65b710d0dc433caeb7df1d3fe1c49eef73d Mon Sep 17 00:00:00 2001 From: Kashargul <144968721+Kashargul@users.noreply.github.com> Date: Fri, 3 Jan 2025 08:14:28 +0100 Subject: [PATCH] intent cleanup (#16825) --- code/__defines/mobs.dm | 3 +++ code/_onclick/hud/alien_larva.dm | 2 +- code/_onclick/hud/human.dm | 2 +- code/_onclick/hud/robot.dm | 6 ++--- code/_onclick/hud/screen_objects.dm | 22 +++++++++---------- code/game/area/areas.dm | 4 ++-- .../changeling/powers/visible_camouflage.dm | 6 ++--- code/game/machinery/flasher.dm | 2 +- code/game/objects/items/bells.dm | 2 +- code/game/objects/items/glassjar.dm | 4 ++-- code/game/objects/items/toys/toys.dm | 2 +- code/game/objects/items/weapons/handcuffs.dm | 12 +++++----- .../items/weapons/tools/screwdriver.dm | 4 ++-- code/game/objects/items/weapons/traps.dm | 4 ++-- .../crates_lockers/closets/coffin.dm | 2 +- code/game/turfs/simulated.dm | 4 ++-- code/modules/assembly/mousetrap.dm | 2 +- .../detectivework/tools/sample_kits.dm | 2 +- code/modules/detectivework/tools/swabs.dm | 2 +- .../carbon/alien/diona/diona_attacks.dm | 4 ++-- code/modules/mob/living/carbon/carbon.dm | 4 ++-- .../mob/living/carbon/human/human_movement.dm | 6 ++--- .../mob/living/carbon/human/life_vr.dm | 2 +- .../species/station/traits_vr/weaver_objs.dm | 2 +- code/modules/mob/living/living_movement.dm | 6 ++--- .../modules/mob/living/silicon/pai/pai_hud.dm | 2 +- .../mob/living/silicon/robot/drone/drone.dm | 2 +- .../silicon/robot/drone/drone_abilities.dm | 2 +- .../mob/living/simple_mob/simple_hud.dm | 2 +- .../mob/living/simple_mob/simple_mob.dm | 2 +- .../simple_mob/subtypes/animal/pets/fox_vr.dm | 2 +- code/modules/mob/mob_defines.dm | 2 +- code/modules/mob/mob_helpers.dm | 2 +- code/modules/mob/mob_movement.dm | 12 +++++----- code/modules/organs/internal/intestine.dm | 2 +- code/modules/organs/internal/kidneys.dm | 2 +- .../projectiles/targeting/targeting_mob.dm | 4 ++-- code/modules/vore/eating/stumblevore_vr.dm | 4 ++-- code/modules/vore/resizing/resize_vr.dm | 2 +- maps/gateway_archive_vr/labyrinth.dm | 4 ++-- 40 files changed, 80 insertions(+), 77 deletions(-) diff --git a/code/__defines/mobs.dm b/code/__defines/mobs.dm index 3f2c71d834..4e31ab3309 100644 --- a/code/__defines/mobs.dm +++ b/code/__defines/mobs.dm @@ -75,6 +75,9 @@ #define I_GRAB "grab" #define I_HURT "harm" +#define I_RUN "run" +#define I_WALK "walk" + //These are used Bump() code for living mobs, in the mob_bump_flag, mob_swap_flags, and mob_push_flags vars to determine whom can bump/swap with whom. #define HUMAN 1 #define MONKEY 2 diff --git a/code/_onclick/hud/alien_larva.dm b/code/_onclick/hud/alien_larva.dm index 123a13819b..e53a1cbd32 100644 --- a/code/_onclick/hud/alien_larva.dm +++ b/code/_onclick/hud/alien_larva.dm @@ -12,7 +12,7 @@ using.name = "mov_intent" using.set_dir(SOUTHWEST) using.icon = HUD.ui_style - using.icon_state = (m_intent == "run" ? "running" : "walking") + using.icon_state = (m_intent == I_RUN ? "running" : "walking") using.screen_loc = ui_acti using.layer = HUD_LAYER HUD.adding += using diff --git a/code/_onclick/hud/human.dm b/code/_onclick/hud/human.dm index 1f5fc4f497..5536de74d4 100644 --- a/code/_onclick/hud/human.dm +++ b/code/_onclick/hud/human.dm @@ -132,7 +132,7 @@ using = new /obj/screen() using.name = "mov_intent" using.icon = HUD.ui_style - using.icon_state = (m_intent == "run" ? "running" : "walking") + using.icon_state = (m_intent == I_RUN ? "running" : "walking") using.screen_loc = ui_movi using.color = HUD.ui_color using.alpha = HUD.ui_alpha diff --git a/code/_onclick/hud/robot.dm b/code/_onclick/hud/robot.dm index 4b062a6b5f..2aa272bce5 100644 --- a/code/_onclick/hud/robot.dm +++ b/code/_onclick/hud/robot.dm @@ -85,7 +85,7 @@ var/obj/screen/robot_inventory using = new /obj/screen() using.name = "mov_intent" using.icon = HUD.ui_style - using.icon_state = (m_intent == "run" ? "running" : "walking") + using.icon_state = (m_intent == I_RUN ? "running" : "walking") using.screen_loc = ui_movi using.color = HUD.ui_color using.alpha = HUD.ui_alpha @@ -230,7 +230,7 @@ var/obj/screen/robot_inventory else if(speed == -1) using.icon_state = "speed_2" HUD.control_vtec = using - m_intent = "run" + m_intent = I_RUN HUD.move_intent.icon_state = "running" client.screen += HUD.control_vtec @@ -254,7 +254,7 @@ var/obj/screen/robot_inventory control_vtec.icon_state = "speed_1" else if(R.speed == -1) control_vtec.icon_state = "speed_2" - R.m_intent = "run" + R.m_intent = I_RUN R.hud_used.move_intent.icon_state = "running" R.client?.screen += control_vtec else diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm index d8781ef799..7f828a6eec 100644 --- a/code/_onclick/hud/screen_objects.dm +++ b/code/_onclick/hud/screen_objects.dm @@ -291,36 +291,36 @@ var/mob/living/carbon/C = usr if(C.legcuffed) to_chat(C, span_notice("You are legcuffed! You cannot run until you get [C.legcuffed] removed!")) - C.m_intent = "walk" //Just incase + C.m_intent = I_WALK //Just incase C.hud_used.move_intent.icon_state = "walking" return 1 var/mob/living/L = usr switch(L.m_intent) - if("run") - L.m_intent = "walk" + if(I_RUN) + L.m_intent = I_WALK L.hud_used.move_intent.icon_state = "walking" - if("walk") - L.m_intent = "run" + if(I_WALK) + L.m_intent = I_RUN L.hud_used.move_intent.icon_state = "running" if("m_intent") if(!usr.m_int) switch(usr.m_intent) - if("run") + if(I_RUN) usr.m_int = "13,14" - if("walk") + if(I_WALK) usr.m_int = "14,14" if("face") usr.m_int = "15,14" else usr.m_int = null - if("walk") - usr.m_intent = "walk" + if(I_WALK) + usr.m_intent = I_WALK usr.m_int = "14,14" if("face") usr.m_intent = "face" usr.m_int = "15,14" - if("run") - usr.m_intent = "run" + if(I_RUN) + usr.m_intent = I_RUN usr.m_int = "13,14" if("Reset Machine") usr.unset_machine() diff --git a/code/game/area/areas.dm b/code/game/area/areas.dm index 8d5616955b..5399023c28 100644 --- a/code/game/area/areas.dm +++ b/code/game/area/areas.dm @@ -384,7 +384,7 @@ var/list/mob/living/forced_ambiance_list = new if(!L.lastarea) L.lastarea = src var/area/oldarea = L.lastarea - if((oldarea.get_gravity() == 0) && (get_gravity() == 1) && (L.m_intent == "run")) // Being ready when you change areas gives you a chance to avoid falling all together. + if((oldarea.get_gravity() == 0) && (get_gravity() == 1) && (L.m_intent == I_RUN)) // Being ready when you change areas gives you a chance to avoid falling all together. thunk(L) L.update_floating( L.Check_Dense_Object() ) @@ -450,7 +450,7 @@ var/list/mob/living/forced_ambiance_list = new if(H.species.can_zero_g_move || H.species.can_space_freemove) return - if(H.m_intent == "run") + if(H.m_intent == I_RUN) H.AdjustStunned(6) H.AdjustWeakened(6) else diff --git a/code/game/gamemodes/changeling/powers/visible_camouflage.dm b/code/game/gamemodes/changeling/powers/visible_camouflage.dm index e83b61bb5c..de31868953 100644 --- a/code/game/gamemodes/changeling/powers/visible_camouflage.dm +++ b/code/game/gamemodes/changeling/powers/visible_camouflage.dm @@ -41,13 +41,13 @@ to_chat(src, span_notice("We may move at our normal speed while hidden.")) if(must_walk) - H.set_m_intent("walk") + H.set_m_intent(I_WALK) var/remain_cloaked = TRUE while(remain_cloaked) //This loop will keep going until the player uncloaks. sleep(1 SECOND) // Sleep at the start so that if something invalidates a cloak, it will drop immediately after the check and not in one second. - if(H.m_intent != "walk" && must_walk) // Moving too fast uncloaks you. + if(H.m_intent != I_WALK && must_walk) // Moving too fast uncloaks you. remain_cloaked = 0 if(!H.mind.changeling.cloaked) remain_cloaked = 0 @@ -65,7 +65,7 @@ H.invisibility = initial(invisibility) visible_message(span_warning("[src] suddenly fades in, seemingly from nowhere!"), span_notice("We revert our camouflage, revealing ourselves.")) - H.set_m_intent("run") + H.set_m_intent(I_RUN) H.mind.changeling.cloaked = 0 H.mind.changeling.chem_recharge_rate = old_regen_rate diff --git a/code/game/machinery/flasher.dm b/code/game/machinery/flasher.dm index ed53a6e439..4e42f297c0 100644 --- a/code/game/machinery/flasher.dm +++ b/code/game/machinery/flasher.dm @@ -103,7 +103,7 @@ if(iscarbon(AM)) var/mob/living/carbon/M = AM - if(M.m_intent != "walk") + if(M.m_intent != I_WALK) flash() /obj/machinery/flasher/portable/attackby(obj/item/W as obj, mob/user as mob) diff --git a/code/game/objects/items/bells.dm b/code/game/objects/items/bells.dm index 457eb80f47..9df665424b 100644 --- a/code/game/objects/items/bells.dm +++ b/code/game/objects/items/bells.dm @@ -61,7 +61,7 @@ ..() /obj/item/deskbell/proc/ring(mob/user) - if(user.a_intent == "harm") + if(user.a_intent == I_HURT) playsound(src, 'sound/effects/deskbell_rude.ogg', 50, 1) to_chat(user,span_notice("You hammer [src] rudely!")) if (prob(2)) diff --git a/code/game/objects/items/glassjar.dm b/code/game/objects/items/glassjar.dm index 6a4617f12c..e2209a91d3 100644 --- a/code/game/objects/items/glassjar.dm +++ b/code/game/objects/items/glassjar.dm @@ -183,7 +183,7 @@ /obj/item/glass_jar/fish/afterattack(var/atom/A, var/mob/user, var/proximity) if(!filled) if(istype(A, /obj/structure/sink) || istype(A, /turf/simulated/floor/water)) - if(contains && user.a_intent == "help") + if(contains && user.a_intent == I_HELP) to_chat(user, span_warning("That probably isn't the best idea.")) return @@ -197,7 +197,7 @@ /obj/item/glass_jar/fish/attack_self(var/mob/user) if(filled) if(contains == JAR_ANIMAL) - if(user.a_intent == "help") + if(user.a_intent == I_HELP) to_chat(user, span_notice("Maybe you shouldn't empty the water...")) return diff --git a/code/game/objects/items/toys/toys.dm b/code/game/objects/items/toys/toys.dm index 9611a4b14d..96b786c58b 100644 --- a/code/game/objects/items/toys/toys.dm +++ b/code/game/objects/items/toys/toys.dm @@ -257,7 +257,7 @@ return if((ishuman(H))) //i guess carp and shit shouldn't set them off var/mob/living/carbon/M = H - if(M.m_intent == "run") + if(M.m_intent == I_RUN) to_chat(M, span_warning("You step on the snap pop!")) var/datum/effect/effect/system/spark_spread/s = new /datum/effect/effect/system/spark_spread diff --git a/code/game/objects/items/weapons/handcuffs.dm b/code/game/objects/items/weapons/handcuffs.dm index 41b11771e6..7cc67de51b 100644 --- a/code/game/objects/items/weapons/handcuffs.dm +++ b/code/game/objects/items/weapons/handcuffs.dm @@ -274,8 +274,8 @@ var/last_chew = 0 lcuffs.loc = target target.legcuffed = lcuffs target.update_inv_legcuffed() - if(target.m_intent != "walk") - target.m_intent = "walk" + if(target.m_intent != I_WALK) + target.m_intent = I_WALK if(target.hud_used && user.hud_used.move_intent) target.hud_used.move_intent.icon_state = "walking" return 1 @@ -283,8 +283,8 @@ var/last_chew = 0 /obj/item/handcuffs/legcuffs/equipped(var/mob/living/user,var/slot) . = ..() if(slot == slot_legcuffed) - if(user.m_intent != "walk") - user.m_intent = "walk" + if(user.m_intent != I_WALK) + user.m_intent = I_WALK if(user.hud_used && user.hud_used.move_intent) user.hud_used.move_intent.icon_state = "walking" @@ -325,8 +325,8 @@ var/last_chew = 0 lcuffs.loc = target target.legcuffed = lcuffs target.update_inv_legcuffed() - if(target.m_intent != "walk") - target.m_intent = "walk" + if(target.m_intent != I_WALK) + target.m_intent = I_WALK if(target.hud_used && user.hud_used.move_intent) target.hud_used.move_intent.icon_state = "walking" return 1 diff --git a/code/game/objects/items/weapons/tools/screwdriver.dm b/code/game/objects/items/weapons/tools/screwdriver.dm index 27ee055848..4f2b7aec3a 100644 --- a/code/game/objects/items/weapons/tools/screwdriver.dm +++ b/code/game/objects/items/weapons/tools/screwdriver.dm @@ -55,7 +55,7 @@ ..() /obj/item/tool/screwdriver/attack(mob/living/carbon/M as mob, mob/living/carbon/user as mob) - if(!istype(M) || user.a_intent == "help") + if(!istype(M) || user.a_intent == I_HELP) return ..() if(user.zone_sel.selecting != O_EYES && user.zone_sel.selecting != BP_HEAD) return ..() @@ -112,4 +112,4 @@ attack_verb = list("drilled", "screwed", "jabbed", "whacked") hitsound = 'sound/items/drill_hit.ogg' usesound = 'sound/items/drill_use.ogg' - toolspeed = 0.25 \ No newline at end of file + toolspeed = 0.25 diff --git a/code/game/objects/items/weapons/traps.dm b/code/game/objects/items/weapons/traps.dm index 6acc7985da..dd7a2fbc08 100644 --- a/code/game/objects/items/weapons/traps.dm +++ b/code/game/objects/items/weapons/traps.dm @@ -124,7 +124,7 @@ return if(deployed && isliving(AM)) var/mob/living/L = AM - if(L.m_intent == "run") + if(L.m_intent == I_RUN) L.visible_message( span_danger("[L] steps on \the [src]."), span_danger("You step on \the [src]!"), @@ -271,7 +271,7 @@ return if(anchored && isliving(AM)) var/mob/living/L = AM - if(L.m_intent == "run") + if(L.m_intent == I_RUN) L.visible_message( span_danger("[L] steps in \the [src]."), span_danger("You step in \the [src]!"), diff --git a/code/game/objects/structures/crates_lockers/closets/coffin.dm b/code/game/objects/structures/crates_lockers/closets/coffin.dm index acb09c9e58..46ad381463 100644 --- a/code/game/objects/structures/crates_lockers/closets/coffin.dm +++ b/code/game/objects/structures/crates_lockers/closets/coffin.dm @@ -42,7 +42,7 @@ add_fingerprint(M) if(ishuman(M)) var/mob/living/carbon/human/H = M - if(H.m_intent == "walk") + if(H.m_intent == I_WALK) to_chat(H, span_warning("You stop at the edge of \the [src.name].")) return FALSE else diff --git a/code/game/turfs/simulated.dm b/code/game/turfs/simulated.dm index 6867af1386..4742d18579 100644 --- a/code/game/turfs/simulated.dm +++ b/code/game/turfs/simulated.dm @@ -108,7 +108,7 @@ if(H.shoes) var/obj/item/clothing/shoes/S = H.shoes if(istype(S)) - S.handle_movement(src,(H.m_intent == "run" ? 1 : 0)) + S.handle_movement(src,(H.m_intent == I_RUN ? 1 : 0)) if(S.track_blood && S.blood_DNA) bloodDNA = S.blood_DNA bloodcolor=S.blood_color @@ -129,7 +129,7 @@ if(src.wet) - if(M.buckled || (src.wet == 1 && M.m_intent == "walk")) + if(M.buckled || (src.wet == 1 && M.m_intent == I_WALK)) return var/slip_dist = 1 diff --git a/code/modules/assembly/mousetrap.dm b/code/modules/assembly/mousetrap.dm index 4ebb2d24e6..473a4bca30 100644 --- a/code/modules/assembly/mousetrap.dm +++ b/code/modules/assembly/mousetrap.dm @@ -85,7 +85,7 @@ if(armed) if(ishuman(AM)) var/mob/living/carbon/H = AM - if(H.m_intent == "run") + if(H.m_intent == I_RUN) triggered(H) H.visible_message(span_warning("[H] accidentally steps on [src]."), \ span_warning("You accidentally step on [src]")) diff --git a/code/modules/detectivework/tools/sample_kits.dm b/code/modules/detectivework/tools/sample_kits.dm index b08dfb0348..30b2724d0d 100644 --- a/code/modules/detectivework/tools/sample_kits.dm +++ b/code/modules/detectivework/tools/sample_kits.dm @@ -90,7 +90,7 @@ to_chat(user, span_warning("\The [H] is wearing gloves.")) return 1 - if(user != H && H.a_intent != "help" && !H.lying) + if(user != H && H.a_intent != I_HELP && !H.lying) user.visible_message(span_danger("\The [user] tries to take prints from \the [H], but they move away.")) return 1 diff --git a/code/modules/detectivework/tools/swabs.dm b/code/modules/detectivework/tools/swabs.dm index e841541c35..f2c13aed67 100644 --- a/code/modules/detectivework/tools/swabs.dm +++ b/code/modules/detectivework/tools/swabs.dm @@ -30,7 +30,7 @@ to_chat(user, span_warning("They don't seem to have DNA!")) return - if(user != H && H.a_intent != "help" && !H.lying) + if(user != H && H.a_intent != I_HELP && !H.lying) user.visible_message(span_danger("\The [user] tries to take a swab sample from \the [H], but they move away.")) return diff --git a/code/modules/mob/living/carbon/alien/diona/diona_attacks.dm b/code/modules/mob/living/carbon/alien/diona/diona_attacks.dm index d8376354f0..6ec69a9478 100644 --- a/code/modules/mob/living/carbon/alien/diona/diona_attacks.dm +++ b/code/modules/mob/living/carbon/alien/diona/diona_attacks.dm @@ -2,7 +2,7 @@ var/mob/living/carbon/human/H = over_object if(!istype(H) || !Adjacent(H)) return ..() - if(H.a_intent == "grab" && hat && !H.hands_are_full()) + if(H.a_intent == I_GRAB && hat && !H.hands_are_full()) hat.loc = get_turf(src) H.put_in_hands(hat) H.visible_message(span_danger("\The [H] removes \the [src]'s [hat].")) @@ -12,7 +12,7 @@ return ..() /mob/living/carbon/alien/diona/attackby(var/obj/item/W, var/mob/user) - if(user.a_intent == "help" && istype(W, /obj/item/clothing/head)) + if(user.a_intent == I_HELP && istype(W, /obj/item/clothing/head)) if(hat) to_chat(user, span_warning("\The [src] is already wearing \the [hat].")) return diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 9b6f1210c8..3f83d9491e 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -33,10 +33,10 @@ . = ..() if(src.nutrition && src.stat != 2) adjust_nutrition(-DEFAULT_HUNGER_FACTOR / 10) - if(src.m_intent == "run") + if(src.m_intent == I_RUN) adjust_nutrition(-DEFAULT_HUNGER_FACTOR / 10) - if((FAT in src.mutations) && src.m_intent == "run" && src.bodytemperature <= 360) + if((FAT in src.mutations) && src.m_intent == I_RUN && src.bodytemperature <= 360) src.bodytemperature += 2 // Moving around increases germ_level faster diff --git a/code/modules/mob/living/carbon/human/human_movement.dm b/code/modules/mob/living/carbon/human/human_movement.dm index d5ccd8a26b..a0cd7eab81 100644 --- a/code/modules/mob/living/carbon/human/human_movement.dm +++ b/code/modules/mob/living/carbon/human/human_movement.dm @@ -310,17 +310,17 @@ if(!S) return // Play every 20 steps while walking, for the sneak - if(m_intent == "walk" && step_count++ % 20 != 0) + if(m_intent == I_WALK && step_count++ % 20 != 0) return // Play every other step while running - if(m_intent == "run" && step_count++ % 2 != 0) + if(m_intent == I_RUN && step_count++ % 2 != 0) return var/volume = CONFIG_GET(number/footstep_volume) // Reduce volume while walking or barefoot - if(!shoes || m_intent == "walk") + if(!shoes || m_intent == I_WALK) volume *= 0.5 else if(shoes) var/obj/item/clothing/shoes/feet = shoes diff --git a/code/modules/mob/living/carbon/human/life_vr.dm b/code/modules/mob/living/carbon/human/life_vr.dm index 25ba3b9f17..31ff8b8391 100644 --- a/code/modules/mob/living/carbon/human/life_vr.dm +++ b/code/modules/mob/living/carbon/human/life_vr.dm @@ -28,7 +28,7 @@ // Technically this does mean being dragged takes nutrition if(stat != DEAD) adjust_nutrition(hunger_rate/-10) - if(m_intent == "run") + if(m_intent == I_RUN) adjust_nutrition(hunger_rate/-10) // Moving around increases germ_level faster diff --git a/code/modules/mob/living/carbon/human/species/station/traits_vr/weaver_objs.dm b/code/modules/mob/living/carbon/human/species/station/traits_vr/weaver_objs.dm index be6066f464..c2ebc62293 100644 --- a/code/modules/mob/living/carbon/human/species/station/traits_vr/weaver_objs.dm +++ b/code/modules/mob/living/carbon/human/species/station/traits_vr/weaver_objs.dm @@ -100,7 +100,7 @@ return if(isliving(AM) && trap_active) var/mob/living/L = AM - if(L.m_intent == "run") + if(L.m_intent == I_RUN) L.visible_message( span_danger("[L] steps on \the [src]."), span_danger("You step on \the [src]!"), diff --git a/code/modules/mob/living/living_movement.dm b/code/modules/mob/living/living_movement.dm index 46d6237afe..a6ccc6c8ea 100644 --- a/code/modules/mob/living/living_movement.dm +++ b/code/modules/mob/living/living_movement.dm @@ -17,7 +17,7 @@ /mob/living/SelfMove(turf/n, direct, movetime) // If on walk intent, don't willingly step into hazardous tiles. // Unless the walker is confused. - if(m_intent == "walk" && confused <= 0) + if(m_intent == I_WALK && confused <= 0) if(!n.is_safe_to_enter(src)) to_chat(src, span_warning("\The [n] is dangerous to move into.")) return FALSE // In case any code wants to know if movement happened. @@ -175,11 +175,11 @@ default behaviour is: . = ..() if (!istype(AM, /atom/movable) || AM.anchored) //VOREStation Edit - object-specific proc for running into things - if(((confused || is_blind()) && stat == CONSCIOUS && prob(50) && m_intent=="run") || flying) + if(((confused || is_blind()) && stat == CONSCIOUS && prob(50) && m_intent==I_RUN) || flying) AM.stumble_into(src) //VOREStation Edit End /* VOREStation Removal - See above - if(confused && prob(50) && m_intent=="run") + if(confused && prob(50) && m_intent==I_RUN) Weaken(2) playsound(src, "punch", 25, 1, -1) visible_message(span_warning("[src] [pick("ran", "slammed")] into \the [AM]!")) diff --git a/code/modules/mob/living/silicon/pai/pai_hud.dm b/code/modules/mob/living/silicon/pai/pai_hud.dm index 2c53c3d26a..26062c7874 100644 --- a/code/modules/mob/living/silicon/pai/pai_hud.dm +++ b/code/modules/mob/living/silicon/pai/pai_hud.dm @@ -142,7 +142,7 @@ using = new /obj/screen() using.name = "mov_intent" using.icon = ui_style - using.icon_state = (m_intent == "run" ? "running" : "walking") + using.icon_state = (m_intent == I_RUN ? "running" : "walking") using.screen_loc = ui_movi using.color = ui_color using.alpha = ui_alpha diff --git a/code/modules/mob/living/silicon/robot/drone/drone.dm b/code/modules/mob/living/silicon/robot/drone/drone.dm index c7c1a1a2fb..36aa8eea9c 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone.dm @@ -216,7 +216,7 @@ var/list/mob_hat_cache = list() //Drones cannot be upgraded with borg modules so we need to catch some items before they get used in ..(). /mob/living/silicon/robot/drone/attackby(var/obj/item/W, var/mob/user) - if(user.a_intent == "help" && istype(W, /obj/item/clothing/head)) + if(user.a_intent == I_HELP && istype(W, /obj/item/clothing/head)) if(hat) to_chat(user, span_warning("\The [src] is already wearing \the [hat].")) return diff --git a/code/modules/mob/living/silicon/robot/drone/drone_abilities.dm b/code/modules/mob/living/silicon/robot/drone/drone_abilities.dm index 3a4bf3e0e2..d243138b31 100644 --- a/code/modules/mob/living/silicon/robot/drone/drone_abilities.dm +++ b/code/modules/mob/living/silicon/robot/drone/drone_abilities.dm @@ -25,7 +25,7 @@ var/mob/living/carbon/human/H = over_object if(!istype(H) || !Adjacent(H)) return ..() - if(H.a_intent == "grab" && hat && !(H.l_hand && H.r_hand)) + if(H.a_intent == I_GRAB && hat && !(H.l_hand && H.r_hand)) H.put_in_hands(hat) H.visible_message(span_danger("\The [H] removes \the [src]'s [hat].")) hat = null diff --git a/code/modules/mob/living/simple_mob/simple_hud.dm b/code/modules/mob/living/simple_mob/simple_hud.dm index fd1a79c440..63225d7b42 100644 --- a/code/modules/mob/living/simple_mob/simple_hud.dm +++ b/code/modules/mob/living/simple_mob/simple_hud.dm @@ -124,7 +124,7 @@ using = new /obj/screen() using.name = "mov_intent" using.icon = ui_style - using.icon_state = (m_intent == "run" ? "running" : "walking") + using.icon_state = (m_intent == I_RUN ? "running" : "walking") using.screen_loc = ui_movi using.color = ui_color using.alpha = ui_alpha diff --git a/code/modules/mob/living/simple_mob/simple_mob.dm b/code/modules/mob/living/simple_mob/simple_mob.dm index 8daa5dd31a..b2a61880b5 100644 --- a/code/modules/mob/living/simple_mob/simple_mob.dm +++ b/code/modules/mob/living/simple_mob/simple_mob.dm @@ -279,7 +279,7 @@ . = 1 . *= purge - if(m_intent == "walk") + if(m_intent == I_WALK) . *= 1.5 // VOREStation Edit Start diff --git a/code/modules/mob/living/simple_mob/subtypes/animal/pets/fox_vr.dm b/code/modules/mob/living/simple_mob/subtypes/animal/pets/fox_vr.dm index 8ae49ab9da..f6a42c210d 100644 --- a/code/modules/mob/living/simple_mob/subtypes/animal/pets/fox_vr.dm +++ b/code/modules/mob/living/simple_mob/subtypes/animal/pets/fox_vr.dm @@ -87,7 +87,7 @@ var/mob/living/carbon/H = over_object if(!istype(H) || !Adjacent(H)) return ..() - if(H.a_intent == "help") + if(H.a_intent == I_HELP) get_scooped(H) return else diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index 1b06902325..3c21cf1712 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -118,7 +118,7 @@ var/shakecamera = 0 var/a_intent = I_HELP//Living var/m_int = null//Living - var/m_intent = "run"//Living + var/m_intent = I_RUN//Living var/lastKnownIP = null var/obj/buckled = null//Living diff --git a/code/modules/mob/mob_helpers.dm b/code/modules/mob/mob_helpers.dm index a384f755b5..fa39e3d4d5 100644 --- a/code/modules/mob/mob_helpers.dm +++ b/code/modules/mob/mob_helpers.dm @@ -340,7 +340,7 @@ var/list/intents = list(I_HELP,I_DISARM,I_GRAB,I_HURT) 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 diff --git a/code/modules/mob/mob_movement.dm b/code/modules/mob/mob_movement.dm index 0b10dc2c2a..3140461c47 100644 --- a/code/modules/mob/mob_movement.dm +++ b/code/modules/mob/mob_movement.dm @@ -13,11 +13,11 @@ // Movespeed delay based on movement mode switch(m_intent) - if("run") + if(I_RUN) if(drowsyness > 0) . += 6 . += CONFIG_GET(number/run_speed) - if("walk") + if(I_WALK) . += CONFIG_GET(number/walk_speed) /client/proc/client_dir(input, direction=-1) @@ -264,10 +264,10 @@ //drunk wheelchair driving else if(my_mob.confused) switch(my_mob.m_intent) - if("run") + if(I_RUN) if(prob(50)) direct = turn(direct, pick(90, -90)) - if("walk") + if(I_WALK) if(prob(25)) direct = turn(direct, pick(90, -90)) total_delay += 3 @@ -279,11 +279,11 @@ // Confused direction randomization if(my_mob.confused) switch(my_mob.m_intent) - if("run") + if(I_RUN) if(prob(75)) direct = turn(direct, pick(90, -90)) n = get_step(my_mob, direct) - if("walk") + if(I_WALK) if(prob(25)) direct = turn(direct, pick(90, -90)) n = get_step(my_mob, direct) diff --git a/code/modules/organs/internal/intestine.dm b/code/modules/organs/internal/intestine.dm index ed5319fb27..50cb2cf692 100644 --- a/code/modules/organs/internal/intestine.dm +++ b/code/modules/organs/internal/intestine.dm @@ -16,7 +16,7 @@ if (. >= 2) if(prob(1)) owner.custom_pain("Your abdomen feels like it's tearing itself apart!",1) - owner.m_intent = "walk" + owner.m_intent = I_WALK owner.hud_used.move_intent.icon_state = "walking" /obj/item/organ/internal/intestine/xeno diff --git a/code/modules/organs/internal/kidneys.dm b/code/modules/organs/internal/kidneys.dm index daf9954b03..141d249d57 100644 --- a/code/modules/organs/internal/kidneys.dm +++ b/code/modules/organs/internal/kidneys.dm @@ -38,7 +38,7 @@ if (. >= 2) if(prob(1)) owner.custom_pain("You feel extremely tired, like you can't move!",1) - owner.m_intent = "walk" + owner.m_intent = I_WALK owner.hud_used.move_intent.icon_state = "walking" /obj/item/organ/internal/kidneys/grey diff --git a/code/modules/projectiles/targeting/targeting_mob.dm b/code/modules/projectiles/targeting/targeting_mob.dm index 17aa15eed7..b6796c6ee9 100644 --- a/code/modules/projectiles/targeting/targeting_mob.dm +++ b/code/modules/projectiles/targeting/targeting_mob.dm @@ -58,9 +58,9 @@ trigger_aiming(TARGET_CAN_MOVE) /mob/living/proc/set_m_intent(var/intent) - if (intent != "walk" && intent != "run") + if (intent != I_WALK && intent != I_RUN) return 0 m_intent = intent if(hud_used) if (hud_used.move_intent) - hud_used.move_intent.icon_state = intent == "walk" ? "walking" : "running" + hud_used.move_intent.icon_state = intent == I_WALK ? "walking" : "running" diff --git a/code/modules/vore/eating/stumblevore_vr.dm b/code/modules/vore/eating/stumblevore_vr.dm index 992bc1712c..2cd19da9ce 100644 --- a/code/modules/vore/eating/stumblevore_vr.dm +++ b/code/modules/vore/eating/stumblevore_vr.dm @@ -14,14 +14,14 @@ /mob/living/Bump(atom/movable/AM) //. = ..() if(istype(AM, /mob/living)) - if(buckled != AM && (((confused || is_blind()) && stat == CONSCIOUS && prob(50) && m_intent=="run") || flying && flight_vore)) + if(buckled != AM && (((confused || is_blind()) && stat == CONSCIOUS && prob(50) && m_intent==I_RUN) || flying && flight_vore)) AM.stumble_into(src) return ..() // Because flips toggle density /mob/living/Crossed(var/atom/movable/AM) if(istype(AM, /mob/living) && isturf(loc) && AM != src) var/mob/living/AMV = AM - if(AMV.buckled != src && (((AMV.confused || AMV.is_blind()) && AMV.stat == CONSCIOUS && prob(50) && AMV.m_intent=="run") || AMV.flying && AMV.flight_vore)) + if(AMV.buckled != src && (((AMV.confused || AMV.is_blind()) && AMV.stat == CONSCIOUS && prob(50) && AMV.m_intent==I_RUN) || AMV.flying && AMV.flight_vore)) stumble_into(AMV) ..() diff --git a/code/modules/vore/resizing/resize_vr.dm b/code/modules/vore/resizing/resize_vr.dm index 80ae9f8b72..39e411d835 100644 --- a/code/modules/vore/resizing/resize_vr.dm +++ b/code/modules/vore/resizing/resize_vr.dm @@ -357,7 +357,7 @@ equip_to_slot_if_possible(prey.get_scooped(pred), slot_shoes, 0, 1) add_attack_logs(pred, prey, "Grabbed underfoot ([tail ? "taur" : "nontaur"], no shoes)") - if(m_intent == "run") + if(m_intent == I_RUN) switch(a_intent) if(I_DISARM) message_pred = "You quickly push [prey] to the ground with your foot!" diff --git a/maps/gateway_archive_vr/labyrinth.dm b/maps/gateway_archive_vr/labyrinth.dm index 98eab828a1..7290806b9a 100644 --- a/maps/gateway_archive_vr/labyrinth.dm +++ b/maps/gateway_archive_vr/labyrinth.dm @@ -217,7 +217,7 @@ // speak = list("HONK", "Honk!") // emote_hear = list("honks") // speak_chance = 1 - a_intent = "harm" + a_intent = I_HURT var/corpse = /obj/effect/landmark/mobcorpse/tunnelclown var/weapon1 = /obj/item/material/twohanded/fireaxe stop_when_pulled = 0 @@ -283,7 +283,7 @@ response_harm = "euthanizes" // speak = list("HONK!", "Honk!", "H-Honk...", "Honk... Please...","Kill me... Honk.", "It hurts to live... Honk...","The pain... HONK!") // emote_hear = list("honks", "wheeps","sobs","whimpers","honks uncontrollably") - a_intent = "harm" + a_intent = I_HURT stop_when_pulled = 0 maxHealth = 10 health = 10