[Mod] Unified Inventory [git][unified_inventory]

User avatar
Sokomine
Member
Posts: 4014
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine

Re: [Mod] Unified Inventory [git][unified_inventory]

by Sokomine » Post

Maybe we need a new priv for the "get items from unified_inventory for free" option - what the creative priv did before. The creative priv was turned into something that does something in MTG now - something that (to me) is entirely undesirable. I don't want digging speed or effects of digging/placing affected. Just that free material from unified_inventory for building purposes.
A list of my mods can be found here.

User avatar
VanessaE
Moderator
Posts: 4500
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaE
Location: Western NC
Contact:

Re: [Mod] Unified Inventory [git][unified_inventory]

by VanessaE » Post

That's more the domain of minetest_game (well, the creative mod therein). Having a minetest.conf setting to change the place/dig behavior separate from the creative-inventory feature could be useful.

That said, there is a workaround:

On a survival-mode server or world, giving someone the creative privilege *does* have the effect you're interested in -- they get the materials for free, but place/dig behavior still uses survival-mode timings and tool capabilities. All good mods that have to do inventory manipulations on dig/place (such as taking two or more of something from your inventory when used) already check for creative mode and/or privilege before making such changes, too.

So, put the server/world/etc. into survival mode, turn off damage and PvP, and add creative to the default privileges (alongside fast, fly, shout, etc.). Anyone who wants the usual fast digging under that scenario just needs to give him/herself a tool that'll do the job.
You might like some of my stuff: Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (64-512px)

User avatar
Wuzzy
Member
Posts: 3925
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy

Re: [Mod] Unified Inventory [git][unified_inventory]

by Wuzzy » Post

VanessaE, please repost this thread because RealBadAngel is dead and you are alive.

Someone should mark this thread as “old” then and add a link to the current version of Unified Inventory.

Thanks.

I hope the GitHub repo is still the correct one. Cuz I posted things there.
My creations. I gladly accept bitcoins: 17fsUywHxeMHKG41UFfu34F1rAxZcrVoqH

User avatar
VanessaE
Moderator
Posts: 4500
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaE
Location: Western NC
Contact:

Re: [Mod] Unified Inventory [git][unified_inventory]

by VanessaE » Post

The first post points at the Github repo. Since it isn't my mod, nor am I the maintainer anymore, it doesn't make sense to me to be the "head" of the forum thread for it.
You might like some of my stuff: Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (64-512px)

Robsoie
Member
Posts: 98
Joined: Fri Apr 29, 2016 16:22

Re: [Mod] Unified Inventory [git][unified_inventory]

by Robsoie » Post

Hello,

I use Backspace to open/close my inventory, but i noticed when using unified inventory that i am not always able to close it with Backspace, sometime i can sometime not, it puzzled me for a while but i noticed the reason :

