Component processing subsystem (#19506)

Moves component processing to a subsystem, rather than have to trawl through life and add something to fire it each time in every override that doesn't call the parent.
This commit is contained in:
MadmanMartian
2018-08-31 14:33:52 +01:00
committed by jknpj
parent f3f908ca96
commit 3e6e7f1cee
9 changed files with 66 additions and 4 deletions

View File

@@ -25,10 +25,10 @@
target = args["loc"]
movement_nodes = AStar(M, target, /turf/proc/AdjacentTurfsSpace, /turf/proc/Distance, 0, 30, id=M.get_visible_id())
if("dir" in args)
movement_nodes.Cut()
movement_nodes = list()
walk(M, args["dir"], walk_delay)
if(message_type == COMSIG_LIFE)
if(movement_nodes.len && target && (target != null))
if(movement_nodes && movement_nodes.len && target && (target != null))
if(movement_nodes.len > 0)
step_to(M, movement_nodes[1])
movement_nodes -= movement_nodes[1]