mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-13 08:04:22 +01:00
intent cleanup (#16825)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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]!"),
|
||||
|
||||
@@ -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]!"))
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -279,7 +279,7 @@
|
||||
. = 1
|
||||
. *= purge
|
||||
|
||||
if(m_intent == "walk")
|
||||
if(m_intent == I_WALK)
|
||||
. *= 1.5
|
||||
|
||||
// VOREStation Edit Start
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user