removed editor granted weapon abilities and prepared granting abilites through an inventory

This commit is contained in:
2026-04-18 15:44:59 +02:00
parent 9e57641a75
commit 9464fc7caa
13 changed files with 310 additions and 53 deletions

View File

@@ -13,22 +13,28 @@ public partial class CueHandlerInspectorPlugin : EditorInspectorPlugin
public override bool _CanHandle(GodotObject @object)
{
// Find out if its an implementation of CueHandler without having to add [Tool] attribute to them.
if (@object?.GetScript().As<CSharpScript>() is CSharpScript script)
try
{
StringName className = script.GetGlobalName();
Type baseType = typeof(ForgeCueHandler);
System.Reflection.Assembly assembly = baseType.Assembly;
Type? implementationType =
Array.Find(assembly.GetTypes(), x =>
x.Name == className &&
baseType.IsAssignableFrom(x));
return implementationType is not null;
if (@object?.GetScript().As<CSharpScript>() is null)
return false;
}
catch (Exception e)
{
return false;
}
return false;
var script = @object?.GetScript().As<CSharpScript>();
StringName className = script.GetGlobalName();
Type baseType = typeof(ForgeCueHandler);
System.Reflection.Assembly assembly = baseType.Assembly;
Type? implementationType =
Array.Find(assembly.GetTypes(), x =>
x.Name == className &&
baseType.IsAssignableFrom(x));
return implementationType is not null;
}
public override bool _ParseProperty(

View File

@@ -2,5 +2,4 @@
[node name="BackgroundMusicPlayer" type="AudioStreamPlayer" unique_id=676077136]
process_mode = 3
autoplay = true
bus = &"Music"