diff options
author | orwell96 <mono96.mml@gmail.com> | 2016-12-13 19:40:20 +0100 |
---|---|---|
committer | orwell96 <mono96.mml@gmail.com> | 2016-12-13 19:40:20 +0100 |
commit | 6eea76a2ffad58628b0d8941e8d0ed34580a8876 (patch) | |
tree | bf8fc50c54eb7361884607343da601d220a6d12e | |
parent | 1f66cab1695fdc92a586d28805a5acfba6662983 (diff) | |
download | advtrains-6eea76a2ffad58628b0d8941e8d0ed34580a8876.tar.gz advtrains-6eea76a2ffad58628b0d8941e8d0ed34580a8876.tar.bz2 advtrains-6eea76a2ffad58628b0d8941e8d0ed34580a8876.zip |
Don't decrease stack itemcount of slope placer in creative
-rw-r--r-- | advtrains.zip | bin | 1488682 -> 1488715 bytes | |||
-rw-r--r-- | tracks.lua | 6 |
2 files changed, 4 insertions, 2 deletions
diff --git a/advtrains.zip b/advtrains.zip Binary files differindex 318fd14..6640cfc 100644 --- a/advtrains.zip +++ b/advtrains.zip @@ -505,12 +505,14 @@ function sl.create_slopeplacer_on_place(def, preset) if not minetest.registered_nodes[node.name] or not minetest.registered_nodes[node.name].buildable_to or minetest.is_protected(pos, player:get_player_name()) then
--do slopes of this distance exist?
if lookup[step] then
- if istack:get_count()>=step then
+ if minetest.setting_getbool("creative_mode") or istack:get_count()>=step then
--start placing
local placenodes=lookup[step]
while step>0 do
minetest.set_node(pos, {name=def.nodename_prefix.."_"..placenodes[step], param2=param2})
- istack:take_item()
+ if not minetest.setting_getbool("creative_mode") then
+ istack:take_item()
+ end
step=step-1
pos=vector.subtract(pos, dirvec)
end
|