mirror of
https://github.com/minetest-mods/mesecons.git
synced 2025-06-28 22:06:03 +02:00
Compare commits
6 Commits
2016.05.15
...
2016.07.09
Author | SHA1 | Date | |
---|---|---|---|
acd41b5773 | |||
f9f7600017 | |||
40487a65f4 | |||
75308f73e4 | |||
478680292c | |||
85bc62a65d |
30
COPYING.txt
Normal file
30
COPYING.txt
Normal file
@ -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/
|
@ -87,10 +87,6 @@ end
|
|||||||
|
|
||||||
|
|
||||||
mesecon.queue:add_function("cooldown", function (pos)
|
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 meta = minetest.get_meta(pos)
|
||||||
local heat = meta:get_int("heat")
|
local heat = meta:get_int("heat")
|
||||||
|
|
||||||
|
@ -93,9 +93,22 @@ local function receive_fields(pos, formname, fields, sender)
|
|||||||
end
|
end
|
||||||
|
|
||||||
local function resolve_commands(commands, pos)
|
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 nearest, farthest = nil, nil
|
||||||
local min_distance, max_distance = math.huge, -1
|
local min_distance, max_distance = math.huge, -1
|
||||||
local players = minetest.get_connected_players()
|
|
||||||
for index, player in pairs(players) do
|
for index, player in pairs(players) do
|
||||||
local distance = vector.distance(pos, player:getpos())
|
local distance = vector.distance(pos, player:getpos())
|
||||||
if distance < min_distance then
|
if distance < min_distance then
|
||||||
|
@ -508,10 +508,15 @@ local digiline = {
|
|||||||
end
|
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
|
if not fields.program then
|
||||||
return
|
return
|
||||||
end
|
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(pos)
|
||||||
reset_meta(pos, fields.code)
|
reset_meta(pos, fields.code)
|
||||||
local err = run(pos, {type="program"})
|
local err = run(pos, {type="program"})
|
||||||
|
@ -26,7 +26,7 @@ minetest.register_craft({
|
|||||||
-- GHOSTSTONE
|
-- GHOSTSTONE
|
||||||
|
|
||||||
minetest.register_node("mesecons_random:ghoststone", {
|
minetest.register_node("mesecons_random:ghoststone", {
|
||||||
description="ghoststone",
|
description="Ghoststone",
|
||||||
tiles = {"jeija_ghoststone.png"},
|
tiles = {"jeija_ghoststone.png"},
|
||||||
is_ground_content = true,
|
is_ground_content = true,
|
||||||
inventory_image = minetest.inventorycube("jeija_ghoststone_inv.png"),
|
inventory_image = minetest.inventorycube("jeija_ghoststone_inv.png"),
|
||||||
|
Reference in New Issue
Block a user