PR #6 restored four Create-side peripheral subclasses (CreativeMotorPeripheral, SpeedControllerPeripheral, SpeedGaugePeripheral, StressGaugePeripheral) and the ComputerBehaviourMixin entries that route Create's blocks through them. They exist solely to add the SCADA pack on top of Create's built-in peripheral methods.
This is a load-bearing hack: CC: Tweaked's GenericSource only fills in for block entities that have no IPeripheral. Create already registers an IPeripheral for these four blocks, so KineticSource never reaches them — hence the subclass + mixin override.
Costs:
- Four subclasses Avionics has to keep in sync with Create's API surface (
setGeneratedSpeed/getGeneratedSpeed, scroll-value access, etc.).
- A mixin that intercepts
ComputerBehaviour.getPeripheralFor — fragile against Create internal refactors.
- The same SCADA pack methods exist via the
KineticScadaSurface interface, but only because each subclass extends KineticPeripheral. The interface is the right abstraction; the subclasses are the wrong way to apply it here.
Ideas to explore:
- Upstream a CC API change that lets a
GenericSource compose onto an existing IPeripheral instead of only being a fallback. Cleanest if it lands.
- Lighter mixin that injects @LuaFunction-discoverable methods directly onto Create's peripheral classes (via
@At("RETURN") on getPeripheralFor to wrap the returned peripheral with a composite, or via mixin @Intrinsic on the class itself). Avoids the subclass-per-block model.
- Drop the subclasses entirely and document that SCADA is only available on bare kinetic BEs and Avionics/Aero/Sim-wrapped ones. Loses coverage on Speedometer/Stressometer/Motor/SpeedController — probably unacceptable.
Tracking so the temporary restoration in PR #6 doesn't become permanent by inertia.
PR #6 restored four Create-side peripheral subclasses (
CreativeMotorPeripheral,SpeedControllerPeripheral,SpeedGaugePeripheral,StressGaugePeripheral) and theComputerBehaviourMixinentries that route Create's blocks through them. They exist solely to add the SCADA pack on top of Create's built-in peripheral methods.This is a load-bearing hack: CC: Tweaked's
GenericSourceonly fills in for block entities that have noIPeripheral. Create already registers anIPeripheralfor these four blocks, soKineticSourcenever reaches them — hence the subclass + mixin override.Costs:
setGeneratedSpeed/getGeneratedSpeed, scroll-value access, etc.).ComputerBehaviour.getPeripheralFor— fragile against Create internal refactors.KineticScadaSurfaceinterface, but only because each subclass extendsKineticPeripheral. The interface is the right abstraction; the subclasses are the wrong way to apply it here.Ideas to explore:
GenericSourcecompose onto an existingIPeripheralinstead of only being a fallback. Cleanest if it lands.@At("RETURN")ongetPeripheralForto wrap the returned peripheral with a composite, or via mixin@Intrinsicon the class itself). Avoids the subclass-per-block model.Tracking so the temporary restoration in PR #6 doesn't become permanent by inertia.