Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 3 additions & 10 deletions scripts/pages/campaigns/campaign-saves.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,7 @@
'warning-popup',
$.Localize('#Action_OverwriteGame'),
() => {
// TODO: Replace this with other save API
const savFile: string = this.save.fileName;
const nameWithoutExt = savFile.endsWith('.sav') ? savFile.slice(0, -4) : savFile;
SaveRestoreAPI.SaveGame(nameWithoutExt);
GameSavesAPI.CreateNamedSave(this.save.name);

Check failure on line 91 in scripts/pages/campaigns/campaign-saves.ts

View workflow job for this annotation

GitHub Actions / build

Property 'name' does not exist on type 'GameSave'.

Check failure on line 91 in scripts/pages/campaigns/campaign-saves.ts

View workflow job for this annotation

GitHub Actions / build

Property 'CreateNamedSave' does not exist on type 'typeof GameSavesAPI'.

CampaignSaves.purgeSaveList();

Expand All @@ -118,10 +115,7 @@
'warning-popup',
$.Localize('#Action_DeleteGame'),
() => {
// TODO: Replace this with other save API
const savFile: string = this.save.fileName;
const nameWithoutExt = savFile.endsWith('.sav') ? savFile.slice(0, -4) : savFile;
SaveRestoreAPI.DeleteSave(nameWithoutExt);
GameSavesAPI.DeleteSaveGame(this.save.name);

Check failure on line 118 in scripts/pages/campaigns/campaign-saves.ts

View workflow job for this annotation

GitHub Actions / build

Property 'name' does not exist on type 'GameSave'.

Check failure on line 118 in scripts/pages/campaigns/campaign-saves.ts

View workflow job for this annotation

GitHub Actions / build

Property 'DeleteSaveGame' does not exist on type 'typeof GameSavesAPI'.

CampaignSaves.purgeSaveList();

Expand Down Expand Up @@ -229,8 +223,7 @@

const cover = this.panel.FindChildTraverse<Image>('SaveCover');
if (cover) {
const thumb = `file://{__saves}/${this.save.fileName.replace('.sav', '.tga')}`;
cover.SetImage(thumb);
cover.SetImage(this.save.screenshotPath);

Check failure on line 226 in scripts/pages/campaigns/campaign-saves.ts

View workflow job for this annotation

GitHub Actions / build

Property 'screenshotPath' does not exist on type 'GameSave'.
}

const type = this.panel.FindChildTraverse<Label>('SaveType');
Expand Down
3 changes: 0 additions & 3 deletions scripts/pages/main-menu/addons.ts
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,6 @@ class AddonManager {

this.purgeAddonList();


if (GameInterfaceAPI.GetGameUIState() === GameUIState.PAUSEMENU) {
const activeAddons = WorkshopAPI.GetActiveMountList();
const campaign = CampaignAPI.GetActiveCampaign();
Expand Down Expand Up @@ -278,8 +277,6 @@ class AddonManager {
if (this.toggleAllButton) this.toggleAllButton.SetSelected(anyEnabled);
}



this.updateAddons();
}

Expand Down
3 changes: 1 addition & 2 deletions scripts/pages/main-menu/base-menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,7 @@
return;
}

const thumb = `file://{__saves}/${this.latestSave.fileName.replace('.sav', '.tga')}`;
this.continueImg.SetImage(thumb);
this.continueImg.SetImage(this.latestSave.screenshotPath);

Check failure on line 255 in scripts/pages/main-menu/base-menu.ts

View workflow job for this annotation

GitHub Actions / build

Property 'screenshotPath' does not exist on type 'GameSave'.
const meta =
CampaignAPI.GetCampaignMeta(`${savCampaign.bucket.id}/${savCampaign.campaign.id}`) ??
new Map<string, string>();
Expand Down
3 changes: 1 addition & 2 deletions scripts/pages/main-menu/campaign-menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -276,8 +276,7 @@

//const chapterString = `[${c.chapters.indexOf(savChapter!) + 1} / ${c.chapters.length}]`;

const thumb = `file://{__saves}/${this.latestSave.fileName.replace('.sav', '.tga')}`;
this.continueImg.SetImage(thumb);
this.continueImg.SetImage(this.latestSave.screenshotPath);

Check failure on line 279 in scripts/pages/main-menu/campaign-menu.ts

View workflow job for this annotation

GitHub Actions / build

Property 'screenshotPath' does not exist on type 'GameSave'.

const date = new Date(Number(this.latestSave.fileTime));
this.continueBoxText.text = convertTime(date);
Expand Down
3 changes: 1 addition & 2 deletions scripts/pages/main-menu/pause-menu.ts
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,7 @@
return;
}

const thumb = `file://{__saves}/${this.latestSave.fileName.replace('.sav', '.tga')}`;
this.continueImg.SetImage(thumb);
this.continueImg.SetImage(this.latestSave.screenshotPath);

Check failure on line 273 in scripts/pages/main-menu/pause-menu.ts

View workflow job for this annotation

GitHub Actions / build

Property 'screenshotPath' does not exist on type 'GameSave'.

const date = new Date(Number(this.latestSave.fileTime));
this.continueBoxText.text = convertTime(date);
Expand Down
Loading