Auto-summon pupils to the principal after fight breaks, with a corridor FIFO queue.
This commit is contained in:
@@ -665,6 +665,24 @@ internal static class PeopleDefValidator
|
||||
throw new ContentLoadException($"BehaviorDef '{behavior.DefName}' offenseMemoryKinds cannot contain empty ids.");
|
||||
}
|
||||
}
|
||||
|
||||
if (behavior.DirectorSummonFightBreakChance is < 0f or > 1f)
|
||||
{
|
||||
throw new ContentLoadException(
|
||||
$"BehaviorDef '{behavior.DefName}' directorSummonFightBreakChance must be 0–1.");
|
||||
}
|
||||
|
||||
if (behavior.DirectorSummonReprimandChance is < 0f or > 1f)
|
||||
{
|
||||
throw new ContentLoadException(
|
||||
$"BehaviorDef '{behavior.DefName}' directorSummonReprimandChance must be 0–1.");
|
||||
}
|
||||
|
||||
if (behavior.DirectorHearingMinutes <= 0f)
|
||||
{
|
||||
throw new ContentLoadException(
|
||||
$"BehaviorDef '{behavior.DefName}' directorHearingMinutes must be positive.");
|
||||
}
|
||||
}
|
||||
|
||||
private static void ValidateTopic(TopicDef topic, DefCatalog catalog)
|
||||
|
||||
@@ -577,6 +577,24 @@ public sealed class BehaviorDef : Def
|
||||
/// </summary>
|
||||
public IReadOnlyList<string> OffenseMemoryKinds { get; init; } = DefaultOffenseMemoryKinds;
|
||||
|
||||
/// <summary>
|
||||
/// Chance a pupil is auto-summoned after staff breaks a fight. 1 = always when a Principal
|
||||
/// is hired and the office exists. Missing keeps always-on so vanilla matches the design.
|
||||
/// </summary>
|
||||
public float DirectorSummonFightBreakChance { get; init; } = 1f;
|
||||
|
||||
/// <summary>
|
||||
/// Chance after a teacher discipline / caught-whisper reprimand. Below fight-break so not
|
||||
/// every scolding empties the corridor.
|
||||
/// </summary>
|
||||
public float DirectorSummonReprimandChance { get; init; } = 0.35f;
|
||||
|
||||
/// <summary>Game minutes the pupil spends in the office hearing. Drives the ActionDef copy.</summary>
|
||||
public float DirectorHearingMinutes { get; init; } = 5f;
|
||||
|
||||
/// <summary>Opinion of the Principal after a hearing. Negative — the visit is not praise.</summary>
|
||||
public int DirectorHearingOpinionShift { get; init; } = -12;
|
||||
|
||||
public static IReadOnlyList<string> DefaultOffenseMemoryKinds { get; } =
|
||||
[
|
||||
"quarrel",
|
||||
|
||||
Reference in New Issue
Block a user