Add person-to-person disease contagion with outbreak notices.

Node/class contact rolls use pair+day seeds; vanilla respiratory diseases spread, and a threshold raises an info toast instead of per-sneeze noise.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Leonid Pershin
2026-08-21 13:55:24 +03:00
co-authored by Cursor
parent a369308116
commit 4a52107bd2
19 changed files with 648 additions and 15 deletions
+16 -2
View File
@@ -31,8 +31,8 @@ public sealed class DiseaseStage
}
/// <summary>
/// A named disease: stages, weather vectors, lesson/attendance effects, temporary immunity.
/// Contagion between people is phase 79 — these defs may omit it.
/// A named disease: stages, weather vectors, lesson/attendance effects, temporary immunity,
/// and optional person-to-person contagion (node and/or class).
/// </summary>
public sealed class DiseaseDef : Def
{
@@ -58,4 +58,18 @@ public sealed class DiseaseDef : Def
/// <summary>Days of immunity to this def after recovery.</summary>
public float ImmunityDays { get; init; }
/// <summary>
/// Daily chance to infect each other person sharing the same map node. 0 — no node contagion.
/// </summary>
public float NodeContagionChancePerDay { get; init; }
/// <summary>
/// Daily chance to infect each classmate (same <c>ClassId</c>) while both are on campus.
/// 0 — no class contagion.
/// </summary>
public float ClassContagionChancePerDay { get; init; }
/// <summary>When true, the carrier can infect during incubation before stage effects apply.</summary>
public bool ContagiousDuringIncubation { get; init; }
}