mcl_inventory: Remove _mcl_autogroup dependency from mcl_inventory #76
No reviewers
Labels
No Label
blocker
bug
code quality
confirmed
critical
discussion
high priority
incompatibility
incomplete feature
invalid
low priority
missing feauture
needs testing
packet spam
performance
project
regression
translations
unconfirmed
in review
ready for review
No Milestone
No project
No Assignees
3 Participants
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: Mineclonia/Mineclonia#76
Loading…
Reference in New Issue
No description provided.
Delete Branch "fix_inventory_depends"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
TRACKING ISSUE: #67
mcl_inventory
has a dependency on_mcl_autogroup
which should be avoided for all mods in Mineclonia. It uses this to compute item categories for creative inventory.Solution
This is solved by moving the code into
minetest.register_on_mods_loaded
.Details
We cannot simply remove the
_mcl_autogroup
dependency because the code needs to be executed after all items have been registered.Testing Steps
The inventories does not change
_mcl_autogroup
is loaded as the last modgit checkout master
minetest -v |& grep Mod | grep loaded
on the master branch_mcl_autogroup
is not loaded lastgit checkout fix_inventory_depends
minetest -v |& grep Mod | grep loaded
on the master branch_mcl_autogroup
is loaded lastmcl_inventory: Use register_on_mods_loaded in mcl_inventoryto mcl_inventory: Remove mcl_autogroup dependency from mcl_inventorymcl_inventory: Remove mcl_autogroup dependency from mcl_inventoryto mcl_inventory: Remove _mcl_autogroup dependency from mcl_inventoryCan this PR get some love?
Sorry for the delay.
How does this PR affect survival mode?
@ryvnf would this change affect the availability of items from third party mods in the creative inventory?
It should not have any effect.
No.
Thanks. Please include testing steps to verify that this does not break anything in survival or regarding third party mod items.
What makes you think something could break in survival? Or regarding third party mod items?
I remember the last time mod dependecies changed and it broke survival.
Basically, I would like to know: If a third party mod somehow manages to register items, are they listed correctly in the creative inventory?
Added steps to verify that
_mcl_autogroup
is the PR does what it is supposed to and_mcl_autogroup
is loaded last. That also tests that it does not break digging like what happend previously.I will not make a test cases for this. There is no logical reason that this would break third party mods, as the
minetest.register_on_mods_loaded
callback will only be called after loading all mods. Internal and external mods are not loaded differently.Which shell should be used for that? I have never seen the
|&
syntax before.(I am pretty sure it is not Bourne Shell, though.)
It's Bash syntax (but think it works in some other shells too). It is equivalent to
2>&1 |
.uhhm .. i just started testing this, it's probably a typo / not a big deal but please correct this in your testing steps:
there can not possibly be 48 items on a 9x5 page - it is 44 for me (one is missing from being full on the last page.
This needs to be updated to 37 – the screwdrivers has been added to creative inv since (pr #99).
Also i think it needs to be minetest --verbose. It doesnt show anything for me otherwise.
And it would also be good to specify on which exact commits something needs to be tested.
otherwise all tests worked out.
Yes. Forgot to specify that. Nice you figured it out.
Yes. I did the math wrong when counting the number of cells.
@cora Can you approve the PR so it can be merged?
Testing Steps
The inventories does not change
I did these in both branches:
there's 37 items on the last page now since screwdriver was added to creative inv in pr #99
I also verified that basic game actions still work in survival.
Since the only test that failed is the screwdriver thing and the changes seem simple enough i will approve it. Even though the testing instructions could have been clearer.