aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authororwell96 <mono96.mml@gmail.com>2016-06-09 22:38:09 +0200
committerGitHub <noreply@github.com>2016-06-09 22:38:09 +0200
commit209a42147cf11c6aaeac04d1a8bd8a24d50c7926 (patch)
tree222744dc1471e94aa677ad5bb45763f28112ca00
parentbf83ec7ff126ec2a830655324e9c750539a1e931 (diff)
parentf7cf9d773c16f8f7ade37dc308a96c4d14bf0f16 (diff)
downloadadvtrains-209a42147cf11c6aaeac04d1a8bd8a24d50c7926.tar.gz
advtrains-209a42147cf11c6aaeac04d1a8bd8a24d50c7926.tar.bz2
advtrains-209a42147cf11c6aaeac04d1a8bd8a24d50c7926.zip
Merge pull request #2 from NaruTrey/master
Unlimited rails in creative mode
-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
+})