mirror of
https://github.com/joe7575/techpack.git
synced 2024-11-29 18:43:53 +01:00
bugfixes
This commit is contained in:
parent
c0b30d88b9
commit
f9309286bb
@ -1,6 +1,21 @@
|
|||||||
# Release Notes for ModPack TechPack [techpack]
|
# 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)
|
## V2.00.03 (2019-01-19)
|
||||||
|
|
||||||
### Additions
|
### Additions
|
||||||
|
@ -240,12 +240,14 @@ local function patch_error_string(err, line_offs)
|
|||||||
local tbl = {}
|
local tbl = {}
|
||||||
for s in err:gmatch("[^\r\n]+") do
|
for s in err:gmatch("[^\r\n]+") do
|
||||||
if s:find("loop:(%d+):") then
|
if s:find("loop:(%d+):") then
|
||||||
local prefix, line, err = s:match("(.+)loop:(%d+):(.+)")
|
local prefix, line, err = s:match("(.-)loop:(%d+):(.+)")
|
||||||
if tonumber(line) < line_offs then
|
if prefix and line and err then
|
||||||
table.insert(tbl, prefix.."func:"..line..":"..err)
|
if tonumber(line) < line_offs then
|
||||||
else
|
table.insert(tbl, prefix.."func:"..line..":"..err)
|
||||||
line = tonumber(line) - line_offs
|
else
|
||||||
table.insert(tbl, prefix.."loop:"..line..":"..err)
|
line = tonumber(line) - line_offs
|
||||||
|
table.insert(tbl, prefix.."loop:"..line..":"..err)
|
||||||
|
end
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
table.insert(tbl, s)
|
table.insert(tbl, s)
|
||||||
|
@ -25,7 +25,7 @@ local DEFAULT_MEM = {
|
|||||||
local function on_time(pos, elasped)
|
local function on_time(pos, elasped)
|
||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
local number = meta:get_string("number")
|
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..")")
|
meta:set_string("infotext", "Server "..number..": ("..(mem.size or 0).."/"..SERVER_CAPA..")")
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
@ -64,7 +64,7 @@ minetest.register_node("sl_controller:server", {
|
|||||||
local number = tubelib.add_node(pos, "sl_controller:server")
|
local number = tubelib.add_node(pos, "sl_controller:server")
|
||||||
meta:set_string("owner", placer:get_player_name())
|
meta:set_string("owner", placer:get_player_name())
|
||||||
meta:set_string("number", number)
|
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)
|
on_time(pos, 0)
|
||||||
minetest.get_node_timer(pos):start(20)
|
minetest.get_node_timer(pos):start(20)
|
||||||
end,
|
end,
|
||||||
@ -139,7 +139,7 @@ tubelib.register_node("sl_controller:server", {}, {
|
|||||||
local meta = minetest.get_meta(pos)
|
local meta = minetest.get_meta(pos)
|
||||||
if meta then
|
if meta then
|
||||||
local number = meta:get_string("number")
|
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
|
if topic == "read" then
|
||||||
return read_value(mem, payload)
|
return read_value(mem, payload)
|
||||||
elseif topic == "write" then
|
elseif topic == "write" then
|
||||||
|
Loading…
Reference in New Issue
Block a user