feat(falukant): add 'lover_breakup_risk_high' event handling and localization updates
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:
Torsten Schulz (local)
2026-04-13 12:21:24 +02:00
parent 1bce855b3a
commit 162e908c1c
8 changed files with 79 additions and 0 deletions

View File

@@ -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) {