2005-01-08 00:48:11 +01:00
|
|
|
if gate_travel==nil then
|
2005-01-08 12:40:14 +01:00
|
|
|
dofile(scriptpath .. "/gates.lua")
|
2005-01-08 00:48:11 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
buildings = {}
|
|
|
|
|
|
|
|
function portal_exchange(b1, param)
|
2005-01-13 13:42:36 +01:00
|
|
|
id = buildings[param]
|
|
|
|
if id == nil then
|
|
|
|
buildings[param] = b1.id
|
2005-01-08 00:48:11 +01:00
|
|
|
else
|
2005-01-13 13:42:36 +01:00
|
|
|
b2 = get_building(id)
|
2005-01-08 00:48:11 +01:00
|
|
|
u1 = gate_units(b1, 100)
|
|
|
|
u2 = gate_units(b2, 100)
|
|
|
|
gate_travel(b1, u2)
|
|
|
|
gate_travel(b2, u1)
|
|
|
|
end
|
|
|
|
return 1
|
|
|
|
end
|