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