Enhance school day structure and decision-making for lunch breaks
- Updated `ai.md` to clarify the mechanics of hunger restoration and the importance of lunch breaks in the school schedule. - Revised `schedule.md` to detail the new lunch break structure, allowing for separate sittings for different grade levels. - Enhanced `Decision.cs` and `DecisionPlanner.cs` to incorporate logic for lunch breaks, ensuring that students only leave lessons during their designated lunch windows. - Updated `DayFrameDef` and related classes to support multiple lunch breaks and validate their configurations. - Adjusted tests to validate the new decision-making logic regarding lunch breaks and hunger management, ensuring robust functionality. - Improved localization strings to reflect changes in the school day structure and lunch functionalities.
This commit is contained in:
@@ -71,7 +71,11 @@ public class VanillaCoreTests
|
||||
Assert.Equal("Hunger", catalog.Actions["EatLunch"].Need);
|
||||
Assert.Equal(0.5f, catalog.Actions["EatLunch"].NeedGain);
|
||||
Assert.Equal("SchoolYard", catalog.Actions["WalkYard"].Room);
|
||||
Assert.Equal(0.1f, catalog.Needs["Hunger"].DecayPerHour);
|
||||
// Hunger falls fast enough to be felt inside one school day and, like sleep, comes back
|
||||
// off campus — people eat at home. Before that pair of numbers the school went hungry and
|
||||
// never recovered: half of it sat below the urgency threshold permanently.
|
||||
Assert.Equal(0.2f, catalog.Needs["Hunger"].DecayPerHour);
|
||||
Assert.True(catalog.Needs["Hunger"].RestoredOffCampus);
|
||||
Assert.True(catalog.Needs["Sleep"].RestoredOffCampus);
|
||||
Assert.NotNull(catalog.BehaviorRules);
|
||||
Assert.Equal(0, catalog.BehaviorRules.CommuteSlackMin);
|
||||
|
||||
Reference in New Issue
Block a user