Merge branch 'main' into phase/32-weather-warmth

Co-authored-by: Cursor <cursoragent@cursor.com>

# Conflicts:
#	src/HSchool.Simulation/School.cs
This commit is contained in:
Leonid Pershin
2026-08-20 04:03:42 +03:00
21 changed files with 848 additions and 29 deletions
+34
View File
@@ -268,6 +268,40 @@ public sealed class BehaviorDef : Def
/// <summary>Chance each optional layer (sweater, coat, hat, accessory) is worn at generation.</summary>
public float OptionalApparelChance { get; init; } = 0.4f;
/// <summary>
/// Condition lost per game hour while the thing is worn on campus. Bag, locker and home do
/// not wear. The number lives here so a pack can make clothes last a term or a week.
/// </summary>
public float ApparelWearPerHour { get; init; } = 0.01f;
/// <summary>
/// Worn apparel below this stays home: morning replacement issues a fresh instance.
/// At the threshold they still go out, even when the caption already says torn.
/// </summary>
public float ApparelReplaceBelow { get; init; } = 0.15f;
/// <summary>
/// Caption bands for a 01 condition bar. Highest <see cref="ApparelConditionBand.Min"/>
/// the value still meets wins. Empty falls back to <see cref="DefaultConditionBands"/>.
/// </summary>
public IReadOnlyList<ApparelConditionBand> ApparelConditionBands { get; init; } = DefaultConditionBands;
public static IReadOnlyList<ApparelConditionBand> DefaultConditionBands { get; } =
[
new() { Min = 0.75f, Id = "ApparelConditionIntact" },
new() { Min = 0.4f, Id = "ApparelConditionWorn" },
new() { Min = 0.15f, Id = "ApparelConditionTorn" },
new() { Min = 0f, Id = "ApparelConditionRags" },
];
}
/// <summary>One caption on the condition bar. <see cref="Id"/> is a locale key, not a Def.</summary>
public sealed class ApparelConditionBand
{
public float Min { get; init; }
public required string Id { get; init; }
}
public enum BodyAttributeKind