EmptyStar / asuna

A Minetest game of vibrant natural wonders
Other
13 stars 4 forks source link

game won't start when moreores enabled #83

Closed programmerjake closed 1 month ago

programmerjake commented 1 year ago

reproduction steps: create new world with beta-16 asuna game and moreores mod try to start game

2023-07-22 18:18:56: WARNING[Main]: Undeclared global variable "asuna" accessed at ...minetest/games/asuna/mods/minetest_game/farming/init.lua:97
2023-07-22 18:18:56: ACTION[Main]: Server: Shutting down
2023-07-22 18:18:57: ERROR[Main]: ModError: Failed to load and run script from /home/jacob/.var/app/net.minetest.Minetest/.minetest/games/asuna/mods/minetest_game/farming/init.lua:
2023-07-22 18:18:57: ERROR[Main]: ...minetest/games/asuna/mods/minetest_game/farming/init.lua:97: attempt to index global 'asuna' (a nil value)
2023-07-22 18:18:57: ERROR[Main]: stack traceback:
2023-07-22 18:18:57: ERROR[Main]:   ...minetest/games/asuna/mods/minetest_game/farming/init.lua:97: in main chunk

afaict what happened is that all the mods that were modified to access the asuna global weren't modified to actually depend on asuna_core, so farming, one of the mods modified to access the asuna global, tries to load before asuna_core (because asuna_core depends on too_many_stones which depends on moreores which depends on farming) and then fails. I suggest splitting out an asuna_api mod that doesn't depend on anything and contains the asuna global and then make all the other mods that use asuna depend on asuna_api rather than going through asuna_core

programmerjake commented 1 month ago

is https://github.com/asuna-mt/asuna intended to be the replacement for this repo? if so this issue is fixed by asuna_core having its dependencies commented out in that repo.

EmptyStar commented 1 month ago

Yes, I've had it on my mind to come back to this repo and clean up some issues after the latest release. The link you posted is in fact the new Asuna repo. I tested More Ores myself specifically for this issue and it also works for me.

I'll close out this issue now that it's solved. Thanks for reporting this issue and for keeping an eye on Asuna!