Add comment + simplify syntax
This commit is contained in:
parent
af4ef66db5
commit
f0275dccf3
2 changed files with 5 additions and 2 deletions
|
@ -5,6 +5,9 @@ using UnityEngine;
|
|||
|
||||
namespace CustomCosmeticLoader.Patches
|
||||
{
|
||||
/*
|
||||
* Hijack the marble of a ghost marble if it's in our custom player list, and apply the custom texture
|
||||
*/
|
||||
[HarmonyPatch(typeof(GhostRaceMarbleController), nameof(GhostRaceMarbleController.ApplyCosmetics))]
|
||||
internal class GhostRaceMarbleControllerApplyCosmeticsPatch
|
||||
{
|
||||
|
|
|
@ -19,9 +19,9 @@ namespace CustomCosmeticLoader.Patches
|
|||
return true;
|
||||
|
||||
Cosmetic skin = Config.skinNameToHijack == "*" ?
|
||||
(CosmeticManager.MySkin == null ? CosmeticManager.Skins[0] : CosmeticManager.MySkin) :
|
||||
(CosmeticManager.MySkin ?? CosmeticManager.Skins[0]) :
|
||||
Shared.SkinToHijack;
|
||||
Cosmetic hat = CosmeticManager.MyHat == null ? CosmeticManager.Hats[0] : CosmeticManager.MyHat;
|
||||
Cosmetic hat = CosmeticManager.MyHat ?? CosmeticManager.Hats[0];
|
||||
|
||||
__instance.SetCosmetic(skin, hat);
|
||||
Shared.ApplyCustomTexture(__instance.cosmeticDisplay.gameObject);
|
||||
|
|
Loading…
Add table
Reference in a new issue