ok kotlin

This commit is contained in:
DBotThePony 2024-05-16 18:07:35 +07:00
parent f416cd69e5
commit 7b2d9b1bf4
Signed by: DBot
GPG Key ID: DCC23B5715498507

View File

@ -782,11 +782,13 @@ abstract class MatteryMenu(
val allowedTypes = EnumMap<UpgradeType, BooleanSupplier>(UpgradeType::class.java) val allowedTypes = EnumMap<UpgradeType, BooleanSupplier>(UpgradeType::class.java)
for (value in UpgradeType.ALL) { for (value in UpgradeType.ALL) {
allowedTypes[value] = mSynchronizer.boolean().delegate.also { val b = mSynchronizer.boolean().delegate.also {
if (container != null) { if (container != null) {
it.accept(value in container.allowedUpgrades) it.accept(value in container.allowedUpgrades)
} }
}::get as BooleanSupplier }
allowedTypes[value] = BooleanSupplier { b.get() }
} }
val syncContainer = container ?: SimpleContainer(count) val syncContainer = container ?: SimpleContainer(count)