fix: Repair broken punishment game mode
- Register inline scenarios with scenario loader system - Fix scenario collections to use correct available scenarios - Update punishment-gauntlet mode to use scenario-humiliation-task - Ensure all game modes reference only existing scenarios The punishment mode was broken because: 1. Inline scenarios in game.js weren't registered with scenario loader 2. Game mode collections referenced non-existent scenario files 3. Missing scenario-humiliation-challenge -> now uses scenario-humiliation-task All scenario-based game modes should now work correctly.
This commit is contained in:
parent
6152d29487
commit
13a76981be
|
|
@ -1367,6 +1367,17 @@ class TaskChallengeGame {
|
|||
if (!exists) {
|
||||
gameData.mainTasks.push(interactiveTask);
|
||||
console.log(`Added interactive task: ${interactiveTask.text}`);
|
||||
|
||||
// Also register with scenario loader if it's a scenario-adventure type
|
||||
if (interactiveTask.interactiveType === 'scenario-adventure' &&
|
||||
window.scenarioLoader && window.scenarioLoader.registerScenario) {
|
||||
window.scenarioLoader.registerScenario(interactiveTask.id, {
|
||||
text: interactiveTask.text,
|
||||
difficulty: interactiveTask.difficulty,
|
||||
interactiveData: interactiveTask.interactiveData
|
||||
});
|
||||
console.log(`Registered scenario with loader: ${interactiveTask.id}`);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ class GameModeManager {
|
|||
}
|
||||
};
|
||||
|
||||
// Scenario collections for different modes - EXPANDED CONTENT
|
||||
// Scenario collections for different modes - UPDATED WITH CORRECT AVAILABLE SCENARIOS
|
||||
this.scenarioCollections = {
|
||||
'photography-studio': [
|
||||
'scenario-dress-up-photo'
|
||||
|
|
@ -57,23 +57,27 @@ class GameModeManager {
|
|||
'scenario-adventures': [
|
||||
'scenario-training-regimen',
|
||||
'scenario-punishment-session',
|
||||
'scenario-humiliation-challenge',
|
||||
'scenario-dress-up-photo',
|
||||
'scenario-creative-tasks',
|
||||
'scenario-training-session',
|
||||
'scenario-mysterious-game',
|
||||
'scenario-humiliation-task',
|
||||
'scenario-edging-marathon',
|
||||
'scenario-obedience-training',
|
||||
'scenario-creative-tasks'
|
||||
'scenario-obedience-training'
|
||||
],
|
||||
'training-academy': [
|
||||
'scenario-training-regimen',
|
||||
'scenario-obedience-training',
|
||||
'scenario-creative-tasks'
|
||||
'scenario-creative-tasks',
|
||||
'scenario-training-session',
|
||||
'scenario-obedience-training'
|
||||
],
|
||||
'punishment-gauntlet': [
|
||||
'scenario-punishment-session',
|
||||
'scenario-humiliation-challenge'
|
||||
'scenario-humiliation-task'
|
||||
],
|
||||
'endurance-trials': [
|
||||
'scenario-edging-marathon',
|
||||
'scenario-training-regimen'
|
||||
'scenario-training-regimen',
|
||||
'scenario-edging-marathon'
|
||||
]
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue