6 Commits

Author SHA1 Message Date
6d278538a9 Merge remote-tracking branch 'upstream/master' into dev 2020-08-08 10:14:25 +02:00
4d7508ae70 Recompress the textures
This reduces the PNG file sizes and fixes the invalid sRGB profile warnings.
I have additionally reduced the moremesecons_luablock.png resolution to 32x32.
2020-08-07 20:53:37 +02:00
67875f9c6e Fix bug allowing timegate duplication
Fixes #13
2020-05-10 10:09:34 +02:00
de765f7f7b LuaBlock: run in separate environment, add a "mem" table 2020-05-09 13:18:44 +02:00
7ba7a5cceb MapDataStorage: replace "%a" format with "%.17g" 2020-04-29 18:06:17 +02:00
23b96b9db6 Ajoute messages de chargement des mods dans le journal "action" 2018-12-31 17:26:41 +01:00
54 changed files with 71 additions and 20 deletions

View File

@ -64,3 +64,5 @@ minetest.register_craft({
recipe = { {"mesecons_blinkyplant:blinky_plant_off"},
{"default:mese_crystal_fragment"},}
})
minetest.log("action", "[moremesecons_adjustable_blinky_plant] loaded.")

Binary file not shown.

Before

Width:  |  Height:  |  Size: 361 B

After

Width:  |  Height:  |  Size: 360 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 237 B

After

Width:  |  Height:  |  Size: 237 B

View File

@ -156,3 +156,5 @@ minetest.register_abm({
end
end,
})
minetest.log("action", "[moremesecons_adjustable_player_detector] loaded.")

Binary file not shown.

Before

Width:  |  Height:  |  Size: 624 B

After

Width:  |  Height:  |  Size: 622 B

View File

@ -172,3 +172,5 @@ minetest.register_craft({
{"group:mesecon_conductor_craftable","default:mese_crystal","group:mesecon_conductor_craftable"}
}
})
minetest.log("action", "[moremesecons_commandblock] loaded.")

View File

@ -79,3 +79,5 @@ minetest.register_craft({
output = "moremesecons_conductor_signalchanger:conductor_signalchanger_off",
recipe = {{"group:mesecon_conductor_craftable","moremesecons_signalchanger:signalchanger_off"}}
})
minetest.log("action", "[moremesecons_conductor_signalchanger] loaded.")

Binary file not shown.

Before

Width:  |  Height:  |  Size: 161 B

After

Width:  |  Height:  |  Size: 112 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 158 B

After

Width:  |  Height:  |  Size: 112 B

View File

@ -93,3 +93,5 @@ minetest.register_craft({
output = "moremesecons_dual_delayer:dual_delayer_00 2",
recipe = {"mesecons_delayer:delayer_off_1", "mesecons_delayer:delayer_off_1"}
})
minetest.log("action", "[moremesecons_dual_delayer] loaded.")

Binary file not shown.

Before

Width:  |  Height:  |  Size: 129 B

After

Width:  |  Height:  |  Size: 99 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 189 B

After

Width:  |  Height:  |  Size: 142 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 B

After

Width:  |  Height:  |  Size: 78 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 77 B

After

Width:  |  Height:  |  Size: 77 B

View File

@ -139,3 +139,5 @@ minetest.register_abm({
end
end,
})
minetest.log("action", "[moremesecons_entity_detector] loaded.")

Binary file not shown.

Before

Width:  |  Height:  |  Size: 554 B

After

Width:  |  Height:  |  Size: 554 B

View File

@ -46,3 +46,5 @@ minetest.register_craft({
recipe = { {"default:torch"},
{"default:mese_crystal_fragment"},}
})
minetest.log("action", "[moremesecons_igniter] loaded.")

Binary file not shown.

Before

Width:  |  Height:  |  Size: 696 B

After

Width:  |  Height:  |  Size: 674 B

View File

@ -102,3 +102,5 @@ minetest.register_craft({
{"", "default:mese_crystal_fragment", ""}
}
})
minetest.log("action", "[moremesecons_induction_transmitter] loaded.")

View File

@ -82,3 +82,5 @@ minetest.register_craft({
output = "moremesecons_injector_controller:injector_controller_off",
recipe = {{"mesecons_blinkyplant:blinky_plant_off","mesecons_gates:and_off"}}
})
minetest.log("action", "[moremesecons_injector_controller] loaded.")

View File

@ -131,3 +131,5 @@ if moremesecons.setting("jammer", "enable_lbm", false) then
action = add_jammer
})
end
minetest.log("action", "[moremesecons_jammer] loaded.")

Binary file not shown.

Before

Width:  |  Height:  |  Size: 100 B

After

Width:  |  Height:  |  Size: 100 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 112 B

After

Width:  |  Height:  |  Size: 112 B

View File

@ -120,25 +120,30 @@ minetest.register_node("moremesecons_luablock:luablock", {
minetest.log("warning", "[moremesecons_luablock] Metadata of LuaBlock at pos "..minetest.pos_to_string(npos).." does not match its mod storage data!")
return
end
-- We do absolutely no check there.
-- There is no limitation in the number of instruction the LuaBlock can execute
-- or the usage it can make of loops.
-- It is executed in the global namespace.
-- Remember: *The LuaBlock is highly dangerous and should be manipulated cautiously!*
local func, err = loadstring(code)
local env = {}
for k, v in pairs(_G) do
env[k] = v
end
env.pos = table.copy(npos)
env.mem = minetest.deserialize(meta:get_string("mem")) or {}
local func, err
if _VERSION == "Lua 5.1" then
func, err = loadstring(code)
if func then
setfenv(func, env)
end
else
func, err = load(code, nil, "t", env)
end
if not func then
meta:set_string("errmsg", err)
make_formspec(meta, pos)
return
end
-- Set the "pos" global
local old_pos
if minetest.global_exists("pos") then
old_pos = pos -- In case there's already an existing "pos" global
end
pos = table.copy(npos)
local good, err = pcall(func)
pos = old_pos
if not good then -- Runtime error
meta:set_string("errmsg", err)
@ -146,8 +151,12 @@ minetest.register_node("moremesecons_luablock:luablock", {
return
end
meta:set_string("mem", minetest.serialize(env.mem))
meta:set_string("errmsg", "")
make_formspec(meta, pos)
end
}}
})
minetest.log("action", "[moremesecons_luablock] loaded.")

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@ -352,3 +352,5 @@ minetest.register_on_player_receive_fields(function(player, formname, fields)
return
end
end)
minetest.log("action", "[moremesecons_luacontroller_tool] loaded.")

