using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using DM;
using HarmonyLib;
using Landfall.TABS;
using SLMA;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("Natfu")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("jntm")]
[assembly: AssemblyCopyright("Copyright © 2022")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("3a45c3cf-230c-4310-952f-0887d4266a22")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace WIP
{
public static class UManager
{
public static string modname;
public static string modder;
private static string com;
static UManager()
{
modname = "SFT";
modder = "FhpSlime";
}
public static void SetRiders(UnitBlueprint me, UnitBlueprint[] riders)
{
s.SetField<UnitBlueprint>(me, "Riders", (object)riders);
}
public static void EditBlueprint(UnitBlueprint unit, LandfallContentDatabase db)
{
}
public static void EditClothes(GameObject cloth, CharacterItem item, PropItemData data, Unit unit, int index, LandfallContentDatabase db)
{
//IL_0055: Unknown result type (might be due to invalid IL or missing references)
//IL_005b: Expected O, but got Unknown
Debug.Log((object)"Hey");
if (unit.unitBlueprint.Entity.Name == "unit name")
{
Renderer[] componentsInChildren = cloth.GetComponentsInChildren<Renderer>();
for (int i = 0; i < componentsInChildren.Length; i++)
{
componentsInChildren[i].materials = (Material[])(object)new Material[1] { (Material)SLMALoader.SDic["materials"]["Glow_Neon_Green_143734"] };
}
}
}
public static void EditProjectiles(GameObject proj, ProjectileHit projhit, Unit unit, LandfallContentDatabase db)
{
//IL_0023: Unknown result type (might be due to invalid IL or missing references)
//IL_002d: Unknown result type (might be due to invalid IL or missing references)
if (unit.unitBlueprint.Entity.Name == "unit name")
{
Transform transform = proj.transform;
transform.localScale *= 3f;
}
}
public static void EditCombatMoves(GameObject move, int index, Unit unit, LandfallContentDatabase db)
{
//IL_004e: Unknown result type (might be due to invalid IL or missing references)
//IL_0053: Unknown result type (might be due to invalid IL or missing references)
//IL_0064: 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_007a: Unknown result type (might be due to invalid IL or missing references)
//IL_007f: Unknown result type (might be due to invalid IL or missing references)
//IL_0090: Unknown result type (might be due to invalid IL or missing references)
//IL_0095: Unknown result type (might be due to invalid IL or missing references)
//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
//IL_00ab: Unknown result type (might be due to invalid IL or missing references)
//IL_00b0: Unknown result type (might be due to invalid IL or missing references)
//IL_00ba: Expected O, but got Unknown
if (unit.unitBlueprint.Entity.Name == "unit name" && Object.op_Implicit((Object)(object)move.GetComponentInChildren<DodgeMove>()))
{
move.GetComponentInChildren<DodgeMove>().moves[0].forceCurve = new AnimationCurve((Keyframe[])(object)new Keyframe[5]
{
new Keyframe(0f, 1f),
new Keyframe(1f, -2f),
new Keyframe(2f, 5f),
new Keyframe(6f, -16f),
new Keyframe(8f, 0f)
});
}
}
public static void CodeAfterSpawn(Unit unit, LandfallContentDatabase db)
{
//IL_0028: Unknown result type (might be due to invalid IL or missing references)
//IL_0032: Unknown result type (might be due to invalid IL or missing references)
if (unit.unitBlueprint.Entity.Name == "unit name")
{
Transform head = unit.data.head;
head.localScale *= 2f;
}
}
public static void Init(LandfallContentDatabase db)
{
//IL_002b: Unknown result type (might be due to invalid IL or missing references)
//IL_003f: Unknown result type (might be due to invalid IL or missing references)
//IL_004a: Expected O, but got Unknown
//IL_004a: Expected O, but got Unknown
//IL_0063: Unknown result type (might be due to invalid IL or missing references)
//IL_0077: Unknown result type (might be due to invalid IL or missing references)
//IL_0082: Expected O, but got Unknown
//IL_0082: Expected O, but got Unknown
//IL_009b: Unknown result type (might be due to invalid IL or missing references)
//IL_00af: Unknown result type (might be due to invalid IL or missing references)
//IL_00ba: Expected O, but got Unknown
//IL_00ba: Expected O, but got Unknown
//IL_00d3: Unknown result type (might be due to invalid IL or missing references)
//IL_00e7: Unknown result type (might be due to invalid IL or missing references)
//IL_00f2: Expected O, but got Unknown
//IL_00f2: Expected O, but got Unknown
//IL_010b: Unknown result type (might be due to invalid IL or missing references)
//IL_011f: Unknown result type (might be due to invalid IL or missing references)
//IL_012a: Expected O, but got Unknown
//IL_012a: Expected O, but got Unknown
//IL_0143: Unknown result type (might be due to invalid IL or missing references)
//IL_0157: Unknown result type (might be due to invalid IL or missing references)
//IL_0162: Expected O, but got Unknown
//IL_0162: Expected O, but got Unknown
//IL_017b: Unknown result type (might be due to invalid IL or missing references)
//IL_018f: Unknown result type (might be due to invalid IL or missing references)
//IL_019a: Expected O, but got Unknown
//IL_019a: Expected O, but got Unknown
//IL_01b3: Unknown result type (might be due to invalid IL or missing references)
//IL_01c7: Unknown result type (might be due to invalid IL or missing references)
//IL_01d2: Expected O, but got Unknown
//IL_01d2: Expected O, but got Unknown
//IL_01eb: Unknown result type (might be due to invalid IL or missing references)
//IL_01ff: Unknown result type (might be due to invalid IL or missing references)
//IL_020a: Expected O, but got Unknown
//IL_020a: Expected O, but got Unknown
//IL_0223: Unknown result type (might be due to invalid IL or missing references)
//IL_0237: Unknown result type (might be due to invalid IL or missing references)
//IL_0242: Expected O, but got Unknown
//IL_0242: Expected O, but got Unknown
//IL_025b: Unknown result type (might be due to invalid IL or missing references)
//IL_026f: Unknown result type (might be due to invalid IL or missing references)
//IL_027a: Expected O, but got Unknown
//IL_027a: Expected O, but got Unknown
//IL_0293: Unknown result type (might be due to invalid IL or missing references)
//IL_02a7: Unknown result type (might be due to invalid IL or missing references)
//IL_02b2: Expected O, but got Unknown
//IL_02b2: Expected O, but got Unknown
//IL_02cb: Unknown result type (might be due to invalid IL or missing references)
//IL_02df: Unknown result type (might be due to invalid IL or missing references)
//IL_02ea: Expected O, but got Unknown
//IL_02ea: Expected O, but got Unknown
//IL_0303: Unknown result type (might be due to invalid IL or missing references)
//IL_0317: Unknown result type (might be due to invalid IL or missing references)
//IL_0322: Expected O, but got Unknown
//IL_0322: Expected O, but got Unknown
//IL_033b: Unknown result type (might be due to invalid IL or missing references)
//IL_034f: Unknown result type (might be due to invalid IL or missing references)
//IL_035a: Expected O, but got Unknown
//IL_035a: Expected O, but got Unknown
//IL_0373: Unknown result type (might be due to invalid IL or missing references)
//IL_0387: Unknown result type (might be due to invalid IL or missing references)
//IL_0392: Expected O, but got Unknown
//IL_0392: Expected O, but got Unknown
//IL_03ab: Unknown result type (might be due to invalid IL or missing references)
//IL_03bf: Unknown result type (might be due to invalid IL or missing references)
//IL_03ca: Expected O, but got Unknown
//IL_03ca: Expected O, but got Unknown
//IL_03e3: Unknown result type (might be due to invalid IL or missing references)
//IL_03f7: Unknown result type (might be due to invalid IL or missing references)
//IL_0402: Expected O, but got Unknown
//IL_0402: Expected O, but got Unknown
//IL_041b: Unknown result type (might be due to invalid IL or missing references)
//IL_042f: Unknown result type (might be due to invalid IL or missing references)
//IL_043a: Expected O, but got Unknown
//IL_043a: Expected O, but got Unknown
//IL_0453: Unknown result type (might be due to invalid IL or missing references)
//IL_0467: Unknown result type (might be due to invalid IL or missing references)
//IL_0472: Expected O, but got Unknown
//IL_0472: Expected O, but got Unknown
//IL_048b: Unknown result type (might be due to invalid IL or missing references)
//IL_049f: Unknown result type (might be due to invalid IL or missing references)
//IL_04aa: Expected O, but got Unknown
//IL_04aa: Expected O, but got Unknown
//IL_04c3: Unknown result type (might be due to invalid IL or missing references)
//IL_04d7: Unknown result type (might be due to invalid IL or missing references)
//IL_04e2: Expected O, but got Unknown
//IL_04e2: Expected O, but got Unknown
//IL_04fb: Unknown result type (might be due to invalid IL or missing references)
//IL_050f: Unknown result type (might be due to invalid IL or missing references)
//IL_051a: Expected O, but got Unknown
//IL_051a: Expected O, but got Unknown
//IL_0533: Unknown result type (might be due to invalid IL or missing references)
//IL_0547: Unknown result type (might be due to invalid IL or missing references)
//IL_0552: Expected O, but got Unknown
//IL_0552: Expected O, but got Unknown
//IL_056b: Unknown result type (might be due to invalid IL or missing references)
//IL_057f: Unknown result type (might be due to invalid IL or missing references)
//IL_058a: Expected O, but got Unknown
//IL_058a: Expected O, but got Unknown
//IL_05a3: Unknown result type (might be due to invalid IL or missing references)
//IL_05b7: Unknown result type (might be due to invalid IL or missing references)
//IL_05c2: Expected O, but got Unknown
//IL_05c2: Expected O, but got Unknown
//IL_05db: Unknown result type (might be due to invalid IL or missing references)
//IL_05ef: Unknown result type (might be due to invalid IL or missing references)
//IL_05fa: Expected O, but got Unknown
//IL_05fa: Expected O, but got Unknown
//IL_0613: Unknown result type (might be due to invalid IL or missing references)
//IL_0627: Unknown result type (might be due to invalid IL or missing references)
//IL_0632: Expected O, but got Unknown
//IL_0632: Expected O, but got Unknown
//IL_064b: Unknown result type (might be due to invalid IL or missing references)
//IL_065f: Unknown result type (might be due to invalid IL or missing references)
//IL_066a: Expected O, but got Unknown
//IL_066a: Expected O, but got Unknown
//IL_0683: Unknown result type (might be due to invalid IL or missing references)
//IL_0697: Unknown result type (might be due to invalid IL or missing references)
//IL_06a2: Expected O, but got Unknown
//IL_06a2: Expected O, but got Unknown
//IL_06bb: Unknown result type (might be due to invalid IL or missing references)
//IL_06cf: Unknown result type (might be due to invalid IL or missing references)
//IL_06da: Expected O, but got Unknown
//IL_06da: Expected O, but got Unknown
//IL_06f3: Unknown result type (might be due to invalid IL or missing references)
//IL_0707: Unknown result type (might be due to invalid IL or missing references)
//IL_0712: Expected O, but got Unknown
//IL_0712: Expected O, but got Unknown
//IL_072b: Unknown result type (might be due to invalid IL or missing references)
//IL_073f: Unknown result type (might be due to invalid IL or missing references)
//IL_074a: Expected O, but got Unknown
//IL_074a: Expected O, but got Unknown
//IL_0763: Unknown result type (might be due to invalid IL or missing references)
//IL_0777: Unknown result type (might be due to invalid IL or missing references)
//IL_0782: Expected O, but got Unknown
//IL_0782: Expected O, but got Unknown
//IL_079b: Unknown result type (might be due to invalid IL or missing references)
//IL_07af: Unknown result type (might be due to invalid IL or missing references)
//IL_07ba: Expected O, but got Unknown
//IL_07ba: Expected O, but got Unknown
//IL_07d3: Unknown result type (might be due to invalid IL or missing references)
//IL_07e7: Unknown result type (might be due to invalid IL or missing references)
//IL_07f2: Expected O, but got Unknown
//IL_07f2: Expected O, but got Unknown
//IL_080b: Unknown result type (might be due to invalid IL or missing references)
//IL_081f: Unknown result type (might be due to invalid IL or missing references)
//IL_082a: Expected O, but got Unknown
//IL_082a: Expected O, but got Unknown
//IL_0843: Unknown result type (might be due to invalid IL or missing references)
//IL_0857: Unknown result type (might be due to invalid IL or missing references)
//IL_0862: Expected O, but got Unknown
//IL_0862: Expected O, but got Unknown
//IL_087b: Unknown result type (might be due to invalid IL or missing references)
//IL_088f: Unknown result type (might be due to invalid IL or missing references)
//IL_089a: Expected O, but got Unknown
//IL_089a: Expected O, but got Unknown
//IL_08b3: Unknown result type (might be due to invalid IL or missing references)
//IL_08c7: Unknown result type (might be due to invalid IL or missing references)
//IL_08d2: Expected O, but got Unknown
//IL_08d2: Expected O, but got Unknown
//IL_08eb: Unknown result type (might be due to invalid IL or missing references)
//IL_08ff: Unknown result type (might be due to invalid IL or missing references)
//IL_090a: Expected O, but got Unknown
//IL_090a: Expected O, but got Unknown
//IL_0923: Unknown result type (might be due to invalid IL or missing references)
//IL_0937: Unknown result type (might be due to invalid IL or missing references)
//IL_0942: Expected O, but got Unknown
//IL_0942: Expected O, but got Unknown
//IL_095b: Unknown result type (might be due to invalid IL or missing references)
//IL_096f: Unknown result type (might be due to invalid IL or missing references)
//IL_097a: Expected O, but got Unknown
//IL_097a: Expected O, but got Unknown
//IL_0993: Unknown result type (might be due to invalid IL or missing references)
//IL_09a7: Unknown result type (might be due to invalid IL or missing references)
//IL_09b2: Expected O, but got Unknown
//IL_09b2: Expected O, but got Unknown
//IL_09cb: Unknown result type (might be due to invalid IL or missing references)
//IL_09df: Unknown result type (might be due to invalid IL or missing references)
//IL_09ea: Expected O, but got Unknown
//IL_09ea: Expected O, but got Unknown
//IL_0a03: Unknown result type (might be due to invalid IL or missing references)
//IL_0a17: Unknown result type (might be due to invalid IL or missing references)
//IL_0a22: Expected O, but got Unknown
//IL_0a22: Expected O, but got Unknown
//IL_0a3b: Unknown result type (might be due to invalid IL or missing references)
//IL_0a4f: Unknown result type (might be due to invalid IL or missing references)
//IL_0a5a: Expected O, but got Unknown
//IL_0a5a: Expected O, but got Unknown
//IL_0a73: Unknown result type (might be due to invalid IL or missing references)
//IL_0a87: Unknown result type (might be due to invalid IL or missing references)
//IL_0a92: Expected O, but got Unknown
//IL_0a92: Expected O, but got Unknown
//IL_0aab: Unknown result type (might be due to invalid IL or missing references)
//IL_0abf: Unknown result type (might be due to invalid IL or missing references)
//IL_0aca: Expected O, but got Unknown
//IL_0aca: Expected O, but got Unknown
//IL_0ae3: Unknown result type (might be due to invalid IL or missing references)
//IL_0af7: Unknown result type (might be due to invalid IL or missing references)
//IL_0b02: Expected O, but got Unknown
//IL_0b02: Expected O, but got Unknown
//IL_0b1b: Unknown result type (might be due to invalid IL or missing references)
//IL_0b2f: Unknown result type (might be due to invalid IL or missing references)
//IL_0b3a: Expected O, but got Unknown
//IL_0b3a: Expected O, but got Unknown
//IL_0b53: Unknown result type (might be due to invalid IL or missing references)
//IL_0b67: Unknown result type (might be due to invalid IL or missing references)
//IL_0b72: Expected O, but got Unknown
//IL_0b72: Expected O, but got Unknown
//IL_0b8b: Unknown result type (might be due to invalid IL or missing references)
//IL_0b9f: Unknown result type (might be due to invalid IL or missing references)
//IL_0baa: Expected O, but got Unknown
//IL_0baa: Expected O, but got Unknown
//IL_0bc3: Unknown result type (might be due to invalid IL or missing references)
//IL_0bd7: Unknown result type (might be due to invalid IL or missing references)
//IL_0be2: Expected O, but got Unknown
//IL_0be2: Expected O, but got Unknown
//IL_0bfb: Unknown result type (might be due to invalid IL or missing references)
//IL_0c0f: Unknown result type (might be due to invalid IL or missing references)
//IL_0c1a: Expected O, but got Unknown
//IL_0c1a: Expected O, but got Unknown
//IL_0c33: Unknown result type (might be due to invalid IL or missing references)
//IL_0c47: Unknown result type (might be due to invalid IL or missing references)
//IL_0c52: Expected O, but got Unknown
//IL_0c52: Expected O, but got Unknown
//IL_0c6b: Unknown result type (might be due to invalid IL or missing references)
//IL_0c7f: Unknown result type (might be due to invalid IL or missing references)
//IL_0c8a: Expected O, but got Unknown
//IL_0c8a: Expected O, but got Unknown
//IL_0ca3: Unknown result type (might be due to invalid IL or missing references)
//IL_0cb7: Unknown result type (might be due to invalid IL or missing references)
//IL_0cc2: Expected O, but got Unknown
//IL_0cc2: Expected O, but got Unknown
//IL_0cdb: Unknown result type (might be due to invalid IL or missing references)
//IL_0cef: Unknown result type (might be due to invalid IL or missing references)
//IL_0cfa: Expected O, but got Unknown
//IL_0cfa: Expected O, but got Unknown
//IL_0d13: Unknown result type (might be due to invalid IL or missing references)
//IL_0d27: Unknown result type (might be due to invalid IL or missing references)
//IL_0d32: Expected O, but got Unknown
//IL_0d32: Expected O, but got Unknown
//IL_0d4b: Unknown result type (might be due to invalid IL or missing references)
//IL_0d5f: Unknown result type (might be due to invalid IL or missing references)
//IL_0d6a: Expected O, but got Unknown
//IL_0d6a: Expected O, but got Unknown
//IL_0d83: Unknown result type (might be due to invalid IL or missing references)
//IL_0d97: Unknown result type (might be due to invalid IL or missing references)
//IL_0da2: Expected O, but got Unknown
//IL_0da2: Expected O, but got Unknown
//IL_0dbb: Unknown result type (might be due to invalid IL or missing references)
//IL_0dcf: Unknown result type (might be due to invalid IL or missing references)
//IL_0dda: Expected O, but got Unknown
//IL_0dda: Expected O, but got Unknown
//IL_0df3: Unknown result type (might be due to invalid IL or missing references)
//IL_0e07: Unknown result type (might be due to invalid IL or missing references)
//IL_0e12: Expected O, but got Unknown
//IL_0e12: Expected O, but got Unknown
SLMATool.CreateFaction("WIP", (UnitBlueprint[])null, (Sprite)null, 493);
SLMATool.AddUnitToFaction((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_WIP_ICEKING"], (Faction)SLMATool.SLMADic["WIP"], -1);
SLMATool.AddUnitToFaction((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_WIP_ZORO"], (Faction)SLMATool.SLMADic["WIP"], -1);
SLMATool.AddUnitToFaction((UnitBlueprint)SLMALoader.SDic["blueprints"]["CustomWobbler"], (Faction)SLMATool.SLMADic["WIP"], -1);
SLMATool.AddUnitToFaction((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_WIP_CUSTOMHALFLING"], (Faction)SLMATool.SLMADic["WIP"], -1);
SLMATool.AddUnitToFaction((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_WIP_CELESTIAL"], (Faction)SLMATool.SLMADic["WIP"], -1);
SLMATool.AddUnitToFaction((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_WIP_CUSTOMCLAM"], (Faction)SLMATool.SLMADic["WIP"], -1);
SLMATool.AddUnitToFaction((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_WIP_ELEPHANTRIDER"], (Faction)SLMATool.SLMADic["WIP"], -1);
SLMATool.AddUnitToFaction((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_WIP_BARREL_ROLLER"], (Faction)SLMATool.SLMADic["WIP"], -1);
SLMATool.AddUnitToFaction((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_WIP_LEG_CHICKEN"], (Faction)SLMATool.SLMADic["WIP"], -1);
SLMATool.AddUnitToFaction((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_WIP_TANK"], (Faction)SLMATool.SLMADic["WIP"], -1);
SLMATool.AddUnitToFaction((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_WIP_CUSTOMSNAKE"], (Faction)SLMATool.SLMADic["WIP"], -1);
SLMATool.AddUnitToFaction((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_WIP_CUSTOMSTIFFY"], (Faction)SLMATool.SLMADic["WIP"], -1);
SLMATool.AddUnitToFaction((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_WIP_ARCHER_LIGHTNING"], (Faction)SLMATool.SLMADic["WIP"], -1);
SLMATool.AddUnitToFaction((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_WIP_STICK"], (Faction)SLMATool.SLMADic["WIP"], -1);
SLMATool.AddUnitToFaction((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_WIP_THROWER_KNIFE"], (Faction)SLMATool.SLMADic["WIP"], -1);
SLMATool.AddUnitToFaction((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_WIP_SHOVEL"], (Faction)SLMATool.SLMADic["WIP"], -1);
SLMATool.AddUnitToFaction((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_WIP_SQUIRE_1"], (Faction)SLMATool.SLMADic["WIP"], -1);
SLMATool.AddUnitToFaction((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_WIP_SHIELD_FAN"], (Faction)SLMATool.SLMADic["WIP"], -1);
SLMATool.AddUnitToFaction((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_WIP_ASSASSIN"], (Faction)SLMATool.SLMADic["WIP"], -1);
SLMATool.AddUnitToFaction((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_WIP_BUSINESSMAN"], (Faction)SLMATool.SLMADic["WIP"], -1);
SLMATool.AddUnitToFaction((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_WIP_CUSTOMRAPTOR"], (Faction)SLMATool.SLMADic["WIP"], -1);
SLMATool.AddUnitToFaction((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_WIP_CHAKRAM"], (Faction)SLMATool.SLMADic["WIP"], -1);
SLMATool.AddUnitToFaction((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_WIP_DOUBLESWORD"], (Faction)SLMATool.SLMADic["WIP"], -1);
SLMATool.AddUnitToFaction((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_WIP_FOREL"], (Faction)SLMATool.SLMADic["WIP"], -1);
SLMATool.AddUnitToFaction((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_WIP_SPIDERMAGE"], (Faction)SLMATool.SLMADic["WIP"], -1);
SLMATool.AddUnitToFaction((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_WIP_THROWER_BIRD"], (Faction)SLMATool.SLMADic["WIP"], -1);
SLMATool.AddUnitToFaction((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_WIP_WOLVERINE"], (Faction)SLMATool.SLMADic["WIP"], -1);
SLMATool.AddUnitToFaction((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_WIP_BLINKDAGGER"], (Faction)SLMATool.SLMADic["WIP"], -1);
SLMATool.AddUnitToFaction((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_WIP_PLAGUEDOCTOR"], (Faction)SLMATool.SLMADic["WIP"], -1);
SLMATool.AddUnitToFaction((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_WIP_SPIDERMAGE"], (Faction)SLMATool.SLMADic["WIP"], -1);
SLMATool.AddUnitToFaction((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_WIP_SMALL_TANK_EVIL"], (Faction)SLMATool.SLMADic["WIP"], -1);
SLMATool.AddUnitToFaction((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_WIP_ZORRO"], (Faction)SLMATool.SLMADic["WIP"], -1);
SLMATool.AddUnitToFaction((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_WIP_CHAKRAM_THROWER"], (Faction)SLMATool.SLMADic["WIP"], -1);
SLMATool.AddUnitToFaction((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_WIP_CUSTOMHORSE"], (Faction)SLMATool.SLMADic["WIP"], -1);
SLMATool.AddUnitToFaction((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_WIP_MINIGUN"], (Faction)SLMATool.SLMADic["WIP"], -1);
SLMATool.AddUnitToFaction((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_WIP_CENTAUR"], (Faction)SLMATool.SLMADic["WIP"], -1);
SLMATool.AddUnitToFaction((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_WIP_TAUREN"], (Faction)SLMATool.SLMADic["WIP"], -1);
SLMATool.AddUnitToFaction((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_WIP_CIRCLEWEAPON"], (Faction)SLMATool.SLMADic["WIP"], -1);
SLMATool.AddUnitToFaction((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_WIP_FIRE_ELEMENTALIST"], (Faction)SLMATool.SLMADic["WIP"], -1);
SLMATool.AddUnitToFaction((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_WIP_BREWMASTER"], (Faction)SLMATool.SLMADic["WIP"], -1);
SLMATool.AddUnitToFaction((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_WIP_ROCK_ELEMENTALIST"], (Faction)SLMATool.SLMADic["WIP"], -1);
SLMATool.AddUnitToFaction((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_WIP_BINKDOUBLE"], (Faction)SLMATool.SLMADic["WIP"], -1);
SLMATool.AddUnitToFaction((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_WIP_BEAR"], (Faction)SLMATool.SLMADic["WIP"], -1);
SLMATool.AddUnitToFaction((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_WIP_HUNTER"], (Faction)SLMATool.SLMADic["WIP"], -1);
SLMATool.AddUnitToFaction((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_WIP_LEG_CHICKENMAN"], (Faction)SLMATool.SLMADic["WIP"], -1);
SLMATool.AddUnitToFaction((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_WIP_PEGAMAN"], (Faction)SLMATool.SLMADic["WIP"], -1);
SLMATool.AddUnitToFaction((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_WIP_ARCHER_DARK"], (Faction)SLMATool.SLMADic["WIP"], -1);
SLMATool.AddUnitToFaction((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_WIP_ARCHER_SUPER"], (Faction)SLMATool.SLMADic["WIP"], -1);
SLMATool.AddUnitToFaction((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_WIP_PEGASUSRIDER"], (Faction)SLMATool.SLMADic["WIP"], -1);
SLMATool.AddUnitToFaction((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_WIP_VIKINGTANK"], (Faction)SLMATool.SLMADic["WIP"], -1);
SLMATool.AddUnitToFaction((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_WIP_THEUNTOUCHABLE"], (Faction)SLMATool.SLMADic["WIP"], -1);
SLMATool.AddUnitToFaction((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_WIP_MUSKET_GIANT"], (Faction)SLMATool.SLMADic["WIP"], -1);
SLMATool.AddUnitToFaction((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_WIP_CATAPULT_MAGNET"], (Faction)SLMATool.SLMADic["WIP"], -1);
SLMATool.AddUnitToFaction((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_WIP_CUSTOMMINOTAUR"], (Faction)SLMATool.SLMADic["WIP"], -1);
SLMATool.AddUnitToFaction((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_WIP_TROJAN_CHICKEN"], (Faction)SLMATool.SLMADic["WIP"], -1);
SLMATool.AddUnitToFaction((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_WIP_GATLINGGUNNEON"], (Faction)SLMATool.SLMADic["WIP"], -1);
SLMATool.AddUnitToFaction((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_WIP_CATAPULT_GRAVEL"], (Faction)SLMATool.SLMADic["WIP"], -1);
SLMATool.AddUnitToFaction((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_WIP_CATAPULT_BOUNCE"], (Faction)SLMATool.SLMADic["WIP"], -1);
SLMATool.AddUnitToFaction((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_WIP_CUSTOMMAMMOTH"], (Faction)SLMATool.SLMADic["WIP"], -1);
SLMATool.AddUnitToFaction((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_WIP_HORSE"], (Faction)SLMATool.SLMADic["WIP"], -1);
SLMATool.AddUnitToFaction((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_WIP_BOSS_2"], (Faction)SLMATool.SLMADic["WIP"], -1);
SLMATool.AddUnitToFaction((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_WIP_MAMMOTH_WITH_KING"], (Faction)SLMATool.SLMADic["WIP"], -1);
SLMATool.AddUnitToFaction((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_WIP_MAMMOTH_TANK"], (Faction)SLMATool.SLMADic["WIP"], -1);
SLMATool.AddUnitToFaction((UnitBlueprint)SLMALoader.SDic["blueprints"]["UNIT_WIP_CUSTOMICEGIANT"], (Faction)SLMATool.SLMADic["WIP"], -1);
}
public static void EditWeapons(GameObject weapon, Team team, Unit unit, MeleeWeapon melee, RangeWeapon range, LandfallContentDatabase db)
{
//IL_0051: Unknown result type (might be due to invalid IL or missing references)
//IL_0057: Expected O, but got Unknown
Debug.Log((object)weapon);
if (unit.unitBlueprint.Entity.Name == "unit name")
{
MeshRenderer[] componentsInChildren = weapon.GetComponentsInChildren<MeshRenderer>();
for (int i = 0; i < componentsInChildren.Length; i++)
{
((Renderer)componentsInChildren[i]).materials = (Material[])(object)new Material[1] { (Material)SLMALoader.SDic["materials"]["Glow_Neon_Red_212484"] };
}
range.numberOfObjects = 3;
range.spread = 12f;
}
}
}
[BepInPlugin("Natfu", "Natfu", "1.0.0")]
internal class Loader : BaseUnityPlugin
{
private void Awake()
{
((MonoBehaviour)this).StartCoroutine("call");
}
private IEnumerator call()
{
yield return (object)new WaitUntil((Func<bool>)(() => (Object)(object)Object.FindObjectOfType<ServiceLocator>() != (Object)null));
yield return (object)new WaitUntil((Func<bool>)(() => ServiceLocator.GetService<ISaveLoaderService>() != null));
yield return (object)new WaitForSecondsRealtime(0.3f);
SLMALoader.GetInstance();
LandfallContentDatabase landfallContentDatabase = ContentDatabase.Instance().LandfallContentDatabase;
UManager.Init(landfallContentDatabase);
new Harmony(UManager.modname).PatchAll();
GOSLMA.EditWeapons = ((GOSLMA.EditWeapons == null) ? new Action<GameObject, Team, Unit, MeleeWeapon, RangeWeapon, LandfallContentDatabase>(UManager.EditWeapons) : ((Action<GameObject, Team, Unit, MeleeWeapon, RangeWeapon, LandfallContentDatabase>)Delegate.Combine(new Action<GameObject, Team, Unit, MeleeWeapon, RangeWeapon, LandfallContentDatabase>(UManager.EditWeapons), GOSLMA.EditWeapons)));
GOSLMA.EditClothes = ((GOSLMA.EditClothes == null) ? new Action<GameObject, CharacterItem, PropItemData, Unit, int, LandfallContentDatabase>(UManager.EditClothes) : ((Action<GameObject, CharacterItem, PropItemData, Unit, int, LandfallContentDatabase>)Delegate.Combine(new Action<GameObject, CharacterItem, PropItemData, Unit, int, LandfallContentDatabase>(UManager.EditClothes), GOSLMA.EditClothes)));
GOSLMA.EditCombatMoves = ((GOSLMA.EditCombatMoves == null) ? new Action<GameObject, int, Unit, LandfallContentDatabase>(UManager.EditCombatMoves) : ((Action<GameObject, int, Unit, LandfallContentDatabase>)Delegate.Combine(new Action<GameObject, int, Unit, LandfallContentDatabase>(UManager.EditCombatMoves), GOSLMA.EditCombatMoves)));
GOSLMA.CodeAfterSpawn = ((GOSLMA.CodeAfterSpawn == null) ? new Action<Unit, LandfallContentDatabase>(UManager.CodeAfterSpawn) : ((Action<Unit, LandfallContentDatabase>)Delegate.Combine(new Action<Unit, LandfallContentDatabase>(UManager.CodeAfterSpawn), GOSLMA.CodeAfterSpawn)));
GOSLMA.EditProjectiles = ((GOSLMA.EditProjectiles == null) ? new Action<GameObject, ProjectileHit, Unit, LandfallContentDatabase>(UManager.EditProjectiles) : ((Action<GameObject, ProjectileHit, Unit, LandfallContentDatabase>)Delegate.Combine(new Action<GameObject, ProjectileHit, Unit, LandfallContentDatabase>(UManager.EditProjectiles), GOSLMA.EditProjectiles)));
UnitBlueprint[] array = Resources.FindObjectsOfTypeAll<UnitBlueprint>();
for (int i = 0; i < array.Length; i++)
{
UManager.EditBlueprint(array[i], landfallContentDatabase);
}
Debug.Log((object)("Loaded " + UManager.modname + " Successfully"));
Debug.Log((object)(UManager.modname + "is made in SFT by FhpSlime"));
Debug.Log((object)(UManager.modder + "wished you a pleasant trip"));
}
}
}
public class Item : MonoBehaviour
{
public enum kind
{
Weapon,
Cloth,
Skill,
Unit,
Projectile,
Other
}
public string name;
public kind Kind;
}
namespace WIP
{
public class MyModItems : MonoBehaviour
{
private static Dictionary<string, Item> items;
private static MyModItems instance { get; set; }
public static MyModItems GetInstance()
{
//IL_0012: Unknown result type (might be due to invalid IL or missing references)
if ((Object)(object)instance == (Object)null)
{
instance = new GameObject("MyModItems").AddComponent<MyModItems>();
Object.DontDestroyOnLoad((Object)(object)instance);
}
return instance;
}
public void AddItem(Item item)
{
items.Add(item.name, item);
}
public Item GetItem(string name)
{
Item value = new Item
{
name = null,
Kind = Item.kind.Other
};
items.TryGetValue(name, out value);
return value;
}
}
}