From 618357f44259eb2a9a0ca0d6c48bf548913567c6 Mon Sep 17 00:00:00 2001 From: poikilos <7557867+poikilos@users.noreply.github.com> Date: Wed, 24 Feb 2016 10:57:52 -0500 Subject: [PATCH] ghost then later hide players if not moving and update readme --- README.md | 9 ++++++--- web/chunkymap.php | 32 ++++++++++++++++++++++++++------ 2 files changed, 32 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 24de494..1beacfb 100644 --- a/README.md +++ b/README.md @@ -10,6 +10,10 @@ This program comes without any warranty, to the extent permitted by applicable l * Has static html version of map (echo_chunkymap_table() php function) * Zoom in and out * optionally echo name of world that was detected by the scheduled py file + * shows player location (and only first 2 characters of name, for privacy; there is no saved setting yet, so to adjust, you must change the value of $nonprivate_name_beginning_char_count in chunkymap.php) + * Ghost players if they stay in one spot 2 minutes (consider them logged out by that method alone since not requiring mods; see $player_file_age_idle_max_seconds in chunkymap.php) + * Hide players if they stay in one spot 5 minutes (consider them logged out by that method alone since not requiring mods; see $player_file_age_expired_max_seconds in chunkymap.php) + * 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]) ## Requirements: @@ -58,7 +62,6 @@ This program comes without any warranty, to the extent permitted by applicable l ## Known Issues * index-example.php should read the size of the chunks -- see near is_file($chunk_genresult_path) in chunkymap.php -* Show player location (and optionally turn off) -* Make a php file that shows the map on an html5 canvas (refresh players every 10 seconds, check for new map chunks every minute) -* Make players invisible if they stay in one spot too long (consider them logged out by that method alone since not requiring mods) +* optionally hide player location +* Make a method (in chunkymap.php) to echo the map as an html5 canvas (refresh players every 10 seconds, check for new map chunks every minute) * Detect failure of minetestmapper-numpy.py and instead use minetest-mapper if on linux, otherwise show error if neither are present (Windows has no minetest-mapper at least on client 0.4.13) diff --git a/web/chunkymap.php b/web/chunkymap.php index 5277b72..b284da4 100644 --- a/web/chunkymap.php +++ b/web/chunkymap.php @@ -310,6 +310,7 @@ function echo_chunkymap_table() { $chunk_assoc[$chunk_luid][ "players" ][ $chunk_assoc[$chunk_luid]["players_count"] ][ "z" ] = $player_dict["z"]; $chunk_assoc[$chunk_luid][ "players" ][ $chunk_assoc[$chunk_luid]["players_count"] ][ "rel_x" ] = $rel_x; $chunk_assoc[$chunk_luid][ "players" ][ $chunk_assoc[$chunk_luid]["players_count"] ][ "rel_z" ] = $rel_z; + $chunk_assoc[$chunk_luid][ "players" ][ $chunk_assoc[$chunk_luid]["players_count"] ][ "file_path" ] = $file_path; if (isset($player_dict["name"])) { $chunk_assoc[$chunk_luid][ "players" ][ $chunk_assoc[$chunk_luid]["players_count"] ][ "name" ] = $player_dict["name"]; @@ -389,13 +390,15 @@ function echo_chunkymap_table() { $z_count = $chunkz_max - $chunkz_min; echo "\r\n"; echo "