From 98baafa86c97ff55900e0e908934087aff564e21 Mon Sep 17 00:00:00 2001 From: Christopher Schnick Date: Wed, 24 May 2023 09:18:44 +0200 Subject: [PATCH] Some stellaris fixes --- README.md | 3 +-- .../pdxu/app/gui/dialog/GuiIncompatibleWarning.java | 2 +- .../java/com/crschnick/pdxu/app/gui/game/GameImage.java | 6 ++++++ .../pdxu/app/info/stellaris/StellarisAlliesComp.java | 2 +- .../pdxu/app/info/stellaris/StellarisWarMultiComp.java | 3 ++- .../com/crschnick/pdxu/app/savegame/FileExportTarget.java | 2 +- 6 files changed, 12 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index ebbd6503..7794f51e 100644 --- a/README.md +++ b/README.md @@ -46,8 +46,7 @@ This version does not come with an update functionality, so you have to manually - [Linux standalone](https://github.com/crschnick/pdx_unlimiter/releases/latest/download/pdx_unlimiter-linux.zip) - [Mac standalone](https://github.com/crschnick/pdx_unlimiter/releases/latest/download/pdx_unlimiter-macos-x86_64.dmg) (Works on Intel and Apple Silicon) -You can also find information on how to obtain pre-releases and the latest development builds in -the [Downloads](https://github.com/crschnick/pdx_unlimiter/wiki/Downloads) section of the wiki. +Note that if you utilize any accessibility software, you should use the standalone version. diff --git a/pdxu-app/src/main/java/com/crschnick/pdxu/app/gui/dialog/GuiIncompatibleWarning.java b/pdxu-app/src/main/java/com/crschnick/pdxu/app/gui/dialog/GuiIncompatibleWarning.java index 974806b0..aba23cb1 100644 --- a/pdxu-app/src/main/java/com/crschnick/pdxu/app/gui/dialog/GuiIncompatibleWarning.java +++ b/pdxu-app/src/main/java/com/crschnick/pdxu/app/gui/dialog/GuiIncompatibleWarning.java @@ -96,7 +96,7 @@ public static Optional showNoSavedModsWarning(Game game, List alert.setHeaderText(PdxuI18n.get("MOD_INFO", game.getTranslatedFullName())); String builder = enabledMods.stream() - .map(m -> "- " + m.getName()) + .map(m -> "- " + m.getName().orElse(m.getModFile().getFileName().toString())) .collect(Collectors.joining("\n")); if (enabledMods.size() == 0) { builder = builder + ""; diff --git a/pdxu-app/src/main/java/com/crschnick/pdxu/app/gui/game/GameImage.java b/pdxu-app/src/main/java/com/crschnick/pdxu/app/gui/game/GameImage.java index 08dfb3ca..962eebc0 100644 --- a/pdxu-app/src/main/java/com/crschnick/pdxu/app/gui/game/GameImage.java +++ b/pdxu-app/src/main/java/com/crschnick/pdxu/app/gui/game/GameImage.java @@ -63,6 +63,8 @@ public class GameImage { public static Image CK3_ICON_HEALTH; public static Image STELLARIS_ICON_IRONMAN; + public static Image STELLARIS_ICON_WAR; + public static Image STELLARIS_ICON_ALLIANCE; public static Image STELLARIS_FLAG_MASK; public static Image STELLARIS_FLAG_FRAME; public static Image STELLARIS_BACKGROUND; @@ -262,6 +264,7 @@ public static void loadCk3Images() { private static void loadStellarisImages() { var installPath = GameInstallation.ALL.get(Game.STELLARIS).getInstallDir(); + Path it = installPath.resolve("gfx").resolve("interface"); Path i = installPath.resolve("gfx").resolve("interface").resolve("icons"); Path r = installPath.resolve("gfx").resolve("interface").resolve("icons").resolve("resources"); Path f = installPath.resolve("gfx").resolve("interface").resolve("flags"); @@ -271,6 +274,9 @@ private static void loadStellarisImages() { STELLARIS_FLAG_FRAME = ImageHelper.loadImage(f.resolve("empire_flag_200_frame.dds")); STELLARIS_BACKGROUND = ImageHelper.loadImage(GameInstallation.ALL.get(Game.STELLARIS) .getType().chooseBackgroundImage(installPath)); + STELLARIS_ICON_WAR = ImageHelper.loadImage(it.resolve("waroverview").resolve("at_war_with_bg.dds")); + STELLARIS_ICON_ALLIANCE = ImageHelper.loadImage(i.resolve("diplomacy").resolve("diplomacy_alliance.dds")); + STELLARIS_ICON_ALLOYS = ImageHelper.loadImage(r.resolve("alloys.dds")); STELLARIS_ICON_ALLOYS = ImageHelper.loadImage(r.resolve("alloys.dds")); STELLARIS_ICON_ENERGY = ImageHelper.loadImage(r.resolve("energy.dds")); STELLARIS_ICON_FOOD = ImageHelper.loadImage(r.resolve("food.dds")); diff --git a/pdxu-app/src/main/java/com/crschnick/pdxu/app/info/stellaris/StellarisAlliesComp.java b/pdxu-app/src/main/java/com/crschnick/pdxu/app/info/stellaris/StellarisAlliesComp.java index e8eb79f4..c5e6060e 100644 --- a/pdxu-app/src/main/java/com/crschnick/pdxu/app/info/stellaris/StellarisAlliesComp.java +++ b/pdxu-app/src/main/java/com/crschnick/pdxu/app/info/stellaris/StellarisAlliesComp.java @@ -26,7 +26,7 @@ protected String getTooltip() { @Override protected Image getIcon() { - return GameImage.EU4_ICON_ALLIANCE; + return GameImage.STELLARIS_ICON_ALLIANCE; } @Override diff --git a/pdxu-app/src/main/java/com/crschnick/pdxu/app/info/stellaris/StellarisWarMultiComp.java b/pdxu-app/src/main/java/com/crschnick/pdxu/app/info/stellaris/StellarisWarMultiComp.java index a731daaf..9ac3f313 100644 --- a/pdxu-app/src/main/java/com/crschnick/pdxu/app/info/stellaris/StellarisWarMultiComp.java +++ b/pdxu-app/src/main/java/com/crschnick/pdxu/app/info/stellaris/StellarisWarMultiComp.java @@ -1,6 +1,7 @@ package com.crschnick.pdxu.app.info.stellaris; import com.crschnick.pdxu.app.gui.GuiStyle; +import com.crschnick.pdxu.app.gui.game.GameImage; import com.crschnick.pdxu.app.info.SavegameData; import com.crschnick.pdxu.app.info.SavegameInfoComp; import com.crschnick.pdxu.app.info.SavegameInfoMultiComp; @@ -35,7 +36,7 @@ protected String getTooltip() { @Override protected Image getIcon() { - return null; + return GameImage.STELLARIS_ICON_WAR; } @Override diff --git a/pdxu-app/src/main/java/com/crschnick/pdxu/app/savegame/FileExportTarget.java b/pdxu-app/src/main/java/com/crschnick/pdxu/app/savegame/FileExportTarget.java index 5258bb1a..d159c76c 100644 --- a/pdxu-app/src/main/java/com/crschnick/pdxu/app/savegame/FileExportTarget.java +++ b/pdxu-app/src/main/java/com/crschnick/pdxu/app/savegame/FileExportTarget.java @@ -121,7 +121,7 @@ public StellarisExportTarget( public Path export() throws Exception { var baseName = FilenameUtils.getBaseName( storage.getValidOutputFileName(entry, includeEntryName, null).toString()); - var customId = entry.getUuid(); + var customId = storage.getSavegameCampaign(entry).getUuid(); var suffix = " (" + customId + ")"; Path file;