the line with "Search" (the searchbox) sometime seems to enable itself (there's the cursor that appear in it) despite i never click on it , and when it happens i simply can't use Backspace to close the inventory because with the searchbox cursor being present Backspace is suddenly used as being the textual "backspace" function, so i need to press Escape to exit the inventory.

As i never use the search functionality of unified inventory, i was trying to find a way to remove it entirely because it's super annoying to me.
So in the internal.lua i deleted

Code: Select all

	-- Search box
	formspec[n] = "field_close_on_enter[searchbox;false]"
	n = n+1

	if not draw_lite_mode then
		formspec[n] = "field[9.5,8.325;3,1;searchbox;;"
			.. F(unified_inventory.current_searchbox[player_name]) .. "]"
		formspec[n+1] = "image_button[12.2,8.1;.8,.8;ui_search_icon.png;searchbutton;]"
			.. "tooltip[searchbutton;" ..F(S("Search")) .. "]"
		formspec[n+2] = "image_button[12.9,8.1;.8,.8;ui_reset_icon.png;searchresetbutton;]"
			.. "tooltip[searchbutton;" ..F(S("Search")) .. "]"
			.. "tooltip[searchresetbutton;" ..F(S("Reset search and display everything")) .. "]"
	else
		formspec[n] = "field[8.5,5.225;2.2,1;searchbox;;"
			.. F(unified_inventory.current_searchbox[player_name]) .. "]"
		formspec[n+1] = "image_button[10.3,5;.8,.8;ui_search_icon.png;searchbutton;]"
			.. "tooltip[searchbutton;" ..F(S("Search")) .. "]"
		formspec[n+2] = "image_button[11,5;.8,.8;ui_reset_icon.png;searchresetbutton;]"
			.. "tooltip[searchbutton;" ..F(S("Search")) .. "]"
			.. "tooltip[searchresetbutton;" ..F(S("Reset search and display everything")) .. "]"
	end
	n = n+3

	local no_matches = S("No matching items")
	if draw_lite_mode then
		no_matches = S("No matches.")
	end
It seems to work good so far after playing for a while, but as i am no coder at all, i am wondering if it is going to lead into unexpected bugs later or if it's completely safe like that ?

redblade7
Member
Posts: 304
Joined: Sun Feb 15, 2015 07:14
IRC: redneonglow redblade7
In-game: redblade7 redblade7_owner

Re: [Mod] Unified Inventory [git][unified_inventory]

by redblade7 » Post

Hi,

Did RBA ever apply a license to datastorage?

Thank you!
-redblade7, admin of: THE CREATIVE GARDENS (creative), THE VALLEYS (sandbox), and THE DIGITAL FARMS (farming/hunger/shops)

User avatar
Linuxdirk
Member
Posts: 2501
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Re: [Mod] Unified Inventory [git][unified_inventory]

by Linuxdirk » Post

Does Unified Inventory support the version 2 formspecs on registered pages? And if not: are there any plans supporting them?

User avatar
Krock
Developer
Posts: 4499
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: [Mod] Unified Inventory [git][unified_inventory]

by Krock » Post

Linuxdirk wrote:Does Unified Inventory support the version 2 formspecs on registered pages? And if not: are there any plans supporting them?
The item browser has a fixed position within the "old coordinate system" formspec, but using real coordinates is definitely possible. Try whether it still looks OK with formspec_version applied within your page definition (requires 5.1.0 to render correctly).
https://github.com/minetest-mods/unifie ... ua#L65-L84

Formspec version is rather new, and unified_inventory not that actively developed any more. There are no plans, but patches are welcome at all times.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
Linuxdirk
Member
Posts: 2501
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Re: [Mod] Unified Inventory [git][unified_inventory]

by Linuxdirk » Post

Krock wrote:but using real coordinates is definitely possible.
Will totally try that, I just wondered if there are any plans to migrate to version 2.
Krock wrote:... but patches are welcome at all times.
A patch means to touch all and every coordinate, right :) I recently migrated my mTimer mod and had to do that ...

User avatar
Krock
Developer
Posts: 4499
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: [Mod] Unified Inventory [git][unified_inventory]

by Krock » Post

Linuxdirk wrote:A patch means to touch all and every coordinate, right :) I recently migrated my mTimer mod and had to do that ...
For a sane solution there's no other possibility. Luckily the image button placement is quite generic, thus adjusting the sizes and offsets once will apply it for all of them.
Please bare in mind that barely a repository already contains 5.1.0 binaries.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
Linuxdirk
Member
Posts: 2501
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Re: [Mod] Unified Inventory [git][unified_inventory]

by Linuxdirk » Post

Krock wrote:Luckily the image button placement is quite generic, thus adjusting the sizes and offsets once will apply it for all of them.
From what I noticed: The placement of labels is still pretty weird. Mainly because labels are positioned by their center and not by their top left corner, like the other elements. Overall, the values changed, but did not became more "clean", just differently messy :)

Maybe it gets better when I overhaul the whole formspec system instead of just adjusting the coordinates to get basically the same view (planned to do that anyways).

For Unified Inventory: If it looks okay when I use version 2 I keep it, otherwise I likely drop support. Never was a fan of it in first place.
Krock wrote:Please bare in mind that barely a repository already contains 5.1.0 binaries.
My slogan is Release early, update often, use rolling-release since I wrote my first code ages ago.

For Minetest major versions I use Git tags in my mod's repositories, and my released mods use version flags in the CDB so I should be safe here.

Grigor
Member
Posts: 19
Joined: Sun Dec 01, 2019 05:55

Re: [Mod] Unified Inventory [git][unified_inventory]

by Grigor » Post

