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.Configuration;
using LethalLib.Modules;
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 = "")]
[assembly: AssemblyCompany("PrideFlags")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyDescription("Adds a bunch of little pride flags to the scrap pile")]
[assembly: AssemblyFileVersion("0.0.5.0")]
[assembly: AssemblyInformationalVersion("0.0.5")]
[assembly: AssemblyProduct("PrideFlags")]
[assembly: AssemblyTitle("PrideFlags")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.5.0")]
[module: UnverifiableCode]
namespace PrideFlags
{
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInPlugin("envy.prideFlags", "Pride Flags", "0.0.6")]
public class Plugin : BaseUnityPlugin
{
private const string PLUGIN_GUID = "envy.prideFlags";
private const string PLUGIN_NAME = "Pride Flags";
private const string PLUGIN_VERSION = "0.0.6";
public static Plugin instance;
public static ConfigEntry<int> PrideFlagSpawnRates;
public static ConfigEntry<int> TransFlagSpawnRates;
public static ConfigEntry<int> BiFlagSpawnRates;
public static ConfigEntry<int> NBFlagSpawnRates;
public static ConfigEntry<int> GayFlagSpawnRates;
public static ConfigEntry<int> PanFlagSpawnRates;
public static ConfigEntry<int> PridePopperSpawnRates;
public static ConfigEntry<int> TransPopperSpawnRates;
public static ConfigEntry<int> BiPopperSpawnRates;
public static ConfigEntry<int> NBPopperSpawnRates;
public void Awake()
{
List<int> list = new List<int>();
list.Add((PrideFlagSpawnRates = ((BaseUnityPlugin)this).Config.Bind<int>("Spawn Rates", "PrideCardSpawnRate", 30, "Changes the frequency of how many of the small Pride Flag Cards appear with a value between 0-100")).Value);
list.Add((TransFlagSpawnRates = ((BaseUnityPlugin)this).Config.Bind<int>("Spawn Rates", "TransPrideFlagSpawnRate", 30, "Changes the frequency of how many of the Trans Pride Flags appear with a value between 0-100")).Value);
list.Add((BiFlagSpawnRates = ((BaseUnityPlugin)this).Config.Bind<int>("Spawn Rates", "BiPrideFlagSpawnRate", 30, "Changes the frequency of how many of the Bisexual Pride Flags appear with a value between 0-100")).Value);
list.Add((NBFlagSpawnRates = ((BaseUnityPlugin)this).Config.Bind<int>("Spawn Rates", "NBPrideFlagSpawnRate", 30, "Changes the frequency of how many of the Non-Binary Pride Flags appear with a value between 0-100")).Value);
list.Add((GayFlagSpawnRates = ((BaseUnityPlugin)this).Config.Bind<int>("Spawn Rates", "GayPrideFlagSpawnRate", 30, "Changes the frequency of how many of the Gay Pride Flags appear with a value between 0-100")).Value);
list.Add((PanFlagSpawnRates = ((BaseUnityPlugin)this).Config.Bind<int>("Spawn Rates", "PanPrideFlagSpawnRate", 30, "Changes the frequency of how many of the Pansexual Pride Flags appear with a value between 0-100")).Value);
list.Add((PridePopperSpawnRates = ((BaseUnityPlugin)this).Config.Bind<int>("Spawn Rates", "PridePopperSpawnRate", 30, "Changes the frequency of how many of the Pride Party Poppers appear with a value between 0-100")).Value);
list.Add((TransPopperSpawnRates = ((BaseUnityPlugin)this).Config.Bind<int>("Spawn Rates", "TransPopperSpawnRate", 30, "Changes the frequency of how many of the Trans Pride Party Poppers appear with a value between 0-100")).Value);
list.Add((BiPopperSpawnRates = ((BaseUnityPlugin)this).Config.Bind<int>("Spawn Rates", "BiPopperSpawnRate", 30, "Changes the frequency of how many of the Bisexual Pride Party Poppers appear with a value between 0-100")).Value);
list.Add((NBPopperSpawnRates = ((BaseUnityPlugin)this).Config.Bind<int>("Spawn Rates", "NBPopperSpawnRate", 30, "Changes the frequency of how many of the Non-Binary Pride Party Poppers appear with a value between 0-100")).Value);
instance = this;
((BaseUnityPlugin)this).Logger.LogInfo((object)"Plugin envy.prideFlags is loaded!");
string text = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "prideflagitemmod");
AssetBundle val = AssetBundle.LoadFromFile(text);
List<Item> itemsList = val.LoadAsset<AllItemsList>("Assets/Pride Flags/PrideScrap.asset").itemsList;
for (int i = 0; i < itemsList.Count; i++)
{
if ((Object)(object)itemsList[i] != (Object)null)
{
NetworkPrefabs.RegisterNetworkPrefab(itemsList[i].spawnPrefab);
Utilities.FixMixerGroups(itemsList[i].spawnPrefab);
Items.RegisterScrap(itemsList[i], list[i], (LevelTypes)(-1));
}
}
UnlockablesList val2 = val.LoadAsset<UnlockablesList>("Assets/Pride Flags/WallFlagsList.asset");
TerminalNodesList val3 = val.LoadAsset<TerminalNodesList>("Assets/Pride Flags/WallFlagNodes.asset");
TerminalNode val4 = null;
UnlockableItem val5 = null;
for (int j = 0; j < val2.unlockables.Count; j++)
{
if (val2.unlockables[j] != null)
{
val5 = val2.unlockables[j];
val4 = val3.terminalNodes[j];
NetworkPrefabs.RegisterNetworkPrefab(val5.prefabObject);
Utilities.FixMixerGroups(val5.prefabObject);
Unlockables.RegisterUnlockable(val5, (StoreType)2, (TerminalNode)null, (TerminalNode)null, val4, 50);
}
}
((BaseUnityPlugin)this).Logger.LogInfo((object)"Patched envy.prideFlags");
}
}
}
namespace PrideFlags.Behavior
{
internal class PlayConfetti : PhysicsProp
{
public ParticleSystem ps;
public AudioSource ap;
public override void ItemActivate(bool used, bool buttonDown = true)
{
((GrabbableObject)this).ItemActivate(used, buttonDown);
if (buttonDown)
{
if (!ps.isPlaying)
{
ps.Play();
ap.Play();
}
else if (ps.isPlaying)
{
ps.Stop();
}
}
}
}
}