Skip to content

Commit

Permalink
Fix getInfo("map") to return correct background and fog paints when s…
Browse files Browse the repository at this point in the history
…et to solid colours
  • Loading branch information
kwvanderlinde committed Feb 6, 2025
1 parent ee0e359 commit 1635716
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ private JsonObject getMapInfo() throws ParserException {
final var backgroundPaint = zone.getBackgroundPaint();
String background = null;
if (backgroundPaint instanceof DrawableColorPaint dcp) {
background = String.format("#%h", zone.getGridColor());
background = String.format("#%h", dcp.getColor());
} else if (backgroundPaint instanceof DrawableTexturePaint dtp) {
background = "asset://" + dtp.getAssetId().toString();
}
Expand All @@ -196,7 +196,7 @@ private JsonObject getMapInfo() throws ParserException {
final var fogPaint = zone.getFogPaint();
String fog = null;
if (fogPaint instanceof DrawableColorPaint dcp) {
fog = String.format("#%h", zone.getGridColor());
fog = String.format("#%h", dcp.getColor());
} else if (fogPaint instanceof DrawableTexturePaint dtp) {
fog = "asset://" + dtp.getAssetId().toString();
}
Expand Down

0 comments on commit 1635716

Please sign in to comment.