New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add shape_type and base_material attributes to the shaped items definition #1594
Conversation
Can this be a mod first? If this is successful as a mod (has lots of users, code works well and is debugged), and people really want this as part of minetest_game, then we can consider it. For now, I would prefer to keep this outside of minetest_game. suggestions: if you do this, I'd remove the default "blocks/nodes" tab and replace it with "materials", and then make a "shapes" tab. Or perhaps find a better way of distinguishing the two separate sets of nodes. |
I cannot see the way how the change can be moved to an other mod. The main change is in the first commit, adding 2 lines to mods default, doors, stairs and walls, to get the at definition time existing information accessible at runtime trough item definition. To get it separate means I need to start and maintain own minetest_game fork in competition to upstream (this way I do not like) or I need to do something hacky to get the both values in subsequent and then redefine the items distorting the mod_origin. For the second commit you are right. I added the sfinv change just as proposal, to give something visible how the new attributes could be used. I do not use it, the primary usage is in smart_inventory. What do you think to merge the first commit only to the minetest_game? In this case the sfinv could be forked and enhanced to use the new information outside of minetest_game. |
I'm against this patch as is. While I like the concept, I don't think it should be part of minetest_game currently. I feel it's much more interesting for a subgame with many more nodes than minetest_game, hence the question of whether this shouldn't be a mod instead. I don't want to +1 this. If this is implemented as a proper mod (not a fork) and people actually use it, then I'll reconsider. I consider this the best way to prove that your code works and is useful to many people, and it's how I like to propose new changes myself as much as possible as well. |
Do you have a suggestion for me how I can add shape_type and base_material to the fences, gates, walls, trapdoors, stairs and slabs without forking the mods? |
|
The issue is not to override the item but to detect which item needs the override and with which data. If there were a simple way to do it, the change in general were obsolete. The goal of the change is to provide this assembly information in simple way to other mods. |
👎 for now. I don't feel mtg needs a drastic reshuffling of the creative inventory tabs. |
Ok, I removed the controversial change on sfinv and changed the topic. Now the PR contains only the changes I need: Small enhancements on register_[shape_type] API implementations. |
Even more 👎 right now - now you're making changes that have zero use in minetest_game... Again, the best way to convince me is to prove that this is useful, and works well, entirely as a mod, first. Yes that may involve some manual lists of override_item calls. |
👎 I agree wth sofar's comments. |
Ok, it is your choice. So you can close this PR unmerged. |
fence, fencegate, stair, slab and wall items
…because the base_material is not available in old interface
This PR introduces two item definition attributes placed for shaped items: base_material and shape_type. If the attributes are set the item becomes less value in inventory visibility that should animate mod developers to take more shape combinations.
See started discussion in https://forum.minetest.net/viewtopic.php?f=47&t=16788
I added a new tab "Shaped" to the creative inventory and filter them out from Nodes and Items. Unsure about the tools, that are all shaped too.
And I am sure there will be more usage purposes for the both fields if already exists.