mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-01-25 14:01:03 -08:00
Fixed #2452
This commit is contained in:
parent
e41b17543f
commit
f2cc56ddc8
1 changed files with 2 additions and 2 deletions
|
|
@ -11,6 +11,7 @@ import static mindustry.Vars.*;
|
|||
|
||||
public class CoreItemsDisplay extends Table{
|
||||
private final ObjectSet<Item> usedItems = new ObjectSet<>();
|
||||
private CoreBuild core;
|
||||
|
||||
public CoreItemsDisplay(){
|
||||
rebuild();
|
||||
|
|
@ -26,7 +27,7 @@ public class CoreItemsDisplay extends Table{
|
|||
margin(4);
|
||||
|
||||
update(() -> {
|
||||
CoreBuild core = Vars.player.team().core();
|
||||
core = Vars.player.team().core();
|
||||
|
||||
if(content.items().contains(item -> core != null && core.items.get(item) > 0 && usedItems.add(item))){
|
||||
rebuild();
|
||||
|
|
@ -35,7 +36,6 @@ public class CoreItemsDisplay extends Table{
|
|||
|
||||
int i = 0;
|
||||
|
||||
CoreBuild core = Vars.player.team().core();
|
||||
for(Item item : content.items()){
|
||||
if(usedItems.contains(item)){
|
||||
image(item.icon(Cicon.small)).padRight(3);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue