implements RoomOptions {
this.add('||AFD is currently set to ' + curMode);
this.send('/help afd');
}
- for (let roomid in PS.rooms) {
- let battle = PS.rooms[roomid] && (PS.rooms[roomid] as BattleRoom).battle;
- if (!battle) continue;
- battle.resetToCurrentTurn();
- }
+ void Dex.loadTextData().then(() => {
+ for (const roomid in PS.rooms) {
+ const battle = (PS.rooms[roomid] as BattleRoom)?.battle;
+ if (battle) battle.resetToCurrentTurn();
+ }
+ });
},
'clearpms'() {
let rooms = PS.miniRoomList.filter(roomid => roomid.startsWith('dm-'));
diff --git a/play.pokemonshowdown.com/src/globals.d.ts b/play.pokemonshowdown.com/src/globals.d.ts
index 04ec3c619..142edad25 100644
--- a/play.pokemonshowdown.com/src/globals.d.ts
+++ b/play.pokemonshowdown.com/src/globals.d.ts
@@ -4,7 +4,16 @@
///////////
type AnyObject = { [k: string]: any };
-declare const BattleText: { [id: string]: { [templateName: string]: string } };
+type BattleTextEntry = { [templateName: string]: string | BattleTextEntry };
+type BattleTextTable = { [id: string]: BattleTextEntry };
+type BattleTextData = {
+ Default: BattleTextTable,
+ Pokedex: BattleTextTable,
+ Moves: BattleTextTable,
+ Abilities: BattleTextTable,
+ Items: BattleTextTable,
+};
+declare const BattleText: { [lang: string]: BattleTextData };
declare const BattleFormats: { [id: string]: import('./panel-teamdropdown').FormatData };
declare const BattlePokedex: { [id: string]: AnyObject };
declare const BattleMovedex: { [id: string]: AnyObject };
diff --git a/play.pokemonshowdown.com/src/oldclient/client-chat.js b/play.pokemonshowdown.com/src/oldclient/client-chat.js
index 5f41a60a7..39e254ba7 100644
--- a/play.pokemonshowdown.com/src/oldclient/client-chat.js
+++ b/play.pokemonshowdown.com/src/oldclient/client-chat.js
@@ -1174,11 +1174,12 @@
this.add('AFD is currently set to ' + mode);
this.parseCommand('/help afd');
}
- for (var roomid in app.rooms) {
- var battle = app.rooms[roomid] && app.rooms[roomid].battle;
- if (!battle) continue;
- battle.resetToCurrentTurn();
- }
+ Dex.loadTextData().then(function () {
+ for (var roomid in app.rooms) {
+ var battle = app.rooms[roomid] && app.rooms[roomid].battle;
+ if (battle) battle.resetToCurrentTurn();
+ }
+ });
return false;
// documentation of client commands
diff --git a/play.pokemonshowdown.com/src/oldclient/client-topbar.js b/play.pokemonshowdown.com/src/oldclient/client-topbar.js
index 59756a92e..241dd89a6 100644
--- a/play.pokemonshowdown.com/src/oldclient/client-topbar.js
+++ b/play.pokemonshowdown.com/src/oldclient/client-topbar.js
@@ -550,8 +550,9 @@
"Türkçe": 'turkish',
"हिंदी": 'hindi',
"日本語": 'japanese',
+ "한국어": 'korean',
"简体中文": 'simplifiedchinese',
- "中文": 'traditionalchinese'
+ "繁體中文": 'traditionalchinese'
};
buf += '