0

Add Heatmap RenderPrimitive (chunk mtime)

This commit is contained in:
Jens
2020-07-12 23:18:39 +02:00
parent 3084d57bb3
commit 221ac26829
3 changed files with 128 additions and 0 deletions

View File

@@ -12,6 +12,7 @@
#
# You should have received a copy of the GNU General Public License along
# with the Overviewer. If not, see <http://www.gnu.org/licenses/>.
from datetime import datetime, timedelta
from PIL import Image
from . import textures
@@ -231,6 +232,17 @@ class BiomeOverlay(Overlay):
'alpha' : ('an integer value between 0 (transparent) and 255 (opaque)', None),
}
class HeatmapOverlay(Overlay):
t_now = datetime.now()
name = "overlay-heatmap"
options = {
't_invisible': (
'the timestamp when the overlay will get invisible (e.g. 1 month go)',
int((t_now - timedelta(days=30)).timestamp())
),
't_full': ('the timestamp when the overlay will be fully visible (e.g. now)', int(t_now.timestamp())),
}
class Hide(RenderPrimitive):
name = "hide"
options = {