-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathoverviewer_dyn_offline.cfg
218 lines (192 loc) · 7.25 KB
/
overviewer_dyn_offline.cfg
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
#IMPORT ENV VARS FROM BASH SCRIPT
import os
#INPUT VAR REF
# WORLD_NAME = world name
# WORLD_PATH = path to world to be mapped
#SETUP WORLD NAME
world_name = os.environ['WORLD_NAME']
#setup environment values
outputdir = os.environ['MAP_DIR']
showspawn = "True"
showlocationmarker = "False"
bgcolor = "#000000"
poititle = "Points of Interest"
# Import image optimizers
from .optimizeimages import pngnq, optipng, jpegoptim
#Import Observer Code
from .observer import MultiplexingObserver, LoggingObserver, JSObserver, ProgressBarObserver, RConObserver
#terminal output observer
pbO = ProgressBarObserver()
#Define Worlds to be Mapped
worlds[world_name] = os.environ['WORLD_PATH']
#POI Generation
#Generate Player Locations
def playerIcons(poi):
if poi['id'] == 'Player':
poi['icon'] = "https://overviewer.org/avatar/%s" % poi['EntityId']
return "Last known location for %s" % poi['EntityId']
#Generate Player Spawn Locations
def playerSpawns(poi):
if poi['id'] == 'PlayerSpawn':
return "This is where %s sleeps" % poi['EntityId']
#Generate Chest Locations
def chestFilter(poi):
if poi['id'] == 'Chest' or poi['id'] == 'minecraft:chest':
return "Chest with %d items" % len(poi.get('Items', []))
#Generate Sign Locations and Content
def signFilter(poi):
if poi['id'] == 'Sign' or poi['id'] == 'minecraft:sign':
return "\n".join([poi['Text1'], poi['Text2'], poi['Text3'], poi['Text4']])
#Map Renders
#Daytime Overworld Map North Upper Left
renders[world_name + "_Day"] = {
"world": world_name,
"title": "Day North Upper Left",
"rendermode": smooth_lighting,
"dimension": "overworld",
"optimizeimg":[pngnq(sampling=3), optipng(olevel=3)],
"markers": [dict(name="Signs", filterFunction=signFilter),
dict(name="Players", filterFunction=playerIcons),
dict(name="PlayerSpawns", filterFunction=playerSpawns, icon="bed.png"),
dict(name="Chests", filterFunction=chestFilter, icon="chest_sm.png", createInfoWindow=False)]
}
#Daytime Overworld Map North Upper Right
renders[world_name + "_Day_NUR"] = {
"world": world_name,
"title": "Day North Upper Right",
"rendermode": smooth_lighting,
"dimension": "overworld",
"optimizeimg":[pngnq(sampling=3), optipng(olevel=3)],
"northdirection": "upper-right",
"markers": [dict(name="Signs", filterFunction=signFilter),
dict(name="Players", filterFunction=playerIcons),
dict(name="PlayerSpawns", filterFunction=playerSpawns, icon="bed.png"),
dict(name="Chests", filterFunction=chestFilter, icon="chest_sm.png", createInfoWindow=False)]
}
#Daytime Overworld Map North Lower Right
renders[world_name + "_Day_NLR"] = {
"world": world_name,
"title": "Day North Lower Right",
"rendermode": smooth_lighting,
"dimension": "overworld",
"optimizeimg":[pngnq(sampling=3), optipng(olevel=3)],
"northdirection": "lower-right",
"markers": [dict(name="Signs", filterFunction=signFilter),
dict(name="Players", filterFunction=playerIcons),
dict(name="PlayerSpawns", filterFunction=playerSpawns, icon="bed.png"),
dict(name="Chests", filterFunction=chestFilter, icon="chest_sm.png", createInfoWindow=False)]
}
#Daytime Overworld Map North Lower Left
renders[world_name + "_Day_NLL"] = {
"world": world_name,
"title": "Day North Lower Left",
"rendermode": smooth_lighting,
"dimension": "overworld",
"optimizeimg":[pngnq(sampling=3), optipng(olevel=3)],
"northdirection": "lower-left",
"markers": [dict(name="Signs", filterFunction=signFilter),
dict(name="Players", filterFunction=playerIcons),
dict(name="PlayerSpawns", filterFunction=playerSpawns, icon="bed.png"),
dict(name="Chests", filterFunction=chestFilter, icon="chest_sm.png", createInfoWindow=False)]
}
#Nighttime Overworld Map
renders[world_name + "_Night"] = {
"world": world_name,
"title": "Night",
"rendermode": smooth_night,
"dimension": "overworld",
"optimizeimg":[pngnq(sampling=3), optipng(olevel=3)],
"markers": [dict(name="Signs", filterFunction=signFilter),
dict(name="Players", filterFunction=playerIcons),
dict(name="PlayerSpawns", filterFunction=playerSpawns, icon="bed.png"),
dict(name="Chests", filterFunction=chestFilter, icon="chest_sm.png", createInfoWindow=False)]
}
#Cave Render
renders[world_name + "_Caves"] = {
"world": world_name,
"title": "Caves",
"rendermode": [Base(), Cave(), EdgeLines()],
"dimension": "overworld",
"optimizeimg":[pngnq(sampling=3), optipng(olevel=3)]
}
#Nether Render
renders[world_name + "_Nether"] = {
"world": world_name,
"title": "Nether",
"rendermode": nether_smooth_lighting,
"dimension": "nether",
"optimizeimg":[pngnq(sampling=1), optipng(olevel=3)]
}
#End Render
renders[world_name + "_End"] = {
"world": world_name,
"title": "End",
"rendermode": smooth_lighting,
"dimension": "end",
"optimizeimg":[pngnq(sampling=3), optipng(olevel=3)]
}
#Overlays
#Overworld Biome Overlay
renders[world_name + '_Biomeover'] = {
'world': world_name,
'rendermode': [ClearBase(), BiomeOverlay()],
'title': "Biomes",
"dimension": "overworld",
'overlay': [world_name + '_Day'],
"optimizeimg":[pngnq(sampling=3), optipng(olevel=3)]
}
#Overworld Mineral Overlay on caves and day
renders[world_name + '_Overworld_Mineralover'] = {
'world': world_name,
'rendermode': [ClearBase(), MineralOverlay()],
'title': "Overworld Minerals",
"dimension": "overworld",
'overlay': [(world_name + '_Day'), (world_name + '_Caves')],
"optimizeimg":[pngnq(sampling=3), optipng(olevel=3)]
}
#Overworld SlimeBlock Overlay on caves and day
renders[world_name + '_Overworld_Slimeover'] = {
'world': world_name,
'rendermode': [ClearBase(), SlimeOverlay()],
'title': "Overworld Slime Blocks",
"dimension": "overworld",
'overlay': [(world_name + '_Day'), (world_name + '_Caves')],
"optimizeimg":[pngnq(sampling=3), optipng(olevel=3)]
}
#Cave Mineral Overlay
renders[world_name + '_Cave_Mineralover'] = {
'world': world_name,
'rendermode': [ClearBase(), Cave(), MineralOverlay()],
'title': "Cave Minerals",
"dimension": "overworld",
'overlay': [world_name + '_Caves'],
"optimizeimg":[pngnq(sampling=3), optipng(olevel=3)]
}
#Cave Slimeblock Overlay
renders[world_name + '_Cave_Slimeover'] = {
'world': world_name,
'rendermode': [ClearBase(), Cave(), SlimeOverlay()],
'title': "Cave Slime Blocks",
"dimension": "overworld",
'overlay': [world_name + '_Caves'],
"optimizeimg":[pngnq(sampling=3), optipng(olevel=3)]
}
#Cave Depth Overlay
renders[world_name + '_Depthover'] = {
'world': world_name,
'rendermode': cave,
'title': "Cave Depth Overlay",
"dimension": "overworld",
'overlay': [world_name + '_Caves'],
"optimizeimg":[pngnq(sampling=3), optipng(olevel=3)]
}
#Lit Cave Overlay (testing)
renders[world_name + "_Lit_Caves"] = {
"world": world_name,
"title": "Lit Caves Overlay",
"rendermode": [Base(), Cave(only_lit=True), EdgeLines()],
"dimension": "overworld",
"overlay": [world_name + "_Caves"],
"imgformat": "jpeg",
"optimizeimg":[jpegoptim(quality=80)]
}