Fix bugs
parent
1a9350c49c
commit
69c9f04b4a
|
@ -188,7 +188,7 @@ end
|
|||
|
||||
function networks.liquid.srv_put(nvm, name, amount, capa)
|
||||
assert(name)
|
||||
assert(amount and amount > 0)
|
||||
assert(amount and amount >= 0)
|
||||
assert(capa and capa > 0)
|
||||
|
||||
nvm.liquid = nvm.liquid or {}
|
||||
|
@ -212,7 +212,7 @@ function networks.liquid.srv_put(nvm, name, amount, capa)
|
|||
end
|
||||
|
||||
function networks.liquid.srv_take(nvm, name, amount)
|
||||
assert(amount and amount > 0)
|
||||
assert(amount and amount >= 0)
|
||||
|
||||
nvm.liquid = nvm.liquid or {}
|
||||
amount = amount or 0
|
||||
|
|
|
@ -489,10 +489,16 @@ function networks.determine_netID(pos, tlib2, outdir)
|
|||
end
|
||||
|
||||
-- Provide network with all node tables
|
||||
function networks.get_network_table(pos, tlib2, outdir)
|
||||
function networks.get_network_table(pos, tlib2, outdir, force)
|
||||
assert(outdir)
|
||||
local netID = get_netID(pos, outdir)
|
||||
if netID then
|
||||
return get_network(tlib2.tube_type, netID)
|
||||
end
|
||||
if force then -- force the network load
|
||||
local netID = networks.determine_netID(pos, tlib2, outdir)
|
||||
if netID then
|
||||
return get_network(tlib2.tube_type, netID)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue