Commit Graph

67 Commits

Author SHA1 Message Date
Andrey Kozlovskiy
bcc6774ff8 Add unified_inventory function prefix 2019-08-23 04:19:30 +03:00
Andrey Kozlovskiy
e0b28931c5 Implement new crafting algorithm 2019-08-22 22:56:46 +03:00
Panquesito7
4403b696be Replace deprecated functions with newer ones (#131)
These commits makes more compatibility with MT/MTG 5.0.0+ versions.
However, these commits breaks compatibility with the 0.4-series.
2019-06-16 10:26:40 +02:00
SmallJoker
b871ccfc41 Use table.concat to build formspecs, style cleanups 2019-03-31 11:29:10 +02:00
SmallJoker
e9b4b52dc1 Biggest stacks first, smallest as late as possible
Split stacks ~evenly
Fast skip occupied slots
2019-03-30 22:53:36 +01:00
SmallJoker
bcb96d6caf Improve craftguide_craft() speed: Move stacks 2019-03-30 22:53:36 +01:00
SmallJoker
850ee9cbc0 Improve callback execution, add giveme guards 2019-02-17 15:14:38 +01:00
codexp
3988f4c572 Merge origin/master to refactor-translation branch (resolving conflicts) 2018-06-23 15:37:13 +02:00
SmallJoker
edd00f222c Replace deprecated function names, unify creative check 2018-06-23 15:02:23 +02:00
codexp
934757edd6 FIX: do not translate direction 2018-04-08 22:21:44 +02:00
codexp
c1ab7277ab refactor code to use with intllib tool 2018-04-02 13:33:36 +02:00
ForbiddenJ
7ab8825460 Make trash configurable but preserve default functionality 2017-03-01 16:28:40 -06:00
Vanessa Ezekowitz
2e00206f58 Merge pull request #81 from Wuzzy2/master
Disable useless main buttons
2016-11-27 13:36:02 -05:00
Vanessa Ezekowitz
e57a5f80b4 Merge pull request #80 from Wuzzy2/give
Also enable “Give me” for creative mode and priv
2016-11-27 13:31:12 -05:00
Wuzzy
8770b7df93 Disable useless main buttons 2016-11-06 02:28:45 +01:00
Wuzzy
a661f54e72 Also enable “Give me” for creative mode and priv 2016-11-06 01:48:05 +01:00
Wuzzy
8e98b00021 Also show “real” item name in craft result 2016-10-29 14:20:11 +02:00
Wuzzy
15f5b8e804 Craftguide: Use better tooltips for group buttons 2016-08-14 23:36:12 +02:00
Wuzzy
0678056716 Fix horizontally flipped crafting recipes in guide 2016-08-14 13:17:41 +02:00
Wuzzy
3bc3fae648 Hide “To crafting grid:” for crafts with size > 3 2016-08-14 13:16:30 +02:00
Wuzzy
2ef76af687 Apply size optimizations for large craftings
Also prevent huge crafting recipes from being displayed for stability reasons.
2016-08-14 13:16:30 +02:00
Wuzzy
c1fcc06059 Fix horizontal craft guide offset for large crafts 2016-08-14 13:16:30 +02:00
Wuzzy
f8082a0e35 Fix crafting guide grid button sizes for size>4 2016-08-14 13:16:30 +02:00
Wuzzy
5c57915159 Attempt to make large crafting recipes displayable 2016-08-14 13:16:30 +02:00
Wuzzy
a1e7b650ab Guide: Allow to move back and forth in alternates 2016-08-14 10:56:24 +02:00
Vanessa Ezekowitz
23a27b38ae Revert "Show real item name in craft guide"
Players don't really like this, neither do I.
See the comments attached to the original commit.
Sorry, Wuzzy. :-(

This reverts commit fe00059eea.
2016-08-13 18:19:29 -04:00
Wuzzy
fe00059eea Show real item name in craft guide 2016-08-08 09:19:23 -04:00
Wuzzy
c816666945 Ensure formspec escaping for translated strings 2016-08-06 17:23:46 +02:00
Wuzzy
8ffc8e9323 Fix translation strings for recipe alternations 2016-08-06 16:34:16 +02:00
Wuzzy
115e0bfaf4 Collect missing strings for translation 2016-08-05 19:34:40 +02:00
RealBadAngel
b3c6c92286 Remove count from item_image_button label,
item_image_buttons can now display properly item stacks
2016-02-09 04:42:45 +01:00
DonBatman
df1309a6fd Added listring/shift click to craft grid 2015-10-09 19:25:49 -07:00
Vanessa Ezekowitz
9fe84789ba Allow per-user "full" mode when "lite" mode is set as global
default (give the user "ui_full" priv to turn it on).

Also, a few whitespace fixes.
2015-10-05 04:24:01 -04:00
HybridDog
babe4380ac disallow repairing tools using the 'to craft grid', allow it to put items of specific groups and (maybe) make it keep the meta of items, remove unused elseif, change a bit translation and use table.concat at one place because I read somewhere that it's faster than .. 2015-08-16 16:40:49 +02:00
Vanessa Ezekowitz
2d6a0ed606 split ui_crafting_form
into craft grid/trash image and a single slot image.  The latter is now
used for a refill slot if user has creative priv or server is in
creative mode.
2015-08-05 08:37:25 -04:00
Prot
2355dc6fc2 require "home" privilege to use home/sethome buttons 2015-07-19 17:01:36 -04:00
Vanessa Ezekowitz
16e40a2e22 re-arrange a few elements in the crafting guide to eliminate text overlap
Also make sure to chech if lite mode before assuming 4x2 "tab" button layout.
2015-06-28 04:54:48 -04:00
Vanessa Ezekowitz
0a70d8edef Add "lite" mode
Set unified_inventory_lite = true in minetest.conf to enable.

This mode reduces the feature-set of the mod as follows:

* no bags
* no waypoints,
* no home/go-home buttons,
* no set-day/-night buttons,
* smaller creative/craft guide inventory pages (4x6 instead of 8x10)
* fewer paging buttons
* smaller search field
* move "Result: foo" to below the crafting guide grid.
* Move main "tab" buttons to the right, below the search and paging buttons.
* Made "tab" buttons able to use to 2 rows if necessary (max 8 buttons)
2015-06-28 04:15:55 -04:00
Rogier
75f719507e Add buttons to give oneself items (with 'give' privilege) 2015-03-11 17:55:30 -04:00
Rogier
2fd9e59242 Display conversion method symbolically and textually next to arrow 2015-03-11 16:00:37 +01:00
Tim
76a9efff71 reduce table lookups during initialization 2015-02-05 10:03:07 +01:00
Tim
1a1bfc3839 supress intllib check warning, this fixes #19 2015-02-05 10:00:10 +01:00
RealBadAngel
f800f39083 More tooltips and translations. 2014-06-22 00:34:35 +02:00
RealBadAngel
002bcbb6d8 Add intllib support.
Some polish and german translations.
Start adding tooltips.
2014-06-21 12:44:31 +02:00
Zefram
87f502a259 Show item usages in craft guide
When the craft guide is showing a craft, the output slot is now a button,
which causes the craft guide to show ways in which that output can be
used.  This mirrors the way input slots are buttons that show recipes
for the selected ingredient.  Usages of an item can be iterated through
in the same way as recipes for the item.  This incidentally offers some
ability to retrace one's steps through a crafting chain, without storing
actual history.
2014-06-13 11:30:09 -03:00
Zefram
c33efe8631 Cleaner display of lack of recipes (redux)
When the current craft guide item has no recipes, show a "no" symbol
instead of an ingredient grid, alongside the "No recipes" message.
When no item is selected in the craft guide, leave the recipe space empty.
2014-06-13 09:28:40 -03:00
Zefram
4c982dd667 Fix and enhance grid shapes in craft guide
Commit 043f608145 made shaped crafting
recipes display in a grid of the recipe's minimum bounding box,
but broke the use of a fixed 1x1 grid shape for cooking recipes.
This commit generalises the dynamic-grid-shape facility, putting the
craft type registration in charge.  This restores the correct shape for
cooking recipes.

Also change the logic for dynamic grid sizes for regular shaped and
shapeless crafting.  We'd like to always use a grid shape that is
reminiscent of a regular crafting grid, as a visual cue to the crafting
method.  But it's also nice to show smaller recipes in a smaller grid.
In the expectation that crafting grids will always be square, show the
recipe in the smallest square grid that will accommodate it.
2014-06-13 09:28:39 -03:00
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
dbf98cb694 Fix display of group ingredients
Commit 043f608145 broke a couple of things
in the course of its refactoring.  This patch restores the "G" flag that
signals group ingredients, the preference for "default:" items as group
representatives (where a representative isn't specifically registered),
and the built-in registration of default:cobble as representative for
group:stone (because it's the most commonly-used item in that group).
2014-06-13 06:28:38 -03:00
ShadowNinja
043f608145 Move around some group code and make the craftguide render well without a recipe
This also keeps recipes aligned to the right, close to the arrow.
It also calculates the craft's height.
2014-05-11 22:00:32 -04:00