forked from minetest-mods/unified_inventory
ea4151dfa7353095857d0489753164504a5c060a
This way the slots are all nice and crisp regardless of GUI scale or
image size, and we only need the single slot and its bright version.
This also makes the standard crafting grid into a style table entry that
can be referenced to insert the crafting grid at its proper
style-specific position in any formspec.
And it also makes the craft grid arrow, its X position, and the crafting
grid's result slot X position into style table entries.
Includes a few public helper functions to do most of the work:
`ui.single_slot(xpos, ypos, bright)`
Does just what it sounds like: it returns a single slot image.
`xpos` and `ypos` are normal coordinates in slots, as you'd use in
`image[]` element. `bright` is a flag that switches to the brighter
version of the slot image.
`ui.make_trash_slot(xpos, ypos)`
Creates a single slot, with a one-item `list[]` and a trash can icon
overlay.
`ui.make_inv_img_grid(xpos, ypos, width, height, bright)`
Generates a `width` by `height` grid of slot images, using the
single_slot function above, starting at (`xpos`,`ypos`) for the
top-left. Position is as in any `image[]` element, and dimensions
are in integer numbers of slots (so 8,4 would be a standard inventory).
`bright` is as above.
All three return a string that can be directly inserted into a formspec.
Unified Inventory
Unified Inventory replaces the default survival and creative inventory.
Features
- Node, item and tool browser
- Crafting guide
- Can copy the recipe to the crafting grid
- Recipe search function by ingredients
- Up to four bags with up to 24 slots each
- Home function to teleport
- Trash slot
- Lite mode: reduces the item browser width
minetest.confsettingunified_inventory_lite = true
- Mod API for modders: see mod_api.txt
- Setting-determinated features: see settingtypes.txt
Requirements
- Minetest 5.0.0+
Licenses
Copyright (C) 2012-2014 Maciej Kasatkin (RealBadAngel)
Copyright (C) 2012-? Various minetest-mods contributors
Code
GNU LGPLv2+, see license notice
Textures
VanessaE: (CC-BY-4.0)
ui_group.png
Tango Project: (Public Domain, CC-BY-4.0)
ui_reset_icon.pngui_doubleleft_icon.pngui_doubleright_icon.pngui_left_icon.png/ui_right_icon.pngui_skip_backward_icon.pngui_skip_forward_icon.png
From http://www.clker.com (Public Domain, CC-BY-4.0):
bags_small.pngbags_medium.pngbags_large.png/ui_bags_icon.pngui_trash_icon.png: http://www.clker.com/clipart-29090.html and http://www.clker.com/clipart-trash.htmlui_search_icon.pngui_off_icon.png/ui_on_icon.pngui_waypoints_icon.pngui_circular_arrows_icon.pngui_pencil_icon.pncui_waypoint_set_icon.png
Everaldo Coelho (YellowIcon) (LGPL v2.1+):
Gregory H. Revera: (CC-BY-SA 3.0)
Thomas Bresson: (CC-BY 3.0)
Fibonacci: (Public domain, CC-BY 4.0)
Gregory Maxwell: (Public domain, CC-BY 4.0)
Adrien Facélina: (LGPL v2.1+)
Other files from Wikimedia Commons:
RealBadAngel: (CC-BY-4.0)
- Everything else.
Description
An extensible inventory mod which allows searching crafting and browsing for recipes in the same dialogue.
Languages
Lua
100%
