Skip to content

Registering a Cyclops Charger

PrimeSonic edited this page Nov 26, 2020 · 3 revisions

This is very similar to Registering Upgrade Handlers

Use the MCUServices Register method during your main Patching code

// Registered using a simple lambda expression
MCUServices.Register.CyclopsCharger<MyCyclopsCharger>((SubRoot cyclops) =>
{
    return new MyCyclopsCharger(cyclops);
});

That's all you need to do.
Assuming the code in your Cyclops Charger is fully self-contained and does not need anything else, you're done!

For sample code, you can check out the main patching code in the Cyclops Simple Solar Charger.