translated the remaining german notes, python comments, help and messages to english (in-game strings, parsed report lines and cli values stay german)

This commit is contained in:
MineTec committed 2026-11-07 10:51:14 +01:00
1 parent 86fe26d786
commit 526f6072f6
36 files changed
+1553 -1544

No files matched your search

+14 -14
View File
@@ -1,13 +1,13 @@
#!/usr/bin/env python3
"""Erzeugt ein Beispiel-OBJ mit komplett neuer Geometrie fuer geom_import.py.
"""Generates an example OBJ with completely new geometry for geom_import.py.
geom_demo.py basis.wad demo.obj [--plaza]
geom_demo.py base.wad demo.obj [--plaza]
Baut aus Kachel-Vierecken (je 1x1, Textur = ganze Texturkachel, so wie die Engine es will):
- (--plaza) eine Bodenplatte y=0 ueber allen Rasterzellen, die im Basislevel belegt sind
(damit Strats/Startpunkt irgendwo Boden finden)
- einige Bloecke und eine Rampe in der Mitte des belegten Bereichs
Texturen: haeufigste Textur auf nach oben zeigenden Faces (Boden) bzw. auf Seitenflaechen (Wand).
Builds from tile quads (1x1 each, texture = whole texture tile, the way the engine wants it):
- (--plaza) a floor plate at y=0 over all grid cells occupied in the base level
(so strats/start point find floor somewhere)
- a few blocks and a ramp in the middle of the occupied area
Textures: most frequent texture on upward-facing faces (floor) and on side faces (wall).
"""
import argparse
import collections
@@ -24,7 +24,7 @@ class ObjW:
self.v, self.vt, self.f, self.texs = [], [], [], texs
def quad(self, p, tex, mat=0):
"""p: 4 Punkte, Reihenfolge so dass (p1-p0)x(p2-p0) nach aussen zeigt."""
"""p: 4 points, ordered so that (p1-p0)x(p2-p0) points outwards."""
U0, U1, V0, V1 = G.tex_uv(self.texs[tex])
uv = [(U1, V1), (U0, V1), (U0, V0), (U1, V0)]
base = len(self.v)
@@ -33,10 +33,10 @@ class ObjW:
self.f.append((tex, mat, [base + k for k in range(4)]))
def box(self, x0, z0, x1, z1, y0, y1, top, side):
# Koordinaten: x0<x1, z0>z1 (z negativ = weiter im Raster)
# coordinates: x0<x1, z0>z1 (negative z = further into the grid)
self.quad([(x0, y1, z0), (x1, y1, z0), (x1, y1, z1), (x0, y1, z1)], top)
for (ax, az), (bx, bz) in [((x0, z0), (x0, z1)), ((x0, z1), (x1, z1)), ((x1, z1), (x1, z0)), ((x1, z0), (x0, z0))]:
# Wand von a nach b, aussen = rechts herum
# wall from a to b, outside = clockwise
n = math.ceil(y1 - y0)
for k in range(n):
ya, yb = y0 + k * (y1 - y0) / n, y0 + (k + 1) * (y1 - y0) / n
@@ -74,7 +74,7 @@ def main():
o.quad([(cx, 0, -cz), (cx + 1, 0, -cz), (cx + 1, 0, -cz - 1), (cx, 0, -cz - 1)], grass)
mx = sorted(c[0] for c in cells)[len(cells) // 2]; mz = sorted(c[1] for c in cells)[len(cells) // 2]
if not a.plaza:
# Stelle suchen, an der das 9x4-Fenster moeglichst flach und voll belegt ist
# find a spot where the 9x4 window is as flat as possible and fully occupied
top = collections.defaultdict(lambda: -99.0)
for t in mp['A']:
if trak[t[4]].faces:
@@ -91,7 +91,7 @@ def main():
best = (spread, cx, cz)
if best:
mx, mz = best[1], best[2]
# Bloecke + Rampe um die Mitte; ohne --plaza auf die vorhandene Geometrie gestellt
# blocks + ramp around the centre; without --plaza placed on top of the existing geometry
b = 0.0
if not a.plaza:
ys = []
@@ -102,12 +102,12 @@ def main():
b = float(round(sorted(ys)[len(ys) * 3 // 4] * 4) / 4) if ys else 0.0
o.box(mx, -mz, mx + 2, -mz - 2, b, b + 1, grass, wall)
o.box(mx + 3, -mz, mx + 4, -mz - 1, b, b + 3, grass, wall)
for k in range(4): # Rampe in x-Richtung, 4 Zellen lang, steigt auf 1
for k in range(4): # ramp in x direction, 4 cells long, rises to 1
y0, y1 = b + k / 4, b + (k + 1) / 4
x = mx - 4 + k
o.quad([(x, y0, -mz), (x + 1, y1, -mz), (x + 1, y1, -mz - 2), (x, y0, -mz - 2)], grass)
o.save(a.out)
print(f'{a.out}: {len(o.f)} Vierecke, Boden-Textur {grass}, Wand-Textur {wall}, Mitte Zelle ({mx},{mz})')
print(f'{a.out}: {len(o.f)} quads, floor texture {grass}, wall texture {wall}, centre cell ({mx},{mz})')
if __name__ == '__main__':