Add actuallyRemoved method to exopack menu

This commit is contained in:
DBotThePony 2023-03-17 14:08:27 +07:00
parent 13f140ac31
commit a289d9d1c1
Signed by: DBot
GPG Key ID: DCC23B5715498507
2 changed files with 6 additions and 2 deletions

View File

@ -230,7 +230,7 @@ class MatteryPlayerCapability(val ply: Player) : ICapabilityProvider, INBTSerial
private var _exoPackMenu: ExoPackInventoryMenu? = null
set(value) {
if (field == ply.containerMenu) { ply.closeContainer() }
field?.removed(ply)
field?.actuallyRemoved()
field = value
}

View File

@ -121,12 +121,16 @@ class ExoPackInventoryMenu(val capability: MatteryPlayerCapability) : MatteryMen
}
}
fun actuallyRemoved() {
isRemoved = true
removed(capability.ply)
}
override fun removed(player: Player) {
if (player != capability.ply) {
throw RuntimeException("what.")
}
isRemoved = true
super.removed(player)
craftingResultContainer.clearContent()