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:
@@ -32,7 +32,7 @@ public class NeedDecayTests
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void Sleep_ReturnsToMaxOffCampus()
|
||||
public void SleepAndHunger_ReturnToMaxOffCampus()
|
||||
{
|
||||
var catalog = VanillaCatalog();
|
||||
var world = World.Create();
|
||||
@@ -50,8 +50,9 @@ public class NeedDecayTests
|
||||
var query = new QueryDescription().WithAll<PersonNeeds>();
|
||||
world.Query(in query, (ref PersonNeeds needs) =>
|
||||
{
|
||||
// Both are restored за кадром: the day at home covers a night and meals alike.
|
||||
Assert.Equal(catalog.Needs["Sleep"].Max, needs.Values["Sleep"]);
|
||||
Assert.Equal(0.4f, needs.Values["Hunger"]);
|
||||
Assert.Equal(catalog.Needs["Hunger"].Max, needs.Values["Hunger"]);
|
||||
});
|
||||
}
|
||||
finally
|
||||
|
||||
Reference in New Issue
Block a user