Skip to content

Commit c41c6dd

Browse files
committedApr 11, 2021
Only show storage in storage property
Fixed an issue with the prestorage support by removing it completely.
1 parent 8168043 commit c41c6dd

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed
 

‎Assets/Scripts/Screeps3D/RoomObjects/UnpackUtility.cs

+2-5
Original file line numberDiff line numberDiff line change
@@ -219,14 +219,11 @@ internal static void Store(IStoreObject obj, JSONObject data)
219219

220220
// ----- POST STORE UPDATE
221221

222-
var store = data.HasField("store") ? data["store"] : data; // this supports both PRE and POST store update
222+
var store = data.HasField("store") ? data["store"] : null; // this supports both PRE and POST store update
223223

224-
if (store == null)
224+
if (store != null && !store.IsNull)
225225
{
226226
obj.Store.Clear();
227-
}
228-
else if (!store.IsNull)
229-
{
230227
foreach (var resourceType in store.keys)
231228
{
232229
if (obj.Store.ContainsKey(resourceType))

0 commit comments

Comments
 (0)
Please sign in to comment.