add recharge
This commit is contained in:
+13
-2
@@ -103,6 +103,17 @@ def build_rivermap(output_path="/home/bart/git/Ascent-of-Man/images/rivermap.png
|
||||
print(f"Saved preview to {preview_path}")
|
||||
|
||||
# Build orthographic hex-tile minimap.png
|
||||
water_threshold = 6
|
||||
try:
|
||||
with open("/home/bart/git/Ascent-of-Man/config/terrain_movement.yaml", "r") as yf:
|
||||
for line in yf:
|
||||
if line.strip().startswith("water_height_threshold:"):
|
||||
val_str = line.split(":", 1)[1].split("#", 1)[0].strip()
|
||||
water_threshold = int(val_str)
|
||||
break
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
h_arr = np.array(Image.open("/home/bart/git/Ascent-of-Man/images/heightmap.jpg"))
|
||||
R = 8.0
|
||||
W = 3608
|
||||
@@ -122,11 +133,11 @@ def build_rivermap(output_path="/home/bart/git/Ascent-of-Man/images/rivermap.png
|
||||
|
||||
px = min(3599, max(0, int(round(wx * SCALE_X))))
|
||||
py = min(1499, max(0, int(round(wy * SCALE_Y))))
|
||||
h = h_arr[1500 - 1 - py, px]
|
||||
h = int(h_arr[1500 - 1 - py, px, 0]) if h_arr.ndim == 3 else int(h_arr[1500 - 1 - py, px])
|
||||
tp = t_arr[1500 - 1 - py, px]
|
||||
dist_pole = abs((wy / 108.22) - 0.5) * 2.0
|
||||
|
||||
if h <= 2:
|
||||
if h < water_threshold:
|
||||
color = (220, 235, 250) if dist_pole > 0.85 else (28, 95, 175) # Water (blue) / polar ice
|
||||
elif h > 182 or (dist_pole > 0.80 and h > 20):
|
||||
color = (245, 250, 255) # Snow (white) above 2500m
|
||||
|
||||
Reference in New Issue
Block a user