Repository navigation
Formspec: Show a player inventory using core.show_formspec - #15963
Conversation
|
Just realized that my test script misses the point. Updated it to show the advantage, which is in fact inventory mod-independent: local fs = player:get_inventory_formspec(fs)
core.show_formspec(name, "", fs)This opens the inventory, although any custom formspec may be provided. |
8c11654 to
7cf64b0
Compare
|
I wonder whether this change is going to be break someone's mod. Currently, you could do With |
'core.show_formspec' now shows and updates the inventory formspec as if it was opened using the hotkey on client-side.
On the other hand: if the formspec looks like an inventory formspec, then it would be weird to revert back to the original formspec when re-opening. e.g. when navigating to a recipe when hitting a node with a special tool. |
7cf64b0 to
0fe91a7
Compare
|
Changed the implementation to become popup-like. |
If I do: then close the formspec and press I to open the regular inventory, I still see the "Rhododendron" formspec. Is that an accident? |
|
@grorp I see. Fixed that. Here's a few more commands for testing: |
d0ab95c to
4b3a809
Compare
Co-authored-by: grorp <gregor.parzefall@posteo.de>
…g#15963) 'core.show_formspec' now shows and updates the inventory formspec as if it was opened using the hotkey on client-side.
'core.show_formspec' now shows a temporary inventory formspec as if it was opened using the hotkey on client-side.
Fixes luanti-org/minetest_game#3188 as soon both server and client are >= 5.13.0.
To do
This PR is Ready for Review.
How to test
/fs. The formspec must show the same thing that you saw last