aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authororwell96 <mono96.mml@gmail.com>2016-09-13 16:11:14 +0200
committerorwell96 <mono96.mml@gmail.com>2016-09-13 16:11:14 +0200
commit173829fe5918cef85999f925f397d14ce36c2cc2 (patch)
treed0113e3137f7bd72ba0cbdd880da9d71e54d5331
parent1e93892d8ab8492a0f90a4e55806fc06ff6cb437 (diff)
downloadadvtrains-173829fe5918cef85999f925f397d14ce36c2cc2.tar.gz
advtrains-173829fe5918cef85999f925f397d14ce36c2cc2.tar.bz2
advtrains-173829fe5918cef85999f925f397d14ce36c2cc2.zip
add electric signal and rotate signals for better placement
-rw-r--r--models/advtrains_retrosignal_off.b3dbin13093 -> 13093 bytes
-rw-r--r--models/advtrains_retrosignal_on.b3dbin13093 -> 13093 bytes
-rw-r--r--models/advtrains_signal.b3dbin0 -> 61544 bytes
-rw-r--r--models/blender/mbb/retrosignal.blendbin507800 -> 488920 bytes
-rw-r--r--models/blender/mbb/retrosignal.blend1bin481276 -> 507800 bytes
-rw-r--r--models/blender/mbb/signal.blendbin485524 -> 570336 bytes
-rw-r--r--models/blender/mbb/signal.blend1bin0 -> 572304 bytes
-rw-r--r--models/blender/mbb/signal.pngbin0 -> 244314 bytes
-rw-r--r--models/blender/mbb/signal.xcfbin0 -> 841524 bytes
-rw-r--r--signals.lua29
-rw-r--r--textures/advtrains_signal_off.pngbin0 -> 139883 bytes
-rw-r--r--textures/advtrains_signal_on.pngbin0 -> 139426 bytes
12 files changed, 29 insertions, 0 deletions
diff --git a/models/advtrains_retrosignal_off.b3d b/models/advtrains_retrosignal_off.b3d
index 56bf5eb..3d231dd 100644
--- a/models/advtrains_retrosignal_off.b3d
+++ b/models/advtrains_retrosignal_off.b3d
Binary files differ
diff --git a/models/advtrains_retrosignal_on.b3d b/models/advtrains_retrosignal_on.b3d
index 880c995..3d19439 100644
--- a/models/advtrains_retrosignal_on.b3d
+++ b/models/advtrains_retrosignal_on.b3d
Binary files differ
diff --git a/models/advtrains_signal.b3d b/models/advtrains_signal.b3d
new file mode 100644
index 0000000..7f69560
--- /dev/null
+++ b/models/advtrains_signal.b3d
Binary files differ
diff --git a/models/blender/mbb/retrosignal.blend b/models/blender/mbb/retrosignal.blend
index 94af470..b795215 100644
--- a/models/blender/mbb/retrosignal.blend
+++ b/models/blender/mbb/retrosignal.blend
Binary files differ
diff --git a/models/blender/mbb/retrosignal.blend1 b/models/blender/mbb/retrosignal.blend1
index ff1466c..94af470 100644
--- a/models/blender/mbb/retrosignal.blend1
+++ b/models/blender/mbb/retrosignal.blend1
Binary files differ
diff --git a/models/blender/mbb/signal.blend b/models/blender/mbb/signal.blend
index ae49ab6..63a8c99 100644
--- a/models/blender/mbb/signal.blend
+++ b/models/blender/mbb/signal.blend
Binary files differ
diff --git a/models/blender/mbb/signal.blend1 b/models/blender/mbb/signal.blend1
new file mode 100644
index 0000000..ed59b39
--- /dev/null
+++ b/models/blender/mbb/signal.blend1
Binary files differ
diff --git a/models/blender/mbb/signal.png b/models/blender/mbb/signal.png
new file mode 100644
index 0000000..779cdda
--- /dev/null
+++ b/models/blender/mbb/signal.png
Binary files differ
diff --git a/models/blender/mbb/signal.xcf b/models/blender/mbb/signal.xcf
new file mode 100644
index 0000000..1af67fa
--- /dev/null
+++ b/models/blender/mbb/signal.xcf
Binary files differ
diff --git a/signals.lua b/signals.lua
index 118d16e..803b1a7 100644
--- a/signals.lua
+++ b/signals.lua
@@ -15,6 +15,7 @@ for r,f in pairs({on="off", off="on"}) do
tiles = {"advtrains_retrosignal.png"},
description="Lampless Signal ("..r..")",
on_rightclick=switchfunc,
+ sunlight_propagates=true,
groups = {
choppy=3,
not_blocking_trains=1
@@ -28,4 +29,32 @@ for r,f in pairs({on="off", off="on"}) do
minetest.swap_node(pos, {name = "advtrains:retrosignal_"..f, param2 = node.param2})
end,
})
+ minetest.register_node("advtrains:signal_"..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_signal.b3d",
+ tiles = {"advtrains_signal_"..r..".png"},
+ description="Signal ("..r..")",
+ on_rightclick=switchfunc,
+ groups = {
+ choppy=3,
+ not_blocking_trains=1
+ },
+ light_source = 1,
+ sunlight_propagates=true,
+ mesecons = {effector = {
+ ["action_"..f] = function (pos, node)
+ minetest.swap_node(pos, {name = "advtrains:signal_"..f, param2 = node.param2})
+ end
+ }},
+ on_rightclick=function(pos, node, clicker)
+ minetest.swap_node(pos, {name = "advtrains:signal_"..f, param2 = node.param2})
+ end,
+ })
end
diff --git a/textures/advtrains_signal_off.png b/textures/advtrains_signal_off.png
new file mode 100644
index 0000000..b5b8d9c
--- /dev/null
+++ b/textures/advtrains_signal_off.png
Binary files differ
diff --git a/textures/advtrains_signal_on.png b/textures/advtrains_signal_on.png
new file mode 100644
index 0000000..fe3d391
--- /dev/null
+++ b/textures/advtrains_signal_on.png
Binary files differ