summaryrefslogtreecommitdiff
path: root/data/mods/default
diff options
context:
space:
mode:
authorPerttu Ahola <celeron55@gmail.com>2011-12-03 11:41:52 +0200
committerPerttu Ahola <celeron55@gmail.com>2011-12-03 11:41:52 +0200
commit760416b81fbcf3343d4276c20cf7d6028b5ad461 (patch)
treee60c8a16cf63b2b71721595cdc9f65e1d0271656 /data/mods/default
parent1c785c32ef9290b5a461a6ec21b27b3621cb48a7 (diff)
downloadminetest-760416b81fbcf3343d4276c20cf7d6028b5ad461.tar.gz
minetest-760416b81fbcf3343d4276c20cf7d6028b5ad461.tar.bz2
minetest-760416b81fbcf3343d4276c20cf7d6028b5ad461.zip
Change naming convention to be modname:* instead of modname_* (sorry modders!)
Diffstat (limited to 'data/mods/default')
-rw-r--r--data/mods/default/init.lua12
1 files changed, 8 insertions, 4 deletions
diff --git a/data/mods/default/init.lua b/data/mods/default/init.lua
index e0cc3598b..3baafff63 100644
--- a/data/mods/default/init.lua
+++ b/data/mods/default/init.lua
@@ -21,17 +21,21 @@
--
-- Naming convention for registered textual names
-- ----------------------------------------------
--- "modname_<whatever>"
+-- "modname:<whatever>" (<whatever> can have characters a-zA-Z0-9_)
--
-- This is to prevent conflicting names from corrupting maps and is
-- enforced by the mod loader.
--
-- Example: mod "experimental", ideal item/node/entity name "tnt":
--- -> the name should be "experimental_tnt".
+-- -> the name should be "experimental:tnt".
--
-- Enforcement can be overridden by prefixing the name with ":". This can
-- be used for overriding the registrations of some other mod.
--
+-- Example: Any mod can redefine experimental:tnt by using the name
+-- ":experimental:tnt" when registering it.
+-- (also that mods is required to have "experimental" as a dependency)
+--
-- Default mod uses ":" for maintaining backwards compatibility.
--
-- Textures
@@ -1426,7 +1430,7 @@ function nodeupdate_single(p)
n_bottom = minetest.env:get_node(p_bottom)
if n_bottom.name == "air" then
minetest.env:remove_node(p)
- minetest.env:add_luaentity(p, "default_falling_"..n.name)
+ minetest.env:add_luaentity(p, "default:falling_"..n.name)
nodeupdate(p)
end
end
@@ -1448,7 +1452,7 @@ end
--
function register_falling_node(nodename, texture)
- minetest.register_entity("default_falling_"..nodename, {
+ minetest.register_entity("default:falling_"..nodename, {
-- Static definition
physical = true,
collisionbox = {-0.5,-0.5,-0.5, 0.5,0.5,0.5},