Document the patches

This commit is contained in:
Terry Hearst 2023-09-08 00:24:00 -04:00
parent e3001bedfc
commit 554a83f994
3 changed files with 15 additions and 0 deletions

View file

@ -3,6 +3,9 @@ using System;
namespace CustomCosmeticLoader.Patches
{
/*
* Show your custom marble skin on the "My Marble" display on the main menu (if configured).
*/
[HarmonyPatch(typeof(MainMenuPanel), nameof(MainMenuPanel.SetupImages), new Type[] { typeof(bool) })]
internal class MainMenuPanelSetupImagesPatch
{

View file

@ -4,6 +4,10 @@ using UnityEngine;
namespace CustomCosmeticLoader.Patches
{
/*
* Hijack the cosmetic of the marble in single player. This doesn't apply the custom texture, just swaps out the
* marble with the designated marble to hijack.
*/
[HarmonyPatch(typeof(MarbleController), nameof(MarbleController.ApplyMyCosmetics))]
internal class MarbleControllerApplyMyCosmeticsPatch
{

View file

@ -18,6 +18,10 @@ namespace CustomCosmeticLoader.Patches
}
}
/*
* Applies the custom skin texture to the marble in both singleplayer and multiplayer, if the cosmetic chosen is the
* one we're hijacking. In multiplayer, do some extra checks to only apply the custom texture to our marble
*/
[HarmonyPatch(typeof(MarbleHolder), nameof(MarbleHolder.SetMarble))]
internal class MarbleHolderSetMarblePatch
{
@ -51,6 +55,10 @@ namespace CustomCosmeticLoader.Patches
}
}
/*
* In multiplayer, hijack the current marble and set it to be the marble we're hijacking. Later, the actual texture
* will be replaced by the patch above
*/
[HarmonyPatch(typeof(MarbleHolder), nameof(MarbleHolder.CheckSet))]
internal class MarbleHolderCheckSetPatch
{