Skip to content

Commit 6686d95

Browse files
committed
Merge branch 'staging'
2 parents 2bafd35 + 63eb316 commit 6686d95

File tree

7 files changed

+32
-13
lines changed

7 files changed

+32
-13
lines changed

CathodeLib/CathodeLib.csproj

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,14 @@
1010
<Authors>Matt Filer</Authors>
1111
<Description>Provides support for parsing and writing common Alien: Isolation formats from the Cathode engine.</Description>
1212
<Copyright>Matt Filer 2025</Copyright>
13-
<Version>0.8.0</Version>
13+
<Version>0.8.1</Version>
1414
<OutputType>Library</OutputType>
15-
<AssemblyVersion>0.7.8.0</AssemblyVersion>
16-
<FileVersion>0.7.8.0</FileVersion>
15+
<AssemblyVersion>0.7.8.1</AssemblyVersion>
16+
<FileVersion>0.7.8.1</FileVersion>
1717
<AllowUnsafeBlocks>False</AllowUnsafeBlocks>
18+
<PackageReadmeFile>README.md</PackageReadmeFile>
19+
<PackageTags>alien, modding, alien isolation, mod tool, file utility</PackageTags>
20+
<Title>CathodeLib</Title>
1821
</PropertyGroup>
1922

2023
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
@@ -33,6 +36,10 @@
3336
<Pack>True</Pack>
3437
<PackagePath></PackagePath>
3538
</None>
39+
<None Include="..\README.md">
40+
<Pack>True</Pack>
41+
<PackagePath>\</PackagePath>
42+
</None>
3643
</ItemGroup>
3744

3845
<ItemGroup>

