[Mod] Simple Fast Inventory Buttons [1.0.0] [sfinv_buttons]

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

[Mod] Simple Fast Inventory Buttons [1.0.0] [sfinv_buttons]

by Wuzzy » Mon Dec 19, 2016 21:34

Adds a tab to your default Minetest Game inventory in which other mods can add simple buttons to access special functionality.

Just open the inventory menu, select the “More” tab and click on a button.

The mod itself does not add these buttons on its own, instead other mods need to depend on this mod.

Example:
Image
(Your inventory menu might look different because of different mods.)

+ List of known mods adding buttons


Download (and stuff)
Download: sfinv_buttons1.0.0.zip

Attachments
sfinv_buttons1.0.0.zip
(21.58 KiB) Downloaded 91 times
Last edited by Wuzzy on Mon Mar 20, 2017 00:07, edited 7 times in total.
I'm creating MineClone 2, a Minecraft clone for Minetest.
I made the Help modpack, adding in-game help to Minetest.
 

User avatar
mahmutelmas06
Member
 
Posts: 355
Joined: Mon Mar 02, 2015 13:10
GitHub: mahmutelmas06
IRC: mahmutelmas06
In-game: masum

Re: [Mod] Simple Fast Inventory Buttons [0.1.0] [sfinv_butto

by mahmutelmas06 » Mon Dec 19, 2016 21:53

This is must have if using default inventory.
Could you also make possible to choose icons only mode? Then there could be buton grid instead of list
My Mods:

Beverage
 

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

Re: [Mod] Simple Fast Inventory Buttons [0.1.0] [sfinv_butto

by Wuzzy » Mon Dec 19, 2016 22:09

I don't see an use of an icon-only mode.
IMO it would be less usable since the corresponding text is now hidden inside a tooltip. I think the button+icon variant is the best because the text makes it clear what it is for and the icon makes it easier on the eye.
Also, this tab disables the normal inventory grid to make room for all buttons.

But if I hear feedback from actual users on how they perceive the mod's usability, I'd gladly take it. :-)

But the mod already has a fallback mode if the space for buttons is completely used up: It displays a scrollable text list instead. This means, this mod supports an arbitrary amount of buttons.

However, I would generally not recommend mods to add huge amounts of buttons, to keep things simple. Buttons should only be added for accessing their core functionality, such as the main form.
If a modder would like to add, let's say, a complete “control panel”, adding a new sfinv tab would be better. Note: sfinv is a new Minetest Game mod by rubenwardy, it has a quite powerful API. Interested modders should take a look at it.
I'm creating MineClone 2, a Minecraft clone for Minetest.
I made the Help modpack, adding in-game help to Minetest.
 

User avatar
cHyper
Member
 
Posts: 587
Joined: Fri May 06, 2011 08:49
IRC: cHyper
In-game: cHyper

Re: [Mod] Simple Fast Inventory Buttons [0.1.0] [sfinv_butto

by cHyper » Tue Dec 27, 2016 20:37

How can i execute a command?
What are the lines of code therefore?
 

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

Re: [Mod] Simple Fast Inventory Buttons [0.1.0] [sfinv_butto

by Wuzzy » Tue Dec 27, 2016 21:57

Do you want to learn how to add your own button with this mod?
In this case, read API.md which is included with the mod.

http://repo.or.cz/minetest_sfinv_button ... er:/API.md

If you meant something else, sorry. I have no idea what you want from me. :-(
I'm creating MineClone 2, a Minecraft clone for Minetest.
I made the Help modpack, adding in-game help to Minetest.
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: [Mod] Simple Fast Inventory Buttons [0.1.0] [sfinv_butto

by rubenwardy » Tue Dec 27, 2016 22:16

Very nice! This should be quite good to make a replacement for unified inventory's button bar
 

hajo
Member
 
Posts: 262
Joined: Thu Oct 13, 2016 10:45

Re: [Mod] Simple Fast Inventory Buttons [0.1.0] [sfinv_butto

by hajo » Tue Dec 27, 2016 22:18

cHyper wrote:How can i execute a command?
Wuzzy wrote:If you meant something else, sorry. I have no idea what you want from me. :-(

Maybe he wants a button that executes a chat-command, like "/privs".
Some of 'my' wiki-pages: Build-a-home - basic-robot - basic-machines - digtron
 

User avatar
cx384
Member
 
Posts: 249
Joined: Wed Apr 23, 2014 09:38
GitHub: cx384
IRC: cx384

Re: [Mod] Simple Fast Inventory Buttons [0.1.0] [sfinv_butto

by cx384 » Wed Dec 28, 2016 09:23

Nice mod!
It would be great to have a fake unified inventory mod which automatically converts the unified inventory buttons into simple fast inventory buttons.
Can your read this?
 

User avatar
cHyper
Member
 
Posts: 587
Joined: Fri May 06, 2011 08:49
IRC: cHyper
In-game: cHyper

Re: [Mod] Simple Fast Inventory Buttons [0.1.0] [sfinv_butto

by cHyper » Wed Dec 28, 2016 11:56

hajo wrote:
cHyper wrote:How can i execute a command?
Wuzzy wrote:If you meant something else, sorry. I have no idea what you want from me. :-(

Maybe he wants a button that executes a chat-command, like "/privs".


yes.
i mean chat-commands!
but how can i do that?
 

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

Re: [Mod] Simple Fast Inventory Buttons [0.1.0] [sfinv_butto

by Wuzzy » Wed Dec 28, 2016 12:38

It would be great to have a fake unified inventory mod which automatically converts the unified inventory buttons into simple fast inventory buttons.

Or just convince modders to support both mods. The APIs are both relatively simple, so the overhead should be rather small. It's a pity that Unified Inventory has no API documentation whatsoever.

yes.
i mean chat-commands!
but how can i do that?

I fear this is not directly possible as Minetest does not expose a list of registered chat commands.

But what you could do instead is write a mod which adds a button which does the same action of the chat command. If you don't know how to do it, you should either learn how to mod or ask a modder to do it for you.
I'm creating MineClone 2, a Minecraft clone for Minetest.
I made the Help modpack, adding in-game help to Minetest.
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: [Mod] Simple Fast Inventory Buttons [0.1.0] [sfinv_butto

by rubenwardy » Wed Dec 28, 2016 12:45

Wuzzy wrote:
yes.
i mean chat-commands!
but how can i do that?

I fear this is not directly possible as Minetest does not expose a list of registered chat commands.

But what you could do instead is write a mod which adds a button which does the same action of the chat command. If you don't know how to do it, you should either learn how to mod or ask a modder to do it for you.


minetest.chatcommands

See irc commands:

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
function(user, args)
   if args == "" then
      return false, "You need a command."
   end
   if not irc_users[user.nick] then
      return false, "You are not logged in."
   end
   local found, _, commandname, params = args:find("^([^%s]+)%s(.+)$")
   if not found then
      commandname = args
   end
   local command = minetest.chatcommands[commandname]
   if not command then
      return false, "Not a valid command."
   end
   if not minetest.check_player_privs(irc_users[user.nick], command.privs) then
      return false, "Your privileges are insufficient."
   end
   minetest.log("action", user.nick.."@IRC runs "
      ..args.." as "..irc_users[user.nick])
   return command.func(irc_users[user.nick], (params or ""))
end
 

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

Re: [Mod] Simple Fast Inventory Buttons [0.1.0] [sfinv_butto

by Wuzzy » Wed Dec 28, 2016 13:25

Oh, sorry, rubenwardy, for not knowing about the completely undocumented minetest.chatcommands table. :P
I'm creating MineClone 2, a Minecraft clone for Minetest.
I made the Help modpack, adding in-game help to Minetest.
 

User avatar
rubenwardy
Member
 
Posts: 4500
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy

Re: [Mod] Simple Fast Inventory Buttons [0.1.0] [sfinv_butto

by rubenwardy » Sat Dec 31, 2016 00:27

Here! Have a PR: Add icon bar mode - adds an icon bar to every page

Image

Put sfinv_buttons_use_icon_bar = true in minetest.conf to enable

Really I need to make a sfinv.register_on_player_submit_fields function, would make this a lot easier

Also, I made a mod which uses this mod: viewtopic.php?f=9&t=16290
 

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

Re: [Mod] Simple Fast Inventory Buttons [0.1.0] [sfinv_butto

by Wuzzy » Sat Dec 31, 2016 01:36

And as soon as the 10th or 11th button is added, this mod breaks.
I'm creating MineClone 2, a Minecraft clone for Minetest.
I made the Help modpack, adding in-game help to Minetest.
 

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

Version 1.0.0 released!

by Wuzzy » Sun Mar 19, 2017 20:27

Version 1.0.0 released!
This mod has been long enough in version 0.1.0, is finished and no bugs have been found. It's about time for an official release. :-)

Not much changed, I just fixed some typos.
I'm creating MineClone 2, a Minecraft clone for Minetest.
I made the Help modpack, adding in-game help to Minetest.
 

User avatar
azekill_DIABLO
Member
 
Posts: 3458
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO

Re: [Mod] Simple Fast Inventory Buttons [1.0.0] [sfinv_butto

by azekill_DIABLO » Tue Mar 21, 2017 19:03

Image

Woohoo!
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
Hi, my username is azekill_DIABLO and i'm an exelent bug-maker(yeah...i know...i have a bad reputation)

azekill_DIABLO said: Mineyoshi+ABJ+Baggins= TOPIC HIJACKED.
My Mods and Stuff | Voxellar | VoxBox on GITHUB | M.I.L.A Monster engine
WEIRD MODDING CONTEST !!!
 


Return to Mod Releases

Who is online

Users browsing this forum: Bing [Bot] and 20 guests

cron