Fix mattery container not deserializing properly

This commit is contained in:
DBotThePony 2024-09-01 18:21:55 +07:00
parent 6ce2181a95
commit 68fedf0257
Signed by: DBot
GPG Key ID: DCC23B5715498507

View File

@ -247,12 +247,14 @@ open class MatteryContainer(var listener: ContainerListener, private val size: I
if (freeSlots.remove(slotID)) {
slots[slotID] = item
// trackedSlots[slotID] = item.copy()
} else if (freeSlots.isEmpty()) {
break
} else {
val slotID = freeSlots.firstInt()
freeSlots.remove(slotID)
slots[slotID] = item
// trackedSlots[slotID] = item.copy()
}
}
@ -262,6 +264,8 @@ open class MatteryContainer(var listener: ContainerListener, private val size: I
filters[index] = item
map?.put(index, item)
}
setChanged()
}
}
}