Enhance protocol and simulation features with activity tracking and behavior definitions
- Updated protocol documentation to include new `activity` and `activityLabel` fields in the person card response, reflecting real-time activity status. - Introduced `BehaviorDef` to define behavior rules, including need thresholds and lesson skill gains, enhancing AI decision-making. - Revised the `DefCatalog` to incorporate behavior definitions and updated validation logic to ensure proper behavior handling. - Enhanced the simulation to manage presence and activity states, allowing for more dynamic interactions within the school environment. - Updated tests to validate the new activity tracking and behavior functionalities, ensuring robust performance and reliability. - Improved localization strings to support new activity and behavior features, enhancing user experience.
This commit is contained in:
@@ -264,6 +264,8 @@ export interface PersonCard {
|
||||
readonly skills: readonly LabeledStat[];
|
||||
readonly traits: readonly DefLabel[];
|
||||
readonly needs: readonly NeedStat[];
|
||||
readonly activity: string | null;
|
||||
readonly activityLabel: string | null;
|
||||
readonly family: {
|
||||
readonly parents: readonly PersonRel[];
|
||||
readonly children: readonly PersonRel[];
|
||||
|
||||
@@ -577,6 +577,12 @@ body {
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
.people__card-place,
|
||||
.people__card-activity {
|
||||
margin: 4px 0 0;
|
||||
color: var(--text-muted);
|
||||
}
|
||||
|
||||
.people__section {
|
||||
margin-top: 10px;
|
||||
}
|
||||
|
||||
@@ -40,6 +40,9 @@ export function renderPersonCard(
|
||||
if (place !== undefined && place.length > 0) {
|
||||
parent.append(el('p', { class: 'people__card-place', text: place }));
|
||||
}
|
||||
if (card.activityLabel !== null && card.activityLabel.length > 0) {
|
||||
parent.append(el('p', { class: 'people__card-activity', text: card.activityLabel }));
|
||||
}
|
||||
appendPairs(parent, t('peopleBody'), card.body);
|
||||
appendPairs(parent, t('peopleSkills'), card.skills);
|
||||
appendTags(parent, t('peopleTraits'), card.traits.map((row) => row.label));
|
||||
|
||||
Reference in New Issue
Block a user