Rename to minibase_game, fix leafdecay
parent
4251d1de9f
commit
1648ffc100
28
README.txt
28
README.txt
|
@ -1,28 +1,10 @@
|
|||
This is a slightly improved version of minetest_game
|
||||
====================================================
|
||||
Poorly modded minimalist version of minetest_game
|
||||
=================================================
|
||||
|
||||
This folder belongs to
|
||||
minetest folder/games/
|
||||
|
||||
License of source code
|
||||
----------------------
|
||||
Copyright (C) 2010-2012 celeron55, Perttu Ahola <celeron55@gmail.com>
|
||||
See README.txt in each mod directory for information about other authors.
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU Lesser General Public License as published by
|
||||
the Free Software Foundation; either version 2.1 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program 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 Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
This directory belongs to
|
||||
minetest_directory/games/[minibase_game]/
|
||||
|
||||
|
||||
Licenses
|
||||
--------------------------------------
|
||||
See README.txt in each mod directory for information about the authors and license.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
base_game API
|
||||
======================
|
||||
GitHub Repo: https://github.com/SmallJoker/base_game
|
||||
Original file: https://github.com/minetest/minetest_game/blob/master/game_api.txt
|
||||
minibase_game API
|
||||
=================
|
||||
GitHub Repo: https://github.com/SmallJoker/minibase_game
|
||||
Based on: https://github.com/minetest/minetest_game/blob/master/game_api.txt
|
||||
|
||||
Please note:
|
||||
[XYZ] refers to a section the Minetest API
|
||||
|
|
|
@ -346,14 +346,18 @@ minetest.register_abm({
|
|||
|
||||
action = function(pos, node)
|
||||
local def = minetest.registered_nodes[node.name]
|
||||
if not def.trunk then return end
|
||||
if not def.trunk then
|
||||
return
|
||||
end
|
||||
local range = def.groups.leafdecay
|
||||
|
||||
if range == 0 then return end
|
||||
if minetest.find_node_near(pos, range, {"ignore", trunk}) then return end
|
||||
if range == 0 or
|
||||
minetest.find_node_near(pos, range, {"ignore", def.trunk}) then
|
||||
return
|
||||
end
|
||||
|
||||
local drops = minetest.get_node_drops(node.name)
|
||||
for _, dropitem in ipairs(drops) do
|
||||
for _, dropitem in pairs(drops) do
|
||||
if dropitem ~= node.name then
|
||||
minetest.add_item(pos, dropitem)
|
||||
end
|
||||
|
|
|
@ -45,28 +45,6 @@ dofile(modpath.."/trees.lua")
|
|||
dofile(modpath.."/nature.lua")
|
||||
dofile(modpath.."/ores.lua")
|
||||
|
||||
-- Flags to detect functions/features of the current game
|
||||
|
||||
default.flags = {
|
||||
-- Advanced leafdecay, for "trunk" in node defs
|
||||
["ALD"] = true,
|
||||
-- Nature, freezemelt. Using "freezemelt" in node defs
|
||||
-- and "can_freeze", "freezes" in groups
|
||||
["NFM"] = true,
|
||||
["c_coal"] = 2, -- 0 = exists minimal, 1 = exists, 2 = also as ore (generated)
|
||||
["c_iron"] = 2,
|
||||
["c_copper"] = 2,
|
||||
["c_diamond"] = 2,
|
||||
["c_mese"] = 2,
|
||||
["c_gold"] = 1,
|
||||
["c_bronze"] = 0,
|
||||
-- Trees and naturals
|
||||
["t_normal"] = true,
|
||||
["t_jungle"] = true,
|
||||
["t_papyrus"] = true,
|
||||
["t_cactus"] = true,
|
||||
}
|
||||
|
||||
minetest.register_on_joinplayer(function(player)
|
||||
player:set_inventory_formspec(default.gui_suvival_form)
|
||||
end)
|
Loading…
Reference in New Issue