Skip to content

Commit 3a96fc4

Browse files
committed
Implemented Armor and Book
1 parent b9de9c6 commit 3a96fc4

24 files changed

Lines changed: 2485 additions & 1 deletion

ESPSharp/ESPSharp.csproj

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
<Compile Include="DataTypes\TypeStringArgData.cs" />
6666
<Compile Include="Enums\ActorValuesByte.cs" />
6767
<Compile Include="Enums\Alignment.cs" />
68+
<Compile Include="Enums\AnimationSoundType.cs" />
6869
<Compile Include="Enums\Axis.cs" />
6970
<Compile Include="Enums\BodyLocation.cs" />
7071
<Compile Include="Enums\BodyPartIndex.cs" />
@@ -75,7 +76,12 @@
7576
<Compile Include="Enums\EnchantType.cs" />
7677
<Compile Include="Enums\EnvironmentType.cs" />
7778
<Compile Include="Enums\EquipmentType.cs" />
79+
<Compile Include="Enums\Flags\ArmorFlags.cs" />
80+
<Compile Include="Enums\Flags\BipedDataFlags.cs" />
81+
<Compile Include="Enums\Flags\BodySlotFlags.cs" />
82+
<Compile Include="Enums\Flags\BookFlags.cs" />
7883
<Compile Include="Enums\Flags\ConditionTypeFlags.cs" />
84+
<Compile Include="Enums\Flags\ContainerFlags.cs" />
7985
<Compile Include="Enums\Flags\DecalDataFlags.cs" />
8086
<Compile Include="Enums\Flags\DestructableFlags.cs" />
8187
<Compile Include="Enums\Flags\DestructionStageFlags.cs" />
@@ -101,6 +107,7 @@
101107
<Compile Include="Enums\MaterialType.cs" />
102108
<Compile Include="Enums\MenuMode.cs" />
103109
<Compile Include="Enums\MiscStat.cs" />
110+
<Compile Include="Enums\NoYes.cs" />
104111
<Compile Include="Enums\PlayerAction.cs" />
105112
<Compile Include="Enums\ScriptType.cs" />
106113
<Compile Include="Enums\SpellType.cs" />
@@ -164,6 +171,16 @@
164171
<DesignTime>True</DesignTime>
165172
<DependentUpon>ActorEffect.tt</DependentUpon>
166173
</Compile>
174+
<Compile Include="Records\GeneratedCode\Armor.cs">
175+
<AutoGen>True</AutoGen>
176+
<DesignTime>True</DesignTime>
177+
<DependentUpon>Armor.tt</DependentUpon>
178+
</Compile>
179+
<Compile Include="Records\GeneratedCode\Book.cs">
180+
<AutoGen>True</AutoGen>
181+
<DesignTime>True</DesignTime>
182+
<DependentUpon>Book.tt</DependentUpon>
183+
</Compile>
167184
<Compile Include="Records\GeneratedCode\Class.cs">
168185
<AutoGen>True</AutoGen>
169186
<DesignTime>True</DesignTime>
@@ -257,6 +274,7 @@
257274
</Compile>
258275
<Compile Include="Records\Script.cs" />
259276
<Compile Include="Records\Terminal.cs" />
277+
<Compile Include="RecordView.cs" />
260278
<Compile Include="Subrecord.cs" />
261279
<Compile Include="SubrecordCollection.cs" />
262280
<Compile Include="SubrecordCollections\GeneratedCode\BodyModel.cs">
@@ -341,6 +359,14 @@
341359
<Generator>TextTemplatingFileGenerator</Generator>
342360
<LastGenOutput>ActorEffect.cs</LastGenOutput>
343361
</None>
362+
<None Include="Records\GeneratedCode\Armor.tt">
363+
<Generator>TextTemplatingFileGenerator</Generator>
364+
<LastGenOutput>Armor.cs</LastGenOutput>
365+
</None>
366+
<None Include="Records\GeneratedCode\Book.tt">
367+
<Generator>TextTemplatingFileGenerator</Generator>
368+
<LastGenOutput>Book.cs</LastGenOutput>
369+
</None>
344370
<None Include="Records\GeneratedCode\LandscapeTexture.tt">
345371
<Generator>TextTemplatingFileGenerator</Generator>
346372
<LastGenOutput>LandscapeTexture.cs</LastGenOutput>
@@ -418,11 +444,36 @@
418444
</Compile>
419445
<Compile Include="Subrecords\FormArray.cs" />
420446
<Compile Include="Subrecords\AlternateTextures.cs" />
447+
<Compile Include="Subrecords\GeneratedCode\AnimationSound.cs">
448+
<AutoGen>True</AutoGen>
449+
<DesignTime>True</DesignTime>
450+
<DependentUpon>AnimationSound.tt</DependentUpon>
451+
</Compile>
452+
<Compile Include="Subrecords\GeneratedCode\ArmorData.cs">
453+
<AutoGen>True</AutoGen>
454+
<DesignTime>True</DesignTime>
455+
<DependentUpon>ArmorData.tt</DependentUpon>
456+
</Compile>
457+
<Compile Include="Subrecords\GeneratedCode\ArmorExtraData.cs">
458+
<AutoGen>True</AutoGen>
459+
<DesignTime>True</DesignTime>
460+
<DependentUpon>ArmorExtraData.tt</DependentUpon>
461+
</Compile>
421462
<Compile Include="Subrecords\GeneratedCode\Attributes.cs">
422463
<AutoGen>True</AutoGen>
423464
<DesignTime>True</DesignTime>
424465
<DependentUpon>Attributes.tt</DependentUpon>
425466
</Compile>
467+
<Compile Include="Subrecords\GeneratedCode\BipedData.cs">
468+
<AutoGen>True</AutoGen>
469+
<DesignTime>True</DesignTime>
470+
<DependentUpon>BipedData.tt</DependentUpon>
471+
</Compile>
472+
<Compile Include="Subrecords\GeneratedCode\BookData.cs">
473+
<AutoGen>True</AutoGen>
474+
<DesignTime>True</DesignTime>
475+
<DependentUpon>BookData.tt</DependentUpon>
476+
</Compile>
426477
<Compile Include="Subrecords\GeneratedCode\ClassData.cs">
427478
<AutoGen>True</AutoGen>
428479
<DesignTime>True</DesignTime>
@@ -552,11 +603,32 @@
552603
<Compile Include="Subrecords\SubMarker.cs" />
553604
<Compile Include="Subrecords\UndecodedSubrecord.cs" />
554605
<Compile Include="Utility.cs" />
606+
<Compile Include="GroupView.cs" />
555607
<Compile Include="Zlib.cs" />
556608
<None Include="SubrecordCollections\GeneratedCode\TerminalMenu.tt">
557609
<Generator>TextTemplatingFileGenerator</Generator>
558610
<LastGenOutput>TerminalMenu.cs</LastGenOutput>
559611
</None>
612+
<None Include="Subrecords\GeneratedCode\AnimationSound.tt">
613+
<Generator>TextTemplatingFileGenerator</Generator>
614+
<LastGenOutput>AnimationSound.cs</LastGenOutput>
615+
</None>
616+
<None Include="Subrecords\GeneratedCode\ArmorData.tt">
617+
<Generator>TextTemplatingFileGenerator</Generator>
618+
<LastGenOutput>ArmorData.cs</LastGenOutput>
619+
</None>
620+
<None Include="Subrecords\GeneratedCode\ArmorExtraData.tt">
621+
<Generator>TextTemplatingFileGenerator</Generator>
622+
<LastGenOutput>ArmorExtraData.cs</LastGenOutput>
623+
</None>
624+
<None Include="Subrecords\GeneratedCode\BipedData.tt">
625+
<Generator>TextTemplatingFileGenerator</Generator>
626+
<LastGenOutput>BipedData.cs</LastGenOutput>
627+
</None>
628+
<None Include="Subrecords\GeneratedCode\BookData.tt">
629+
<Generator>TextTemplatingFileGenerator</Generator>
630+
<LastGenOutput>BookData.cs</LastGenOutput>
631+
</None>
560632
<None Include="Subrecords\GeneratedCode\TerminalData.tt">
561633
<Generator>TextTemplatingFileGenerator</Generator>
562634
<LastGenOutput>TerminalData.cs</LastGenOutput>
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
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
8+
{
9+
public enum AnimationSoundType
10+
{
11+
Walk = 17,
12+
Sneak = 18,
13+
Run = 19,
14+
SneakArmor = 20,
15+
RunArmor = 21,
16+
WalkArmor = 22
17+
}
18+
}

