Update AFD 2019 implementation

AFD messages are now disabled by `/afd off`
This commit is contained in:
Guangcong Luo 2019-04-01 19:18:28 +08:00
parent 27061397e0
commit e6e65dde4f
2 changed files with 3 additions and 0 deletions

View File

@ -55,6 +55,7 @@ fs.writeFileSync(
fs.readFileSync('js/battle-log.js') + '\n\n' +
fs.readFileSync('src/battle-log-misc.js') +
fs.readFileSync('data/text.js') + '\n\n' +
fs.readFileSync('data/text-afd.js') + '\n\n' +
fs.readFileSync('js/battle-text-parser.js')
);

View File

@ -906,9 +906,11 @@
var cleanedTarget = toId(target);
if (cleanedTarget === 'off' || cleanedTarget === 'disable') {
Config.server.afd = false;
if (typeof BattleTextNotAFD !== 'undefined') BattleText = BattleTextNotAFD;
this.add('April Fools\' day mode disabled.');
} else {
Config.server.afd = true;
if (typeof BattleTextAFD !== 'undefined') BattleText = BattleTextAFD;
this.add('April Fools\' day mode enabled.');
}
for (var roomid in app.rooms) {