31 lines
981 B
C#
31 lines
981 B
C#
using Godot;
|
|
using System;
|
|
|
|
public partial class Mods : Control {
|
|
GlobalManager global = GlobalManager.Instance;
|
|
public override void _Ready() {
|
|
// RunDemo();
|
|
|
|
// ModManager modManager = new();
|
|
// modManager.RegistryFunc("OnInit", () => { GD.Print("OnInit"); }, true);
|
|
// modManager.RegistryFunc("foo", () => { GD.Print("Hello"); });
|
|
// LuaMod mod = new(ProjectSettings.GlobalizePath("res://Protos/test.lua"));
|
|
// mod.BindFunc(modManager);
|
|
// try {
|
|
// modManager.InvokeFunc<Action>("OnInit");
|
|
// }
|
|
// catch (System.Exception e) {
|
|
// GD.PrintErr("OnInit error: ", e.Message, e.StackTrace);
|
|
// }
|
|
}
|
|
|
|
public void OnOpenModFileDir() {
|
|
OS.ShellOpen(global.ConfigManager.GetValue<string>("mods_fpath") ?? "user://Mods/");
|
|
}
|
|
|
|
public void OnBack() {
|
|
ArgumentNullException.ThrowIfNull(global);
|
|
global.GotoScene("res://Main.tscn");
|
|
}
|
|
}
|