0
Commit Graph

1135 Commits

Author SHA1 Message Date
Nicolas F
4e77ba8d13 genpoi: Fix GzipFile closing on python 2.6
Fixes #1275
2016-02-13 14:41:09 +01:00
Nicolas F
8f08b3b69f rcon: Throw more helpful exception if proto error
Addresses #1273.
2016-01-30 15:25:45 +01:00
Nicolas F
9fc050cf67 genPOI: Use "with" statement to close gzip files
Previously, the files were not closed after reading or writing;
by using a "with" statement, the file handles will be closed as
soon as they go out of scope.

Possible fix for #1271.
2016-01-30 14:17:16 +01:00
Nicolas F
c7f8cfee8c rcon: Wait for buffer to fill
We should wait for the buffer to fill up to 12 bytes instead of
simply assuming it will.

Possible fix for #1273.
2016-01-30 13:58:36 +01:00
Andrew Chin
d849f25930 Merge pull request #1267 from overviewer/uuidcache
genpoi UUID improvements
2016-01-14 16:12:51 -05:00
Andrew Chin
2e34507568 Use FileReplacer to manage the uuid cache file 2016-02-01 09:32:35 -05:00
Andrew Chin
68430335c8 JSObserver: Add missing string formatting param 2015-12-27 15:04:32 -05:00
Andrew Chin
270741eb8f genpoi UUID improvements
* When reading the cache, catch some errors on load, instead of crashing
* When writing to cache, write to tmp file, then move it into place.
  This should be more robust if a ctrl+c is recieved while writing the
  cache

Addresses #1266
2015-12-27 14:59:03 -05:00
Kevin Chang
eabda0750c create filter identifiers from render name instead of region set
This allows for separate sets of markers when multiple renders share the same region set (dimension).
2015-12-04 01:48:04 -08:00
Nicolas F
7dcf40fc20 Add region directory to corruption warnings
Fixes issue #1251
2015-10-18 21:33:08 +02:00
Andrew Chin
0ba0c60ed2 Catch TypeErrors as well when loading player dat files 2015-10-06 17:38:49 -04:00
Horst Burkhardt
06e500415a fix typo from last commit, should work now
Signed-off-by: Horst Burkhardt <mc@680x0.com>
2015-08-17 12:04:51 +10:00
Horst Burkhardt
5dabcb3408 add support for advpng to optimizeimages.py
Signed-off-by: Horst Burkhardt <mc@680x0.com>
2015-08-17 11:57:16 +10:00
Nicolas F
a8c71d089d Fix mingw-w64 build
On Windows with mingw-w64, Pillow includes windows.h, and thus
including Imaging.h would result in a name conflict of "TRANSPARENT",
which windows.h #defines but overviewer.h wants to use as enum.

For the record, this used to not be broken back when I initially
fixed Pillow for mingw-w64, so the change got somewhere introduced
between then and now.
2015-08-15 23:50:40 +02:00
Andrew Chin
afc1c4f924 Don't call save_cache if running with --skip-players 2015-08-14 08:47:52 -04:00
Nicolas F
0aef9b436c [webassets] Updated jQuery version 2015-05-04 14:59:18 +02:00
Mark Fickett
f839068f27 Convert filter generator to list before passing to handleEntities to fix repeated iteration. Fixes #1220 . 2015-03-18 23:33:54 -04:00
Aaron Griffith
4a9d808bb2 Merge pull request #1219 from MasterofJOKers/player_poi_fix
[genPOI] Fix generation of multiple players
2015-03-12 13:00:24 -04:00
Aaron Griffith
0c7441f93d equality != assignment... 2015-03-12 12:25:41 -04:00
Aaron Griffith
88de7b1567 get genpoi multiprocessing working on windows 2015-03-12 12:21:39 -04:00
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
Nicolas F
b35f848855 [genPOI] Work around utter plebbery 2015-03-08 17:03:43 +01:00
Nicolas F
b5ecf8a7f4 [genPOI] Work around JSON signs
lol Mojang
2015-03-07 18:16:32 +01:00
Andrew Chin
e6f44aed26 Merge pull request #1135 from MasterofJOKers/my_genpoi
addressing genPOI RAM usage
2015-03-06 17:09:40 -05:00
Jamie Bliss
3cd2afb0c4 genPOI: don't ignore invalid polyline point
There is no point in ignoring an invalid point, because without an error
message the user might wonder, why it's poyline doesn't look the way it
should.
2015-02-23 21:39:03 +01:00
Jamie Bliss
7229fcc3df genPOI: use more pythonic ways ...
One should use isinstance instead of `type(A) ==` because of
inheritance.
There should be an exception if a list of `elif`s don't match.
Make Polyline not only accept tuples, but any iterable.
2015-02-23 21:39:03 +01:00
Jamie Bliss
b08e34b064 genPOI: add icon and createInfoWindow support for filters
The defaults for "icon" and "createInfoWindow" are read from the POI,
but can be overridden by a filter function returning an appripriate
dict.
2015-02-23 21:19:17 +01:00
Aaron Griffith
9ec0a75eaa fix lighting for flowing water and ice
fix for issue #1205
2015-02-23 10:27:08 -05:00
MasterofJOKers
4b9d0a5c87 Merge branch 'master' into my_genpoi
Conflicts:
	overviewer_core/aux_files/genPOI.py
