aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--init.lua1
-rw-r--r--models/advtrains_retrosignal_off.b3dbin0 -> 13093 bytes
-rw-r--r--models/advtrains_retrosignal_on.b3dbin0 -> 13093 bytes
-rw-r--r--models/blender/mbb/retrosignal.blendbin0 -> 507800 bytes
-rw-r--r--models/blender/mbb/retrosignal.blend1bin0 -> 481276 bytes
-rw-r--r--models/blender/mbb/signal2.pngbin0 -> 39924 bytes
-rw-r--r--signals.lua31
-rw-r--r--textures/advtrains_retrosignal.pngbin0 -> 8496 bytes
8 files changed, 32 insertions, 0 deletions
diff --git a/init.lua b/init.lua
index 7c3a27a..dcf2524 100644
--- a/init.lua
+++ b/init.lua
@@ -22,5 +22,6 @@ dofile(advtrains.modpath.."/pseudoload.lua");
dofile(advtrains.modpath.."/couple.lua");
dofile(advtrains.modpath.."/damage.lua");
+dofile(advtrains.modpath.."/signals.lua");
dofile(advtrains.modpath.."/misc_nodes.lua");
dofile(advtrains.modpath.."/crafting.lua");
diff --git a/models/advtrains_retrosignal_off.b3d b/models/advtrains_retrosignal_off.b3d
new file mode 100644
index 0000000..56bf5eb
--- /dev/null
+++ b/models/advtrains_retrosignal_off.b3d
Binary files differ
diff --git a/models/advtrains_retrosignal_on.b3d b/models/advtrains_retrosignal_on.b3d
new file mode 100644
index 0000000..880c995
--- /dev/null
+++ b/models/advtrains_retrosignal_on.b3d
Binary files differ
diff --git a/models/blender/mbb/retrosignal.blend b/models/blender/mbb/retrosignal.blend
new file mode 100644
index 0000000..94af470
--- /dev/null
+++ b/models/blender/mbb/retrosignal.blend
Binary files differ
diff --git a/models/blender/mbb/retrosignal.blend1 b/models/blender/mbb/retrosignal.blend1
new file mode 100644
index 0000000..ff1466c
--- /dev/null
+++ b/models/blender/mbb/retrosignal.blend1
Binary files differ
diff --git a/models/blender/mbb/signal2.png b/models/blender/mbb/signal2.png
new file mode 100644
index 0000000..7af4e2d
--- /dev/null
+++ b/models/blender/mbb/signal2.png
Binary files differ
diff --git a/signals.lua b/signals.lua
new file mode 100644
index 0000000..44fe621
--- /dev/null
+++ b/signals.lua
@@ -0,0 +1,31 @@
+--advtrains by orwell96
+--signals.lua
+
+for r,f in pairs({on="off", off="on"}) do
+ minetest.register_node("advtrains:retrosignal_"..r, {
+ drawtype = "mesh",
+ paramtype="light",
+ paramtype2="facedir",
+ walkable = false,
+ selection_box = {
+ type = "fixed",
+ fixed = {-1/4, -1/2, -1/4, 1/4, 2, 1/4},
+ },
+ mesh = "advtrains_retrosignal_"..r..".b3d",
+ tiles = {"advtrains_retrosignal.png"},
+ description="Lampless Signal ("..r..")",
+ on_rightclick=switchfunc,
+ groups = {
+ choppy=3,
+ not_blocking_trains=1
+ },
+ mesecons = {effector = {
+ action_on = function (pos, node)
+ minetest.swap_node(pos, {name = "advtrains:retrosignal_"..f, param2 = node.param2})
+ end
+ }},
+ on_rightclick=function(pos, node, clicker)
+ minetest.swap_node(pos, {name = "advtrains:retrosignal_"..f, param2 = node.param2})
+ end,
+ })
+end
diff --git a/textures/advtrains_retrosignal.png b/textures/advtrains_retrosignal.png
new file mode 100644
index 0000000..141198d
--- /dev/null
+++ b/textures/advtrains_retrosignal.png
Binary files differ