Merge 597234970a
into 2c9449b6e7
This commit is contained in:
commit
690c0d847a
15
bags.lua
15
bags.lua
|
@ -249,20 +249,27 @@ minetest.register_allow_player_inventory_action(function(player, action, invento
|
||||||
end
|
end
|
||||||
end)
|
end)
|
||||||
|
|
||||||
-- register bag tools
|
local register
|
||||||
minetest.register_tool("unified_inventory:bag_small", {
|
if minetest.settings:get_bool("unified_inventory_stackable_bags", false) then
|
||||||
|
register = minetest.register_craftitem
|
||||||
|
else
|
||||||
|
register = minetest.register_tool
|
||||||
|
end
|
||||||
|
|
||||||
|
-- register bags
|
||||||
|
register("unified_inventory:bag_small", {
|
||||||
description = S("Small Bag"),
|
description = S("Small Bag"),
|
||||||
inventory_image = "bags_small.png",
|
inventory_image = "bags_small.png",
|
||||||
groups = {bagslots=8},
|
groups = {bagslots=8},
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_tool("unified_inventory:bag_medium", {
|
register("unified_inventory:bag_medium", {
|
||||||
description = S("Medium Bag"),
|
description = S("Medium Bag"),
|
||||||
inventory_image = "bags_medium.png",
|
inventory_image = "bags_medium.png",
|
||||||
groups = {bagslots=16},
|
groups = {bagslots=16},
|
||||||
})
|
})
|
||||||
|
|
||||||
minetest.register_tool("unified_inventory:bag_large", {
|
register("unified_inventory:bag_large", {
|
||||||
description = S("Large Bag"),
|
description = S("Large Bag"),
|
||||||
inventory_image = "bags_large.png",
|
inventory_image = "bags_large.png",
|
||||||
groups = {bagslots=24},
|
groups = {bagslots=24},
|
||||||
|
|
|
@ -34,3 +34,6 @@ unified_inventory_only_names (HUD item name: first line only) bool true
|
||||||
# Crops the shown description to the specified length.
|
# Crops the shown description to the specified length.
|
||||||
# 0 disables this functionality.
|
# 0 disables this functionality.
|
||||||
unified_inventory_max_item_name_length (HUD item names: character limit) int 80
|
unified_inventory_max_item_name_length (HUD item names: character limit) int 80
|
||||||
|
|
||||||
|
# If true, bags will be stackable to the default stack max
|
||||||
|
unified_inventory_stackable_bags (Stackable bags) bool false
|
||||||
|
|
Loading…
Reference in New Issue