66 lines
2.4 KiB
JavaScript
66 lines
2.4 KiB
JavaScript
/**
|
|
* Script to remove all arousal/control/intensity effects from game mode data files
|
|
*/
|
|
|
|
const fs = require('fs');
|
|
const path = require('path');
|
|
|
|
const gameModeFiles = [
|
|
'src/data/modes/trainingGameData.js',
|
|
'src/data/modes/humiliationGameData.js',
|
|
'src/data/modes/dressUpGameData.js',
|
|
'src/data/modes/enduranceGameData.js'
|
|
];
|
|
|
|
function removeEffectsFromFile(filePath) {
|
|
console.log(`Processing: ${filePath}`);
|
|
|
|
let content = fs.readFileSync(filePath, 'utf8');
|
|
|
|
// Remove effects objects with various formats
|
|
// Match: effects: { ... },
|
|
content = content.replace(/\s*effects: \{[^}]*\},?\s*/g, '');
|
|
|
|
// Remove effects objects without trailing comma
|
|
content = content.replace(/\s*effects: \{[^}]*\}\s*/g, '');
|
|
|
|
// Clean up any orphaned commas and spacing issues
|
|
content = content.replace(/,(\s*nextStep:)/g, '\n $1');
|
|
content = content.replace(/,(\s*\})/g, '$1');
|
|
|
|
// Remove effects from ending text interpolation
|
|
content = content.replace(/\{arousal\}/g, 'HIGH');
|
|
content = content.replace(/\{control\}/g, 'VARIABLE');
|
|
content = content.replace(/\{intensity\}/g, 'MAXIMUM');
|
|
|
|
// Clean up any references to arousal/control/intensity in story text
|
|
content = content.replace(/building arousal/g, 'building excitement');
|
|
content = content.replace(/Your arousal/g, 'Your excitement');
|
|
content = content.replace(/maximize arousal/g, 'maximize pleasure');
|
|
content = content.replace(/maintaining arousal/g, 'maintaining excitement');
|
|
content = content.replace(/perfect arousal/g, 'perfect excitement');
|
|
content = content.replace(/arousal level/g, 'excitement level');
|
|
content = content.replace(/control is /g, 'focus is ');
|
|
content = content.replace(/edge control/g, 'edge focus');
|
|
content = content.replace(/perfect control/g, 'perfect focus');
|
|
|
|
fs.writeFileSync(filePath, content);
|
|
console.log(`Completed: ${filePath}`);
|
|
}
|
|
|
|
function main() {
|
|
console.log('Removing arousal/control/intensity effects from game mode files...');
|
|
|
|
gameModeFiles.forEach(file => {
|
|
const fullPath = path.join(process.cwd(), file);
|
|
if (fs.existsSync(fullPath)) {
|
|
removeEffectsFromFile(fullPath);
|
|
} else {
|
|
console.log(`File not found: ${fullPath}`);
|
|
}
|
|
});
|
|
|
|
console.log('All effects removed successfully!');
|
|
}
|
|
|
|
main(); |