using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Configuration;
using CSync.Extensions;
using CSync.Lib;
using LethalLib.Modules;
using Microsoft.CodeAnalysis;
using Unity.Netcode;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("hsrcatextralib")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("hsrcatextralib")]
[assembly: AssemblyTitle("hsrcatextralib")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace Microsoft.CodeAnalysis
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
internal sealed class EmbeddedAttribute : Attribute
{
}
}
namespace System.Runtime.CompilerServices
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
internal sealed class NullableAttribute : Attribute
{
public readonly byte[] NullableFlags;
public NullableAttribute(byte P_0)
{
NullableFlags = new byte[1] { P_0 };
}
public NullableAttribute(byte[] P_0)
{
NullableFlags = P_0;
}
}
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
internal sealed class NullableContextAttribute : Attribute
{
public readonly byte Flag;
public NullableContextAttribute(byte P_0)
{
Flag = P_0;
}
}
}
public class scrapaudio : NetworkBehaviour
{
public AudioSource audioSource;
public override void OnNetworkSpawn()
{
if (((NetworkBehaviour)this).IsServer)
{
PlaySoundClientRpc();
}
}
[ClientRpc]
private void PlaySoundClientRpc()
{
if ((Object)(object)audioSource != (Object)null)
{
audioSource.Play();
}
}
}
namespace HSRCatExtraLIB
{
[BepInPlugin("CraftyGlitches.HSRCatExtraLIB", "HSR Cat Extra LIB", "1.9.1")]
public class Plugin : BaseUnityPlugin
{
private const string GUID = "CraftyGlitches.HSRCatExtraLIB";
private const string NAME = "HSR Cat Extra LIB";
private const string VERSION = "1.9.1";
public static Plugin Instance;
public static CatCakeConfig config;
public static List<string> ItemAssets = new List<string>
{
"Assets/CatCake Assets/vag cake/vag cake.asset", "Assets/CatCake Assets/bronya/guardian cake.asset", "Assets/CatCake Assets/black swan/lavender mochi.asset", "Assets/CatCake Assets/mydei/spicy pomegranate cake.asset", "Assets/CatCake Assets/yingxing/sweet sesame.asset", "Assets/CatCake Assets/lynx/survival cake.asset", "Assets/CatCake Assets/robin/Harmonious Mochi.asset", "Assets/CatCake Assets/lygus/antikytheran cake.asset", "Assets/CatCake Assets/hanya/oracle cake.asset", "Assets/CatCake Assets/luocha/abundance cake.asset",
"Assets/CatCake Assets/fu xuan/sakura mochi.asset", "Assets/CatCake Assets/arlan/grape pudding.asset", "Assets/CatCake Assets/black swacheron/black swacheron.asset", "Assets/CatCake Assets/gepard/crystallised ice mochi.asset", "Assets/CatCake Assets/jiaoqiu/chef cake.asset", "Assets/CatCake Assets/boss aventurine/the gambler mochi.asset", "Assets/CatCake Assets/terrae/golden rice dumpling.asset", "Assets/CatCake Assets/cerydra/checkmate cake.asset", "Assets/CatCake Assets/gallagher/enigmatic snack.asset", "Assets/CatCake Assets/screwllum/intellitron cake.asset",
"Assets/CatCake Assets/huo huo/haunted mochi.asset", "Assets/CatCake Assets/sparkle/Mischievious Mochi.asset", "Assets/CatCake Assets/mina/scarlet cake.asset", "Assets/CatCake Assets/flame reaver/crumbling moonstone.asset", "Assets/CatCake Assets/baiheng/sweet cotton candy mochi.asset", "Assets/CatCake Assets/huge aventurine/Huge Gambler.asset", "Assets/CatCake Assets/yanqing/sweet mochi cake.asset", "Assets/CatCake Assets/fugue/sweet fireberry cake.asset", "Assets/CatCake Assets/rappa/Ninja Cake.asset", "Assets/CatCake Assets/welt/welt.asset",
"Assets/CatCake Assets/acheron/Nihility Cat Cake.asset", "Assets/CatCake Assets/luka/boxing mochi.asset", "Assets/CatCake Assets/tribbie daisy stack/tribbie daisy stack.asset", "Assets/CatCake Assets/jade/jade cake.asset", "Assets/CatCake Assets/Hyacine/Strawberry Swirl Cake.asset", "Assets/CatCake Assets/argenti/rose cake.asset", "Assets/CatCake Assets/boothill/mechanical cake.asset", "Assets/CatCake Assets/hunt march/pink blossom cake.asset", "Assets/CatCake Assets/sampo/Scammer Cake.asset", "Assets/CatCake Assets/cipher/Thievery Mochi.asset",
"Assets/CatCake Assets/yunli/Fireflame Cake.asset", "Assets/CatCake Assets/feixiao/whirlwind cake.asset", "Assets/CatCake Assets/sam/burnt oat cake roll.asset", "Assets/CatCake Assets/aglaea/marigold mochi.asset", "Assets/CatCake Assets/moze/shadow mochi.asset", "Assets/CatCake Assets/yaoshi/Sweet Abundance Cake.asset", "Assets/CatCake Assets/svarog/automated snack.asset", "Assets/CatCake Assets/anaxa/scholarly Snack.asset", "Assets/CatCake Assets/cerces/Golden Hibiscus.asset", "Assets/CatCake Assets/silverwolf/Gamer Snack.asset",
"Assets/CatCake Assets/himeko/coffee cake.asset", "Assets/CatCake Assets/sushang/Martial Mochi.asset", "Assets/CatCake Assets/evernight/dark ice cake.asset", "Assets/CatCake Assets/new sunday/Sweet Plum Pudding.asset", "Assets/CatCake Assets/tribbie/tribbie.asset", "Assets/CatCake Assets/crafty blade/big simp energy cake.asset", "Assets/CatCake Assets/natasha/doctor cake.asset", "Assets/CatCake Assets/hook/digger mochi.asset", "Assets/CatCake Assets/firefly/oat cake roll.asset", "Assets/CatCake Assets/sugilite/lilac rock candy.asset",
"Assets/CatCake Assets/family cake/family cake.asset", "Assets/CatCake Assets/skott/Red Velvet Cake.asset", "Assets/CatCake Assets/sunday/Halovian Cake.asset", "Assets/CatCake Assets/Nihility Acheron/True Nihility Cake.asset", "Assets/CatCake Assets/seele/Butterfly Mochi.asset", "Assets/CatCake Assets/cyrene/love cake.asset", "Assets/CatCake Assets/aventurine/Gambler Mochi.asset", "Assets/CatCake Assets/phainon/Moonstone Mochi.asset", "Assets/CatCake Assets/khaslana/eternal moonstone cake.asset", "Assets/CatCake Assets/misha/sweet dreams mochi.asset",
"Assets/CatCake Assets/cocolia/vanilla ice pudding.asset", "Assets/CatCake Assets/aha/confetti snack.asset", "Assets/CatCake Assets/mr reca/filmmaker snack.asset", "Assets/CatCake Assets/bailu/draconic snack.asset", "Assets/CatCake Assets/siobhan/Bubbly Mochi.asset", "Assets/CatCake Assets/xueyi/Xueyi Cat Cake.asset", "Assets/CatCake Assets/dr ratio/intelligent cake.asset", "Assets/CatCake Assets/craftyglitches/Snowdrop Mochi.asset", "Assets/CatCake Assets/craftyglitches 2/Refined Snowdrop Mochi.asset", "Assets/CatCake Assets/kakavasha/sweet honey slice.asset",
"Assets/CatCake Assets/tingyun/Amicassador Cat.asset", "Assets/CatCake Assets/hysilen/seasong blackberry cake.asset", "Assets/CatCake Assets/lingsha/sweet scented cake.asset", "Assets/CatCake Assets/castorice/nightbloom blossom cake.asset", "Assets/CatCake Assets/jingliu/mooncake snack.asset", "Assets/CatCake Assets/serval/Musical Mochi.asset", "Assets/CatCake Assets/dan feng/lotus cake.asset", "Assets/CatCake Assets/topaz/Financial Cat.asset", "Assets/CatCake Assets/the herta/the wisteria cake.asset", "Assets/CatCake Assets/asta/astronomy snack.asset",
"Assets/CatCake Assets/elio/destiny mochi.asset", "Assets/CatCake Assets/imbibitor lunae/azure flower cake.asset", "Assets/CatCake Assets/jing yuan/sleepy snack.asset", "Assets/CatCake Assets/yukong/sky soaring cake.asset", "Assets/CatCake Assets/pela/blueberry muffin.asset", "Assets/CatCake Assets/refined kafka/refined shader cat.asset", "Assets/CatCake Assets/chaos twins/chaos twins.asset", "Assets/CatCake Assets/doctor youre huge/doctor youre huge.asset", "Assets/CatCake Assets/aventurine youre huge/aventurine youre huge.asset", "Assets/CatCake Assets/birthday gambler/Birthday Gambler.asset"
};
public static List<Item> ItemList;
private void Awake()
{
Instance = this;
ItemList = new List<Item>();
string text = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "hsrcatextralib");
AssetBundle val = AssetBundle.LoadFromFile(text);
foreach (string itemAsset in ItemAssets)
{
Item val2 = val.LoadAsset<Item>(itemAsset);
if ((Object)(object)val2 == (Object)null)
{
Debug.LogError((object)(itemAsset + " is not accessible, please check your asset path again"));
}
else
{
ItemList.Add(val2);
}
}
config = new CatCakeConfig(((BaseUnityPlugin)this).Config);
foreach (KeyValuePair<Item, SyncedEntry<int>> item in CatCakeConfig.ItemRarity)
{
RegisterCatCakes(item.Key, SyncedEntry<int>.op_Implicit(item.Value));
ValidateShopItem(item.Key);
}
((BaseUnityPlugin)this).Logger.LogInfo((object)"CraftyGlitches.HSRCatExtraLIB is loaded ! ... Meow! Please feed us!");
}
private void RegisterCatCakes(Item item, int value)
{
GameObject spawnPrefab = item.spawnPrefab;
NetworkPrefabs.RegisterNetworkPrefab(spawnPrefab);
Utilities.FixMixerGroups(spawnPrefab);
if (item.itemName == "Destiny Mochi")
{
Items.RegisterScrap(item, value, (LevelTypes)12288);
}
else
{
Items.RegisterScrap(item, value, (LevelTypes)(-1));
}
}
private void ValidateShopItem(Item item)
{
List<string> list = new List<string> { "Nihility Cat Cake", "Gambler Mochi", "Sweet Sesame", "Harmonious Mochi", "Sleepy Snack" };
if (list.Contains(item.itemName))
{
TerminalNode val = ScriptableObject.CreateInstance<TerminalNode>();
val.clearPreviousText = true;
string text = "With the collaboration of Hertas Space Station, the trailblazer can happily provide this cute gelatinous creature as a companion for your lonely adventure. Where does it come from exactly? Don't ask too many questions! All credits goes to cat cake food...Zephy and Crafty suffered two days doing this, send us some help.......... ";
switch (item.itemName)
{
case "Nihility Cat Cake":
val.displayText = text + "For some reason if you stare long enough into this cats eyes, you feel something staring back. But whats the worst that could happen, right?";
break;
case "Gambler Mochi":
val.displayText = text + "This cat in particular seems extremely fond of gambling... if it encourages you to play, think twice! Or not.";
break;
case "Sweet Sesame":
val.displayText = text + "Totally not bias putting this cute cat here.";
break;
case "Harmonious Mochi":
val.displayText = text + "This cat sings beautiful tunes, could it be some sort of idol in another life?";
break;
case "Sleepy Snack":
val.displayText = text + "Sometimes I can't tell if this cat is dead or sleeping... it sleeps like a rock, but I suppose thats the charm!";
break;
}
Items.RegisterShopItem(item, (TerminalNode)null, (TerminalNode)null, val, Mathf.FloorToInt((float)Random.Range(100, 150)));
}
}
}
public class CatCakeConfig : SyncedConfig2<CatCakeConfig>
{
[field: SyncedEntryField]
public static Dictionary<Item, SyncedEntry<int>> ItemRarity { get; private set; }
public CatCakeConfig(ConfigFile config)
: base("CraftyGlitches.HSRCatExtraLIB")
{
ItemRarity = new Dictionary<Item, SyncedEntry<int>>();
List<string> list = new List<string> { "Sweet Sesame", "Destiny Mochi", "HugeGambler" };
foreach (Item item in Plugin.ItemList)
{
if (list.Contains(item.itemName))
{
switch (item.itemName)
{
case "Sweet Sesame":
ItemRarity[item] = SyncedBindingExtensions.BindSyncedEntry<int>(config, "Cat cake rarity", item.itemName ?? "", 30, "Changing rarity value for: " + item.itemName + ".\n\nEnter your desired value.\n\nYou can check the names of the cats on my thunderstore wiki page.");
break;
case "Destiny Mochi":
ItemRarity[item] = SyncedBindingExtensions.BindSyncedEntry<int>(config, "Cat cake rarity", item.itemName ?? "", 50, "Changing rarity value for: " + item.itemName + ".\n\nEnter your desired value.\n\nYou can check the names of the cats on my thunderstore wiki page.");
break;
case "HugeGambler":
ItemRarity[item] = SyncedBindingExtensions.BindSyncedEntry<int>(config, "Cat cake rarity", item.itemName ?? "", 5, "Changing rarity value for: " + item.itemName + ".\n\nEnter your desired value.\n\nYou can check the names of the cats on my thunderstore wiki page.");
break;
}
}
else
{
ItemRarity[item] = SyncedBindingExtensions.BindSyncedEntry<int>(config, "Cat cake rarity", item.itemName ?? "", 20, "Changing rarity value for: " + item.itemName + ".\n\nEnter your desired value.\n\nYou can check the names of the cats on my thunderstore wiki page.");
}
}
ConfigManager.Register<CatCakeConfig>((SyncedConfig2<CatCakeConfig>)(object)this);
}
public static void AssetLoader(List<string> list)
{
}
}
}
namespace hsrcatextralib.Behaviours
{
internal class CatHeal : PhysicsProp
{
public override void ItemActivate(bool used, bool buttonDown = true)
{
((GrabbableObject)this).ItemActivate(used, buttonDown);
if (buttonDown)
{
((GrabbableObject)this).playerHeldBy.health = 10;
}
}
}
}