Merge branch 'master' into AI_ATTACK_TIMEOUT

This commit is contained in:
kevlahnota
2024-11-22 12:46:13 +08:00
committed by GitHub
3 changed files with 14 additions and 5 deletions

View File

@@ -1,4 +1,7 @@
name: Remove stale branches
on: on:
workflow_dispatch:
schedule: schedule:
- cron: "0 0 * * *" # Everday at midnight - cron: "0 0 * * *" # Everday at midnight
@@ -9,4 +12,6 @@ jobs:
steps: steps:
- uses: fpicalausa/remove-stale-branches@v1.6.0 - uses: fpicalausa/remove-stale-branches@v1.6.0
with: with:
dry-run: true # Check out the console output before setting this to false dry-run: false # Check out the console output before setting this to false
ignore-unknown-authors: true
default-recipient: tehdiplomat

View File

@@ -591,10 +591,12 @@ public class ImageView<T extends InventoryItem> extends ItemView<T> {
Map<Comparable<?>, Pile> piles = new TreeMap<>(); Map<Comparable<?>, Pile> piles = new TreeMap<>();
for (ItemInfo itemInfo : group.items) { for (ItemInfo itemInfo : group.items) {
Comparable<?> key = groupPileBy.fnSort.apply(itemInfo); Comparable<?> key = groupPileBy.fnSort.apply(itemInfo);
if (!piles.containsKey(key)) { if (key != null && !piles.containsKey(key)) {
piles.put(key, new Pile()); piles.put(key, new Pile());
} }
piles.get(key).items.add(itemInfo); Pile p = key == null ? null : piles.getOrDefault(key, null);
if (p != null)
p.items.add(itemInfo);
} }
group.piles.clear(); group.piles.clear();
group.piles.addAll(piles.values()); group.piles.addAll(piles.values());

View File

@@ -377,8 +377,10 @@ public class CardZoom extends FOverlay {
float x = (w - cardWidth) / 2; float x = (w - cardWidth) / 2;
y = (h - cardHeight) / 2; y = (h - cardHeight) / 2;
if (zoomMode) { if (zoomMode) {
if (currentCard != null)
CardImageRenderer.drawZoom(g, currentCard, gameView, showBackSide? showBackSide : showAltState, x, y, cardWidth, cardHeight, getWidth(), getHeight(), true); CardImageRenderer.drawZoom(g, currentCard, gameView, showBackSide? showBackSide : showAltState, x, y, cardWidth, cardHeight, getWidth(), getHeight(), true);
} else { } else {
if (currentCard != null)
CardImageRenderer.drawDetails(g, currentCard, gameView, showBackSide ? showBackSide : showAltState, x, y, cardWidth, cardHeight); CardImageRenderer.drawDetails(g, currentCard, gameView, showBackSide ? showBackSide : showAltState, x, y, cardWidth, cardHeight);
} }