mirror of
https://github.com/MightyPirates/OpenComputers.git
synced 2025-09-25 22:14:09 -04:00
fix the number of components for the creative APU
This commit is contained in:
parent
8e70fe697f
commit
41a717fb2c
@ -1,11 +1,9 @@
|
|||||||
package li.cil.oc.integration.opencomputers
|
package li.cil.oc.integration.opencomputers
|
||||||
|
|
||||||
import li.cil.oc.Constants
|
import li.cil.oc.{Constants, Settings, api, common}
|
||||||
import li.cil.oc.api
|
|
||||||
import li.cil.oc.api.driver.EnvironmentProvider
|
import li.cil.oc.api.driver.EnvironmentProvider
|
||||||
import li.cil.oc.api.driver.item.HostAware
|
import li.cil.oc.api.driver.item.HostAware
|
||||||
import li.cil.oc.api.network.EnvironmentHost
|
import li.cil.oc.api.network.EnvironmentHost
|
||||||
import li.cil.oc.common
|
|
||||||
import li.cil.oc.common.Tier
|
import li.cil.oc.common.Tier
|
||||||
import li.cil.oc.common.item.Delegator
|
import li.cil.oc.common.item.Delegator
|
||||||
import li.cil.oc.server.component
|
import li.cil.oc.server.component
|
||||||
@ -26,6 +24,12 @@ object DriverAPU extends DriverCPU with HostAware {
|
|||||||
case _ => null
|
case _ => null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
override def supportedComponents(stack: ItemStack) = Delegator.subItem(stack) match {
|
||||||
|
// have to use GPU tier here because CPU tier is limited by 3, creative tier is special
|
||||||
|
case Some(apu: common.item.APU) => Settings.get.cpuComponentSupport(apu.gpuTier + 1)
|
||||||
|
case _ => Settings.get.cpuComponentSupport(1)
|
||||||
|
}
|
||||||
|
|
||||||
override def cpuTier(stack: ItemStack) =
|
override def cpuTier(stack: ItemStack) =
|
||||||
Delegator.subItem(stack) match {
|
Delegator.subItem(stack) match {
|
||||||
case Some(apu: common.item.APU) => apu.cpuTier
|
case Some(apu: common.item.APU) => apu.cpuTier
|
||||||
|
Loading…
x
Reference in New Issue
Block a user