Decompiled source of TechnicalItems v1.0.19
TechnicalItems.dll
Decompiled 2 weeks ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; 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 FhpSLib; using HarmonyLib; using Landfall.TABC; using Landfall.TABS; using Landfall.TABS.AI.Components; using Landfall.TABS.UnitEditor; using SLMA; using TFBGames; using TI; using TIComponents; using Unity.Mathematics; using UnityEngine; using UnityEngine.Events; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("TechnicalItems")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("GeeztJeez")] [assembly: AssemblyProduct("TechnicalItems")] [assembly: AssemblyCopyright("Copyright © 4Ever")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("7acfaef0-7669-4401-8bff-5a9a02e18c75")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.19.0")] [module: UnverifiableCode] namespace TI { public static class Manager { public class InitManager { public static void InitClothings(Sprite icon, string itemCatName) { GameObject val = UTI.LoadGmObj("EmptyPropTechItem"); int startId = 10101000; comment = "----------------------------------------------------------------------------------------------------------------------------"; comment = "Custom Clothes"; comment = "----------------------------------------------------------------------------------------------------------------------------"; UTI.ICat.SetTag(UPool.MyPool.AddObject("SmartAdaptiveProjSpawner", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Ability, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("SmartKeepDistance", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Ability, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("RigScaleHead", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("RigScaleTorso", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("RigScaleLegLeft", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("RigScaleLegRight", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("RigScaleFootLeft", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("RigScaleFootRight", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("RigScaleLeftHand", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("RigScaleRightHand", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("RigScaleLeftArm", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("RigScaleRightArm", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("RigScaleHip", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("BodyPartScaleHead", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("BodyPartScaleNeck", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("BodyPartScaleTorso", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("BodyPartScaleLegLeft", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("BodyPartScaleLegRight", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("BodyPartScaleFootLeft", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("BodyPartScaleFootRight", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("BodyPartScaleLeftHand", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("BodyPartScaleRightHand", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("BodyPartScaleLeftArm", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("BodyPartScaleRightArm", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("BodyPartScaleHip", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("SmartOnHitEffectAll", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("ColorableWeaponProjParticle", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("ColorableAbilityProjParticle", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("ColorableWeaponProjModel", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("ColorableAbilityProjModel", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("ForcePointAddReaperScytheEffect", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("AddPlaceholderBoxHead", UTI.LoadGmObj("AddPlaceholderBoxHead"), true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("AddPlaceholderBoxNeck", UTI.LoadGmObj("AddPlaceholderBoxNeck"), true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("AddPlaceholderBoxTorso", UTI.LoadGmObj("AddPlaceholderBoxTorso"), true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("WeaponPlaceholderBoxLeft", UTI.LoadGmObj("AddPlaceholderBoxWeapon"), true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("AddPlaceholderBoxArms", UTI.LoadGmObj("AddPlaceholderBoxArms"), true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("WeaponPlaceholderBoxRight", UTI.LoadGmObj("AddPlaceholderBoxWeapon"), true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("AddPlaceholderBoxHands", UTI.LoadGmObj("AddPlaceholderBoxHands"), true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("AddPlaceholderBoxWaist", UTI.LoadGmObj("AddPlaceholderBoxWaist"), true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("AddPlaceholderBoxLegs", UTI.LoadGmObj("AddPlaceholderBoxLegs"), true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("AddPlaceholderBoxFeet", UTI.LoadGmObj("AddPlaceholderBoxFeet"), true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("ForceSkinChange", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("MeleeTrailLeft", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("MeleeTrailRight", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("SkinChanges", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("AlwaysOpenedEyes", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("SmartOnHitEffectWeapon", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("SmartOnHitEffectProj", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("SmartMeleeAddDash", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("SmartUnitRigidbody", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("SmartUnitRigidbodyLimiter", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("SmartConditionalEventManager", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("SmartSummonRider", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("SmartUnitBalanceModifier", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("SetPropRotatingPerpetual", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("SetPropRotationStatic", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("SmartHealingItem", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("SmartUnitDupe", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("SmartMeleeKnockback", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("SmartProjectileScaling", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("SmartRangeDistance", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("SmartUnitVocalManager", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("SmartUnitWeaponSoundManager", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("SmartSFXManager", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("SmartMoreRider", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("SmartCustomRider", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("SmartConnectedTransform", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("SmartTransformToRider", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("SmartTransformationAmount", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("AddPlaceholderSphereHead", UTI.LoadGmObj("AddPlaceholderSphereHead"), true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("AddPlaceholderSphereNeck", UTI.LoadGmObj("AddPlaceholderSphereNeck"), true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("AddPlaceholderSphereTorso", UTI.LoadGmObj("AddPlaceholderSphereTorso"), true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("WeaponPlaceholderSphereLeft", UTI.LoadGmObj("AddPlaceholderSphereWeapon"), true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("AddPlaceholderSphereArms", UTI.LoadGmObj("AddPlaceholderSphereArms"), true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("WeaponPlaceholderSphereRight", UTI.LoadGmObj("AddPlaceholderSphereWeapon"), true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("AddPlaceholderSphereHands", UTI.LoadGmObj("AddPlaceholderSphereHands"), true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("AddPlaceholderSphereWaist", UTI.LoadGmObj("AddPlaceholderSphereWaist"), true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("AddPlaceholderSphereLegs", UTI.LoadGmObj("AddPlaceholderSphereLegs"), true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("AddPlaceholderSphereFeet", UTI.LoadGmObj("AddPlaceholderSphereFeet"), true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("AddPlaceholderPyramidHead", UTI.LoadGmObj("AddPlaceholderPyramidHead"), true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("AddPlaceholderPyramidNeck", UTI.LoadGmObj("AddPlaceholderPyramidNeck"), true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("AddPlaceholderPyramidTorso", UTI.LoadGmObj("AddPlaceholderPyramidTorso"), true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("WeaponPlaceholderPyramidLeft", UTI.LoadGmObj("AddPlaceholderPyramidWeapon"), true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("AddPlaceholderPyramidArms", UTI.LoadGmObj("AddPlaceholderPyramidArms"), true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("WeaponPlaceholderPyramidRight", UTI.LoadGmObj("AddPlaceholderPyramidWeapon"), true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("AddPlaceholderPyramidHands", UTI.LoadGmObj("AddPlaceholderPyramidHands"), true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("AddPlaceholderPyramidWaist", UTI.LoadGmObj("AddPlaceholderPyramidWaist"), true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("AddPlaceholderPyramidLegs", UTI.LoadGmObj("AddPlaceholderPyramidLegs"), true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("AddPlaceholderPyramidFeet", UTI.LoadGmObj("AddPlaceholderPyramidFeet"), true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("AddPlaceholderCylinderHead", UTI.LoadGmObj("AddPlaceholderCylinderHead"), true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("AddPlaceholderCylinderNeck", UTI.LoadGmObj("AddPlaceholderCylinderNeck"), true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("AddPlaceholderCylinderTorso", UTI.LoadGmObj("AddPlaceholderCylinderTorso"), true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("WeaponPlaceholderCylinderLeft", UTI.LoadGmObj("AddPlaceholderCylinderWeapon"), true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("AddPlaceholderCylinderArms", UTI.LoadGmObj("AddPlaceholderCylinderArms"), true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("WeaponPlaceholderCylinderRight", UTI.LoadGmObj("AddPlaceholderCylinderWeapon"), true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("AddPlaceholderCylinderHands", UTI.LoadGmObj("AddPlaceholderCylinderHands"), true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("AddPlaceholderCylinderWaist", UTI.LoadGmObj("AddPlaceholderCylinderWaist"), true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("AddPlaceholderCylinderLegs", UTI.LoadGmObj("AddPlaceholderCylinderLegs"), true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("AddPlaceholderCylinderFeet", UTI.LoadGmObj("AddPlaceholderCylinderFeet"), true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); comment = "----------------------------------------------------------------------------------------------------------------------------"; comment = "Right Weapons"; comment = "----------------------------------------------------------------------------------------------------------------------------"; UTI.ICat.SetTag(UPool.MyPool.AddObject("SmartWeaponScalingRightStatic", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("SmartWeaponScalingRightDynamic", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("RemoveRightWParticles", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("SmartWeaponWeightingLeft", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("WeaponHoldingUpRotationLeft", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("WeaponHoldingForwardRotationLeft", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("WeaponHoldingRelativePositionLeft", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("SmartRightMagSet", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("SmartRightRangedSet", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("SmartRightMeleeSet", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("SmartProjSetRight", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("SmartWeaponHoldableRight", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); comment = "----------------------------------------------------------------------------------------------------------------------------"; comment = "Left Weapons"; comment = "----------------------------------------------------------------------------------------------------------------------------"; UTI.ICat.SetTag(UPool.MyPool.AddObject("SmartWeaponScalingLeftStatic", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("SmartWeaponScalingLeftDynamic", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("RemoveLeftWParticles", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("SmartWeaponWeightingRight", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("WeaponHoldingUpRotationRight", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("WeaponHoldingForwardRotationRight", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("WeaponHoldingRelativePositionRight", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("SmartLeftMagSet", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("SmartLeftRangedSet", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("SmartLeftMeleeSet", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("SmartProjSetLeft", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("SmartWeaponHoldableLeft", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Prop, startId), true), itemCatName, (TagType)0); } public static void InitAbilities(Sprite icon, string itemCatName) { GameObject val = UTI.LoadGmObj("Move_EmptyAbility"); int startId = 30303031; comment = "----------------------------------------------------------------------------------------------------------------------------"; comment = "Technical Abilities"; comment = "----------------------------------------------------------------------------------------------------------------------------"; UTI.ICat.SetTag(UPool.MyPool.AddObject("ThrowMeleeWeapon", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Ability, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("MakeBaseHaveProp", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Ability, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("HideAbilityModel", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Ability, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("TornadoDisables", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Ability, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("BindVehicleHealth", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Ability, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("BindRiderHealth", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Ability, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("SetWeaponProjHoming", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Ability, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("SetAbilityProjHoming", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Ability, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("NoFallDamage", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Ability, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("StandStill", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Ability, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("FusionWithRider", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Ability, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("UnitTargetSelf", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Ability, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("MeleeAddDissarm", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Ability, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("MeleeAddBlink", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Ability, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("WeaponSwapWhenBelowHalf", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Ability, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("WeaponSwapWhenTargetDistance", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Ability, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("AlwaysTansferHP", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Ability, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("NeverShowHealthBar", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Ability, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("TransformToRiderChronoCondition", UTI.LoadGmObj("TransformToRiderChronoCondition"), true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Ability, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("TransformToRiderDarkKingCondition", UTI.LoadGmObj("TransformToRiderDarkKingCondition"), true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Ability, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("AdaptivePirateQueenThrow", UTI.LoadGmObj("AdaptivePirateQueenThrow"), true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Ability, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("AdaptiveSenseiBurstThrow", UTI.LoadGmObj("AdaptiveSenseiBurstThrow"), true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Ability, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("MeleeAddStick", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Ability, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("UnitDisableFriendlyFire", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Ability, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("UnbindVehicleHealth", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Ability, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("UnbindRiderHealth", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Ability, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("AdaptiveOrbCasting", UTI.LoadGmObj("AdaptiveOrbCasting"), true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Ability, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("AdaptiveSwordCasting", UTI.LoadGmObj("AdaptiveSwordCasting"), true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Ability, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("MeleeHitFaster", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Ability, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("AbilityRemoveSound", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Ability, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("KeepNormalUnitColorInstance", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Ability, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("NullifyAllDelay", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Ability, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("DisableUnitOutline", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Ability, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("AdaptiveArrowVolley", UTI.LoadGmObj("AdaptiveArrowVolley"), true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Ability, startId), true), itemCatName, (TagType)0); UTI.ICat.SetTag(UPool.MyPool.AddObject("HideAbilityParticles", val, true, (HideFlags)52, icon, UTI.IDScan(UTI.assetType.Ability, startId), true), itemCatName, (TagType)0); } } public static string comment; public static void Init(LandfallContentDatabase db) { UTI.LoadBundle("techitemsbundle"); Sprite icon = UTI.LoadTexture2Sprite("icon_technicalitems"); string itemCatName = "Technical Items"; InitManager.InitClothings(icon, itemCatName); InitManager.InitAbilities(icon, itemCatName); } public static void SetItemObject(GameObject itemObject) { if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("SmartAdaptiveProjSpawner")) { itemObject.AddComponent<SmartAdaptiveProjSpawnerBehaviour>().smokeObject = UTI.LoadGmObj("E_EmptySpawnerPoof"); } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("ThrowMeleeWeapon")) { itemObject.AddComponent<ThrowMeleeWeaponBehaviour>().baseProjObject = UTI.LoadGmObj("P_TemplateMeleeProj"); } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("SmartKeepDistance")) { itemObject.AddComponent<SmartKeepDistanceBehaviour>(); } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("MakeBaseHaveProp")) { itemObject.AddComponent<MakeUnitBasePropableBehaviour>(); } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("UnitDisableFriendlyFire")) { itemObject.AddComponent<UnitDisableFriendlyFireBehaviour>(); } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("UnitTargetSelf")) { itemObject.AddComponent<UnitTargetSelfBehaviourBehaviour>(); } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("DisableUnitOutline")) { itemObject.AddComponent<DisableUnitOutlineBehaviour>(); } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("MeleeAddStick")) { itemObject.AddComponent<MeleeAddStickBehaviour>(); } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("MeleeHitFaster")) { itemObject.AddComponent<MeleeHitFasterBehaviour>(); } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("UnbindVehicleHealth")) { itemObject.AddComponent<BindSiegeHealthBehaviour>().HealthBindType = BindSiegeHealthBehaviour.BindType.UnbindVehicleHealth; } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("UnbindRiderHealth")) { itemObject.AddComponent<BindSiegeHealthBehaviour>().HealthBindType = BindSiegeHealthBehaviour.BindType.UnbindRiderHealth; } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("BindVehicleHealth")) { itemObject.AddComponent<BindSiegeHealthBehaviour>().HealthBindType = BindSiegeHealthBehaviour.BindType.BindVehicleHealth; } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("BindRiderHealth")) { itemObject.AddComponent<BindSiegeHealthBehaviour>().HealthBindType = BindSiegeHealthBehaviour.BindType.BindRiderHealth; } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("KeepNormalUnitColorInstance")) { itemObject.AddComponent<KeepNormalUnitColorInstanceBehaviour>(); } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("AbilityRemoveSound")) { itemObject.AddComponent<AbilityRemoveSoundBehaviour>(); } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("HideAbilityModel")) { itemObject.AddComponent<DestroyAbilitiesModelBehaviour>(); } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("HideAbilityParticles")) { itemObject.AddComponent<DestroyAbilitiesParticlesBehaviour>(); } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("NullifyAllDelay")) { itemObject.AddComponent<NullifyAllDelayBehaviour>(); } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("TornadoDisables")) { itemObject.AddComponent<RemoveTurnadoBehaviour>(); } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("NoFallDamage")) { itemObject.AddComponent<NoFallDamageBehaviour>(); } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("StandStill")) { itemObject.AddComponent<StandStillBehaviour>(); } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("FusionWithRider")) { itemObject.AddComponent<GetAndDeleteRiderBehaviour>(); itemObject.AddComponent<FusionMechanicBehaviour>(); } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("MeleeAddDissarm")) { itemObject.AddComponent<AddMeleeDissarmBehaviour>(); } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("MeleeAddBlink")) { itemObject.AddComponent<AddMeleeBlinkBehaviour>(); } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("WeaponSwapWhenBelowHalf")) { itemObject.AddComponent<SwapDistanceHalfBehaviour>(); } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("WeaponSwapWhenTargetDistance")) { itemObject.AddComponent<SwapDistanceBaseBehaviour>(); } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("AlwaysTansferHP")) { itemObject.AddComponent<TransferHPEnableBehaviour>(); } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("NeverShowHealthBar")) { itemObject.AddComponent<NeverShowHealthBarBehaviour>(); } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("TransformToRiderChronoCondition")) { itemObject.AddComponent<GetAndDeleteRiderBehaviour>(); } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("TransformToRiderDarkKingCondition")) { itemObject.AddComponent<GetAndDeleteRiderBehaviour>(); } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("AdaptiveOrbCasting")) { SpookySwords componentInChildren = itemObject.GetComponentInChildren<SpookySwords>(); AdaptiveCastBehaviour adaptiveCastBehaviour = itemObject.AddComponent<AdaptiveCastBehaviour>(); adaptiveCastBehaviour.followSpeed = componentInChildren.followSpeed; adaptiveCastBehaviour.throwSpeed = componentInChildren.throwSpeed; adaptiveCastBehaviour.throwCurve = componentInChildren.throwCurve; adaptiveCastBehaviour.attackRate = componentInChildren.attackRate; adaptiveCastBehaviour.projToCopyCodeAnimation = UTI.LoadGmObj("CodeAnimToCopy"); Object.Destroy((Object)(object)componentInChildren); } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("AdaptiveSwordCasting")) { SpookySwords componentInChildren2 = itemObject.GetComponentInChildren<SpookySwords>(); AdaptiveCastBehaviour adaptiveCastBehaviour2 = itemObject.AddComponent<AdaptiveCastBehaviour>(); adaptiveCastBehaviour2.followSpeed = componentInChildren2.followSpeed; adaptiveCastBehaviour2.throwSpeed = componentInChildren2.throwSpeed; adaptiveCastBehaviour2.throwCurve = componentInChildren2.throwCurve; adaptiveCastBehaviour2.attackRate = componentInChildren2.attackRate; adaptiveCastBehaviour2.projToCopyCodeAnimation = UTI.LoadGmObj("CodeAnimToCopy"); Object.Destroy((Object)(object)componentInChildren2); } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("AdaptiveArrowVolley")) { itemObject.AddComponent<AdaptiveThrowBehaviour>(); } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("AdaptivePirateQueenThrow")) { itemObject.AddComponent<AdaptiveThrowBehaviour>(); } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("AdaptiveSenseiBurstThrow")) { ParticleSystem[] componentsInChildren = itemObject.GetComponentsInChildren<ParticleSystem>(); for (int i = 0; i < componentsInChildren.Length; i++) { componentsInChildren[i].startSize = 1.6f; } itemObject.AddComponent<AdaptiveBurstBehaviour>(); } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("RigScaleHead")) { itemObject.AddComponent<SmartRigScaleSizingBehaviour>().rigType = SmartRigScaleSizingBehaviour.RigType.Head; } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("RigScaleTorso")) { itemObject.AddComponent<SmartRigScaleSizingBehaviour>().rigType = SmartRigScaleSizingBehaviour.RigType.Torso; } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("RigScaleLegLeft")) { itemObject.AddComponent<SmartRigScaleSizingBehaviour>().rigType = SmartRigScaleSizingBehaviour.RigType.LegLeft; } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("RigScaleLegRight")) { itemObject.AddComponent<SmartRigScaleSizingBehaviour>().rigType = SmartRigScaleSizingBehaviour.RigType.LegRight; } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("RigScaleFootLeft")) { itemObject.AddComponent<SmartRigScaleSizingBehaviour>().rigType = SmartRigScaleSizingBehaviour.RigType.FootLeft; } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("RigScaleFootRight")) { itemObject.AddComponent<SmartRigScaleSizingBehaviour>().rigType = SmartRigScaleSizingBehaviour.RigType.FootRight; } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("RigScaleLeftHand")) { itemObject.AddComponent<SmartRigScaleSizingBehaviour>().rigType = SmartRigScaleSizingBehaviour.RigType.LeftHand; } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("RigScaleRightHand")) { itemObject.AddComponent<SmartRigScaleSizingBehaviour>().rigType = SmartRigScaleSizingBehaviour.RigType.RightHand; } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("RigScaleLeftArm")) { itemObject.AddComponent<SmartRigScaleSizingBehaviour>().rigType = SmartRigScaleSizingBehaviour.RigType.LeftArm; } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("RigScaleRightArm")) { itemObject.AddComponent<SmartRigScaleSizingBehaviour>().rigType = SmartRigScaleSizingBehaviour.RigType.RightArm; } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("RigScaleHip")) { itemObject.AddComponent<SmartRigScaleSizingBehaviour>().rigType = SmartRigScaleSizingBehaviour.RigType.Hip; } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("BodyPartScaleHead")) { itemObject.AddComponent<SmartBodyPartScaleSizing>().rigType = SmartBodyPartScaleSizing.RigType.Head; } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("BodyPartScaleNeck")) { itemObject.AddComponent<SmartBodyPartScaleSizing>().rigType = SmartBodyPartScaleSizing.RigType.Neck; } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("BodyPartScaleTorso")) { itemObject.AddComponent<SmartBodyPartScaleSizing>().rigType = SmartBodyPartScaleSizing.RigType.Torso; } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("BodyPartScaleLegLeft")) { itemObject.AddComponent<SmartBodyPartScaleSizing>().rigType = SmartBodyPartScaleSizing.RigType.LegLeft; } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("BodyPartScaleLegRight")) { itemObject.AddComponent<SmartBodyPartScaleSizing>().rigType = SmartBodyPartScaleSizing.RigType.LegRight; } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("BodyPartScaleFootLeft")) { itemObject.AddComponent<SmartBodyPartScaleSizing>().rigType = SmartBodyPartScaleSizing.RigType.FootLeft; } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("BodyPartScaleFootRight")) { itemObject.AddComponent<SmartBodyPartScaleSizing>().rigType = SmartBodyPartScaleSizing.RigType.FootRight; } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("BodyPartScaleLeftHand")) { itemObject.AddComponent<SmartBodyPartScaleSizing>().rigType = SmartBodyPartScaleSizing.RigType.LeftHand; } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("BodyPartScaleRightHand")) { itemObject.AddComponent<SmartBodyPartScaleSizing>().rigType = SmartBodyPartScaleSizing.RigType.RightHand; } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("BodyPartScaleLeftArm")) { itemObject.AddComponent<SmartBodyPartScaleSizing>().rigType = SmartBodyPartScaleSizing.RigType.LeftArm; } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("BodyPartScaleRightArm")) { itemObject.AddComponent<SmartBodyPartScaleSizing>().rigType = SmartBodyPartScaleSizing.RigType.RightArm; } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("BodyPartScaleHip")) { itemObject.AddComponent<SmartBodyPartScaleSizing>().rigType = SmartBodyPartScaleSizing.RigType.Hip; } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("SmartTransformationAmount")) { itemObject.AddComponent<SmartTransformationAmountBehaviour>(); } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("SmartTransformToRider")) { itemObject.AddComponent<SmartTransformToRiderBehaviour>().particle = UTI.LoadGmObj("E_EmptySpawnerPoof"); } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("SmartConnectedTransform")) { itemObject.AddComponent<SmartConnectedTransformBehaviour>().particle = UTI.LoadGmObj("E_EmptySpawnerPoof"); } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("SmartCustomRider")) { itemObject.AddComponent<SmartCustomMountBehaviour>(); } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("SmartMoreRider")) { itemObject.AddComponent<SmartMoreMountBehaviour>(); } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("SmartUnitWeaponSoundManager")) { itemObject.AddComponent<SmartSoundsManagerBehaviour>().soundType = SmartSoundsManagerBehaviour.SoundType.Weapons; } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("SmartUnitVocalManager")) { itemObject.AddComponent<SmartSoundsManagerBehaviour>().soundType = SmartSoundsManagerBehaviour.SoundType.Vocal; } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("SmartSFXManager")) { itemObject.AddComponent<SmartSoundsManagerBehaviour>().soundType = SmartSoundsManagerBehaviour.SoundType.SFX; } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("SmartRangeDistance")) { itemObject.AddComponent<SmartRangeDistanceBehaviour>(); } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("SmartProjectileScaling")) { itemObject.AddComponent<SmartProjectileScalingBehaviour>(); } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("SmartMeleeKnockback")) { itemObject.AddComponent<SmartMeleeKnockbackBehaviour>(); } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("SmartUnitDupe")) { itemObject.AddComponent<SmartUnitDupeBehaviourBehaviour>().abilityToRemove = UPool.MyPool.GetObject("SmartUnitDupe"); } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("SmartHealingItem")) { itemObject.AddComponent<SmartHealingItemBehaviour>(); } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("SetPropRotatingPerpetual")) { itemObject.AddComponent<SetPropRotationBehaviour>().rotationType = SetPropRotationBehaviour.RotationType.Perpetual; } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("SetPropRotationStatic")) { itemObject.AddComponent<SetPropRotationBehaviour>().rotationType = SetPropRotationBehaviour.RotationType.Static; } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("SmartUnitBalanceModifier")) { itemObject.AddComponent<SmartUnitBalanceModifierBehaviour>(); } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("SmartSummonRider")) { itemObject.AddComponent<SmartSummonRiderBehaviour>(); } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("SmartConditionalEventManager")) { itemObject.AddComponent<SmartConditionalEventManagerSet>(); } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("SmartUnitRigidbodyLimiter")) { itemObject.AddComponent<SmartUnitRigidbodyLimiterSetBehaviour>(); } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("SmartUnitRigidbody")) { itemObject.AddComponent<SmartUnitRigidbodySetBehaviour>(); } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("SmartMeleeAddDash")) { itemObject.AddComponent<AddSmartMeleeDashBehaviour>(); } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("ColorableWeaponProjParticle")) { itemObject.AddComponent<ColorableWeaponProjBehaviour>().MaterialChangeType = ColorableWeaponProjBehaviour.ChangeType.Particle; } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("ColorableAbilityProjParticle")) { itemObject.AddComponent<ColorableAbilityProjBehaviour>().MaterialChangeType = ColorableAbilityProjBehaviour.ChangeType.Particle; } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("ColorableWeaponProjModel")) { itemObject.AddComponent<ColorableWeaponProjBehaviour>().MaterialChangeType = ColorableWeaponProjBehaviour.ChangeType.Model; } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("ColorableAbilityProjModel")) { itemObject.AddComponent<ColorableAbilityProjBehaviour>().MaterialChangeType = ColorableAbilityProjBehaviour.ChangeType.Model; } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("SetAbilityProjHoming")) { itemObject.AddComponent<ChangeAbilityProjectileHomingBehaviour>(); } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("SetWeaponProjHoming")) { itemObject.AddComponent<ChangeWeaponProjectileHomingBehaviour>(); } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("WeaponPlaceholderBoxRight")) { itemObject.AddComponent<DynamicPropWeaponBehaviour>().right = true; } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("WeaponPlaceholderBoxLeft")) { itemObject.AddComponent<DynamicPropWeaponBehaviour>().right = false; } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("AddPlaceholderBoxHands")) { itemObject.AddComponent<DynamicPropSetupBehaviour>(); } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("AddPlaceholderBoxLegs")) { itemObject.AddComponent<DynamicPropSetupBehaviour>(); } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("AddPlaceholderBoxFeet")) { itemObject.AddComponent<DynamicPropSetupBehaviour>(); } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("AddPlaceholderBoxArms")) { itemObject.AddComponent<DynamicPropSetupBehaviour>(); } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("WeaponPlaceholderSphereRight")) { itemObject.AddComponent<DynamicPropWeaponBehaviour>().right = true; } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("WeaponPlaceholderSphereLeft")) { itemObject.AddComponent<DynamicPropWeaponBehaviour>().right = false; } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("AddPlaceholderSphereHands")) { itemObject.AddComponent<DynamicPropSetupBehaviour>(); } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("AddPlaceholderSphereLegs")) { itemObject.AddComponent<DynamicPropSetupBehaviour>(); } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("AddPlaceholderSphereFeet")) { itemObject.AddComponent<DynamicPropSetupBehaviour>(); } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("AddPlaceholderSphereArms")) { itemObject.AddComponent<DynamicPropSetupBehaviour>(); } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("WeaponPlaceholderPyramidRight")) { itemObject.AddComponent<DynamicPropWeaponBehaviour>().right = true; } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("WeaponPlaceholderPyramidLeft")) { itemObject.AddComponent<DynamicPropWeaponBehaviour>().right = false; } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("AddPlaceholderPyramidHands")) { itemObject.AddComponent<DynamicPropSetupBehaviour>().multiplier = 25f; } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("AddPlaceholderPyramidLegs")) { itemObject.AddComponent<DynamicPropSetupBehaviour>().multiplier = 25f; } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("AddPlaceholderPyramidFeet")) { itemObject.AddComponent<DynamicPropSetupBehaviour>().multiplier = 25f; } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("AddPlaceholderPyramidArms")) { itemObject.AddComponent<DynamicPropSetupBehaviour>().multiplier = 25f; } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("WeaponPlaceholderCylinderRight")) { itemObject.AddComponent<DynamicPropWeaponBehaviour>().right = true; } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("WeaponPlaceholderCylinderLeft")) { itemObject.AddComponent<DynamicPropWeaponBehaviour>().right = false; } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("AddPlaceholderCylinderHands")) { itemObject.AddComponent<DynamicPropSetupBehaviour>(); } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("AddPlaceholderCylinderLegs")) { itemObject.AddComponent<DynamicPropSetupBehaviour>(); } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("AddPlaceholderCylinderFeet")) { itemObject.AddComponent<DynamicPropSetupBehaviour>(); } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("AddPlaceholderCylinderArms")) { itemObject.AddComponent<DynamicPropSetupBehaviour>(); } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("SmartWeaponScalingLeftStatic")) { itemObject.AddComponent<SmartWeaponScalingStaticBehaviour>().right = false; } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("SmartWeaponScalingRightStatic")) { itemObject.AddComponent<SmartWeaponScalingStaticBehaviour>().right = true; } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("SmartWeaponScalingLeftDynamic")) { itemObject.AddComponent<SmartWeaponScalingDynamicBehaviour>().right = false; } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("SmartWeaponScalingRightDynamic")) { itemObject.AddComponent<SmartWeaponScalingDynamicBehaviour>().right = true; } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("SmartProjSetLeft")) { itemObject.AddComponent<SmartProjSetBehaviour>().right = false; } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("SmartProjSetRight")) { itemObject.AddComponent<SmartProjSetBehaviour>().right = true; } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("ForcePointAddReaperScytheEffect")) { itemObject.AddComponent<ForcePointAddReaperScytheEffectBehaviour>().trailObject = UTI.LoadGmObj("ReaperParticleTI"); } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("SmartLeftMeleeSet")) { itemObject.AddComponent<SmartMeleeSetBehaviour>().right = false; } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("SmartRightMeleeSet")) { itemObject.AddComponent<SmartMeleeSetBehaviour>().right = true; } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("SmartLeftRangedSet")) { itemObject.AddComponent<SmartRangedSetBehaviour>().right = false; } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("SmartRightRangedSet")) { itemObject.AddComponent<SmartRangedSetBehaviour>().right = true; } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("SmartLeftMagSet")) { itemObject.AddComponent<SmartMagSetBehaviour>().right = false; } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("SmartRightMagSet")) { itemObject.AddComponent<SmartMagSetBehaviour>().right = true; } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("SmartWeaponWeightingLeft")) { itemObject.AddComponent<SmartWeaponRigidbodyChangeBehaviour>().right = false; } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("SmartWeaponWeightingRight")) { itemObject.AddComponent<SmartWeaponRigidbodyChangeBehaviour>().right = true; } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("WeaponHoldingUpRotationLeft")) { SmartWeaponHoldingChangeBehaviour smartWeaponHoldingChangeBehaviour = itemObject.AddComponent<SmartWeaponHoldingChangeBehaviour>(); smartWeaponHoldingChangeBehaviour.right = false; smartWeaponHoldingChangeBehaviour.holdingChangeType = SmartWeaponHoldingChangeBehaviour.HoldingChangeType.UpRotation; } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("WeaponHoldingForwardRotationLeft")) { SmartWeaponHoldingChangeBehaviour smartWeaponHoldingChangeBehaviour2 = itemObject.AddComponent<SmartWeaponHoldingChangeBehaviour>(); smartWeaponHoldingChangeBehaviour2.right = false; smartWeaponHoldingChangeBehaviour2.holdingChangeType = SmartWeaponHoldingChangeBehaviour.HoldingChangeType.ForwardRotation; } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("WeaponHoldingRelativePositionLeft")) { SmartWeaponHoldingChangeBehaviour smartWeaponHoldingChangeBehaviour3 = itemObject.AddComponent<SmartWeaponHoldingChangeBehaviour>(); smartWeaponHoldingChangeBehaviour3.right = false; smartWeaponHoldingChangeBehaviour3.holdingChangeType = SmartWeaponHoldingChangeBehaviour.HoldingChangeType.RelativePosition; } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("WeaponHoldingUpRotationRight")) { SmartWeaponHoldingChangeBehaviour smartWeaponHoldingChangeBehaviour4 = itemObject.AddComponent<SmartWeaponHoldingChangeBehaviour>(); smartWeaponHoldingChangeBehaviour4.right = true; smartWeaponHoldingChangeBehaviour4.holdingChangeType = SmartWeaponHoldingChangeBehaviour.HoldingChangeType.UpRotation; } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("WeaponHoldingForwardRotationRight")) { SmartWeaponHoldingChangeBehaviour smartWeaponHoldingChangeBehaviour5 = itemObject.AddComponent<SmartWeaponHoldingChangeBehaviour>(); smartWeaponHoldingChangeBehaviour5.right = true; smartWeaponHoldingChangeBehaviour5.holdingChangeType = SmartWeaponHoldingChangeBehaviour.HoldingChangeType.ForwardRotation; } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("WeaponHoldingRelativePositionRight")) { SmartWeaponHoldingChangeBehaviour smartWeaponHoldingChangeBehaviour6 = itemObject.AddComponent<SmartWeaponHoldingChangeBehaviour>(); smartWeaponHoldingChangeBehaviour6.right = true; smartWeaponHoldingChangeBehaviour6.holdingChangeType = SmartWeaponHoldingChangeBehaviour.HoldingChangeType.RelativePosition; } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("SmartWeaponHoldableRight")) { SmartWeaponHoldingChangeBehaviour smartWeaponHoldingChangeBehaviour7 = itemObject.AddComponent<SmartWeaponHoldingChangeBehaviour>(); smartWeaponHoldingChangeBehaviour7.right = true; smartWeaponHoldingChangeBehaviour7.holdingChangeType = SmartWeaponHoldingChangeBehaviour.HoldingChangeType.HoldingStats; } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("SmartWeaponHoldableLeft")) { SmartWeaponHoldingChangeBehaviour smartWeaponHoldingChangeBehaviour8 = itemObject.AddComponent<SmartWeaponHoldingChangeBehaviour>(); smartWeaponHoldingChangeBehaviour8.right = false; smartWeaponHoldingChangeBehaviour8.holdingChangeType = SmartWeaponHoldingChangeBehaviour.HoldingChangeType.HoldingStats; } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("ForceSkinChange")) { itemObject.AddComponent<ForcedSkinChangeBehaviour>(); } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("MeleeTrailLeft")) { itemObject.AddComponent<MeleeTrailBehaviour>().right = false; } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("MeleeTrailRight")) { itemObject.AddComponent<MeleeTrailBehaviour>().right = true; } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("SkinChanges")) { itemObject.AddComponent<SkinnedChangesBehaviour>(); } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("AlwaysOpenedEyes")) { itemObject.AddComponent<EyeKeepOpenedBehaviour>(); } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("RemoveRightWParticles")) { itemObject.AddComponent<RemoveWeaponParticlesBehaviour>().right = true; } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("RemoveLeftWParticles")) { itemObject.AddComponent<RemoveWeaponParticlesBehaviour>().right = false; } GameObject[] explosions = (GameObject[])(object)new GameObject[9] { UTI.LoadGmObj("E_GroundExplosionTI"), UTI.LoadGmObj("E_FireExplosionTI"), UTI.LoadGmObj("E_IceExplosionTI"), UTI.LoadGmObj("E_GunpowderExplosionTI"), UTI.LoadGmObj("E_ThorHammerLightningExplosionTI"), UTI.LoadGmObj("E_ReaperExplosionTI"), UTI.LoadGmObj("E_ChronotimeExplosionTI"), UTI.LoadGmObj("E_EFBluefireExplosionTI"), UTI.LoadGmObj("E_EFEvilSwordExplosionTI") }; if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("SmartOnHitEffectAll")) { SmartOnHitEffectBehaviour smartOnHitEffectBehaviour = itemObject.AddComponent<SmartOnHitEffectBehaviour>(); smartOnHitEffectBehaviour.effectType = SmartOnHitEffectBehaviour.EffectType.All; smartOnHitEffectBehaviour.explosions = explosions; } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("SmartOnHitEffectWeapon")) { SmartOnHitEffectBehaviour smartOnHitEffectBehaviour2 = itemObject.AddComponent<SmartOnHitEffectBehaviour>(); smartOnHitEffectBehaviour2.effectType = SmartOnHitEffectBehaviour.EffectType.Weapon; smartOnHitEffectBehaviour2.explosions = explosions; } if ((Object)(object)itemObject == (Object)(object)UPool.MyPool.GetObject("SmartOnHitEffectProj")) { SmartOnHitEffectBehaviour smartOnHitEffectBehaviour3 = itemObject.AddComponent<SmartOnHitEffectBehaviour>(); smartOnHitEffectBehaviour3.effectType = SmartOnHitEffectBehaviour.EffectType.Projectile; smartOnHitEffectBehaviour3.explosions = explosions; } } } [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("GeeztJeez.Technicalitems", "TechnicalItems", "1.0.19")] internal class Loader : BaseUnityPlugin { public static string modName; public static bool DebugEnabled; public static string modtitle; private void ApplyHarmony() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) try { new Harmony(modName).PatchAll(Assembly.GetExecutingAssembly()); Log(" Harmony patched successfully!"); } catch (Exception ex) { LogError("Harmony patch failed: " + ex); Log("Please contact Geezt Jeez or try reloading the game for proper installation..."); } } static Loader() { DebugEnabled = false; modtitle = "Technical Items"; modName = "TechnicalItems"; } public static void Log(string message) { if (DebugEnabled) { Debug.Log((object)$"[{modName}] {message}"); } } public static void LogWarning(string message) { if (DebugEnabled) { Debug.LogWarning((object)$"[{modName}] {message}"); } } public static void LogError(string message) { if (DebugEnabled) { Debug.LogError((object)$"[{modName}] {message}"); } } private void Awake() { ApplyHarmony(); ((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)); Log($"Loading {modtitle}!"); SLMALoader.GetInstance(); Manager.Init(ContentDatabase.Instance().LandfallContentDatabase); GameObject[] array = Resources.FindObjectsOfTypeAll<GameObject>(); for (int num = 0; num < array.Length; num++) { Manager.SetItemObject(array[num]); } Log($"Loaded {modtitle} Successfully!"); } } } namespace TIComponents { public class ScaleWeaponBehaviour : MonoBehaviour { private Unit unit; public bool right; public float scaleMultiplier; private void Start() { //IL_0048: 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_0085: 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) unit = ((Component)((Component)this).gameObject.transform.root).gameObject.GetComponentInChildren<Unit>(); if (right) { Transform transform = ((Component)unit.data.weaponHandler.rightWeapon).gameObject.transform; transform.localScale *= scaleMultiplier; } if (!right) { Transform transform2 = ((Component)unit.data.weaponHandler.leftWeapon).gameObject.transform; transform2.localScale *= scaleMultiplier; } } } public class RemoveWeaponParticlesBehaviour : MonoBehaviour { private Unit unit; private Weapon weapon; public bool right; private void Start() { unit = ((Component)((Component)this).gameObject.transform.root).gameObject.GetComponentInChildren<Unit>(); if (right) { weapon = unit.data.weaponHandler.rightWeapon; } if (!right) { weapon = unit.data.weaponHandler.leftWeapon; } ParticleSystem[] componentsInChildren = ((Component)weapon).gameObject.GetComponentsInChildren<ParticleSystem>(); foreach (ParticleSystem obj in componentsInChildren) { Object.Destroy((Object)(object)((Component)obj).gameObject.GetComponentInChildren<ParticleSystemRenderer>()); Object.Destroy((Object)(object)obj); } } } public class GetAndDeleteRiderBehaviour : MonoBehaviour { public UnitSpawner unitSpawner; public UnitBlueprint riderBlueprint; private void Start() { GameObject val = ((Component)((Component)this).transform.root).GetComponentInChildren<RiderHolder>().riders[0]; riderBlueprint = val.GetComponentInChildren<Unit>().unitBlueprint; UnitSpawner componentInChildren = ((Component)this).GetComponentInChildren<UnitSpawner>(); if (Object.op_Implicit((Object)(object)componentInChildren) && Object.op_Implicit((Object)(object)riderBlueprint)) { unitSpawner = componentInChildren; unitSpawner.unitBlueprint = riderBlueprint; unitSpawner.rangedUnitBlueprint = riderBlueprint; } Object.Destroy((Object)(object)val.gameObject); } } public class AdaptiveBurstBehaviour : MonoBehaviour { private Color color; private Unit unit; private RangeWeapon[] rangeWeapons; private SpawnObject[] spawnObjects; private ParticleSystem[] particleSystems; private ParticleSystemRenderer[] particleRenderers; private GameObject currentProjectile; private float refreshTimer; private void Start() { unit = ((Component)((Component)this).transform.root).GetComponentInChildren<Unit>(); spawnObjects = ((Component)this).GetComponentsInChildren<SpawnObject>(); particleSystems = ((Component)this).GetComponentsInChildren<ParticleSystem>(); particleRenderers = ((Component)this).GetComponentsInChildren<ParticleSystemRenderer>(); Refresh(); } private void Update() { refreshTimer += Time.deltaTime; if (refreshTimer >= 0.25f) { refreshTimer = 0f; Refresh(); } } private void Refresh() { //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_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Unknown result type (might be due to invalid IL or missing references) if (!Object.op_Implicit((Object)(object)unit)) { return; } rangeWeapons = ((Component)unit).GetComponentsInChildren<RangeWeapon>(); if (rangeWeapons == null || rangeWeapons.Length == 0) { return; } int num = Random.Range(0, rangeWeapons.Length); if ((Object)(object)rangeWeapons[num] == (Object)null || (Object)(object)rangeWeapons[num].ObjectToSpawn == (Object)null) { return; } GameObject objectToSpawn = rangeWeapons[num].ObjectToSpawn; if ((Object)(object)objectToSpawn == (Object)(object)currentProjectile) { return; } currentProjectile = objectToSpawn; for (int i = 0; i < spawnObjects.Length; i++) { spawnObjects[i].objectToSpawn = objectToSpawn; } Renderer componentInChildren = objectToSpawn.GetComponentInChildren<Renderer>(); if ((Object)(object)componentInChildren != (Object)null) { color = componentInChildren.sharedMaterial.color; } for (int j = 0; j < particleSystems.Length; j++) { MainModule main = particleSystems[j].main; ((MainModule)(ref main)).startColor = MinMaxGradient.op_Implicit(color); } for (int k = 0; k < particleRenderers.Length; k++) { if ((Object)(object)((Renderer)particleRenderers[k]).sharedMaterial != (Object)null) { ((Renderer)particleRenderers[k]).sharedMaterial.color = color; } if ((Object)(object)particleRenderers[k].trailMaterial != (Object)null) { particleRenderers[k].trailMaterial.color = color; } } } } public class AdaptiveThrowBehaviour : MonoBehaviour { private Unit unit; private RangeWeapon[] rangeWeapons; private int lastRangeWeaponCount; private int lastSpawnObjectCount; private SpawnObject[] spawnObjects; private void Start() { unit = ((Component)((Component)this).transform.root).GetComponentInChildren<Unit>(); rangeWeapons = ((Component)unit).GetComponentsInChildren<RangeWeapon>(); } private void Update() { int num = ((Component)unit).GetComponentsInChildren<RangeWeapon>().Length; int num2 = ((Component)this).GetComponentsInChildren<SpawnObject>().Length; if (num != lastRangeWeaponCount || num2 != lastSpawnObjectCount) { lastRangeWeaponCount = num; lastSpawnObjectCount = num2; rangeWeapons = ((Component)unit).GetComponentsInChildren<RangeWeapon>(); spawnObjects = ((Component)this).GetComponentsInChildren<SpawnObject>(); } if (rangeWeapons != null && rangeWeapons.Length != 0) { GameObject objectToSpawn = rangeWeapons[Random.Range(0, rangeWeapons.Length)].ObjectToSpawn; for (int i = 0; i < spawnObjects.Length; i++) { spawnObjects[i].objectToSpawn = objectToSpawn; } } } } public class NeverShowHealthBarBehaviour : MonoBehaviour { private Unit unit; public void Start() { unit = ((Component)((Component)this).gameObject.transform.root).GetComponentInChildren<Unit>(); } public void Update() { unit.SetHealthBarActive(false); } } public class EyeKeepOpenedBehaviour : MonoBehaviour { public void Update() { try { GooglyEye[] componentsInChildren = ((Component)((Component)this).gameObject.transform.root).GetComponentsInChildren<GooglyEye>(); for (int i = 0; i < componentsInChildren.Length; i++) { componentsInChildren[i].SetState((EyeState)0); } } catch (Exception) { Debug.LogWarning((object)"No eye detected"); } } } public class TransferHPEnableBehaviour : MonoBehaviour { private Unit unit; public void Start() { unit = ((Component)((Component)this).transform.root).GetComponentInChildren<Unit>(); UnitSpawner[] componentsInChildren = ((Component)unit).gameObject.GetComponentsInChildren<UnitSpawner>(); for (int i = 0; i < componentsInChildren.Length; i++) { componentsInChildren[i].transferHp = true; } SmartTransformToRiderBehaviour[] componentsInChildren2 = ((Component)unit).GetComponentsInChildren<SmartTransformToRiderBehaviour>(); for (int j = 0; j < componentsInChildren2.Length; j++) { componentsInChildren2[j].transferHP = true; } SmartConnectedTransformBehaviour[] componentsInChildren3 = ((Component)unit).GetComponentsInChildren<SmartConnectedTransformBehaviour>(); for (int k = 0; k < componentsInChildren3.Length; k++) { componentsInChildren3[k].transferHP = true; } } } public class SwapDistanceBaseBehaviour : MonoBehaviour { private HoldingHandler holdingHandler; private Unit unit; private bool swapped; private GameObject leftObject; private Holdable leftObjectHoldable; private GameObject rightObject; private Holdable rightObjectHoldable; private WeaponHandler WeaponHandler; public void Start() { //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) unit = ((Component)((Component)this).gameObject.transform.root).GetComponentInChildren<Unit>(); if (!Object.op_Implicit((Object)(object)unit)) { return; } WeaponHandler = unit.WeaponHandler; holdingHandler = unit.holdingHandler; if (!Object.op_Implicit((Object)(object)holdingHandler)) { return; } if (Object.op_Implicit((Object)(object)holdingHandler.rightObject)) { rightObject = ((Component)holdingHandler.rightObject).gameObject; rightObjectHoldable = holdingHandler.rightObject; } if (Object.op_Implicit((Object)(object)holdingHandler.leftObject)) { leftObject = ((Component)holdingHandler.leftObject).gameObject; leftObjectHoldable = holdingHandler.leftObject; holdingHandler.LetGoOfWeapon(leftObject); if (Object.op_Implicit((Object)(object)holdingHandler.rightObject)) { holdingHandler.leftObject = holdingHandler.rightObject; holdingHandler.leftHandActivity = (HandActivity)1; } Scaler(leftObject, Vector3.zero); } } public void Update() { //IL_0113: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_0161: Unknown result type (might be due to invalid IL or missing references) //IL_017b: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) float num = 5f; if (Object.op_Implicit((Object)(object)unit)) { if (!Object.op_Implicit((Object)(object)rightObject)) { rightObject = ((Component)holdingHandler.rightObject).gameObject; rightObjectHoldable = holdingHandler.rightObject; } if (!Object.op_Implicit((Object)(object)leftObject)) { leftObject = ((Component)holdingHandler.leftObject).gameObject; leftObjectHoldable = holdingHandler.leftObject; holdingHandler.LetGoOfWeapon(leftObject); if (Object.op_Implicit((Object)(object)holdingHandler.rightObject)) { holdingHandler.leftObject = holdingHandler.rightObject; holdingHandler.leftHandActivity = (HandActivity)1; } Scaler(leftObject, Vector3.zero); } } if (Object.op_Implicit((Object)(object)unit.data.targetData) && !unit.data.Dead) { if (Vector3.Distance(unit.data.mainRig.position, unit.data.targetData.mainRig.position) <= num && !swapped) { WeaponSwap(SwapToLeft: true); swapped = true; } else if (Vector3.Distance(unit.data.mainRig.position, unit.data.targetData.mainRig.position) > num && swapped) { WeaponSwap(SwapToLeft: false); swapped = false; } } } public void WeaponSwap(bool SwapToLeft) { //IL_009a: 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_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)leftObject != (Object)null) || !((Object)(object)rightObject != (Object)null)) { return; } if (SwapToLeft) { holdingHandler.LetGoOfWeapon(rightObject); holdingHandler.GrabObject(leftObjectHoldable, true, true, (Action)delegate { }); if (Object.op_Implicit((Object)(object)holdingHandler.leftObject)) { holdingHandler.rightObject = holdingHandler.leftObject; } Scaler(rightObject, Vector3.zero); Scaler(leftObject, Vector3.one); holdingHandler.leftHandActivity = (HandActivity)1; holdingHandler.rightHandActivity = (HandActivity)1; WeaponHandler.SetWeapon(leftObject.GetComponentInChildren<Weapon>(), (HandType)0); } else if (!SwapToLeft) { holdingHandler.LetGoOfWeapon(leftObject); holdingHandler.GrabObject(rightObjectHoldable, true, true, (Action)delegate { }); if (Object.op_Implicit((Object)(object)holdingHandler.leftObject)) { holdingHandler.leftObject = holdingHandler.rightObject; } Scaler(rightObject, Vector3.one); Scaler(leftObject, Vector3.zero); holdingHandler.leftHandActivity = (HandActivity)1; holdingHandler.rightHandActivity = (HandActivity)1; WeaponHandler.SetWeapon(rightObject.GetComponentInChildren<Weapon>(), (HandType)0); } } public void Scaler(GameObject basedGameObject, Vector3 scale) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) basedGameObject.transform.localScale = scale; } } public class SwapDistanceHalfBehaviour : MonoBehaviour { private HoldingHandler holdingHandler; private Unit unit; private bool swapped; private GameObject leftObject; private Holdable leftObjectHoldable; private GameObject rightObject; private Holdable rightObjectHoldable; private WeaponHandler WeaponHandler; public void Start() { //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) unit = ((Component)((Component)this).gameObject.transform.root).GetComponentInChildren<Unit>(); if (!Object.op_Implicit((Object)(object)unit)) { return; } WeaponHandler = unit.WeaponHandler; holdingHandler = unit.holdingHandler; if (!Object.op_Implicit((Object)(object)holdingHandler)) { return; } if (Object.op_Implicit((Object)(object)holdingHandler.rightObject)) { rightObject = ((Component)holdingHandler.rightObject).gameObject; rightObjectHoldable = holdingHandler.rightObject; } if (Object.op_Implicit((Object)(object)holdingHandler.leftObject)) { leftObject = ((Component)holdingHandler.leftObject).gameObject; leftObjectHoldable = holdingHandler.leftObject; holdingHandler.LetGoOfWeapon(leftObject); if (Object.op_Implicit((Object)(object)holdingHandler.rightObject)) { holdingHandler.leftObject = holdingHandler.rightObject; holdingHandler.leftHandActivity = (HandActivity)1; } Scaler(leftObject, Vector3.zero); } } public void Update() { //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) float num = unit.data.maxHealth * 0.5f; if (Object.op_Implicit((Object)(object)unit)) { if (!Object.op_Implicit((Object)(object)rightObject)) { rightObject = ((Component)holdingHandler.rightObject).gameObject; rightObjectHoldable = holdingHandler.rightObject; } if (!Object.op_Implicit((Object)(object)leftObject)) { leftObject = ((Component)holdingHandler.leftObject).gameObject; leftObjectHoldable = holdingHandler.leftObject; holdingHandler.LetGoOfWeapon(leftObject); if (Object.op_Implicit((Object)(object)holdingHandler.rightObject)) { holdingHandler.leftObject = holdingHandler.rightObject; holdingHandler.leftHandActivity = (HandActivity)1; } Scaler(leftObject, Vector3.zero); } } if (Object.op_Implicit((Object)(object)unit.data.targetData) && !unit.data.Dead) { if (unit.data.health <= num && !swapped) { WeaponSwap(SwapToLeft: true); swapped = true; } else if (Vector3.Distance(unit.data.mainRig.position, unit.data.targetData.mainRig.position) > num && swapped) { WeaponSwap(SwapToLeft: false); swapped = false; } } } public void WeaponSwap(bool SwapToLeft) { //IL_009a: 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_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_016e: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)leftObject != (Object)null) || !((Object)(object)rightObject != (Object)null)) { return; } if (SwapToLeft) { holdingHandler.LetGoOfWeapon(rightObject); holdingHandler.GrabObject(leftObjectHoldable, true, true, (Action)delegate { }); if (Object.op_Implicit((Object)(object)holdingHandler.leftObject)) { holdingHandler.rightObject = holdingHandler.leftObject; } Scaler(rightObject, Vector3.zero); Scaler(leftObject, Vector3.one); holdingHandler.leftHandActivity = (HandActivity)1; holdingHandler.rightHandActivity = (HandActivity)1; WeaponHandler.SetWeapon(leftObject.GetComponentInChildren<Weapon>(), (HandType)0); } else if (!SwapToLeft) { holdingHandler.LetGoOfWeapon(leftObject); holdingHandler.GrabObject(rightObjectHoldable, true, true, (Action)delegate { }); if (Object.op_Implicit((Object)(object)holdingHandler.leftObject)) { holdingHandler.leftObject = holdingHandler.rightObject; } Scaler(rightObject, Vector3.one); Scaler(leftObject, Vector3.zero); holdingHandler.leftHandActivity = (HandActivity)1; holdingHandler.rightHandActivity = (HandActivity)1; WeaponHandler.SetWeapon(rightObject.GetComponentInChildren<Weapon>(), (HandType)0); } } public void Scaler(GameObject basedGameObject, Vector3 scale) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) basedGameObject.transform.localScale = scale; } } public class AddMeleeBlinkBehaviour : MonoBehaviour { private Unit unit; private MeleeWeapon[] meleeWeapons; private void Start() { unit = ((Component)((Component)this).gameObject.transform.root).gameObject.GetComponentInChildren<Unit>(); meleeWeapons = ((Component)unit).GetComponentsInChildren<MeleeWeapon>(); MeleeWeapon[] array = meleeWeapons; for (int i = 0; i < array.Length; i++) { List<AttackEffect> list = new List<AttackEffect>(((Weapon)array[i]).attackEffects); list.Add((AttackEffect)(object)((Component)array[i]).gameObject.AddComponent<BlinkDagger>()); ((Weapon)array[i]).attackEffects = list.ToArray(); } } } public class AddMeleeDissarmBehaviour : MonoBehaviour { private Unit unit; private MeleeWeapon[] meleeWeapons; private void Start() { unit = ((Component)((Component)this).gameObject.transform.root).gameObject.GetComponentInChildren<Unit>(); meleeWeapons = ((Component)unit).GetComponentsInChildren<MeleeWeapon>(); MeleeWeapon[] array = meleeWeapons; for (int i = 0; i < array.Length; i++) { ((Component)array[i]).gameObject.AddComponent<MeleeWeaponDissarm>(); } } } public class AddSmartMeleeDashBehaviour : MonoBehaviour { public enum AnimationProperty { RigForce, Delay } private Unit unit; private MeleeWeapon[] meleeWeapons; private void Start() { //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_013a: 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) unit = ((Component)((Component)this).gameObject.transform.root).gameObject.GetComponentInChildren<Unit>(); meleeWeapons = ((Component)unit).GetComponentsInChildren<MeleeWeapon>(); float x = ((Component)this).transform.localScale.x; float y = ((Component)this).transform.localScale.y; MeleeWeapon[] array = meleeWeapons; for (int i = 0; i < array.Length; i++) { MeleeWeapon obj = array[i]; ((Weapon)obj).maxRange = ((Weapon)obj).maxRange * ((Component)this).transform.localScale.z; WeaponForceAnimation componentInChildren = ((Component)array[i]).gameObject.GetComponentInChildren<WeaponForceAnimation>(); if (!Object.op_Implicit((Object)(object)componentInChildren)) { List<AttackEffect> list = new List<AttackEffect>(((Weapon)array[i]).attackEffects); WeaponForceAnimation val = ((Component)array[i]).gameObject.AddComponent<WeaponForceAnimation>(); s.DeepCopyOf<WeaponForceAnimation>(val, ((GameObject)SLMALoader.SDic["weapons"]["shogunSword"]).GetComponentInChildren<WeaponForceAnimation>()); SetDefaultProperty(val, 100f); SetAnimationProperty(val, AnimationProperty.RigForce, x); SetAnimationProperty(val, AnimationProperty.Delay, y); list.Add((AttackEffect)(object)val); ((Weapon)array[i]).attackEffects = list.ToArray(); } else { s.DeepCopyOf<WeaponForceAnimation>(componentInChildren, ((GameObject)SLMALoader.SDic["weapons"]["shogunSword"]).GetComponentInChildren<WeaponForceAnimation>()); SetDefaultProperty(componentInChildren, 100f); SetAnimationProperty(componentInChildren, AnimationProperty.RigForce, x); SetAnimationProperty(componentInChildren, AnimationProperty.Delay, y); } } } private void SetAnimationProperty(WeaponForceAnimation anim, AnimationProperty property, float value) { if ((Object)(object)anim == (Object)null || anim.animations == null || anim.animations.Length == 0) { Debug.LogWarning((object)"Animation or animation data missing."); return; } switch (property) { case AnimationProperty.RigForce: { SpellAnimation obj2 = anim.animations[0]; obj2.rigAnimationForce *= value; break; } case AnimationProperty.Delay: { SpellAnimation obj = anim.animations[0]; obj.animationDelay *= value; break; } default: Debug.LogWarning((object)"Unknown animation property!"); break; } } private void SetDefaultProperty(WeaponForceAnimation anim, float value) { if ((Object)(object)anim == (Object)null || anim.animations == null || anim.animations.Length == 0) { Debug.LogWarning((object)"Animation or animation data missing."); return; } Debug.Log((object)"Set the animation to default value"); anim.animations[0].rigAnimationForce = value; } } public class SmartRangeDistanceBehaviour : MonoBehaviour { private Unit unit; private Weapon[] weapons; public float unitAttackDistance; public float weaponDistance; public bool alwaysAttack; private static float SETMAX = 99999f; private void Start() { //IL_0048: 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_004f: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) Transform root = ((Component)this).transform.root; unit = ((Component)root).GetComponentInChildren<Unit>(); if ((Object)(object)unit == (Object)null) { Debug.LogError((object)"Unit not found in hierarchy."); return; } weapons = ((Component)unit).GetComponentsInChildren<Weapon>(); Vector3 localScale = ((Component)this).transform.localScale; unitAttackDistance = localScale.x; weaponDistance = localScale.y; alwaysAttack = localScale.z >= 1f; if (alwaysAttack) { Weapon[] array = weapons; for (int i = 0; i < array.Length; i++) { array[i].maxRange = SETMAX; } unit.api.UpdateECSValues(); unit.m_PreferedDistance = SETMAX; } else { Weapon[] array2 = weapons; for (int j = 0; j < array2.Length; j++) { array2[j].maxRange = weaponDistance; } unit.api.UpdateECSValues(); unit.m_PreferedDistance = unitAttackDistance; } } private void Update() { //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: 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_010b: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)unit == (Object)null || unit.data.Dead || (Object)(object)unit.data.targetData == (Object)null || (Object)(object)MainCam.instance == (Object)null) { return; } CameraAbilityPossess componentInParent = ((Component)MainCam.instance).GetComponentInParent<CameraAbilityPossess>(); if ((!((Object)(object)componentInParent != (Object)null) || !((Object)(object)componentInParent.currentUnit == (Object)(object)unit)) && (alwaysAttack || unit.data.distanceToTarget <= unit.m_PreferedDistance || unit.data.distanceToTarget <= unitAttackDistance)) { Unit val = unit.data.targetData.unit; if ((Object)(object)val != (Object)null) { unit.Attack(val.data.mainRig.position, val.data.mainRig, val.data.mainRig.position - val.data.mainRig.position); } } } } public class FusionMechanicBehaviour : MonoBehaviour { private Unit rider; private GetAndDeleteRiderBehaviour getAndDeleteRiderBehaviour; private UnitBlueprint riderToSpawn; private Unit rootUnit; private bool hasTriggered; private void Start() { rootUnit = ((Component)((Component)this).transform.root).GetComponentInChildren<Unit>(); getAndDeleteRiderBehaviour = ((Component)this).GetComponentInChildren<GetAndDeleteRiderBehaviour>(); riderToSpawn = getAndDeleteRiderBehaviour.riderBlueprint; if (!hasTriggered) { hasTriggered = true; rider = Spawn(riderToSpawn); } } private void Update() { if (Object.op_Implicit((Object)(object)rootUnit) & Object.op_Implicit((Object)(object)rider)) { MirrorRigs(rider, rootUnit); } } private void MirrorRigs(Unit unit, Unit target) { //IL_007d: 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_0041: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) Rigidbody[] allRigs = unit.data.allRigs.AllRigs; Rigidbody[] allRigs2 = target.data.allRigs.AllRigs; for (int i = 0; i < allRigs.Length; i++) { if (allRigs.Length == allRigs2.Length) { ((Component)allRigs[i]).transform.position = ((Component)allRigs2[i]).transform.position; ((Component)allRigs[i]).transform.rotation = ((Component)allRigs2[i]).transform.rotation; } else { unit.data.mainRig.position = target.data.mainRig.position; unit.data.mainRig.rotation = target.data.mainRig.rotation; } } } public Unit Spawn(UnitBlueprint unitBlueprint) { //IL_0011: 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) //IL_0031: Unknown result type (might be due to invalid IL or missing references) Unit val = default(Unit); unitBlueprint.Spawn(rootUnit.data.mainRig.position, rootUnit.data.mainRig.rotation, rootUnit.Team, ref val, 1f, false, true, 0, (UnitPoolInfo?)null); if (Object.op_Implicit((Object)(object)val)) { ((Component)val).gameObject.AddComponent<DestroyIfUnitNullBehaviour>().targetUnit = rootUnit; return val; } return null; } } public class StandStillBehaviour : MonoBehaviour { private Unit unit; private UnitDontWalkFor unitDontWalkFor; private void Start() { unit = ((Component)((Component)this).gameObject.transform.root).gameObject.GetComponentInChildren<Unit>(); unitDontWalkFor = ((Component)unit).gameObject.AddComponent<UnitDontWalkFor>(); unitDontWalkFor.time = float.PositiveInfinity; unitDontWalkFor.Go(); } private void Update() { unitDontWalkFor.Go(); } } public class SkinnedChangesBehaviour : MonoBehaviour { private Unit unit; private Material curMat; private void Start() { //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Expected O, but got Unknown unit = ((Component)((Component)this).gameObject.transform.root).gameObject.GetComponentInChildren<Unit>(); curMat = ((Component)this).gameObject.GetComponentInChildren<Renderer>().materials[0]; if (!Object.op_Implicit((Object)(object)curMat)) { return; } Renderer[] componentsInChildren = ((Component)unit).gameObject.GetComponentsInChildren<Renderer>(); foreach (Renderer val in componentsInChildren) { if (((Component)val).tag == "UnitMesh" && (Object)(object)val.materials[0] != (Object)(object)curMat) { List<Material> list = new List<Material>(); Material[] materials = val.materials; for (int j = 0; j < materials.Length; j++) { list.Add(new Material(curMat)); } val.materials = list.ToArray(); } } } } public class NoFallDamageBehaviour : MonoBehaviour { private Unit unit; private UnitDontWalkFor unitDontWalkFor; private void Start() { unit = ((Component)((Component)this).gameObject.transform.root).gameObject.GetComponentInChildren<Unit>(); } private void Update() { if (Object.op_Implicit((Object)(object)unit) && Object.op_Implicit((Object)(object)unit.data)) { unit.data.takeFallDamage = false; unit.data.canFall = false; } } } public class MeleeTrailBehaviour : MonoBehaviour { private Unit unit; public bool right; public Material curMat; private void Start() { //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Expected O, but got Unknown unit = ((Component)((Component)this).gameObject.transform.root).gameObject.GetComponentInChildren<Unit>(); curMat = ((Component)this).gameObject.GetComponentInChildren<Renderer>().materials[0]; AnimationCurve val = new AnimationCurve(); val.AddKey(0f, 0f); val.AddKey(0.75f, 0.1f); val.AddKey(1f, 0f); GameObject val2 = ((!right) ? ((Component)unit.data.weaponHandler.leftWeapon).gameObject : ((Component)unit.data.weaponHandler.rightWeapon).gameObject); MeshRenderer[] componentsInChildren = ((Component)this).gameObject.GetComponentsInChildren<MeshRenderer>(); for (int i = 0; i < componentsInChildren.Length; i++) { Object.Destroy((Object)(object)componentsInChildren[i]); } AddTrail(((Component)val2.GetComponentInChildren<ForcePoint>()).gameObject, curMat, val); } private void AddTrail(GameObject point, Material material, AnimationCurve widthCurve) { TrailRenderer obj = point.AddComponent<TrailRenderer>(); obj.time = 0.5f; ((Renderer)obj).material = material; obj.widthCurve = widthCurve; } } public class ForcedSkinChangeBehaviour : MonoBehaviour { private sealed class RendererMaterialEntry { public SkinnedMeshRenderer renderer; public Material[] forcedMaterials; } public Unit unit; private Material clonedMat; [SerializeField] private float updateInterval = 0.5f; private float timer; private readonly List<RendererMaterialEntry> cachedRenderers = new List<RendererMaterialEntry>(); private readonly Dictionary<int, Material[]> materialArrayCache = new Dictionary<int, Material[]>(); private void Start() { //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Expected O, but got Unknown unit = ((Component)((Component)this).transform.root).GetComponentInChildren<Unit>(); if ((Object)(object)unit == (Object)null) { ((Behaviour)this).enabled = false; return; } MeshRenderer componentInChildren = ((Component)this).GetComponentInChildren<MeshRenderer>(); if ((Object)(object)componentInChildren == (Object)null || ((Renderer)componentInChildren).sharedMaterials.Length == 0) { ((Behaviour)this).enabled = false; return; } clonedMat = new Material(((Renderer)componentInChildren).sharedMaterials[0]); SkinnedMeshRenderer[] componentsInChildren = ((Component)unit).GetComponentsInChildren<SkinnedMeshRenderer>(true); foreach (SkinnedMeshRenderer val in componentsInChildren) { if (!Object.op_Implicit((Object)(object)((Component)val).GetComponentInParent<PropItem>()) && !Object.op_Implicit((Object)(object)((Component)val).GetComponentInParent<WeaponItem>()) && !Object.op_Implicit((Object)(object)((Component)val).GetComponentInParent<CharacterItem>()) && !Object.op_Implicit((Object)(object)((Component)val).GetComponentInParent<SpecialAbility>())) { cachedRenderers.Add(new RendererMaterialEntry { renderer = val, forcedMaterials = GetMaterialArray(((Renderer)val).sharedMaterials.Length) }); } } ForceMaterials(); } private void OnDestroy() { if ((Object)(object)clonedMat != (Object)null) { Object.Destroy((Object)(object)clonedMat); } } private void Update() { timer += Time.deltaTime; if (!(timer < updateInterval)) { timer = 0f; ForceMaterials(); } } private Material[] GetMaterialArray(int count) { if (!materialArrayCache.TryGetValue(count, out var value)) { value = (Material[])(object)new Material[count]; for (int i = 0; i < count; i++) { value[i] = clonedMat; } materialArrayCache.Add(count, value); } return value; } private void ForceMaterials() { for (int num = cachedRenderers.Count - 1; num >= 0; num--) { RendererMaterialEntry rendererMaterialEntry = cachedRenderers[num]; if ((Object)(object)rendererMaterialEntry.renderer == (Object)null) { cachedRenderers.RemoveAt(num); } else if (((Renderer)rendererMaterialEntry.renderer).sharedMaterials != rendererMaterialEntry.for