Commit Graph

149 Commits

Author SHA1 Message Date
Zefram
79320c109c Respect not_in_creative_inventory in group search 2014-05-02 12:21:10 +02:00
Zefram
12ef7f6393 Remove stray debugging print
Previous commit left this in.
2014-05-02 12:20:13 +02:00
Zefram
b492701915 Show group ingredients visually in craft guide
Where a recipe specifies an ingredient by group, show a typical group
item pictorially, with a label flag to indicate that it's a group rather
than the single item.  This is the inverse of the previous arrangement,
which identified the group by label and dipicted groupiness pictorially.
The new arrangement is easier to interpret, and if the labels are ignored
it actually shows a correct input to the crafting grid.
2014-05-02 12:19:17 +02:00
Zefram
5d34b235dd Handle ingredient quantities in craft guide
Alloy cooking recipes have quantities for the ingredients, which need to
be shown.  The buttons on which the ingredients are shown don't natively
support showing an item count, so hack it up with the label facility.
Also, the button names, supporting clicking to see recipes recursively,
need to be based only on the item name part of the ingredient, dropping
the quantity part.
2014-05-02 12:14:48 +02:00
Zefram
b3d83bc953 Support item-dependent refill behaviour
The refill slot was only putting as many items as possible in a
stack, which does nothing for tools.  Tools could benefit from repair,
recharging, or other behaviour depending on the type of tool.  Change the
default refill behaviour to repair mechanical wear as well as fully
stacking.  Because other kinds of refill will require knowledge of the
metadata format, they can't be directly handled here.  So add an on_refill
hook, that tool definitions can supply to plug in appropriate behaviour.
2014-04-30 10:45:45 +01:00
Zefram
d1e554b73d Cleaner display of lack of recipes
When the current craft guide item has no recipes, show the item and a
"No recipes" message, but suppress all other recipe UI elements.
2014-04-30 01:10:46 +01:00
Zefram
580a832fda Use appropriate grid shape for each craft type
New system of registration of craft types, recording for each a display
description and the appropriate grid shape.  Recipes of a registered type
are shown in the correct grid.  Recipes of unregistered craft types are
still displayed as before, using the default 3x3 grid.
2014-04-30 00:11:10 +01:00
Zefram
48d28b1e5d Show non-identity digging results in craft guide 2014-04-29 22:14:08 +01:00
Zefram
87cfad559b Don't overwrite registered crafts
The crafts_table was being initialised to contain only core-registered
crafts, but this would overwrite any non-core craft types that had
already been registered via unified_inventory.register_craft().  This was
especially likely because the crafts_table initialisation runs on a delay,
following all normal initialisation.  Instead, feed the core-registered
crafts into unified_inventory.register_craft().
2014-04-29 21:38:31 +01:00
Zefram
37d87d6afc Only do paperflip sound when really changing page 2014-04-29 20:40:48 +01:00
Zefram
b0e10d44f4 Tweak display of searching status
When the current search produces no results, give a specific message
rather than "Page 1 of 0".  Don't display the "Filter:" label if no
filtering is currently applied.
2014-04-29 20:08:04 +01:00
Zefram
01297996a6 Preserve player's search string
Keep the current inventory search string when performing inventory
form actions other than searching.  This means the player's input is
not lost if the player breaks off from entering it to switch pages,
or if the player absent-mindedly ends text input with <return>.
2014-04-29 19:36:52 +01:00
Zefram
20cf474886 Fix formspec injection issues 2014-04-29 17:53:43 +01:00
Zefram
76a2337c59 Show bag number when displaying bag contents 2014-04-29 17:19:57 +01:00
ShadowNinja
5e52f3c49c Add .gitignore 2014-04-22 16:52:04 -04:00
ShadowNinja
910c9fad5b Update README 2014-04-22 16:52:04 -04:00
Zefram
fa0142c2c0 Look for recipes under an item's aliases
get_all_craft_recipes() returns the recipes that were registered under the
specified name, so asking about an item's canonical name won't see recipes
registered under an alias, and vice versa.  Several mods register recipes
under aliases, so the craft guide was missing that handful of recipes.
To work around it, invert the aliases table and ask explicitly about
each alias.
2014-04-22 16:52:04 -04:00
RealBadAngel
34a52a4c0f Remove text from on/off switch icons 2014-01-22 08:06:02 +01:00
RealBadAngel
7cdae9bafc Icons for on/off switch and waypoints button. 2014-01-22 07:30:04 +01:00
ShadowNinja
34fe44356d Remove unnecessary recipe table copying 2014-01-19 14:00:49 -05:00
ShadowNinja
26473a8346 Remove trailing whitespace 2014-01-19 13:27:52 -05:00
kaeza
d560bcd6f0 Allow searching for groups.
Also make "group buttons" apply the filter to that group.
2014-01-19 14:35:44 -02:00
ShadowNinja
b69fc35c88 Allow Lua regexs in search, and check for bad ones 2013-12-21 12:26:37 -05:00
ShadowNinja
d30b33ba24 Combine some concatenations 2013-12-20 23:45:59 -05:00
ShadowNinja
881cbe70ce Localize a variable 2013-12-18 17:13:54 -05:00
ShadowNinja
982c58e8b4 Remove technic textures 2013-12-17 19:19:27 -05:00
ShadowNinja
d5f60ed136 Check formname in on_receive_fields 2013-12-04 10:43:49 -05:00
ShadowNinja
3db5f629f2 Give a stack's maximum, not 99 2013-11-28 01:20:21 -05:00
Vanessa Ezekowitz
ee93afd439 Fix incorrect background colors over inventory slots
caused by BlockMen's/kahrl's inventory #hexcolor patch
( 25edae00ea )
2013-11-05 10:46:49 -05:00
kaeza
2b5bf5fe95 Allow crafting from the craft guide. 2013-10-21 07:47:50 +02:00
RealBadAngel
e44deedc53 Fix the bug clearing other than default crafting methods. 2013-10-07 04:16:31 +02:00
ShadowNinja
7fb9cfa3c9 Remove trailing space 2013-10-05 23:51:49 -04:00
RealBadAngel
aec3cb2fc1 Fix textures aligment problems.
Some other tweaks.
2013-10-05 22:48:45 +02:00
ShadowNinja
002e9931ab Fix filter sanitizing 2013-10-03 12:43:05 -04:00
ShadowNinja
04600f64d8 API tweaks 2013-10-02 23:25:07 -04:00
ShadowNinja
ec328d8270 Change craft guide input slots to buttons 2013-10-02 22:23:35 -04:00
Jordan Snelling
c327d2c49d Create README.md 2013-09-30 16:57:02 +01:00
ShadowNinja
dcb7f2ec2b Fix offset of buttons 2013-09-28 19:24:43 -04:00
ShadowNinja
88a740c840 Use ItemStack:set_count() 2013-09-28 18:36:45 -04:00
ShadowNinja
f974fd8c2c Update 2013-09-28 18:15:37 -04:00
RealBadAngel
e3d391d63f Update mod 2013-09-21 21:40:20 +02:00
RealBadAngel
0ba8e7eeae bugfix 2013-03-06 22:04:29 +01:00
RealBadAngel
adac1aedc4 sync with Technic's UI 2013-03-03 16:28:24 +01:00
RealBadAngel
2fa07f5c30 When in surrival, pressing item list button will switch to Crafting Guide 2012-12-12 15:52:01 +01:00
RealBadAngel
faffd2ae65 - fixed refill slot bein same for all players
- set time buttons now require settime privs to work
- item name (regular) is displayed in Crafting guide
2012-12-12 08:21:25 +01:00
RealBadAngel
43e308a815 New version:
another structure, its a modpack now
searches are not case sensitive
2012-12-11 00:48:23 +01:00
RealBadAngel
5baccadd93 0.91 release 2012-12-03 23:36:15 +01:00
RealBadAngel
35e91348dd quick fix 2012-12-02 21:14:19 +01:00
RealBadAngel
216078a0f8 1st release 2012-12-02 10:08:32 +01:00