diff --git a/singleimage.py b/singleimage.py index 6deba33..1cfe1c5 100644 --- a/singleimage.py +++ b/singleimage.py @@ -114,6 +114,7 @@ class ChunkymapOfflineRenderer: dest_png_path = os.path.join(www_chunkymapdata_world_path, png_name) if os.path.isfile(dest_png_path): os.remove(dest_png_path) + print("Moving temp image from "+tmp_png_path+" to "+dest_png_path+"...") os.rename(tmp_png_path, dest_png_path) final_png_path = dest_png_path print("Png image saved to:") diff --git a/u_skin_adder.py b/u_skin_adder.py index ef59023..12dd069 100644 --- a/u_skin_adder.py +++ b/u_skin_adder.py @@ -2,7 +2,17 @@ import os #from PIL import Image, ImageDraw, ImageFont, ImageColor from expertmm import * from minetestinfo import * #paths and FLAG_EMPTY_HEXCOLOR = "#010000" -from PIL import Image, ImageDraw, ImageFont, ImageColor +try: + from PIL import Image, ImageDraw, ImageFont, ImageColor +except: + print("You must first install Pillow's PIL." + print("On Windows:") + print("Right-click windows menu, 'Command Prompt (Admin)' then:") + print("pip install Pillow") + print("") + print("On *nix-like systems:") + print("sudo pip install Pillow") + exit() import shutil u_skins_mod_path = os.path.join(profile_path,"Desktop\\Backup\\fcalocal\\usr\\local\\share\\minetest\\games\\fca_game_a\\mods\\u_skins\\u_skins") @@ -349,3 +359,4 @@ def load_new_skins_from_folder(in_path): #raw_input("Press return to exit.") #load_new_skins_from_folder("C:\\Users\\Owner\\ownCloud\\Pictures\\Projects\\Characters - Mine - In-Game\\Minetest Player Skins") +#add_skin_if_new("z:\\yelby.png") diff --git a/web/phpinfo.php b/web/phpinfo.php new file mode 100644 index 0000000..8311ba0 --- /dev/null +++ b/web/phpinfo.php @@ -0,0 +1,6 @@ + \ No newline at end of file diff --git a/web/viewchunkymap.php b/web/viewchunkymap.php index 8393022..5a8716a 100644 --- a/web/viewchunkymap.php +++ b/web/viewchunkymap.php @@ -8,7 +8,7 @@ $html4_mode_enable=false; //if true, does not echo canvas nor client-side script if ($html4_mode_enable===true) { echo ''; } -echo ' +echo ' '; @@ -24,61 +24,61 @@ $show_expired_players_enable = false; // //make sure you set this here, otherwise players can override it if (is_file('chunkymap.php')) { - //echo "including..."; - include_once('chunkymap.php'); - //echo "about to call echo_chunkymap_as_chunk_table..."; + //echo "including..."; + include_once('chunkymap.php'); + //echo "about to call echo_chunkymap_as_chunk_table..."; - //The following is not needed, since chunkymap.php should be included above and puts all $_REQUEST array variables into $GLOBALS array - //if (!isset($_REQUEST['x'])) {//if (!isset($x)) { - // $x=0; - //} - //else $x=$_REQUEST['x']; - //echo "
"; - //echo "

"; - //echo_map_heading_text(); - //echo "

"; - //echo "
"; - set_chunkymap_view($x,$z,$zoom); - //echo "
"; - $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.); - $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) - $html4_mode_enable=false; - $append_vars = ""; - if (isset($x)) { - $append_vars.="&x=$x"; - } - if (isset($z)) { - $append_vars.="&z=$z"; - } - if (isset($zoom)) { - $append_vars.="&zoom=$zoom"; - } - // if (!isset($world_name)) { - // if ($handle = opendir($chunkymapdata_worlds_path)) { - // while (false !== ($file_name = readdir($handle))) { - // if (substr($file_name, 0, 1) != ".") { - // $file_path = $chunkymapdata_worlds_path."/".$file_name; - // if (is_dir($file_path)) { - // echo "$file_name"; - // //$world_name=$file_name; - // //break; - // } - // } - // } - // closedir($handle); - // } - // } - echo "Press F5 key on your keyboard to refresh player locations.
"; - echo_chunkymap_canvas($show_player_names_enable,$decachunks_enable,$chunks_enable,$visual_debug_enable,$html4_mode_enable); - //echo_chunkymap_as_chunk_table(false); - //echo_decachunk_table(); - //echo "
"; - //echo "returned from echo_chunkymap_as_chunk_table."; + //The following is not needed, since chunkymap.php should be included above and puts all $_REQUEST array variables into $GLOBALS array + //if (!isset($_REQUEST['x'])) {//if (!isset($x)) { + // $x=0; + //} + //else $x=$_REQUEST['x']; + //echo "
"; + //echo "

"; + //echo_map_heading_text(); + //echo "

"; + //echo "
"; + set_chunkymap_view($x,$z,$zoom); + //echo "
"; + $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.); + $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) + $html4_mode_enable=false; + $append_vars = ""; + if (isset($x)) { + $append_vars.="&x=$x"; + } + if (isset($z)) { + $append_vars.="&z=$z"; + } + if (isset($zoom)) { + $append_vars.="&zoom=$zoom"; + } + // if (!isset($world_name)) { + // if ($handle = opendir($chunkymapdata_worlds_path)) { + // while (false !== ($file_name = readdir($handle))) { + // if (substr($file_name, 0, 1) != ".") { + // $file_path = $chunkymapdata_worlds_path."/".$file_name; + // if (is_dir($file_path)) { + // echo "$file_name"; + // //$world_name=$file_name; + // //break; + // } + // } + // } + // closedir($handle); + // } + // } + echo "Press F5 key on your keyboard to refresh player locations.
"; + echo_chunkymap_canvas($show_player_names_enable,$decachunks_enable,$chunks_enable,$visual_debug_enable,$html4_mode_enable); + //echo_chunkymap_as_chunk_table(false); + //echo_decachunk_table(); + //echo "
"; + //echo "returned from echo_chunkymap_as_chunk_table."; } else { - echo "missing chunkymap.php"; + echo "missing chunkymap.php"; } ?>