Compare commits

...

2 Commits

2 changed files with 12 additions and 0 deletions

View File

@ -34,6 +34,10 @@ class CombinedContainer(containers: Stream<Pair<Container, Iterable<Int>>>) : IM
override val container: Container
get() = this@CombinedContainer
override fun setChanged() {
outer.setChanged()
}
override fun component1(): Int {
return super.component1()
}

View File

@ -51,6 +51,14 @@ inline fun <S : Slot> makeSlots(containers: List<Container>?, size: Int, initial
open class MatterySlot(container: Container, index: Int, x: Int = 0, y: Int = 0) : Slot(container, index, x, y) {
var ignoreSpectators = true
override fun setChanged() {
if (container is IMatteryContainer) {
(container as IMatteryContainer).setChanged(index)
} else {
super.setChanged()
}
}
override fun mayPickup(player: Player): Boolean {
return super.mayPickup(player) && (!ignoreSpectators || !player.isSpectator)
}