using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Core.Logging.Interpolation;
using BepInEx.Logging;
using BepInEx.Unity.IL2CPP;
using GTFO.API;
using GameData;
using HarmonyLib;
using Il2CppSystem.Collections.Generic;
using Localization;
using Microsoft.CodeAnalysis;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")]
[assembly: AssemblyCompany("RibbitdownWeapons")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("RibbitdownWeapons")]
[assembly: AssemblyTitle("RibbitdownWeapons")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace Microsoft.CodeAnalysis
{
[CompilerGenerated]
[Embedded]
internal sealed class EmbeddedAttribute : Attribute
{
}
}
namespace System.Runtime.CompilerServices
{
[CompilerGenerated]
[Embedded]
[AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)]
internal sealed class NullableAttribute : Attribute
{
public readonly byte[] NullableFlags;
public NullableAttribute(byte P_0)
{
NullableFlags = new byte[1] { P_0 };
}
public NullableAttribute(byte[] P_0)
{
NullableFlags = P_0;
}
}
}
namespace RibbitdownWeapons
{
[BepInDependency(/*Could not decode attribute arguments.*/)]
[BepInPlugin("Ribbit.RibbitdownWeapons", "RibbitdownWeapons", "0.0.1")]
public class Plugin : BasePlugin
{
public class RibbitdownWeapons : MonoBehaviour
{
public static void Modify()
{
//IL_0018: Unknown result type (might be due to invalid IL or missing references)
//IL_001d: Unknown result type (might be due to invalid IL or missing references)
//IL_0049: Unknown result type (might be due to invalid IL or missing references)
//IL_004e: Unknown result type (might be due to invalid IL or missing references)
//IL_0100: Unknown result type (might be due to invalid IL or missing references)
//IL_0105: Unknown result type (might be due to invalid IL or missing references)
//IL_018c: Unknown result type (might be due to invalid IL or missing references)
//IL_0191: 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_0200: Unknown result type (might be due to invalid IL or missing references)
//IL_0360: Unknown result type (might be due to invalid IL or missing references)
//IL_0365: Unknown result type (might be due to invalid IL or missing references)
//IL_03b5: Unknown result type (might be due to invalid IL or missing references)
//IL_03ba: Unknown result type (might be due to invalid IL or missing references)
//IL_0457: Unknown result type (might be due to invalid IL or missing references)
//IL_045c: Unknown result type (might be due to invalid IL or missing references)
//IL_04b5: Unknown result type (might be due to invalid IL or missing references)
//IL_04ba: Unknown result type (might be due to invalid IL or missing references)
//IL_06ab: Unknown result type (might be due to invalid IL or missing references)
//IL_06b0: Unknown result type (might be due to invalid IL or missing references)
//IL_06bb: Unknown result type (might be due to invalid IL or missing references)
//IL_06c2: Unknown result type (might be due to invalid IL or missing references)
//IL_06d2: Expected O, but got Unknown
//IL_06d4: Unknown result type (might be due to invalid IL or missing references)
//IL_06d9: Unknown result type (might be due to invalid IL or missing references)
//IL_06e4: Unknown result type (might be due to invalid IL or missing references)
//IL_06f0: Expected O, but got Unknown
//IL_06f0: Unknown result type (might be due to invalid IL or missing references)
//IL_06f5: Unknown result type (might be due to invalid IL or missing references)
//IL_06f6: Unknown result type (might be due to invalid IL or missing references)
//IL_06fb: Unknown result type (might be due to invalid IL or missing references)
//IL_0702: Unknown result type (might be due to invalid IL or missing references)
//IL_0712: Expected O, but got Unknown
//IL_0712: Unknown result type (might be due to invalid IL or missing references)
//IL_0713: Unknown result type (might be due to invalid IL or missing references)
//IL_0718: Unknown result type (might be due to invalid IL or missing references)
//IL_071f: Unknown result type (might be due to invalid IL or missing references)
//IL_072f: Expected O, but got Unknown
//IL_072f: Unknown result type (might be due to invalid IL or missing references)
//IL_0736: Unknown result type (might be due to invalid IL or missing references)
//IL_073e: Unknown result type (might be due to invalid IL or missing references)
//IL_0746: Unknown result type (might be due to invalid IL or missing references)
//IL_0751: Unknown result type (might be due to invalid IL or missing references)
//IL_075c: Unknown result type (might be due to invalid IL or missing references)
//IL_0766: Unknown result type (might be due to invalid IL or missing references)
//IL_0771: Unknown result type (might be due to invalid IL or missing references)
//IL_077c: Unknown result type (might be due to invalid IL or missing references)
//IL_0783: Unknown result type (might be due to invalid IL or missing references)
//IL_078e: Unknown result type (might be due to invalid IL or missing references)
//IL_0799: Unknown result type (might be due to invalid IL or missing references)
//IL_07a4: Unknown result type (might be due to invalid IL or missing references)
//IL_07af: Unknown result type (might be due to invalid IL or missing references)
//IL_07b6: Unknown result type (might be due to invalid IL or missing references)
//IL_07bd: Unknown result type (might be due to invalid IL or missing references)
//IL_07c8: Unknown result type (might be due to invalid IL or missing references)
//IL_07d3: Unknown result type (might be due to invalid IL or missing references)
//IL_07de: Unknown result type (might be due to invalid IL or missing references)
//IL_07e6: Unknown result type (might be due to invalid IL or missing references)
//IL_07f1: Unknown result type (might be due to invalid IL or missing references)
//IL_07f9: Unknown result type (might be due to invalid IL or missing references)
//IL_0800: Unknown result type (might be due to invalid IL or missing references)
//IL_0807: Unknown result type (might be due to invalid IL or missing references)
//IL_0812: Expected O, but got Unknown
//IL_0812: Unknown result type (might be due to invalid IL or missing references)
//IL_0819: Expected O, but got Unknown
//IL_0819: Unknown result type (might be due to invalid IL or missing references)
//IL_0824: Expected O, but got Unknown
//IL_082a: Expected O, but got Unknown
//IL_082b: Unknown result type (might be due to invalid IL or missing references)
//IL_0830: Unknown result type (might be due to invalid IL or missing references)
//IL_0838: Unknown result type (might be due to invalid IL or missing references)
//IL_0843: Unknown result type (might be due to invalid IL or missing references)
//IL_084e: Expected O, but got Unknown
//IL_084e: Unknown result type (might be due to invalid IL or missing references)
//IL_0855: Expected O, but got Unknown
//IL_0855: Unknown result type (might be due to invalid IL or missing references)
//IL_0860: Expected O, but got Unknown
//IL_0866: Expected O, but got Unknown
//IL_0867: Unknown result type (might be due to invalid IL or missing references)
//IL_086c: Unknown result type (might be due to invalid IL or missing references)
//IL_0873: Unknown result type (might be due to invalid IL or missing references)
//IL_087e: Expected O, but got Unknown
//IL_087e: Unknown result type (might be due to invalid IL or missing references)
//IL_0889: Unknown result type (might be due to invalid IL or missing references)
//IL_0890: Expected O, but got Unknown
//IL_0890: Unknown result type (might be due to invalid IL or missing references)
//IL_089b: Expected O, but got Unknown
//IL_08a1: Expected O, but got Unknown
//IL_08b2: Unknown result type (might be due to invalid IL or missing references)
//IL_08b9: Expected O, but got Unknown
MeleeArchetypeDataBlock block = GameDataBlockBase<MeleeArchetypeDataBlock>.GetBlock(3u);
block.AllowRunningWhenCharging = true;
block.PlayerRunSpeedMultiWhileCharging = 1f;
ActionCost chargedAttackStaminaCost = block.ChargedAttackStaminaCost;
chargedAttackStaminaCost.baseStaminaCostInCombat = 0.075f;
chargedAttackStaminaCost.baseStaminaCostOutOfCombat = 0.075f;
ArchetypeDataBlock block2 = GameDataBlockBase<ArchetypeDataBlock>.GetBlock(41u);
block2.Damage = 9.01f;
Vector2 damageFalloff = block2.DamageFalloff;
damageFalloff.x = 11f;
block2.PrecisionDamageMulti = 0.5f;
block2.DefaultClipSize = 12;
block2.CostOfBullet = 2.73f;
block2.ShotDelay = 0.075f;
ArchetypeDataBlock block3 = GameDataBlockBase<ArchetypeDataBlock>.GetBlock(42u);
block3.Damage = 3.4f;
block3.CostOfBullet = 1.64f;
ArchetypeDataBlock block4 = GameDataBlockBase<ArchetypeDataBlock>.GetBlock(38u);
block4.Damage = 11.2f;
block4.DefaultClipSize = 6;
block4.DefaultReloadTime = 1.7f;
block4.CostOfBullet = 5.1f;
block4.PiercingDamageCountLimit = 4;
ArchetypeDataBlock block5 = GameDataBlockBase<ArchetypeDataBlock>.GetBlock(43u);
block5.Damage = 3f;
block5.DefaultClipSize = 60;
block5.CostOfBullet = 0.957f;
ArchetypeDataBlock block6 = GameDataBlockBase<ArchetypeDataBlock>.GetBlock(66u);
Vector2 damageFalloff2 = block6.DamageFalloff;
damageFalloff2.x = 8f;
block6.StaggerDamageMulti = 6f;
block6.CostOfBullet = 0.958f;
block6.PiercingDamageCountLimit = 4;
ArchetypeDataBlock block7 = GameDataBlockBase<ArchetypeDataBlock>.GetBlock(49u);
block7.Damage = 3f;
block7.PrecisionDamageMulti = 0.8f;
block7.DefaultReloadTime = 1.4f;
block7.CostOfBullet = 1.435f;
block7.PiercingBullets = true;
block7.PiercingDamageCountLimit = 2;
block7.EquipSequence[1].TriggerTime = 1f;
ArchetypeDataBlock block8 = GameDataBlockBase<ArchetypeDataBlock>.GetBlock(19u);
Vector2 damageFalloff3 = block8.DamageFalloff;
damageFalloff3.x = 12f;
block8.DefaultClipSize = 60;
block8.CostOfBullet = 1.277f;
block8.PiercingBullets = true;
block8.PiercingDamageCountLimit = 2;
ArchetypeDataBlock block9 = GameDataBlockBase<ArchetypeDataBlock>.GetBlock(77u);
block9.Damage = 2.6f;
block9.CostOfBullet = 1.305f;
block9.PiercingBullets = true;
block9.PiercingDamageCountLimit = 2;
ArchetypeDataBlock block10 = GameDataBlockBase<ArchetypeDataBlock>.GetBlock(69u);
block10.Damage = 3.3f;
Vector2 damageFalloff4 = block10.DamageFalloff;
damageFalloff4.x = 8f;
block10.DefaultClipSize = 40;
block10.CostOfBullet = 1.435f;
block10.PiercingBullets = true;
block10.PiercingDamageCountLimit = 2;
ArchetypeDataBlock block11 = GameDataBlockBase<ArchetypeDataBlock>.GetBlock(18u);
block11.CostOfBullet = 1.366f;
block11.PiercingBullets = true;
block11.PiercingDamageCountLimit = 2;
ArchetypeDataBlock block12 = GameDataBlockBase<ArchetypeDataBlock>.GetBlock(25u);
block12.Damage = 8.2f;
block12.PrecisionDamageMulti = 1.1f;
block12.CostOfBullet = 5.45f;
ArchetypeDataBlock block13 = GameDataBlockBase<ArchetypeDataBlock>.GetBlock(26u);
block13.Damage = 7.51f;
block13.DefaultClipSize = 20;
block13.CostOfBullet = 3.82f;
ArchetypeDataBlock block14 = GameDataBlockBase<ArchetypeDataBlock>.GetBlock(5u);
block14.Damage = 2.5f;
block14.DefaultClipSize = 35;
block14.CostOfBullet = 1.46f;
block14.PiercingBullets = true;
block14.PiercingDamageCountLimit = 4;
ArchetypeDataBlock block15 = GameDataBlockBase<ArchetypeDataBlock>.GetBlock(3u);
block15.Damage = 3.51f;
block15.DefaultReloadTime = 1.7f;
block15.CostOfBullet = 1.7f;
block15.PiercingBullets = true;
block15.PiercingDamageCountLimit = 2;
ArchetypeDataBlock block16 = GameDataBlockBase<ArchetypeDataBlock>.GetBlock(1u);
block16.Damage = 7f;
block16.PrecisionDamageMulti = 1.1f;
block16.CostOfBullet = 3.64f;
block16.ShotDelay = 0.143f;
block16.PiercingBullets = true;
block16.PiercingDamageCountLimit = 2;
ArchetypeDataBlock block17 = GameDataBlockBase<ArchetypeDataBlock>.GetBlock(45u);
block17.StaggerDamageMulti = 1.4f;
block17.CostOfBullet = 10.4f;
ArchetypeDataBlock block18 = GameDataBlockBase<ArchetypeDataBlock>.GetBlock(78u);
Vector2 damageFalloff5 = block18.DamageFalloff;
damageFalloff5.x = 6f;
block18.DefaultClipSize = 18;
block18.DefaultReloadTime = 2f;
block18.CostOfBullet = 5.1f;
block18.ShotDelay = 0.22f;
block18.PiercingDamageCountLimit = 4;
ArchetypeDataBlock block19 = GameDataBlockBase<ArchetypeDataBlock>.GetBlock(81u);
block19.Damage = 25f;
Vector2 damageFalloff6 = block19.DamageFalloff;
damageFalloff6.x = 12f;
block19.StaggerDamageMulti = 1.8f;
block19.DefaultClipSize = 8;
block19.CostOfBullet = 11.4f;
block19.PiercingBullets = true;
ArchetypeDataBlock block20 = GameDataBlockBase<ArchetypeDataBlock>.GetBlock(73u);
block20.RecoilDataID = 34u;
block20.Damage = 5.7f;
block20.DefaultClipSize = 40;
block20.CostOfBullet = 1.43f;
block20.PiercingBullets = true;
block20.PiercingDamageCountLimit = 2;
ArchetypeDataBlock block21 = GameDataBlockBase<ArchetypeDataBlock>.GetBlock(17u);
block21.CostOfBullet = 1.275f;
block21.PiercingBullets = true;
block21.PiercingDamageCountLimit = 2;
ArchetypeDataBlock block22 = GameDataBlockBase<ArchetypeDataBlock>.GetBlock(33u);
block22.Damage = 4.51f;
Vector2 damageFalloff7 = block22.DamageFalloff;
damageFalloff7.x = 8f;
block22.CostOfBullet = 7f;
block22.ShotDelay = 0.5f;
block22.PiercingBullets = true;
block22.PiercingDamageCountLimit = 2;
ArchetypeDataBlock block23 = GameDataBlockBase<ArchetypeDataBlock>.GetBlock(35u);
block23.DefaultClipSize = 14;
block23.CostOfBullet = 4.04f;
block23.ShotgunBulletCount = 8;
ArchetypeDataBlock block24 = GameDataBlockBase<ArchetypeDataBlock>.GetBlock(72u);
Vector2 damageFalloff8 = block24.DamageFalloff;
damageFalloff8.x = 6f;
block24.DefaultClipSize = 3;
block24.CostOfBullet = 15f;
ArchetypeDataBlock block25 = GameDataBlockBase<ArchetypeDataBlock>.GetBlock(34u);
block25.DefaultClipSize = 6;
block25.CostOfBullet = 5.4f;
block25.PiercingDamageCountLimit = 2;
ArchetypeDataBlock block26 = GameDataBlockBase<ArchetypeDataBlock>.GetBlock(37u);
block26.Damage = 16.01f;
block26.DefaultReloadTime = 1.3f;
block26.CostOfBullet = 3.82f;
block26.PiercingBullets = true;
block26.PiercingDamageCountLimit = 2;
ArchetypeDataBlock block27 = GameDataBlockBase<ArchetypeDataBlock>.GetBlock(23u);
block27.DefaultClipSize = 50;
block27.DefaultReloadTime = 3.4f;
block27.CostOfBullet = 1.15f;
block27.PiercingBullets = true;
block27.PiercingDamageCountLimit = 2;
ArchetypeDataBlock block28 = GameDataBlockBase<ArchetypeDataBlock>.GetBlock(59u);
block28.DefaultClipSize = 80;
block28.DefaultReloadTime = 3.6f;
block28.CostOfBullet = 0.718f;
block28.PiercingBullets = true;
block28.PiercingDamageCountLimit = 2;
ArchetypeDataBlock block29 = GameDataBlockBase<ArchetypeDataBlock>.GetBlock(22u);
block29.DefaultClipSize = 21;
block29.CostOfBullet = 3.65f;
ArchetypeDataBlock block30 = GameDataBlockBase<ArchetypeDataBlock>.GetBlock(21u);
block30.DefaultClipSize = 11;
block30.CostOfBullet = 5.2f;
block30.SpecialChargetupTime = 0.1f;
ArchetypeDataBlock block31 = GameDataBlockBase<ArchetypeDataBlock>.GetBlock(80u);
block31.Damage = 40.01f;
block31.CostOfBullet = 7.65f;
block31.ShotDelay = 0.55f;
ArchetypeDataBlock block32 = GameDataBlockBase<ArchetypeDataBlock>.GetBlock(79u);
block32.Damage = 20.01f;
block32.PrecisionDamageMulti = 1.5f;
block32.DefaultReloadTime = 2.5f;
block32.CostOfBullet = 5.7f;
ArchetypeDataBlock block33 = GameDataBlockBase<ArchetypeDataBlock>.GetBlock(29u);
block33.PrecisionDamageMulti = 3f;
block33.DefaultClipSize = 3;
block33.DefaultReloadTime = 2f;
block33.CostOfBullet = 15f;
block33.ShotDelay = 0.6f;
ArchetypeDataBlock block34 = GameDataBlockBase<ArchetypeDataBlock>.GetBlock(65u);
block34.CostOfBullet = 9.1f;
block34.PiercingDamageCountLimit = 8;
ArchetypeDataBlock block35 = GameDataBlockBase<ArchetypeDataBlock>.GetBlock(58u);
block35.ShotgunBulletCount = 8;
block35.Sentry_StartFireDelay = 0.3f;
block35.Sentry_ForceAimTowardsBody = true;
block35.Sentry_DetectionMaxAngle = 75f;
List<WeaponAnimSequenceItem> val = new List<WeaponAnimSequenceItem>();
val.Add(new WeaponAnimSequenceItem
{
TriggerTime = 0f,
Type = (eWeaponAnimSequenceItemType)0,
StringData = "Front_Shotgun_3_equip_weaponmovement"
});
val.Add(new WeaponAnimSequenceItem
{
TriggerTime = 2f,
Type = (eWeaponAnimSequenceItemType)7
});
ArchetypeDataBlock val2 = new ArchetypeDataBlock
{
PublicName = new LocalizedText
{
Id = 0u,
UntranslatedText = "HEL Scattergun"
},
Description = new LocalizedText
{
Id = 0u,
UntranslatedText = "HEL Scattergun"
},
FireMode = (eWeaponFireMode)0,
RecoilDataID = 44u,
DamageBoosterEffect = (AgentModifier)58,
Damage = 2f,
DamageFalloff = new Vector2(4f, 30f),
StaggerDamageMulti = 2.3f,
PrecisionDamageMulti = 0.45f,
DefaultClipSize = 4,
DefaultReloadTime = 3f,
CostOfBullet = 11.5f,
ShotDelay = 0.5f,
ShellCasingSize = 1f,
PiercingBullets = true,
PiercingDamageCountLimit = 3,
HipFireSpread = 0f,
AimSpread = 0f,
EquipTransitionTime = 0.6f,
EquipSequence = val,
AimTransitionTime = 0.3f,
ShotgunBulletCount = 48,
ShotgunConeSize = 4,
ShotgunBulletSpread = 5
};
((GameDataBlockBase<ArchetypeDataBlock>)val2).name = "HEL_Scattergun";
((GameDataBlockBase<ArchetypeDataBlock>)val2).internalEnabled = true;
((GameDataBlockBase<ArchetypeDataBlock>)val2).persistentID = 9021u;
GameDataBlockBase<ArchetypeDataBlock>.AddBlock(val2, -1);
GearCategoryDataBlock val3 = new GearCategoryDataBlock
{
BaseItem = 110u,
BurstArchetype = 9021u
};
((GameDataBlockBase<GearCategoryDataBlock>)val3).name = "HEL_Scattergun";
((GameDataBlockBase<GearCategoryDataBlock>)val3).internalEnabled = true;
((GameDataBlockBase<GearCategoryDataBlock>)val3).persistentID = 9021u;
GameDataBlockBase<GearCategoryDataBlock>.AddBlock(val3, -1);
PlayerOfflineGearDataBlock val4 = new PlayerOfflineGearDataBlock
{
Type = (eOfflineGearType)1
};
((GameDataBlockBase<PlayerOfflineGearDataBlock>)val4).name = "HEL_Scattergun";
val4.GearJSON = "{\"Ver\":1,\"Name\":\"Drekker INEX Drei Armour Piercing\",\"Packet\":{\"Comps\":{\"Length\":14,\"a\":{\"c\":1,\"v\":1},\"b\":{\"c\":2,\"v\":9021},\"c\":{\"c\":3,\"v\":110},\"d\":{\"c\":4,\"v\":43},\"e\":{\"c\":5,\"v\":4},\"f\":{\"c\":6,\"v\":4},\"g\":{\"c\":7,\"v\":4},\"h\":{\"c\":12,\"v\":12},\"i\":{\"c\":16,\"v\":9},\"j\":{\"c\":19,\"v\":13},\"k\":{\"c\":21,\"v\":11},\"l\":{\"c\":23,\"v\":19},\"m\":{\"c\":25,\"v\":5}},\"publicName\":{\"data\":\"Drekker INEX Drei Armour \"}}}";
((GameDataBlockBase<PlayerOfflineGearDataBlock>)val4).internalEnabled = true;
((GameDataBlockBase<PlayerOfflineGearDataBlock>)val4).persistentID = 9021u;
GameDataBlockBase<PlayerOfflineGearDataBlock>.AddBlock(val4, -1);
ManualLogSource l = L;
if (l != null)
{
bool flag = default(bool);
BepInExInfoLogInterpolatedStringHandler val5 = new BepInExInfoLogInterpolatedStringHandler(15, 0, ref flag);
if (flag)
{
((BepInExLogInterpolatedStringHandler)val5).AppendLiteral("Weapons Changed");
}
l.LogInfo(val5);
}
}
}
public static ManualLogSource? L;
public override void Load()
{
//IL_0028: Unknown result type (might be due to invalid IL or missing references)
GameDataAPI.OnGameDataInitialized += RibbitdownWeapons.Modify;
((BasePlugin)this).AddComponent<RibbitdownWeapons>();
L = ((BasePlugin)this).Log;
new Harmony("Ribbit Weapons").PatchAll();
}
}
}