CathodeLib/Scripts/CATHODE/Commands.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -705,7 +705,7 @@ override protected bool SaveInternal()
705705
for (int i = 0; i < parameters.Count; i++)
706706
{
707707
parameterOffsets.Add(parameters[i], (int)writer.BaseStream.Position / 4);
708-
Utilities.Write<ShortGuid>(writer, CommandsUtils.GetDataTypeGUID(parameters[i].dataType));
708+
Utilities.Write<ShortGuid>(writer, CommandsUtils.GetDataTypeGUID(parameters[i].dataType == DataType.ENUM_STRING ? DataType.STRING : parameters[i].dataType));
709709
switch (parameters[i].dataType)
710710
{
711711
case DataType.TRANSFORM:
@@ -722,6 +722,7 @@ override protected bool SaveInternal()
722722
case DataType.INTEGER:
723723
writer.Write(((cInteger)parameters[i]).value);
724724
break;
725+
case DataType.ENUM_STRING:
725726
case DataType.STRING:
726727
int stringStart = ((int)writer.BaseStream.Position + 4) / 4;
727728
byte[] stringStartRaw = BitConverter.GetBytes(stringStart);

CathodeLib/Scripts/CATHODE/CommandsPAK/Components/ParameterData.cs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,9 @@ public ParameterData(DataType type)
4646
case DataType.VECTOR:
4747
return ((cVector3)x).value == ((cVector3)y).value;
4848
case DataType.ENUM:
49-
cEnum x_e = (cEnum)x;
50-
cEnum y_e = (cEnum)y;
51-
return x_e.enumIndex == y_e.enumIndex && x_e.enumID == y_e.enumID;
49+
return ((cEnum)x).enumIndex == ((cEnum)y).enumIndex && ((cEnum)x).enumID == ((cEnum)y).enumID;
50+
case DataType.ENUM_STRING:
51+
return ((cEnumString)x).value == ((cEnumString)y).value && ((cEnumString)x).enumID == ((cEnumString)y).enumID;
5252
case DataType.SPLINE:
5353
return ((cSpline)x).splinePoints == ((cSpline)y).splinePoints;
5454
case DataType.NONE:
@@ -89,8 +89,9 @@ public override int GetHashCode()
8989
case DataType.VECTOR:
9090
return ((cVector3)this).value.GetHashCode();
9191
case DataType.ENUM:
92-
cEnum x_e = (cEnum)this;
93-
return x_e.enumID.ToByteString().GetHashCode() + x_e.enumIndex;
92+
return ((cEnum)this).enumID.ToByteString().GetHashCode() + ((cEnum)this).enumIndex;
93+
case DataType.ENUM_STRING:
94+
return ((cEnumString)this).enumID.ToByteString().GetHashCode() + ((cEnumString)this).value.GetHashCode();
9495
case DataType.SPLINE:
9596
cSpline x_sd = (cSpline)this;
9697
int x_sd_i = 0;

CathodeLib/Scripts/CATHODE/CommandsPAK/Components/TypeEnums.cs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1072,27 +1072,32 @@ public enum EnumType : uint
10721072
/* Enum strings available within Cathode (these are cString type, but can be looked up using DATA) */
10731073
public enum EnumStringType : uint
10741074
{
1075+
//TODO: need to update the enum webpage with these
1076+
10751077
ACHIEVEMENT_ID = 3485949151,
10761078
ACHIEVEMENT_STAT_ID = 1970461931,
10771079
ANIM_SET = 796973007,
10781080
ANIM_TREE_SET = 398817255,
10791081
ATTRIBUTE_SET = 2268397301,
10801082
BLUEPRINT_TYPE = 3218638249,
10811083
CHR_SKELETON_SET = 3537648953,
1082-
CUSTOM_PRESET_SET = 935006766,
1083-
DVR_MOMENT_ID = 1074858079,
10841084
GAME_VARIABLE = 3806196912,
10851085
GAMEPLAY_TIP_STRING_ID = 3550943910,
10861086
IDTAG_ID = 3358979085,
1087-
MAP_ELEMENT_ID = 3723361710,
10881087
MAP_KEYFRAME_ID = 1494642745,
10891088
NOSTROMO_LOG_ID = 1157640041,
10901089
OBJECTIVE_ENTRY_ID = 3067794301,
10911090
PRESENCE_ID = 2589585909,
10921091
SEVASTOPOL_LOG_ID = 3163607120,
1092+
SOUND_ARGUMENT = 4000624401,
10931093
SOUND_EVENT = 3122669037,
10941094
SOUND_FOOTWEAR_GROUP = 911429336,
10951095
SOUND_LEG_GROUP = 1285801591,
1096+
SOUND_PARAMETER = 743631359,
1097+
SOUND_REVERB = 1053063402,
1098+
SOUND_RTPC = 3430842214,
1099+
SOUND_STATE = 3294208177,
1100+
SOUND_SWITCH = 1905083384,
10961101
SOUND_TORSO_GROUP = 1112933567,
10971102
TUTORIAL_ENTRY_ID = 2135177174,
10981103
}

CathodeLib/Scripts/CATHODE/CommandsPAK/Helpers/CompositeUtils.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,8 @@ public static ParameterVariant PinTypeToParameterVariant(CompositePinType type)
238238
case CompositePinType.CompositeOutputVariablePin:
239239
case CompositePinType.CompositeOutputZoneLinkPtrVariablePin:
240240
case CompositePinType.CompositeOutputZonePtrVariablePin:
241+
case CompositePinType.CompositeOutputEnumVariablePin:
242+
case CompositePinType.CompositeOutputEnumStringVariablePin:
241243
return ParameterVariant.OUTPUT_PIN;
242244
case CompositePinType.CompositeMethodPin:
243245
return ParameterVariant.METHOD_PIN;

CathodeLib/Scripts/CATHODE/CommandsPAK/Helpers/ParameterUtils.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -556,6 +556,9 @@ public static ParameterData CreateDefaultParameterData(Entity entity, Composite
556556
VariableEntity variableEntity = (VariableEntity)entity;
557557
if (parameter == variableEntity.name)
558558
{
559+
ParameterData defaultVal = variableEntity.GetParameter(parameter)?.content;
560+
if (defaultVal != null)
561+
return (ParameterData)defaultVal.Clone();
559562
CompositePinInfoTable.PinInfo info = CompositeUtils.GetParameterInfo(composite, variableEntity);
560563
switch (variableEntity.type)
561564
{

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ Check out a full overview of the Commands structure [on the Wiki](https://github
6969
- Get/set content as an `XmlDocument` via `BML.Content`
7070

7171
## For saves:
72-
- `CATHODE.ProgressionSave` handles `PROGRESSION.AIS` files
72+
- `CATHODE.EXPERIMENTAL.ProgressionSave` handles `PROGRESSION.AIS` files
7373
- `CATHODE.EXPERIMENTAL.MissionSave` handles `*.AIS` files (experimental)
7474

7575
---

0 commit comments

Comments
 (0)