Closed Lowie375 closed 2 years ago
Agreed; this would be a good refactor.
That said, we should also look into making the mc_teacher mod more extendable for all mods to plug into it; e.g., introducing callbacks where appropriate, extensible menus, etc. so that it does not require hard-coding dependencies like what is happening here.
Good catch @Lowie375 and thanks for the quick fix.
Continued development of the
magnify
mod (#6) has revealed an issue with the current MineTest classroom framework: since theminetest_classroom
global object is instantiated in themc_teacher
mod, any mod which needs access to that object must be dependent onmc_teacher
. This means thatmc_teacher
can not depend on any other mods which need access to theminetest_classroom
global object (as that would create an unresolvable circular dependency). However, development on #6 requires thatmc_teacher
depend onmagnify
in order to access its species list after it has been populated, which would cause a circular dependency issue.I suggest that we move the instantiation of the
minetest_classroom
global object to a new mod,mc_core
, so that all mods that need access to theminetest_classroom
global object can be dependent onmc_core
instead ofmc_teacher
, thus resolving the circular dependency issue in #6.