Implement lover installment logic in FalukantFamilyWorker: Added support for processing lover maintenance payments every 2 hours, including new SQL queries for installment tracking and updates to relationship states. Enhanced WebSocket events to notify UI of installment changes, improving family dynamics and financial interactions.
This commit is contained in:
@@ -35,7 +35,8 @@ Dieses Dokument beschreibt die **Nachrichten**, die der **YpDaemon** (`FalukantF
|
||||
| `reason` | Bedeutung (Daemon) | Empfehlung UI |
|
||||
|----------|---------------------|---------------|
|
||||
| `daily` | Daily-Tick: Liebschafts-/Ehe-/Ansehens-Logik; u. a. `marriage_public_stability`, `household_tension_score` | Family-API + ggf. Charakter/Ansehen/Haus neu laden |
|
||||
| `monthly` | Monthly-Tick: Kosten, Unterversorgung, Monatsstand | **Geld** (`falukant_user.money`) + Family-State neu laden |
|
||||
| `monthly` | Monthly-Tick: Monatsmarkierung Liebschaft (`last_monthly_processed_at`), ggf. Dienerschaft-Monatskosten; **kein** vollständiger Liebschafts-Monatsbetrag mehr | **Geld** (falls Dienerschaft zahlt) + Family-State neu laden |
|
||||
| `lover_installment` | Alle **2 h**: **1/12** Liebschafts-Unterhalt bzw. Unterversorgung (`money_history`: `lover maintenance`) | **Geld** + Family-State neu laden |
|
||||
| `scandal` | Skandal-Ereignis (zusätzlich zu `daily` möglich) | Kurzer Hinweis / Eintrag „Skandal“; Family + Ruf |
|
||||
| `lover_birth` | Uneheliches Kind angelegt | Wie `children_update`, plus Eltern-Story |
|
||||
|
||||
@@ -118,6 +119,10 @@ onMessage(json):
|
||||
refreshMoney()
|
||||
refreshFamilyAndRelationships()
|
||||
break
|
||||
case "lover_installment":
|
||||
refreshMoney()
|
||||
refreshFamilyAndRelationships()
|
||||
break
|
||||
case "scandal":
|
||||
showScandalToastOptional()
|
||||
refreshFamilyAndRelationships()
|
||||
@@ -141,7 +146,8 @@ onMessage(json):
|
||||
| Situation | Sinnvolle Endpunkte / Daten (konzeptionell) |
|
||||
|-----------|---------------------------------------------|
|
||||
| Jede `falukantUpdateFamily` | Family-/Relationship-API mit `relationship_state`, Ehe (`married`/`engaged`/`wooing`) |
|
||||
| `reason: monthly` | **Geld** des Users, ggf. Kredit/Log |
|
||||
| `reason: monthly` | **Geld** (Dienerschaft o. ä.), Family-State |
|
||||
| `reason: lover_installment` | **Geld** + Liebschafts-State (Unterhalt/Unterversorgung) |
|
||||
| `reason: daily` / `scandal` | Ansehen (`character.reputation`), Sichtbarkeit/Diskretion der Liebschaften |
|
||||
| `children_update` / `lover_birth` | `child_relation` inkl. `legitimacy`, `birth_context`, `public_known` |
|
||||
|
||||
@@ -163,7 +169,7 @@ Konkrete Routen stehen im **YourPart3**-Backend; das Frontend sollte eine zentra
|
||||
|
||||
- Worker: `src/worker/falukant_family.rs`
|
||||
- SQL-Konstanten: `src/worker/sql.rs` (Abschnitt Falukant Familie)
|
||||
- Schema: `migrations/001_falukant_family_lovers.sql`
|
||||
- Schema: `migrations/001_falukant_family_lovers.sql`, `006_falukant_lover_installments.sql` (Unterhalt 12×/Tag)
|
||||
- Daemon-Handoff (technisch): `docs/FALUKANT_DAEMON_HANDOFF.md`
|
||||
|
||||
---
|
||||
|
||||
Reference in New Issue
Block a user