feat(falukant): add 'lover_breakup_risk_high' event handling and localization updates
All checks were successful
Deploy to production / deploy (push) Successful in 2m52s
All checks were successful
Deploy to production / deploy (push) Successful in 2m52s
- Introduced a new event type for high breakup risk in relationships, including a sample payload for integration. - Updated the MessagesDialog component to handle new parameters related to breakup risk. - Added translations for the new event in Cebuano, German, English, Spanish, and French to enhance user understanding of relationship dynamics. - Enhanced documentation to reflect the new notification structure for high breakup risk events.
This commit is contained in:
@@ -128,6 +128,22 @@ Optional:
|
||||
- Notification
|
||||
- Ereignislog
|
||||
|
||||
Empfohlene Notification für hohes Trennungsrisiko:
|
||||
|
||||
```json
|
||||
{
|
||||
"tr": "random_event.lover_breakup_risk_high",
|
||||
"event_id": "lover_breakup_risk_high",
|
||||
"event_type": "family",
|
||||
"relationship_id": 123,
|
||||
"risk_percent": 42,
|
||||
"affection": 18,
|
||||
"visibility": 61,
|
||||
"discretion": 23,
|
||||
"months_underfunded": 2
|
||||
}
|
||||
```
|
||||
|
||||
## Pflichtlogik Monthly Tick
|
||||
|
||||
Der externe Daemon muss monatlich:
|
||||
|
||||
@@ -560,6 +560,23 @@ Mögliche Ereignisse:
|
||||
- Forderung nach höherem Unterhalt
|
||||
- kirchlicher Tadel
|
||||
- Erpressung
|
||||
- akutes Trennungsrisiko bei Liebschaft (`lover_breakup_risk_high`)
|
||||
|
||||
Beispiel-Payload für `lover_breakup_risk_high`:
|
||||
|
||||
```json
|
||||
{
|
||||
"tr": "random_event.lover_breakup_risk_high",
|
||||
"event_id": "lover_breakup_risk_high",
|
||||
"event_type": "family",
|
||||
"relationship_id": 123,
|
||||
"risk_percent": 42,
|
||||
"affection": 18,
|
||||
"visibility": 61,
|
||||
"discretion": 23,
|
||||
"months_underfunded": 2
|
||||
}
|
||||
```
|
||||
- Kind wird bekannt
|
||||
|
||||
## Kinder aus Liebschaften
|
||||
|
||||
@@ -170,6 +170,14 @@ export default {
|
||||
let key = raw;
|
||||
let params = {};
|
||||
|
||||
// Fallback: Manche Daemon-Events liefern event_id/event_type, aber kein tr.
|
||||
if ((!raw || !String(raw).trim()) && payload?.event_id) {
|
||||
raw = payload.event_type === 'random_event'
|
||||
? `random_event.${payload.event_id}`
|
||||
: String(payload.event_id);
|
||||
key = raw;
|
||||
}
|
||||
|
||||
// 1) JSON-Format unterstützen: {"tr":"random_event.windfall","amount":1000,"characterName":"Max"}
|
||||
if (typeof raw === 'string') {
|
||||
const trimmed = raw.trim();
|
||||
@@ -353,6 +361,24 @@ export default {
|
||||
if (base.amount !== undefined) {
|
||||
params.amount = base.amount;
|
||||
}
|
||||
if (base.risk_percent !== undefined) {
|
||||
params.risk_percent = base.risk_percent;
|
||||
}
|
||||
if (base.affection !== undefined) {
|
||||
params.affection = base.affection;
|
||||
}
|
||||
if (base.visibility !== undefined) {
|
||||
params.visibility = base.visibility;
|
||||
}
|
||||
if (base.discretion !== undefined) {
|
||||
params.discretion = base.discretion;
|
||||
}
|
||||
if (base.months_underfunded !== undefined) {
|
||||
params.months_underfunded = base.months_underfunded;
|
||||
}
|
||||
if (base.relationship_id !== undefined) {
|
||||
params.relationship_id = base.relationship_id;
|
||||
}
|
||||
|
||||
if (base.deceased && typeof base.deceased === 'object') {
|
||||
if (base.deceased.display_name) {
|
||||
|
||||
@@ -99,6 +99,10 @@
|
||||
"earthquake": {
|
||||
"title": "Linog",
|
||||
"description": "Naigo sa linog ang rehiyon nga {regionName}."
|
||||
},
|
||||
"lover_breakup_risk_high": {
|
||||
"title": "Krisis sa relasyon",
|
||||
"description": "Ang usa ka affair hapit na mabuwag. Risgo: {risk_percent}% · Affection {affection}, visibility {visibility}, discretion {discretion}, underfunded sulod sa {months_underfunded} ka bulan."
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -101,6 +101,10 @@
|
||||
"earthquake": {
|
||||
"title": "Erdbeben",
|
||||
"description": "Ein Erdbeben hat die Region {regionName} erschüttert."
|
||||
},
|
||||
"lover_breakup_risk_high": {
|
||||
"title": "Krise in einer Liebschaft",
|
||||
"description": "Eine Liebschaft steht vor dem Aus. Risiko: {risk_percent}% · Zuneigung {affection}, Sichtbarkeit {visibility}, Diskretion {discretion}, Unterversorgung {months_underfunded} Monate."
|
||||
}
|
||||
,
|
||||
"taxes": {
|
||||
|
||||
@@ -99,6 +99,10 @@
|
||||
"earthquake": {
|
||||
"title": "Earthquake",
|
||||
"description": "An earthquake has shaken the region {regionName}."
|
||||
},
|
||||
"lover_breakup_risk_high": {
|
||||
"title": "Affair in Crisis",
|
||||
"description": "An affair is close to breaking up. Risk: {risk_percent}% · Affection {affection}, visibility {visibility}, discretion {discretion}, underfunded for {months_underfunded} months."
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@@ -102,6 +102,10 @@
|
||||
"title": "Terremoto",
|
||||
"description": "Un terremoto ha sacudido la región {regionName}."
|
||||
},
|
||||
"lover_breakup_risk_high": {
|
||||
"title": "Crisis en una relación",
|
||||
"description": "Una relación está cerca de romperse. Riesgo: {risk_percent}% · Afecto {affection}, visibilidad {visibility}, discreción {discretion}, con fondos insuficientes durante {months_underfunded} meses."
|
||||
},
|
||||
"taxes": {
|
||||
"title": "Impuestos",
|
||||
"loading": "Cargando datos de impuestos...",
|
||||
|
||||
@@ -102,6 +102,10 @@
|
||||
"title": "tremblement de terre",
|
||||
"description": "Un tremblement de terre a frappé la région {regionName}."
|
||||
},
|
||||
"lover_breakup_risk_high": {
|
||||
"title": "Crise dans une liaison",
|
||||
"description": "Une liaison est proche de la rupture. Risque : {risk_percent}% · Affection {affection}, visibilité {visibility}, discrétion {discretion}, sous-financée depuis {months_underfunded} mois."
|
||||
},
|
||||
"taxes": {
|
||||
"title": "Diriger",
|
||||
"loading": "Chargement des données fiscales...",
|
||||
|
||||
Reference in New Issue
Block a user