-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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 convenience functions for overriding ABMs, LBMs and entities #14178
base: master
Are you sure you want to change the base?
Conversation
(only entities are in the roadmap, but I guess it won't hurt 🤷♀️ ; unsubscribing) |
Of course, that doesn't make this PR invalid. It's more convenient to have API functions for this purpose. |
I guess this resolves my issue? #13112 |
It doesn't allow doing that "on the fly", so it probably doesn't resolve your issue. |
This only allows a change of abm/lbm at loading time. After mods are loaded, the Lua tables Supporting dynamic changing of lbm/abm during the game running will be more difficult to implement. |
If this PR is closed without merging, I can create a specific PR for this. But because it takes time to merge PR, I would like to keep it here, instead of creating a separate PR and setting this PR to be blocked/waiting for it to be merged.
You are right. But in this way, with added error message it will be a more foolproof/error-proof way to override. This is too reason why do not create separate bugfix PR, I think.
Yes, but at least adding
Yes, it is possible. But you have to go through
|
Overriding of biomes will require changes and method adding in C++, so I will not implement it here. It should be a separate PR. |
I have added the possibility of testing override functionality. So, this is now prepared for review. |
I like the idea. Nice tests! Once question, could one also do this with a helper mod that implements |
Yes, all of this can be done by external mod with an exception for checking the But, my opinion is that It will be better to have this as part of the official modding API. |
4e9cdf3
to
02f6071
Compare
02f6071
to
445cf55
Compare
@sfence more rebase needed (then please remove the label when you're done) |
445cf55
to
227c304
Compare
register_node
,register_lbm
, etc after mod loading is finished.To do
This PR is a Ready for Review
How to test
Run detest game.
minetest.override_entity
is tested in unittests. Test forminetest.override_abm
andminetest.override_lbm
can be done by placing nodestestabms:override
andtestlbms:onload_change
from mods testabms and testlbms.