2015-02-08 14:19:21 +01:00
Gizmokid2005
77c4d24660 Skip missing dimensions in genPOI
This fixes overviewer/Minecraft-Overviewer #1202 for genPOI renders.
2015-02-05 13:54:01 -05:00
Aaron Griffith
32fbc1dea2 nbt array lengths are unsigned (see issue #1190) 2015-02-02 04:59:43 -05:00
Aaron Griffith
9a119a2dce Merge remote-tracking branch 'kiskoza/master' 2015-02-01 12:46:22 -05:00
Aaron Griffith
7e771abfee Merge remote-tracking branch 'CounterPillow/expand-dong' 2015-02-01 12:39:42 -05:00
Aaron Griffith
4eacfa467f Merge remote-tracking branch 'CounterPillow/rcon-observer' 2015-02-01 12:22:34 -05:00
Aaron Griffith
bad4261cb5 Merge remote-tracking branch 'enaut/structure_overlay' 2015-02-01 12:15:56 -05:00
Andrew Chin
97e5985933 Allow worlds with a version of zero (temp fix for #1194) 2015-01-03 11:56:51 -05:00
Koza
f1af25799e Fixed rendering regions. genPOI.py: add new line to baseMakers.js; views.js: add polygons, with all the features that Google provides, polylines work fine; regions.js: example of usage 2014-12-13 17:17:11 +01:00
Andrew Chin
f3af9555f0 Merge pull request #1163 from CounterPillow/optimizeimg-fixes
Add jpegoptim interface to optimizeimages
2014-11-25 02:17:14 -05:00
Andrew Chin
d34378bc29 Merge pull request #1172 from tswsl1989/upstream
Fix east side large mushroom rendering
2014-11-25 02:14:13 -05: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
Nicolas F
dfe6f08ee9 genPOI: Resolve UUIDs for player spawns too 2014-10-24 13:57:06 +02:00
Thomas Lake
904e5abd8e Fix east side large mushroom rendering 2014-10-20 11:19:31 +01:00
Nicolas F
c0d4fc9bc2 Add rollbacks to tile re-arrangements
Previously, any kind of interruption during tile re-arrangements
would leave the tileset in a half re-arranged state.

This commit makes _increase_depth roll back possible changes it did
during the re-arrangement prior to it being interrupted.

Fixes issue #1166.
2014-10-14 14:21:26 +02:00
Nicolas F
3a0f334970 optimizeimages: Add jpegoptim interface
Only options that appear to be interesting for us have been exposed,
namely -m and -S.
2014-10-10 20:54:47 +02:00
Nicolas F
c6830a35db Added RCon Observer
It does the rcons! And the observings!
2014-10-06 21:40:09 +02:00
Franz Dietrich
086820ac72 Adding StructureOverlay an overlay to color the map according to structures.
A usecase to demonstrate a possible application of the extended functionality:

**"Rails Overlay that draws only the rails that are on Cobblestone for a subway map."**

With this patch it is very easy to achive that:

```python
MineralOverlay(minerals=[(((0, 0, 0, 66), (0, -1, 0, 4)), (255, 0, 0, 255)),
                         (((0, 0, 0, 27), (0, -1, 0, 4)), (0, 255, 0, 255))])
```

In this case the overlay will be red for rails on cobblestone and green for powerrails on cobblestone.
The syntax is `(<tuple of conditions>, <target color>)`
 * where `<target color>` is a 4 tuple with a `(r, g, b, a)` color
 * and `<tuple of conditions>` is a tuple with an arbitrary number of conditions with the following syntax:
`((relx, rely, relz, blkid), ...)` where the `rel<>` parameters specify the relative coordinates to the block that is checked if it matches bklid.

In the example the fist tuple `(0,0,0,66)` checks if at the current position is a
rail while `(0,-1,0,4)` checks if at one below the current position is a cobblestone.
If both are true then the color `(255, 0, 0, 255)` is used.

A Sample Config file exploiting the capabilities:

``` python
worlds['My World'] = "~/.minecraft/saves/test/"
outputdir = "/tmp/test_render"
rendermode = "lighting"

renders["render1"] = {
    'world': 'My World',
    'title': 'A regular render',
}
renders["render_overlay_dafault_rails"] = {
    'world': 'My World',
    'title': 'Default Rails',
    'rendermode': [ClearBase(), StructureOverlay()],
    'overlay': ['render1'],
}
renders["render_overlay_cust_rails"] = {
    'world': 'My World',
    'title': 'Custom Rails',
    #relative coordinates [[(relx, rely, relz, mineral)], (red, green, blue, alpha)]
    'rendermode': [ClearBase(), StructureOverlay(structures=[(((0, 0, 0, 66), (0, -1, 0, 4)), (255, 0, 0, 255)),
                                                            (((0, 0, 0, 27), (0, -1, 0, 4)), (0, 255, 0, 255))])],
    'overlay': ['render1'],
}
```

The "Default Rails" overlay uses default coloring of the structures overlay. "Custom Rails" uses some custom coloring.

fixes overviewer/Minecraft-Overviewer#556 and fixes overviewer/Minecraft-Overviewer#787
2014-09-03 12:05:11 +02:00