Finding your Cyclops Charger - PrimeSonic/PrimeSonicSubnauticaMods GitHub Wiki

Because of the public members on the Cyclops Charger, you may want to reuse this data somewhere else in your mod.

One common example is linking a Cyclops Charger to a Cyclops Upgrade and displaying the info from the PDA Icon Overlay.

Finding your Cyclops Charger is made simple through MCUServices.

// Will return the requested Charger, by type, in the Cyclops SubRoot instance passed to it.
MyCharger charger = MCUServices.Find.CyclopsCharger<MyCharger>(subroot);

From here you can do all sorts of things with the data.
For sample code, check out the PDA Overlay system of the Cyclops Simple Solar Charger.

⚠️ **GitHub.com Fallback** ⚠️