[minetest-mod-mesecons] 01/03: Imported Upstream version 2016.07.09
Julien Puydt
julien.puydt at laposte.net
Mon Jul 11 07:02:59 UTC 2016
This is an automated email from the git hooks/post-receive script.
jpuydt-guest pushed a commit to branch master
in repository minetest-mod-mesecons.
commit 4827b551e5358ade2b8bebddf3996659a6871d74
Author: Julien Puydt <julien.puydt at laposte.net>
Date: Mon Jul 11 08:59:34 2016 +0200
Imported Upstream version 2016.07.09
---
COPYING.txt | 30 ++++++++++++++++++++++++++++++
mesecons/services.lua | 4 ----
mesecons_commandblock/init.lua | 15 ++++++++++++++-
mesecons_luacontroller/init.lua | 7 ++++++-
mesecons_random/init.lua | 2 +-
5 files changed, 51 insertions(+), 7 deletions(-)
diff --git a/COPYING.txt b/COPYING.txt
new file mode 100644
index 0000000..61bf7e2
--- /dev/null
+++ b/COPYING.txt
@@ -0,0 +1,30 @@
+The Mesecons Mod for Minetest is
+ Copyright (C) 2011-2016 Mesecons Mod Developer Team and contributors
+
+See the version control system log for information about other authors.
+
+License of source code
+----------------------
+Copyright (C) 2011-2016 Mesecons Mod Developer Team and contributors
+
+This program is free software; you can redistribute the Mesecons Mod and/or
+modify it under the terms of the GNU Lesser General Public License version 3
+published by the Free Software Foundation.
+
+This library is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with this library; if not, write to the
+Free Software Foundation, Inc., 51 Franklin St, Fifth Floor,
+Boston, MA 02110-1301, USA.
+
+License of media (textures, sounds and documentation)
+-----------------------------------------------------
+Copyright (C) 2011-2016 Mesecons Mod Developer Team and contributors
+
+All textures, sounds and documentation files are licensed under the
+Attribution-ShareAlike 3.0 Unported (CC BY-SA 3.0)
+http://creativecommons.org/licenses/by-sa/3.0/
diff --git a/mesecons/services.lua b/mesecons/services.lua
index 5d0f81e..343410a 100644
--- a/mesecons/services.lua
+++ b/mesecons/services.lua
@@ -87,10 +87,6 @@ end
mesecon.queue:add_function("cooldown", function (pos)
- if minetest.get_item_group(minetest.get_node(pos).name, "overheat") == 0 then
- return -- node has been moved, this one does not use overheating - ignore
- end
-
local meta = minetest.get_meta(pos)
local heat = meta:get_int("heat")
diff --git a/mesecons_commandblock/init.lua b/mesecons_commandblock/init.lua
index b1a0c6f..6cd0027 100644
--- a/mesecons_commandblock/init.lua
+++ b/mesecons_commandblock/init.lua
@@ -93,9 +93,22 @@ local function receive_fields(pos, formname, fields, sender)
end
local function resolve_commands(commands, pos)
+ local players = minetest.get_connected_players()
+
+ -- No players online: remove all commands containing
+ -- @nearest, @farthest and @random
+ if #players == 0 then
+ commands = commands:gsub("[^\r\n]+", function (line)
+ if line:find("@nearest") then return "" end
+ if line:find("@farthest") then return "" end
+ if line:find("@random") then return "" end
+ return line
+ end)
+ return commands
+ end
+
local nearest, farthest = nil, nil
local min_distance, max_distance = math.huge, -1
- local players = minetest.get_connected_players()
for index, player in pairs(players) do
local distance = vector.distance(pos, player:getpos())
if distance < min_distance then
diff --git a/mesecons_luacontroller/init.lua b/mesecons_luacontroller/init.lua
index 01f5878..458286f 100644
--- a/mesecons_luacontroller/init.lua
+++ b/mesecons_luacontroller/init.lua
@@ -508,10 +508,15 @@ local digiline = {
end
}
}
-local function on_receive_fields(pos, form_name, fields)
+local function on_receive_fields(pos, form_name, fields, sender)
if not fields.program then
return
end
+ local name = sender:get_player_name()
+ if minetest.is_protected(pos, name) and not minetest.check_player_privs(name, {protection_bypass=true}) then
+ minetest.record_protection_violation(pos, name)
+ return
+ end
reset(pos)
reset_meta(pos, fields.code)
local err = run(pos, {type="program"})
diff --git a/mesecons_random/init.lua b/mesecons_random/init.lua
index 9e0e333..e37886b 100644
--- a/mesecons_random/init.lua
+++ b/mesecons_random/init.lua
@@ -26,7 +26,7 @@ minetest.register_craft({
-- GHOSTSTONE
minetest.register_node("mesecons_random:ghoststone", {
- description="ghoststone",
+ description="Ghoststone",
tiles = {"jeija_ghoststone.png"},
is_ground_content = true,
inventory_image = minetest.inventorycube("jeija_ghoststone_inv.png"),
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/minetest-mod-mesecons.git
More information about the Pkg-games-commits
mailing list