|
| 1 | +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 |
| 2 | + |
| 3 | +Date: Sun, 28 Jul 2024 23:52:46 +0800 |
| 4 | +Subject: [PATCH] FIX early release #Ankuen:10066 |
| 5 | + |
| 6 | +--- |
| 7 | + core/src/mindustry/world/blocks/storage/Unloader.java | 10 ++++++++-- |
| 8 | + 1 file changed, 8 insertions(+), 2 deletions(-) |
| 9 | + |
| 10 | +diff --git a/core/src/mindustry/world/blocks/storage/Unloader.java b/core/src/mindustry/world/blocks/storage/Unloader.java |
| 11 | +index a7076762221515ba44b5ca78e7e9a1e37740e0c0..cb5a9f3a516f89589436c03395c67f1c0265c6ea 100644 |
| 12 | +--- a/core/src/mindustry/world/blocks/storage/Unloader.java |
| 13 | ++++ b/core/src/mindustry/world/blocks/storage/Unloader.java |
| 14 | +@@ -7,6 +7,7 @@ import arc.struct.*; |
| 15 | + import arc.util.*; |
| 16 | + import arc.util.io.*; |
| 17 | + import arc.util.pooling.*; |
| 18 | ++import arc.util.pooling.Pool.*; |
| 19 | + import mindustry.annotations.Annotations.*; |
| 20 | + import mindustry.entities.units.*; |
| 21 | + import mindustry.gen.*; |
| 22 | +@@ -58,17 +59,22 @@ public class Unloader extends Block{ |
| 23 | + removeBar("items"); |
| 24 | + } |
| 25 | + |
| 26 | +- public static class ContainerStat{ |
| 27 | ++ public static class ContainerStat implements Poolable{ |
| 28 | + Building building; |
| 29 | + float loadFactor; |
| 30 | + boolean canLoad; |
| 31 | + boolean canUnload; |
| 32 | + int lastUsed; |
| 33 | + |
| 34 | ++ @Override |
| 35 | ++ public void reset(){ |
| 36 | ++ building = null; |
| 37 | ++ } |
| 38 | ++ |
| 39 | + @Override |
| 40 | + public String toString(){ |
| 41 | + return "ContainerStat{" + |
| 42 | +- "building=" + building.block + "#" + building.id + |
| 43 | ++ "building=" + (building != null ? (building.block + "#" + building.id) : "null") + |
| 44 | + ", loadFactor=" + loadFactor + |
| 45 | + ", canLoad=" + canLoad + |
| 46 | + ", canUnload=" + canUnload + |
0 commit comments