some debug output while this is new

This commit is contained in:
Enno Rehling 2008-05-30 21:09:19 +00:00
parent 8656b2323b
commit 153766ab70
1 changed files with 7 additions and 3 deletions

View File

@ -30,16 +30,20 @@ end
-- export, will be called from lc_age()
function tunnel_action(b, param)
local r = nil
print("Tunnel from " .. b .. " [" .. param .. "]")
if tonumber(param)~=nil then
r = get_region_by_id(tonumber(param))
end
if r~=nil then
local units = tunnel_travelers(b)
for key, u in pairs(units) do
local rto = r
if r==nil then
u.region = get_target(param)
else
u.region = r
rto = get_target(param)
end
if rto~=nil then
u.region = rto
print(" - teleported " .. u .. " to " .. rto)
end
end
end