Commit Graph

12 Commits

Author SHA1 Message Date
Zefram a8c8ef0890 Correctly display multi-group ingredients
Extend the representative-item logic to handle ingredients specified
as the intersection of multiple groups.  Also add mangling of item
button content, because comma for a multi-group ingredient is getting
formspec-escaped and then not de-escaped.
2014-06-13 09:28:37 -03: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 37d87d6afc Only do paperflip sound when really changing page 2014-04-29 20:40:48 +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
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 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
ShadowNinja ec328d8270 Change craft guide input slots to buttons 2013-10-02 22:23:35 -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