Skip to content

Commit

Permalink
0.75a:
Browse files Browse the repository at this point in the history
Appearances will now be imported even if there's no StrRef specified as the STR_REF is optional and not required.
  • Loading branch information
Cjreek committed Aug 12, 2024
1 parent b3e3d19 commit e2c3b2f
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 3 deletions.
2 changes: 1 addition & 1 deletion eos-edit/Views/MainWindow.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="Eos.Views.MainWindow" MinHeight="300" MinWidth="500"
Height="700" Width="1100" Loaded="mainWindow_Loaded"
x:Name="mainWindow" Tag="Eos Toolset v0.75" FontFamily="Segoe UI"
x:Name="mainWindow" Tag="Eos Toolset v0.75a" FontFamily="Segoe UI"
Closing="mainWindow_Closing"
Icon="/Assets/Icons/Eos.ico">
<Window.Title>
Expand Down
14 changes: 13 additions & 1 deletion eos/Services/GameDataImport.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2403,7 +2403,19 @@ private void ImportAppearances()
tmpAppearance.Index = i;
tmpAppearance.SourceLabel = appearance2da[i].AsString("LABEL");

if (!SetText(tmpAppearance.Name, appearance2da[i].AsInteger("STRING_REF"))) continue;
if (!SetText(tmpAppearance.Name, appearance2da[i].AsInteger("STRING_REF")))
{
if ((tmpAppearance.SourceLabel != "") && (tmpAppearance.SourceLabel != null))
{
foreach (TLKLanguage lang in Enum.GetValues(typeof(TLKLanguage)))
{
tmpAppearance.Name[lang].Text = tmpAppearance.SourceLabel;
tmpAppearance.Name[lang].TextF = tmpAppearance.SourceLabel;
}
}
else
continue;
}
tmpAppearance.RaceModel = appearance2da[i].AsString("RACE") ?? "";
tmpAppearance.EnvironmentMap = appearance2da[i].AsString("ENVMAP") ?? "";
tmpAppearance.BloodColor = Enum.Parse<BloodColor>(appearance2da[i].AsString("BLOODCOLR") ?? "R", true);
Expand Down
14 changes: 13 additions & 1 deletion eos/Services/ImportService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1262,7 +1262,19 @@ private void ImportAppearances()
tmpAppearance.Index = i;
tmpAppearance.SourceLabel = appearance2da[i].AsString("LABEL");

if (!SetText(tmpAppearance.Name, appearance2da[i].AsInteger("STRING_REF"))) continue;
if (!SetText(tmpAppearance.Name, appearance2da[i].AsInteger("STRING_REF")))
{
if ((tmpAppearance.SourceLabel != "") && (tmpAppearance.SourceLabel != null))
{
foreach (TLKLanguage lang in Enum.GetValues(typeof(TLKLanguage)))
{
tmpAppearance.Name[lang].Text = tmpAppearance.SourceLabel;
tmpAppearance.Name[lang].TextF = tmpAppearance.SourceLabel;
}
}
else
continue;
}
tmpAppearance.RaceModel = appearance2da[i].AsString("RACE") ?? "";
tmpAppearance.EnvironmentMap = appearance2da[i].AsString("ENVMAP") ?? "";
tmpAppearance.BloodColor = Enum.Parse<BloodColor>(appearance2da[i].AsString("BLOODCOLR") ?? "R", true);
Expand Down

0 comments on commit e2c3b2f

Please sign in to comment.