Store campaign and mission name on Mission
This commit is contained in:
parent
659843c743
commit
3270d89b05
|
@ -39,6 +39,8 @@ public partial class Mission : Node3D
|
||||||
[Export]
|
[Export]
|
||||||
public bool Dump = false;
|
public bool Dump = false;
|
||||||
|
|
||||||
|
string _campaignName;
|
||||||
|
string _missionName;
|
||||||
ResourcePathManager _installPaths;
|
ResourcePathManager _installPaths;
|
||||||
DbFile _file;
|
DbFile _file;
|
||||||
TextureLoader _textureLoader;
|
TextureLoader _textureLoader;
|
||||||
|
@ -51,6 +53,8 @@ public partial class Mission : Node3D
|
||||||
missionSelector.pathManager = _installPaths;
|
missionSelector.pathManager = _installPaths;
|
||||||
missionSelector.MissionSelected += (string campaign, string mission) =>
|
missionSelector.MissionSelected += (string campaign, string mission) =>
|
||||||
{
|
{
|
||||||
|
_campaignName = campaign;
|
||||||
|
_missionName = mission;
|
||||||
FileName = _installPaths.GetMissionPath(campaign, mission);
|
FileName = _installPaths.GetMissionPath(campaign, mission);
|
||||||
Build = true;
|
Build = true;
|
||||||
};
|
};
|
||||||
|
@ -94,8 +98,7 @@ public partial class Mission : Node3D
|
||||||
ClearMap();
|
ClearMap();
|
||||||
|
|
||||||
// TODO: This shouldn't be set for things that aren't actually FMs
|
// TODO: This shouldn't be set for things that aren't actually FMs
|
||||||
var fmName = FileName.GetBaseDir().GetFile();
|
_textureLoader = new TextureLoader(_campaignName);
|
||||||
_textureLoader = new TextureLoader(fmName);
|
|
||||||
_file = new(FileName);
|
_file = new(FileName);
|
||||||
UseChunk<TxList>("TXLIST", LoadTextures);
|
UseChunk<TxList>("TXLIST", LoadTextures);
|
||||||
UseChunk<WorldRep>("WREXT", BuildWrMeshes);
|
UseChunk<WorldRep>("WREXT", BuildWrMeshes);
|
||||||
|
|
Loading…
Reference in New Issue