aboutsummaryrefslogtreecommitdiff
path: root/trackplacer.lua
diff options
context:
space:
mode:
authororwell96 <mono96.mml@gmail.com>2016-09-13 18:05:59 +0200
committerorwell96 <mono96.mml@gmail.com>2016-09-13 18:05:59 +0200
commitc4a26de487091b95a891d739a89656cacba109d4 (patch)
treef3c567fc0beb51aec7a003a9f4077a782f3bd9bf /trackplacer.lua
parenta93fb4345e084a0fc67656b85084d9841a3c5ec9 (diff)
downloadadvtrains-c4a26de487091b95a891d739a89656cacba109d4.tar.gz
advtrains-c4a26de487091b95a891d739a89656cacba109d4.tar.bz2
advtrains-c4a26de487091b95a891d739a89656cacba109d4.zip
various improvements on signals and bumpers
Diffstat (limited to 'trackplacer.lua')
-rw-r--r--trackplacer.lua8
1 files changed, 5 insertions, 3 deletions
diff --git a/trackplacer.lua b/trackplacer.lua
index 21d40f0..1dbdffa 100644
--- a/trackplacer.lua
+++ b/trackplacer.lua
@@ -192,7 +192,7 @@ end
minetest.register_craftitem("advtrains:trackworker",{
- description = "Track Worker Tool\n\nLeft-click: change rail type (straight/curve/switch)\nRight-click: rotate rail",
+ description = "Track Worker Tool\n\nLeft-click: change rail type (straight/curve/switch)\nRight-click: rotate rail/bumper/signal/etc.",
groups = {cracky=1}, -- key=name, value=rating; rating=1..3.
inventory_image = "advtrains_trackworker.png",
wield_image = "advtrains_trackworker.png",
@@ -202,7 +202,7 @@ minetest.register_craftitem("advtrains:trackworker",{
local pos=pointed_thing.under
local node=minetest.get_node(pos)
- if not advtrains.is_track_and_drives_on(minetest.get_node(pos).name, advtrains.all_tracktypes) then return end
+ --if not advtrains.is_track_and_drives_on(minetest.get_node(pos).name, advtrains.all_tracktypes) then return end
if advtrains.is_train_at_pos(pos) then return end
local nnprefix, suffix, rotation=string.match(node.name, "^([^_]+)_([^_]+)(_?.*)$")
@@ -233,7 +233,7 @@ minetest.register_craftitem("advtrains:trackworker",{
local pos=pointed_thing.under
local node=minetest.get_node(pos)
- if not advtrains.is_track_and_drives_on(minetest.get_node(pos).name, advtrains.all_tracktypes) then return end
+ --if not advtrains.is_track_and_drives_on(minetest.get_node(pos).name, advtrains.all_tracktypes) then return end
if advtrains.is_train_at_pos(pos) then return end
local nnprefix, suffix, rotation=string.match(node.name, "^([^_]+)_([^_]+)(_?.*)$")
@@ -245,6 +245,8 @@ minetest.register_craftitem("advtrains:trackworker",{
minetest.set_node(pos, {name=nnprefix.."_"..nextsuffix..rotation, param2=node.param2})
--invalidate trains
advtrains.invalidate_all_paths()
+ else
+ print(dump(tp.tracks))
end
end,
})