Binary file not shown.

Before

Width:  |  Height:  |  Size: 290 B

After

Width:  |  Height:  |  Size: 227 B

View File

@ -116,3 +116,5 @@ minetest.register_craft({
output = "default:mesechest_locked",
recipe = {{"group:mesecon_conductor_craftable", "default:chest_locked", "group:mesecon_conductor_craftable"}}
})
minetest.log("action", "[moremesecons_mesechest] loaded.")

View File

@ -60,3 +60,5 @@ minetest.register_node("moremesecons_playerkiller:playerkiller", {
end,
sounds = default.node_sound_stone_defaults(),
})
minetest.log("action", "[moremesecons_playerkiller] loaded.")

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 454 B

View File

@ -121,3 +121,5 @@ minetest.register_craft({
recipe = {{"mesecons_luacontroller:luacontroller0000", "mesecons_noteblock:noteblock"},
{"group:wood", "group:wood"}}
})
minetest.log("action", "[moremesecons_sayer] loaded.")

View File

@ -79,3 +79,5 @@ minetest.register_craft({
output = "moremesecons_signalchanger:signalchanger_off",
recipe = {{"group:mesecon_conductor_craftable","moremesecons_switchtorch:switchtorch_off","group:mesecon_conductor_craftable"}}
})
minetest.log("action", "[moremesecons_signalchanger] loaded.")

Binary file not shown.

Before

Width:  |  Height:  |  Size: 158 B

After

Width:  |  Height:  |  Size: 112 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 159 B

After

Width:  |  Height:  |  Size: 112 B

View File

@ -127,3 +127,5 @@ minetest.register_abm({
-- 2 = x+1
-- 0 = y+1
-- 1 = y-1
minetest.log("action", "[moremesecons_switchtorch] loaded.")

Binary file not shown.

Before

Width:  |  Height:  |  Size: 119 B

After

Width:  |  Height:  |  Size: 119 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 111 B

After

Width:  |  Height:  |  Size: 111 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 110 B

After

Width:  |  Height:  |  Size: 110 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 116 B

After

Width:  |  Height:  |  Size: 116 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 118 B

After

Width:  |  Height:  |  Size: 118 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 114 B

After

Width:  |  Height:  |  Size: 114 B

View File

@ -106,3 +106,5 @@ if moremesecons.setting("teleporter", "enable_lbm", false) then
action = register
})
end
minetest.log("action", "[moremesecons_teleporter] loaded.")

View File

@ -25,11 +25,14 @@ local function timegate_activate(pos, node)
node.name = "moremesecons_timegate:timegate_on"
minetest.swap_node(pos, node)
mesecon.receptor_on(pos)
minetest.after(time, function(pos, node)
mesecon.receptor_off(pos)
node.name = "moremesecons_timegate:timegate_off"
minetest.swap_node(pos, node)
end, pos, node)
minetest.after(time, function()
local node = minetest.get_node(pos)
if node.name == "moremesecons_timegate:timegate_on" then
mesecon.receptor_off(pos)
node.name = "moremesecons_timegate:timegate_off"
minetest.swap_node(pos, node)
end
end)
end
boxes = {{ -6/16, -8/16, -6/16, 6/16, -7/16, 6/16 }, -- the main slab
@ -125,3 +128,5 @@ minetest.register_craft({
minetest.register_alias("moremesecons_temporarygate:temporarygate_off", "moremesecons_timegate:timegate_off")
minetest.register_alias("moremesecons_temporarygate:temporarygate_on", "moremesecons_timegate:timegate_on")
minetest.log("action", "[moremesecons_timegate] loaded.")

Binary file not shown.

Before

Width:  |  Height:  |  Size: 170 B

After

Width:  |  Height:  |  Size: 169 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 171 B

After

Width:  |  Height:  |  Size: 170 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 361 B

After

Width:  |  Height:  |  Size: 361 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 164 B

After

Width:  |  Height:  |  Size: 163 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 169 B

After

Width:  |  Height:  |  Size: 168 B

View File

@ -240,7 +240,7 @@ MapDataStorage.__index = {
local vi = node_position_key(pos)
-- Convert the double reversible to a string;
-- minetest.serialize does not (yet) do this
indices[i] = ("%a"):format(vi)
indices[i] = ("%.17g"):format(vi)
values[i] = v
end
result = {
@ -377,5 +377,6 @@ local function do_test()
--~ data:iterAll()
end
--~ do_test()
--~ do_test()
minetest.log("action", "[moremesecons_utils] loaded.")

View File

@ -484,3 +484,5 @@ if storage:get_string("wireless_meta_2") == "" then
end
minetest.log("action", "[moremesecons_wireless] Done!")
end
minetest.log("action", "[moremesecons_wireless] loaded.")

Binary file not shown.

Before

Width:  |  Height:  |  Size: 170 B

After

Width:  |  Height:  |  Size: 170 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 591 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 592 B