Merge branch 'phase/44-quarrel-fight'
Co-authored-by: Cursor <cursoragent@cursor.com> # Conflicts: # docs/phases/README.md # src/HSchool.Content/PeopleDefs.cs # src/HSchool.People/Roster.cs # src/HSchool.People/Seed.cs
This commit is contained in:
@@ -281,6 +281,16 @@ internal static class PeopleDefValidator
|
||||
{
|
||||
throw new ContentLoadException($"TraitDef '{trait.DefName}' whisperCatchMultiplier cannot be negative.");
|
||||
}
|
||||
|
||||
if (trait.ConflictChance < 0f)
|
||||
{
|
||||
throw new ContentLoadException($"TraitDef '{trait.DefName}' conflictChance cannot be negative.");
|
||||
}
|
||||
|
||||
if (trait.ApologyChance < 0f)
|
||||
{
|
||||
throw new ContentLoadException($"TraitDef '{trait.DefName}' apologyChance cannot be negative.");
|
||||
}
|
||||
}
|
||||
|
||||
private static void ValidateNeed(NeedDef need)
|
||||
@@ -627,6 +637,21 @@ internal static class PeopleDefValidator
|
||||
{
|
||||
throw new ContentLoadException($"BehaviorDef '{behavior.DefName}' teacher-talk weights cannot be negative.");
|
||||
}
|
||||
|
||||
if (behavior.QuarrelChance is < 0f or > 1f)
|
||||
{
|
||||
throw new ContentLoadException($"BehaviorDef '{behavior.DefName}' quarrelChance must be 0–1.");
|
||||
}
|
||||
|
||||
if (behavior.FightChance is < 0f or > 1f)
|
||||
{
|
||||
throw new ContentLoadException($"BehaviorDef '{behavior.DefName}' fightChance must be 0–1.");
|
||||
}
|
||||
|
||||
if (behavior.ApologyRestoreFraction is < 0f or > 1f)
|
||||
{
|
||||
throw new ContentLoadException($"BehaviorDef '{behavior.DefName}' apologyRestoreFraction must be 0–1.");
|
||||
}
|
||||
}
|
||||
|
||||
private static void ValidateTopic(TopicDef topic, DefCatalog catalog)
|
||||
|
||||
Reference in New Issue
Block a user