forked from Anuken/Mindustry
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: way-zer <[email protected]> | ||
Date: Sun, 28 Jul 2024 23:52:46 +0800 | ||
Subject: [PATCH] FIX early release #Ankuen:10066 | ||
|
||
--- | ||
core/src/mindustry/world/blocks/storage/Unloader.java | 10 ++++++++-- | ||
1 file changed, 8 insertions(+), 2 deletions(-) | ||
|
||
diff --git a/core/src/mindustry/world/blocks/storage/Unloader.java b/core/src/mindustry/world/blocks/storage/Unloader.java | ||
index a7076762221515ba44b5ca78e7e9a1e37740e0c0..cb5a9f3a516f89589436c03395c67f1c0265c6ea 100644 | ||
--- a/core/src/mindustry/world/blocks/storage/Unloader.java | ||
+++ b/core/src/mindustry/world/blocks/storage/Unloader.java | ||
@@ -7,6 +7,7 @@ import arc.struct.*; | ||
import arc.util.*; | ||
import arc.util.io.*; | ||
import arc.util.pooling.*; | ||
+import arc.util.pooling.Pool.*; | ||
import mindustry.annotations.Annotations.*; | ||
import mindustry.entities.units.*; | ||
import mindustry.gen.*; | ||
@@ -58,17 +59,22 @@ public class Unloader extends Block{ | ||
removeBar("items"); | ||
} | ||
|
||
- public static class ContainerStat{ | ||
+ public static class ContainerStat implements Poolable{ | ||
Building building; | ||
float loadFactor; | ||
boolean canLoad; | ||
boolean canUnload; | ||
int lastUsed; | ||
|
||
+ @Override | ||
+ public void reset(){ | ||
+ building = null; | ||
+ } | ||
+ | ||
@Override | ||
public String toString(){ | ||
return "ContainerStat{" + | ||
- "building=" + building.block + "#" + building.id + | ||
+ "building=" + (building != null ? (building.block + "#" + building.id) : "null") + | ||
", loadFactor=" + loadFactor + | ||
", canLoad=" + canLoad + | ||
", canUnload=" + canUnload + |