Browse Source

working on singleimage

master
poikilos 9 years ago
committed by Jacob Gustafson
parent
commit
659943f933
  1. 1
      minetestinfo.py
  2. 3
      singleimage.py
  3. 2
      update-chunkymap-on-ubuntu-from-web.sh
  4. 3
      web/chunkymap.php
  5. 5
      web/viewchunkymap.php

1
minetestinfo.py

@ -65,6 +65,7 @@ after_broken_startswith["Item pipeworks:accelerator_tube_"] = "pipeworks:acceler
#TODO: crafts (scrape list of ingredients to remove from inventory) #TODO: crafts (scrape list of ingredients to remove from inventory)
genresult_name_closer_string = "_mapper_result.txt" genresult_name_closer_string = "_mapper_result.txt"
gen_error_name_closer_string = "_mapper_err.txt"
loaded_mod_list = list() loaded_mod_list = list()

3
singleimage.py

@ -47,7 +47,8 @@ class ChunkymapOfflineRenderer:
if not os.path.isdir(genresults_folder_path): if not os.path.isdir(genresults_folder_path):
os.makedirs(genresults_folder_path) os.makedirs(genresults_folder_path)
genresult_path = os.path.join(genresults_folder_path, "singleimage"+genresult_name_closer_string) genresult_path = os.path.join(genresults_folder_path, "singleimage"+genresult_name_closer_string)
cmd_suffix = " > \""+genresult_path+"\"" gen_error_path = os.path.join(genresults_folder_path, "singleimage"+gen_error_name_closer_string)
cmd_suffix = " 1> \""+genresult_path+"\""
#blank since singleimage mode: #blank since singleimage mode:
#geometry_string = str(min_x)+":"+str(min_z)+"+"+str(int(max_x)-int(min_x)+1)+"+"+str(int(max_z)-int(min_z)+1) # +1 since max-min is exclusive and width must be inclusive for minetestmapper.py #geometry_string = str(min_x)+":"+str(min_z)+"+"+str(int(max_x)-int(min_x)+1)+"+"+str(int(max_z)-int(min_z)+1) # +1 since max-min is exclusive and width must be inclusive for minetestmapper.py

2
update-chunkymap-on-ubuntu-from-web.sh

@ -36,8 +36,10 @@ MT_MY_WEBSITE_PATH=/var/www/html/minetest
if [ -f "$HOME/Downloads/minetest-chunkymap/web/chunkymap.php" ]; then if [ -f "$HOME/Downloads/minetest-chunkymap/web/chunkymap.php" ]; then
if [ -f "$MT_MY_WEBSITE_PATH/chunkymap.php" ]; then if [ -f "$MT_MY_WEBSITE_PATH/chunkymap.php" ]; then
sudo cp -f "$HOME/Downloads/minetest-chunkymap/web/chunkymap.php" "$MT_MY_WEBSITE_PATH/" sudo cp -f "$HOME/Downloads/minetest-chunkymap/web/chunkymap.php" "$MT_MY_WEBSITE_PATH/"
echo "updated $MT_MY_WEBSITE_PATH/chunkymap.php"
#sudo cp --no-clobber "$HOME/Downloads/minetest-chunkymap/web/viewchunkymap.php" "$MT_MY_WEBSITE_PATH/viewchunkymap.php" #sudo cp --no-clobber "$HOME/Downloads/minetest-chunkymap/web/viewchunkymap.php" "$MT_MY_WEBSITE_PATH/viewchunkymap.php"
sudo cp -f "$HOME/Downloads/minetest-chunkymap/web/viewchunkymap.php" "$MT_MY_WEBSITE_PATH/viewchunkymap.php" sudo cp -f "$HOME/Downloads/minetest-chunkymap/web/viewchunkymap.php" "$MT_MY_WEBSITE_PATH/viewchunkymap.php"
echo "updated $MT_MY_WEBSITE_PATH/viewchunkymap.php"
# cannot put wildcard in quotes on unix # cannot put wildcard in quotes on unix
#sudo cp -R --no-clobber $HOME/Downloads/minetest-chunkymap/web/images/* "$MT_MY_WEBSITE_PATH/images/" #sudo cp -R --no-clobber $HOME/Downloads/minetest-chunkymap/web/images/* "$MT_MY_WEBSITE_PATH/images/"
#--no-clobber: do not overwrite existing #--no-clobber: do not overwrite existing

3
web/chunkymap.php

@ -1385,6 +1385,9 @@ function echo_chunkymap_canvas($show_player_names_enable, $decachunks_enable, $c
echo ' </td></tr>'."\r\n"; echo ' </td></tr>'."\r\n";
echo '</table>'."\r\n"; echo '</table>'."\r\n";
} }
else {
echo '<--no '."$si_path".'-->'+"\r\n";
}
//echo "<img id=\"singleplayer_img\" src=\"$chunkymapdata_thisworld_path/players/singleplayer.png\" style=\"visibility:hidden\"/>"; //echo "<img id=\"singleplayer_img\" src=\"$chunkymapdata_thisworld_path/players/singleplayer.png\" style=\"visibility:hidden\"/>";
echo '<img id="compass_rose" src="chunkymapdata/images/compass_rose.png"/>'; echo '<img id="compass_rose" src="chunkymapdata/images/compass_rose.png"/>';

5
web/viewchunkymap.php

@ -38,10 +38,11 @@ if (is_file('chunkymap.php')) {
//echo "</center>"; //echo "</center>";
set_chunkymap_view($x,$z,$zoom); set_chunkymap_view($x,$z,$zoom);
//echo "<table><tr><td style=\"text-align:left\">"; //echo "<table><tr><td style=\"text-align:left\">";
$chunks_enable=false; //(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.); $show_player_names_enable=true;
$decachunks_enable=false; //(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.); $decachunks_enable=false; //(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.);
$chunks_enable=false; //(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.);
$visual_debug_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)
$show_player_names_enable=true; $html4_mode_enable=false;
echo_chunkymap_canvas($show_player_names_enable,$decachunks_enable,$chunks_enable,$visual_debug_enable,$html4_mode_enable); echo_chunkymap_canvas($show_player_names_enable,$decachunks_enable,$chunks_enable,$visual_debug_enable,$html4_mode_enable);
//echo_chunkymap_as_chunk_table(false); //echo_chunkymap_as_chunk_table(false);
//echo_decachunk_table(); //echo_decachunk_table();

Loading…
Cancel
Save