Commit Graph
13 Commits
Author SHA1 Message Date
MasterofJOKers 803d8d7933 [genPOI] sort list of imports
Easier to see if an import is already there.
2015-03-12 15:56:48 +01:00
MasterofJOKers adcf105778 [genPOI] fix generation of multiple players
The same problem as in bd8f3577 is also present for players. The filters
were given as iterator, but iterated through once per player.
2015-03-12 15:54:48 +01:00
MasterofJOKers 5764183e00 [genPOI] remove unnecessary second import of json 2015-03-09 09:37:10 +01:00
MasterofJOKers bd8f357787 [genPOI] pass filters as list to handleManualPOI
It was accidently passed as an iterator, so it was only iterable once,
which lead to only the first manual poi being displayed.
2015-03-09 09:34:44 +01:00
MasterofJOKers 4b9d0a5c87 Merge branch 'master' into my_genpoi
Conflicts:
	overviewer_core/aux_files/genPOI.py
2015-02-08 14:19:21 +01:00
MasterofJOKers 9cbeffc721 Merge branch 'master' into my_genpoi 2014-10-30 12:47:55 +01:00
MasterofJOKers 9d1eb35643 Merge branch 'master' into my_genpoi
This just updates the code to the current master, so it can be merged
easily.

Conflicts:
	overviewer_core/aux_files/genPOI.py
2014-10-28 22:15:58 +01:00
MasterofJOKers 2271f628ef genPOI: use filter functions on the fly
Instead of reading all Players and especially Entities and TileEntities
into RAM and than applying the filter functions onto them, filter
functions are used after each parsed chunk to get only the markers of
this chunk and not all Entities.

This reduced the RAM usage dramatically:
On a 233 MB map over 200 MB of RAM was used before.
Using these changes (and only having two filter functions for signs) not
more than 36 MB of RAM was used.
2014-08-03 23:26:23 +02:00
MasterofJOKers eccad401ca genPOI: generate marker's internal name only once
Why should it be duplicated anyway?
2014-08-03 23:26:23 +02:00
MasterofJOKers e2b6474b28 genPOI: use a defaultdict for markers
This is a little faster and make the code a little shorter.
2014-08-03 23:26:23 +02:00
MasterofJOKers 6c14d47650 genPOI: unite for-loops with itertools
Since all the POIs are created from different lists, multiple for loops
were used. With itertools.chain these lists can be looped over with only
one for loop thus removing doubled code.
2014-08-03 23:26:23 +02:00
MasterofJOKers d7aa4fd4c2 genPOI: function for doubled code for marker creation
The code creating the actual marker dict out of the entity and the
result of the filter function was almost the same for every set of
entities. Thus it is now a function.
2014-08-03 23:26:23 +02:00
MasterofJOKers 61339b1c42 genPOI: add option --skip-players
If one simply wants to add some manual POIs, no player files have to be
parsed.
2014-08-03 23:26:23 +02:00