This commit is contained in:
Team3
2026-09-16 01:23:42 +02:00
parent 12cbb88692
commit 936773c4e9
13 changed files with 1300 additions and 314 deletions

View File

@@ -26,12 +26,15 @@ static var ANKER: Dictionary = {}
## Die fünf Sonderbauten. Sie bekommen eine Parzelle an einer Arterie.
static var SONDER: Array = [
["uni", "Hochschule", Color(0.72, 0.70, 0.66)],
["cafe", "Café Nadel", Color(0.82, 0.62, 0.45)],
["buero", "Büro Ostwind", Color(0.62, 0.66, 0.72)],
["baeckerei", "Bäckerei Keller", Color(0.85, 0.72, 0.50)],
["werkstatt", "Werkstatt Loos", Color(0.70, 0.58, 0.55)],
["uni", "Hochschule", Color(0.72, 0.70, 0.66), 3],
["cafe", "Café Nadel", Color(0.82, 0.62, 0.45), 2],
["buero", "Büro Ostwind", Color(0.62, 0.66, 0.72), 4],
["baeckerei", "Bäckerei Keller", Color(0.85, 0.72, 0.50), 2],
["werkstatt", "Werkstatt Loos", Color(0.70, 0.58, 0.55), 1],
]
## Arbeitsorte, an denen die Leute auf verschiedenen Etagen sitzen. Café,
## Bäckerei und Werkstatt spielen sich unten ab.
static var ETAGEN_ARBEIT: Array = ["buero", "uni"]
static var PLACES: Dictionary = {}
static var LIST: Array = []
@@ -408,6 +411,7 @@ static func _sonderbauten_verteilen() -> void:
"size": [p["size"].x, p["size"].y],
"dir": p["dir"],
"color": SONDER[s][2],
"etagen": int(SONDER[s][3]),
}
@@ -436,9 +440,21 @@ static func _wohnhaeuser_verteilen() -> void:
"size": [p["size"].x, p["size"].y],
"dir": p["dir"],
"color": Color.from_hsv(fmod(0.08 + float(i) * 0.113, 1.0), 0.28, 0.78),
"etagen": 2 + (i * 5 + 1) % 3,
}
## In welcher Etage jemand wohnt und arbeitet. Wohnhäuser sind Mehrfamilien-
## häuser: die eigene Wohnung liegt irgendwo im Haus.
static func etagen_fuer(i: int, heim: String, arbeit: String) -> Dictionary:
var out: Dictionary = {}
if PLACES.has(heim):
out[heim] = (i * 7 + 3) % Orte.etagen(PLACES, heim)
if PLACES.has(arbeit) and ETAGEN_ARBEIT.has(arbeit):
out[arbeit] = i % Orte.etagen(PLACES, arbeit)
return out
static func _anker_setzen() -> void:
for key in PLACES:
var s: Array = PLACES[key]["size"]
@@ -572,6 +588,7 @@ static func mensch_aus_profil(pr: Dictionary, i: int) -> Dictionary:
"eigen": true,
"mission": true,
"heim": heim,
"etage": etagen_fuer(i, heim, arbeit),
"farbe": Color.from_hsv(fmod(0.02 + float(i) * 0.191, 1.0), 0.5, 0.8),
"routine": _tag_belegen(TAGESTYPEN[typ], heim, arbeit, bild["blocker"],
bild["ursachen"], i),
@@ -614,6 +631,7 @@ static func _mensch(i: int) -> Dictionary:
"verhalten": {},
"mission": true,
"heim": heim,
"etage": etagen_fuer(i, heim, arbeit),
"farbe": Color.from_hsv(fmod(0.02 + float(i) * 0.191, 1.0), 0.5, 0.8),
"routine": _tagesablauf(i, heim, arbeit),
}