aboutsummaryrefslogtreecommitdiff
path: root/trackplacer.lua
diff options
context:
space:
mode:
authorAndrey K <NaruTrey@users.noreply.github.com>2016-06-09 23:06:39 +0400
committerAndrey K <NaruTrey@users.noreply.github.com>2016-06-09 23:06:39 +0400
commitf7cf9d773c16f8f7ade37dc308a96c4d14bf0f16 (patch)
treea2a44fce26ac028a5dcf962733c470e5e794edbe /trackplacer.lua
parent40f3f2eb5d7ff873c613e06c145a4811e9465bf0 (diff)
downloadadvtrains-f7cf9d773c16f8f7ade37dc308a96c4d14bf0f16.tar.gz
advtrains-f7cf9d773c16f8f7ade37dc308a96c4d14bf0f16.tar.bz2
advtrains-f7cf9d773c16f8f7ade37dc308a96c4d14bf0f16.zip
Unlimited rails in creative mode
Diffstat (limited to 'trackplacer.lua')
-rw-r--r--trackplacer.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/trackplacer.lua b/trackplacer.lua
index 68c1c7c..b1e57a5 100644
--- a/trackplacer.lua
+++ b/trackplacer.lua
@@ -122,7 +122,9 @@ function advtrains.register_track_placer(nnprefix, imgprefix, dispname)
local pos=pointed_thing.above
if minetest.registered_nodes[minetest.get_node(pos).name] and minetest.registered_nodes[minetest.get_node(pos).name].buildable_to then
advtrains.placetrack(pos, nnprefix)
- itemstack:take_item()
+ if not minetest.setting_getbool("creative_mode") then
+ itemstack:take_item()
+ end
end
end
return itemstack
@@ -197,4 +199,4 @@ minetest.register_craftitem("advtrains:trackworker",{
end
end
end,
-}) \ No newline at end of file
+})