Ahoy RealBadAngel,
Your unified inventory is IMO an essential piece of kit, especially the bags function. But I'm just wondering if instead of a single bag on the main panel you could have all four lined up along the bottom for more immediate and direct access? Something like this:
Like_This.png
(179.72 KiB) Not downloaded yet

User avatar
BuckarooBanzay
Member
Posts: 367
Joined: Tue Apr 24, 2018 05:58
GitHub: BuckarooBanzay
IRC: BuckarooBanzai
In-game: BuckarooBanzai

Re: [Mod] Unified Inventory [git][unified_inventory]

by BuckarooBanzay » Post

Grigor wrote:Ahoy RealBadAngel,
Your unified inventory is IMO an essential piece of kit, especially the bags function. But I'm just wondering if instead of a single bag on the main panel you could have all four lined up along the bottom for more immediate and direct access? Something like this:
Like_This.png
RealBadAngel is sadly not among us it seems: viewtopic.php?t=14228 :(

But the repository is maintained by the community and would accept pull-requests:
https://github.com/minetest-mods/unified_inventory

Grigor
Member
Posts: 19
Joined: Sun Dec 01, 2019 05:55

Re: [Mod] Unified Inventory [git][unified_inventory]

by Grigor » Post

Damn... sorry to hear that. Will ask there, cheers.

RobertBuilder
New member
Posts: 4
Joined: Mon Feb 03, 2020 23:42

Re: [Mod] Unified Inventory [git][unified_inventory]

by RobertBuilder » Post

Feature request:
I miss the ability to browse technic's separating machine recipes, or more generally spoken technic based machines with more than one output slot, in the crafting guide.

So I created a branch of this really cool mod and added the missing functionality. Because unified inventory seems to be the inventory tool I do not want to release a redo version of the mod. Maybe after reviewing my changes find their way into this cool work.
Please find attached an archive with the reworked mod.

Changelog:
  • minetest 5.0.0 (tested with 5.1.0)
  • intllib support dumped. Moved to minetest internal localization. German translations added. Existing german translations slightly adapted. Now its more polite and it does not sound like google translated.
  • datastorage support dumped. Moved to minetest mod storage. The HUD handling of the waypoint part slightly reworked.
    Note: The new mod storage is not downwards compatible with the datastorage save files. If there is a need I can explain howto migrate existing datastorages.
  • Crafting guide pane prepared for "multi-output" recipes and of course handling of unified inventory internal datastructures adapted
  • Translation bug in main bag pane fixed.
  • Translation bug in the crafting guide pane fixed.
  • Server's inventory cleanup corrected.
  • Version flag for technic support added. Technic is able to register separating machine recipes to unfied inventory, but does not, because of lack of support.
Attachments
unified_inventory.zip
(849.46 KiB) Downloaded 18 times

User avatar
Krock
Developer
Posts: 4499
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: [Mod] Unified Inventory [git][unified_inventory]

by Krock » Post

@RobertBuilder: Please propose your changes to the repository so that everyone can profit from your improvements. Although, please focus on single changes rather than "fix everything" inside a single Pull Request.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
TechnoWolf
Member
Posts: 10
Joined: Wed Jan 29, 2020 20:04
In-game: TechnoWolfTV

Re: [Mod] Unified Inventory [git][unified_inventory]

by TechnoWolf » Post

Thanks for this mod! I'm experiencing a perplexing problem with the bottom row buttons. I've already had some other mods occupying the bottom row button area, and have just added another mod, "XP and Levels" from BrunoMine. The button to access it's UI in Unified Inventory is successfully appended to the right-side end of the bottom button row, however it is situated mostly underneath the item pages navigation buttons. I've looked through the code of both Unified Inventory and XP and Levels, and it looks like BrunoMine is using the following in a file called, "unified_inventory.lua" at lines 65-70:

Code: Select all

unified_inventory.register_button("xpro:info", {
	type = "image",
	image = "xpro_hudbars_icon_xp.png",
	tooltip = S("Nivel"),
	hide_lite=true
})
Here's a screenshot of how it looks in-game:
https://www.dropbox.com/s/l9femvqbrtzts ... t.jpg?dl=0

Is there any way to remedy this? Perhaps a way I could "scoot" all buttons one slot to the left, to have all fully in view? Thanks for any assistance or suggestions!

User avatar
acidzebra
Member
Posts: 67
Joined: Sun Sep 10, 2017 09:11

Re: [Mod] Unified Inventory [git][unified_inventory]

by acidzebra » Post

TechnoWolf wrote:
Thu May 21, 2020 15:54
Is there any way to remedy this? Perhaps a way I could "scoot" all buttons one slot to the left, to have all fully in view? Thanks for any assistance or suggestions!
simply too many buttons; I wish unified inventory would hide the greyed-out functions (or maybe it does and I don't know) but as a quick fix, open register.lua in unified inventory and remove/comment out some button sections you don't need, I ended up removing

Code: Select all

unified_inventory.register_button("home_gui_set"
unified_inventory.register_button("home_gui_go"
unified_inventory.register_button("misc_set_day"
unified_inventory.register_button("misc_set_night"
(you have to remove the entire section for each button up to and including

Code: Select all

end,
})
Alternatively, if you don't need the circular saw button in your inventory you can remove the invsaw mod.

These changes need a restart of the server.

User avatar
TechnoWolf
Member
Posts: 10
Joined: Wed Jan 29, 2020 20:04
In-game: TechnoWolfTV

Re: [Mod] Unified Inventory [git][unified_inventory]

by TechnoWolf » Post

acidzebra wrote:
Thu May 21, 2020 18:56
These changes need a restart of the server.
That works! Thanks very much, AcidZebra. As you've said, it would be nice if Unified Inventory would hide unused buttons. Further, if a function were built in to auto-generate a second, third row of buttons as necessary, that would be ideal. Some of us use/plan to use a lot of button-generating mods :D.

Merak
Member
Posts: 33
Joined: Sat Nov 05, 2016 20:34

Re: [Mod] Unified Inventory [git][unified_inventory]

by Merak » Post

You don't need to make any change to the mod to disable those buttons. If you remove the user privileges, then Unified Inventory is smart enough to disable the button.

User avatar
acidzebra
Member
Posts: 67
Joined: Sun Sep 10, 2017 09:11

Re: [Mod] Unified Inventory [git][unified_inventory]

by acidzebra » Post

Merak wrote:
Sat May 23, 2020 10:14
You don't need to make any change to the mod to disable those buttons. If you remove the user privileges, then Unified Inventory is smart enough to disable the button.
I haven't seen that happen; even with no privs to set time the buttons still show. You can see it in the screenshot technowolf posted; no privs, buttons still there.

User avatar
Linuxdirk
Member
Posts: 2501
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Re: [Mod] Unified Inventory [git][unified_inventory]

by Linuxdirk » Post

Merak wrote:
Sat May 23, 2020 10:14
If you remove the user privileges, then Unified Inventory is smart enough to disable the button.
Disable, yes. But don’t hide.

Merak
Member
Posts: 33
Joined: Sat Nov 05, 2016 20:34

Re: [Mod] Unified Inventory [git][unified_inventory]

by Merak » Post

Code: Select all

/revoke singleplayer home
/revoke singleplayer settime
Then you need to change the view or click on the button to see it change.

User avatar
Linuxdirk
Member
Posts: 2501
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Re: [Mod] Unified Inventory [git][unified_inventory]

by Linuxdirk » Post

Merak wrote:
Sat May 23, 2020 13:00

Code: Select all

/revoke singleplayer home
/revoke singleplayer settime
Then you need to change the view or click on the button to see it change.
Can’t confirm. Started a new test world and was granted this set of permissions:

Image

Quick test shows that I am missing home permission:

Image

Buttons for setting home and going home are grayed out and not hidden (same with the time control buttons because the default set of permissions does not have the time setting permission included):

Image
Attachments
home.png
(8.61 KiB) Not downloaded yet
privs.png
(8.06 KiB) Not downloaded yet
buttons.png
(33.58 KiB) Not downloaded yet

Merak
Member
Posts: 33
Joined: Sat Nov 05, 2016 20:34

Re: [Mod] Unified Inventory [git][unified_inventory]

by Merak » Post

They don't hide for me either. Only disable and grey out. I had misunderstood and thought that being disabled and greyed would be adequate.

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests