using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Logging;
using HarmonyLib;
using PluginConfig.API;
using PluginConfig.API.Decorators;
using PluginConfig.API.Fields;
using UnityEngine;
using UnityEngine.Animations;
using UnityEngine.Playables;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: IgnoresAccessChecksTo("Assembly-CSharp")]
[assembly: AssemblyCompany("UmamusumePlayermodels")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("UmamusumePlayermodels")]
[assembly: AssemblyTitle("UmamusumePlayermodels")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace UmamusumePlayermodels
{
[DefaultExecutionOrder(32000)]
internal class ArmPlayer : MonoBehaviour
{
private readonly List<AnimatorClipInfo> infos = new List<AnimatorClipInfo>();
private Animator source;
private string controller;
private PlayableGraph graph;
private AnimationLayerMixerPlayable layers;
internal void Setup(Animator v1, string name)
{
//IL_0035: Unknown result type (might be due to invalid IL or missing references)
//IL_003a: Unknown result type (might be due to invalid IL or missing references)
//IL_004d: Unknown result type (might be due to invalid IL or missing references)
//IL_005e: Unknown result type (might be due to invalid IL or missing references)
//IL_0063: Unknown result type (might be due to invalid IL or missing references)
//IL_0069: Unknown result type (might be due to invalid IL or missing references)
//IL_0074: Unknown result type (might be due to invalid IL or missing references)
//IL_007a: Unknown result type (might be due to invalid IL or missing references)
source = v1;
controller = name;
Animator val = ((Component)this).gameObject.GetComponent<Animator>();
if ((Object)(object)val == (Object)null)
{
val = ((Component)this).gameObject.AddComponent<Animator>();
}
graph = PlayableGraph.Create("UmaArm");
((PlayableGraph)(ref graph)).SetTimeUpdateMode((DirectorUpdateMode)3);
layers = AnimationLayerMixerPlayable.Create(graph, Mathf.Max(1, v1.layerCount));
PlayableOutputExtensions.SetSourcePlayable<AnimationPlayableOutput, AnimationLayerMixerPlayable>(AnimationPlayableOutput.Create(graph, "UmaArm", val), layers);
}
private void LateUpdate()
{
//IL_0151: Unknown result type (might be due to invalid IL or missing references)
//IL_0031: Unknown result type (might be due to invalid IL or missing references)
//IL_0037: Unknown result type (might be due to invalid IL or missing references)
//IL_003c: Unknown result type (might be due to invalid IL or missing references)
//IL_003d: Unknown result type (might be due to invalid IL or missing references)
//IL_0052: Unknown result type (might be due to invalid IL or missing references)
//IL_0058: Unknown result type (might be due to invalid IL or missing references)
//IL_005d: Unknown result type (might be due to invalid IL or missing references)
//IL_004b: Unknown result type (might be due to invalid IL or missing references)
//IL_007b: Unknown result type (might be due to invalid IL or missing references)
//IL_0080: Unknown result type (might be due to invalid IL or missing references)
//IL_008b: Unknown result type (might be due to invalid IL or missing references)
//IL_009d: Unknown result type (might be due to invalid IL or missing references)
//IL_00c7: Unknown result type (might be due to invalid IL or missing references)
//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
//IL_00ef: Unknown result type (might be due to invalid IL or missing references)
//IL_0106: Unknown result type (might be due to invalid IL or missing references)
//IL_0109: Unknown result type (might be due to invalid IL or missing references)
//IL_00d4: Unknown result type (might be due to invalid IL or missing references)
//IL_00d7: Unknown result type (might be due to invalid IL or missing references)
//IL_012e: Unknown result type (might be due to invalid IL or missing references)
if ((Object)(object)source == (Object)null || !((PlayableGraph)(ref graph)).IsValid() || !((Behaviour)source).isActiveAndEnabled)
{
return;
}
for (int i = 0; i < PlayableExtensions.GetInputCount<AnimationLayerMixerPlayable>(layers); i++)
{
Playable input = PlayableExtensions.GetInput<AnimationLayerMixerPlayable>(layers, i);
if (PlayableExtensions.IsValid<Playable>(input))
{
((PlayableGraph)(ref graph)).DestroySubgraph<Playable>(input);
}
AnimationMixerPlayable val = AnimationMixerPlayable.Create(graph, 0);
bool num = source.IsInTransition(i);
float num2;
if (!num)
{
num2 = 0f;
}
else
{
AnimatorTransitionInfo animatorTransitionInfo = source.GetAnimatorTransitionInfo(i);
num2 = ((AnimatorTransitionInfo)(ref animatorTransitionInfo)).normalizedTime;
}
float num3 = num2;
Add(val, i, next: false, 1f - num3);
if (num)
{
Add(val, i, next: true, num3);
}
float num4 = 0f;
for (int j = 0; j < PlayableExtensions.GetInputCount<AnimationMixerPlayable>(val); j++)
{
num4 += PlayableExtensions.GetInputWeight<AnimationMixerPlayable>(val, j);
}
for (int k = 0; k < PlayableExtensions.GetInputCount<AnimationMixerPlayable>(val); k++)
{
if (!(num4 > 1E-05f))
{
break;
}
PlayableExtensions.SetInputWeight<AnimationMixerPlayable>(val, k, PlayableExtensions.GetInputWeight<AnimationMixerPlayable>(val, k) / num4);
}
((PlayableGraph)(ref graph)).Connect<AnimationMixerPlayable, AnimationLayerMixerPlayable>(val, 0, layers, i);
float num5 = ((i == 0) ? 1f : source.GetLayerWeight(i));
PlayableExtensions.SetInputWeight<AnimationLayerMixerPlayable>(layers, i, (num4 > 1E-05f) ? num5 : 0f);
}
((PlayableGraph)(ref graph)).Evaluate(0f);
}
private void Add(AnimationMixerPlayable mixer, int layer, bool next, float weight)
{
//IL_0018: Unknown result type (might be due to invalid IL or missing references)
//IL_000a: Unknown result type (might be due to invalid IL or missing references)
//IL_001d: Unknown result type (might be due to invalid IL or missing references)
//IL_0065: Unknown result type (might be due to invalid IL or missing references)
//IL_006a: Unknown result type (might be due to invalid IL or missing references)
//IL_00bc: Unknown result type (might be due to invalid IL or missing references)
//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
//IL_00c7: Unknown result type (might be due to invalid IL or missing references)
//IL_00c9: Unknown result type (might be due to invalid IL or missing references)
//IL_00da: Unknown result type (might be due to invalid IL or missing references)
//IL_00e2: Unknown result type (might be due to invalid IL or missing references)
//IL_00f2: Unknown result type (might be due to invalid IL or missing references)
//IL_00f5: Unknown result type (might be due to invalid IL or missing references)
//IL_00fe: Unknown result type (might be due to invalid IL or missing references)
AnimatorStateInfo val = (next ? source.GetNextAnimatorStateInfo(layer) : source.GetCurrentAnimatorStateInfo(layer));
infos.Clear();
if (next)
{
source.GetNextAnimatorClipInfo(layer, infos);
}
else
{
source.GetCurrentAnimatorClipInfo(layer, infos);
}
foreach (AnimatorClipInfo info in infos)
{
AnimatorClipInfo current = info;
AnimationClip val2 = UmamusumePlayermodelsPlugin.Clip(controller, ((Object)((AnimatorClipInfo)(ref current)).clip).name);
if (!((Object)(object)val2 == (Object)null))
{
float normalizedTime = ((AnimatorStateInfo)(ref val)).normalizedTime;
normalizedTime = (((Motion)((AnimatorClipInfo)(ref current)).clip).isLooping ? (normalizedTime - Mathf.Floor(normalizedTime)) : Mathf.Clamp01(normalizedTime));
AnimationClipPlayable val3 = AnimationClipPlayable.Create(graph, val2);
PlayableExtensions.SetTime<AnimationClipPlayable>(val3, (double)(normalizedTime * val2.length));
int inputCount = PlayableExtensions.GetInputCount<AnimationMixerPlayable>(mixer);
PlayableExtensions.SetInputCount<AnimationMixerPlayable>(mixer, inputCount + 1);
((PlayableGraph)(ref graph)).Connect<AnimationClipPlayable, AnimationMixerPlayable>(val3, 0, mixer, inputCount);
PlayableExtensions.SetInputWeight<AnimationMixerPlayable>(mixer, inputCount, ((AnimatorClipInfo)(ref current)).weight * weight);
}
}
}
private void OnDestroy()
{
if (((PlayableGraph)(ref graph)).IsValid())
{
((PlayableGraph)(ref graph)).Destroy();
}
}
}
[HarmonyPatch(typeof(FistControl), "ResetFists")]
internal static class FistControlResetFistsPatch
{
private static void Postfix(FistControl __instance)
{
ArmReplacer.ApplyFists(__instance);
}
}
internal class ArmMap
{
internal string shoulder;
internal string elbow;
internal string wrist;
internal string palmMiddle;
internal string palmIndex;
internal string palmPinky;
}
internal class ArmSwap : MonoBehaviour
{
internal readonly List<Renderer> hidden = new List<Renderer>();
private void OnDestroy()
{
foreach (Renderer item in hidden)
{
if ((Object)(object)item != (Object)null)
{
item.enabled = true;
}
}
}
}
internal static class ArmReplacer
{
internal const string LeftArm = "LeftArm";
internal const string RightArm = "RightArm";
internal static Character Current = Character.OguriCap;
private const string WrapperName = "UmaArmRoot";
private const string GunArmMesh = "RightArm";
private const float SweepInterval = 0.5f;
private const int BlueArm = 0;
private const int RedArm = 1;
private static readonly ArmMap Blue = new ArmMap
{
shoulder = "UpperArm",
elbow = "Forearm",
wrist = "Hand",
palmMiddle = "Middle_01",
palmIndex = "Index_01",
palmPinky = "Pinky_01"
};
private static readonly ArmMap Red = new ArmMap
{
shoulder = "upperarm",
elbow = "lowerarm",
wrist = "wrist",
palmMiddle = null,
palmIndex = "index.1",
palmPinky = "pinkie.1"
};
private static readonly ArmMap Green = new ArmMap
{
shoulder = "upperarm",
elbow = "lowerarm",
wrist = "wrist",
palmMiddle = "middle.001",
palmIndex = "index.1",
palmPinky = "pinkie.001"
};
private static readonly ArmMap Gun = new ArmMap
{
shoulder = "Upper Arm",
elbow = "Forearm",
wrist = "Hand",
palmMiddle = "Finger_Middle_Base",
palmIndex = "Finger_Index_Base",
palmPinky = "Finger_Little_Base"
};
internal static IEnumerator SweepForever()
{
WaitForSeconds wait = new WaitForSeconds(0.5f);
while (true)
{
SweepGuns();
yield return wait;
}
}
internal static void Refresh(Character character)
{
Current = character;
ArmSwap[] array = Object.FindObjectsOfType<ArmSwap>(true);
for (int i = 0; i < array.Length; i++)
{
Object.DestroyImmediate((Object)(object)((Component)array[i]).gameObject);
}
ApplyFists(MonoSingleton<FistControl>.Instance);
SweepGuns();
}
internal static void ApplyFists(FistControl fists)
{
if ((Object)(object)fists == (Object)null)
{
return;
}
GameObject prefab = UmamusumePlayermodelsPlugin.Arm(Current, "LeftArm");
int num = Mathf.Min(fists.spawnedArms.Count, fists.spawnedArmNums.Count);
for (int i = 0; i < num; i++)
{
GameObject val = fists.spawnedArms[i];
if (!((Object)(object)val == (Object)null))
{
if (fists.spawnedArmNums[i] == 0)
{
ReplaceFist(val.transform, prefab, Blue, null);
}
else if (fists.spawnedArmNums[i] == 1)
{
ReplaceFist(val.transform, prefab, Red, null);
}
}
}
HookArm instance = MonoSingleton<HookArm>.Instance;
if ((Object)(object)instance != (Object)null && ReplaceFist(((Component)instance).transform, prefab, Green, instance.hookModel) && (Object)(object)instance.inspectLr != (Object)null)
{
instance.inspectLr.widthMultiplier = 0f;
}
}
private static void SweepGuns()
{
GunControl instance = MonoSingleton<GunControl>.Instance;
if ((Object)(object)instance == (Object)null)
{
return;
}
SkinnedMeshRenderer[] componentsInChildren = ((Component)instance).GetComponentsInChildren<SkinnedMeshRenderer>(true);
foreach (SkinnedMeshRenderer val in componentsInChildren)
{
if (((Renderer)val).enabled && !((Object)(object)val.sharedMesh == (Object)null) && !(((Object)val.sharedMesh).name != "RightArm"))
{
Attach(val, UmamusumePlayermodelsPlugin.Arm(Current, "RightArm"), Gun);
}
}
}
private static bool ReplaceFist(Transform arm, GameObject prefab, ArmMap map, GameObject keep)
{
if ((Object)(object)((Component)arm).GetComponentInChildren<ArmPlayer>(true) != (Object)null)
{
return true;
}
SkinnedMeshRenderer[] componentsInChildren = ((Component)arm).GetComponentsInChildren<SkinnedMeshRenderer>(true);
foreach (SkinnedMeshRenderer val in componentsInChildren)
{
if (!((Renderer)val).enabled || !Resolve(val, map))
{
continue;
}
ArmSwap armSwap = Attach(val, prefab, map);
if ((Object)(object)armSwap == (Object)null)
{
return false;
}
Renderer[] componentsInChildren2 = ((Component)arm).GetComponentsInChildren<Renderer>(true);
foreach (Renderer val2 in componentsInChildren2)
{
if (val2.enabled && (val2 is SkinnedMeshRenderer || val2 is MeshRenderer) && !((Component)val2).transform.IsChildOf(((Component)armSwap).transform) && (!((Object)(object)keep != (Object)null) || !((Component)val2).transform.IsChildOf(keep.transform)))
{
val2.enabled = false;
armSwap.hidden.Add(val2);
}
}
return true;
}
return false;
}
private static ArmSwap Attach(SkinnedMeshRenderer original, GameObject prefab, ArmMap map)
{
//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
//IL_00c3: Unknown result type (might be due to invalid IL or missing references)
if ((Object)(object)prefab == (Object)null)
{
return null;
}
Transform parent = ((Component)original).transform.parent;
if ((Object)(object)parent == (Object)null || (Object)(object)parent.Find("UmaArmRoot") != (Object)null)
{
return null;
}
if (!Resolve(original, map))
{
return null;
}
Animator val = null;
Transform val2 = ((Component)original).transform;
while ((Object)(object)val2 != (Object)null && (Object)(object)val == (Object)null)
{
Animator component = ((Component)val2).GetComponent<Animator>();
if ((Object)(object)component != (Object)null && (Object)(object)component.runtimeAnimatorController != (Object)null)
{
val = component;
}
val2 = val2.parent;
}
string text = Controller(val);
if (text == null)
{
return null;
}
GameObject val3 = Object.Instantiate<GameObject>(prefab, parent, false);
((Object)val3).name = "UmaArmRoot";
val3.transform.localPosition = Vector3.zero;
val3.transform.localRotation = Quaternion.identity;
int layer = ((Component)original).gameObject.layer;
Transform[] componentsInChildren = val3.GetComponentsInChildren<Transform>(true);
for (int i = 0; i < componentsInChildren.Length; i++)
{
((Component)componentsInChildren[i]).gameObject.layer = layer;
}
Renderer[] componentsInChildren2 = val3.GetComponentsInChildren<Renderer>(true);
foreach (Renderer to in componentsInChildren2)
{
MatchRenderer((Renderer)(object)original, to);
}
val3.AddComponent<ArmPlayer>().Setup(val, text);
ArmSwap armSwap = val3.AddComponent<ArmSwap>();
((Renderer)original).enabled = false;
armSwap.hidden.Add((Renderer)(object)original);
return armSwap;
}
private static string Controller(Animator animator)
{
//IL_0015: Unknown result type (might be due to invalid IL or missing references)
if ((Object)(object)animator == (Object)null)
{
return null;
}
RuntimeAnimatorController runtimeAnimatorController = animator.runtimeAnimatorController;
while (runtimeAnimatorController is AnimatorOverrideController)
{
runtimeAnimatorController = ((AnimatorOverrideController)runtimeAnimatorController).runtimeAnimatorController;
}
if ((Object)(object)runtimeAnimatorController == (Object)null || runtimeAnimatorController.animationClips.Length == 0)
{
return null;
}
AnimationClip[] animationClips = runtimeAnimatorController.animationClips;
foreach (AnimationClip val in animationClips)
{
if ((Object)(object)val != (Object)null && (Object)(object)UmamusumePlayermodelsPlugin.Clip(((Object)runtimeAnimatorController).name, ((Object)val).name) != (Object)null)
{
return ((Object)runtimeAnimatorController).name;
}
}
return null;
}
private static bool Resolve(SkinnedMeshRenderer renderer, ArmMap map)
{
Dictionary<string, Transform> dictionary = new Dictionary<string, Transform>();
Transform[] bones = renderer.bones;
foreach (Transform val in bones)
{
if ((Object)(object)val == (Object)null)
{
continue;
}
if (!dictionary.ContainsKey(((Object)val).name))
{
dictionary[((Object)val).name] = val;
}
for (int j = 0; j < val.childCount; j++)
{
Transform child = val.GetChild(j);
if (!dictionary.ContainsKey(((Object)child).name))
{
dictionary[((Object)child).name] = child;
}
}
}
if (dictionary.ContainsKey(map.shoulder) && dictionary.ContainsKey(map.elbow) && dictionary.ContainsKey(map.wrist) && dictionary.ContainsKey(map.palmIndex))
{
return dictionary.ContainsKey(map.palmPinky);
}
return false;
}
private static void MatchRenderer(Renderer from, Renderer to)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_000e: Unknown result type (might be due to invalid IL or missing references)
//IL_0026: Unknown result type (might be due to invalid IL or missing references)
to.lightProbeUsage = from.lightProbeUsage;
to.reflectionProbeUsage = from.reflectionProbeUsage;
to.probeAnchor = from.probeAnchor;
to.shadowCastingMode = from.shadowCastingMode;
to.receiveShadows = from.receiveShadows;
to.renderingLayerMask = from.renderingLayerMask;
}
}
[BepInPlugin("com.achelia.umamusumeplayermodels", "Umamusume Playermodels", "1.0.0")]
[BepInDependency(/*Could not decode attribute arguments.*/)]
public class UmamusumePlayermodelsPlugin : BaseUnityPlugin
{
public const string PluginGuid = "com.achelia.umamusumeplayermodels";
public const string PluginName = "Umamusume Playermodels";
public const string PluginVersion = "1.0.0";
private const string BundleFile = "umaplayermodels";
internal static ManualLogSource Log;
private static readonly Dictionary<string, GameObject> Arms = new Dictionary<string, GameObject>();
private static readonly Dictionary<string, AnimationClip> Clips = new Dictionary<string, AnimationClip>();
private static AssetBundle bundle;
private Harmony harmony;
private void Awake()
{
//IL_0029: Unknown result type (might be due to invalid IL or missing references)
//IL_0033: Expected O, but got Unknown
Log = ((BaseUnityPlugin)this).Logger;
if (LoadBundle())
{
UmaConfig.Build();
ArmReplacer.Current = UmaConfig.Selected;
harmony = new Harmony("com.achelia.umamusumeplayermodels");
harmony.PatchAll(Assembly.GetExecutingAssembly());
((MonoBehaviour)this).StartCoroutine(ArmReplacer.SweepForever());
Log.LogInfo((object)"Umamusume Playermodels loaded successfully.");
}
}
private void OnDestroy()
{
if (harmony != null)
{
harmony.UnpatchSelf();
}
}
internal static GameObject Arm(Character character, string side)
{
string text = character.ToString() + "_" + side;
if (Arms.TryGetValue(text, out var value))
{
return value;
}
value = bundle.LoadAsset<GameObject>(text);
if ((Object)(object)value == (Object)null)
{
Log.LogWarning((object)("Arm model '" + text + "' missing from the bundle."));
}
Arms[text] = value;
return value;
}
internal static AnimationClip Clip(string controller, string clip)
{
string text = controller + "|" + clip;
if (Clips.TryGetValue(text, out var value))
{
return value;
}
value = bundle.LoadAsset<AnimationClip>(text);
Clips[text] = value;
return value;
}
private bool LoadBundle()
{
string text = Path.Combine(Path.GetDirectoryName(((BaseUnityPlugin)this).Info.Location), "umaplayermodels");
if (!File.Exists(text))
{
Log.LogError((object)("Asset bundle not found at " + text));
return false;
}
bundle = AssetBundle.LoadFromFile(text);
if ((Object)(object)bundle == (Object)null)
{
Log.LogError((object)("Asset bundle at " + text + " could not be opened."));
return false;
}
return true;
}
}
public enum Character
{
AdmireGroove,
AdmireVega,
AgnesDigital,
AirGroove,
AirMessiah,
AirShakur,
AlmondEye,
AstonMachan,
BambooMemory,
Believe,
BikoPegasus,
BiwaHayahide,
BlastOnepiece,
BubbleGumFellow,
BuenaVista,
CalstoneLightO,
CasinoDrive,
Cesario,
ChevalGrand,
ChronoGenesis,
CopanoRickey,
CurrenBouquetdOr,
CurrenChan,
DaiichiRuby,
DaitakuHelios,
DaiwaScarlet,
DantsuFlame,
DaringHeart,
DaringTact,
DreamJourney,
Duramente,
Durandal,
Efforia,
EishinFlash,
ElCondorPasa,
Epiphaneia,
EspoirCity,
Fenomeno,
FineMotion,
ForeverYoung,
FujiKiseki,
Furioso,
FusaichiPandora,
Gentildonna,
GoldCity,
GoldShip,
GranAlegria,
GrassWonder,
HaruUrara,
HishiAkebono,
HishiAmazon,
HishiMiracle,
HokkoTarumae,
IkunoDictus,
InariOne,
InesFujin,
JunglePocket,
KSMiracle,
KatsuragiAce,
KawakamiPrincess,
KingHalo,
Kiseki,
KitasanBlack,
Logotype,
LovesOnlyYou,
LuckyLilac,
ManhattanCafe,
MarcheLorraine,
Maruzensky,
MarvelousSunday,
Matikanefukukitaru,
Matikanetannhauser,
MayanoTopGun,
MeishoDoto,
MejiroArdan,
MejiroBright,
MejiroDober,
MejiroMcQueen,
MejiroPalmer,
MejiroRamonu,
MejiroRyan,
MihonoBourbon,
MrCB,
NakayamaFesta,
NaritaBrian,
NaritaTaishin,
NaritaTopRoad,
NiceNature,
NishinoFlower,
NoReason,
NorthFlight,
OguriCap,
Orfevre,
Phalaenopsis,
RedDesire,
RheinKraft,
RiceShower,
RoseKingdom,
RoyceAndRoyce,
Rulership,
SakuraBakushinO,
SakuraChitoseO,
SakuraChiyonoO,
SakuraLaurel,
SamsonBig,
SatonoCrown,
SeekingThePearl,
SeiunSky,
ShinkoWindy,
SilenceSuzuka,
SiriusSymboli,
SmartFalcon,
SoundsOfEarth,
SpecialWeek,
StayGold,
StillInLove,
SuperCreek,
SweepTosho,
SymboliKrisS,
SymboliRudolf,
TMOperaO,
TaikiShuttle,
TamamoCross,
TaninoGimlet,
TapDanceCity,
Titleholder,
TokaiTeio,
TosenJordan,
Transcend,
TsurumaruTsuyoshi,
TwinTurbo,
Verxina,
VictoirePisa,
Vivlos,
Vodka,
WinMarilyn,
WinVariation,
WinningTicket,
WonderAcute,
YaenoMuteki,
YamaninZephyr,
YukinoBijin,
ZennoRobRoy
}
internal static class UmaConfig
{
private static readonly Dictionary<Character, string> DisplayNames = new Dictionary<Character, string>
{
{
Character.AdmireGroove,
"Admire Groove"
},
{
Character.AdmireVega,
"Admire Vega"
},
{
Character.AgnesDigital,
"Agnes Digital"
},
{
Character.AirGroove,
"Air Groove"
},
{
Character.AirMessiah,
"Air Messiah"
},
{
Character.AirShakur,
"Air Shakur"
},
{
Character.AlmondEye,
"Almond Eye"
},
{
Character.AstonMachan,
"Aston Machan"
},
{
Character.BambooMemory,
"Bamboo Memory"
},
{
Character.BikoPegasus,
"Biko Pegasus"
},
{
Character.BiwaHayahide,
"Biwa Hayahide"
},
{
Character.BlastOnepiece,
"Blast Onepiece"
},
{
Character.BubbleGumFellow,
"Bubble Gum Fellow"
},
{
Character.BuenaVista,
"Buena Vista"
},
{
Character.CalstoneLightO,
"Calstone Light O"
},
{
Character.CasinoDrive,
"Casino Drive"
},
{
Character.ChevalGrand,
"Cheval Grand"
},
{
Character.ChronoGenesis,
"Chrono Genesis"
},
{
Character.CopanoRickey,
"Copano Rickey"
},
{
Character.CurrenBouquetdOr,
"Curren Bouquetd'or"
},
{
Character.CurrenChan,
"Curren Chan"
},
{
Character.DaiichiRuby,
"Daiichi Ruby"
},
{
Character.DaitakuHelios,
"Daitaku Helios"
},
{
Character.DaiwaScarlet,
"Daiwa Scarlet"
},
{
Character.DantsuFlame,
"Dantsu Flame"
},
{
Character.DaringHeart,
"Daring Heart"
},
{
Character.DaringTact,
"Daring Tact"
},
{
Character.DreamJourney,
"Dream Journey"
},
{
Character.EishinFlash,
"Eishin Flash"
},
{
Character.ElCondorPasa,
"El Condor Pasa"
},
{
Character.EspoirCity,
"Espoir City"
},
{
Character.FineMotion,
"Fine Motion"
},
{
Character.ForeverYoung,
"Forever Young"
},
{
Character.FujiKiseki,
"Fuji Kiseki"
},
{
Character.FusaichiPandora,
"Fusaichi Pandora"
},
{
Character.GoldCity,
"Gold City"
},
{
Character.GoldShip,
"Gold Ship"
},
{
Character.GranAlegria,
"Gran Alegria"
},
{
Character.GrassWonder,
"Grass Wonder"
},
{
Character.HaruUrara,
"Haru Urara"
},
{
Character.HishiAkebono,
"Hishi Akebono"
},
{
Character.HishiAmazon,
"Hishi Amazon"
},
{
Character.HishiMiracle,
"Hishi Miracle"
},
{
Character.HokkoTarumae,
"Hokko Tarumae"
},
{
Character.IkunoDictus,
"Ikuno Dictus"
},
{
Character.InariOne,
"Inari One"
},
{
Character.InesFujin,
"Ines Fujin"
},
{
Character.JunglePocket,
"Jungle Pocket"
},
{
Character.KSMiracle,
"K.S.Miracle"
},
{
Character.KatsuragiAce,
"Katsuragi Ace"
},
{
Character.KawakamiPrincess,
"Kawakami Princess"
},
{
Character.KingHalo,
"King Halo"
},
{
Character.KitasanBlack,
"Kitasan Black"
},
{
Character.LovesOnlyYou,
"Loves Only You"
},
{
Character.LuckyLilac,
"Lucky Lilac"
},
{
Character.ManhattanCafe,
"Manhattan Cafe"
},
{
Character.MarcheLorraine,
"Marche Lorraine"
},
{
Character.MarvelousSunday,
"Marvelous Sunday"
},
{
Character.MayanoTopGun,
"Mayano Top Gun"
},
{
Character.MeishoDoto,
"Meisho Doto"
},
{
Character.MejiroArdan,
"Mejiro Ardan"
},
{
Character.MejiroBright,
"Mejiro Bright"
},
{
Character.MejiroDober,
"Mejiro Dober"
},
{
Character.MejiroMcQueen,
"Mejiro McQueen"
},
{
Character.MejiroPalmer,
"Mejiro Palmer"
},
{
Character.MejiroRamonu,
"Mejiro Ramonu"
},
{
Character.MejiroRyan,
"Mejiro Ryan"
},
{
Character.MihonoBourbon,
"Mihono Bourbon"
},
{
Character.MrCB,
"Mr. C.B."
},
{
Character.NakayamaFesta,
"Nakayama Festa"
},
{
Character.NaritaBrian,
"Narita Brian"
},
{
Character.NaritaTaishin,
"Narita Taishin"
},
{
Character.NaritaTopRoad,
"Narita Top Road"
},
{
Character.NiceNature,
"Nice Nature"
},
{
Character.NishinoFlower,
"Nishino Flower"
},
{
Character.NoReason,
"No Reason"
},
{
Character.NorthFlight,
"North Flight"
},
{
Character.OguriCap,
"Oguri Cap"
},
{
Character.RedDesire,
"Red Desire"
},
{
Character.RheinKraft,
"Rhein Kraft"
},
{
Character.RiceShower,
"Rice Shower"
},
{
Character.RoseKingdom,
"Rose Kingdom"
},
{
Character.RoyceAndRoyce,
"Royce and Royce"
},
{
Character.SakuraBakushinO,
"Sakura Bakushin O"
},
{
Character.SakuraChitoseO,
"Sakura Chitose O"
},
{
Character.SakuraChiyonoO,
"Sakura Chiyono O"
},
{
Character.SakuraLaurel,
"Sakura Laurel"
},
{
Character.SamsonBig,
"Samson Big"
},
{
Character.SatonoCrown,
"Satono Crown"
},
{
Character.SeekingThePearl,
"Seeking the Pearl"
},
{
Character.SeiunSky,
"Seiun Sky"
},
{
Character.ShinkoWindy,
"Shinko Windy"
},
{
Character.SilenceSuzuka,
"Silence Suzuka"
},
{
Character.SiriusSymboli,
"Sirius Symboli"
},
{
Character.SmartFalcon,
"Smart Falcon"
},
{
Character.SoundsOfEarth,
"Sounds of Earth"
},
{
Character.SpecialWeek,
"Special Week"
},
{
Character.StayGold,
"Stay Gold"
},
{
Character.StillInLove,
"Still in Love"
},
{
Character.SuperCreek,
"Super Creek"
},
{
Character.SweepTosho,
"Sweep Tosho"
},
{
Character.SymboliKrisS,
"Symboli Kris S"
},
{
Character.SymboliRudolf,
"Symboli Rudolf"
},
{
Character.TMOperaO,
"T.M. Opera O"
},
{
Character.TaikiShuttle,
"Taiki Shuttle"
},
{
Character.TamamoCross,
"Tamamo Cross"
},
{
Character.TaninoGimlet,
"Tanino Gimlet"
},
{
Character.TapDanceCity,
"Tap Dance City"
},
{
Character.TokaiTeio,
"Tokai Teio"
},
{
Character.TosenJordan,
"Tosen Jordan"
},
{
Character.TsurumaruTsuyoshi,
"Tsurumaru Tsuyoshi"
},
{
Character.TwinTurbo,
"Twin Turbo"
},
{
Character.VictoirePisa,
"Victoire Pisa"
},
{
Character.WinMarilyn,
"Win Marilyn"
},
{
Character.WinVariation,
"Win Variation"
},
{
Character.WinningTicket,
"Winning Ticket"
},
{
Character.WonderAcute,
"Wonder Acute"
},
{
Character.YaenoMuteki,
"Yaeno Muteki"
},
{
Character.YamaninZephyr,
"Yamanin Zephyr"
},
{
Character.YukinoBijin,
"Yukino Bijin"
},
{
Character.ZennoRobRoy,
"Zenno Rob Roy"
}
};
private const string IconResource = "UmamusumePlayermodels.Resources.icon.png";
private static PluginConfigurator configurator;
private static EnumField<Character> character;
internal static Character Selected => character.value;
private static Sprite LoadIcon()
{
//IL_0032: Unknown result type (might be due to invalid IL or missing references)
//IL_0038: Expected O, but got Unknown
//IL_005e: Unknown result type (might be due to invalid IL or missing references)
//IL_006d: Unknown result type (might be due to invalid IL or missing references)
using Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("UmamusumePlayermodels.Resources.icon.png");
if (stream == null)
{
return null;
}
byte[] array = new byte[stream.Length];
stream.Read(array, 0, array.Length);
Texture2D val = new Texture2D(2, 2);
if (!ImageConversion.LoadImage(val, array))
{
return null;
}
return Sprite.Create(val, new Rect(0f, 0f, (float)((Texture)val).width, (float)((Texture)val).height), new Vector2(0.5f, 0.5f));
}
internal static void Build()
{
//IL_00c3: Unknown result type (might be due to invalid IL or missing references)
configurator = PluginConfigurator.Create("Umamusume Playermodels", "com.achelia.umamusumeplayermodels");
configurator.image = LoadIcon();
character = new EnumField<Character>(configurator.rootPanel, "Character", "character", Character.OguriCap);
foreach (KeyValuePair<Character, string> displayName in DisplayNames)
{
character.SetEnumDisplayName(displayName.Key, displayName.Value);
}
character.onValueChange += delegate(EnumValueChangeEvent<Character> e)
{
ArmReplacer.Refresh(e.value);
};
new ConfigHeader(configurator.rootPanel, "Restart your current level for best results after changing your character", 16);
}
}
}
namespace System.Runtime.CompilerServices
{
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
internal sealed class IgnoresAccessChecksToAttribute : Attribute
{
internal IgnoresAccessChecksToAttribute(string assemblyName)
{
}
}
}