forked from github/server
some debug output while this is new
This commit is contained in:
parent
8656b2323b
commit
153766ab70
1 changed files with 7 additions and 3 deletions
|
@ -30,16 +30,20 @@ end
|
||||||
-- export, will be called from lc_age()
|
-- export, will be called from lc_age()
|
||||||
function tunnel_action(b, param)
|
function tunnel_action(b, param)
|
||||||
local r = nil
|
local r = nil
|
||||||
|
print("Tunnel from " .. b .. " [" .. param .. "]")
|
||||||
if tonumber(param)~=nil then
|
if tonumber(param)~=nil then
|
||||||
r = get_region_by_id(tonumber(param))
|
r = get_region_by_id(tonumber(param))
|
||||||
end
|
end
|
||||||
if r~=nil then
|
if r~=nil then
|
||||||
local units = tunnel_travelers(b)
|
local units = tunnel_travelers(b)
|
||||||
for key, u in pairs(units) do
|
for key, u in pairs(units) do
|
||||||
|
local rto = r
|
||||||
if r==nil then
|
if r==nil then
|
||||||
u.region = get_target(param)
|
rto = get_target(param)
|
||||||
else
|
end
|
||||||
u.region = r
|
if rto~=nil then
|
||||||
|
u.region = rto
|
||||||
|
print(" - teleported " .. u .. " to " .. rto)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue