summaryrefslogtreecommitdiff
path: root/core/src/kz/ilotterytea/maxon/ui
diff options
context:
space:
mode:
authorilotterytea <iltsu@alright.party>2024-06-09 16:45:30 +0500
committerilotterytea <iltsu@alright.party>2024-06-09 19:27:41 +0500
commit39e8c7f9328056d755cf6f5c1a52816e1f86b345 (patch)
treee1ff52564918155d272560f3dd983bcc2ffd66d8 /core/src/kz/ilotterytea/maxon/ui
parent480fca4f020457fc0421c482e4069b0ba973c8d4 (diff)
upd: use HashMap for purchased pets + fix
Diffstat (limited to 'core/src/kz/ilotterytea/maxon/ui')
-rw-r--r--core/src/kz/ilotterytea/maxon/ui/SavegameWidget.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/core/src/kz/ilotterytea/maxon/ui/SavegameWidget.java b/core/src/kz/ilotterytea/maxon/ui/SavegameWidget.java
index c6d2434..fb22122 100644
--- a/core/src/kz/ilotterytea/maxon/ui/SavegameWidget.java
+++ b/core/src/kz/ilotterytea/maxon/ui/SavegameWidget.java
@@ -124,7 +124,11 @@ public class SavegameWidget extends Table implements Disposable {
data.add(points).padRight(32f);
// Unit
- long amount = savegame.getPurchasedPets().size();
+ int amount = 0;
+
+ for (int a : savegame.getPurchasedPets().values()) {
+ amount += a;
+ }
Image unitIcon = new Image(atlas.findRegion("pets"));
data.add(unitIcon).size(32f, 32f).padRight(8f);