summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFernando Carmona Varo <ferkiwi@gmail.com>2015-10-24 17:10:08 +0200
committerFernando Carmona Varo <ferkiwi@gmail.com>2015-10-24 17:10:08 +0200
commita538d073951f06bf52f7e9f7cc8afe76efffb343 (patch)
tree5da38bc095ccb08a5a86433d91732ceef1184909
parent6a55251a4526095fb691f5fca0a9d51c0d1cf7c0 (diff)
Moved aliases to its own file
-rwxr-xr-xpacmine/aliases.lua11
-rw-r--r--pacmine/blocks.lua4
-rw-r--r--pacmine/init.lua5
3 files changed, 12 insertions, 8 deletions
diff --git a/pacmine/aliases.lua b/pacmine/aliases.lua
new file mode 100755
index 0000000..83a09e8
--- /dev/null
+++ b/pacmine/aliases.lua
@@ -0,0 +1,11 @@
+
+
+local nodes = {
+ "wall", "floor", "wallc", "walle", "walk_wall","glass","glassw",
+ "cherrys","apple","orange","strawberry",
+ "pellet_1","pellet_2","block2",
+}
+
+for _,i in pairs(nodes) do
+ minetest.register_alias("mypacman:"..itm, "pacmine:"..itm)
+end
diff --git a/pacmine/blocks.lua b/pacmine/blocks.lua
index 79ca2dc..b7d0c49 100644
--- a/pacmine/blocks.lua
+++ b/pacmine/blocks.lua
@@ -25,8 +25,6 @@ local i2 = blocks[i][4]
local lit = blocks[i][5]
local tf = blocks[i][6]
-minetest.register_alias("mypacman:"..itm, "pacmine:"..itm)
-
minetest.register_node("pacmine:"..itm, {
description = des,
tiles = {
@@ -49,7 +47,6 @@ minetest.register_node("pacmine:"..itm, {
})
end
--Glass
-minetest.register_alias("mypacman:glass", "pacmine:glass")
minetest.register_node("pacmine:glass", {
description = "glass",
tiles = {"pacmine_glass.png"},
@@ -61,7 +58,6 @@ minetest.register_node("pacmine:glass", {
collision_box = cbox,
})
-minetest.register_alias("mypacman:glassw", "pacmine:glassw")
minetest.register_node("pacmine:glassw", {
description = "glassw",
tiles = {"pacmine_glass.png"},
diff --git a/pacmine/init.lua b/pacmine/init.lua
index c8232b2..07fc1ab 100644
--- a/pacmine/init.lua
+++ b/pacmine/init.lua
@@ -9,12 +9,9 @@ dofile(minetest.get_modpath("pacmine").."/blocks.lua")
dofile(minetest.get_modpath("pacmine").."/portals.lua")
dofile(minetest.get_modpath("pacmine").."/gamestate.lua")
dofile(minetest.get_modpath("pacmine").."/hud.lua")
-
+dofile(minetest.get_modpath("pacmine").."/aliases.lua")
--Yellow Pellets
-minetest.register_alias("mypacman:pellet_1", "pacmine:pellet_1")
-minetest.register_alias("mypacman:pellet_2", "pacmine:pellet_2")
-minetest.register_alias("mypacman:block2", "pacmine:block2")
minetest.register_node("pacmine:pellet_1", {
description = "Pellet 1",
tiles = {"wool_yellow.png"},