ESPSharp/Enums/DataSource.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
namespace ESPSharp.Enums
88
{
9-
public enum DataSource
9+
public enum DataSource : byte
1010
{
1111
XML,
1212
Binary,

ESPSharp/Enums/Flags/ArmorFlags.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
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 ArmorFlags : ushort
11+
{
12+
ModulatesVoice = 0x01
13+
}
14+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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 BipedDataFlags
11+
{
12+
Unknown0 = 0x01,
13+
Unknown1 = 0x02,
14+
HasBackpack = 0x04,
15+
Medium = 0x08,
16+
Unknown4 = 0x10,
17+
PowerArmor = 0x20,
18+
NonPlayable = 0x40,
19+
Heavy = 0x80
20+
}
21+
}
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
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 BodySlotFlags : uint
11+
{
12+
Head = 0x00000001,
13+
Hair = 0x00000002,
14+
UpperBody = 0x00000004,
15+
LeftHand = 0x00000008,
16+
RightHand = 0x00000010,
17+
Weapon = 0x00000020,
18+
PipBoy = 0x00000040,
19+
Backpack = 0x00000080,
20+
Necklace = 0x00000100,
21+
Headband = 0x00000200,
22+
Hat = 0x00000400,
23+
Eyeglasses = 0x00000800,
24+
NoseRing = 0x00001000,
25+
Earrings = 0x00002000,
26+
Mask = 0x00004000,
27+
Choker = 0x00008000,
28+
MouthObject = 0x00010000,
29+
BodyAddon1 = 0x00020000,
30+
BodyAddon2 = 0x00040000,
31+
BodyAddon3 = 0x00080000
32+
}
33+
}

ESPSharp/Enums/Flags/BookFlags.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
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 BookFlags : byte
11+
{
12+
CannotBeTaken = 0x02
13+
}
14+
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
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 ContainerFlags : byte
11+
{
12+
Respawns = 0x02
13+
}
14+
}

ESPSharp/Enums/NoYes.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
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
8+
{
9+
public enum NoYes : uint
10+
{
11+
No,
12+
Yes
13+
}
14+
}

ESPSharp/Record.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,12 @@ public static Record CreateRecord(string Tag)
263263
case "TERM":
264264
outRecord = new Terminal();
265265
break;
266+
case "ARMO":
267+
outRecord = new Armor();
268+
break;
269+
case "BOOK":
270+
outRecord = new Book();
271+
break;
266272
default:
267273
outRecord = new GenericRecord();
268274
break;

0 commit comments

Comments
 (0)