mirror of
https://github.com/acmgit/mesecons_stealthnode.git
synced 2024-11-22 07:13:45 +01:00
Remove Whitespaces
This commit is contained in:
parent
5658011d76
commit
ee06f4c468
18
.luacheckrc
Normal file
18
.luacheckrc
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
unused_args = false
|
||||||
|
allow_defined_top = true
|
||||||
|
|
||||||
|
globals = {
|
||||||
|
"minetest","mesecons_stealthnode","mesecons_random"
|
||||||
|
}
|
||||||
|
|
||||||
|
read_globals = {
|
||||||
|
string = {fields = {"split"}},
|
||||||
|
table = {fields = {"copy", "getn"}},
|
||||||
|
|
||||||
|
-- Builtin
|
||||||
|
"vector", "ItemStack",
|
||||||
|
"dump", "DIR_DELIM", "VoxelArea", "Settings",
|
||||||
|
|
||||||
|
-- MTG
|
||||||
|
"default"
|
||||||
|
}
|
@ -1,8 +1,8 @@
|
|||||||
--[[
|
--[[
|
||||||
********************************************
|
********************************************
|
||||||
*** Register Stealthnodes **
|
*** Register Stealthnodes **
|
||||||
********************************************
|
********************************************
|
||||||
|
|
||||||
Registers a new Ghoststone with the tile of the given Node.
|
Registers a new Ghoststone with the tile of the given Node.
|
||||||
|
|
||||||
stealthnode.register_stealthnode(Name, Node)
|
stealthnode.register_stealthnode(Name, Node)
|
||||||
@ -13,21 +13,22 @@
|
|||||||
]]--
|
]]--
|
||||||
|
|
||||||
function stealthnode.register_stealthnode(modname, node)
|
function stealthnode.register_stealthnode(modname, node)
|
||||||
|
|
||||||
local tile = ""
|
local tile
|
||||||
|
|
||||||
if minetest.registered_nodes[modname .. ":" .. node] == nil then
|
if minetest.registered_nodes[modname .. ":" .. node] == nil then
|
||||||
print("[MOD] " .. minetest.get_current_modname() .. ": " .. modname .. ":" .. node .. " not found to register a stealthnode.")
|
print("[MOD] " .. minetest.get_current_modname() .. ": "
|
||||||
minetest.log("warning", "[MOD] " .. minetest.get_current_modname() .. ": " .. modname .. ":" .. node .. " not found to register a stealthnode.")
|
.. modname .. ":" .. node .. " not found to register a stealthnode.")
|
||||||
|
minetest.log("warning", "[MOD] " .. minetest.get_current_modname() .. ": "
|
||||||
|
.. modname .. ":" .. node .. " not found to register a stealthnode.")
|
||||||
return
|
return
|
||||||
else
|
else
|
||||||
tile = minetest.registered_nodes[modname .. ":" .. node].tiles
|
tile = minetest.registered_nodes[modname .. ":" .. node].tiles
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local newgroup = {}
|
local newgroup = stealthnode.table_clone(minetest.registered_nodes[modname .. ":" .. node].groups)
|
||||||
newgroup = stealthnode.table_clone(minetest.registered_nodes[modname .. ":" .. node].groups)
|
|
||||||
|
|
||||||
minetest.register_node(":mesecons_stealthnode:" .. modname .. "_" .. node, {
|
minetest.register_node(":mesecons_stealthnode:" .. modname .. "_" .. node, {
|
||||||
description="Stealthnode " .. minetest.registered_nodes[modname .. ":" .. node].description,
|
description="Stealthnode " .. minetest.registered_nodes[modname .. ":" .. node].description,
|
||||||
tiles = tile,
|
tiles = tile,
|
||||||
@ -84,9 +85,9 @@ function stealthnode.table_clone(c_table)
|
|||||||
local t2 = {}
|
local t2 = {}
|
||||||
for k,v in pairs(c_table) do
|
for k,v in pairs(c_table) do
|
||||||
t2[k] = v
|
t2[k] = v
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
return t2
|
return t2
|
||||||
|
|
||||||
end -- function cucina_vegana.table_clone
|
end -- function cucina_vegana.table_clone
|
||||||
|
@ -38,7 +38,7 @@ local snodes = {
|
|||||||
|
|
||||||
{"default", "wood"},
|
{"default", "wood"},
|
||||||
{"default", "tree"},
|
{"default", "tree"},
|
||||||
|
|
||||||
{"default", "junglewood"},
|
{"default", "junglewood"},
|
||||||
{"default", "jungletree"},
|
{"default", "jungletree"},
|
||||||
|
|
||||||
@ -50,7 +50,7 @@ local snodes = {
|
|||||||
|
|
||||||
{"default", "acacia_wood"},
|
{"default", "acacia_wood"},
|
||||||
{"default", "acacia_tree"},
|
{"default", "acacia_tree"},
|
||||||
|
|
||||||
{"moreores", "mithril_block"},
|
{"moreores", "mithril_block"},
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -60,7 +60,7 @@ for i,value in pairs(snodes) do
|
|||||||
if(minetest.registered_nodes[value[1]..":"..value[2]]) then
|
if(minetest.registered_nodes[value[1]..":"..value[2]]) then
|
||||||
register(value[1], value[2])
|
register(value[1], value[2])
|
||||||
else
|
else
|
||||||
minetest.log("info","[MOD]stealthnode: Node " .. value[1]..":"..value[2].." not found to register a Stealthnode.")
|
minetest.log("info","[MOD]stealthnode:Node ".. value[1]..":"..value[2].." not found to register a Stealthnode.")
|
||||||
end -- if(mintest.registered_nodes
|
end -- if(mintest.registered_nodes
|
||||||
|
|
||||||
end -- for i,value
|
end -- for i,value
|
||||||
|
Loading…
Reference in New Issue
Block a user