Implementing movement system flags, fixing simplemob movement delays.

This commit is contained in:
MistakeNot4892
2023-03-12 01:22:03 +11:00
parent 1b3d9ea87f
commit db1a97868d
11 changed files with 63 additions and 22 deletions
@@ -2,6 +2,7 @@
name = "observer"
desc = "This shouldn't appear"
density = 0
move_intents = list(/decl/move_intent/no_delay)
/mob/observer/dead
name = "ghost"
@@ -17,6 +17,11 @@
has_huds = TRUE // We do show AI status huds for buildmode players
move_intents = list(
/decl/move_intent/animal_run,
/decl/move_intent/animal_walk
)
var/tt_desc = null //Tooltip description
//Settings for played mobs
@@ -225,17 +230,17 @@
return ..()
*/
/mob/living/simple_mob/movement_delay()
. = movement_cooldown
if(force_max_speed)
return -3
. = 0
for(var/datum/modifier/M in modifiers)
if(!isnull(M.haste) && M.haste == TRUE)
return -3
if(!isnull(M.slowdown))
. += M.slowdown
. += ..() + movement_cooldown
// Turf related slowdown
var/turf/T = get_turf(src)
if(T && T.get_movement_cost() && !hovering) // Flying mobs ignore turf-based slowdown. Aquatic mobs ignore water slowdown, and can gain bonus speed in it.
@@ -252,8 +257,6 @@
if(IS_WALKING(src))
. *= 1.5
. += config.animal_delay
. += ..()
+1 -1
View File
@@ -34,7 +34,7 @@
zone_sel = null
/mob/Initialize()
move_intent = GET_DECL(/decl/move_intent/run) // Sets the initial move_intent.
move_intent = GET_DECL(move_intents[1]) // Sets the initial move_intent.
mob_list += src
if(stat == DEAD)
dead_mob_list += src