Skip to content

Commit df3b073

Browse files
committed
Implemented Ammo
1 parent a3cb1e0 commit df3b073

9 files changed

Lines changed: 922 additions & 0 deletions

File tree

ESPSharp/ESPSharp.csproj

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@
104104
<Compile Include="Enums\Flags\WeaponCritFlags.cs" />
105105
<Compile Include="Enums\Flags\WeaponDataFlags1.cs" />
106106
<Compile Include="Enums\Flags\WeaponDataFlags2.cs" />
107+
<Compile Include="Enums\Flags\WeaponFlags.cs" />
107108
<Compile Include="Enums\FormType.cs" />
108109
<Compile Include="Enums\FunctionTarget.cs" />
109110
<Compile Include="Enums\FunctionType.cs" />
@@ -192,6 +193,11 @@
192193
<DesignTime>True</DesignTime>
193194
<DependentUpon>ActorEffect.tt</DependentUpon>
194195
</Compile>
196+
<Compile Include="Records\GeneratedCode\Ammunition.cs">
197+
<AutoGen>True</AutoGen>
198+
<DesignTime>True</DesignTime>
199+
<DependentUpon>Ammunition.tt</DependentUpon>
200+
</Compile>
195201
<Compile Include="Records\GeneratedCode\Armor.cs">
196202
<AutoGen>True</AutoGen>
197203
<DesignTime>True</DesignTime>
@@ -450,6 +456,10 @@
450456
<Generator>TextTemplatingFileGenerator</Generator>
451457
<LastGenOutput>ActorEffect.cs</LastGenOutput>
452458
</None>
459+
<None Include="Records\GeneratedCode\Ammunition.tt">
460+
<Generator>TextTemplatingFileGenerator</Generator>
461+
<LastGenOutput>Ammunition.cs</LastGenOutput>
462+
</None>
453463
<None Include="Records\GeneratedCode\Armor.tt">
454464
<Generator>TextTemplatingFileGenerator</Generator>
455465
<LastGenOutput>Armor.cs</LastGenOutput>
@@ -596,6 +606,16 @@
596606
</Compile>
597607
<Compile Include="Subrecords\FormArray.cs" />
598608
<Compile Include="Subrecords\AlternateTextures.cs" />
609+
<Compile Include="Subrecords\GeneratedCode\AmmoData.cs">
610+
<AutoGen>True</AutoGen>
611+
<DesignTime>True</DesignTime>
612+
<DependentUpon>AmmoData.tt</DependentUpon>
613+
</Compile>
614+
<Compile Include="Subrecords\GeneratedCode\AmmoExtraData.cs">
615+
<AutoGen>True</AutoGen>
616+
<DesignTime>True</DesignTime>
617+
<DependentUpon>AmmoExtraData.tt</DependentUpon>
618+
</Compile>
599619
<Compile Include="Subrecords\GeneratedCode\AnimationSound.cs">
600620
<AutoGen>True</AutoGen>
601621
<DesignTime>True</DesignTime>
@@ -837,6 +857,14 @@
837857
<Generator>TextTemplatingFileGenerator</Generator>
838858
<LastGenOutput>TerminalMenu.cs</LastGenOutput>
839859
</None>
860+
<None Include="Subrecords\GeneratedCode\AmmoData.tt">
861+
<Generator>TextTemplatingFileGenerator</Generator>
862+
<LastGenOutput>AmmoData.cs</LastGenOutput>
863+
</None>
864+
<None Include="Subrecords\GeneratedCode\AmmoExtraData.tt">
865+
<Generator>TextTemplatingFileGenerator</Generator>
866+
<LastGenOutput>AmmoExtraData.cs</LastGenOutput>
867+
</None>
840868
<None Include="Subrecords\GeneratedCode\AnimationSound.tt">
841869
<Generator>TextTemplatingFileGenerator</Generator>
842870
<LastGenOutput>AnimationSound.cs</LastGenOutput>
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
using System;
2+
using System.Collections.Generic;
3+
using System.Linq;
4+
using System.Text;
5+
using System.Threading.Tasks;
6+
7+
namespace ESPSharp.Enums.Flags
8+
{
9+
[Flags]
10+
public enum WeaponFlags : byte
11+
{
12+
IgnoresNormalWeaponResistance = 0x01,
13+
NonPlayable = 0x02
14+
}
15+
}

ESPSharp/Record.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,9 @@ public static Record CreateRecord(string Tag)
310310
case "WEAP":
311311
outRecord = new Weapon();
312312
break;
313+
case "AMMO":
314+
outRecord = new Ammunition();
315+
break;
313316
default:
314317
outRecord = new GenericRecord();
315318
break;

0 commit comments

Comments
 (0)