Browse Source

fixed rerender issue in pseudorecursion

and improved documentation of signals txt file
master
poikilos 10 years ago
committed by Jacob Gustafson
parent
commit
f6b73e5668
  1. 15
      README.md
  2. 15
      chunkymap-regen.py
  3. 2
      install-chunkymap-on-ubuntu.sh

15
README.md

@ -21,6 +21,20 @@ This program comes without any warranty, to the extent permitted by applicable l
echo "refresh_map_enable:False" > ~/minetest/util/chunkymap-signals.txt
sleep 15s
echo "loop_enable:False" > ~/minetest/util/chunkymap-signals.txt
* list of signals:
loop_enable:True
loop_enable:False
refresh_players_enable:True
refresh_players_enable:False
refresh_map_enable:True
refresh_map_enable:False
#rerenders chunks that were rendered in this run:
recheck_rendered:True
#where 1 is number of seconds:
refresh_map_seconds:1
#where 1 is number of seconds:
refresh_players_seconds:1
* Has static html version of map (echo_chunkymap_table() php function) -- see example.php
* Zoom in and out
* optionally echo name of world that was detected by the scheduled py file
@ -89,6 +103,7 @@ This program comes without any warranty, to the extent permitted by applicable l
chunkymap-regen-loop.bat
* copy example.php and chunkymap.php (and optionally browser.php) to your DocumentRoot or whatever folder will contain the chunkymapdata folder
## Known Issues
*
* chunkymap.php should read the size of the chunks -- see near is_file($chunk_genresult_path) in chunkymap.php
* 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)

15
chunkymap-regen.py

@ -789,7 +789,7 @@ class MTChunks:
is_render_needed = False
#if not self.is_chunk_fresh(chunk_luid):
if not self.is_chunk_fresh(chunk_luid):
if is_player_in_this_chunk:
if self.is_chunk_yaml_marked(chunk_luid):
if self.is_chunk_yaml_marked_empty(chunk_luid):
@ -819,9 +819,9 @@ class MTChunks:
else:
if self.is_verbose:
print (chunk_luid+": SKIPPING nonfresh previously marked (simple check since has no player)")
#else:
# if self.is_verbose:
# print (chunk_luid+": SKIPPING fresh chunk")
else:
if self.is_verbose:
print (chunk_luid+": SKIPPING fresh chunk")
#if (not self.is_chunk_yaml_marked(chunk_luid)):
#is_render_needed = True
@ -1136,6 +1136,13 @@ class MTChunks:
print("ERROR: expected >=1 seconds for refresh_players_seconds (int or float)")
else:
print("ERROR: expected int for "+this_key)
elif this_key=="recheck_rendered":
if type(signals[this_key]) is bool:
if signals[this_key]:
for chunk_luid in self.chunks.keys():
self.chunks[chunk_luid].is_fresh = False
else:
print("ERROR: expected bool for "+this_key)
elif this_key=="refresh_map_enable":
if type(signals[this_key]) is bool:
self.refresh_map_enable = signals[this_key]

2
install-chunkymap-on-ubuntu.sh

@ -52,7 +52,7 @@ chmod -x "$CHUNKYMAP_DEST/unused/chunkymap-cronjob"
chmod -x "$CHUNKYMAP_DEST/unused/set-minutely-crontab-job.sh"
chmod -x "$CHUNKYMAP_DEST/unused/set-minutely-players-crontab-job.sh"
sudo apt-get install python-numpy python-pil
sudo apt-get install python-numpy python-pil python-leveldb
echo ""
echo "To see what needs to be in your $MT_MY_WEBSITE_PATH directory (if you don't use that directory, modify chunkymap-regen.py to use your directory):"
echo "cd $CHUNKYMAP_DEST/web"

Loading…
Cancel
Save