mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-18 18:44:48 +01:00
Adds movement intents
This commit is contained in:
@@ -273,7 +273,7 @@ Des: Removes all infected images from the alien.
|
||||
if(T.footstep_sounds["xeno"])
|
||||
var/S = pick(T.footstep_sounds["xeno"])
|
||||
if(S)
|
||||
if(m_intent == "run")
|
||||
if(m_intent == MOVE_INTENT_RUN)
|
||||
if(!(step_count % 2)) //every other turf makes a sound
|
||||
return 0
|
||||
|
||||
@@ -281,7 +281,7 @@ Des: Removes all infected images from the alien.
|
||||
range -= 0.666 //-(7 - 2) = (-5) = -5 | -5 - (0.666) = -5.666 | (7 + -5.666) = 1.334 | 1.334 * 3 = 4.002 | range(4.002) = range(4)
|
||||
var/volume = 5
|
||||
|
||||
if(m_intent == "walk")
|
||||
if(m_intent == MOVE_INTENT_WALK)
|
||||
return 0 //silent when walking
|
||||
|
||||
if(buckled || lying || throwing)
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
|
||||
/mob/living/carbon/alien/humanoid/hunter/handle_environment()
|
||||
if(m_intent == "run" || resting)
|
||||
if(m_intent == MOVE_INTENT_RUN || resting)
|
||||
..()
|
||||
else
|
||||
adjustPlasma(-heal_rate)
|
||||
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
else if(lying || resting)
|
||||
icon_state = "alien[caste]_sleep"
|
||||
else if(m_intent == "run")
|
||||
else if(m_intent == MOVE_INTENT_RUN)
|
||||
icon_state = "alien[caste]_running"
|
||||
else
|
||||
icon_state = "alien[caste]_s"
|
||||
|
||||
@@ -34,9 +34,9 @@
|
||||
if(.)
|
||||
if(nutrition && stat != DEAD)
|
||||
nutrition -= hunger_drain / 10
|
||||
if(m_intent == "run")
|
||||
if(m_intent == MOVE_INTENT_RUN)
|
||||
nutrition -= hunger_drain / 10
|
||||
if((FAT in mutations) && m_intent == "run" && bodytemperature <= 360)
|
||||
if((FAT in mutations) && m_intent == MOVE_INTENT_RUN && bodytemperature <= 360)
|
||||
bodytemperature += 2
|
||||
|
||||
// Moving around increases germ_level faster
|
||||
@@ -936,7 +936,7 @@ var/list/ventcrawl_machinery = list(/obj/machinery/atmospherics/unary/vent_pump,
|
||||
|
||||
|
||||
/mob/living/carbon/proc/slip(var/description, var/stun, var/weaken, var/tilesSlipped, var/walkSafely, var/slipAny)
|
||||
if(flying || buckled || (walkSafely && m_intent == "walk"))
|
||||
if(flying || buckled || (walkSafely && m_intent == MOVE_INTENT_WALK))
|
||||
return 0
|
||||
if((lying) && (!(tilesSlipped)))
|
||||
return 0
|
||||
|
||||
@@ -47,12 +47,12 @@
|
||||
if(T.footstep_sounds["human"])
|
||||
var/S = pick(T.footstep_sounds["human"])
|
||||
if(S)
|
||||
if(m_intent == "run")
|
||||
if(m_intent == MOVE_INTENT_RUN)
|
||||
if(!(step_count % 2)) //every other turf makes a sound
|
||||
return 0
|
||||
|
||||
var/range = -(world.view - 2)
|
||||
if(m_intent == "walk")
|
||||
if(m_intent == MOVE_INTENT_WALK)
|
||||
range -= 0.333
|
||||
if(!shoes)
|
||||
range -= 0.333
|
||||
@@ -65,7 +65,7 @@
|
||||
//-(7 - 2) = (-5) = -5 | -5 - (0.333 * 2) = -5.666 | (7 + -5.666) = 1.334 | 1.334 * 3 = 4.002 | range(4.002) = range(4)
|
||||
|
||||
var/volume = 13
|
||||
if(m_intent == "walk")
|
||||
if(m_intent == MOVE_INTENT_WALK)
|
||||
volume -= 4
|
||||
if(!shoes)
|
||||
volume -= 4
|
||||
@@ -91,4 +91,4 @@
|
||||
playsound(T, S, volume, 1, range)
|
||||
return 1
|
||||
|
||||
return 0
|
||||
return 0
|
||||
|
||||
@@ -1092,8 +1092,8 @@ var/global/list/damage_icon_parts = list()
|
||||
if(legcuffed)
|
||||
overlays_standing[LEGCUFF_LAYER] = image("icon" = 'icons/mob/mob.dmi', "icon_state" = "legcuff1")
|
||||
throw_alert("legcuffed", /obj/screen/alert/restrained/legcuffed, new_master = legcuffed)
|
||||
if(m_intent != "walk")
|
||||
m_intent = "walk"
|
||||
if(m_intent != MOVE_INTENT_WALK)
|
||||
m_intent = MOVE_INTENT_WALK
|
||||
if(hud_used && hud_used.move_intent)
|
||||
hud_used.move_intent.icon_state = "walking"
|
||||
|
||||
|
||||
@@ -937,11 +937,11 @@
|
||||
. += config.run_speed
|
||||
else
|
||||
switch(m_intent)
|
||||
if("run")
|
||||
if(MOVE_INTENT_RUN)
|
||||
if(drowsyness > 0)
|
||||
. += 6
|
||||
. += config.run_speed
|
||||
if("walk")
|
||||
if(MOVE_INTENT_WALK)
|
||||
. += config.walk_speed
|
||||
|
||||
|
||||
|
||||
@@ -76,7 +76,7 @@
|
||||
var/intent = null//Living
|
||||
var/shakecamera = 0
|
||||
var/a_intent = INTENT_HELP//Living
|
||||
var/m_intent = "run"//Living
|
||||
var/m_intent = MOVE_INTENT_RUN//Living
|
||||
var/lastKnownIP = null
|
||||
var/atom/movable/buckled = null//Living
|
||||
var/obj/item/l_hand = null//Living
|
||||
@@ -196,5 +196,5 @@
|
||||
var/list/permanent_huds = list()
|
||||
|
||||
var/list/actions = list()
|
||||
|
||||
|
||||
var/list/progressbars = null //for stacking do_after bars
|
||||
|
||||
Reference in New Issue
Block a user