Implement submit_flags task functionality and enhance game mechanics

- Added support for submit_flags tasks in GamesController, allowing players to submit flags for validation and task completion.
- Updated game state management to track submitted flags and validate against required flags for task completion.
- Enhanced ObjectivesManager to handle flag submissions, including syncing progress with the server and managing task states.
- Introduced a new locksmith NPC for lockpicking tutorials, expanding gameplay elements and player engagement.
- Updated scenario schema to include submit_flags task type and associated properties, ensuring proper integration into the game mechanics.
- Improved logging and debugging information for flag submissions and task progress updates, enhancing visibility into game state changes.
This commit is contained in:
Z. Cliffe Schreuders
2025-12-04 14:00:26 +00:00
parent e1d3b1ff2c
commit 333ea39c56
16 changed files with 1039 additions and 274 deletions

View File

@@ -97,7 +97,7 @@
"title": { "type": "string" },
"type": {
"type": "string",
"enum": ["collect_items", "unlock_room", "unlock_object", "enter_room", "npc_conversation"]
"enum": ["collect_items", "unlock_room", "unlock_object", "enter_room", "npc_conversation", "submit_flags", "custom"]
},
"status": {
"type": "string",
@@ -110,13 +110,19 @@
"type": "array",
"items": { "type": "string" }
},
"targetFlags": {
"type": "array",
"items": { "type": "string" },
"description": "Array of flag identifiers to submit (e.g., ['desktop-flag1', 'kali-flag1'])"
},
"targetCount": { "type": "integer" },
"currentCount": { "type": "integer" },
"showProgress": { "type": "boolean" },
"onComplete": {
"type": "object",
"properties": {
"unlockTask": { "type": "string" }
"unlockTask": { "type": "string" },
"unlockAim": { "type": "string" }
}
}
}