-
Notifications
You must be signed in to change notification settings - Fork 79
Registering a Standalone Cyclops Status Icon
Introduced in the 5.2 update, you can now create status icons just like the Cyclops Chargers without having to make an actual charger.
Make sure you've read Creating a Standalone Cyclops Status Icon first!
Similar to Registering Upgrade Handlers,
you will use the MCUServices
class provided by MoreCyclopsUpgrades to register your status icon with the API.
using MoreCyclopsUpgrades.API;
namespace MyMod
{
// Your main patching class must have the QModCore attribute (and must be public)
[QModCore]
public static class MyInitializerClass
{
// Your patching method must have the QModPatch attribute (and must be public)
[QModPatch]
public static void MyInitializationMethod()
{
MCUServices.Register.CyclopsStatusIcon<MySubStatus>((SubRoot cyclops) => new MySubStatus(cyclops));
}
}
}
using MoreCyclopsUpgrades.API;
namespace MyMod
{
// Your main patching class must have the QModCore attribute (and must be public)
[QModCore]
public static class MyInitializerClass
{
// Your patching method must have the QModPatch attribute (and must be public)
[QModPatch]
public static void MyInitializationMethod()
{
MCUServices.Register.CyclopsStatusIcon<MySubStatus>(GetNewStatusIndicator);
}
}
internal static MySubStatus GetNewStatusIndicator(SubRoot cyclops)
{
return new MySubStatus(cyclops)
}
}
using MoreCyclopsUpgrades.API;
namespace MyMod
{
internal class MyStatusIconMaker : ICyclopsStatusIconCreator
{
public CyclopsStatusIcon GetNewStatusIndicator(SubRoot cyclops)
{
return new MySubStatus(cyclops)
}
}
// Your main patching class must have the QModCore attribute (and must be public)
[QModCore]
public static class MyInitializerClass
{
// Your patching method must have the QModPatch attribute (and must be public)
[QModPatch]
public static void MyInitializationMethod()
{
MCUServices.Register.CyclopsStatusIcon<MySubStatus>(MyStatusIconMaker);
}
}
}
CbItem Patching.dll
Text Pack Patching.txt
The Cyclops Upgrade Cycle
Single UpgradeHandlers
Grouped UpgradeHandlers
Registering UpgradeHandlers
Finding UpgradeHandlers
Creating Icon Overlays
Registering Icon Overlays
The Cyclops Charge Cycle
Creating Cyclops Chargers
Registering Cyclops Chargers
Finding Cyclops Chargers
Origin Story
Cyclops Manager Promises
Creating Your Manager
Registering Your Managers
Finding Auxiliary Managers