mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-04-09 03:13:43 +01:00
refactor: Update trainerId and secretId in game data
This commit updates the `trainerId` and `secretId` properties in the `GameData` class. The values are replaced with the corresponding values from the `this.trainerId` and `this.secretId` variables. This change ensures that the `trainerId` and `secretId` are correctly updated in the game data.
This commit is contained in:
parent
b2ced623fd
commit
7709ff5d21
@ -573,6 +573,8 @@ export class GameData {
|
||||
// Account for past key oversight
|
||||
dataStr = dataStr.replace(/\$pAttr/g, "$pa");
|
||||
}
|
||||
dataStr = dataStr.replace(/"trainerId":\d+/g, `"trainerId":${this.trainerId}`);
|
||||
dataStr = dataStr.replace(/"secretId":\d+/g, `"secretId":${this.secretId}`);
|
||||
const fromKeys = shorten ? Object.keys(systemShortKeys) : Object.values(systemShortKeys);
|
||||
const toKeys = shorten ? Object.values(systemShortKeys) : Object.keys(systemShortKeys);
|
||||
for (const k in fromKeys) {
|
||||
|
@ -192,7 +192,7 @@ export default class MenuUiHandler extends MessageUiHandler {
|
||||
});
|
||||
};
|
||||
|
||||
if (Utils.isLocal) {
|
||||
if (Utils.isLocal || Utils.isBeta) {
|
||||
manageDataOptions.push({
|
||||
label: i18next.t("menuUiHandler:importSession"),
|
||||
handler: () => {
|
||||
@ -223,7 +223,7 @@ export default class MenuUiHandler extends MessageUiHandler {
|
||||
},
|
||||
keepOpen: true
|
||||
});
|
||||
if (Utils.isLocal) {
|
||||
if (Utils.isLocal || Utils.isBeta) {
|
||||
manageDataOptions.push({
|
||||
label: i18next.t("menuUiHandler:importData"),
|
||||
handler: () => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user