Skip to content

Commit

Permalink
Add missing checkpoint prefab nodes
Browse files Browse the repository at this point in the history
  • Loading branch information
BigBang1112 committed Jul 19, 2024
1 parent 9bcd2e2 commit 9101c23
Show file tree
Hide file tree
Showing 8 changed files with 90 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
NPlugStaticObjectModel_SInstanceParams 0x2F0D9000
- inherits: SMetaPtr

archive
version
float Phase01
18 changes: 18 additions & 0 deletions Src/GBX.NET/Engines/Meta/NPlugStaticObjectModel_SInstanceParams.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
namespace GBX.NET.Engines.Meta;

public partial class NPlugStaticObjectModel_SInstanceParams : IVersionable
{
public int Version { get; set; }

#if NET8_0_OR_GREATER
static void IClass.Read<T>(T node, GbxReaderWriter rw)
{
node.ReadWrite(rw);
}
#endif

public override void ReadWrite(GbxReaderWriter rw)
{
ReadWrite(rw, v: 0);
}
}
5 changes: 5 additions & 0 deletions Src/GBX.NET/Engines/Plug/CPlugEditorHelper.chunkl
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
CPlugEditorHelper 0x0917B000

archive
version
CPlugPrefab Prefab (external)
18 changes: 18 additions & 0 deletions Src/GBX.NET/Engines/Plug/CPlugEditorHelper.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
namespace GBX.NET.Engines.Plug;

public partial class CPlugEditorHelper : IVersionable
{
public int Version { get; set; }

#if NET8_0_OR_GREATER
static void IClass.Read<T>(T node, GbxReaderWriter rw)
{
node.ReadWrite(rw);
}
#endif

public override void ReadWrite(GbxReaderWriter rw)
{
ReadWrite(rw, v: 0);
}
}
1 change: 1 addition & 0 deletions Src/GBX.NET/Engines/Plug/CPlugPrefab.cs
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ public void ReadWrite(GbxReaderWriter rw, int v = 0)
0x2F0B6000 => rw.Node((NPlugDynaObjectModel_SInstanceParams?)@params),
0x2F0C8000 => rw.Node((NPlugDyna_SPrefabConstraintParams?)@params),
0x2F0D8000 => rw.Node((NPlugItemPlacement_SPlacementGroup?)@params),
0x2F0D9000 => rw.Node((NPlugStaticObjectModel_SInstanceParams?)@params),
uint.MaxValue => null,
_ => throw new NotImplementedException($"Unknown classId: 0x{classId:X8} ({ClassManager.GetName(classId)})"),
};
Expand Down
9 changes: 9 additions & 0 deletions Src/GBX.NET/Engines/Plug/CPlugSpawnModel.chunkl
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
CPlugSpawnModel 0x0917A000

0x000
version
iso4 Loc
float TorqueX
timeint TorqueDuration
vec3 DefaultGravitySpawn
int
15 changes: 15 additions & 0 deletions Src/GBX.NET/Engines/Plug/NPlugTrigger_SWaypoint.chunkl
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
NPlugTrigger_SWaypoint 0x09178000

archive
version
int<EGameItemWaypointType> Type
CPlugSurface TriggerShape (external)
bool NoRespawn

enum EGameItemWaypointType
Start
Finish
Checkpoint
None
StartFinish
Dispenser
18 changes: 18 additions & 0 deletions Src/GBX.NET/Engines/Plug/NPlugTrigger_SWaypoint.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
namespace GBX.NET.Engines.Plug;

public partial class NPlugTrigger_SWaypoint : IVersionable
{
public int Version { get; set; }

#if NET8_0_OR_GREATER
static void IClass.Read<T>(T node, GbxReaderWriter rw)
{
node.ReadWrite(rw);
}
#endif

public override void ReadWrite(GbxReaderWriter rw)
{
ReadWrite(rw, v: 0);
}
}

0 comments on commit 9101c23

Please sign in to comment.