diff options
author | h-v-smacker <hans-von-smacker+github@gmail.com> | 2018-03-27 21:35:49 +0300 |
---|---|---|
committer | h-v-smacker <hans-von-smacker+github@gmail.com> | 2018-03-27 21:35:49 +0300 |
commit | 075048dd7a771dafb1511ae2d783d5c729a2df1b (patch) | |
tree | 859f96b4378b4100fea5dab3001078d50e984174 | |
parent | b08d7c91b0cfafe000797f5cad9f81a72f941f55 (diff) |
initial release
-rw-r--r-- | README.md | 49 | ||||
-rw-r--r-- | depends.txt | 3 | ||||
-rw-r--r-- | init.lua | 514 | ||||
-rw-r--r-- | models/limit_post.b3d | bin | 0 -> 37397 bytes | |||
-rw-r--r-- | models/shunting_signal.b3d | bin | 0 -> 56770 bytes | |||
-rw-r--r-- | models/switch_arrow_2_off.b3d | bin | 0 -> 28197 bytes | |||
-rw-r--r-- | models/switch_arrow_2_off_textured.b3d | bin | 0 -> 28206 bytes | |||
-rw-r--r-- | models/switch_arrow_2_on.b3d | bin | 0 -> 28197 bytes | |||
-rw-r--r-- | models/switch_arrow_off.b3d | bin | 0 -> 25220 bytes | |||
-rw-r--r-- | models/switch_arrow_on.b3d | bin | 0 -> 25212 bytes | |||
-rw-r--r-- | models/switch_ball_off.b3d | bin | 0 -> 112036 bytes | |||
-rw-r--r-- | models/switch_ball_on.b3d | bin | 0 -> 112036 bytes | |||
-rw-r--r-- | models/switch_blocker_off.b3d | bin | 0 -> 32187 bytes | |||
-rw-r--r-- | models/switch_blocker_on.b3d | bin | 0 -> 28707 bytes | |||
-rw-r--r-- | models/switch_lamp_2_off.b3d | bin | 0 -> 44585 bytes | |||
-rw-r--r-- | models/switch_lamp_2_on.b3d | bin | 0 -> 44585 bytes | |||
-rw-r--r-- | models/switch_light_off.b3d | bin | 0 -> 47306 bytes | |||
-rw-r--r-- | models/switch_light_on.b3d | bin | 0 -> 47416 bytes | |||
-rw-r--r-- | models/switch_off.b3d | bin | 0 -> 21027 bytes | |||
-rw-r--r-- | models/switch_on.b3d | bin | 0 -> 20973 bytes | |||
-rw-r--r-- | src.blend/limit_post.blend | bin | 0 -> 550248 bytes | |||
-rw-r--r-- | src.blend/shunting_signal.blend | bin | 0 -> 567236 bytes | |||
-rw-r--r-- | src.blend/switch_arrow_2_off.blend | bin | 0 -> 500332 bytes | |||
-rw-r--r-- | src.blend/switch_arrow_2_on.blend | bin | 0 -> 501320 bytes | |||
-rw-r--r-- | src.blend/switch_arrow_off.blend | bin | 0 -> 437852 bytes | |||
-rw-r--r-- | src.blend/switch_arrow_on.blend | bin | 0 -> 437628 bytes | |||
-rw-r--r-- | src.blend/switch_ball_off.blend | bin | 0 -> 597496 bytes | |||
-rw-r--r-- | src.blend/switch_ball_on.blend | bin | 0 -> 501480 bytes | |||
-rw-r--r-- | src.blend/switch_lamp_2_off.blend | bin | 0 -> 508236 bytes | |||
-rw-r--r-- | src.blend/switch_lamp_2_on.blend | bin | 0 -> 508828 bytes | |||
-rw-r--r-- | src.blend/switch_light_off.blend | bin | 0 -> 494044 bytes | |||
-rw-r--r-- | src.blend/switch_light_on.blend | bin | 0 -> 434572 bytes | |||
-rw-r--r-- | src.blend/switch_off.blend | bin | 0 -> 449940 bytes | |||
-rw-r--r-- | src.blend/switch_on.blend | bin | 0 -> 493172 bytes | |||
-rw-r--r-- | textures/bwarrow.png | bin | 0 -> 629 bytes | |||
-rw-r--r-- | textures/bwarrow2.png | bin | 0 -> 629 bytes | |||
-rw-r--r-- | textures/limit_post.png | bin | 0 -> 2001 bytes | |||
-rw-r--r-- | textures/points_lever_arrow.png | bin | 0 -> 250 bytes | |||
-rw-r--r-- | textures/points_lever_lamp.png | bin | 0 -> 226 bytes | |||
-rw-r--r-- | textures/shunting_signal.png | bin | 0 -> 7632 bytes | |||
-rw-r--r-- | textures/shunting_signal_blue.png | bin | 0 -> 2509 bytes | |||
-rw-r--r-- | textures/shunting_signal_white.png | bin | 0 -> 2526 bytes | |||
-rw-r--r-- | textures/switch_arrow_2_off.png | bin | 0 -> 269 bytes | |||
-rw-r--r-- | textures/switch_arrow_off.png | bin | 0 -> 6629 bytes | |||
-rw-r--r-- | textures/switch_arrow_on.png | bin | 0 -> 6038 bytes | |||
-rw-r--r-- | textures/switch_ball_off.png | bin | 0 -> 4913 bytes | |||
-rw-r--r-- | textures/switch_ball_on.png | bin | 0 -> 4490 bytes | |||
-rw-r--r-- | textures/switch_light_off.png | bin | 0 -> 6294 bytes | |||
-rw-r--r-- | textures/switch_light_on.png | bin | 0 -> 6666 bytes | |||
-rw-r--r-- | textures/switch_off.png | bin | 0 -> 13915 bytes | |||
-rw-r--r-- | textures/switch_on.png | bin | 0 -> 16589 bytes | |||
-rw-r--r-- | textures/track_blocker.png | bin | 0 -> 226 bytes |
52 files changed, 565 insertions, 1 deletions
@@ -1,2 +1,49 @@ # railroad_paraphernalia -This mod introduces railroad equipment from the 1986 signaling manual for the USSR railways. +This mod introduces railroad equipment, mostly from the 1986 signaling manual for the USSR railways. + +##Point levers +An accessory that makes a railroad switch look professional. Also helps +users of advtrains without train_operator privilege to operate switches in style. + +With black&white arrow: +``` +{'dye:black', 'dye:white', 'dye:black'}, +{'', 'default:stick', 'default:stick'}, +{'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'}, +``` + +With blue&yellow signal lamp: +``` +{'dye:grey', 'dye:yellow', 'dye:white'}, +{'', 'default:stick', 'default:stick'}, +{'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'}, +``` + +While it should be a light source, the details of the model cannot be seen even when it +emits the minimal amount of light. + +##Track Blocker +Prevents a tran from passing a track segment by placing a "block" in its +way. Isn't synced with advtrains ndb, so works only with manned trains for now. +``` +{'dye:white', 'dye:black', 'dye:white'}, +{'', 'default:stick', ''}, +{'dye:red', 'default:steel_ingot', 'default:steel_ingot'}, +``` + +##Shunting signal +A small signal for shunting operations. Blue = shunting prohibited, white = shutung allowed. +``` +{'', 'dye:white', ''}, +{'', 'dye:blue', ''}, +{'', 'default:stone', ''}, +``` + +##Delimiting post: +It is placed near switches to show the point past which the locomotive may +not be parked, since it would collide with the train on the other track. +``` +{'', 'dye:black', ''}, +{'', 'dye:white', ''}, +{'', 'default:stone', ''}, +```
\ No newline at end of file diff --git a/depends.txt b/depends.txt new file mode 100644 index 0000000..1216ffb --- /dev/null +++ b/depends.txt @@ -0,0 +1,3 @@ +mesecons +advtrains +intllib? diff --git a/init.lua b/init.lua new file mode 100644 index 0000000..75093cd --- /dev/null +++ b/init.lua @@ -0,0 +1,514 @@ +mesecon.rules.flat2 = +{{x = 2, y = 0, z = 0}, + {x =-2, y = 0, z = 0}, + {x = 0, y = 0, z = 2}, + {x = 0, y = 0, z =-2} +} + +mesecon.rules.shunting_signal = +{{x = 1, y = 0, z = 0}, + {x =-1, y = 0, z = 0}, + {x = 0, y = 0, z = 1}, + {x = 0, y = 0, z =-1}, + {x = 0, y = -1, z = 0} +} + +mesecon.rules.switch = { + p0 = {{x = 0, y = 0, z = 1}}, + p1 = {{x = 1, y = 0, z = 0}}, + p2 = {{x = 0, y = 0, z = -1}}, + p3 = {{x = -1, y = 0, z = 0}} +} + +-- param = 2 +-- {{x = 0, y = 0, z = -1}} +-- param = 0 +-- {{x = 0, y = 0, z = 1}} +-- param = 3 +-- {{x = -1, y = 0, z = 0}} +-- param = 1 +-- {{x = 1, y = 0, z = 0}} + + +local function switch_get_rules(orientation) + if orientation == 0 then + return {{x = 0, y = 0, z = 1}} + elseif orientation == 1 then + return {{x = 1, y = 0, z = 0}} + elseif orientation == 2 then + return {{x = 0, y = 0, z = -1}} + elseif orientation == 3 then + return {{x = -1, y = 0, z = 0}} + end + return {{ x = 0, y = 0, z = 0 }} +end + +-- POINT LEVERS WITH ARROW INDICATORS + +minetest.register_node("railroad_paraphernalia:switch_with_arrow", { + description = 'Point lever w/arrow', + drawtype = "mesh", + mesh = "switch_arrow_2_off.b3d", + tiles = { "points_lever_arrow.png" }, + node_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.5, 0.5, -0.4, 0.5}, + {-0.5, -0.5, -1.5, 0.5, 1, -0.5} + } + }, + selection_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.5, 0.5, -0.4, 0.5}, + {-0.5, -0.5, -1.5, 0.5, 1, -0.5} + } + }, + collisionbox = {-0.5, -0.5, -1.5, 0.5, 1, -0.5}, + walkable = false, + groups = {snappy=1, choppy=2, oddly_breakable_by_hand=2, flammable=3}, + on_place = minetest.rotate_node, + paramtype = "light", + paramtype2 = "facedir", + mesecons = { + receptor = { + state = mesecon.state.off, + rules = mesecon.rules.flat + } + }, + after_place_node = function (pos, placer, itemstack, pointed_thing) + mesecon.receptor_off(pos, switch_get_rules(minetest.get_node(pos).param2)) + end, + on_rightclick = function (pos, node, player, itemstack, pointed_thing) + minetest.set_node(pos, { name = "railroad_paraphernalia:switch_with_arrow_act", param2 = minetest.get_node(pos).param2 } ) + minetest.sound_play("piston_extend", { + pos = pos, + max_hear_distance = 20, + gain = 0.3, + }) + mesecon.receptor_on(pos, switch_get_rules(minetest.get_node(pos).param2)) + end +}) + +minetest.register_node("railroad_paraphernalia:switch_with_arrow_act", { + --description = 'Point lever w/arrow', + drawtype = "mesh", + mesh = "switch_arrow_2_on.b3d", + tiles = { "points_lever_arrow.png" }, + node_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.5, 0.5, -0.4, 0.5}, + {-0.5, -0.5, -1.5, 0.5, 1, -0.5} + } + }, + selection_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.5, 0.5, -0.4, 0.5}, + {-0.5, -0.5, -1.5, 0.5, 1, -0.5} + } + }, + collisionbox = {-0.5, -0.5, -1.5, 0.5, 1, -0.5}, + walkable = false, + groups = {snappy=1, choppy=2, oddly_breakable_by_hand=2, flammable=3, not_in_creative_inventory=1}, + on_place = minetest.rotate_node, + paramtype = "light", + paramtype2 = "facedir", + mesecons = { + receptor = { + state = mesecon.state.off, + rules = mesecon.rules.flat2 + } + }, + on_rightclick = function (pos, node, player, itemstack, pointed_thing) + minetest.set_node(pos, { name = "railroad_paraphernalia:switch_with_arrow", param2 = minetest.get_node(pos).param2 } ) + minetest.sound_play("piston_retract", { + pos = pos, + max_hear_distance = 20, + gain = 0.3, + }) + mesecon.receptor_off(pos, switch_get_rules(minetest.get_node(pos).param2)) + end +}) + +minetest.register_craft({ + output = 'railroad_paraphernalia:switch_with_arrow 3', + recipe = { + {'dye:black', 'dye:white', 'dye:black'}, + {'', 'default:stick', 'default:stick'}, + {'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'}, + } +}) + +-- POINT LEVERS WITH LAMP INDICATORS + +minetest.register_node("railroad_paraphernalia:switch_with_lamp", { + description = 'Point lever w/lamp', + drawtype = "mesh", + mesh = "switch_lamp_2_off.b3d", + tiles = { "points_lever_lamp.png" }, + node_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.5, 0.5, -0.4, 0.5}, + {-0.5, -0.5, -1.5, 0.5, 1, -0.5} + } + }, + selection_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.5, 0.5, -0.4, 0.5}, + {-0.5, -0.5, -1.5, 0.5, 1, -0.5} + } + }, + collisionbox = {-0.5, -0.5, -1.5, 0.5, 1, -0.5}, + walkable = false, + groups = {snappy=1, choppy=2, oddly_breakable_by_hand=2, flammable=3}, + on_place = minetest.rotate_node, + paramtype = "light", + paramtype2 = "facedir", + mesecons = { + receptor = { + state = mesecon.state.off, + rules = mesecon.rules.flat + } + }, + after_place_node = function (pos, placer, itemstack, pointed_thing) + mesecon.receptor_off(pos, switch_get_rules(minetest.get_node(pos).param2)) + end, + on_rightclick = function (pos, node, player, itemstack, pointed_thing) + minetest.set_node(pos, { name = "railroad_paraphernalia:switch_with_lamp_act", param2 = minetest.get_node(pos).param2 } ) + minetest.sound_play("piston_extend", { + pos = pos, + max_hear_distance = 20, + gain = 0.3, + }) + mesecon.receptor_on(pos, switch_get_rules(minetest.get_node(pos).param2)) + end +}) + + +minetest.register_node("railroad_paraphernalia:switch_with_lamp_act", { + --description = 'Point lever w/lamp', + drawtype = "mesh", + mesh = "switch_lamp_2_on.b3d", + tiles = { "points_lever_lamp.png" }, + node_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.5, 0.5, -0.4, 0.5}, + {-0.5, -0.5, -1.5, 0.5, 1, -0.5} + } + }, + selection_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.5, 0.5, -0.4, 0.5}, + {-0.5, -0.5, -1.5, 0.5, 1, -0.5} + } + }, + collisionbox = {-0.5, -0.5, -1.5, 0.5, 1, -0.5}, + walkable = false, + groups = {snappy=1, choppy=2, oddly_breakable_by_hand=2, flammable=3, not_in_creative_inventory=1}, + on_place = minetest.rotate_node, + paramtype = "light", + paramtype2 = "facedir", + mesecons = { + receptor = { + state = mesecon.state.off, + rules = mesecon.rules.flat2 + } + }, + on_rightclick = function (pos, node, player, itemstack, pointed_thing) + minetest.set_node(pos, { name = "railroad_paraphernalia:switch_with_lamp", param2 = minetest.get_node(pos).param2 } ) + minetest.sound_play("piston_retract", { + pos = pos, + max_hear_distance = 20, + gain = 0.3, + }) + mesecon.receptor_off(pos, switch_get_rules(minetest.get_node(pos).param2)) + end +}) + + +minetest.register_craft({ + output = 'railroad_paraphernalia:switch_with_lamp 3', + recipe = { + {'dye:grey', 'dye:yellow', 'dye:white'}, + {'', 'default:stick', 'default:stick'}, + {'default:steel_ingot', 'default:steel_ingot', 'default:steel_ingot'}, + } +}) + + +-- POINT LEVERS WITH A RED BALL + +-- minetest.register_node("railroad_paraphernalia:switch_with_ball", { +-- description = 'Point lever w/ball', +-- drawtype = "mesh", +-- mesh = "switch_ball_off.b3d", +-- tiles = { "switch_ball_off.png" }, +-- selection_box = { type = "fixed", +-- fixed = {{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}} +-- }, +-- collisionbox = {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}, +-- groups = {snappy=1, choppy=2, oddly_breakable_by_hand=2, flammable=3}, +-- on_place = minetest.rotate_node, +-- paramtype = "light", +-- paramtype2 = "facedir", +-- mesecons = { +-- receptor = { +-- state = mesecon.state.off, +-- rules = mesecon.rules.flat +-- } +-- }, +-- after_place_node = function (pos, placer, itemstack, pointed_thing) +-- mesecon.receptor_off(pos, switch_get_rules(minetest.get_node(pos).param2)) +-- end, +-- on_rightclick = function (pos, node, player, itemstack, pointed_thing) +-- minetest.set_node(pos, { name = "railroad_paraphernalia:switch_with_ball_act", param2 = minetest.get_node(pos).param2 } ) +-- minetest.sound_play("piston_extend", { +-- pos = pos, +-- max_hear_distance = 20, +-- gain = 0.3, +-- }) +-- mesecon.receptor_on(pos, switch_get_rules(minetest.get_node(pos).param2)) +-- end +-- }) +-- +-- +-- minetest.register_node("railroad_paraphernalia:switch_with_ball_act", { +-- --description = 'Point lever w/ball', +-- drawtype = "mesh", +-- mesh = "switch_ball_on.b3d", +-- tiles = { "switch_ball_on.png" }, +-- selection_box = { type = "fixed", +-- fixed = {{-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}} +-- }, +-- collisionbox = {-0.5, -0.5, -0.5, 0.5, 0.5, 0.5}, +-- groups = {snappy=1, choppy=2, oddly_breakable_by_hand=2, flammable=3, not_in_creative_inventory=1}, +-- on_place = minetest.rotate_node, +-- paramtype = "light", +-- paramtype2 = "facedir", +-- mesecons = { +-- receptor = { +-- state = mesecon.state.off, +-- rules = mesecon.rules.flat2 +-- } +-- }, +-- on_rightclick = function (pos, node, player, itemstack, pointed_thing) +-- minetest.set_node(pos, { name = "railroad_paraphernalia:switch_with_ball", param2 = minetest.get_node(pos).param2 } ) +-- minetest.sound_play("piston_retract", { +-- pos = pos, +-- max_hear_distance = 20, +-- gain = 0.3, +-- }) +-- mesecon.receptor_off(pos, switch_get_rules(minetest.get_node(pos).param2)) +-- end +-- }) + + +-- TRACK BLOCKER + + +minetest.register_node("railroad_paraphernalia:track_blocker", { + description = 'Track Blocker', + drawtype = "mesh", + mesh = "switch_blocker_off.b3d", + tiles = { "track_blocker.png" }, + node_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.5, 0.5, -0.4, 0.5}, + {-0.5, -0.5, -1.5, 0.5, 1, -0.5} + } + }, + selection_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.5, 0.5, -0.4, 0.5}, + {-0.5, -0.5, -1.5, 0.5, 1, -0.5} + } + }, + collisionbox = {-0.5, -0.5, -1.5, 0.5, 1, -0.5}, + groups = {snappy=1, choppy=2, oddly_breakable_by_hand=2, flammable=3}, + on_place = minetest.rotate_node, + paramtype = "light", + paramtype2 = "facedir", + --light_source = 3, + mesecons = { receptor = { + state = mesecon.state.off, + rules = mesecon.rules.flat + }}, + walkable = false, + after_place_node = function (pos, placer, itemstack, pointed_thing) + mesecon.receptor_off(pos, switch_get_rules(minetest.get_node(pos).param2)) + end, + on_rightclick = function (pos, node, player, itemstack, pointed_thing) + minetest.set_node(pos, { name = "railroad_paraphernalia:track_blocker_act", param2 = minetest.get_node(pos).param2 } ) + minetest.sound_play("piston_extend", { + pos = pos, + max_hear_distance = 20, + gain = 0.3, + }) + mesecon.receptor_on(pos, switch_get_rules(minetest.get_node(pos).param2)) + end +}) + +minetest.register_node("railroad_paraphernalia:track_blocker_act", { + --description = 'Track Blocker', + drawtype = "mesh", + mesh = "switch_blocker_on.b3d", + tiles = { "track_blocker.png" }, + node_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.5, 0.5, -0.4, 0.5}, + {-0.5, -0.5, -1.5, 0.5, 1, -0.5} + } + }, + selection_box = { + type = "fixed", + fixed = { + {-0.5, -0.5, -0.5, 0.5, -0.4, 0.5}, + {-0.5, -0.5, -1.5, 0.5, 1, -0.5} + } + }, + collisionbox = {-0.5, -0.5, -1.5, 0.5, 1, -0.5}, + groups = {snappy=1, choppy=2, oddly_breakable_by_hand=2, flammable=3, not_in_creative_inventory=1}, + on_place = minetest.rotate_node, + paramtype = "light", + paramtype2 = "facedir", + --light_source = 3, + mesecons = { receptor = { + state = mesecon.state.off, + rules = mesecon.rules.flat2 + }}, + walkable = true, + on_rightclick = function (pos, node, player, itemstack, pointed_thing) + minetest.set_node(pos, { name = "railroad_paraphernalia:track_blocker", param2 = minetest.get_node(pos).param2 } ) + minetest.sound_play("piston_retract", { + pos = pos, + max_hear_distance = 20, + gain = 0.3, + }) + mesecon.receptor_off(pos, switch_get_rules(minetest.get_node(pos).param2)) + end +}) + +minetest.register_craft({ + output = 'railroad_paraphernalia:track_blocker 2', + recipe = { + {'dye:white', 'dye:black', 'dye:white'}, + {'', 'default:stick', ''}, + {'dye:red', 'default:steel_ingot', 'default:steel_ingot'}, + } +}) + +-- ------------------------- + + +minetest.register_node("railroad_paraphernalia:shunting_signal", { + description = "Shunting signal", + drawtype = "mesh", + mesh = "shunting_signal.b3d", + tiles = { "shunting_signal_blue.png" }, + selection_box = { type = "fixed", + fixed = {{-0.33, -0.5, -0.33, 0.33, 0.4, 0.33}} + }, + collisionbox = {-0.33, -0.5, -0.33, 0.33, 0.4, 0.33}, + groups = {snappy=1, choppy=2, oddly_breakable_by_hand=2, flammable=3}, + on_place = minetest.rotate_node, + paramtype = "light", + paramtype2 = "facedir", + light_source = 1, + mesecons = { + effector = { + rules=mesecon.rules.shunting_signal, + action_on = function (pos, node) + minetest.swap_node(pos, {name = "railroad_paraphernalia:shunting_signal_act", param2 = node.param2}, true) + end + } + }, + on_rightclick = function (pos, node, player, itemstack, pointed_thing) + minetest.set_node(pos, { name = "railroad_paraphernalia:shunting_signal_act", param2 = minetest.get_node(pos).param2 } ) + minetest.sound_play("piston_extend", { + pos = pos, + max_hear_distance = 20, + gain = 0.3, + }) + end +}) + + + +minetest.register_node("railroad_paraphernalia:shunting_signal_act", { + --description = "Shunting signal", + drawtype = "mesh", + mesh = "shunting_signal.b3d", + tiles = { "shunting_signal_white.png" }, + selection_box = { type = "fixed", + fixed = {{-0.33, -0.5, -0.33, 0.33, 0.4, 0.33}} + }, + collisionbox = {-0.33, -0.5, -0.33, 0.33, 0.4, 0.33}, + groups = {snappy=1, choppy=2, oddly_breakable_by_hand=2, flammable=3, not_in_creative_inventory=1}, + on_place = minetest.rotate_node, + paramtype = "light", + paramtype2 = "facedir", + mesecons = { + effector = { + rules=mesecon.rules.shunting_signal, + action_off = function (pos, node) + minetest.swap_node(pos, {name = "railroad_paraphernalia:shunting_signal", param2 = node.param2}) + end + } + }, + on_rightclick = function (pos, node, player, itemstack, pointed_thing) + minetest.set_node(pos, { name = "railroad_paraphernalia:shunting_signal", param2 = minetest.get_node(pos).param2 } ) + minetest.sound_play("piston_extend", { + pos = pos, + max_hear_distance = 20, + gain = 0.3, + }) + end +}) + + +minetest.register_craft({ + output = 'railroad_paraphernalia:shunting_signal', + recipe = { + {'', 'dye:white', ''}, + {'', 'dye:blue', ''}, + {'', 'default:stone', ''}, + } +}) + +-- MISC --------------------- + +minetest.register_node("railroad_paraphernalia:limit_post", { + description = "Delimiting post", + drawtype = "mesh", + mesh = "limit_post.b3d", + tiles = { "limit_post.png" }, + selection_box = { type = "fixed", + fixed = {{-0.33, -0.5, -0.33, 0.33, 0.4, 0.33}} + }, + collisionbox = {-0.33, -0.5, -0.33, 0.33, 0.4, 0.33}, + groups = {snappy=1, choppy=2, oddly_breakable_by_hand=2, flammable=3}, + on_place = minetest.rotate_node, + paramtype = "light", + paramtype2 = "facedir" +}) + +minetest.register_craft({ + output = 'railroad_paraphernalia:limit_post', + recipe = { + {'', 'dye:black', ''}, + {'', 'dye:white', ''}, + {'', 'default:stone', ''}, + } +}) + +---- + diff --git a/models/limit_post.b3d b/models/limit_post.b3d Binary files differnew file mode 100644 index 0000000..fb79ba7 --- /dev/null +++ b/models/limit_post.b3d diff --git a/models/shunting_signal.b3d b/models/shunting_signal.b3d Binary files differnew file mode 100644 index 0000000..7dd940c --- /dev/null +++ b/models/shunting_signal.b3d diff --git a/models/switch_arrow_2_off.b3d b/models/switch_arrow_2_off.b3d Binary files differnew file mode 100644 index 0000000..44ce1c7 --- /dev/null +++ b/models/switch_arrow_2_off.b3d diff --git a/models/switch_arrow_2_off_textured.b3d b/models/switch_arrow_2_off_textured.b3d Binary files differnew file mode 100644 index 0000000..2735d5d --- /dev/null +++ b/models/switch_arrow_2_off_textured.b3d diff --git a/models/switch_arrow_2_on.b3d b/models/switch_arrow_2_on.b3d Binary files differnew file mode 100644 index 0000000..9b9dfac --- /dev/null +++ b/models/switch_arrow_2_on.b3d diff --git a/models/switch_arrow_off.b3d b/models/switch_arrow_off.b3d Binary files differnew file mode 100644 index 0000000..6b8bd9b --- /dev/null +++ b/models/switch_arrow_off.b3d diff --git a/models/switch_arrow_on.b3d b/models/switch_arrow_on.b3d Binary files differnew file mode 100644 index 0000000..7dfbad3 --- /dev/null +++ b/models/switch_arrow_on.b3d diff --git a/models/switch_ball_off.b3d b/models/switch_ball_off.b3d Binary files differnew file mode 100644 index 0000000..22d07c5 --- /dev/null +++ b/models/switch_ball_off.b3d diff --git a/models/switch_ball_on.b3d b/models/switch_ball_on.b3d Binary files differnew file mode 100644 index 0000000..4241159 --- /dev/null +++ b/models/switch_ball_on.b3d diff --git a/models/switch_blocker_off.b3d b/models/switch_blocker_off.b3d Binary files differnew file mode 100644 index 0000000..4754c75 --- /dev/null +++ b/models/switch_blocker_off.b3d diff --git a/models/switch_blocker_on.b3d b/models/switch_blocker_on.b3d Binary files differnew file mode 100644 index 0000000..a426959 --- /dev/null +++ b/models/switch_blocker_on.b3d diff --git a/models/switch_lamp_2_off.b3d b/models/switch_lamp_2_off.b3d Binary files differnew file mode 100644 index 0000000..e2d294a --- /dev/null +++ b/models/switch_lamp_2_off.b3d diff --git a/models/switch_lamp_2_on.b3d b/models/switch_lamp_2_on.b3d Binary files differnew file mode 100644 index 0000000..be5df83 --- /dev/null +++ b/models/switch_lamp_2_on.b3d diff --git a/models/switch_light_off.b3d b/models/switch_light_off.b3d Binary files differnew file mode 100644 index 0000000..9b9b26f --- /dev/null +++ b/models/switch_light_off.b3d diff --git a/models/switch_light_on.b3d b/models/switch_light_on.b3d Binary files differnew file mode 100644 index 0000000..368844b --- /dev/null +++ b/models/switch_light_on.b3d diff --git a/models/switch_off.b3d b/models/switch_off.b3d Binary files differnew file mode 100644 index 0000000..6eff541 --- /dev/null +++ b/models/switch_off.b3d diff --git a/models/switch_on.b3d b/models/switch_on.b3d Binary files differnew file mode 100644 index 0000000..1fa1330 --- /dev/null +++ b/models/switch_on.b3d diff --git a/src.blend/limit_post.blend b/src.blend/limit_post.blend Binary files differnew file mode 100644 index 0000000..fe994fc --- /dev/null +++ b/src.blend/limit_post.blend diff --git a/src.blend/shunting_signal.blend b/src.blend/shunting_signal.blend Binary files differnew file mode 100644 index 0000000..2bbeb90 --- /dev/null +++ b/src.blend/shunting_signal.blend diff --git a/src.blend/switch_arrow_2_off.blend b/src.blend/switch_arrow_2_off.blend Binary files differnew file mode 100644 index 0000000..079ab21 --- /dev/null +++ b/src.blend/switch_arrow_2_off.blend diff --git a/src.blend/switch_arrow_2_on.blend b/src.blend/switch_arrow_2_on.blend Binary files differnew file mode 100644 index 0000000..e2689fe --- /dev/null +++ b/src.blend/switch_arrow_2_on.blend diff --git a/src.blend/switch_arrow_off.blend b/src.blend/switch_arrow_off.blend Binary files differnew file mode 100644 index 0000000..183d754 --- /dev/null +++ b/src.blend/switch_arrow_off.blend diff --git a/src.blend/switch_arrow_on.blend b/src.blend/switch_arrow_on.blend Binary files differnew file mode 100644 index 0000000..65b750a --- /dev/null +++ b/src.blend/switch_arrow_on.blend diff --git a/src.blend/switch_ball_off.blend b/src.blend/switch_ball_off.blend Binary files differnew file mode 100644 index 0000000..6067b36 --- /dev/null +++ b/src.blend/switch_ball_off.blend diff --git a/src.blend/switch_ball_on.blend b/src.blend/switch_ball_on.blend Binary files differnew file mode 100644 index 0000000..54b4cd0 --- /dev/null +++ b/src.blend/switch_ball_on.blend diff --git a/src.blend/switch_lamp_2_off.blend b/src.blend/switch_lamp_2_off.blend Binary files differnew file mode 100644 index 0000000..4695cbb --- /dev/null +++ b/src.blend/switch_lamp_2_off.blend diff --git a/src.blend/switch_lamp_2_on.blend b/src.blend/switch_lamp_2_on.blend Binary files differnew file mode 100644 index 0000000..35e4842 --- /dev/null +++ b/src.blend/switch_lamp_2_on.blend diff --git a/src.blend/switch_light_off.blend b/src.blend/switch_light_off.blend Binary files differnew file mode 100644 index 0000000..5f8eb02 --- /dev/null +++ b/src.blend/switch_light_off.blend diff --git a/src.blend/switch_light_on.blend b/src.blend/switch_light_on.blend Binary files differnew file mode 100644 index 0000000..312b83f --- /dev/null +++ b/src.blend/switch_light_on.blend diff --git a/src.blend/switch_off.blend b/src.blend/switch_off.blend Binary files differnew file mode 100644 index 0000000..6b9727f --- /dev/null +++ b/src.blend/switch_off.blend diff --git a/src.blend/switch_on.blend b/src.blend/switch_on.blend Binary files differnew file mode 100644 index 0000000..7569785 --- /dev/null +++ b/src.blend/switch_on.blend diff --git a/textures/bwarrow.png b/textures/bwarrow.png Binary files differnew file mode 100644 index 0000000..6d5ea59 --- /dev/null +++ b/textures/bwarrow.png diff --git a/textures/bwarrow2.png b/textures/bwarrow2.png Binary files differnew file mode 100644 index 0000000..02f04cc --- /dev/null +++ b/textures/bwarrow2.png diff --git a/textures/limit_post.png b/textures/limit_post.png Binary files differnew file mode 100644 index 0000000..6992220 --- /dev/null +++ b/textures/limit_post.png diff --git a/textures/points_lever_arrow.png b/textures/points_lever_arrow.png Binary files differnew file mode 100644 index 0000000..f243d37 --- /dev/null +++ b/textures/points_lever_arrow.png diff --git a/textures/points_lever_lamp.png b/textures/points_lever_lamp.png Binary files differnew file mode 100644 index 0000000..869f616 --- /dev/null +++ b/textures/points_lever_lamp.png diff --git a/textures/shunting_signal.png b/textures/shunting_signal.png Binary files differnew file mode 100644 index 0000000..48f4238 --- /dev/null +++ b/textures/shunting_signal.png diff --git a/textures/shunting_signal_blue.png b/textures/shunting_signal_blue.png Binary files differnew file mode 100644 index 0000000..56a27f5 --- /dev/null +++ b/textures/shunting_signal_blue.png diff --git a/textures/shunting_signal_white.png b/textures/shunting_signal_white.png Binary files differnew file mode 100644 index 0000000..ede9701 --- /dev/null +++ b/textures/shunting_signal_white.png diff --git a/textures/switch_arrow_2_off.png b/textures/switch_arrow_2_off.png Binary files differnew file mode 100644 index 0000000..8e6e33a --- /dev/null +++ b/textures/switch_arrow_2_off.png diff --git a/textures/switch_arrow_off.png b/textures/switch_arrow_off.png Binary files differnew file mode 100644 index 0000000..7766f6e --- /dev/null +++ b/textures/switch_arrow_off.png diff --git a/textures/switch_arrow_on.png b/textures/switch_arrow_on.png Binary files differnew file mode 100644 index 0000000..0161a29 --- /dev/null +++ b/textures/switch_arrow_on.png diff --git a/textures/switch_ball_off.png b/textures/switch_ball_off.png Binary files differnew file mode 100644 index 0000000..4ace153 --- /dev/null +++ b/textures/switch_ball_off.png diff --git a/textures/switch_ball_on.png b/textures/switch_ball_on.png Binary files differnew file mode 100644 index 0000000..69237c1 --- /dev/null +++ b/textures/switch_ball_on.png diff --git a/textures/switch_light_off.png b/textures/switch_light_off.png Binary files differnew file mode 100644 index 0000000..af2e29f --- /dev/null +++ b/textures/switch_light_off.png diff --git a/textures/switch_light_on.png b/textures/switch_light_on.png Binary files differnew file mode 100644 index 0000000..f4d072f --- /dev/null +++ b/textures/switch_light_on.png diff --git a/textures/switch_off.png b/textures/switch_off.png Binary files differnew file mode 100644 index 0000000..2f066db --- /dev/null +++ b/textures/switch_off.png diff --git a/textures/switch_on.png b/textures/switch_on.png Binary files differnew file mode 100644 index 0000000..55eef7e --- /dev/null +++ b/textures/switch_on.png diff --git a/textures/track_blocker.png b/textures/track_blocker.png Binary files differnew file mode 100644 index 0000000..f97f302 --- /dev/null +++ b/textures/track_blocker.png |