Station traits

This commit is contained in:
Putnam3145
2021-12-08 16:17:35 -08:00
parent 6659f8c585
commit 629ce5bea6
94 changed files with 1518 additions and 170 deletions
+5 -3
View File
@@ -82,12 +82,14 @@
var/move_delay = 2
var/last_move = 0
/datum/component/twitch_plays/simple_movement/auto/Initialize(...)
/datum/component/twitch_plays/simple_movement/auto/Initialize(move_delay)
if(!ismovable(parent))
return COMPONENT_INCOMPATIBLE
. = ..()
if(. & COMPONENT_INCOMPATIBLE)
return
if(!isnull(move_delay))
src.move_delay = move_delay
START_PROCESSING(SSfastprocess, src)
/datum/component/twitch_plays/simple_movement/auto/Destroy(force, silent)
@@ -95,10 +97,10 @@
return ..()
/datum/component/twitch_plays/simple_movement/auto/process()
if(world.time < (last_move + move_delay))
return
var/dir = fetch_data(null, TRUE)
if(!dir)
return
if(world.time < (last_move + move_delay))
return
last_move = world.time
step(parent, dir)