randomproof wrote:There needs to be a way to solve craft recipe conflicts. That is two or more mods using the same recipe to make different things. In a perfect world there would be a drop down to select the crafting target from the different possible choices.
sapier wrote:inventory->has_items(<itemname>,<count>)
returning true if player has at least count items/nodes of type itemname, doesn't change (players) inventory
inventory->remove_items(<itemname>,<count>)
returns true on succes false otherwise. removes count elements of type itemname from (players) inventory
sapier wrote:inventory->has_items(<itemname>,<count>)
returning true if player has at least count items/nodes of type itemname, doesn't change (players) inventory
inventory->remove_items(<itemname>,<count>)
returns true on succes false otherwise. removes count elements of type itemname from (players) inventory
inventory_>add_items(<itemname>,<count>) --already present
adds count of itemname elements to (players) inventory
randomproof wrote:It would also be nice if you could add a button to craft the max amount of something. For example when crafting brick nodes I put 4 stacks of clay bricks 99 and I have to double-click 99 times to craft 99 brick nodes.
kahrl wrote:http://c55.me/minetest/wiki/doku.php?id=changes:itemdef:modders -> InvRef changes
Nemo08 wrote:kahrl wrote:http://c55.me/minetest/wiki/doku.php?id=changes:itemdef:modders -> InvRef changes
Metadata still set to default when you put item in inventary?
kahrl wrote:Nemo08 wrote:kahrl wrote:http://c55.me/minetest/wiki/doku.php?id=changes:itemdef:modders -> InvRef changes
Metadata still set to default when you put item in inventary?
What kind of metadata do you mean? If you mean node metadata, that is unrelated to item metadata.
sapier wrote:When attaching something like metadata to each individual item we have to consider that nodes may be in inventory too. Operations like "lookup_by_id" might take very long if you need to find a specific item within thousands of objects.
Without a unique id, how do you want to ensure data is linked to specific object when you can't decide which of the thousands of objects (all beeing identical) is the object ot belongs to?the data that is constantly saved in item
sapier wrote:Without a unique id, how do you want to ensure data is linked to specific object when you can't decide which of the thousands of objects (all beeing identical) is the object ot belongs to?the data that is constantly saved in item
EDIT1:
entities support user defined variables, but by now they aren't preserved throughout server reboots. (there's a hacky way to save them by using staticdata but you need to serialize them manualy). Probably improvemts in this area might suite your needs
Users browsing this forum: Bing [Bot] and 15 guests