mirror of
https://github.com/peter-tanner/spidertron-squad-control.git
synced 2024-11-30 11:00:17 +08:00
18 lines
563 B
Lua
18 lines
563 B
Lua
--[[ Copyright (c) 2020 npc_strider
|
|
* For direct use of code or graphics, credit is appreciated. See LICENSE.txt for more information.
|
|
* This mod may contain modified code sourced from base/core Factorio
|
|
*
|
|
* control/entity_follow.lua
|
|
* Runs periodically to designate commands for each linked squad to move to the target entity's position.
|
|
--]]
|
|
|
|
require("control.2dvec")
|
|
|
|
function UpdateFollowEntity()
|
|
local links = global.spidercontrol_linked_s
|
|
for i = 1, #links do
|
|
if (#links[i].s > 0) then
|
|
GotoEntity(i)
|
|
end
|
|
end
|
|
end |