Item groups

Post Reply
User avatar
SuperStarSonic
Member
Posts: 160
Joined: Fri Oct 14, 2022 20:30
GitHub: Python-Sargent
In-game: SuperStarSonic
Location: Earth (may be out of date)

Item groups

by SuperStarSonic » Post

Problem

I need to check the groups of an item for a particular group, I have the Itemstack object that I need, how would I check the groups of the Itemstack?

Code: Select all

	srclist = inv:get_list("src")
	local chargeable = srclist:get_groups().chargeable --how do I do this?

User avatar
Desour
Member
Posts: 1469
Joined: Thu Jun 19, 2014 19:49
GitHub: Desour
IRC: Desour
In-game: DS
Location: I'm scared that if this is too exact, I will be unable to use my keyboard.

Re: Item groups

by Desour » Post

he/him; Codeberg; GitHub; ContentDB; public personal TODO list; "DS" is preferred (but often too short)

User avatar
SuperStarSonic
Member
Posts: 160
Joined: Fri Oct 14, 2022 20:30
GitHub: Python-Sargent
In-game: SuperStarSonic
Location: Earth (may be out of date)

Re: Item groups

by SuperStarSonic » Post

I did not find anything in the docs that would work when I checked, so I resorted to this, but I guess I was wrong.

User avatar
sirrobzeroone
Member
Posts: 593
Joined: Mon Jul 16, 2018 07:56
GitHub: sirrobzeroone
Contact:

Re: Item groups

by sirrobzeroone » Post

SuperStarSonic wrote:
Fri Mar 24, 2023 16:01
I did not find anything in the docs that would work when I checked, so I resorted to this, but I guess I was wrong.
Not sure if it will help but I find the gitlab version of the api much nicer to read and search:
https://minetest.gitlab.io/minetest/
https://minetest.gitlab.io/minetest/min ... ence/#misc

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests