Skip to content

Commit

Permalink
fix(coremods): language and notice check in plaintext patch
Browse files Browse the repository at this point in the history
remove unused commands plaintext patch
  • Loading branch information
FedeIlLeone committed Sep 7, 2024
1 parent 225b94b commit 446e3b7
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 78 deletions.
14 changes: 0 additions & 14 deletions src/renderer/coremods/commands/plaintextPatches.ts

This file was deleted.

3 changes: 2 additions & 1 deletion src/renderer/coremods/language/plaintextPatches.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ export default [
},
{
match: /children:\[(.+?\.localeName[^\]]*?)]/,
replace: (_, ogChild) => `children:[${coremodStr}?.Percentage(${ogChild}) ?? ${ogChild}]`,
replace: (_, ogChild) =>
`children:${coremodStr}?.Percentage?${coremodStr}.Percentage(${ogChild}):[${ogChild}]`,
},
],
},
Expand Down
60 changes: 0 additions & 60 deletions src/renderer/coremods/messagePopover/index.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default [
{
match: /(\w+\.base,children:\[)(.+?}\)),/,
replace: (_, prefix, noticeWrapper) =>
`${prefix}${coremodStr}?.AnnouncementContainer({originalRes:${noticeWrapper}}) ?? ${noticeWrapper},`,
`${prefix}${coremodStr}?.AnnouncementContainer?${coremodStr}.AnnouncementContainer({originalRes:${noticeWrapper}}):${noticeWrapper},`,
},
],
},
Expand Down
2 changes: 0 additions & 2 deletions src/renderer/managers/coremods.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import { default as messagePopover } from "../coremods/messagePopover/plaintextP
import { default as notices } from "../coremods/notices/plaintextPatches";
import { default as contextMenu } from "../coremods/contextMenu/plaintextPatches";
import { default as languagePlaintext } from "../coremods/language/plaintextPatches";
import { default as commandsPlaintext } from "../coremods/commands/plaintextPatches";
import { default as settingsPlaintext } from "../coremods/settings/plaintextPatches";
import { default as badgesPlaintext } from "../coremods/badges/plaintextPatches";
import { Logger } from "../modules/logger";
Expand Down Expand Up @@ -86,7 +85,6 @@ export function runPlaintextPatches(): void {
notices,
contextMenu,
languagePlaintext,
commandsPlaintext,
settingsPlaintext,
badgesPlaintext,
].forEach(patchPlaintext);
Expand Down

0 comments on commit 446e3b7

Please sign in to comment.