Skip to content

Commit

Permalink
Some stellaris fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
crschnick committed May 24, 2023
1 parent 00591f6 commit 98baafa
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 6 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public static Optional<Boolean> showNoSavedModsWarning(Game game, List<GameMod>
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 + "<None>";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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");
Expand All @@ -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"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ protected String getTooltip() {

@Override
protected Image getIcon() {
return GameImage.EU4_ICON_ALLIANCE;
return GameImage.STELLARIS_ICON_ALLIANCE;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down Expand Up @@ -35,7 +36,7 @@ protected String getTooltip() {

@Override
protected Image getIcon() {
return null;
return GameImage.STELLARIS_ICON_WAR;
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 98baafa

Please sign in to comment.