Add actuallyRemoved method to exopack menu
This commit is contained in:
parent
13f140ac31
commit
a289d9d1c1
@ -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
|
||||
}
|
||||
|
||||
|
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user