Skip to content

Finding your Cyclops Charger

PrimeSonic edited this page Nov 26, 2020 · 1 revision

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.

Clone this wiki locally
  翻译: