@ -47,6 +47,12 @@ This program comes without any warranty, to the extent permitted by applicable l
* Has optional script to add crontab entry (to schedule update script every minute that runs the py file unless the py file is not complete [took longer than 1 minute])
* Has optional script to add crontab entry (to schedule update script every minute that runs the py file unless the py file is not complete [took longer than 1 minute])
## Developer Notes:
## Developer Notes:
* games_path and mods_path should not be stored in minetestmeta.yml, since otherwise the values may deviate from the parent directories.
To avoid this problem, instead derive the paths from the parent paths using your favorite language such as in the following examples:
* Keep in mind that gameid (in game.conf in a subgame folder, and world.mt in a world folder) is NOT case-sensitive: for example, minetest_game has the gameid 'Minetest' (first letter capitalized) but the worlds generated by Minetest client have the gameid 'minetest' (lowercase) in their world.mt
* the map update function is only able to detect new chunks, and only checks edge chunks if player is present in one
* the map update function is only able to detect new chunks, and only checks edge chunks if player is present in one
* The following are saved to chunkymap.yml if not already set:
* The following are saved to chunkymap.yml if not already set:
www_minetest_path (such as /var/www/html/minetest)
www_minetest_path (such as /var/www/html/minetest)
#print("get_game_path_from_gameid is seeing if '"+str(this_gameid)+"' is the desired '"+gameid+"'")
result=this_game_path
ifthis_gameidisnotNone:
break
ifthis_gameid.lower()==gameid.lower():
result=this_game_path
break
#else:
#print("skipping '"+this_game_path+"'")
ifgame_count<=0:
print("WARNING: "+str(game_count)+" games in '"+games_path+"'.")
else:
else:
print("ERROR: cannot get game_path from gameid since games path is not ready yet (or '"+games_path+"' does not exist for some other reason such as shared_minetest_path is wrong and does not contain games folder)")
print("ERROR: cannot get game_path from gameid since games path is not ready yet (or '"+games_path+"' does not exist for some other reason such as shared_minetest_path is wrong and does not contain games folder)")
else:
else:
@ -141,7 +162,10 @@ def init_minetestinfo():
defload_world_and_mod_data():
defload_world_and_mod_data():
#if games_path =
#if games_path =
globalloaded_mod_list
globalloaded_mod_list
globalprepackaged_game_mod_list
whilelen(loaded_mod_list)>0:loaded_mod_list.pop()# instead of remaking, pop to ensure global is changed
whilelen(loaded_mod_list)>0:loaded_mod_list.pop()# instead of remaking, pop to ensure global is changed
print("Could not find game folder '"+minetestinfo.get_var("game_path")+"'. Please fix game_path in '"+minetestinfo._config_path+"' to point to your subgame, so that game and mod management features will work.")
print("WARNING: could not get default gameid--perhaps 'games_path' in '"+minetestinfo._config_path+"' is wrong.")
print("Mod list for current game: "+','.join(loaded_mod_list))
print(gameid+" has "+str(len(new_mod_list))+" mod(s) beyond "+prepackaged_gameid+new_mod_list_msg+")")
else:
print("Could not find game folder '"+minetestinfo.get_var("game_path")+"'. Please fix game_path in '"+minetestinfo._config_path+"' to point to your subgame, so that game and mod management features will work.")