Entity suggestions, and counting inventory items

User avatar
D00Med
Member
 
Posts: 712
Joined: Sat Feb 07, 2015 22:49
GitHub: D00Med

Entity suggestions, and counting inventory items

by D00Med » Mon Dec 05, 2016 08:26

These are just some things I would like to see in minetest.
Firstly, entity roll and pitch. If it's possible to set the yaw, then I would assume it wouldn't be too hard to add "setroll" and "setpitch"? Would it be possible to allow entities to ignore the light changes for the time of day too? They get darker at night and in caves, but if there was an option to make them ignore lighting changes then they could appear to be glowing. Also, it is possible to check if an inventory contains a certain item so, if there isn't already a way to do so, could a method be added to count the quantity of an item in an inventory?
Look! I have a signature :]
My subgame: https://forum.minetest.net/viewtopic.php?f=15&t=14051#p207242
dmobs2 is coming...
 

sofar
Member
 
Posts: 781
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: Entity suggestions, and counting inventory items

by sofar » Fri Dec 16, 2016 05:40

could a method be added to count the quantity of an item in an inventory?


https://github.com/minetest/minetest/bl ... .txt#L3014
 

User avatar
D00Med
Member
 
Posts: 712
Joined: Sat Feb 07, 2015 22:49
GitHub: D00Med

Re: Entity suggestions, and counting inventory items

by D00Med » Fri Dec 16, 2016 06:15

Thanks, could you give me an example of how to use that?
I thought it would only work for particular stacks in the inventory, not just every one, if they exist.
(and I'll be honest I'm a bit confused about itemstacks)
Look! I have a signature :]
My subgame: https://forum.minetest.net/viewtopic.php?f=15&t=14051#p207242
dmobs2 is coming...
 

sofar
Member
 
Posts: 781
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: Entity suggestions, and counting inventory items

by sofar » Fri Dec 16, 2016 19:18

D00Med wrote:Thanks, could you give me an example of how to use that?
I thought it would only work for particular stacks in the inventory, not just every one, if they exist.
(and I'll be honest I'm a bit confused about itemstacks)


An itemstack is "one or more of the same item" that fits in a single "slot". The main inventory is a "list" of "Itemstacks" that are possibly empty.
 

User avatar
D00Med
Member
 
Posts: 712
Joined: Sat Feb 07, 2015 22:49
GitHub: D00Med

Re: Entity suggestions, and counting inventory items

by D00Med » Fri Dec 16, 2016 20:19

So to count an item in an inventory, the itemstack or stack index has to be known?
Look! I have a signature :]
My subgame: https://forum.minetest.net/viewtopic.php?f=15&t=14051#p207242
dmobs2 is coming...
 


Return to Minetest Features

Who is online

Users browsing this forum: No registered users and 36 guests

cron