mirror of
https://github.com/minetest-mods/moreblocks.git
synced 2025-07-11 12:30:25 +02:00
disallow putting stacks w/metadata into stations (currently, metadata is lost)
This commit is contained in:
@ -2,6 +2,7 @@
|
||||
|
||||
local api = stairsplus.api
|
||||
|
||||
local has_metadata = stairsplus.util.has_metadata
|
||||
local resolve_aliases = stairsplus.util.resolve_aliases
|
||||
|
||||
local default_stack_max = tonumber(minetest.settings:get("default_stack_max")) or 99
|
||||
@ -171,6 +172,10 @@ function station.allow_inventory_put(meta, inv, listname, index, stack, player)
|
||||
return 0
|
||||
end
|
||||
|
||||
if has_metadata(stack) then
|
||||
return 0
|
||||
end
|
||||
|
||||
local to_put_node = resolve_aliases(stack:get_name())
|
||||
local node = api.get_node_of_shaped_node(to_put_node)
|
||||
local shape = api.get_shape_of_shaped_node(to_put_node)
|
||||
|
Reference in New Issue
Block a user