This commit is contained in:
Joachim Stolberg 2019-01-20 10:32:07 +01:00
parent c0b30d88b9
commit f9309286bb
3 changed files with 26 additions and 9 deletions

@ -1,6 +1,21 @@
# Release Notes for ModPack TechPack [techpack]
## V2.00.04 (2019-01-20)
### Additions
### Removals
### Changes
### Fixes
- SaferLua-Controller: Lua error messages bugfix
- SmartLine Server: data base was shared between several severs
## V2.00.03 (2019-01-19)
### Additions

@ -240,12 +240,14 @@ local function patch_error_string(err, line_offs)
local tbl = {}
for s in err:gmatch("[^\r\n]+") do
if s:find("loop:(%d+):") then
local prefix, line, err = s:match("(.+)loop:(%d+):(.+)")
if tonumber(line) < line_offs then
table.insert(tbl, prefix.."func:"..line..":"..err)
else
line = tonumber(line) - line_offs
table.insert(tbl, prefix.."loop:"..line..":"..err)
local prefix, line, err = s:match("(.-)loop:(%d+):(.+)")
if prefix and line and err then
if tonumber(line) < line_offs then
table.insert(tbl, prefix.."func:"..line..":"..err)
else
line = tonumber(line) - line_offs
table.insert(tbl, prefix.."loop:"..line..":"..err)
end
end
else
table.insert(tbl, s)

@ -25,7 +25,7 @@ local DEFAULT_MEM = {
local function on_time(pos, elasped)
local meta = minetest.get_meta(pos)
local number = meta:get_string("number")
local mem = tubelib.get_data(number, "memory") or DEFAULT_MEM
local mem = tubelib.get_data(number, "memory") or table.copy(DEFAULT_MEM)
meta:set_string("infotext", "Server "..number..": ("..(mem.size or 0).."/"..SERVER_CAPA..")")
return true
end
@ -64,7 +64,7 @@ minetest.register_node("sl_controller:server", {
local number = tubelib.add_node(pos, "sl_controller:server")
meta:set_string("owner", placer:get_player_name())
meta:set_string("number", number)
tubelib.set_data(number, "memory", DEFAULT_MEM)
tubelib.set_data(number, "memory", table.copy(DEFAULT_MEM))
on_time(pos, 0)
minetest.get_node_timer(pos):start(20)
end,
@ -139,7 +139,7 @@ tubelib.register_node("sl_controller:server", {}, {
local meta = minetest.get_meta(pos)
if meta then
local number = meta:get_string("number")
local mem = tubelib.get_data(number, "memory") or DEFAULT_MEM
local mem = tubelib.get_data(number, "memory") or table.copy(DEFAULT_MEM)
if topic == "read" then
return read_value(mem, payload)
elseif topic == "write" then