aboutsummaryrefslogtreecommitdiff
path: root/advtrains/misc_nodes.lua
diff options
context:
space:
mode:
authorGabriel Pérez-Cerezo <gabriel@gpcf.eu>2018-06-10 17:40:37 +0200
committerGabriel Pérez-Cerezo <gabriel@gpcf.eu>2018-06-10 17:40:37 +0200
commitda0e7ac7567059a88f76069b55350d52056e60d6 (patch)
tree8b3610a69bfd46a684d687f8e4765fe12ce88561 /advtrains/misc_nodes.lua
parent38d10acca24e5a34671a1a71f12923002d06253d (diff)
downloadadvtrains-da0e7ac7567059a88f76069b55350d52056e60d6.tar.gz
advtrains-da0e7ac7567059a88f76069b55350d52056e60d6.tar.bz2
advtrains-da0e7ac7567059a88f76069b55350d52056e60d6.zip
make platform creation possible from other mods
Diffstat (limited to 'advtrains/misc_nodes.lua')
-rw-r--r--advtrains/misc_nodes.lua14
1 files changed, 7 insertions, 7 deletions
diff --git a/advtrains/misc_nodes.lua b/advtrains/misc_nodes.lua
index 37f535d..85fb0ef 100644
--- a/advtrains/misc_nodes.lua
+++ b/advtrains/misc_nodes.lua
@@ -1,6 +1,6 @@
--all nodes that do not fit in any other category
-function advtrains.register_platform(preset)
+function advtrains.register_platform(modprefix, preset)
local ndef=minetest.registered_nodes[preset]
if not ndef then
minetest.log("warning", " register_platform couldn't find preset node "..preset)
@@ -12,7 +12,7 @@ function advtrains.register_platform(preset)
end
local desc=ndef.description or ""
local nodename=string.match(preset, ":(.+)$")
- minetest.register_node("advtrains:platform_low_"..nodename, {
+ minetest.register_node(modprefix .. ":platform_low_"..nodename, {
description = attrans("@1 Platform (low)", desc),
tiles = {btex.."^advtrains_platform.png", btex, btex, btex, btex, btex},
groups = {cracky = 1, not_blocking_trains = 1, platform=1},
@@ -29,7 +29,7 @@ function advtrains.register_platform(preset)
paramtype = "light",
sunlight_propagates = true,
})
- minetest.register_node("advtrains:platform_high_"..nodename, {
+ minetest.register_node(modprefix .. ":platform_high_"..nodename, {
description = attrans("@1 Platform (high)", desc),
tiles = {btex.."^advtrains_platform.png", btex, btex, btex, btex, btex},
groups = {cracky = 1, not_blocking_trains = 1, platform=2},
@@ -48,14 +48,14 @@ function advtrains.register_platform(preset)
})
minetest.register_craft({
type="shapeless",
- output = "advtrains:platform_high_"..nodename.." 4",
+ output = modprefix .. ":platform_high_"..nodename.." 4",
recipe = {
"dye:yellow", preset, preset
},
})
minetest.register_craft({
type="shapeless",
- output = "advtrains:platform_low_"..nodename.." 4",
+ output = modprefix .. ":platform_low_"..nodename.." 4",
recipe = {
"dye:yellow", preset
},
@@ -63,5 +63,5 @@ function advtrains.register_platform(preset)
end
-advtrains.register_platform("default:stonebrick")
-advtrains.register_platform("default:sandstonebrick")
+advtrains.register_platform("advtrains", "default:stonebrick")
+advtrains.register_platform("advtrains", "default:sandstonebrick")