@ -47,6 +47,10 @@ 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:
* Player username privacy: check_players in chunkymap-regen.py intentionally makes up an index and uses that as the filename on the destination, so that ajax can update players without knowing either their id (filename of minetest player file) or display name (listed in the player file)
(this way, only usernames can be known if chunkymap.php allows that, or the person is logged in to the server)
Because of the feature, chunkymap-regen.py must prevent duplicates based on value of id in the resulting yml files (minetest player filename as id).
This should be hard to corrupt since id is used as the indexer for the players dict (however, extra files with no matching entry in the dict will still need to be deleted if they exist)
* games_path and mods_path should not be stored in minetestmeta.yml, since otherwise the values may deviate from the parent directories.
* 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:
To avoid this problem, instead derive the paths from the parent paths using your favorite language such as in the following examples:
#if (this_player is None) or not is_same_fvec3( map_player_position_tuple, player_position_tuple):
#if (this_player is None) or (saved_player_x is None) or (saved_player_z is None) or (int(saved_player_x)!=int(player_x)) or (int(saved_player_y)!=int(player_y)) or (int(saved_player_z)!=int(player_z)):
ifis_changed:
# don't check y since y is elevation in minetest, don't use float since subblock position doesn't matter to map
# don't check y since y is elevation in minetest, don't use float since subblock position doesn't matter to map
#if this_player is not None and saved_player_x is not None and saved_player_y is not None and saved_player_z is not None:
ifis_moved:
#print("PLAYER MOVED: "+str(player_name)+" moved from "+str(map_player_position_tuple)+" to "+str(player_position_tuple))
#print("PLAYER MOVED: "+str(player_name)+" moved from "+str(map_player_position_tuple)+" to "+str(player_position_tuple))
ifself.verbose_enable:
ifself.verbose_enable:
print("PLAYER MOVED: "+str(player_name)+" moved from "+str(saved_player_x)+","+str(saved_player_y)+","+str(saved_player_z)+" to "+str(player_x)+","+str(player_y)+","+str(player_z))
print("PLAYER MOVED: "+str(player_name)+" moved from "+str(saved_player_x)+","+str(saved_player_y)+","+str(saved_player_z)+" to "+str(player_x)+","+str(player_y)+","+str(player_z))
@ -1222,19 +1316,21 @@ class MTChunks:
ifself.verbose_enable:
ifself.verbose_enable:
print("SAVING YAML for player '"+str(player_name)+"'")
print("SAVING YAML for player '"+str(player_name)+"'")
print(gameid+" has "+str(len(new_mod_list))+" mod(s) beyond "+prepackaged_gameid+new_mod_list_msg+")")
print(gameid+" has "+str(len(new_mod_list))+" mod(s) beyond "+prepackaged_gameid+new_mod_list_msg+")")
if(user_excluded_mod_count>0):
print(" (not including "+str(user_excluded_mod_count)+" mods(s) excluded by world.mt)")
else:
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.")
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.")
$chunk_mode_enable=true; //(this should normally be false) if true, uses 16x16 png files instead of the 160x160 decachunks; it is slower but may have more of the map during times when new chunks are explored but before the render queue is done and the decachunk images are created from the chunk images.);
$chunk_mode_enable=true; //(this should normally be false) if true, uses 16x16 png files instead of the 160x160 decachunks; it is slower but may have more of the map during times when new chunks are explored but before the render queue is done and the decachunk images are created from the chunk images.);
$debug_mode_enable=false; //if true, this renders colors based on yml files instead of drawing images (and does not echo images at all)
$visual_debug_enable=false; //if true, this renders colors based on yml files instead of drawing images (and does not echo images at all)
$html4_mode_enable=false; //if true, does not echo canvas nor client-side scripting
$html4_mode_enable=false; //if true, does not echo canvas nor client-side scripting