diff --git a/project.godot b/project.godot index 1cfa655..0b1f72d 100644 --- a/project.godot +++ b/project.godot @@ -15,6 +15,10 @@ run/main_scene="res://project/scenes/main.tscn" config/features=PackedStringArray("4.3", "C#", "Forward Plus") config/icon="res://icon.svg" +[autoload] + +Context="*res://project/code/TMV/Context.cs" + [dotnet] project/assembly_name="Thief Mission Viewer" diff --git a/project/code/TMV/Context.cs b/project/code/TMV/Context.cs new file mode 100644 index 0000000..6cd980f --- /dev/null +++ b/project/code/TMV/Context.cs @@ -0,0 +1,21 @@ +using Godot; +using KeepersCompound.LGS; + +namespace KeepersCompound.TMV; + +public partial class Context : Node +{ + public static Context Instance { get; private set; } + + public ResourcePathManager PathManager { get; private set; } + public ModelLoader ModelLoader { get; private set; } + + public override void _Ready() + { + var extractPath = ProjectSettings.GlobalizePath($"user://extracted/tmp"); + PathManager = new ResourcePathManager(extractPath); + ModelLoader = new ModelLoader(PathManager); + + Instance = this; + } +} \ No newline at end of file