using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using System.Text;
using AncientScepter;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Configuration;
using BepInEx.Logging;
using ClassicItemsReturns.Items;
using ClassicItemsReturns.Items.Uncommon;
using EntityStates;
using EntityStates.AI;
using EntityStates.BrotherMonster.Weapon;
using EntityStates.Captain.Weapon;
using EntityStates.Commando;
using EntityStates.Commando.CommandoWeapon;
using EntityStates.GlobalSkills.LunarDetonator;
using EntityStates.GlobalSkills.LunarNeedle;
using EntityStates.GolemMonster;
using EntityStates.Huntress;
using EntityStates.LemurianBruiserMonster;
using EntityStates.Mage.Weapon;
using Grumpy;
using HG;
using HG.BlendableTypes;
using HG.Reflection;
using HunkHud.Components.UI;
using HunkMod.Modules;
using HunkMod.Modules.Components;
using KinematicCharacterController;
using LostInTransit;
using MaterialHud;
using Microsoft.CodeAnalysis;
using On.EntityStates.AI;
using On.EntityStates.GlobalSkills.LunarDetonator;
using On.EntityStates.GlobalSkills.LunarNeedle;
using On.RoR2;
using On.RoR2.Skills;
using On.RoR2.UI;
using R2API;
using R2API.Networking;
using R2API.Networking.Interfaces;
using R2API.Utils;
using RiskOfOptions;
using RiskOfOptions.OptionConfigs;
using RiskOfOptions.Options;
using RoR2;
using RoR2.Achievements;
using RoR2.Audio;
using RoR2.CharacterAI;
using RoR2.ContentManagement;
using RoR2.HudOverlay;
using RoR2.Navigation;
using RoR2.Orbs;
using RoR2.Projectile;
using RoR2.Skills;
using RoR2.Stats;
using RoR2.UI;
using RoR2BepInExPack.GameAssetPathsBetter;
using RobDriver.Modules;
using RobDriver.Modules.Achievements;
using RobDriver.Modules.Components;
using RobDriver.Modules.Components.UI;
using RobDriver.Modules.Misc;
using RobDriver.Modules.Survivors;
using RobDriver.Modules.Weapons;
using RobDriver.SkillStates;
using RobDriver.SkillStates.BaseStates;
using RobDriver.SkillStates.Driver;
using RobDriver.SkillStates.Driver.ArmBFG;
using RobDriver.SkillStates.Driver.ArmCannon;
using RobDriver.SkillStates.Driver.ArtiGauntlet;
using RobDriver.SkillStates.Driver.BadassShotgun;
using RobDriver.SkillStates.Driver.Bazooka;
using RobDriver.SkillStates.Driver.BeetleShield;
using RobDriver.SkillStates.Driver.CaptainGun;
using RobDriver.SkillStates.Driver.FalsePistol;
using RobDriver.SkillStates.Driver.GoldenGun;
using RobDriver.SkillStates.Driver.GolemGun;
using RobDriver.SkillStates.Driver.GrenadeLauncher;
using RobDriver.SkillStates.Driver.HeavyMachineGun;
using RobDriver.SkillStates.Driver.LunarGrenade;
using RobDriver.SkillStates.Driver.LunarHammer;
using RobDriver.SkillStates.Driver.LunarPistol;
using RobDriver.SkillStates.Driver.LunarRifle;
using RobDriver.SkillStates.Driver.MachineGun;
using RobDriver.SkillStates.Driver.NemmandoGun;
using RobDriver.SkillStates.Driver.NemmandoSword;
using RobDriver.SkillStates.Driver.NemmercGun;
using RobDriver.SkillStates.Driver.PlasmaCannon;
using RobDriver.SkillStates.Driver.PyriteGun;
using RobDriver.SkillStates.Driver.RavSword;
using RobDriver.SkillStates.Driver.Revolver;
using RobDriver.SkillStates.Driver.RiotShotgun;
using RobDriver.SkillStates.Driver.RocketLauncher;
using RobDriver.SkillStates.Driver.SMG;
using RobDriver.SkillStates.Driver.Scepter;
using RobDriver.SkillStates.Driver.Scepter.SupplyDrop;
using RobDriver.SkillStates.Driver.Shotgun;
using RobDriver.SkillStates.Driver.Skateboard;
using RobDriver.SkillStates.Driver.SlugShotgun;
using RobDriver.SkillStates.Driver.SniperRifle;
using RobDriver.SkillStates.Driver.SupplyDrop;
using RobDriver.SkillStates.Driver.SupplyDrop.Nerfed;
using RobDriver.SkillStates.Driver.VoidPistol;
using RobDriver.SkillStates.Driver.VoidRifle;
using RobDriver.SkillStates.Emote;
using SS2;
using TMPro;
using Unity.Collections;
using Unity.Jobs;
using UnityEngine;
using UnityEngine.AddressableAssets;
using UnityEngine.Events;
using UnityEngine.Networking;
using UnityEngine.Rendering;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: OptIn]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: AssemblyInformationalVersion("1.0.0+dfea6aca895502727116b73aebd0f39fb3ce2c49")]
[assembly: AssemblyProduct("DriverMod")]
[assembly: AssemblyTitle("DriverMod")]
[assembly: AssemblyCompany("DriverMod")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: RefSafetyRules(11)]
[module: UnverifiableCode]
namespace Microsoft.CodeAnalysis
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
internal sealed class EmbeddedAttribute : Attribute
{
}
}
namespace System.Runtime.CompilerServices
{
[Microsoft.CodeAnalysis.Embedded]
[CompilerGenerated]
[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
internal sealed class RefSafetyRulesAttribute : Attribute
{
public readonly int Version;
public RefSafetyRulesAttribute(int P_0)
{
Version = P_0;
}
}
}
internal static class Log
{
internal static ManualLogSource _logSource;
internal static void Init(ManualLogSource logSource)
{
_logSource = logSource;
}
internal static void Debug(object data)
{
_logSource.LogDebug(data);
}
internal static void Error(object data)
{
_logSource.LogError(data);
}
internal static void Fatal(object data)
{
_logSource.LogFatal(data);
}
internal static void Info(object data)
{
_logSource.LogInfo(data);
}
internal static void Message(object data)
{
_logSource.LogMessage(data);
}
internal static void Warning(object data)
{
_logSource.LogWarning(data);
}
}
internal enum DriverCameraParams
{
DEFAULT,
AIM_PISTOL,
AIM_SNIPER,
EMOTE
}
public class StupidFuckingBullshit : MonoBehaviour
{
public ParticleSystem faggot;
private void Awake()
{
faggot = ((Component)this).GetComponentInChildren<ParticleSystem>();
((Component)faggot).transform.SetParent((Transform)null);
}
private void FixedUpdate()
{
//IL_0011: Unknown result type (might be due to invalid IL or missing references)
//IL_001c: Unknown result type (might be due to invalid IL or missing references)
((Component)faggot).transform.SetPositionAndRotation(((Component)this).transform.position, ((Component)this).transform.rotation);
}
}
[CreateAssetMenu(fileName = "blt", menuName = "ScriptableObjects/BulletDef", order = 2)]
public class DriverBulletDef : ScriptableObject
{
[Header("General")]
public string bulletName = "";
public string bulletNameToken = "";
public string description = "";
public string descriptionToken = "";
[Header("Visuals")]
public DriverWeaponTier tier = DriverWeaponTier.Common;
public Color trailColor = Color.black;
public DamageTypeCombo damageType = DamageTypeCombo.GenericPrimary;
[HideInInspector]
public ushort index;
[HideInInspector]
public bool enabled;
public static DriverBulletDef CreateBulletDefFromInfo(DriverBulletDefInfo bulletDefInfo)
{
//IL_004f: Unknown result type (might be due to invalid IL or missing references)
//IL_0054: Unknown result type (might be due to invalid IL or missing references)
//IL_0066: Unknown result type (might be due to invalid IL or missing references)
//IL_006b: Unknown result type (might be due to invalid IL or missing references)
//IL_007d: Unknown result type (might be due to invalid IL or missing references)
//IL_0082: Unknown result type (might be due to invalid IL or missing references)
DriverBulletDef driverBulletDef = ScriptableObject.CreateInstance<DriverBulletDef>();
((Object)driverBulletDef).name = bulletDefInfo.bulletName;
driverBulletDef.bulletName = bulletDefInfo.bulletName;
driverBulletDef.bulletNameToken = bulletDefInfo.bulletNameToken;
driverBulletDef.description = bulletDefInfo.description;
driverBulletDef.descriptionToken = bulletDefInfo.descriptionToken;
driverBulletDef.tier = bulletDefInfo.tier;
driverBulletDef.trailColor = bulletDefInfo.trailColor;
driverBulletDef.damageType.damageType = bulletDefInfo.damageType.GetValueOrDefault();
driverBulletDef.damageType.damageTypeExtended = bulletDefInfo.damageTypeExtended.GetValueOrDefault();
return driverBulletDef;
}
}
[Serializable]
public struct DriverBulletDefInfo
{
public string bulletName;
public string bulletNameToken;
public string description;
public string descriptionToken;
public DriverWeaponTier tier;
public Color trailColor;
public DamageType? damageType;
public DamageTypeExtended? damageTypeExtended;
public ModdedDamageType? moddedDamageType;
}
[CreateAssetMenu(fileName = "wpn", menuName = "ScriptableObjects/WeaponDef", order = 1)]
public class DriverWeaponDef : ScriptableObject
{
public enum AnimationSet
{
Default,
TwoHanded,
BigMelee
}
public enum BuffType
{
Crit,
Damage,
AttackSpeed
}
[Serializable]
public struct ModelSwapInfo
{
public Mesh mesh;
public Material material;
public string childName;
}
[Header("General")]
public string weaponName = "";
public string nameToken = "";
public string description = "";
public string descriptionToken = "";
public Sprite icon;
public DriverWeaponTier tier = DriverWeaponTier.Common;
public AnimationSet animationSet;
public BuffType buffType = BuffType.Damage;
public int shotCount = 8;
[Header("Skills")]
public SkillDef primarySkillDef;
public SkillDef secondarySkillDef;
public SkillDef arsenalSkillDef;
public UnlockableDef unlockableDef;
[Header("Visuals")]
public ModelSwapInfo[] modelSwapInfo = new ModelSwapInfo[1]
{
new ModelSwapInfo
{
childName = "PistolModel"
}
};
public GameObject crosshairPrefab;
public GameObject pickupPrefabOverride;
public Color? colorOverride;
public bool disableHolster;
[Header("Other")]
public string equipAnimationString = "BufferEmpty";
public string reloadAnimationString = "ReloadPistol";
public string calloutSoundString = "sfx_driver_callout_generic";
public string dropBodyName = "";
public float dropChance;
[HideInInspector]
public ushort index;
[HideInInspector]
public bool enabled;
public Mesh mesh
{
get
{
return modelSwapInfo[0].mesh;
}
set
{
modelSwapInfo[0].mesh = value;
}
}
public Material material
{
get
{
return modelSwapInfo[0].material;
}
set
{
modelSwapInfo[0].material = value;
}
}
public Color color => (Color)(((??)colorOverride) ?? Helpers.GetColorForTier(tier));
public GameObject pickupPrefab => pickupPrefabOverride ?? Helpers.GetPickupPrefabForTier(tier);
public static DriverWeaponDef CreateWeaponDefFromInfo(DriverWeaponDefInfo weaponDefInfo)
{
DriverWeaponDef driverWeaponDef = ScriptableObject.CreateInstance<DriverWeaponDef>();
((Object)driverWeaponDef).name = weaponDefInfo.name;
driverWeaponDef.weaponName = weaponDefInfo.name;
driverWeaponDef.nameToken = weaponDefInfo.nameToken;
driverWeaponDef.description = weaponDefInfo.description;
driverWeaponDef.descriptionToken = weaponDefInfo.descriptionToken;
driverWeaponDef.icon = weaponDefInfo.icon;
driverWeaponDef.tier = weaponDefInfo.tier;
driverWeaponDef.animationSet = weaponDefInfo.animationSet;
driverWeaponDef.buffType = weaponDefInfo.buffType;
driverWeaponDef.shotCount = weaponDefInfo.shotCount;
driverWeaponDef.primarySkillDef = weaponDefInfo.primarySkillDef;
driverWeaponDef.secondarySkillDef = weaponDefInfo.secondarySkillDef;
driverWeaponDef.arsenalSkillDef = weaponDefInfo.arsenalSkillDef;
driverWeaponDef.unlockableDef = weaponDefInfo.unlockableDef;
driverWeaponDef.mesh = weaponDefInfo.mesh;
driverWeaponDef.material = weaponDefInfo.material;
driverWeaponDef.crosshairPrefab = weaponDefInfo.crosshairPrefab;
driverWeaponDef.pickupPrefabOverride = weaponDefInfo.pickupPrefabOverride;
driverWeaponDef.colorOverride = weaponDefInfo.colorOveride;
driverWeaponDef.disableHolster = weaponDefInfo.disableHolster;
driverWeaponDef.equipAnimationString = weaponDefInfo.equipAnimationString;
driverWeaponDef.reloadAnimationString = weaponDefInfo.reloadAnimationString;
driverWeaponDef.calloutSoundString = weaponDefInfo.calloutSoundString;
driverWeaponDef.dropBodyName = weaponDefInfo.dropBodyName;
driverWeaponDef.dropChance = weaponDefInfo.dropChance;
return driverWeaponDef;
}
}
[Serializable]
public struct DriverWeaponDefInfo
{
public string name;
public string nameToken;
public string description;
public string descriptionToken;
public Sprite icon;
public DriverWeaponTier tier;
public DriverWeaponDef.AnimationSet animationSet;
public DriverWeaponDef.BuffType buffType;
public int shotCount;
public SkillDef primarySkillDef;
public SkillDef secondarySkillDef;
public SkillDef arsenalSkillDef;
public UnlockableDef unlockableDef;
public Mesh mesh;
public Material material;
public GameObject crosshairPrefab;
public GameObject pickupPrefabOverride;
public Color? colorOveride;
public bool disableHolster;
public string equipAnimationString;
public string reloadAnimationString;
public string calloutSoundString;
public string dropBodyName;
public float dropChance;
}
public enum DriverWeaponTier
{
NoTier,
Common,
Uncommon,
Legendary,
Unique,
Void,
Lunar
}
[CreateAssetMenu(fileName = "rsd", menuName = "ScriptableObjects/DriverWeaponSkinDef", order = 3)]
public class DriverWeaponSkinDef : ScriptableObject
{
[Serializable]
public struct DriverWeaponSkinDefInfo
{
public string nameToken;
public string mainSkinName;
public ushort weaponDefIndex;
public DriverWeaponDef.ModelSwapInfo[] modelSwapInfo;
}
[Header("General")]
public string nameToken = "";
public string mainSkinName = "";
public ushort weaponDefIndex;
public DriverWeaponDef.ModelSwapInfo[] modelSwapInfo;
public Mesh mesh
{
get
{
return modelSwapInfo[0].mesh;
}
set
{
modelSwapInfo[0].mesh = value;
}
}
public Material material
{
get
{
return modelSwapInfo[0].material;
}
set
{
modelSwapInfo[0].material = value;
}
}
public static DriverWeaponSkinDef CreateWeaponSkinDefFromInfo(DriverWeaponSkinDefInfo skinDefInfo)
{
DriverWeaponSkinDef driverWeaponSkinDef = ScriptableObject.CreateInstance<DriverWeaponSkinDef>();
driverWeaponSkinDef.nameToken = skinDefInfo.nameToken;
driverWeaponSkinDef.mainSkinName = skinDefInfo.mainSkinName;
driverWeaponSkinDef.weaponDefIndex = skinDefInfo.weaponDefIndex;
driverWeaponSkinDef.modelSwapInfo = skinDefInfo.modelSwapInfo;
return driverWeaponSkinDef;
}
}
internal class BodyInfo
{
internal string bodyName = "";
internal string bodyNameToken = "";
internal string subtitleNameToken = "";
internal Color bodyColor = Color.white;
internal Texture characterPortrait;
internal GameObject crosshair;
internal GameObject podPrefab;
internal float maxHealth = 100f;
internal float healthGrowth = 2f;
internal float healthRegen;
internal float shield;
internal float shieldGrowth;
internal float moveSpeed = 7f;
internal float moveSpeedGrowth;
internal float acceleration = 80f;
internal float jumpPower = 15f;
internal float jumpPowerGrowth;
internal float damage = 12f;
internal float attackSpeed = 1f;
internal float attackSpeedGrowth;
internal float armor;
internal float armorGrowth;
internal float crit = 1f;
internal float critGrowth;
internal int jumpCount = 1;
}
internal class CustomRendererInfo
{
internal string childName;
internal Material material;
internal bool ignoreOverlays;
}
internal class SkillDefInfo
{
public string skillName;
public string skillNameToken;
public string skillDescriptionToken;
public string[] keywordTokens = Array.Empty<string>();
public Sprite skillIcon;
public SerializableEntityStateType activationState;
public InterruptPriority interruptPriority;
public string activationStateMachineName;
public float baseRechargeInterval;
public int baseMaxStock = 1;
public int rechargeStock = 1;
public int requiredStock = 1;
public int stockToConsume = 1;
public bool isCombatSkill = true;
public bool canceledFromSprinting;
public bool forceSprintDuringState;
public bool cancelSprintingOnActivation = true;
public bool beginSkillCooldownOnSkillEnd;
public bool fullRestockOnAssign = true;
public bool resetCooldownTimerOnUse;
public bool mustKeyPress;
public bool autoHandleLuminousShot = true;
public SkillDefInfo()
{
}
public SkillDefInfo(string skillName, string skillNameToken, string skillDescriptionToken, Sprite skillIcon, SerializableEntityStateType activationState, string activationStateMachineName, InterruptPriority interruptPriority, bool isCombatSkill, float baseRechargeInterval)
{
//IL_0067: Unknown result type (might be due to invalid IL or missing references)
//IL_0069: Unknown result type (might be due to invalid IL or missing references)
//IL_0077: Unknown result type (might be due to invalid IL or missing references)
//IL_0079: Unknown result type (might be due to invalid IL or missing references)
this.skillName = skillName;
this.skillNameToken = skillNameToken;
this.skillDescriptionToken = skillDescriptionToken;
this.skillIcon = skillIcon;
this.activationState = activationState;
this.activationStateMachineName = activationStateMachineName;
this.interruptPriority = interruptPriority;
this.isCombatSkill = isCombatSkill;
this.baseRechargeInterval = baseRechargeInterval;
}
public SkillDefInfo(string skillName, string skillNameToken, string skillDescriptionToken, Sprite skillIcon, SerializableEntityStateType activationState, string activationStateMachineName = "Weapon", bool agile = false)
{
//IL_0067: Unknown result type (might be due to invalid IL or missing references)
//IL_0069: Unknown result type (might be due to invalid IL or missing references)
//IL_0078: Unknown result type (might be due to invalid IL or missing references)
this.skillName = skillName;
this.skillNameToken = skillNameToken;
this.skillDescriptionToken = skillDescriptionToken;
this.skillIcon = skillIcon;
this.activationState = activationState;
this.activationStateMachineName = activationStateMachineName;
interruptPriority = (InterruptPriority)0;
isCombatSkill = true;
baseRechargeInterval = 0f;
requiredStock = 0;
stockToConsume = 0;
cancelSprintingOnActivation = !agile;
if (agile)
{
keywordTokens = new string[1] { "KEYWORD_AGILE" };
}
}
}
namespace RobDriver
{
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[NetworkCompatibility(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInPlugin("com.rob.Driver", "Driver", "2.3.5")]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInDependency(/*Could not decode attribute arguments.*/)]
public class DriverPlugin : BaseUnityPlugin
{
public const string MODUID = "com.rob.Driver";
public const string MODNAME = "Driver";
public const string MODVERSION = "2.3.5";
public const string developerPrefix = "ROB";
public static DriverPlugin instance;
public static bool StarstormInstalled => Chainloader.PluginInfos.ContainsKey("com.TeamMoonstorm");
public static bool ScepterInstalled => Chainloader.PluginInfos.ContainsKey("com.DestroyedClone.AncientScepter");
public static bool RooInstalled => Chainloader.PluginInfos.ContainsKey("com.rune580.riskofoptions");
public static bool LitInstalled => Chainloader.PluginInfos.ContainsKey("com.ContactLight.LostInTransit");
public static bool ClassicItemsInstalled => Chainloader.PluginInfos.ContainsKey("com.RiskySleeps.ClassicItemsReturns");
public static bool RiskUIInstalled => Chainloader.PluginInfos.ContainsKey("bubbet.riskui");
public static bool ExtendedLoadoutInstalled => Chainloader.PluginInfos.ContainsKey("com.KingEnderBrine.ExtendedLoadout");
public static bool GreenAlienHeadInstalled => Chainloader.PluginInfos.ContainsKey("com.Borbo.GreenAlienHead");
public static bool RavagerInstalled => Chainloader.PluginInfos.ContainsKey("com.rob.Ravager");
public static bool HunkInstalled => Chainloader.PluginInfos.ContainsKey("com.rob.Hunk");
public static bool HunkHudInstalled => Chainloader.PluginInfos.ContainsKey("com.public_ParticleSystem.HunkHud");
public static bool CleanerHudInstalled => Chainloader.PluginInfos.ContainsKey("LordVGames.CleanestHud");
private void Awake()
{
instance = this;
Log.Init(((BaseUnityPlugin)this).Logger);
Config.ReadConfig(((BaseUnityPlugin)this).Config);
Assets.PopulateAssets();
CameraParams.InitializeParams();
States.RegisterStates();
Projectiles.RegisterProjectiles();
Tokens.AddTokens();
ItemDisplays.PopulateDisplays();
NetMessages.RegisterNetworkMessages();
Unlockables.Init();
new Driver().CreateCharacter();
new ContentPacks().Initialize();
}
public static float GetICBMDamageMult(CharacterBody body)
{
float num = 1f;
if (Object.op_Implicit((Object)(object)body) && Object.op_Implicit((Object)(object)body.inventory))
{
int num2 = body.inventory.GetItemCountEffective(Items.MoreMissile) - 1;
if (num2 > 0)
{
num += (float)num2 * 0.5f;
}
}
return num;
}
[MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)]
public static bool CheckIfBodyIsTerminal(CharacterBody body)
{
return body.HasBuff(Buffs.BuffTerminationVFX);
}
[MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)]
public static bool IsHunkHudGlobal()
{
return Config.globalCustomHUD.Value;
}
[MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)]
public static void AddHunkFlashbang(GameObject prefab)
{
prefab.AddComponent<FlashbangNearby>();
}
[MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)]
public static GameObject GetHunkExplosion()
{
return HunkAssets.explosionEffect;
}
[MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)]
public static GameObject GetHunkExplosionSmall()
{
return HunkAssets.smallExplosionEffect;
}
[MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)]
public static bool IsItemGoldenGun(ItemIndex itemIndex)
{
//IL_0011: Unknown result type (might be due to invalid IL or missing references)
//IL_0016: Unknown result type (might be due to invalid IL or missing references)
ItemDef goldenGun = Items.GoldenGun;
if (!Object.op_Implicit((Object)(object)goldenGun))
{
return false;
}
return goldenGun.itemIndex == itemIndex;
}
[MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)]
public static bool IsItemGoldenGun2(ItemIndex itemIndex)
{
//IL_0021: 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)
GoldenGun val = ItemBase<GoldenGun>.Instance;
if (!Object.op_Implicit((Object)(object)((ItemBase)(val?)).ItemDef))
{
return false;
}
return ((ItemBase)val).ItemDef.itemIndex == itemIndex;
}
[MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)]
public static bool IsItemScepter(ItemIndex itemIndex)
{
//IL_0021: 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)
AncientScepterItem val = ItemBase<AncientScepterItem>.instance;
if (!Object.op_Implicit((Object)(object)((val != null) ? ((ItemBase)val).ItemDef : null)))
{
return false;
}
return ((ItemBase)val).ItemDef.itemIndex == itemIndex;
}
}
public static class DriverBulletCatalog
{
public static DriverBulletDef[] bulletDefs = Array.Empty<DriverBulletDef>();
public static DriverBulletDef Default;
internal static DriverBulletDef Stunning;
internal static DriverBulletDef Incendiary;
internal static DriverBulletDef Serrated;
internal static DriverBulletDef Poison;
internal static DriverBulletDef Weakening;
internal static DriverBulletDef Executing;
internal static DriverBulletDef Blighting;
internal static DriverBulletDef Resetting;
internal static DriverBulletDef Crippling;
internal static DriverBulletDef Fruitful;
internal static DriverBulletDef Frostbite;
internal static DriverBulletDef Nullifying;
internal static DriverBulletDef Coin;
internal static DriverBulletDef Explosive;
internal static DriverBulletDef Missile;
internal static DriverBulletDef Flaming;
internal static DriverBulletDef Icy;
internal static DriverBulletDef Sticky;
internal static DriverBulletDef Mystery;
internal static DriverBulletDef Hemorrhaging;
internal static DriverBulletDef Helfire;
internal static DriverBulletDef Infernal;
internal static DriverBulletDef Dagger;
internal static DriverBulletDef Lightning;
internal static DriverBulletDef Fireball;
internal static DriverBulletDef Hook;
internal static DriverBulletDef Ruinous;
internal static DriverBulletDef GiantSlayer;
internal static DriverBulletDef Disabling;
internal static DriverBulletDef Gouging;
internal static DriverBulletDef VoidMissile;
internal static DriverBulletDef VoidLightning;
internal static DriverBulletDef Collapse;
internal static void InitBulletDefs()
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_001c: 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_0046: Unknown result type (might be due to invalid IL or missing references)
//IL_0061: Unknown result type (might be due to invalid IL or missing references)
//IL_007b: Unknown result type (might be due to invalid IL or missing references)
//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
//IL_00ae: 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_00f5: Unknown result type (might be due to invalid IL or missing references)
//IL_00fa: Unknown result type (might be due to invalid IL or missing references)
//IL_0125: Unknown result type (might be due to invalid IL or missing references)
//IL_012a: 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_014f: Unknown result type (might be due to invalid IL or missing references)
//IL_0154: Unknown result type (might be due to invalid IL or missing references)
//IL_0159: Unknown result type (might be due to invalid IL or missing references)
//IL_0182: Unknown result type (might be due to invalid IL or missing references)
//IL_0187: Unknown result type (might be due to invalid IL or missing references)
//IL_01b2: Unknown result type (might be due to invalid IL or missing references)
//IL_01b7: Unknown result type (might be due to invalid IL or missing references)
//IL_01d3: Unknown result type (might be due to invalid IL or missing references)
//IL_01ef: Unknown result type (might be due to invalid IL or missing references)
//IL_01f4: Unknown result type (might be due to invalid IL or missing references)
//IL_0209: Unknown result type (might be due to invalid IL or missing references)
//IL_022d: Unknown result type (might be due to invalid IL or missing references)
//IL_0232: Unknown result type (might be due to invalid IL or missing references)
//IL_0237: Unknown result type (might be due to invalid IL or missing references)
//IL_024c: Unknown result type (might be due to invalid IL or missing references)
//IL_0251: Unknown result type (might be due to invalid IL or missing references)
//IL_0274: Unknown result type (might be due to invalid IL or missing references)
//IL_0279: Unknown result type (might be due to invalid IL or missing references)
//IL_027e: Unknown result type (might be due to invalid IL or missing references)
//IL_0295: Unknown result type (might be due to invalid IL or missing references)
//IL_02bd: Unknown result type (might be due to invalid IL or missing references)
//IL_02c2: Unknown result type (might be due to invalid IL or missing references)
//IL_02c7: Unknown result type (might be due to invalid IL or missing references)
//IL_02ea: Unknown result type (might be due to invalid IL or missing references)
//IL_02ef: Unknown result type (might be due to invalid IL or missing references)
//IL_02f4: Unknown result type (might be due to invalid IL or missing references)
//IL_030b: Unknown result type (might be due to invalid IL or missing references)
//IL_0325: Unknown result type (might be due to invalid IL or missing references)
//IL_032a: Unknown result type (might be due to invalid IL or missing references)
//IL_033f: Unknown result type (might be due to invalid IL or missing references)
//IL_0344: Unknown result type (might be due to invalid IL or missing references)
//IL_036a: Unknown result type (might be due to invalid IL or missing references)
//IL_036f: Unknown result type (might be due to invalid IL or missing references)
//IL_0374: Unknown result type (might be due to invalid IL or missing references)
//IL_039a: Unknown result type (might be due to invalid IL or missing references)
//IL_039f: Unknown result type (might be due to invalid IL or missing references)
//IL_03a4: Unknown result type (might be due to invalid IL or missing references)
//IL_03b9: Unknown result type (might be due to invalid IL or missing references)
//IL_03be: Unknown result type (might be due to invalid IL or missing references)
//IL_03d3: Unknown result type (might be due to invalid IL or missing references)
//IL_03d8: Unknown result type (might be due to invalid IL or missing references)
//IL_03fb: Unknown result type (might be due to invalid IL or missing references)
//IL_0400: Unknown result type (might be due to invalid IL or missing references)
//IL_0405: Unknown result type (might be due to invalid IL or missing references)
//IL_041a: Unknown result type (might be due to invalid IL or missing references)
//IL_0435: Unknown result type (might be due to invalid IL or missing references)
//IL_043a: Unknown result type (might be due to invalid IL or missing references)
//IL_0450: Unknown result type (might be due to invalid IL or missing references)
//IL_0455: Unknown result type (might be due to invalid IL or missing references)
//IL_0478: Unknown result type (might be due to invalid IL or missing references)
//IL_047d: Unknown result type (might be due to invalid IL or missing references)
//IL_0482: Unknown result type (might be due to invalid IL or missing references)
//IL_0498: Unknown result type (might be due to invalid IL or missing references)
Default = CreateBulletType("Default", DriverWeaponTier.NoTier, Color.white, (DamageType)0);
Stunning = CreateBulletType("Stunning", DriverWeaponTier.Common, Color.gray, (DamageType)32);
Incendiary = CreateBulletType("Incendiary", DriverWeaponTier.Common, Color32.op_Implicit(new Color32(byte.MaxValue, (byte)127, (byte)80, byte.MaxValue)), (DamageType)128);
Serrated = CreateBulletType("Serrated", DriverWeaponTier.Common, DamageColor.FindColor((DamageColorIndex)2), (DamageType)1024);
Poison = CreateBulletType("Poison", DriverWeaponTier.Common, Color.green, (DamageType)4096);
Weakening = CreateBulletType("Weakening", DriverWeaponTier.Common, Color32.op_Implicit(new Color32((byte)220, (byte)237, (byte)159, byte.MaxValue)), (DamageType)16384);
Executing = CreateBulletType("Executing", DriverWeaponTier.Uncommon, DamageColor.FindColor((DamageColorIndex)11), (DamageType)524288);
Blighting = CreateBulletType("Blighting", DriverWeaponTier.Common, Color32.op_Implicit(new Color32((byte)222, (byte)85, (byte)230, byte.MaxValue)), (DamageType)1048576);
Coin = CreateBulletType("Coin", DriverWeaponTier.Common, Color32.op_Implicit(new Color32(byte.MaxValue, (byte)212, (byte)94, byte.MaxValue)), DriverDamageTypes.CoinShot);
Mystery = CreateBulletType("Mystery", DriverWeaponTier.Common, Color32.op_Implicit(new Color32((byte)30, (byte)51, (byte)45, byte.MaxValue)), DriverDamageTypes.MysteryShot);
Fruitful = CreateBulletType("Fruity", DriverWeaponTier.Common, Color32.op_Implicit(new Color32(byte.MaxValue, (byte)191, (byte)225, byte.MaxValue)), (DamageType)536870912);
Crippling = CreateBulletType("Crippling", DriverWeaponTier.Common, Color32.op_Implicit(new Color32((byte)48, (byte)205, (byte)217, byte.MaxValue)), (DamageType)4194304);
Nullifying = CreateBulletType("Nullifying", DriverWeaponTier.Common, DamageColor.FindColor((DamageColorIndex)9), (DamageType)32768);
Collapse = CreateBulletType("Collapse", DriverWeaponTier.Uncommon, DamageColor.FindColor((DamageColorIndex)9), DriverDamageTypes.Collapse);
Resetting = CreateBulletType("Resetting", DriverWeaponTier.Uncommon, Color.red, (DamageType)4);
VoidMissile = CreateBulletType("Void Missile", DriverWeaponTier.Uncommon, Color32.op_Implicit(new Color32((byte)122, (byte)69, (byte)173, byte.MaxValue)), DriverDamageTypes.VoidMissileShot);
Explosive = CreateBulletType("Explosive", DriverWeaponTier.Uncommon, Color.yellow, DriverDamageTypes.ExplosiveRounds);
Sticky = CreateBulletType("Sticky", DriverWeaponTier.Uncommon, Color32.op_Implicit(new Color32(byte.MaxValue, (byte)117, (byte)48, byte.MaxValue)), DriverDamageTypes.StickyShot);
Disabling = CreateBulletType("Disabling", DriverWeaponTier.Uncommon, DamageColor.FindColor((DamageColorIndex)15), (DamageTypeExtended)1073741824);
Flaming = CreateBulletType("Elemental Flame", DriverWeaponTier.Uncommon, Color32.op_Implicit(new Color32(byte.MaxValue, (byte)127, (byte)80, byte.MaxValue)), DriverDamageTypes.FlameTornadoShot);
Infernal = CreateBulletType("Infernal", DriverWeaponTier.Uncommon, Color32.op_Implicit(new Color32(byte.MaxValue, (byte)127, (byte)80, byte.MaxValue)), DriverDamageTypes.BetterBurn);
Ruinous = CreateBulletType("Ruinous", DriverWeaponTier.Uncommon, DamageColor.FindColor((DamageColorIndex)13), (DamageType)1073741824);
Icy = CreateBulletType("Elemental Ice", DriverWeaponTier.Uncommon, Color.cyan, DriverDamageTypes.IceBlastShot);
Hook = CreateBulletType("Hook", DriverWeaponTier.Uncommon, Color.grey, DriverDamageTypes.HookShot);
VoidLightning = CreateBulletType("Void Lightning", DriverWeaponTier.Legendary, Color32.op_Implicit(new Color32((byte)194, (byte)115, byte.MaxValue, byte.MaxValue)), DriverDamageTypes.VoidLightning);
Missile = CreateBulletType("Missile", DriverWeaponTier.Legendary, Color32.op_Implicit(new Color32((byte)219, (byte)132, (byte)11, byte.MaxValue)), DriverDamageTypes.MissileShot);
Dagger = CreateBulletType("Dagger", DriverWeaponTier.Legendary, Color.black, DriverDamageTypes.DaggerShot);
Lightning = CreateBulletType("Lightning", DriverWeaponTier.Legendary, Color.cyan, DriverDamageTypes.LightningStrikeRounds);
Fireball = CreateBulletType("Fireball", DriverWeaponTier.Legendary, Color32.op_Implicit(new Color32(byte.MaxValue, (byte)127, (byte)80, byte.MaxValue)), DriverDamageTypes.FireballRounds);
Frostbite = CreateBulletType("Frostbite", DriverWeaponTier.Legendary, Color.cyan, (DamageType)256);
Gouging = CreateBulletType("Gouging", DriverWeaponTier.Unique, DamageColor.FindColor((DamageColorIndex)8), DriverDamageTypes.Gouge);
Hemorrhaging = CreateBulletType("Hemorrhaging", DriverWeaponTier.Unique, DamageColor.FindColor((DamageColorIndex)8), DriverDamageTypes.Hemorrhage);
Helfire = CreateBulletType("Helfire", DriverWeaponTier.Unique, Color32.op_Implicit(new Color32(byte.MaxValue, (byte)127, (byte)127, byte.MaxValue)), DriverDamageTypes.Helfire);
GiantSlayer = CreateBulletType("Giant Slayer", DriverWeaponTier.Unique, DamageColor.FindColor((DamageColorIndex)7), (DamageTypeExtended)268435456);
}
public static DriverBulletDef CreateBulletType(string bulletName, DriverWeaponTier tier, Color color, DamageType damageType)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0003: Unknown result type (might be due to invalid IL or missing references)
return CreateBulletType(bulletName, tier, color, damageType, null, null);
}
public static DriverBulletDef CreateBulletType(string bulletName, DriverWeaponTier tier, Color color, DamageTypeExtended damageType)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_000c: Unknown result type (might be due to invalid IL or missing references)
return CreateBulletType(bulletName, tier, color, null, damageType, null);
}
public static DriverBulletDef CreateBulletType(string bulletName, DriverWeaponTier tier, Color color, ModdedDamageType damageType)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0015: Unknown result type (might be due to invalid IL or missing references)
return CreateBulletType(bulletName, tier, color, null, null, damageType);
}
public static DriverBulletDef CreateBulletType(string bulletName, DriverWeaponTier tier, Color color, DamageType? damageType, DamageTypeExtended? damageTypeExtended, ModdedDamageType? moddedDamageType)
{
//IL_0074: Unknown result type (might be due to invalid IL or missing references)
//IL_0075: Unknown result type (might be due to invalid IL or missing references)
DriverBulletDefInfo bulletDefInfo = default(DriverBulletDefInfo);
bulletDefInfo.bulletName = bulletName;
bulletDefInfo.bulletNameToken = "ROB_DRIVER_BULLET_" + bulletName.ToUpper() + "_NAME";
bulletDefInfo.description = bulletName;
bulletDefInfo.descriptionToken = "ROB_DRIVER_BULLET_" + bulletName.ToUpper() + "_DESC";
bulletDefInfo.damageType = damageType;
bulletDefInfo.damageTypeExtended = damageTypeExtended;
bulletDefInfo.moddedDamageType = moddedDamageType;
bulletDefInfo.tier = tier;
bulletDefInfo.trailColor = color;
return CreateAndAddBullet(bulletDefInfo);
}
public static DriverBulletDef CreateAndAddBullet(DriverBulletDefInfo bulletDefInfo)
{
//IL_007b: Unknown result type (might be due to invalid IL or missing references)
//IL_0072: Unknown result type (might be due to invalid IL or missing references)
if (!string.IsNullOrEmpty(bulletDefInfo.bulletNameToken) && !string.IsNullOrEmpty(bulletDefInfo.bulletName))
{
LanguageAPI.Add(bulletDefInfo.bulletNameToken, bulletDefInfo.bulletName);
}
if (!string.IsNullOrEmpty(bulletDefInfo.descriptionToken) && !string.IsNullOrEmpty(bulletDefInfo.description))
{
LanguageAPI.Add(bulletDefInfo.descriptionToken, bulletDefInfo.description);
}
DriverBulletDef driverBulletDef = DriverBulletDef.CreateBulletDefFromInfo(bulletDefInfo);
DamageAPI.AddModdedDamageType(ref driverBulletDef.damageType, (ModdedDamageType)(((??)bulletDefInfo.moddedDamageType) ?? DriverDamageTypes.Generic));
return CreateAndAddBullet(driverBulletDef);
}
public static DriverBulletDef CreateAndAddBullet(DriverBulletDef bulletDef)
{
Array.Resize(ref bulletDefs, bulletDefs.Length + 1);
int num = bulletDefs.Length - 1;
bulletDef.index = (ushort)num;
bulletDefs[num] = bulletDef;
Config.InitBulletConfig(bulletDef);
Log.Debug("Added " + bulletDef.bulletName + " to catalog with tier: " + bulletDef.tier);
return bulletDef;
}
public static DriverBulletDef GetBulletFromIndex(int index)
{
return ArrayUtils.GetSafe<DriverBulletDef>(bulletDefs, index, ref Default);
}
public static DriverBulletDef GetWeightedRandomBullet(DriverWeaponTier tier)
{
int num = 60;
int num2 = ((tier >= DriverWeaponTier.Uncommon) ? 35 : 0);
int num3 = ((tier >= DriverWeaponTier.Legendary) ? 2 : 0);
int num4 = ((tier >= DriverWeaponTier.Unique) ? 1 : 0);
int num5 = Random.Range(0, num + num2 + num3 + num4);
if (num5 < num)
{
tier = DriverWeaponTier.Common;
}
else if (num5 < num + num2)
{
tier = DriverWeaponTier.Uncommon;
}
else if (num5 < num + num2 + num3)
{
tier = DriverWeaponTier.Legendary;
}
return GetRandomBulletFromTier(tier);
}
public static DriverBulletDef GetRandomBulletFromTier(DriverWeaponTier tier)
{
List<DriverBulletDef> list = new List<DriverBulletDef>();
DriverBulletDef[] array = bulletDefs;
foreach (DriverBulletDef driverBulletDef in array)
{
if (driverBulletDef.enabled && driverBulletDef.tier != 0)
{
if (driverBulletDef.tier == tier)
{
list.Add(driverBulletDef);
}
if (Config.uniqueDropsAreLegendary.Value && tier == DriverWeaponTier.Legendary && driverBulletDef.tier > DriverWeaponTier.Legendary)
{
list.Add(driverBulletDef);
}
}
}
if (list.Count <= 0)
{
return Default;
}
return list[Random.Range(0, list.Count)];
}
}
public static class DriverWeaponCatalog
{
public struct WeaponDrop
{
public ushort weaponIndex;
public float dropChance;
public WeaponDrop(ushort weaponIndex, float dropChance)
{
this.weaponIndex = weaponIndex;
this.dropChance = dropChance;
}
}
public static Dictionary<BodyIndex, WeaponDrop> weaponDrops = new Dictionary<BodyIndex, WeaponDrop>();
public static DriverWeaponDef[] weaponDefs = Array.Empty<DriverWeaponDef>();
internal static DriverWeaponDef Pistol;
internal static DriverWeaponDef LunarPistol;
internal static DriverWeaponDef VoidPistol;
internal static DriverWeaponDef PyriteGun;
internal static DriverWeaponDef BeetleShield;
internal static DriverWeaponDef Needler;
internal static DriverWeaponDef GoldenGun;
internal static DriverWeaponDef Shotgun;
internal static DriverWeaponDef RiotShotgun;
internal static DriverWeaponDef SlugShotgun;
internal static DriverWeaponDef MachineGun;
internal static DriverWeaponDef HeavyMachineGun;
internal static DriverWeaponDef Sniper;
internal static DriverWeaponDef Bazooka;
internal static DriverWeaponDef GrenadeLauncher;
internal static DriverWeaponDef RocketLauncher;
internal static DriverWeaponDef Behemoth;
internal static DriverWeaponDef PrototypeRocketLauncher;
internal static DriverWeaponDef ArmCannon;
internal static DriverWeaponDef PlasmaCannon;
internal static DriverWeaponDef BadassShotgun;
internal static DriverWeaponDef LunarRifle;
internal static DriverWeaponDef LunarHammer;
internal static DriverWeaponDef NemmandoGun;
internal static DriverWeaponDef NemmercGun;
internal static DriverWeaponDef GolemRifle;
internal static void InitWeaponDefs()
{
//IL_00d7: Unknown result type (might be due to invalid IL or missing references)
//IL_01f6: Unknown result type (might be due to invalid IL or missing references)
//IL_01fb: Unknown result type (might be due to invalid IL or missing references)
//IL_0222: Unknown result type (might be due to invalid IL or missing references)
//IL_0341: Unknown result type (might be due to invalid IL or missing references)
//IL_0346: Unknown result type (might be due to invalid IL or missing references)
//IL_036d: Unknown result type (might be due to invalid IL or missing references)
//IL_04aa: Unknown result type (might be due to invalid IL or missing references)
//IL_05bd: Unknown result type (might be due to invalid IL or missing references)
//IL_05c2: Unknown result type (might be due to invalid IL or missing references)
//IL_05e9: Unknown result type (might be due to invalid IL or missing references)
//IL_06b1: Unknown result type (might be due to invalid IL or missing references)
//IL_06b6: Unknown result type (might be due to invalid IL or missing references)
//IL_06ca: Unknown result type (might be due to invalid IL or missing references)
//IL_06cf: Unknown result type (might be due to invalid IL or missing references)
//IL_073a: Unknown result type (might be due to invalid IL or missing references)
//IL_0870: Unknown result type (might be due to invalid IL or missing references)
//IL_13a3: Unknown result type (might be due to invalid IL or missing references)
//IL_13a8: Unknown result type (might be due to invalid IL or missing references)
//IL_1429: Unknown result type (might be due to invalid IL or missing references)
//IL_142e: Unknown result type (might be due to invalid IL or missing references)
//IL_1a21: Unknown result type (might be due to invalid IL or missing references)
//IL_1a26: Unknown result type (might be due to invalid IL or missing references)
//IL_1a4d: Unknown result type (might be due to invalid IL or missing references)
//IL_1b5f: Unknown result type (might be due to invalid IL or missing references)
//IL_1b64: Unknown result type (might be due to invalid IL or missing references)
//IL_1b8b: Unknown result type (might be due to invalid IL or missing references)
//IL_1cb6: Unknown result type (might be due to invalid IL or missing references)
//IL_1df2: Unknown result type (might be due to invalid IL or missing references)
//IL_1f05: Unknown result type (might be due to invalid IL or missing references)
//IL_1f0a: Unknown result type (might be due to invalid IL or missing references)
DriverWeaponDefInfo weaponDefInfo = default(DriverWeaponDefInfo);
weaponDefInfo.name = "Pistol";
weaponDefInfo.nameToken = "ROB_DRIVER_PISTOL_NAME";
weaponDefInfo.description = "A reliable handgun that excels at nothing.";
weaponDefInfo.descriptionToken = "ROB_DRIVER_PISTOL_DESC";
weaponDefInfo.icon = Assets.mainAssetBundle.LoadAsset<Sprite>("texPistolWeaponIcon");
weaponDefInfo.tier = DriverWeaponTier.NoTier;
weaponDefInfo.animationSet = DriverWeaponDef.AnimationSet.Default;
weaponDefInfo.buffType = DriverWeaponDef.BuffType.Crit;
weaponDefInfo.shotCount = 26;
weaponDefInfo.primarySkillDef = Skills.pistolPrimarySkillDef;
weaponDefInfo.secondarySkillDef = Skills.pistolSecondarySkillDef;
weaponDefInfo.arsenalSkillDef = Skills.CreateAndAddWeaponSkillDef("PISTOL");
weaponDefInfo.unlockableDef = null;
weaponDefInfo.mesh = Assets.LoadMesh("meshPistol");
weaponDefInfo.material = Assets.pistolMat;
weaponDefInfo.crosshairPrefab = Assets.defaultCrosshairPrefab;
weaponDefInfo.pickupPrefabOverride = Assets.commonPickupModel;
weaponDefInfo.colorOveride = Helpers.uniqueItemColor;
weaponDefInfo.reloadAnimationString = "ReloadPistol";
weaponDefInfo.equipAnimationString = "EquipPistol";
weaponDefInfo.calloutSoundString = "";
weaponDefInfo.dropChance = 0f;
weaponDefInfo.disableHolster = false;
weaponDefInfo.dropBodyName = "";
Pistol = CreateAndAddWeapon(weaponDefInfo);
weaponDefInfo = default(DriverWeaponDefInfo);
weaponDefInfo.name = "Lunar Pistol";
weaponDefInfo.nameToken = "ROB_DRIVER_LUNAR_PISTOL_NAME";
weaponDefInfo.description = "A perfect weapon with no flaws. Speed is war.";
weaponDefInfo.descriptionToken = "ROB_DRIVER_LUNAR_PISTOL_DESC";
weaponDefInfo.icon = Assets.mainAssetBundle.LoadAsset<Sprite>("texLunarPistolWeaponIcon");
weaponDefInfo.tier = DriverWeaponTier.NoTier;
weaponDefInfo.animationSet = DriverWeaponDef.AnimationSet.Default;
weaponDefInfo.buffType = DriverWeaponDef.BuffType.Damage;
weaponDefInfo.shotCount = 52;
weaponDefInfo.primarySkillDef = Skills.lunarPistolPrimarySkillDef;
weaponDefInfo.secondarySkillDef = Skills.lunarPistolSecondarySkillDef;
weaponDefInfo.arsenalSkillDef = Skills.CreateAndAddWeaponSkillDef("LUNAR_PISTOL");
weaponDefInfo.unlockableDef = Unlockables.CreateAndAddWeaponUnlockableDef("LUNAR_PISTOL");
weaponDefInfo.mesh = Assets.LoadMesh("meshLunarPistol");
weaponDefInfo.material = Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/LunarGolem/matLunarGolem.mat").WaitForCompletion();
weaponDefInfo.crosshairPrefab = Assets.defaultCrosshairPrefab;
weaponDefInfo.pickupPrefabOverride = Assets.lunarPickupModel;
weaponDefInfo.colorOveride = Helpers.lunarItemColor;
weaponDefInfo.reloadAnimationString = "ReloadPistol";
weaponDefInfo.equipAnimationString = "EquipPistol";
weaponDefInfo.calloutSoundString = "";
weaponDefInfo.dropChance = 0f;
weaponDefInfo.disableHolster = false;
weaponDefInfo.dropBodyName = "";
LunarPistol = CreateAndAddWeapon(weaponDefInfo);
weaponDefInfo = default(DriverWeaponDefInfo);
weaponDefInfo.name = "Void Pistol";
weaponDefInfo.nameToken = "ROB_DRIVER_VOID_PISTOL_NAME";
weaponDefInfo.description = "A weapon corrupted and powered up by the void.";
weaponDefInfo.descriptionToken = "ROB_DRIVER_VOID_PISTOL_DESC";
weaponDefInfo.icon = Assets.mainAssetBundle.LoadAsset<Sprite>("texVoidPistolWeaponIcon");
weaponDefInfo.tier = DriverWeaponTier.NoTier;
weaponDefInfo.animationSet = DriverWeaponDef.AnimationSet.Default;
weaponDefInfo.buffType = DriverWeaponDef.BuffType.Damage;
weaponDefInfo.shotCount = 52;
weaponDefInfo.primarySkillDef = Skills.lunarPistolPrimarySkillDef;
weaponDefInfo.secondarySkillDef = Skills.lunarPistolSecondarySkillDef;
weaponDefInfo.arsenalSkillDef = Skills.CreateAndAddWeaponSkillDef("VOID_PISTOL");
weaponDefInfo.unlockableDef = Unlockables.CreateAndAddWeaponUnlockableDef("VOID_PISTOL");
weaponDefInfo.mesh = Assets.LoadMesh("meshVoidPistol");
weaponDefInfo.material = Addressables.LoadAssetAsync<Material>((object)"RoR2/DLC1/VoidJailer/matVoidJailer.mat").WaitForCompletion();
weaponDefInfo.crosshairPrefab = Assets.defaultCrosshairPrefab;
weaponDefInfo.pickupPrefabOverride = Assets.voidPickupModel;
weaponDefInfo.colorOveride = Helpers.voidItemColor;
weaponDefInfo.reloadAnimationString = "ReloadPistol";
weaponDefInfo.equipAnimationString = "EquipPistol";
weaponDefInfo.calloutSoundString = "";
weaponDefInfo.dropChance = 0f;
weaponDefInfo.disableHolster = false;
VoidPistol = CreateAndAddWeapon(weaponDefInfo);
new FalsePistol();
weaponDefInfo = default(DriverWeaponDefInfo);
weaponDefInfo.name = "Pyrite Gun";
weaponDefInfo.nameToken = "ROB_DRIVER_PYRITEGUN_NAME";
weaponDefInfo.description = "A mockery of the real thing.";
weaponDefInfo.descriptionToken = "ROB_DRIVER_PYRITEGUN_DESC";
weaponDefInfo.icon = Assets.mainAssetBundle.LoadAsset<Sprite>("texPyriteGunWeaponIcon");
weaponDefInfo.tier = DriverWeaponTier.NoTier;
weaponDefInfo.animationSet = DriverWeaponDef.AnimationSet.Default;
weaponDefInfo.buffType = DriverWeaponDef.BuffType.Crit;
weaponDefInfo.shotCount = 18;
weaponDefInfo.primarySkillDef = Skills.pyriteGunPrimarySkillDef;
weaponDefInfo.secondarySkillDef = Skills.pyriteGunSecondarySkillDef;
weaponDefInfo.arsenalSkillDef = Skills.CreateAndAddWeaponSkillDef("PYRITEGUN");
weaponDefInfo.unlockableDef = Unlockables.CreateAndAddWeaponUnlockableDef("PYRITEGUN");
weaponDefInfo.mesh = Assets.LoadMesh("meshGoldenGun");
weaponDefInfo.material = Assets.LoadMaterial("matPyriteGun");
weaponDefInfo.crosshairPrefab = Assets.defaultCrosshairPrefab;
weaponDefInfo.pickupPrefabOverride = Assets.uniquePickupModel;
weaponDefInfo.colorOveride = Helpers.uniqueItemColor;
weaponDefInfo.reloadAnimationString = "ReloadPistol";
weaponDefInfo.equipAnimationString = "EquipPistol";
weaponDefInfo.calloutSoundString = "";
weaponDefInfo.dropChance = 0f;
weaponDefInfo.disableHolster = false;
PyriteGun = CreateAndAddWeapon(weaponDefInfo);
weaponDefInfo = default(DriverWeaponDefInfo);
weaponDefInfo.name = "Chitin Shield";
weaponDefInfo.nameToken = "ROB_DRIVER_BEETLESHIELD_NAME";
weaponDefInfo.description = "An offhand shield to protect you while you use your pistol.";
weaponDefInfo.descriptionToken = "ROB_DRIVER_BEETLESHIELD_DESC";
weaponDefInfo.icon = Assets.mainAssetBundle.LoadAsset<Sprite>("texBeetleShieldWeaponIcon");
weaponDefInfo.tier = DriverWeaponTier.Unique;
weaponDefInfo.animationSet = DriverWeaponDef.AnimationSet.Default;
weaponDefInfo.buffType = DriverWeaponDef.BuffType.Crit;
weaponDefInfo.shotCount = 32;
weaponDefInfo.primarySkillDef = Skills.beetleShieldPrimarySkillDef;
weaponDefInfo.secondarySkillDef = Skills.beetleShieldSecondarySkillDef;
weaponDefInfo.arsenalSkillDef = Skills.CreateAndAddWeaponSkillDef("BEETLESHIELD");
weaponDefInfo.unlockableDef = Unlockables.CreateAndAddWeaponUnlockableDef("BEETLESHIELD");
weaponDefInfo.mesh = Assets.LoadMesh("meshBeetleShield");
weaponDefInfo.material = Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/Beetle/matBeetle.mat").WaitForCompletion();
weaponDefInfo.crosshairPrefab = Assets.defaultCrosshairPrefab;
weaponDefInfo.pickupPrefabOverride = Assets.uniquePickupModel;
weaponDefInfo.colorOveride = Helpers.uniqueItemColor;
weaponDefInfo.reloadAnimationString = "ReloadPistol";
weaponDefInfo.equipAnimationString = "EquipPistol";
weaponDefInfo.calloutSoundString = "";
weaponDefInfo.dropChance = 0.1f;
weaponDefInfo.disableHolster = false;
BeetleShield = CreateAndAddWeapon(weaponDefInfo);
weaponDefInfo = default(DriverWeaponDefInfo);
weaponDefInfo.name = "Needler";
weaponDefInfo.nameToken = "ROB_DRIVER_NEEDLER_NAME";
weaponDefInfo.description = "Risk of Rain 2";
weaponDefInfo.descriptionToken = "ROB_DRIVER_NEEDLER_DESC";
weaponDefInfo.icon = Assets.mainAssetBundle.LoadAsset<Sprite>("texNeedlerWeaponIcon");
weaponDefInfo.tier = DriverWeaponTier.NoTier;
weaponDefInfo.animationSet = DriverWeaponDef.AnimationSet.Default;
weaponDefInfo.buffType = DriverWeaponDef.BuffType.Damage;
weaponDefInfo.shotCount = 28;
weaponDefInfo.primarySkillDef = (SkillDef)(object)Addressables.LoadAssetAsync<LunarPrimaryReplacementSkill>((object)"RoR2/Base/LunarSkillReplacements/LunarPrimaryReplacement.asset").WaitForCompletion();
weaponDefInfo.secondarySkillDef = (SkillDef)(object)Addressables.LoadAssetAsync<LunarSecondaryReplacementSkill>((object)"RoR2/Base/LunarSkillReplacements/LunarSecondaryReplacement.asset").WaitForCompletion();
weaponDefInfo.arsenalSkillDef = Skills.CreateAndAddWeaponSkillDef("NEEDLER");
weaponDefInfo.unlockableDef = Unlockables.CreateAndAddWeaponUnlockableDef("NEEDLER");
weaponDefInfo.mesh = Assets.LoadMesh("meshNeedler");
weaponDefInfo.material = Assets.LoadMaterial("matNeedler");
weaponDefInfo.crosshairPrefab = Assets.needlerCrosshairPrefab;
weaponDefInfo.pickupPrefabOverride = Assets.lunarPickupModel;
weaponDefInfo.colorOveride = Helpers.lunarItemColor;
weaponDefInfo.reloadAnimationString = "ReloadPistol";
weaponDefInfo.equipAnimationString = "EquipPistol";
weaponDefInfo.calloutSoundString = "";
weaponDefInfo.dropChance = 100f;
weaponDefInfo.disableHolster = false;
Needler = CreateAndAddWeapon(weaponDefInfo);
weaponDefInfo = default(DriverWeaponDefInfo);
weaponDefInfo.name = "Golden Gun";
weaponDefInfo.nameToken = "ROB_DRIVER_GOLDENGUN_NAME";
weaponDefInfo.description = "Deals extraordinary damage, but only has a few shots.";
weaponDefInfo.descriptionToken = "ROB_DRIVER_GOLDENGUN_DESC";
weaponDefInfo.icon = Assets.mainAssetBundle.LoadAsset<Sprite>("texGoldenGunWeaponIcon");
weaponDefInfo.tier = DriverWeaponTier.NoTier;
weaponDefInfo.animationSet = DriverWeaponDef.AnimationSet.Default;
weaponDefInfo.buffType = DriverWeaponDef.BuffType.Crit;
weaponDefInfo.shotCount = 6;
weaponDefInfo.primarySkillDef = Skills.goldenGunPrimarySkillDef;
weaponDefInfo.secondarySkillDef = Skills.goldenGunSecondarySkillDef;
weaponDefInfo.arsenalSkillDef = Skills.CreateAndAddWeaponSkillDef("GOLDENGUN");
weaponDefInfo.unlockableDef = Unlockables.CreateAndAddWeaponUnlockableDef("GOLDENGUN");
weaponDefInfo.mesh = Assets.LoadMesh("meshGoldenGun");
weaponDefInfo.material = Assets.LoadMaterial("matGoldenGun");
weaponDefInfo.crosshairPrefab = Assets.defaultCrosshairPrefab;
weaponDefInfo.pickupPrefabOverride = Assets.uniquePickupModel;
weaponDefInfo.colorOveride = Helpers.uniqueItemColor;
weaponDefInfo.reloadAnimationString = "ReloadPistol";
weaponDefInfo.equipAnimationString = "EquipPistol";
weaponDefInfo.calloutSoundString = "sfx_driver_callout_generic";
weaponDefInfo.dropChance = 100f;
weaponDefInfo.disableHolster = false;
GoldenGun = CreateAndAddWeapon(weaponDefInfo);
weaponDefInfo = default(DriverWeaponDefInfo);
weaponDefInfo.name = "Shotgun";
weaponDefInfo.nameToken = "ROB_DRIVER_SHOTGUN_NAME";
weaponDefInfo.description = "Close-range powerhouse with overwhelming damage.";
weaponDefInfo.descriptionToken = "ROB_DRIVER_SHOTGUN_DESC";
weaponDefInfo.icon = Assets.mainAssetBundle.LoadAsset<Sprite>("texShotgunWeaponIcon");
weaponDefInfo.tier = DriverWeaponTier.Common;
weaponDefInfo.animationSet = DriverWeaponDef.AnimationSet.TwoHanded;
weaponDefInfo.buffType = DriverWeaponDef.BuffType.Damage;
weaponDefInfo.shotCount = 8;
weaponDefInfo.primarySkillDef = Skills.shotgunPrimarySkillDef;
weaponDefInfo.secondarySkillDef = Skills.bashSkillDef;
weaponDefInfo.arsenalSkillDef = Skills.CreateAndAddWeaponSkillDef("SHOTGUN");
weaponDefInfo.unlockableDef = Unlockables.CreateAndAddWeaponUnlockableDef("SHOTGUN");
weaponDefInfo.mesh = Assets.LoadMesh("meshSuperShotgun");
weaponDefInfo.material = Assets.LoadMaterial("matShotgun");
weaponDefInfo.crosshairPrefab = Assets.shotgunCrosshairPrefab;
weaponDefInfo.pickupPrefabOverride = null;
weaponDefInfo.colorOveride = null;
weaponDefInfo.reloadAnimationString = "ReloadShotgun";
weaponDefInfo.equipAnimationString = "BufferEmpty";
weaponDefInfo.calloutSoundString = "sfx_driver_callout_shotgun";
weaponDefInfo.dropChance = 0f;
weaponDefInfo.disableHolster = false;
Shotgun = CreateAndAddWeapon(weaponDefInfo);
weaponDefInfo = default(DriverWeaponDefInfo);
weaponDefInfo.name = "Riot Shotgun";
weaponDefInfo.nameToken = "ROB_DRIVER_RIOT_SHOTGUN_NAME";
weaponDefInfo.description = "Piercing blasts great for crowd control.";
weaponDefInfo.descriptionToken = "ROB_DRIVER_RIOT_SHOTGUN_DESC";
weaponDefInfo.icon = Assets.mainAssetBundle.LoadAsset<Sprite>("texRiotShotgunWeaponIcon");
weaponDefInfo.tier = DriverWeaponTier.Common;
weaponDefInfo.animationSet = DriverWeaponDef.AnimationSet.TwoHanded;
weaponDefInfo.buffType = DriverWeaponDef.BuffType.AttackSpeed;
weaponDefInfo.shotCount = 8;
weaponDefInfo.primarySkillDef = Skills.riotShotgunPrimarySkillDef;
weaponDefInfo.secondarySkillDef = Skills.bashSkillDef;
weaponDefInfo.arsenalSkillDef = Skills.CreateAndAddWeaponSkillDef("RIOT_SHOTGUN");
weaponDefInfo.unlockableDef = Unlockables.CreateAndAddWeaponUnlockableDef("RIOT_SHOTGUN");
weaponDefInfo.mesh = Assets.LoadMesh("meshRiotShotgun");
weaponDefInfo.material = Assets.LoadMaterial("matRiotShotgun");
weaponDefInfo.crosshairPrefab = Assets.shotgunCrosshairPrefab;
weaponDefInfo.pickupPrefabOverride = null;
weaponDefInfo.colorOveride = null;
weaponDefInfo.reloadAnimationString = "ReloadPistol";
weaponDefInfo.equipAnimationString = "BufferEmpty";
weaponDefInfo.calloutSoundString = "sfx_driver_callout_shotgun";
weaponDefInfo.dropChance = 0f;
weaponDefInfo.disableHolster = false;
RiotShotgun = CreateAndAddWeapon(weaponDefInfo);
weaponDefInfo = default(DriverWeaponDefInfo);
weaponDefInfo.name = "Slug Shotgun";
weaponDefInfo.nameToken = "ROB_DRIVER_SLUG_SHOTGUN_NAME";
weaponDefInfo.description = "Powerful single hits with heavy kickback.";
weaponDefInfo.descriptionToken = "ROB_DRIVER_SLUG_SHOTGUN_DESC";
weaponDefInfo.icon = Assets.mainAssetBundle.LoadAsset<Sprite>("texSlugShotgunWeaponIcon");
weaponDefInfo.tier = DriverWeaponTier.Common;
weaponDefInfo.animationSet = DriverWeaponDef.AnimationSet.TwoHanded;
weaponDefInfo.buffType = DriverWeaponDef.BuffType.Damage;
weaponDefInfo.shotCount = 8;
weaponDefInfo.primarySkillDef = Skills.slugShotgunPrimarySkillDef;
weaponDefInfo.secondarySkillDef = Skills.bashSkillDef;
weaponDefInfo.arsenalSkillDef = Skills.CreateAndAddWeaponSkillDef("SLUG_SHOTGUN");
weaponDefInfo.unlockableDef = Unlockables.CreateAndAddWeaponUnlockableDef("SLUG_SHOTGUN");
weaponDefInfo.mesh = Assets.LoadMesh("meshSlugShotgun");
weaponDefInfo.material = Assets.LoadMaterial("matSlugShotgun");
weaponDefInfo.crosshairPrefab = Assets.shotgunCrosshairPrefab;
weaponDefInfo.pickupPrefabOverride = null;
weaponDefInfo.colorOveride = null;
weaponDefInfo.reloadAnimationString = "ReloadPistol";
weaponDefInfo.equipAnimationString = "BufferEmpty";
weaponDefInfo.calloutSoundString = "sfx_driver_callout_shotgun";
weaponDefInfo.dropChance = 0f;
weaponDefInfo.disableHolster = false;
SlugShotgun = CreateAndAddWeapon(weaponDefInfo);
weaponDefInfo = default(DriverWeaponDefInfo);
weaponDefInfo.name = "Machine Gun";
weaponDefInfo.nameToken = "ROB_DRIVER_MACHINEGUN_NAME";
weaponDefInfo.description = "Shoots fast but has high spread.";
weaponDefInfo.descriptionToken = "ROB_DRIVER_MACHINEGUN_DESC";
weaponDefInfo.icon = Assets.mainAssetBundle.LoadAsset<Sprite>("texMachineGunWeaponIcon");
weaponDefInfo.tier = DriverWeaponTier.Common;
weaponDefInfo.animationSet = DriverWeaponDef.AnimationSet.TwoHanded;
weaponDefInfo.buffType = DriverWeaponDef.BuffType.AttackSpeed;
weaponDefInfo.shotCount = 48;
weaponDefInfo.primarySkillDef = Skills.machineGunPrimarySkillDef;
weaponDefInfo.secondarySkillDef = Skills.machineGunSecondarySkillDef;
weaponDefInfo.arsenalSkillDef = Skills.CreateAndAddWeaponSkillDef("MACHINEGUN");
weaponDefInfo.unlockableDef = Unlockables.CreateAndAddWeaponUnlockableDef("MACHINEGUN");
weaponDefInfo.mesh = Assets.LoadMesh("meshMachineGun");
weaponDefInfo.material = Assets.LoadMaterial("matMachineGun");
weaponDefInfo.crosshairPrefab = Assets.defaultCrosshairPrefab;
weaponDefInfo.pickupPrefabOverride = null;
weaponDefInfo.colorOveride = null;
weaponDefInfo.reloadAnimationString = "ReloadPistol";
weaponDefInfo.equipAnimationString = "BufferEmpty";
weaponDefInfo.calloutSoundString = "sfx_driver_callout_machine_gun";
weaponDefInfo.dropChance = 0f;
weaponDefInfo.disableHolster = false;
MachineGun = CreateAndAddWeapon(weaponDefInfo);
weaponDefInfo = default(DriverWeaponDefInfo);
weaponDefInfo.name = "Heavy Machine Gun";
weaponDefInfo.nameToken = "ROB_DRIVER_HEAVY_MACHINEGUN_NAME";
weaponDefInfo.description = "Accurate, armor piercing rounds.";
weaponDefInfo.descriptionToken = "ROB_DRIVER_HEAVY_MACHINEGUN_DESC";
weaponDefInfo.icon = Assets.mainAssetBundle.LoadAsset<Sprite>("texHeavyMachineGunWeaponIcon");
weaponDefInfo.tier = DriverWeaponTier.Common;
weaponDefInfo.animationSet = DriverWeaponDef.AnimationSet.TwoHanded;
weaponDefInfo.buffType = DriverWeaponDef.BuffType.AttackSpeed;
weaponDefInfo.shotCount = 44;
weaponDefInfo.primarySkillDef = Skills.heavyMachineGunPrimarySkillDef;
weaponDefInfo.secondarySkillDef = Skills.heavyMachineGunSecondarySkillDef;
weaponDefInfo.arsenalSkillDef = Skills.CreateAndAddWeaponSkillDef("HEAVY_MACHINEGUN");
weaponDefInfo.unlockableDef = Unlockables.CreateAndAddWeaponUnlockableDef("HEAVY_MACHINEGUN");
weaponDefInfo.mesh = Assets.LoadMesh("meshHeavyMachineGun");
weaponDefInfo.material = Assets.LoadMaterial("matHeavyMachineGun");
weaponDefInfo.crosshairPrefab = Assets.defaultCrosshairPrefab;
weaponDefInfo.pickupPrefabOverride = null;
weaponDefInfo.colorOveride = null;
weaponDefInfo.reloadAnimationString = "ReloadPistol";
weaponDefInfo.equipAnimationString = "BufferEmpty";
weaponDefInfo.calloutSoundString = "sfx_driver_callout_hmg";
weaponDefInfo.dropChance = 0f;
weaponDefInfo.disableHolster = false;
HeavyMachineGun = CreateAndAddWeapon(weaponDefInfo);
weaponDefInfo = default(DriverWeaponDefInfo);
weaponDefInfo.name = "Sniper Rifle";
weaponDefInfo.nameToken = "ROB_DRIVER_SNIPER_NAME";
weaponDefInfo.description = "Precise, fatal shots.";
weaponDefInfo.descriptionToken = "ROB_DRIVER_SNIPER_DESC";
weaponDefInfo.icon = Assets.mainAssetBundle.LoadAsset<Sprite>("texSniperRifleWeaponIcon");
weaponDefInfo.tier = DriverWeaponTier.Uncommon;
weaponDefInfo.animationSet = DriverWeaponDef.AnimationSet.TwoHanded;
weaponDefInfo.buffType = DriverWeaponDef.BuffType.Damage;
weaponDefInfo.shotCount = 6;
weaponDefInfo.primarySkillDef = Skills.sniperPrimarySkillDef;
weaponDefInfo.secondarySkillDef = Skills.sniperSecondarySkillDef;
weaponDefInfo.arsenalSkillDef = Skills.CreateAndAddWeaponSkillDef("SNIPER");
weaponDefInfo.unlockableDef = Unlockables.CreateAndAddWeaponUnlockableDef("SNIPER");
weaponDefInfo.mesh = Assets.LoadMesh("meshSniperRifle");
weaponDefInfo.material = Assets.LoadMaterial("matSniperRifle");
weaponDefInfo.crosshairPrefab = Assets.defaultCrosshairPrefab;
weaponDefInfo.pickupPrefabOverride = null;
weaponDefInfo.colorOveride = null;
weaponDefInfo.reloadAnimationString = "ReloadPistol";
weaponDefInfo.equipAnimationString = "BufferEmpty";
weaponDefInfo.calloutSoundString = "sfx_driver_callout_sniper";
weaponDefInfo.dropChance = 0f;
weaponDefInfo.disableHolster = false;
Sniper = CreateAndAddWeapon(weaponDefInfo);
weaponDefInfo = default(DriverWeaponDefInfo);
weaponDefInfo.name = "Bazooka";
weaponDefInfo.nameToken = "ROB_DRIVER_BAZOOKA_NAME";
weaponDefInfo.description = "Chargeable arcing rockets.";
weaponDefInfo.descriptionToken = "ROB_DRIVER_BAZOOKA_DESC";
weaponDefInfo.icon = Assets.mainAssetBundle.LoadAsset<Sprite>("texBazookaWeaponIcon");
weaponDefInfo.tier = DriverWeaponTier.Uncommon;
weaponDefInfo.animationSet = DriverWeaponDef.AnimationSet.TwoHanded;
weaponDefInfo.buffType = DriverWeaponDef.BuffType.Damage;
weaponDefInfo.shotCount = 8;
weaponDefInfo.primarySkillDef = Skills.bazookaPrimarySkillDef;
weaponDefInfo.secondarySkillDef = Skills.bashSkillDef;
weaponDefInfo.arsenalSkillDef = Skills.CreateAndAddWeaponSkillDef("BAZOOKA");
weaponDefInfo.unlockableDef = Unlockables.CreateAndAddWeaponUnlockableDef("BAZOOKA");
weaponDefInfo.mesh = Assets.LoadMesh("meshBazooka");
weaponDefInfo.material = Assets.LoadMaterial("matBazooka");
weaponDefInfo.crosshairPrefab = Assets.bazookaCrosshairPrefab;
weaponDefInfo.pickupPrefabOverride = null;
weaponDefInfo.colorOveride = null;
weaponDefInfo.reloadAnimationString = "ReloadShotgun";
weaponDefInfo.equipAnimationString = "BufferEmpty";
weaponDefInfo.calloutSoundString = "sfx_driver_callout_rocket_launcher";
weaponDefInfo.dropChance = 0f;
weaponDefInfo.disableHolster = false;
Bazooka = CreateAndAddWeapon(weaponDefInfo);
weaponDefInfo = default(DriverWeaponDefInfo);
weaponDefInfo.name = "Grenade Launcher";
weaponDefInfo.nameToken = "ROB_DRIVER_GRENADELAUNCHER_NAME";
weaponDefInfo.description = "Fast-firing grenades with high damage but low blast radius.";
weaponDefInfo.descriptionToken = "ROB_DRIVER_GRENADELAUNCHER_DESC";
weaponDefInfo.icon = Assets.mainAssetBundle.LoadAsset<Sprite>("texGrenadeLauncherWeaponIcon");
weaponDefInfo.tier = DriverWeaponTier.Uncommon;
weaponDefInfo.animationSet = DriverWeaponDef.AnimationSet.TwoHanded;
weaponDefInfo.buffType = DriverWeaponDef.BuffType.Damage;
weaponDefInfo.shotCount = 16;
weaponDefInfo.primarySkillDef = Skills.grenadeLauncherPrimarySkillDef;
weaponDefInfo.secondarySkillDef = Skills.bashSkillDef;
weaponDefInfo.arsenalSkillDef = Skills.CreateAndAddWeaponSkillDef("GRENADELAUNCHER");
weaponDefInfo.unlockableDef = Unlockables.CreateAndAddWeaponUnlockableDef("GRENADELAUNCHER");
weaponDefInfo.mesh = Assets.LoadMesh("meshGrenadeLauncher");
weaponDefInfo.material = Assets.LoadMaterial("matGrenadeLauncher");
weaponDefInfo.crosshairPrefab = Assets.grenadeLauncherCrosshairPrefab;
weaponDefInfo.pickupPrefabOverride = null;
weaponDefInfo.colorOveride = null;
weaponDefInfo.reloadAnimationString = "ReloadShotgun";
weaponDefInfo.equipAnimationString = "BufferEmpty";
weaponDefInfo.calloutSoundString = "sfx_driver_callout_grenade_launcher";
weaponDefInfo.dropChance = 0f;
weaponDefInfo.disableHolster = false;
GrenadeLauncher = CreateAndAddWeapon(weaponDefInfo);
weaponDefInfo = default(DriverWeaponDefInfo);
weaponDefInfo.name = "Rocket Launcher";
weaponDefInfo.nameToken = "ROB_DRIVER_ROCKETLAUNCHER_NAME";
weaponDefInfo.description = "KABOOOM";
weaponDefInfo.descriptionToken = "ROB_DRIVER_ROCKETLAUNCHER_DESC";
weaponDefInfo.icon = Assets.mainAssetBundle.LoadAsset<Sprite>("texRocketLauncherWeaponIcon");
weaponDefInfo.tier = DriverWeaponTier.Legendary;
weaponDefInfo.animationSet = DriverWeaponDef.AnimationSet.TwoHanded;
weaponDefInfo.buffType = DriverWeaponDef.BuffType.AttackSpeed;
weaponDefInfo.shotCount = 20;
weaponDefInfo.primarySkillDef = Skills.rocketLauncherPrimarySkillDef;
weaponDefInfo.secondarySkillDef = Skills.rocketLauncherSecondarySkillDef;
weaponDefInfo.arsenalSkillDef = Skills.CreateAndAddWeaponSkillDef("ROCKETLAUNCHER");
weaponDefInfo.unlockableDef = Unlockables.CreateAndAddWeaponUnlockableDef("ROCKETLAUNCHER");
weaponDefInfo.mesh = Assets.LoadMesh("meshRocketLauncher");
weaponDefInfo.material = Assets.LoadMaterial("matRocketLauncher");
weaponDefInfo.crosshairPrefab = Assets.rocketLauncherCrosshairPrefab;
weaponDefInfo.pickupPrefabOverride = null;
weaponDefInfo.colorOveride = null;
weaponDefInfo.reloadAnimationString = "ReloadShotgun";
weaponDefInfo.equipAnimationString = "BufferEmpty";
weaponDefInfo.calloutSoundString = "sfx_driver_callout_rocket_launcher";
weaponDefInfo.dropChance = 0f;
weaponDefInfo.disableHolster = false;
RocketLauncher = CreateAndAddWeapon(weaponDefInfo);
weaponDefInfo = default(DriverWeaponDefInfo);
weaponDefInfo.name = "Brilliant Behemoth";
weaponDefInfo.nameToken = "ROB_DRIVER_BEHEMOTH_NAME";
weaponDefInfo.description = "huh?";
weaponDefInfo.descriptionToken = "ROB_DRIVER_BEHEMOTH_DESC";
weaponDefInfo.icon = Addressables.LoadAssetAsync<Sprite>((object)"RoR2/Base/Behemoth/texBehemothIcon.png").WaitForCompletion();
weaponDefInfo.tier = DriverWeaponTier.Unique;
weaponDefInfo.animationSet = DriverWeaponDef.AnimationSet.TwoHanded;
weaponDefInfo.buffType = DriverWeaponDef.BuffType.AttackSpeed;
weaponDefInfo.shotCount = 20;
weaponDefInfo.primarySkillDef = Skills.behemothPrimarySkillDef;
weaponDefInfo.secondarySkillDef = Skills.behemothSecondarySkillDef;
weaponDefInfo.arsenalSkillDef = Skills.CreateAndAddWeaponSkillDef("BEHEMOTH");
weaponDefInfo.unlockableDef = Unlockables.CreateAndAddWeaponUnlockableDef("BEHEMOTH");
weaponDefInfo.mesh = Assets.LoadMesh("meshBehemoth");
weaponDefInfo.material = Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/Behemoth/matBehemoth.mat").WaitForCompletion();
weaponDefInfo.crosshairPrefab = Assets.rocketLauncherCrosshairPrefab;
weaponDefInfo.pickupPrefabOverride = null;
weaponDefInfo.colorOveride = null;
weaponDefInfo.reloadAnimationString = "ReloadShotgun";
weaponDefInfo.equipAnimationString = "BufferEmpty";
weaponDefInfo.calloutSoundString = "sfx_driver_callout_rocket_launcher";
weaponDefInfo.dropChance = 0f;
weaponDefInfo.disableHolster = false;
Behemoth = CreateAndAddWeapon(weaponDefInfo);
weaponDefInfo = default(DriverWeaponDefInfo);
weaponDefInfo.name = "Prototype Rocket Launcher";
weaponDefInfo.nameToken = "ROB_DRIVER_ROCKETLAUNCHER_ALT_NAME";
weaponDefInfo.description = "A faulty prototype that can only fire a few shots.";
weaponDefInfo.descriptionToken = "ROB_DRIVER_ROCKETLAUNCHER_ALT_DESC";
weaponDefInfo.icon = Assets.mainAssetBundle.LoadAsset<Sprite>("texRocketLauncherAltWeaponIcon");
weaponDefInfo.tier = DriverWeaponTier.Unique;
weaponDefInfo.animationSet = DriverWeaponDef.AnimationSet.TwoHanded;
weaponDefInfo.buffType = DriverWeaponDef.BuffType.AttackSpeed;
weaponDefInfo.shotCount = 10;
weaponDefInfo.primarySkillDef = Skills.rocketLauncherAltPrimarySkillDef;
weaponDefInfo.secondarySkillDef = Skills.rocketLauncherAltSecondarySkillDef;
weaponDefInfo.arsenalSkillDef = Skills.CreateAndAddWeaponSkillDef("ROCKETLAUNCHER_ALT");
weaponDefInfo.unlockableDef = Unlockables.CreateAndAddWeaponUnlockableDef("ROCKETLAUNCHER_ALT");
weaponDefInfo.mesh = Assets.LoadMesh("meshRocketLauncher");
weaponDefInfo.material = Assets.LoadMaterial("matRocketLauncherAlt");
weaponDefInfo.crosshairPrefab = Assets.rocketLauncherCrosshairPrefab;
weaponDefInfo.pickupPrefabOverride = null;
weaponDefInfo.colorOveride = null;
weaponDefInfo.reloadAnimationString = "ReloadShotgun";
weaponDefInfo.equipAnimationString = "BufferEmpty";
weaponDefInfo.calloutSoundString = "sfx_driver_callout_rocket_launcher";
weaponDefInfo.dropChance = 0f;
weaponDefInfo.disableHolster = false;
PrototypeRocketLauncher = CreateAndAddWeapon(weaponDefInfo);
weaponDefInfo = default(DriverWeaponDefInfo);
weaponDefInfo.name = "Arm Cannon";
weaponDefInfo.nameToken = "ROB_DRIVER_ARMCANNON_NAME";
weaponDefInfo.description = "Arm Cannon scavenged from a Steel Mechorilla.";
weaponDefInfo.descriptionToken = "ROB_DRIVER_ARMCANNON_DESC";
weaponDefInfo.icon = Assets.mainAssetBundle.LoadAsset<Sprite>("texArmCannonWeaponIcon");
weaponDefInfo.tier = DriverWeaponTier.Unique;
weaponDefInfo.animationSet = DriverWeaponDef.AnimationSet.Default;
weaponDefInfo.buffType = DriverWeaponDef.BuffType.AttackSpeed;
weaponDefInfo.shotCount = 20;
weaponDefInfo.primarySkillDef = Skills.armCannonPrimarySkillDef;
weaponDefInfo.secondarySkillDef = Skills.bashSkillDef;
weaponDefInfo.arsenalSkillDef = Skills.CreateAndAddWeaponSkillDef("ARMCANNON");
weaponDefInfo.unlockableDef = Unlockables.CreateAndAddWeaponUnlockableDef("ARMCANNON");
weaponDefInfo.mesh = Assets.LoadMesh("meshArmCannon");
weaponDefInfo.material = Assets.LoadMaterial("matArmCannon");
weaponDefInfo.crosshairPrefab = Assets.rocketLauncherCrosshairPrefab;
weaponDefInfo.pickupPrefabOverride = null;
weaponDefInfo.colorOveride = null;
weaponDefInfo.reloadAnimationString = "Recharge";
weaponDefInfo.equipAnimationString = "Recharge";
weaponDefInfo.calloutSoundString = "sfx_driver_callout_rocket_launcher";
weaponDefInfo.dropChance = 100f;
weaponDefInfo.disableHolster = true;
ArmCannon = CreateAndAddWeapon(weaponDefInfo);
weaponDefInfo = default(DriverWeaponDefInfo);
weaponDefInfo.name = "Super Plasma Cannon";
weaponDefInfo.nameToken = "ROB_DRIVER_PLASMACANNON_NAME";
weaponDefInfo.description = "POWERRR!!!";
weaponDefInfo.descriptionToken = "ROB_DRIVER_PLASMACANNON_DESC";
weaponDefInfo.icon = Assets.mainAssetBundle.LoadAsset<Sprite>("texPlasmaCannonWeaponIcon");
weaponDefInfo.tier = DriverWeaponTier.Void;
weaponDefInfo.animationSet = DriverWeaponDef.AnimationSet.TwoHanded;
weaponDefInfo.buffType = DriverWeaponDef.BuffType.AttackSpeed;
weaponDefInfo.shotCount = 30;
weaponDefInfo.primarySkillDef = Skills.plasmaCannonPrimarySkillDef;
weaponDefInfo.secondarySkillDef = Skills.plasmaCannonSecondarySkillDef;
weaponDefInfo.arsenalSkillDef = Skills.CreateAndAddWeaponSkillDef("PLASMACANNON");
weaponDefInfo.unlockableDef = Unlockables.CreateAndAddWeaponUnlockableDef("PLASMACANNON");
weaponDefInfo.mesh = Assets.LoadMesh("meshPlasmaCannon");
weaponDefInfo.material = Assets.LoadMaterial("matPlasmaCannon");
weaponDefInfo.crosshairPrefab = Assets.rocketLauncherCrosshairPrefab;
weaponDefInfo.pickupPrefabOverride = null;
weaponDefInfo.colorOveride = null;
weaponDefInfo.reloadAnimationString = "ReloadShotgun";
weaponDefInfo.equipAnimationString = "BufferEmpty";
weaponDefInfo.calloutSoundString = "sfx_driver_callout_laser";
weaponDefInfo.dropChance = 0f;
weaponDefInfo.disableHolster = false;
PlasmaCannon = CreateAndAddWeapon(weaponDefInfo);
weaponDefInfo = default(DriverWeaponDefInfo);
weaponDefInfo.name = "Badass Shotgun";
weaponDefInfo.nameToken = "ROB_DRIVER_BADASS_SHOTGUN_NAME";
weaponDefInfo.description = "A six-barreled shotgun...!?";
weaponDefInfo.descriptionToken = "ROB_DRIVER_BADASS_SHOTGUN_DESC";
weaponDefInfo.icon = Assets.mainAssetBundle.LoadAsset<Sprite>("texBadassShotgunWeaponIcon");
weaponDefInfo.tier = DriverWeaponTier.Legendary;
weaponDefInfo.animationSet = DriverWeaponDef.AnimationSet.Default;
weaponDefInfo.buffType = DriverWeaponDef.BuffType.Damage;
weaponDefInfo.shotCount = 12;
weaponDefInfo.primarySkillDef = Skills.badassShotgunPrimarySkillDef;
weaponDefInfo.secondarySkillDef = Skills.bashSkillDef;
weaponDefInfo.arsenalSkillDef = Skills.CreateAndAddWeaponSkillDef("BADASS_SHOTGUN");
weaponDefInfo.unlockableDef = Unlockables.CreateAndAddWeaponUnlockableDef("BADASS_SHOTGUN");
weaponDefInfo.mesh = Assets.LoadMesh("meshSixBarrelShotgun");
weaponDefInfo.material = Assets.LoadMaterial("matSawedOff");
weaponDefInfo.crosshairPrefab = Assets.LoadCrosshair("SMG");
weaponDefInfo.pickupPrefabOverride = null;
weaponDefInfo.colorOveride = null;
weaponDefInfo.reloadAnimationString = "ReloadShotgun";
weaponDefInfo.equipAnimationString = "EquipPistol";
weaponDefInfo.calloutSoundString = "sfx_driver_callout_shotgun";
weaponDefInfo.dropChance = 0f;
weaponDefInfo.disableHolster = false;
BadassShotgun = CreateAndAddWeapon(weaponDefInfo);
weaponDefInfo = default(DriverWeaponDefInfo);
weaponDefInfo.name = "Chimeric Cannon";
weaponDefInfo.nameToken = "ROB_DRIVER_LUNARRIFLE_NAME";
weaponDefInfo.description = "Blasts of condensed lunar energy.";
weaponDefInfo.descriptionToken = "ROB_DRIVER_LUNARRIFLE_DESC";
weaponDefInfo.icon = Assets.mainAssetBundle.LoadAsset<Sprite>("texLunarRifleWeaponIcon");
weaponDefInfo.tier = DriverWeaponTier.Lunar;
weaponDefInfo.animationSet = DriverWeaponDef.AnimationSet.TwoHanded;
weaponDefInfo.buffType = DriverWeaponDef.BuffType.AttackSpeed;
weaponDefInfo.shotCount = 48;
weaponDefInfo.primarySkillDef = Skills.lunarRiflePrimarySkillDef;
weaponDefInfo.secondarySkillDef = Skills.bashSkillDef;
weaponDefInfo.arsenalSkillDef = Skills.CreateAndAddWeaponSkillDef("LUNARRIFLE");
weaponDefInfo.unlockableDef = Unlockables.CreateAndAddWeaponUnlockableDef("LUNARRIFLE");
weaponDefInfo.mesh = Assets.LoadMesh("meshLunarRifle");
weaponDefInfo.material = Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/LunarGolem/matLunarGolem.mat").WaitForCompletion();
weaponDefInfo.crosshairPrefab = Assets.rocketLauncherCrosshairPrefab;
weaponDefInfo.pickupPrefabOverride = Assets.lunarPickupModel;
weaponDefInfo.colorOveride = Helpers.lunarItemColor;
weaponDefInfo.reloadAnimationString = "ReloadShotgun";
weaponDefInfo.equipAnimationString = "BufferEmpty";
weaponDefInfo.calloutSoundString = "sfx_driver_callout_generic";
weaponDefInfo.dropChance = 10f;
weaponDefInfo.disableHolster = false;
LunarRifle = CreateAndAddWeapon(weaponDefInfo);
weaponDefInfo = default(DriverWeaponDefInfo);
weaponDefInfo.name = "Lunar Hammer";
weaponDefInfo.nameToken = "ROB_DRIVER_LUNARHAMMER_NAME";
weaponDefInfo.description = "Wield supreme power in the palm of your hand.";
weaponDefInfo.descriptionToken = "ROB_DRIVER_LUNARHAMMER_DESC";
weaponDefInfo.icon = Assets.mainAssetBundle.LoadAsset<Sprite>("texLunarHammerWeaponIcon");
weaponDefInfo.tier = DriverWeaponTier.NoTier;
weaponDefInfo.animationSet = DriverWeaponDef.AnimationSet.BigMelee;
weaponDefInfo.buffType = DriverWeaponDef.BuffType.Damage;
weaponDefInfo.shotCount = 0;
weaponDefInfo.primarySkillDef = Skills.lunarHammerPrimarySkillDef;
weaponDefInfo.secondarySkillDef = Skills.lunarHammerSecondarySkillDef;
weaponDefInfo.arsenalSkillDef = Skills.CreateAndAddWeaponSkillDef("LUNARHAMMER");
weaponDefInfo.unlockableDef = Unlockables.CreateAndAddWeaponUnlockableDef("LUNARHAMMER");
weaponDefInfo.mesh = Assets.LoadMesh("meshLunarHammer");
weaponDefInfo.material = Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/Brother/matBrotherHammer.mat").WaitForCompletion();
weaponDefInfo.crosshairPrefab = Assets.needlerCrosshairPrefab;
weaponDefInfo.pickupPrefabOverride = Assets.lunarPickupModel;
weaponDefInfo.colorOveride = Helpers.lunarItemColor;
weaponDefInfo.equipAnimationString = "BufferEmpty";
weaponDefInfo.calloutSoundString = "sfx_driver_callout_generic";
weaponDefInfo.dropChance = 100f;
weaponDefInfo.disableHolster = false;
LunarHammer = CreateAndAddWeapon(weaponDefInfo);
weaponDefInfo = default(DriverWeaponDefInfo);
weaponDefInfo.name = "Nemesis Commando SMG";
weaponDefInfo.nameToken = "ROB_DRIVER_NEMMANDO_NAME";
weaponDefInfo.description = "Nemesis Commando's gun.";
weaponDefInfo.descriptionToken = "ROB_DRIVER_NEMMANDO_DESC";
weaponDefInfo.icon = Assets.mainAssetBundle.LoadAsset<Sprite>("texNemmandoWeaponIcon");
weaponDefInfo.tier = DriverWeaponTier.Void;
weaponDefInfo.animationSet = DriverWeaponDef.AnimationSet.Default;
weaponDefInfo.buffType = DriverWeaponDef.BuffType.Crit;
weaponDefInfo.shotCount = 64;
weaponDefInfo.primarySkillDef = Skills.nemmandoGunPrimarySkillDef;
weaponDefInfo.secondarySkillDef = Skills.nemmandoGunSecondarySkillDef;
weaponDefInfo.arsenalSkillDef = Skills.CreateAndAddWeaponSkillDef("NEMMANDO");
weaponDefInfo.unlockableDef = Unlockables.CreateAndAddWeaponUnlockableDef("NEMMANDO");
weaponDefInfo.mesh = Assets.LoadMesh("meshNemmandoGun");
weaponDefInfo.material = Assets.LoadMaterial("matNemmandoGun");
weaponDefInfo.crosshairPrefab = Assets.defaultCrosshairPrefab;
weaponDefInfo.pickupPrefabOverride = Assets.voidPickupModel;
weaponDefInfo.colorOveride = Helpers.voidItemColor;
weaponDefInfo.reloadAnimationString = "ReloadPistol";
weaponDefInfo.equipAnimationString = "EquipPistol";
weaponDefInfo.calloutSoundString = "sfx_driver_callout_generic";
weaponDefInfo.dropChance = 100f;
weaponDefInfo.disableHolster = false;
NemmandoGun = CreateAndAddWeapon(weaponDefInfo);
weaponDefInfo = default(DriverWeaponDefInfo);
weaponDefInfo.name = "Nemesis Mercenary Shotgun";
weaponDefInfo.nameToken = "ROB_DRIVER_NEMMERC_NAME";
weaponDefInfo.description = "Nemesis Mercenary's shotgun.";
weaponDefInfo.descriptionToken = "ROB_DRIVER_NEMMERC_DESC";
weaponDefInfo.icon = Assets.mainAssetBundle.LoadAsset<Sprite>("texNemmercWeaponIcon");
weaponDefInfo.tier = DriverWeaponTier.Void;
weaponDefInfo.animationSet = DriverWeaponDef.AnimationSet.TwoHanded;
weaponDefInfo.buffType = DriverWeaponDef.BuffType.Damage;
weaponDefInfo.shotCount = 48;
weaponDefInfo.primarySkillDef = Skills.nemmercGunPrimarySkillDef;
weaponDefInfo.secondarySkillDef = Skills.bashSkillDef;
weaponDefInfo.arsenalSkillDef = Skills.CreateAndAddWeaponSkillDef("NEMMERC");
weaponDefInfo.unlockableDef = Unlockables.CreateAndAddWeaponUnlockableDef("NEMMERC");
weaponDefInfo.mesh = Assets.LoadMesh("meshNemmercGun");
weaponDefInfo.material = Assets.LoadMaterial("matNemmercGun");
weaponDefInfo.crosshairPrefab = Assets.LoadCrosshair("SMG");
weaponDefInfo.pickupPrefabOverride = Assets.voidPickupModel;
weaponDefInfo.colorOveride = Helpers.voidItemColor;
weaponDefInfo.reloadAnimationString = "ReloadShotgun";
weaponDefInfo.equipAnimationString = "EquipPistol";
weaponDefInfo.calloutSoundString = "sfx_driver_callout_shotgun";
weaponDefInfo.dropChance = 100f;
weaponDefInfo.disableHolster = false;
NemmercGun = CreateAndAddWeapon(weaponDefInfo);
weaponDefInfo = default(DriverWeaponDefInfo);
weaponDefInfo.name = "Stone Cannon";
weaponDefInfo.nameToken = "ROB_DRIVER_GOLEMGUN_NAME";
weaponDefInfo.description = "Harness the intense beams of a Stone Golem.";
weaponDefInfo.descriptionToken = "ROB_DRIVER_GOLEMGUN_DESC";
weaponDefInfo.icon = Assets.mainAssetBundle.LoadAsset<Sprite>("texGolemGunWeaponIcon");
weaponDefInfo.tier = DriverWeaponTier.Unique;
weaponDefInfo.animationSet = DriverWeaponDef.AnimationSet.TwoHanded;
weaponDefInfo.buffType = DriverWeaponDef.BuffType.Damage;
weaponDefInfo.shotCount = 48;
weaponDefInfo.primarySkillDef = Skills.golemGunPrimarySkillDef;
weaponDefInfo.secondarySkillDef = Skills.bashSkillDef;
weaponDefInfo.arsenalSkillDef = Skills.CreateAndAddWeaponSkillDef("GOLEMGUN");
weaponDefInfo.unlockableDef = Unlockables.CreateAndAddWeaponUnlockableDef("GOLEMGUN");
weaponDefInfo.mesh = Assets.LoadMesh("meshGolemGun");
weaponDefInfo.material = Addressables.LoadAssetAsync<Material>((object)"RoR2/Base/Golem/matGolem.mat").WaitForCompletion();
weaponDefInfo.crosshairPrefab = Assets.circleCrosshairPrefab;
weaponDefInfo.pickupPrefabOverride = null;
weaponDefInfo.colorOveride = null;
weaponDefInfo.reloadAnimationString = "ReloadPistol";
weaponDefInfo.equipAnimationString = "BufferEmpty";
weaponDefInfo.calloutSoundString = "sfx_driver_callout_laser";
weaponDefInfo.dropChance = 1f;
weaponDefInfo.disableHolster = false;
GolemRifle = CreateAndAddWeapon(weaponDefInfo);
new ArmBFG().Init();
new CrabGun().Init();
new LunarGrenade().Init();
new ScavGun().Init();
new ArtiGauntlet().Init();
new BanditRevolver().Init();
new CommandoSMG().Init();
new Revolver().Init();
new SMG().Init();
new RavSword().Init();
new NemKatana().Init();
new VulkanShotgun();
AddWeaponDrop("Beetle", BeetleShield, 0.1f);
AddWeaponDrop("Golem", GolemRifle, 1f);
AddWeaponDrop("Titan", GolemRifle, 10f);
AddWeaponDrop("LunarGolem", LunarRifle, 10f);
AddWeaponDrop("TitanGold", GoldenGun, 100f);
AddWeaponDrop("TimeCrystal", LunarRifle, 50f);
AddWeaponDrop("BrotherHurt", LunarHammer, 100f);
AddWeaponDrop("BrotherHurtBodyP3", LunarHammer, 100f, autoComplete: false);
AddWeaponDrop("Mechorilla", ArmCannon, 100f);
AddWeaponDrop("SS2UNemmando", NemmandoGun, 100f);
AddWeaponDrop("NemMerc", NemmercGun, 100f);
AddWeaponDrop("Heretic", Needler, 100f);
}
public static DriverWeaponDef CreateAndAddWeapon(DriverWeaponDefInfo weaponDefInfo)
{
if (!string.IsNullOrEmpty(weaponDefInfo.nameToken) && !string.IsNullOrEmpty(weaponDefInfo.name))
{
LanguageAPI.Add(weaponDefInfo.nameToken, weaponDefInfo.name);
}
if (!string.IsNullOrEmpty(weaponDefInfo.descriptionToken) && !string.IsNullOrEmpty(weaponDefInfo.description))
{
LanguageAPI.Add(weaponDefInfo.descriptionToken, weaponDefInfo.description);
}
return CreateAndAddWeapon(DriverWeaponDef.CreateWeaponDefFromInfo(weaponDefInfo));
}
public static DriverWeaponDef CreateAndAddWeapon(DriverWeaponDef weaponDef)
{
Array.Resize(ref weaponDefs, weaponDefs.Length + 1);
int num = weaponDefs.Length - 1;
weaponDef.index = (ushort)num;
weaponDefs[num] = weaponDef;
Config.InitWeaponConfig(weaponDef);
DriverWeaponDef driverWeaponDef = weaponDef;
if (driverWeaponDef.crosshairPrefab == null)
{
driverWeaponDef.crosshairPrefab = Assets.defaultCrosshairPrefab;
}
if ((Object)(object)weaponDef.icon == (Object)null)
{
Log.Warning("Weapon " + weaponDef.weaponName + " is missing an icon! Assigning default based on tier.");
driverWeaponDef = weaponDef;
driverWeaponDef.icon = (Sprite)(weaponDef.tier switch
{
DriverWeaponTier.Common => Assets.commonWeaponIcon,
DriverWeaponTier.Uncommon => Assets.uncommonWeaponIcon,
DriverWeaponTier.Legendary => Assets.legendaryWeaponIcon,
DriverWeaponTier.Unique => Assets.uniqueWeaponIcon,
DriverWeaponTier.Void => Assets.voidWeaponIcon,
DriverWeaponTier.Lunar => Assets.lunarWeaponIcon,
_ => Assets.commonWeaponIcon,
});
}
if (Config.enableArsenal.Value)
{
driverWeaponDef = weaponDef;
if (driverWeaponDef.arsenalSkillDef == null)
{
driverWeaponDef.arsenalSkillDef = Skills.CreateAndAddWeaponSkillDef(weaponDef.nameToken, weaponDef.descriptionToken);
}
Skills.AddWeaponSkillToFamily(weaponDef.arsenalSkillDef, weaponDef.unlockableDef, weaponDef.icon);
}
Log.Debug("Added " + weaponDef.nameToken + " to catalog with rarity: " + Enum.GetName(typeof(DriverWeaponTier), weaponDef.tier));
return weaponDef;
}
public static void AddWeaponDrop(string bodyName, DriverWeaponDef weaponDef, float dropChance = 0f, bool autoComplete = true)
{
if (string.IsNullOrWhiteSpace(bodyName))
{
return;
}
if (autoComplete)
{
bodyName = bodyName.Replace("(Clone)", "");
if (!bodyName.EndsWith("Body"))
{
bodyName += "Body";
}
}
((ResourceAvailability)(ref BodyCatalog.availability)).CallWhenAvailable((Action)delegate
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_000b: Unknown result type (might be due to invalid IL or missing references)
//IL_000c: Unknown result type (might be due to invalid IL or missing references)
//IL_000e: Invalid comparison between Unknown and I4
//IL_0015: Unknown result type (might be due to invalid IL or missing references)
BodyIndex val = BodyCatalog.FindBodyIndex(bodyName);
if ((int)val != -1)
{
weaponDrops[val] = new WeaponDrop(weaponDef.index, Mathf.Max(dropChance, weaponDef.dropChance));
Log.Debug("Added " + weaponDef.nameToken + " to drop list for " + bodyName);
}
else
{
Log.Warning("Failed to add " + weaponDef.nameToken + " to drop list for " + bodyName + " because the body index was not found.");
}
});
}
public static DriverWeaponDef GetWeaponFromIndex(int index)
{
return ArrayUtils.GetSafe<DriverWeaponDef>(weaponDefs, index, ref Pistol);
}
public static bool IsWeaponPistol(DriverWeaponDef weaponDef)
{
if (!((Object)(object)weaponDef == (Object)(object)Pistol) && !((Object)(object)weaponDef == (Object)(object)VoidPistol) && !((Object)(object)weaponDef == (Object)(object)LunarPistol) && !((Object)(object)weaponDef == (Object)(object)PyriteGun) && !((Object)(object)weaponDef == (Object)(object)BeetleShield))
{
return (Object)(object)weaponDef == (Object)(object)BundledWeapon<FalsePistol>.instance.weaponDef;
}
return true;
}
public static DriverWeaponDef GetRandomWeapon()
{
List<DriverWeaponDef> list = new List<DriverWeaponDef>();
for (int i = 0; i < weaponDefs.Length; i++)
{
DriverWeaponDef driverWeaponDef = weaponDefs[i];
if (driverWeaponDef.enabled && driverWeaponDef.shotCount > 0 && driverWeaponDef.tier != 0)
{
list.Add(driverWeaponDef);
}
}
if (list.Count == 0)
{
return Pistol;
}
return list[Random.Range(0, list.Count)];
}
public static DriverWeaponDef GetWeightedRandomWeapon(DriverWeaponTier tier)
{
int num = 60;
int num2 = ((tier >= DriverWeaponTier.Uncommon) ? 35 : 0);
int num3 = ((tier >= DriverWeaponTier.Legendary) ? 2 : 0);
int num4 = ((tier >= DriverWeaponTier.Unique) ? 1 : 0);
int num5 = Random.Range(0, num + num2 + num3 + num4);
if (num5 < num)
{
tier = DriverWeaponTier.Common;
}
else if (num5 < num + num2)
{
tier = DriverWeaponTier.Uncommon;
}
else if (num5 < num + num2 + num3)
{
tier = DriverWeaponTier.Legendary;
}
return GetRandomWeaponFromTier(tier);
}
public static DriverWeaponDef GetRandomWeaponFromTier(DriverWeaponTier tier)
{
List<DriverWeaponDef> list = new List<DriverWeaponDef>();
for (int i = 0; i < weaponDefs.Length; i++)
{
DriverWeaponDef driverWeaponDef = weaponDefs[i];
if (driverWeaponDef.enabled && driverWeaponDef.shotCount > 0 && driverWeaponDef.tier != 0)
{
if (driverWeaponDef.tier == tier)
{
list.Add(driverWeaponDef);
}
if (Config.uniqueDropsAreLegendary.Value && tier == DriverWeaponTier.Legendary && driverWeaponDef.tier > DriverWeaponTier.Legendary)
{
list.Add(driverWeaponDef);
}
}
}
if (list.Count == 0)
{
return Pistol;
}
return list[Random.Range(0, list.Count)];
}
}
public static class DriverWeaponSkinCatalog
{
internal static Dictionary<SkinIndex, DriverWeaponSkinDef[]> driverSkinDefs = new Dictionary<SkinIndex, DriverWeaponSkinDef[]>();
public static void AddSkin(SkinIndex index, IEnumerable<DriverWeaponSkinDef> skinDefs)
{
//IL_0008: Unknown result type (might be due to invalid IL or missing references)
//IL_000a: Invalid comparison between Unknown and I4
//IL_0011: Unknown result type (might be due to invalid IL or missing references)
if (skinDefs.Any() && (int)index != -1)
{
driverSkinDefs.Add(index, skinDefs.ToArray());
}
}
public static DriverWeaponDef.ModelSwapInfo[] GetModelSwapInfoForWeapon(ModelSkinController skinController, DriverWeaponDef weaponDef)
{
if (skinController != null && skinController.skins?.Length == 0)
{
return weaponDef.modelSwapInfo;
}
return GetModelSwapInfoForWeapon(skinController.skins, skinController.currentSkinIndex, weaponDef);
}
public static DriverWeaponDef.ModelSwapInfo[] GetModelSwapInfoForWeapon(SkinDef[] skins, int skinIndex, DriverWeaponDef weaponDef)
{
//IL_0017: Unknown result type (might be due to invalid IL or missing references)
//IL_0030: Unknown result type (might be due to invalid IL or missing references)
SkinDef safe = ArrayUtils.GetSafe<SkinDef>(skins, skinIndex);
if ((Object)(object)safe == (Object)null || !driverSkinDefs.ContainsKey(safe.skinIndex))
{
return weaponDef.modelSwapInfo;
}
DriverWeaponSkinDef[] array = driverSkinDefs[safe.skinIndex];
for (int i = 0; i < array.Length; i++)
{
if (array[i].weaponDefIndex == weaponDef.index)
{
return array[i].modelSwapInfo;
}
}
return weaponDef.modelSwapInfo;
}
}
}
namespace RobDriver.SkillStates
{
public class FuckMyAss : GenericCharacterDeath
{
public override bool shouldAutoDestroy => false;
public override void OnEnter()
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_0010: Unknown result type (might be due to invalid IL or missing references)
//IL_0015: Unknown result type (might be due to invalid IL or missing references)
//IL_0023: Unknown result type (might be due to invalid IL or missing references)
//IL_002a: Unknown result type (might be due to invalid IL or missing references)
//IL_002f: Unknown result type (might be due to invalid IL or missing references)
//IL_0034: Unknown result type (might be due to invalid IL or missing references)
//IL_00a9: Unknown result type (might be due to invalid IL or missing references)
((GenericCharacterDeath)this).OnEnter();
Vector3 val = Vector3.up * 3f;
if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor))
{
val += ((EntityState)this).characterMotor.velocity;
((Behaviour)((EntityState)this).characterMotor).enabled = false;
}
if (!Object.op_Implicit((Object)(object)((GenericCharacterDeath)this).cachedModelTransform))
{
return;
}
RagdollController component = ((Component)((GenericCharacterDeath)this).cachedModelTransform).GetComponent<RagdollController>();
if (!Object.op_Implicit((Object)(object)component))
{
return;
}
Transform[] bones = component.bones;
foreach (Transform val2 in bones)
{
if (Object.op_Implicit((Object)(object)val2))
{
((Component)val2).gameObject.layer = LayerIndex.ragdoll.intVal;
((Component)val2).gameObject.SetActive(true);
}
}
component.BeginRagdoll(val);
}
public override void PlayDeathAnimation(float crossfadeDuration = 0.1f)
{
}
public override void FixedUpdate()
{
((GenericCharacterDeath)this).FixedUpdate();
if (NetworkServer.active && ((EntityState)this).fixedAge > 4f)
{
EntityState.Destroy((Object)(object)((EntityState)this).gameObject);
}
}
public override InterruptPriority GetMinimumInterruptPriority()
{
return (InterruptPriority)9;
}
}
}
namespace RobDriver.SkillStates.Emote
{
public class BaseEmote : BaseState
{
private CameraParamsOverrideHandle camOverrideHandle;
protected float duration;
private uint activePlayID;
public LocalUser localUser;
public override void OnEnter()
{
//IL_0025: Unknown result type (might be due to invalid IL or missing references)
//IL_002a: Unknown result type (might be due to invalid IL or missing references)
((BaseState)this).OnEnter();
FindLocalUser();
((EntityState)this).characterBody.hideCrosshair = true;
camOverrideHandle = CameraParams.OverrideCameraParams(((EntityState)this).cameraTargetParams, DriverCameraParams.EMOTE);
}
private void FindLocalUser()
{
if (localUser != null || !Object.op_Implicit((Object)(object)((EntityState)this).characterBody))
{
return;
}
foreach (LocalUser readOnlyLocalUsers in LocalUserManager.readOnlyLocalUsersList)
{
if ((Object)(object)readOnlyLocalUsers.cachedBody == (Object)(object)((EntityState)this).characterBody)
{
localUser = readOnlyLocalUsers;
break;
}
}
}
protected void PlayEmote(string animString, string soundString = "", float animDuration = 0f)
{
PlayEmote(animString, soundString, ((EntityState)this).GetModelAnimator(), animDuration);
}
protected void PlayEmote(string animString, string soundString, Animator animator, float animDuration = 0f)
{
if (animDuration >= 0f && duration != 0f)
{
animDuration = duration;
}
if (duration > 0f)
{
EntityState.PlayAnimationOnAnimator(animator, "FullBody, Override", animString, "Emote.playbackRate", animDuration, 0f);
}
else
{
animator.SetFloat("Emote.playbackRate", 1f);
EntityState.PlayAnimationOnAnimator(animator, "FullBody, Override", animString);
}
if (!string.IsNullOrEmpty(soundString))
{
activePlayID = Util.PlaySound(soundString, ((EntityState)this).gameObject);
}
}
public override void Update()
{
((EntityState)this).Update();
if (((EntityState)this).isAuthority)
{
CheckEmote<Rest>(Config.restKey);
CheckEmote<Taunt>(Config.tauntKey);
CheckEmote<Dance>(Config.danceKey);
}
}
private void CheckEmote(KeyCode keybind, EntityState state)
{
//IL_0000: Unknown result type (might be due to invalid IL or missing references)
if (Input.GetKeyDown(keybind) && !localUser.isUIFocused)
{
((EntityState)this).outer.SetInterruptState(state, (InterruptPriority)0);
}
}
private void CheckEmote<T>(ConfigEntry<KeyboardShortcut> keybind) where T : EntityState, new()
{
if (Config.GetKeyPressed(keybind))
{
FindLocalUser();
if (localUser != null && !localUser.isUIFocused)
{
((EntityState)this).outer.SetInterruptState((EntityState)(object)new T(), (InterruptPriority)0);
}
}
}
public override void FixedUpdate()
{
//IL_0087: Unknown result type (might be due to invalid IL or missing references)
//IL_008c: Unknown result type (might be due to invalid IL or missing references)
((EntityState)this).FixedUpdate();
bool flag = false;
if (Object.op_Implicit((Object)(object)((EntityState)this).characterMotor) && !((EntityState)this).characterMotor.isGrounded)
{
flag = true;
}
if (Object.op_Implicit((Object)(object)((EntityState)this).inputBank))
{
if (((EntityState)this).inputBank.skill1.down)
{
flag = true;
}
if (((EntityState)this).inputBank.skill2.down)
{
flag = true;
}
if (((EntityState)this).inputBank.skill3.down)
{
flag = true;
}
if (((EntityState)this).inputBank.skill4.down)
{
flag = true;
}
if (((EntityState)this).inputBank.moveVector != Vector3.zero)
{
flag = true;
}
}
if (duration > 0f && ((EntityState)this).fixedAge >= duration)
{
flag = true;
}
if (flag && ((EntityState)this).isAuthority)
{
((EntityState)this).outer.SetNextStateToMain();
}
}
public override void OnExit()
{
//IL_003c: Unknown result type (might be due to invalid IL or missing references)
//IL_0046: Unknown result type (might be due to invalid IL or missing references)
((EntityState)this).OnExit();
((EntityState)this).characterBody.hideCrosshair = false;
((EntityState)this).PlayAnimation("FullBody, Override", "BufferEmpty");
if (activePlayID != 0)
{
AkSoundEngine.StopPlayingID(activePlayID);
}
((EntityState)this).cameraTargetParams.RemoveParamsOverride(camOverrideHandle, 0.5f);
}
public override InterruptPriority GetMinimumInterruptPriority()
{
return (InterruptPriority)0;
}
}
public class Dance : BaseEmote
{
public override void OnEnter()
{
base.OnEnter();
if (((EntityState)this).characterBody.skinIndex == 1)
{
PlayEmote("Dance", "sfx_jacket_dance");
}
else if (((EntityState)this).characterBody.skinIndex == 2)
{
P