From c82a54fe7f15fe8c228d0cc69f4d75f7aed227be Mon Sep 17 00:00:00 2001 From: zeeZ Date: Fri, 13 May 2011 21:17:55 +0800 Subject: [PATCH 1/3] Added data value colors for Stone Slabs and Double Stone Slabs to colorschemes, added Sandstone color as a copy of Sand color to sk89q.txt --- colorschemes/default.txt | 29 +++++++++++++++++++++++++++++ colorschemes/flames.txt | 29 +++++++++++++++++++++++++++++ colorschemes/ovocean.txt | 29 +++++++++++++++++++++++++++++ colorschemes/sk89q.txt | 9 +++++++++ 4 files changed, 96 insertions(+) diff --git a/colorschemes/default.txt b/colorschemes/default.txt index d248e978..0684873b 100644 --- a/colorschemes/default.txt +++ b/colorschemes/default.txt @@ -69,20 +69,35 @@ Black Cloth Wool 35 222 222 222 255 177 177 177 255 111 111 111 255 88 88 88 255 35:0 222 222 222 255 177 177 177 255 111 111 111 255 88 88 88 255 +Wool - Orange 35:1 204 111 48 255 162 89 38 255 102 56 24 255 81 44 19 255 +Wool - Magenta 35:2 166 66 175 255 133 53 140 255 83 33 87 255 66 26 69 255 +Wool - Light Blue 35:3 91 121 185 255 73 96 147 255 46 61 92 255 36 48 73 255 +Wool - Yellow 35:4 170 158 24 255 135 126 19 255 85 79 12 255 67 62 10 255 +Wool - Light Green 35:5 51 165 42 255 41 131 33 255 26 82 21 255 20 65 17 255 +Wool - Pink 35:6 190 115 135 255 151 92 108 255 95 57 67 255 75 46 53 255 +Wool - Gray 35:7 58 58 58 255 47 47 47 255 29 29 29 255 23 23 23 255 +Wool - Light Gray 35:8 138 145 145 255 110 115 115 255 69 72 72 255 55 57 57 255 +Wool - Cyan 35:9 34 102 131 255 27 81 104 255 17 51 65 255 13 40 52 255 +Wool - Purple 35:10 113 47 171 255 90 37 136 255 57 24 85 255 45 19 68 255 +Wool - Blue 35:11 34 44 134 255 27 35 107 255 17 22 67 255 13 18 53 255 +Wool - Brown 35:12 75 44 24 255 60 35 19 255 37 22 12 255 30 18 10 255 +Wool - Dark Green 35:13 49 67 21 255 39 53 17 255 24 34 10 255 19 27 8 255 +Wool - Red 35:14 143 39 36 255 114 31 28 255 71 20 18 255 57 16 14 255 +Wool - Black 35:15 24 20 20 255 19 16 16 255 12 10 10 255 9 8 8 255 Gray Cloth 36 125 125 125 255 114 114 114 255 104 104 104 255 86 86 86 255 @@ -100,8 +115,22 @@ Iron Block 42 191 191 191 255 152 152 152 255 95 95 95 255 76 76 76 255 Double Stone Slab 43 200 200 200 255 160 160 160 255 100 100 100 255 80 80 80 255 +43:0 200 200 200 255 160 160 160 255 100 100 100 255 80 80 80 255 +Double Stone Slab - Sandstone +43:1 218 210 158 255 174 168 126 255 109 105 79 255 87 84 63 255 +Double Stone Slab - Wood +43:2 157 128 79 255 125 102 63 255 78 64 39 255 62 51 31 255 +Double Stone Slab - Cobblestone +43:3 115 115 115 255 92 92 92 255 57 57 57 255 46 46 46 255 Stone Slab 44 200 200 200 255 160 160 160 255 100 100 100 255 80 80 80 255 +44:0 200 200 200 255 160 160 160 255 100 100 100 255 80 80 80 255 +Stone Slab - Sandstone +44:1 218 210 158 255 174 168 126 255 109 105 79 255 87 84 63 255 +Stone Slab - Wood +44:2 157 128 79 255 125 102 63 255 78 64 39 255 62 51 31 255 +Stone Slab - Cobblestone +44:3 115 115 115 255 92 92 92 255 57 57 57 255 46 46 46 255 Brick 45 170 86 62 255 136 68 49 255 85 43 31 255 68 34 24 255 TNT diff --git a/colorschemes/flames.txt b/colorschemes/flames.txt index 84b20d9b..8dccb7eb 100644 --- a/colorschemes/flames.txt +++ b/colorschemes/flames.txt @@ -69,20 +69,35 @@ Black Cloth Wool 35 247 255 239 255 244 251 236 255 204 210 197 255 244 251 236 255 35:0 247 255 239 255 244 251 236 255 204 210 197 255 244 251 236 255 +Wool - Orange 35:1 227 128 52 255 224 126 51 255 187 105 42 255 224 126 51 255 +Wool - Magenta 35:2 185 76 188 255 183 75 186 255 153 63 155 255 183 75 186 255 +Wool - Light Blue 35:3 102 139 199 255 100 137 196 255 84 114 164 255 100 137 196 255 +Wool - Yellow 35:4 189 181 26 255 187 178 26 255 156 149 22 255 187 178 26 255 +Wool - Light Green 35:5 57 189 45 255 56 186 44 255 47 156 37 255 56 186 44 255 +Wool - Pink 35:6 211 132 145 255 209 130 143 255 174 109 120 255 209 130 143 255 +Wool - Gray 35:7 65 67 63 255 64 66 62 255 54 55 52 255 64 66 62 255 +Wool - Light Gray 35:8 154 166 156 255 152 163 154 255 127 137 128 255 152 163 154 255 +Wool - Cyan 35:9 38 117 141 255 37 115 139 255 31 96 116 255 37 115 139 255 +Wool - Purple 35:10 126 54 184 255 124 53 181 255 104 44 151 255 124 53 181 255 +Wool - Blue 35:11 38 51 144 255 37 50 143 255 31 42 119 255 37 50 143 255 +Wool - Brown 35:12 83 51 26 255 82 50 26 255 69 42 22 255 82 50 26 255 +Wool - Dark Green 35:13 54 77 22 255 54 76 22 255 45 63 19 255 54 76 22 255 +Wool - Red 35:14 159 45 38 255 157 44 38 255 131 37 32 255 157 44 38 255 +Wool - Black 35:15 26 23 22 255 26 23 21 255 22 19 18 255 26 23 21 255 Gray Cloth 36 125 125 125 255 114 114 114 255 104 104 104 255 86 86 86 255 @@ -100,8 +115,22 @@ Iron Block 42 191 191 191 255 152 152 152 255 95 95 95 255 76 76 76 255 Double Stone Slab 43 200 200 200 255 160 160 160 255 100 100 100 255 80 80 80 255 +43:0 200 200 200 255 160 160 160 255 100 100 100 255 80 80 80 255 +Double Stone Slab - Sandstone +43:1 192 178 110 255 160 148 92 255 134 124 77 255 160 148 92 255 +Double Stone Slab - Wood +43:2 157 128 79 255 125 102 63 255 78 64 39 255 62 51 31 255 +Double Stone Slab - Cobblestone +43:3 115 115 115 255 92 92 92 255 57 57 57 255 46 46 46 255 Stone Slab 44 200 200 200 255 160 160 160 255 100 100 100 255 80 80 80 255 +44:0 200 200 200 255 160 160 160 255 100 100 100 255 80 80 80 255 +Stone Slab - Sandstone +44:1 192 178 110 255 160 148 92 255 134 124 77 255 160 148 92 255 +Stone Slab - Wood +44:2 157 128 79 255 125 102 63 255 78 64 39 255 62 51 31 255 +Stone Slab - Cobblestone +44:3 115 115 115 255 92 92 92 255 57 57 57 255 46 46 46 255 Brick 45 170 86 62 255 136 68 49 255 85 43 31 255 68 34 24 255 TNT diff --git a/colorschemes/ovocean.txt b/colorschemes/ovocean.txt index 58d0e28a..36474f09 100644 --- a/colorschemes/ovocean.txt +++ b/colorschemes/ovocean.txt @@ -69,20 +69,35 @@ Black Cloth Wool 35 222 222 222 255 177 177 177 255 111 111 111 255 88 88 88 255 35:0 222 222 222 255 177 177 177 255 111 111 111 255 88 88 88 255 +Wool - Orange 35:1 204 111 48 255 162 89 38 255 102 56 24 255 81 44 19 255 +Wool - Magenta 35:2 166 66 175 255 133 53 140 255 83 33 87 255 66 26 69 255 +Wool - Light Blue 35:3 91 121 185 255 73 96 147 255 46 61 92 255 36 48 73 255 +Wool - Yellow 35:4 170 158 24 255 135 126 19 255 85 79 12 255 67 62 10 255 +Wool - Light Green 35:5 51 165 42 255 41 131 33 255 26 82 21 255 20 65 17 255 +Wool - Pink 35:6 190 115 135 255 151 92 108 255 95 57 67 255 75 46 53 255 +Wool - Gray 35:7 58 58 58 255 47 47 47 255 29 29 29 255 23 23 23 255 +Wool - Light Gray 35:8 138 145 145 255 110 115 115 255 69 72 72 255 55 57 57 255 +Wool - Cyan 35:9 34 102 131 255 27 81 104 255 17 51 65 255 13 40 52 255 +Wool - Purple 35:10 113 47 171 255 90 37 136 255 57 24 85 255 45 19 68 255 +Wool - Blue 35:11 34 44 134 255 27 35 107 255 17 22 67 255 13 18 53 255 +Wool - Brown 35:12 75 44 24 255 60 35 19 255 37 22 12 255 30 18 10 255 +Wool - Dark Green 35:13 49 67 21 255 39 53 17 255 24 34 10 255 19 27 8 255 +Wool - Red 35:14 143 39 36 255 114 31 28 255 71 20 18 255 57 16 14 255 +Wool - Black 35:15 24 20 20 255 19 16 16 255 12 10 10 255 9 8 8 255 Gray Cloth 36 125 125 125 255 114 114 114 255 104 104 104 255 86 86 86 255 @@ -100,8 +115,22 @@ Iron Block 42 191 191 191 255 152 152 152 255 95 95 95 255 76 76 76 255 Double Stone Slab 43 200 200 200 255 160 160 160 255 100 100 100 255 80 80 80 255 +43:0 200 200 200 255 160 160 160 255 100 100 100 255 80 80 80 255 +Double Stone Slab - Sandstone +43:1 214 182 111 255 203 171 100 255 186 154 83 255 173 141 70 255 +Double Stone Slab - Wood +43:2 157 128 79 255 125 102 63 255 78 64 39 255 62 51 31 255 +Double Stone Slab - Cobblestone +43:3 115 115 115 255 92 92 92 255 57 57 57 255 46 46 46 255 Stone Slab 44 200 200 200 255 160 160 160 255 100 100 100 255 80 80 80 255 +44:0 200 200 200 255 160 160 160 255 100 100 100 255 80 80 80 255 +Stone Slab - Sandstone +44:1 214 182 111 255 203 171 100 255 186 154 83 255 173 141 70 255 +Stone Slab - Wood +44:2 157 128 79 255 125 102 63 255 78 64 39 255 62 51 31 255 +Stone Slab - Cobblestone +44:3 115 115 115 255 92 92 92 255 57 57 57 255 46 46 46 255 Brick 45 170 86 62 255 136 68 49 255 85 43 31 255 68 34 24 255 TNT diff --git a/colorschemes/sk89q.txt b/colorschemes/sk89q.txt index 5cb0e8b7..4b052513 100644 --- a/colorschemes/sk89q.txt +++ b/colorschemes/sk89q.txt @@ -16,6 +16,7 @@ 17 119 97 74 255 99 81 62 255 83 68 52 255 99 81 62 255 18 27 69 37 180 22 57 31 180 19 48 25 180 22 57 31 180 20 178 217 223 90 148 181 186 90 124 151 155 90 148 181 186 90 +24 192 178 110 255 160 148 92 255 134 124 77 255 160 148 92 255 35 247 255 239 255 244 251 236 255 204 210 197 255 244 251 236 255 35:0 247 255 239 255 244 251 236 255 204 210 197 255 244 251 236 255 35:1 227 128 52 255 224 126 51 255 187 105 42 255 224 126 51 255 @@ -41,7 +42,15 @@ 41 247 255 239 255 244 251 236 255 204 210 197 255 244 251 236 255 42 249 249 249 255 207 207 207 255 173 173 173 255 207 207 207 255 43 122 112 99 255 101 93 82 255 85 78 69 255 101 93 82 255 +43:0 122 112 99 255 101 93 82 255 85 78 69 255 101 93 82 255 +43:1 192 178 110 255 160 148 92 255 134 124 77 255 160 148 92 255 +43:2 109 80 60 255 91 67 50 255 76 56 41 255 91 67 50 255 +43:3 118 112 96 255 98 93 80 255 82 78 67 255 98 93 80 255 44 122 112 99 254 101 93 82 254 85 78 69 254 101 93 82 254 +44:0 122 112 99 254 101 93 82 254 85 78 69 254 101 93 82 254 +44:1 192 178 110 255 160 148 92 255 134 124 77 255 160 148 92 255 +44:2 109 80 60 255 91 67 50 255 76 56 41 255 91 67 50 255 +44:3 118 112 96 255 98 93 80 255 82 78 67 255 98 93 80 255 45 230 103 73 255 192 86 61 255 160 71 50 255 192 86 61 255 46 255 79 30 255 231 72 27 255 193 60 22 255 231 72 27 255 48 96 108 70 255 80 90 58 255 67 75 49 255 80 90 58 255 From 31584804aa66a6999546c8b5e8c348c1e29eb8f9 Mon Sep 17 00:00:00 2001 From: mikeprimm Date: Fri, 13 May 2011 14:14:50 -0700 Subject: [PATCH 2/3] Fix zoom so that markers are placed properly --- web/js/flatmap.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/web/js/flatmap.js b/web/js/flatmap.js index 8817bf5a..8035a94e 100644 --- a/web/js/flatmap.js +++ b/web/js/flatmap.js @@ -1,13 +1,13 @@ function FlatProjection() {} FlatProjection.prototype = { fromLatLngToPoint: function(latLng) { - return new google.maps.Point(latLng.lat()*128.0, latLng.lng()*128.0); + return new google.maps.Point(latLng.lat()*config.tileWidth, latLng.lng()*config.tileHeight); }, fromPointToLatLng: function(point) { - return new google.maps.LatLng(point.x/128.0, point.y/128.0); + return new google.maps.LatLng(point.x/config.tileWidth, point.y/config.tileHeight); }, fromWorldToLatLng: function(x, y, z) { - return new google.maps.LatLng(-z / 128.0, x / 128.0); + return new google.maps.LatLng(-z / config.tileWidth, x / config.tileHeight); } }; @@ -27,7 +27,7 @@ FlatMapType.prototype = $.extend(new DynMapType(), { tileName = this.prefix + '_128_' + coord.x + '_' + coord.y + '.png'; - imgSize = Math.pow(2, 6+zoom); + imgSize = Math.pow(2, 7+zoom); var tile = $('
') .addClass('tile') .css({ @@ -51,7 +51,7 @@ FlatMapType.prototype = $.extend(new DynMapType(), { }, updateTileSize: function(zoom) { var size; - size = Math.pow(2, 6+zoom); + size = Math.pow(2, 7+zoom); this.tileSize = new google.maps.Size(size, size); } }); From 7ff33f04a098a34ae126b780193df261a345ccce Mon Sep 17 00:00:00 2001 From: zeeZ Date: Sat, 14 May 2011 01:16:26 +0200 Subject: [PATCH 3/3] (Optionally) set map center in web config, automagically pan there on map change. --- configuration.txt | 8 ++++++++ web/js/map.js | 5 +++++ 2 files changed, 13 insertions(+) diff --git a/configuration.txt b/configuration.txt index 8bdf9bfa..31b7be9b 100644 --- a/configuration.txt +++ b/configuration.txt @@ -126,6 +126,10 @@ web: worlds: - title: World name: world + center: + x: 0 + y: 64 + z: 0 maps: - type: FlatMapType title: Flat @@ -145,6 +149,10 @@ web: prefix: ct - title: Nether name: nether + center: + x: 0 + y: 64 + z: 0 maps: - type: FlatMapType title: Flat diff --git a/web/js/map.js b/web/js/map.js index 0380c569..0ae78f17 100644 --- a/web/js/map.js +++ b/web/js/map.js @@ -316,6 +316,11 @@ DynMap.prototype = { if (worldChanged) { $(me).trigger('worldchanged'); } + if (map.world.center) { + me.map.panTo(map.projection.fromWorldToLatLng(map.world.center.x||0,map.world.center.y||0,map.world.center.z||0)); + } else { + me.map.panTo(map.projection.fromWorldToLatLng(0,64,0)); + } $(me).trigger('mapchanged'); if (completed) { completed();