server/src/scripts/gates.lua

13 lines
270 B
Lua
Raw Normal View History

2005-01-03 22:28:57 +01:00
function gate_exchange(b1, units1, b2, units2)
-- we've found which units we want to exchange, now swap them:
local u
for u in units1 do
u.region = b2.region
u.building = b2
end
for u in units2 do
u.region = b1.region
u.building = b1
end
end