diff --git a/Godot 4 Tests/TestScenes/Feature148.ResourceTree/ResourceTreeTests.cs b/Godot 4 Tests/TestScenes/Feature148.ResourceTree/ResourceTreeTests.cs index 4467f573..fdc85e81 100644 --- a/Godot 4 Tests/TestScenes/Feature148.ResourceTree/ResourceTreeTests.cs +++ b/Godot 4 Tests/TestScenes/Feature148.ResourceTree/ResourceTreeTests.cs @@ -147,6 +147,23 @@ static void TestResTypes() ResWithTypes.Xtras.MyResCsv.Should().Be("res://TestScenes/Feature148.ResourceTree/Resources/xtras/MyRes.csv"); ResWithScenes.ResourceTreeTestsTscn.Should().BeOfType().And.NotBeNull(); + + ResWithTypes.MyAnimationAnim.Should().BeOfType().And.NotBeNull(); + ResWithTypes.MyAtlasTextureAtlastex.Should().BeOfType().And.NotBeNull(); + ResWithTypes.MyFontFontdata.Should().BeOfType().And.NotBeNull(); + ResWithTypes.MyJsonJson.Should().BeOfType().And.NotBeNull(); + ResWithTypes.MyMaterialMaterial.Should().BeOfType().And.NotBeNull(); + ResWithTypes.MyMeshMesh.Should().BeOfType().And.NotBeNull(); + ResWithTypes.MyMeshRes.Should().BeOfType().And.NotBeNull(); + ResWithTypes.MyMeshLibraryMeshlib.Should().BeOfType().And.NotBeNull(); + ResWithTypes.MyMultiMeshMultimesh.Should().BeOfType().And.NotBeNull(); + ResWithTypes.MyOccluderOcc.Should().BeOfType().And.NotBeNull(); + ResWithTypes.MyPhysicsMaterialPhymat.Should().BeOfType().And.NotBeNull(); + ResWithTypes.MyShaderGdshader.Should().BeOfType().And.NotBeNull(); + ResWithTypes.MyShapeShape.Should().BeOfType().And.NotBeNull(); + ResWithTypes.MyThemeTheme.Should().BeOfType().And.NotBeNull(); + // Meaningless type, can probably be ignored. + //ResWithTypes.MyTranslationTranslation.Should().BeOfType().And.NotBeNull(); } } } diff --git a/Godot 4 Tests/TestScenes/Feature148.ResourceTree/Resources/MyAnimation.anim b/Godot 4 Tests/TestScenes/Feature148.ResourceTree/Resources/MyAnimation.anim new file mode 100644 index 00000000..5b1c7fed Binary files /dev/null and b/Godot 4 Tests/TestScenes/Feature148.ResourceTree/Resources/MyAnimation.anim differ diff --git a/Godot 4 Tests/TestScenes/Feature148.ResourceTree/Resources/MyAtlasTexture.atlastex b/Godot 4 Tests/TestScenes/Feature148.ResourceTree/Resources/MyAtlasTexture.atlastex new file mode 100644 index 00000000..ca5e3fb5 Binary files /dev/null and b/Godot 4 Tests/TestScenes/Feature148.ResourceTree/Resources/MyAtlasTexture.atlastex differ diff --git a/Godot 4 Tests/TestScenes/Feature148.ResourceTree/Resources/MyFont.fontdata b/Godot 4 Tests/TestScenes/Feature148.ResourceTree/Resources/MyFont.fontdata new file mode 100644 index 00000000..b154a691 Binary files /dev/null and b/Godot 4 Tests/TestScenes/Feature148.ResourceTree/Resources/MyFont.fontdata differ diff --git a/Godot 4 Tests/TestScenes/Feature148.ResourceTree/Resources/MyJson.json b/Godot 4 Tests/TestScenes/Feature148.ResourceTree/Resources/MyJson.json new file mode 100644 index 00000000..ec747fa4 --- /dev/null +++ b/Godot 4 Tests/TestScenes/Feature148.ResourceTree/Resources/MyJson.json @@ -0,0 +1 @@ +null \ No newline at end of file diff --git a/Godot 4 Tests/TestScenes/Feature148.ResourceTree/Resources/MyMesh.mesh b/Godot 4 Tests/TestScenes/Feature148.ResourceTree/Resources/MyMesh.mesh new file mode 100644 index 00000000..8f857c7a Binary files /dev/null and b/Godot 4 Tests/TestScenes/Feature148.ResourceTree/Resources/MyMesh.mesh differ diff --git a/Godot 4 Tests/TestScenes/Feature148.ResourceTree/Resources/MyMesh.res b/Godot 4 Tests/TestScenes/Feature148.ResourceTree/Resources/MyMesh.res new file mode 100644 index 00000000..cc4c4cd8 Binary files /dev/null and b/Godot 4 Tests/TestScenes/Feature148.ResourceTree/Resources/MyMesh.res differ diff --git a/Godot 4 Tests/TestScenes/Feature148.ResourceTree/Resources/MyMeshLibrary.meshlib b/Godot 4 Tests/TestScenes/Feature148.ResourceTree/Resources/MyMeshLibrary.meshlib new file mode 100644 index 00000000..b738019a Binary files /dev/null and b/Godot 4 Tests/TestScenes/Feature148.ResourceTree/Resources/MyMeshLibrary.meshlib differ diff --git a/Godot 4 Tests/TestScenes/Feature148.ResourceTree/Resources/MyMultiMesh.multimesh b/Godot 4 Tests/TestScenes/Feature148.ResourceTree/Resources/MyMultiMesh.multimesh new file mode 100644 index 00000000..75dc237c Binary files /dev/null and b/Godot 4 Tests/TestScenes/Feature148.ResourceTree/Resources/MyMultiMesh.multimesh differ diff --git a/Godot 4 Tests/TestScenes/Feature148.ResourceTree/Resources/MyOccluder.occ b/Godot 4 Tests/TestScenes/Feature148.ResourceTree/Resources/MyOccluder.occ new file mode 100644 index 00000000..17649a17 Binary files /dev/null and b/Godot 4 Tests/TestScenes/Feature148.ResourceTree/Resources/MyOccluder.occ differ diff --git a/Godot 4 Tests/TestScenes/Feature148.ResourceTree/Resources/MyPhysicsMaterial.phymat b/Godot 4 Tests/TestScenes/Feature148.ResourceTree/Resources/MyPhysicsMaterial.phymat new file mode 100644 index 00000000..287a36fc Binary files /dev/null and b/Godot 4 Tests/TestScenes/Feature148.ResourceTree/Resources/MyPhysicsMaterial.phymat differ diff --git a/Godot 4 Tests/TestScenes/Feature148.ResourceTree/Resources/MyShader.gdshader b/Godot 4 Tests/TestScenes/Feature148.ResourceTree/Resources/MyShader.gdshader new file mode 100644 index 00000000..e9d02010 --- /dev/null +++ b/Godot 4 Tests/TestScenes/Feature148.ResourceTree/Resources/MyShader.gdshader @@ -0,0 +1 @@ +shader_type spatial; diff --git a/Godot 4 Tests/TestScenes/Feature148.ResourceTree/Resources/MyShader.gdshader.uid b/Godot 4 Tests/TestScenes/Feature148.ResourceTree/Resources/MyShader.gdshader.uid new file mode 100644 index 00000000..8d1677ba --- /dev/null +++ b/Godot 4 Tests/TestScenes/Feature148.ResourceTree/Resources/MyShader.gdshader.uid @@ -0,0 +1 @@ +uid://7y4o7dwsdkev diff --git a/Godot 4 Tests/TestScenes/Feature148.ResourceTree/Resources/MyShape.shape b/Godot 4 Tests/TestScenes/Feature148.ResourceTree/Resources/MyShape.shape new file mode 100644 index 00000000..a8d951b3 Binary files /dev/null and b/Godot 4 Tests/TestScenes/Feature148.ResourceTree/Resources/MyShape.shape differ diff --git a/Godot 4 Tests/TestScenes/Feature148.ResourceTree/Resources/MyTheme.theme b/Godot 4 Tests/TestScenes/Feature148.ResourceTree/Resources/MyTheme.theme new file mode 100644 index 00000000..a3f08369 Binary files /dev/null and b/Godot 4 Tests/TestScenes/Feature148.ResourceTree/Resources/MyTheme.theme differ diff --git a/Godot 4 Tests/TestScenes/Feature148.ResourceTree/Resources/MyTranslation.translation b/Godot 4 Tests/TestScenes/Feature148.ResourceTree/Resources/MyTranslation.translation new file mode 100644 index 00000000..d1898aa6 Binary files /dev/null and b/Godot 4 Tests/TestScenes/Feature148.ResourceTree/Resources/MyTranslation.translation differ diff --git a/SourceGenerators/ResourceTreeExtensions/ResourceTreeScraper.cs b/SourceGenerators/ResourceTreeExtensions/ResourceTreeScraper.cs index e4c1b239..de847130 100644 --- a/SourceGenerators/ResourceTreeExtensions/ResourceTreeScraper.cs +++ b/SourceGenerators/ResourceTreeExtensions/ResourceTreeScraper.cs @@ -116,7 +116,21 @@ string TryGetType(string file, out string[] exports) string TryGetTypeFromExtension() => Path.GetExtension(file) switch { ".tres" => MiniTresScraper.GetType(compilation, file), + ".res" => "Resource", ".tscn" or ".scn" => "PackedScene", + ".mesh" => "Mesh", + ".multimesh" => "MultiMesh", + ".meshlib" => "MeshLibrary", + ".material" => "Material", + ".gdshader" => "Shader", + ".atlastex" => "AtlasTexture", + ".fontdata" => "Font", + ".theme" => "Theme", + ".anim" => "Animation", + ".occ" => "Occluder3D", + ".shape" => "Shape3D", + ".phymat" => "PhysicsMaterial", + ".json" => "JSON", ".uid" => cfg.Uid ? UID : null, ".cs" => "CSharpScript", ".gd" => "GDScript",