Don't decrease stack itemcount of slope placer in creative
This commit is contained in:
parent
1f66cab169
commit
6eea76a2ff
BIN
advtrains.zip
BIN
advtrains.zip
Binary file not shown.
|
@ -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
|
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?
|
--do slopes of this distance exist?
|
||||||
if lookup[step] then
|
if lookup[step] then
|
||||||
if istack:get_count()>=step then
|
if minetest.setting_getbool("creative_mode") or istack:get_count()>=step then
|
||||||
--start placing
|
--start placing
|
||||||
local placenodes=lookup[step]
|
local placenodes=lookup[step]
|
||||||
while step>0 do
|
while step>0 do
|
||||||
minetest.set_node(pos, {name=def.nodename_prefix.."_"..placenodes[step], param2=param2})
|
minetest.set_node(pos, {name=def.nodename_prefix.."_"..placenodes[step], param2=param2})
|
||||||
|
if not minetest.setting_getbool("creative_mode") then
|
||||||
istack:take_item()
|
istack:take_item()
|
||||||
|
end
|
||||||
step=step-1
|
step=step-1
|
||||||
pos=vector.subtract(pos, dirvec)
|
pos=vector.subtract(pos, dirvec)
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue