├── .gitattributes ├── .gitignore ├── Assets ├── Resources │ ├── settings.tres │ ├── software_info.tres │ └── update_log.tres ├── icon.png └── icon.png.import ├── BasePlugins └── __0CorePlugin │ ├── .vscode │ └── settings.json │ ├── config.json │ ├── main.lua │ ├── notification_system │ └── main.lua │ └── project_manager │ ├── about │ ├── about.lua │ ├── about_bottom.lua │ ├── about_content.lua │ └── about_top.lua │ ├── bottom_bar.lua │ ├── content.lua │ ├── main.lua │ ├── plugin_components.lua │ ├── project_creator.lua │ ├── theme.lua │ └── top_bar.lua ├── Core ├── Debugger │ ├── debugger_main.gd │ └── logger_main.gd ├── LUA │ ├── advanced_lib │ │ ├── lua_file_utility.gd │ │ └── lua_string_utility.gd │ ├── lua_main.gd │ ├── permissions │ │ └── permission_manager.gd │ └── url │ │ └── url_helper.gd ├── Main │ ├── assets_manager │ │ ├── asset_manager.gd │ │ └── res_assets.gd │ ├── data_manager.gd │ ├── editor.tscn │ ├── event_manager.gd │ ├── godot_manager │ │ └── godot_manager.gd │ ├── interface_manager │ │ ├── interface_manager.gd │ │ └── res_interface.gd │ ├── main.gd │ ├── plugins_manager │ │ ├── plugin_manager.gd │ │ ├── res_permission.gd │ │ ├── res_plugin.gd │ │ └── res_plugin_permission.gd │ ├── project_manager │ │ ├── project_manager.gd │ │ └── res_project.gd │ └── theme_manager │ │ └── theme_manager.gd └── Settings │ ├── settings.gd │ ├── settings_data.gd │ ├── software_info.gd │ └── update_log.gd ├── LICENSE ├── README.md ├── Shared ├── id_generator.gd └── resources_script │ └── res_permission_object.gd ├── Tests ├── data_manager_test.gd ├── test_assets_manager01.tscn ├── test_crash_system.tscn ├── test_custom_signal.tscn ├── test_data_manager01.tscn ├── test_data_manager01_ress.gd ├── test_global_event_manager01.tscn ├── test_grid.tscn ├── test_main01.tscn └── test_plugin_manager01.tscn ├── addons ├── gdUnit4 │ ├── LICENSE │ ├── bin │ │ ├── GdUnitBuildTool.gd │ │ ├── GdUnitCmdTool.gd │ │ └── GdUnitCopyLog.gd │ ├── plugin.cfg │ ├── plugin.gd │ ├── runtest.cmd │ ├── runtest.sh │ └── src │ │ ├── Comparator.gd │ │ ├── Fuzzers.gd │ │ ├── GdUnitArrayAssert.gd │ │ ├── GdUnitAssert.gd │ │ ├── GdUnitAwaiter.gd │ │ ├── GdUnitBoolAssert.gd │ │ ├── GdUnitConstants.gd │ │ ├── GdUnitDictionaryAssert.gd │ │ ├── GdUnitFailureAssert.gd │ │ ├── GdUnitFileAssert.gd │ │ ├── GdUnitFloatAssert.gd │ │ ├── GdUnitFuncAssert.gd │ │ ├── GdUnitGodotErrorAssert.gd │ │ ├── GdUnitIntAssert.gd │ │ ├── GdUnitObjectAssert.gd │ │ ├── GdUnitResultAssert.gd │ │ ├── GdUnitSceneRunner.gd │ │ ├── GdUnitSignalAssert.gd │ │ ├── GdUnitStringAssert.gd │ │ ├── GdUnitTestSuite.gd │ │ ├── GdUnitTuple.gd │ │ ├── GdUnitValueExtractor.gd │ │ ├── GdUnitVectorAssert.gd │ │ ├── asserts │ │ ├── CallBackValueProvider.gd │ │ ├── DefaultValueProvider.gd │ │ ├── GdAssertMessages.gd │ │ ├── GdAssertReports.gd │ │ ├── GdUnitArrayAssertImpl.gd │ │ ├── GdUnitAssertImpl.gd │ │ ├── GdUnitAssertions.gd │ │ ├── GdUnitBoolAssertImpl.gd │ │ ├── GdUnitDictionaryAssertImpl.gd │ │ ├── GdUnitFailureAssertImpl.gd │ │ ├── GdUnitFileAssertImpl.gd │ │ ├── GdUnitFloatAssertImpl.gd │ │ ├── GdUnitFuncAssertImpl.gd │ │ ├── GdUnitGodotErrorAssertImpl.gd │ │ ├── GdUnitIntAssertImpl.gd │ │ ├── GdUnitObjectAssertImpl.gd │ │ ├── GdUnitResultAssertImpl.gd │ │ ├── GdUnitSignalAssertImpl.gd │ │ ├── GdUnitStringAssertImpl.gd │ │ ├── GdUnitVectorAssertImpl.gd │ │ └── ValueProvider.gd │ │ ├── cmd │ │ ├── CmdArgumentParser.gd │ │ ├── CmdCommand.gd │ │ ├── CmdCommandHandler.gd │ │ ├── CmdConsole.gd │ │ ├── CmdOption.gd │ │ └── CmdOptions.gd │ │ ├── core │ │ ├── GdArrayTools.gd │ │ ├── GdDiffTool.gd │ │ ├── GdFunctionDoubler.gd │ │ ├── GdObjects.gd │ │ ├── GdUnit4Version.gd │ │ ├── GdUnitClassDoubler.gd │ │ ├── GdUnitFileAccess.gd │ │ ├── GdUnitObjectInteractions.gd │ │ ├── GdUnitObjectInteractionsTemplate.gd │ │ ├── GdUnitProperty.gd │ │ ├── GdUnitResult.gd │ │ ├── GdUnitRunner.gd │ │ ├── GdUnitRunner.tscn │ │ ├── GdUnitRunnerConfig.gd │ │ ├── GdUnitSceneRunnerImpl.gd │ │ ├── GdUnitScriptType.gd │ │ ├── GdUnitSettings.gd │ │ ├── GdUnitSignalAwaiter.gd │ │ ├── GdUnitSignalCollector.gd │ │ ├── GdUnitSignals.gd │ │ ├── GdUnitSingleton.gd │ │ ├── GdUnitTestSuiteBuilder.gd │ │ ├── GdUnitTestSuiteScanner.gd │ │ ├── GdUnitTools.gd │ │ ├── GodotVersionFixures.gd │ │ ├── LocalTime.gd │ │ ├── _TestCase.gd │ │ ├── assets │ │ │ ├── touch-button.png │ │ │ └── touch-button.png.import │ │ ├── command │ │ │ ├── GdUnitCommand.gd │ │ │ ├── GdUnitCommandHandler.gd │ │ │ ├── GdUnitShortcut.gd │ │ │ └── GdUnitShortcutAction.gd │ │ ├── discovery │ │ │ ├── GdUnitTestDiscoverGuard.gd │ │ │ └── GdUnitTestDiscoverer.gd │ │ ├── event │ │ │ ├── GdUnitEvent.gd │ │ │ ├── GdUnitEventInit.gd │ │ │ ├── GdUnitEventStop.gd │ │ │ ├── GdUnitEventTestDiscoverEnd.gd │ │ │ ├── GdUnitEventTestDiscoverStart.gd │ │ │ ├── GdUnitEventTestDiscoverTestAdded.gd │ │ │ ├── GdUnitEventTestDiscoverTestRemoved.gd │ │ │ └── GdUnitEventTestDiscoverTestSuiteAdded.gd │ │ ├── execution │ │ │ ├── GdUnitExecutionContext.gd │ │ │ ├── GdUnitMemoryObserver.gd │ │ │ ├── GdUnitTestReportCollector.gd │ │ │ ├── GdUnitTestSuiteExecutor.gd │ │ │ └── stages │ │ │ │ ├── GdUnitTestCaseAfterStage.gd │ │ │ │ ├── GdUnitTestCaseBeforeStage.gd │ │ │ │ ├── GdUnitTestCaseExecutionStage.gd │ │ │ │ ├── GdUnitTestSuiteAfterStage.gd │ │ │ │ ├── GdUnitTestSuiteBeforeStage.gd │ │ │ │ ├── GdUnitTestSuiteExecutionStage.gd │ │ │ │ ├── IGdUnitExecutionStage.gd │ │ │ │ ├── fuzzed │ │ │ │ ├── GdUnitTestCaseFuzzedExecutionStage.gd │ │ │ │ └── GdUnitTestCaseFuzzedTestStage.gd │ │ │ │ ├── parameterized │ │ │ │ ├── GdUnitTestCaseParameterSetTestStage.gd │ │ │ │ ├── GdUnitTestCaseParameterizedExecutionStage.gd │ │ │ │ └── GdUnitTestCaseParameterizedTestStage.gd │ │ │ │ └── single │ │ │ │ ├── GdUnitTestCaseSingleExecutionStage.gd │ │ │ │ └── GdUnitTestCaseSingleTestStage.gd │ │ ├── parse │ │ │ ├── GdClassDescriptor.gd │ │ │ ├── GdDefaultValueDecoder.gd │ │ │ ├── GdFunctionArgument.gd │ │ │ ├── GdFunctionDescriptor.gd │ │ │ ├── GdScriptParser.gd │ │ │ ├── GdUnitExpressionRunner.gd │ │ │ └── GdUnitTestParameterSetResolver.gd │ │ ├── report │ │ │ └── GdUnitReport.gd │ │ ├── templates │ │ │ └── test_suite │ │ │ │ ├── GdUnitTestSuiteDefaultTemplate.gd │ │ │ │ └── GdUnitTestSuiteTemplate.gd │ │ └── thread │ │ │ ├── GdUnitThreadContext.gd │ │ │ └── GdUnitThreadManager.gd │ │ ├── doubler │ │ └── CallableDoubler.gd │ │ ├── extractors │ │ └── GdUnitFuncValueExtractor.gd │ │ ├── fuzzers │ │ ├── FloatFuzzer.gd │ │ ├── Fuzzer.gd │ │ ├── IntFuzzer.gd │ │ ├── StringFuzzer.gd │ │ ├── Vector2Fuzzer.gd │ │ └── Vector3Fuzzer.gd │ │ ├── matchers │ │ ├── AnyArgumentMatcher.gd │ │ ├── AnyBuildInTypeArgumentMatcher.gd │ │ ├── AnyClazzArgumentMatcher.gd │ │ ├── ChainedArgumentMatcher.gd │ │ ├── EqualsArgumentMatcher.gd │ │ ├── GdUnitArgumentMatcher.gd │ │ └── GdUnitArgumentMatchers.gd │ │ ├── mocking │ │ ├── GdUnitMock.gd │ │ ├── GdUnitMockBuilder.gd │ │ ├── GdUnitMockFunctionDoubler.gd │ │ └── GdUnitMockImpl.gd │ │ ├── monitor │ │ ├── ErrorLogEntry.gd │ │ ├── GdUnitMonitor.gd │ │ ├── GdUnitOrphanNodesMonitor.gd │ │ └── GodotGdErrorMonitor.gd │ │ ├── mono │ │ ├── GdUnit4CSharpApi.cs │ │ └── GdUnit4CSharpApiLoader.gd │ │ ├── network │ │ ├── GdUnitServer.gd │ │ ├── GdUnitServer.tscn │ │ ├── GdUnitServerConstants.gd │ │ ├── GdUnitTask.gd │ │ ├── GdUnitTcpClient.gd │ │ ├── GdUnitTcpServer.gd │ │ └── rpc │ │ │ ├── RPC.gd │ │ │ ├── RPCClientConnect.gd │ │ │ ├── RPCClientDisconnect.gd │ │ │ ├── RPCGdUnitEvent.gd │ │ │ ├── RPCGdUnitTestSuite.gd │ │ │ ├── RPCMessage.gd │ │ │ └── dtos │ │ │ ├── GdUnitResourceDto.gd │ │ │ ├── GdUnitTestCaseDto.gd │ │ │ └── GdUnitTestSuiteDto.gd │ │ ├── report │ │ ├── GdUnitByPathReport.gd │ │ ├── GdUnitHtmlPatterns.gd │ │ ├── GdUnitHtmlReport.gd │ │ ├── GdUnitReportSummary.gd │ │ ├── GdUnitTestCaseReport.gd │ │ ├── GdUnitTestSuiteReport.gd │ │ ├── JUnitXmlReport.gd │ │ ├── XmlElement.gd │ │ └── template │ │ │ ├── css │ │ │ ├── breadcrumb.css │ │ │ ├── logo.png │ │ │ ├── logo.png.import │ │ │ └── styles.css │ │ │ ├── folder_report.html │ │ │ ├── index.html │ │ │ └── suite_report.html │ │ ├── spy │ │ ├── GdUnitSpyBuilder.gd │ │ ├── GdUnitSpyFunctionDoubler.gd │ │ └── GdUnitSpyImpl.gd │ │ ├── ui │ │ ├── GdUnitConsole.gd │ │ ├── GdUnitConsole.tscn │ │ ├── GdUnitFonts.gd │ │ ├── GdUnitInspector.gd │ │ ├── GdUnitInspector.tscn │ │ ├── GdUnitInspectorTreeConstants.gd │ │ ├── GdUnitUiTools.gd │ │ ├── ScriptEditorControls.gd │ │ ├── menu │ │ │ ├── EditorFileSystemContextMenuHandler.gd │ │ │ ├── GdUnitContextMenuItem.gd │ │ │ └── ScriptEditorContextMenuHandler.gd │ │ ├── parts │ │ │ ├── InspectorMonitor.gd │ │ │ ├── InspectorMonitor.tscn │ │ │ ├── InspectorProgressBar.gd │ │ │ ├── InspectorProgressBar.tscn │ │ │ ├── InspectorStatusBar.gd │ │ │ ├── InspectorStatusBar.tscn │ │ │ ├── InspectorToolBar.gd │ │ │ ├── InspectorToolBar.tscn │ │ │ ├── InspectorTreeMainPanel.gd │ │ │ └── InspectorTreePanel.tscn │ │ ├── settings │ │ │ ├── GdUnitInputCapture.gd │ │ │ ├── GdUnitInputCapture.tscn │ │ │ ├── GdUnitSettingsDialog.gd │ │ │ ├── GdUnitSettingsDialog.tscn │ │ │ ├── logo.png │ │ │ └── logo.png.import │ │ └── templates │ │ │ ├── TestSuiteTemplate.gd │ │ │ └── TestSuiteTemplate.tscn │ │ └── update │ │ ├── GdMarkDownReader.gd │ │ ├── GdUnitPatch.gd │ │ ├── GdUnitPatcher.gd │ │ ├── GdUnitUpdate.gd │ │ ├── GdUnitUpdate.tscn │ │ ├── GdUnitUpdateClient.gd │ │ ├── GdUnitUpdateNotify.gd │ │ ├── GdUnitUpdateNotify.tscn │ │ └── assets │ │ ├── border_bottom.png │ │ ├── border_bottom.png.import │ │ ├── border_top.png │ │ ├── border_top.png.import │ │ ├── dot1.png │ │ ├── dot1.png.import │ │ ├── dot2.png │ │ ├── dot2.png.import │ │ ├── embedded.png │ │ ├── embedded.png.import │ │ ├── fonts │ │ └── static │ │ │ ├── RobotoMono-Bold.ttf │ │ │ ├── RobotoMono-Bold.ttf.import │ │ │ ├── RobotoMono-BoldItalic.ttf │ │ │ ├── RobotoMono-BoldItalic.ttf.import │ │ │ ├── RobotoMono-ExtraLight.ttf │ │ │ ├── RobotoMono-ExtraLight.ttf.import │ │ │ ├── RobotoMono-ExtraLightItalic.ttf │ │ │ ├── RobotoMono-ExtraLightItalic.ttf.import │ │ │ ├── RobotoMono-Italic.ttf │ │ │ ├── RobotoMono-Italic.ttf.import │ │ │ ├── RobotoMono-Light.ttf │ │ │ ├── RobotoMono-Light.ttf.import │ │ │ ├── RobotoMono-LightItalic.ttf │ │ │ ├── RobotoMono-LightItalic.ttf.import │ │ │ ├── RobotoMono-Medium.ttf │ │ │ ├── RobotoMono-Medium.ttf.import │ │ │ ├── RobotoMono-MediumItalic.ttf │ │ │ ├── RobotoMono-MediumItalic.ttf.import │ │ │ ├── RobotoMono-Regular.ttf │ │ │ ├── RobotoMono-Regular.ttf.import │ │ │ ├── RobotoMono-SemiBold.ttf │ │ │ ├── RobotoMono-SemiBold.ttf.import │ │ │ ├── RobotoMono-SemiBoldItalic.ttf │ │ │ ├── RobotoMono-SemiBoldItalic.ttf.import │ │ │ ├── RobotoMono-Thin.ttf │ │ │ ├── RobotoMono-Thin.ttf.import │ │ │ ├── RobotoMono-ThinItalic.ttf │ │ │ └── RobotoMono-ThinItalic.ttf.import │ │ ├── horizontal-line2.png │ │ ├── horizontal-line2.png.import │ │ ├── progress-background.png │ │ └── progress-background.png.import ├── imgui-godot │ ├── ImGuiGodot │ │ ├── ImGuiController.cs │ │ ├── ImGuiExtensions.cs │ │ ├── ImGuiGD.cs │ │ ├── ImGuiLayer.cs │ │ ├── ImGuiSync.cs │ │ ├── Internal │ │ │ ├── BackendNative.cs │ │ │ ├── BackendNet.cs │ │ │ ├── CanvasRenderer.cs │ │ │ ├── DummyRenderer.cs │ │ │ ├── Fonts.cs │ │ │ ├── IBackend.cs │ │ │ ├── IRenderer.cs │ │ │ ├── Input.cs │ │ │ ├── InputLocal.cs │ │ │ ├── RdRenderer.cs │ │ │ ├── RdRendererThreadSafe.cs │ │ │ ├── State.cs │ │ │ ├── Util.cs │ │ │ └── Viewports.cs │ │ └── Widgets.cs │ ├── bin │ │ ├── libimgui-godot-native.linux.debug.x86_64.so │ │ ├── libimgui-godot-native.linux.release.x86_64.so │ │ ├── libimgui-godot-native.macos.debug.framework │ │ │ └── libimgui-godot-native.macos.debug │ │ ├── libimgui-godot-native.macos.release.framework │ │ │ └── libimgui-godot-native.macos.release │ │ ├── libimgui-godot-native.windows.debug.x86_64.dll │ │ ├── libimgui-godot-native.windows.release.x86_64.dll │ │ └── ~libimgui-godot-native.windows.debug.x86_64.dll │ ├── data │ │ ├── ImGuiRoot.tscn │ │ ├── ImGuiShader.glsl │ │ └── ImGuiShader.glsl.import │ ├── imgui-godot-native.gdextension │ ├── include │ │ ├── .gdignore │ │ ├── imconfig-godot.h │ │ └── imgui-godot.h │ ├── plugin.cfg │ └── scripts │ │ ├── ImGuiConfig.gd │ │ ├── ImGuiFont.gd │ │ ├── ImGuiPlugin.gd │ │ └── ImGuiRoot.gd ├── luaAPI │ ├── LICENSE │ ├── README.md │ ├── bin │ │ ├── .gdignore │ │ ├── libluaapi.ios.template_debug.arm64.dylib │ │ ├── libluaapi.ios.template_debug.universal.simulator.dylib │ │ ├── libluaapi.ios.template_release.arm64.dylib │ │ ├── libluaapi.ios.template_release.universal.simulator.dylib │ │ ├── libluaapi.linux.template_debug.x86_32.so │ │ ├── libluaapi.linux.template_debug.x86_64.so │ │ ├── libluaapi.linux.template_release.x86_32.so │ │ ├── libluaapi.linux.template_release.x86_64.so │ │ ├── libluaapi.macos.template_debug.universal.dylib │ │ ├── libluaapi.macos.template_release.universal.dylib │ │ ├── libluaapi.windows.template_debug.x86_32.dll │ │ ├── libluaapi.windows.template_debug.x86_64.dll │ │ ├── libluaapi.windows.template_release.x86_32.dll │ │ ├── libluaapi.windows.template_release.x86_64.dll │ │ └── ~libluaapi.windows.template_debug.x86_64.dll │ └── luaAPI.gdextension └── sound_manager │ ├── LICENSE │ ├── README.md │ ├── dock │ ├── SoundManagerDock.cfg │ ├── SoundManagerDock.gd │ ├── SoundManagerDock.tscn │ └── assets │ │ ├── add_icon.svg │ │ ├── add_icon.svg.import │ │ ├── check-outline.svg.import │ │ ├── folder_icon.svg │ │ ├── folder_icon.svg.import │ │ ├── remove_icon.svg │ │ ├── remove_icon.svg.import │ │ ├── restore.svg │ │ ├── restore.svg.import │ │ ├── save_icon.svg │ │ ├── save_icon.svg.import │ │ ├── slider_grabber.svg │ │ ├── slider_grabber.svg.import │ │ ├── slider_grabber_highlighted.svg │ │ └── slider_grabber_highlighted.svg.import │ ├── icon.png │ ├── icon.png.import │ ├── module │ ├── LICENSE │ ├── README.md │ ├── SoundManager.tscn │ └── internal_scripts │ │ ├── SoundManager.gd │ │ ├── SoundManager_config.gd │ │ └── Sounds.gd │ ├── plugin.cfg │ ├── plugin.gd │ └── sound_manager.json └── project.godot /.gitattributes: -------------------------------------------------------------------------------- 1 | # Normalize EOL for all files that Git considers text files. 2 | * text=auto eol=lf 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Godot 4+ specific ignores 2 | .godot/ 3 | 4 | .import/ 5 | export.cfg 6 | export_presets.cfg 7 | 8 | *.translation 9 | 10 | .mono/ 11 | data_*/ 12 | mono_crash.*.json 13 | 14 | *.txt 15 | *.tmp -------------------------------------------------------------------------------- /Assets/Resources/settings.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" script_class="ResSettingsData" load_steps=2 format=3 uid="uid://cdo0w5kts8mpo"] 2 | 3 | [ext_resource type="Script" path="res://Core/Settings/settings_data.gd" id="1_j2d5b"] 4 | 5 | [resource] 6 | script = ExtResource("1_j2d5b") 7 | assets_folder = "user://Assets/" 8 | data_folder = "user://data/" 9 | plugins_folder = "user://plugins/" 10 | base_plugin_folder = ["__0CorePlugin"] 11 | -------------------------------------------------------------------------------- /Assets/Resources/software_info.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" load_steps=2 format=3 uid="uid://c8ypmss5mycfg"] 2 | 3 | [ext_resource type="Script" path="res://Core/Settings/software_info.gd" id="1_ldibn"] 4 | 5 | [resource] 6 | script = ExtResource("1_ldibn") 7 | name = "RPG Creator" 8 | version = "1.0.0" 9 | author = "Ward" 10 | copyright = "2024-Present" 11 | -------------------------------------------------------------------------------- /Assets/Resources/update_log.tres: -------------------------------------------------------------------------------- 1 | [gd_resource type="Resource" load_steps=2 format=3 uid="uid://bww8hu51rkumn"] 2 | 3 | [ext_resource type="Script" path="res://Core/Settings/update_log.gd" id="1_kk5lr"] 4 | 5 | [resource] 6 | script = ExtResource("1_kk5lr") 7 | logs = Array[Resource]([]) 8 | -------------------------------------------------------------------------------- /Assets/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ward727a/RPGCreator/f947ae880dbf07ee88a5c0ebad4ffe7e2ff7ea90/Assets/icon.png -------------------------------------------------------------------------------- /Assets/icon.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://ncyvg2yunyuq" 6 | path="res://.godot/imported/icon.png-ec880de02d5dab0aa15458af9d6c53ed.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://Assets/icon.png" 14 | dest_files=["res://.godot/imported/icon.png-ec880de02d5dab0aa15458af9d6c53ed.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /BasePlugins/__0CorePlugin/.vscode/settings.json: -------------------------------------------------------------------------------- 1 | { 2 | "iis.configDir": "", 3 | "Lua.diagnostics.globals": [ 4 | "InterfaceManager" 5 | ], 6 | "Lua.diagnostics.disable": [ 7 | "undefined-global", 8 | "lowercase-global" 9 | ] 10 | } -------------------------------------------------------------------------------- /BasePlugins/__0CorePlugin/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "CorePlugin", 3 | "version": "1.0.0", 4 | "author": "RPG Creator", 5 | "main_script": "main.lua", 6 | "permissions": ["THEME_MANAGER", "INTERFACE_MANAGER", "HELPER:OPEN_LINK", "GD:INTERFACE", "GD:GLOBAL", "GD:MATERIAL", "GD:STYLE", "GD:TEXTURE", "LOGGER", "PLUGIN_MANAGER", "GENERATE_ID", "PROJECT_MANAGER", "EVENTS_MANAGER", "DATA_MANAGER", "ASSETS_MANAGER"], 7 | "description": "VERY important plugin, this plugin manage all of the UI of the software. Do not remove, it WILL break the software!!\nPlease note that this plugin have near ALL permissions, so be sure to not allow any external modification to it.", 8 | "auto_start": false, 9 | "icon": "", 10 | "need_plugin": [] 11 | } 12 | -------------------------------------------------------------------------------- /BasePlugins/__0CorePlugin/main.lua: -------------------------------------------------------------------------------- 1 | 2 | local test_window 3 | 4 | function start() 5 | 6 | if has_permission("LOGGER") then 7 | 8 | import_lua("./test_theme/main.lua") 9 | 10 | Logger.log("CorePlugin", "Importing notification system...") 11 | if import_lua("./notification_system/main.lua") then 12 | Logger.log("CorePlugin", "Notification system imported successfully") 13 | else 14 | Logger.error("CorePlugin", "Failed to import notification system") 15 | end 16 | 17 | Logger.log("CorePlugin", "Importing project manager...") 18 | if import_lua("./project_manager/main.lua") then 19 | Logger.log("CorePlugin", "Project manager imported successfully") 20 | else 21 | Logger.error("CorePlugin", "Failed to import project manager") 22 | end 23 | end 24 | 25 | return true 26 | end 27 | 28 | function stop() 29 | 30 | Logger.error("CorePlugin", "!!! CorePlugin stopped !!!") 31 | 32 | return true 33 | end -------------------------------------------------------------------------------- /BasePlugins/__0CorePlugin/project_manager/about/about.lua: -------------------------------------------------------------------------------- 1 | local about_main 2 | 3 | function start() 4 | 5 | create_base() 6 | 7 | Logger.log("CorePlugin", "Importing about components...") 8 | import_lua("about_top.lua") 9 | import_lua("about_content.lua") 10 | import_lua("about_bottom.lua", {about_main = about_main}) 11 | Logger.log("CorePlugin", "About components imported.") 12 | 13 | create_ui() 14 | 15 | return true 16 | end 17 | 18 | function create_base() 19 | 20 | Logger.log("CorePlugin", "Creating about base interface...") 21 | 22 | about_main = Window.new() 23 | about_main.set_title("About RPG Creator Version ".. software_version) 24 | about_main.set_exclusive(true) 25 | about_main.set_min_size(Vector2(530, 300)) 26 | about_main.ready.connect( 27 | function() 28 | _on_ready() 29 | end 30 | ) 31 | about_main.close_requested.connect( 32 | function() 33 | 34 | stop() 35 | end 36 | ) 37 | 38 | about_background = PanelContainer.new() 39 | about_main.add_child(about_background) 40 | about_background.set_theme_type_variation("PanelBackground") 41 | about_background.set_anchors_preset(Control.PRESET_FULL_RECT) 42 | 43 | about_box = VBoxContainer.new() 44 | about_background.add_child(about_box) 45 | about_box.set_h_size_flags(Control.SIZE_EXPAND_FILL) 46 | about_box.set_v_size_flags(Control.SIZE_EXPAND_FILL) 47 | about_box.add_theme_constant_override("separation", 0) 48 | 49 | Logger.log("CorePlugin", "About base interface created.") 50 | 51 | return true 52 | end 53 | 54 | function create_ui() 55 | 56 | about_box.add_child(about_top) 57 | about_box.add_child(about_content) 58 | about_box.add_child(about_bottom) 59 | 60 | end 61 | 62 | function _on_ready() 63 | end 64 | 65 | function stop() 66 | 67 | about_main.hide() 68 | 69 | return true 70 | end 71 | 72 | function _on_import() 73 | 74 | return {about_main = about_main} 75 | end -------------------------------------------------------------------------------- /BasePlugins/__0CorePlugin/project_manager/about/about_bottom.lua: -------------------------------------------------------------------------------- 1 | local about_bottom 2 | 3 | function start() 4 | 5 | about_bottom = Button.new() 6 | about_bottom.set_text("Join our community!") 7 | about_bottom.set_default_cursor_shape(Control.CURSOR_POINTING_HAND) 8 | about_bottom.pressed.connect( 9 | function() 10 | open_link("https://linktr.ee/rpgcreator", about_main, "This will show you all the links available to join our community.") 11 | end 12 | ) 13 | about_bottom.set_custom_minimum_size(Vector2(0, 32)) 14 | 15 | return true 16 | end 17 | 18 | function stop() 19 | 20 | 21 | return true 22 | end 23 | 24 | function _on_import() 25 | 26 | return {about_bottom = about_bottom} 27 | end -------------------------------------------------------------------------------- /BasePlugins/__0CorePlugin/project_manager/about/about_top.lua: -------------------------------------------------------------------------------- 1 | local about_top 2 | 3 | function start() 4 | 5 | about_top = PanelContainer.new() 6 | about_top.set_h_size_flags(Control.SIZE_EXPAND_FILL) 7 | about_top.set_theme_type_variation("PanelCenter") 8 | about_top.set_custom_minimum_size(Vector2(0, 32)) 9 | about_top.set_theme_type_variation("PanelTopBottom") 10 | 11 | margin_top = MarginContainer.new() 12 | about_top.add_child(margin_top) 13 | margin_top.set_h_size_flags(Control.SIZE_EXPAND_FILL) 14 | margin_top.add_theme_constant_override("margin_top", 4) 15 | margin_top.add_theme_constant_override("margin_left", 4) 16 | margin_top.add_theme_constant_override("margin_right", 4) 17 | margin_top.add_theme_constant_override("margin_bottom", 4) 18 | 19 | hbox_top_menu = HBoxContainer.new() 20 | margin_top.add_child(hbox_top_menu) 21 | hbox_top_menu.set_h_size_flags(Control.SIZE_EXPAND_FILL) 22 | 23 | about_title = Label.new() 24 | hbox_top_menu.add_child(about_title) 25 | about_title.set_text("About RPG Creator version ".. software_version) 26 | about_title.set_horizontal_alignment(HORIZONTAL_ALIGNMENT_CENTER) 27 | about_title.set_h_size_flags(Control.SIZE_EXPAND_FILL) 28 | 29 | return true 30 | end 31 | 32 | function stop() 33 | 34 | return true 35 | end 36 | 37 | function _on_import() 38 | 39 | return {about_top = about_top} 40 | end -------------------------------------------------------------------------------- /BasePlugins/__0CorePlugin/project_manager/project_creator.lua: -------------------------------------------------------------------------------- 1 | 2 | local theme 3 | local creator_window 4 | 5 | local vbox 6 | 7 | local hbox_name 8 | local label_name 9 | local input_name 10 | 11 | local hbox_path 12 | local label_path 13 | local input_path 14 | 15 | function start() 16 | 17 | create_theme() 18 | create_ui() 19 | 20 | return true 21 | end 22 | 23 | function stop() 24 | 25 | return true 26 | end 27 | 28 | function create_theme() 29 | 30 | theme = Theme.new() 31 | 32 | theme.set_constant("separation", "VBoxContainer", 10) 33 | 34 | end 35 | 36 | function create_ui() 37 | 38 | creator_window = ConfirmationDialog.new() 39 | creator_window.set_title("Create a new project") 40 | creator_window.set_size(Vector2(400, 200)) 41 | creator_window.set_theme(theme) 42 | 43 | vbox = VBoxContainer.new() 44 | creator_window.add_child(vbox) 45 | 46 | hbox_name = HBoxContainer.new() 47 | vbox.add_child(hbox_name) 48 | hbox_name.set_h_size_flags(Control.SIZE_EXPAND_FILL) 49 | 50 | label_name = Label.new() 51 | hbox_name.add_child(label_name) 52 | label_name.set_text("Name:") 53 | label_name.set_custom_minimum_size(Vector2(60, 0)) 54 | 55 | input_name = LineEdit.new() 56 | hbox_name.add_child(input_name) 57 | input_name.set_h_size_flags(Control.SIZE_EXPAND_FILL) 58 | 59 | hbox_path = HBoxContainer.new() 60 | vbox.add_child(hbox_path) 61 | hbox_path.set_h_size_flags(Control.SIZE_EXPAND_FILL) 62 | 63 | label_path = Label.new() 64 | hbox_path.add_child(label_path) 65 | label_path.set_text("Path:") 66 | label_path.set_custom_minimum_size(Vector2(60, 0)) 67 | 68 | input_path = LineEdit.new() 69 | hbox_path.add_child(input_path) 70 | input_path.set_text("This feature is not implemented yet") 71 | input_path.set_editable(false) 72 | input_path.set_h_size_flags(Control.SIZE_EXPAND_FILL) 73 | 74 | InterfaceManager.ADD("project_creator", creator_window) 75 | 76 | end -------------------------------------------------------------------------------- /Core/Debugger/debugger_main.gd: -------------------------------------------------------------------------------- 1 | extends Node 2 | class_name Debugger 3 | 4 | signal debug_loop() 5 | 6 | static var singleton: Debugger 7 | 8 | static func get_singleton() -> Debugger: 9 | return singleton 10 | 11 | func _init(): 12 | singleton = self 13 | 14 | func _process(_delta): 15 | 16 | debug_loop.emit() 17 | -------------------------------------------------------------------------------- /Core/LUA/advanced_lib/lua_string_utility.gd: -------------------------------------------------------------------------------- 1 | class_name LUA_StringUtility 2 | 3 | static func begins_with(text: String, start: String) -> bool: 4 | 5 | return text.begins_with(start) 6 | 7 | static func replace(text: String, search_for: String, replacement: String) -> String: 8 | 9 | return text.replace(search_for, replacement) 10 | -------------------------------------------------------------------------------- /Core/Main/assets_manager/res_assets.gd: -------------------------------------------------------------------------------- 1 | extends Resource 2 | class_name ResAssets 3 | 4 | @export var origin_name: String 5 | @export var origin_path: String 6 | @export var target_name: String 7 | @export var target_path: String 8 | @export var extension: String 9 | -------------------------------------------------------------------------------- /Core/Main/editor.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=2 format=3 uid="uid://ddhy6l7vte6l6"] 2 | 3 | [ext_resource type="Script" path="res://Core/Main/main.gd" id="1_6tnr6"] 4 | 5 | [node name="Editor" type="Control"] 6 | layout_mode = 3 7 | anchors_preset = 15 8 | anchor_right = 1.0 9 | anchor_bottom = 1.0 10 | grow_horizontal = 2 11 | grow_vertical = 2 12 | 13 | [node name="Main" type="Node" parent="."] 14 | script = ExtResource("1_6tnr6") 15 | -------------------------------------------------------------------------------- /Core/Main/interface_manager/res_interface.gd: -------------------------------------------------------------------------------- 1 | extends Resource 2 | class_name ResInterface 3 | 4 | var id: String 5 | var root 6 | -------------------------------------------------------------------------------- /Core/Main/plugins_manager/res_permission.gd: -------------------------------------------------------------------------------- 1 | extends Resource 2 | class_name ResPermission 3 | 4 | var permissions: Dictionary 5 | 6 | func HAS(permission_path: String, strict_check: bool = true) -> bool: 7 | 8 | var path_part: PackedStringArray = permission_path.split(':') 9 | var last_part: String = path_part[path_part.size() - 1] 10 | 11 | var data = permissions 12 | 13 | for part in path_part: 14 | 15 | if data.has(part): 16 | if part == last_part: 17 | return true 18 | data = data[part] 19 | continue 20 | 21 | break 22 | 23 | if !strict_check and data != permissions: 24 | return true 25 | 26 | return false 27 | 28 | func SET(permission_path: String): 29 | 30 | permission_path = permission_path.to_upper() 31 | 32 | var path_part: PackedStringArray = permission_path.split(':') 33 | 34 | var data = permissions 35 | 36 | for part in path_part: 37 | 38 | if data.has(part): 39 | data = data[part] 40 | continue 41 | 42 | data[part] = {} 43 | data = data[part] 44 | -------------------------------------------------------------------------------- /Core/Main/plugins_manager/res_plugin_permission.gd: -------------------------------------------------------------------------------- 1 | extends Resource 2 | class_name ResPluginPermissions 3 | 4 | var LOW: Array[ResPermissionObject] 5 | var MEDIUM: Array[ResPermissionObject] 6 | var HIGH: Array[ResPermissionObject] 7 | -------------------------------------------------------------------------------- /Core/Main/project_manager/res_project.gd: -------------------------------------------------------------------------------- 1 | extends Resource 2 | class_name ResProject 3 | 4 | @export var project_id: String 5 | 6 | # info 7 | @export var project_name: String 8 | @export var project_author: String 9 | @export var project_last_edit: String 10 | @export var project_picture: ResAssets 11 | @export var project_version_created: String 12 | 13 | @export var project_enabled_plugins: PackedStringArray = [] 14 | @export_placeholder("This type should be a custom resource type") 15 | var project_settings: String = "This type should be a custom resource" 16 | -------------------------------------------------------------------------------- /Core/Settings/settings.gd: -------------------------------------------------------------------------------- 1 | extends Node 2 | class_name Settings 3 | 4 | static var singleton: Settings 5 | 6 | static func get_singleton() -> Settings: 7 | return singleton 8 | 9 | static func is_valid() -> bool: 10 | return (Settings.get_singleton() != null) 11 | 12 | var logger: Logger = Logger.new("Settings") 13 | 14 | const software_path: String = "res://Assets/Resources/software_info.tres" 15 | const update_path: String = "res://Assets/Resources/update_log.tres" 16 | const setting_path: String = "res://Assets/Resources/settings.tres" 17 | 18 | var SoftwareInfo: ResSoftwareInfo 19 | var UpdateLog: ResUpdateLog 20 | var SettingsData: ResSettingsData 21 | 22 | func _init(): 23 | 24 | if !_load_project_info(): 25 | return 26 | 27 | if !_load_project_update_log(): 28 | return 29 | 30 | if !_load_setting(): 31 | return 32 | 33 | singleton = self 34 | 35 | func _load_project_info(): 36 | 37 | if !FileAccess.file_exists(software_path): 38 | logger.error("Software info path is not valid! %s not exists!" % software_path) 39 | return false 40 | 41 | SoftwareInfo = load(software_path) 42 | return true 43 | 44 | func _load_project_update_log(): 45 | 46 | if !FileAccess.file_exists(update_path): 47 | logger.error("Update logs path is not valid! %s not exists!" % update_path) 48 | return false 49 | 50 | UpdateLog = load(update_path) 51 | return true 52 | 53 | func _load_setting(): 54 | 55 | if !FileAccess.file_exists(setting_path): 56 | logger.error("Settings path is not valid! %s not exists!" % setting_path) 57 | return false 58 | 59 | SettingsData = load(setting_path) 60 | return true 61 | 62 | -------------------------------------------------------------------------------- /Core/Settings/settings_data.gd: -------------------------------------------------------------------------------- 1 | extends Resource 2 | class_name ResSettingsData 3 | 4 | @export var assets_folder: String = "user://Assets/" 5 | @export var data_folder: String = "user://data/" 6 | @export var plugins_folder: String = "user://plugins/" 7 | @export var base_plugin_folder: PackedStringArray = ["__0CorePlugin"] 8 | -------------------------------------------------------------------------------- /Core/Settings/software_info.gd: -------------------------------------------------------------------------------- 1 | extends Resource 2 | class_name ResSoftwareInfo 3 | 4 | @export var name: String = "RPG Creator" 5 | @export var version: String = "1.0.0" 6 | @export var author: String = "Ward" 7 | @export var copyright: String = "2024-Present" 8 | -------------------------------------------------------------------------------- /Core/Settings/update_log.gd: -------------------------------------------------------------------------------- 1 | extends Resource 2 | class_name ResUpdateLog 3 | 4 | @export var logs: Array[ResLog] = [] 5 | 6 | class ResLog extends Resource: 7 | @export var order: int 8 | @export var title: String = "" 9 | @export var version: String = "" 10 | @export var sub_title: String = "" 11 | @export_multiline var content: String = "" 12 | -------------------------------------------------------------------------------- /Shared/id_generator.gd: -------------------------------------------------------------------------------- 1 | class_name IDGenerator 2 | 3 | static func generate_id(min_size: int = 10, max_size: int = 20) -> String: 4 | 5 | # Minimum key size 6 | if min_size < 8: 7 | min_size = 8 8 | 9 | # Set max_size to min_size if it's inferior to min_size 10 | if max_size < min_size: 11 | max_size = min_size 12 | 13 | var id := PackedByteArray() 14 | @warning_ignore("integer_division") 15 | var size = randi_range(min_size, max_size)/2 16 | 17 | id.resize(size) 18 | 19 | for i in size: 20 | id[i] = randi_range(0, 255) 21 | 22 | return id.hex_encode() 23 | -------------------------------------------------------------------------------- /Shared/resources_script/res_permission_object.gd: -------------------------------------------------------------------------------- 1 | extends Resource 2 | class_name ResPermissionObject 3 | 4 | ## By order 5 | @export var path: String = "" 6 | @export var level: int = 0 7 | @export var description: String = "" 8 | @export var allowed: bool = false 9 | -------------------------------------------------------------------------------- /Tests/data_manager_test.gd: -------------------------------------------------------------------------------- 1 | # GdUnit generated TestSuite 2 | class_name DataManagerTest 3 | extends GdUnitTestSuite 4 | @warning_ignore('unused_parameter') 5 | @warning_ignore('return_value_discarded') 6 | 7 | # TestSuite generated from 8 | const __source = 'res://Core/Main/data_manager.gd' 9 | 10 | func test_get_singleton() -> void: 11 | var data_manager = DataManager.new() 12 | add_child(data_manager) 13 | assert_object(data_manager.get_singleton()).is_class("DataManager") 14 | 15 | func test_SET_GET_HAS() -> void: 16 | var DM = DataManager.get_singleton() 17 | assert_bool(DM.HAS("")).is_false() 18 | assert_bool(DM.HAS("unit_test/testGet")).is_false() 19 | assert_str(DM.SET("unit_test/testGet", "Hi!")).is_equal("Hi!") 20 | assert_bool(DM.HAS("unit_test/testGet")).is_true() 21 | assert_str(DM.GET("unit_test/testGet")).is_equal("Hi!") 22 | 23 | -------------------------------------------------------------------------------- /Tests/test_crash_system.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=3 format=3 uid="uid://ddaltvbukoodq"] 2 | 3 | [ext_resource type="Script" path="res://Core/Main/main.gd" id="1_mv8uf"] 4 | 5 | [sub_resource type="GDScript" id="GDScript_hj4yd"] 6 | script/source = "extends Control 7 | 8 | 9 | # Called when the node enters the scene tree for the first time. 10 | func _ready(): 11 | 12 | %remove_main.pressed.connect(_on_remove_main) 13 | %remove_child.pressed.connect(_on_remove_child) 14 | 15 | 16 | func _on_remove_main(): 17 | 18 | get_node(\"Main\").queue_free() 19 | 20 | func _on_remove_child(): 21 | 22 | get_node(\"Main\").get_child(0).queue_free() 23 | " 24 | 25 | [node name="Control" type="Control"] 26 | layout_mode = 3 27 | anchors_preset = 15 28 | anchor_right = 1.0 29 | anchor_bottom = 1.0 30 | grow_horizontal = 2 31 | grow_vertical = 2 32 | script = SubResource("GDScript_hj4yd") 33 | 34 | [node name="Main" type="Node" parent="."] 35 | script = ExtResource("1_mv8uf") 36 | 37 | [node name="remove_main" type="Button" parent="."] 38 | unique_name_in_owner = true 39 | layout_mode = 0 40 | offset_right = 8.0 41 | offset_bottom = 8.0 42 | text = "Remove main" 43 | 44 | [node name="remove_child" type="Button" parent="."] 45 | unique_name_in_owner = true 46 | layout_mode = 0 47 | offset_left = 133.0 48 | offset_right = 308.0 49 | offset_bottom = 31.0 50 | text = "Remove child of main" 51 | 52 | [node name="Label" type="Label" parent="."] 53 | layout_mode = 0 54 | offset_top = 31.0 55 | offset_right = 576.0 56 | offset_bottom = 54.0 57 | text = "Warning! These button WILL make the software crash! It's their only utility!" 58 | -------------------------------------------------------------------------------- /Tests/test_custom_signal.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=2 format=3 uid="uid://d2mnkdm4cw8rh"] 2 | 3 | [sub_resource type="GDScript" id="GDScript_bw6lg"] 4 | script/source = "extends Control 5 | 6 | 7 | # Called when the node enters the scene tree for the first time. 8 | func _ready(): 9 | set_process(true) 10 | process.connect( 11 | func(delta): 12 | print(\"Hi!\") 13 | 14 | ) 15 | pass # Replace with function body. 16 | " 17 | 18 | [node name="TestCustomSignal" type="Control"] 19 | layout_mode = 3 20 | anchors_preset = 15 21 | anchor_right = 1.0 22 | anchor_bottom = 1.0 23 | grow_horizontal = 2 24 | grow_vertical = 2 25 | script = SubResource("GDScript_bw6lg") 26 | -------------------------------------------------------------------------------- /Tests/test_data_manager01_ress.gd: -------------------------------------------------------------------------------- 1 | extends Resource 2 | class_name Test_data_manager_01 3 | 4 | 5 | @export var name: String = "This is a object of test!" 6 | 7 | func test(): 8 | 9 | print("Ho, hello!") 10 | print(name) 11 | -------------------------------------------------------------------------------- /Tests/test_global_event_manager01.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=3 format=3 uid="uid://bmd6cd4gghptb"] 2 | 3 | [ext_resource type="Script" path="res://Core/Main/event_manager.gd" id="1_niefs"] 4 | 5 | [sub_resource type="GDScript" id="GDScript_boct1"] 6 | script/source = "extends Control 7 | 8 | 9 | # Called when the node enters the scene tree for the first time. 10 | func _ready(): 11 | 12 | %Link.pressed.connect(_on_link) 13 | %Send.pressed.connect(_on_send) 14 | 15 | 16 | func _on_send(): 17 | 18 | GlobalEventManager.get_singleton().CALL(\"Tests/test_event\", [IDGenerator.generate_id()]) 19 | 20 | print_rich(\"[color=yellow]Please check if the text bellow has changed!\") 21 | 22 | func _on_link(): 23 | 24 | if GlobalEventManager.get_singleton().SET(\"Tests/test_event\", _test_receiver): 25 | print_rich(\"[color=green]Test Link success!\") 26 | return 27 | 28 | push_error(\"Test Link Failed!\") 29 | 30 | func _test_receiver(msg: String = \"null_arg\"): 31 | 32 | %Result.set_text(msg) 33 | " 34 | 35 | [node name="TestGlobalEventManager01" type="Control"] 36 | layout_mode = 3 37 | anchors_preset = 15 38 | anchor_right = 1.0 39 | anchor_bottom = 1.0 40 | grow_horizontal = 2 41 | grow_vertical = 2 42 | script = SubResource("GDScript_boct1") 43 | 44 | [node name="Link" type="Button" parent="."] 45 | unique_name_in_owner = true 46 | layout_mode = 0 47 | offset_right = 8.0 48 | offset_bottom = 8.0 49 | text = "Link" 50 | 51 | [node name="Send" type="Button" parent="."] 52 | unique_name_in_owner = true 53 | layout_mode = 0 54 | offset_top = 31.0 55 | offset_right = 47.0 56 | offset_bottom = 62.0 57 | text = "Send" 58 | 59 | [node name="Result" type="Label" parent="."] 60 | unique_name_in_owner = true 61 | layout_mode = 0 62 | offset_top = 69.0 63 | offset_right = 40.0 64 | offset_bottom = 92.0 65 | text = "Result" 66 | 67 | [node name="GlobalEventManager" type="Node" parent="."] 68 | script = ExtResource("1_niefs") 69 | -------------------------------------------------------------------------------- /Tests/test_grid.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene format=3 uid="uid://bvqudd4ff78xf"] 2 | 3 | [node name="TestGrid" type="Control"] 4 | layout_mode = 3 5 | anchors_preset = 15 6 | anchor_right = 1.0 7 | anchor_bottom = 1.0 8 | grow_horizontal = 2 9 | grow_vertical = 2 10 | 11 | [node name="GridContainer" type="GridContainer" parent="."] 12 | layout_mode = 1 13 | anchors_preset = 15 14 | anchor_right = 1.0 15 | anchor_bottom = 1.0 16 | grow_horizontal = 2 17 | grow_vertical = 2 18 | columns = 2 19 | 20 | [node name="Label" type="Label" parent="GridContainer"] 21 | layout_mode = 2 22 | text = "test" 23 | 24 | [node name="LineEdit" type="LineEdit" parent="GridContainer"] 25 | layout_mode = 2 26 | -------------------------------------------------------------------------------- /Tests/test_main01.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=2 format=3 uid="uid://cg3yutaxtll4g"] 2 | 3 | [ext_resource type="Script" path="res://Core/Main/main.gd" id="1_ckjn3"] 4 | 5 | [node name="TestMain01" type="Control"] 6 | layout_mode = 3 7 | anchors_preset = 15 8 | anchor_right = 1.0 9 | anchor_bottom = 1.0 10 | grow_horizontal = 2 11 | grow_vertical = 2 12 | 13 | [node name="Main" type="Node" parent="."] 14 | script = ExtResource("1_ckjn3") 15 | -------------------------------------------------------------------------------- /addons/gdUnit4/LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Mike Schulze 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /addons/gdUnit4/plugin.cfg: -------------------------------------------------------------------------------- 1 | [plugin] 2 | 3 | name="gdUnit4" 4 | description="Unit Testing Framework for Godot Scripts" 5 | author="Mike Schulze" 6 | version="4.4.1" 7 | script="plugin.gd" 8 | -------------------------------------------------------------------------------- /addons/gdUnit4/runtest.cmd: -------------------------------------------------------------------------------- 1 | @ECHO OFF 2 | CLS 3 | 4 | IF NOT DEFINED GODOT_BIN ( 5 | ECHO "GODOT_BIN is not set." 6 | ECHO "Please set the environment variable 'setx GODOT_BIN '" 7 | EXIT /b -1 8 | ) 9 | 10 | REM scan if Godot mono used and compile c# classes 11 | for /f "tokens=5 delims=. " %%i in ('%GODOT_BIN% --version') do set GODOT_TYPE=%%i 12 | IF "%GODOT_TYPE%" == "mono" ( 13 | ECHO "Godot mono detected" 14 | ECHO Compiling c# classes ... Please Wait 15 | dotnet build --debug 16 | ECHO done %errorlevel% 17 | ) 18 | 19 | %GODOT_BIN% -s -d res://addons/gdUnit4/bin/GdUnitCmdTool.gd %* 20 | SET exit_code=%errorlevel% 21 | %GODOT_BIN% --headless --quiet -s -d res://addons/gdUnit4/bin/GdUnitCopyLog.gd %* 22 | 23 | ECHO %exit_code% 24 | 25 | EXIT /B %exit_code% 26 | -------------------------------------------------------------------------------- /addons/gdUnit4/runtest.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | if [ -z "$GODOT_BIN" ]; then 4 | echo "'GODOT_BIN' is not set." 5 | echo "Please set the environment variable 'export GODOT_BIN=/Applications/Godot.app/Contents/MacOS/Godot'" 6 | exit 1 7 | fi 8 | 9 | "$GODOT_BIN" --path . -s -d res://addons/gdUnit4/bin/GdUnitCmdTool.gd $* 10 | exit_code=$? 11 | echo "Run tests ends with $exit_code" 12 | 13 | "$GODOT_BIN" --headless --path . --quiet -s -d res://addons/gdUnit4/bin/GdUnitCopyLog.gd $* > /dev/null 14 | exit_code2=$? 15 | exit $exit_code 16 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/Comparator.gd: -------------------------------------------------------------------------------- 1 | class_name Comparator 2 | extends Resource 3 | 4 | enum { 5 | EQUAL, 6 | LESS_THAN, 7 | LESS_EQUAL, 8 | GREATER_THAN, 9 | GREATER_EQUAL, 10 | BETWEEN_EQUAL, 11 | NOT_BETWEEN_EQUAL, 12 | } 13 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/Fuzzers.gd: -------------------------------------------------------------------------------- 1 | ## A fuzzer implementation to provide default implementation 2 | class_name Fuzzers 3 | extends Resource 4 | 5 | 6 | ## Generates an random string with min/max length and given charset 7 | static func rand_str(min_length: int, max_length :int, charset := StringFuzzer.DEFAULT_CHARSET) -> Fuzzer: 8 | return StringFuzzer.new(min_length, max_length, charset) 9 | 10 | 11 | ## Generates an random integer in a range form to 12 | static func rangei(from: int, to: int) -> Fuzzer: 13 | return IntFuzzer.new(from, to) 14 | 15 | ## Generates a randon float within in a given range 16 | static func rangef(from: float, to: float) -> Fuzzer: 17 | return FloatFuzzer.new(from, to) 18 | 19 | ## Generates an random Vector2 in a range form to 20 | static func rangev2(from: Vector2, to: Vector2) -> Fuzzer: 21 | return Vector2Fuzzer.new(from, to) 22 | 23 | 24 | ## Generates an random Vector3 in a range form to 25 | static func rangev3(from: Vector3, to: Vector3) -> Fuzzer: 26 | return Vector3Fuzzer.new(from, to) 27 | 28 | ## Generates an integer in a range form to that can be divided exactly by 2 29 | static func eveni(from: int, to: int) -> Fuzzer: 30 | return IntFuzzer.new(from, to, IntFuzzer.EVEN) 31 | 32 | ## Generates an integer in a range form to that cannot be divided exactly by 2 33 | static func oddi(from: int, to: int) -> Fuzzer: 34 | return IntFuzzer.new(from, to, IntFuzzer.ODD) 35 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/GdUnitAssert.gd: -------------------------------------------------------------------------------- 1 | ## Base interface of all GdUnit asserts 2 | class_name GdUnitAssert 3 | extends RefCounted 4 | 5 | 6 | ## Verifies that the current value is null. 7 | @warning_ignore("untyped_declaration") 8 | func is_null(): 9 | return self 10 | 11 | 12 | ## Verifies that the current value is not null. 13 | @warning_ignore("untyped_declaration") 14 | func is_not_null(): 15 | return self 16 | 17 | 18 | ## Verifies that the current value is equal to expected one. 19 | @warning_ignore("unused_parameter") 20 | @warning_ignore("untyped_declaration") 21 | func is_equal(expected: Variant): 22 | return self 23 | 24 | 25 | ## Verifies that the current value is not equal to expected one. 26 | @warning_ignore("unused_parameter") 27 | @warning_ignore("untyped_declaration") 28 | func is_not_equal(expected: Variant): 29 | return self 30 | 31 | 32 | @warning_ignore("untyped_declaration") 33 | func do_fail(): 34 | return self 35 | 36 | 37 | ## Overrides the default failure message by given custom message. 38 | @warning_ignore("unused_parameter") 39 | @warning_ignore("untyped_declaration") 40 | func override_failure_message(message :String): 41 | return self 42 | 43 | 44 | ## Appends a custom message to the failure message. 45 | ## This can be used to add additional infromations to the generated failure message. 46 | @warning_ignore("unused_parameter") 47 | @warning_ignore("untyped_declaration") 48 | func append_failure_message(message :String): 49 | return self 50 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/GdUnitBoolAssert.gd: -------------------------------------------------------------------------------- 1 | ## An Assertion Tool to verify boolean values 2 | class_name GdUnitBoolAssert 3 | extends GdUnitAssert 4 | 5 | 6 | ## Verifies that the current value is null. 7 | func is_null() -> GdUnitBoolAssert: 8 | return self 9 | 10 | 11 | ## Verifies that the current value is not null. 12 | func is_not_null() -> GdUnitBoolAssert: 13 | return self 14 | 15 | 16 | ## Verifies that the current value is equal to the given one. 17 | @warning_ignore("unused_parameter") 18 | func is_equal(expected :Variant) -> GdUnitBoolAssert: 19 | return self 20 | 21 | 22 | ## Verifies that the current value is not equal to the given one. 23 | @warning_ignore("unused_parameter") 24 | func is_not_equal(expected :Variant) -> GdUnitBoolAssert: 25 | return self 26 | 27 | 28 | ## Verifies that the current value is true. 29 | func is_true() -> GdUnitBoolAssert: 30 | return self 31 | 32 | 33 | ## Verifies that the current value is false. 34 | func is_false() -> GdUnitBoolAssert: 35 | return self 36 | 37 | 38 | ## Overrides the default failure message by given custom message. 39 | @warning_ignore("unused_parameter") 40 | func override_failure_message(message :String) -> GdUnitBoolAssert: 41 | return self 42 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/GdUnitConstants.gd: -------------------------------------------------------------------------------- 1 | class_name GdUnitConstants 2 | extends RefCounted 3 | 4 | const NO_ARG :Variant = "<--null-->" 5 | 6 | const EXPECT_ASSERT_REPORT_FAILURES := "expect_assert_report_failures" 7 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/GdUnitFailureAssert.gd: -------------------------------------------------------------------------------- 1 | ## An assertion tool to verify GDUnit asserts. 2 | ## This assert is for internal use only, to verify that failed asserts work as expected. 3 | class_name GdUnitFailureAssert 4 | extends GdUnitAssert 5 | 6 | 7 | ## Verifies if the executed assert was successful 8 | func is_success() -> GdUnitFailureAssert: 9 | return self 10 | 11 | ## Verifies if the executed assert has failed 12 | func is_failed() -> GdUnitFailureAssert: 13 | return self 14 | 15 | 16 | ## Verifies the failure line is equal to expected one. 17 | @warning_ignore("unused_parameter") 18 | func has_line(expected :int) -> GdUnitFailureAssert: 19 | return self 20 | 21 | 22 | ## Verifies the failure message is equal to expected one. 23 | @warning_ignore("unused_parameter") 24 | func has_message(expected: String) -> GdUnitFailureAssert: 25 | return self 26 | 27 | 28 | ## Verifies that the failure message starts with the expected message. 29 | @warning_ignore("unused_parameter") 30 | func starts_with_message(expected: String) -> GdUnitFailureAssert: 31 | return self 32 | 33 | 34 | ## Verifies that the failure message contains the expected message. 35 | @warning_ignore("unused_parameter") 36 | func contains_message(expected: String) -> GdUnitFailureAssert: 37 | return self 38 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/GdUnitFileAssert.gd: -------------------------------------------------------------------------------- 1 | class_name GdUnitFileAssert 2 | extends GdUnitAssert 3 | 4 | 5 | func is_file() -> GdUnitFileAssert: 6 | return self 7 | 8 | 9 | func exists() -> GdUnitFileAssert: 10 | return self 11 | 12 | 13 | func is_script() -> GdUnitFileAssert: 14 | return self 15 | 16 | 17 | @warning_ignore("unused_parameter") 18 | func contains_exactly(expected_rows :Array) -> GdUnitFileAssert: 19 | return self 20 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/GdUnitFuncAssert.gd: -------------------------------------------------------------------------------- 1 | ## An Assertion Tool to verify function callback values 2 | class_name GdUnitFuncAssert 3 | extends GdUnitAssert 4 | 5 | 6 | ## Verifies that the current value is null. 7 | func is_null() -> GdUnitFuncAssert: 8 | await (Engine.get_main_loop() as SceneTree).process_frame 9 | return self 10 | 11 | 12 | ## Verifies that the current value is not null. 13 | func is_not_null() -> GdUnitFuncAssert: 14 | await (Engine.get_main_loop() as SceneTree).process_frame 15 | return self 16 | 17 | 18 | ## Verifies that the current value is equal to the given one. 19 | @warning_ignore("unused_parameter") 20 | func is_equal(expected :Variant) -> GdUnitFuncAssert: 21 | await (Engine.get_main_loop() as SceneTree).process_frame 22 | return self 23 | 24 | 25 | ## Verifies that the current value is not equal to the given one. 26 | @warning_ignore("unused_parameter") 27 | func is_not_equal(expected :Variant) -> GdUnitFuncAssert: 28 | await (Engine.get_main_loop() as SceneTree).process_frame 29 | return self 30 | 31 | 32 | ## Verifies that the current value is true. 33 | func is_true() -> GdUnitFuncAssert: 34 | await (Engine.get_main_loop() as SceneTree).process_frame 35 | return self 36 | 37 | 38 | ## Verifies that the current value is false. 39 | func is_false() -> GdUnitFuncAssert: 40 | await (Engine.get_main_loop() as SceneTree).process_frame 41 | return self 42 | 43 | 44 | ## Overrides the default failure message by given custom message. 45 | @warning_ignore("unused_parameter") 46 | func override_failure_message(message :String) -> GdUnitFuncAssert: 47 | return self 48 | 49 | 50 | ## Sets the timeout in ms to wait the function returnd the expected value, if the time over a failure is emitted.[br] 51 | ## e.g.[br] 52 | ## do wait until 5s the function `is_state` is returns 10 [br] 53 | ## [code]assert_func(instance, "is_state").wait_until(5000).is_equal(10)[/code] 54 | @warning_ignore("unused_parameter") 55 | func wait_until(timeout :int) -> GdUnitFuncAssert: 56 | return self 57 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/GdUnitGodotErrorAssert.gd: -------------------------------------------------------------------------------- 1 | ## An assertion tool to verify for Godot runtime errors like assert() and push notifications like push_error(). 2 | class_name GdUnitGodotErrorAssert 3 | extends GdUnitAssert 4 | 5 | 6 | ## Verifies if the executed code runs without any runtime errors 7 | ## Usage: 8 | ## [codeblock] 9 | ## await assert_error().is_success() 10 | ## [/codeblock] 11 | func is_success() -> GdUnitGodotErrorAssert: 12 | await (Engine.get_main_loop() as SceneTree).process_frame 13 | return self 14 | 15 | 16 | ## Verifies if the executed code runs into a runtime error 17 | ## Usage: 18 | ## [codeblock] 19 | ## await assert_error().is_runtime_error() 20 | ## [/codeblock] 21 | @warning_ignore("unused_parameter") 22 | func is_runtime_error(expected_error :String) -> GdUnitGodotErrorAssert: 23 | await (Engine.get_main_loop() as SceneTree).process_frame 24 | return self 25 | 26 | 27 | ## Verifies if the executed code has a push_warning() used 28 | ## Usage: 29 | ## [codeblock] 30 | ## await assert_error().is_push_warning() 31 | ## [/codeblock] 32 | @warning_ignore("unused_parameter") 33 | func is_push_warning(expected_warning :String) -> GdUnitGodotErrorAssert: 34 | await (Engine.get_main_loop() as SceneTree).process_frame 35 | return self 36 | 37 | 38 | ## Verifies if the executed code has a push_error() used 39 | ## Usage: 40 | ## [codeblock] 41 | ## await assert_error().is_push_error() 42 | ## [/codeblock] 43 | @warning_ignore("unused_parameter") 44 | func is_push_error(expected_error :String) -> GdUnitGodotErrorAssert: 45 | await (Engine.get_main_loop() as SceneTree).process_frame 46 | return self 47 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/GdUnitObjectAssert.gd: -------------------------------------------------------------------------------- 1 | ## An Assertion Tool to verify Object values 2 | class_name GdUnitObjectAssert 3 | extends GdUnitAssert 4 | 5 | 6 | ## Verifies that the current value is equal to expected one. 7 | @warning_ignore("unused_parameter") 8 | func is_equal(expected :Variant) -> GdUnitObjectAssert: 9 | return self 10 | 11 | 12 | ## Verifies that the current value is not equal to expected one. 13 | @warning_ignore("unused_parameter") 14 | func is_not_equal(expected :Variant) -> GdUnitObjectAssert: 15 | return self 16 | 17 | 18 | ## Verifies that the current value is null. 19 | func is_null() -> GdUnitObjectAssert: 20 | return self 21 | 22 | 23 | ## Verifies that the current value is not null. 24 | func is_not_null() -> GdUnitObjectAssert: 25 | return self 26 | 27 | 28 | ## Verifies that the current value is the same as the given one. 29 | @warning_ignore("unused_parameter", "shadowed_global_identifier") 30 | func is_same(expected :Variant) -> GdUnitObjectAssert: 31 | return self 32 | 33 | 34 | ## Verifies that the current value is not the same as the given one. 35 | @warning_ignore("unused_parameter") 36 | func is_not_same(expected :Variant) -> GdUnitObjectAssert: 37 | return self 38 | 39 | 40 | ## Verifies that the current value is an instance of the given type. 41 | @warning_ignore("unused_parameter") 42 | func is_instanceof(expected :Object) -> GdUnitObjectAssert: 43 | return self 44 | 45 | 46 | ## Verifies that the current value is not an instance of the given type. 47 | @warning_ignore("unused_parameter") 48 | func is_not_instanceof(expected :Variant) -> GdUnitObjectAssert: 49 | return self 50 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/GdUnitResultAssert.gd: -------------------------------------------------------------------------------- 1 | ## An Assertion Tool to verify Results 2 | class_name GdUnitResultAssert 3 | extends GdUnitAssert 4 | 5 | 6 | ## Verifies that the current value is null. 7 | func is_null() -> GdUnitResultAssert: 8 | return self 9 | 10 | 11 | ## Verifies that the current value is not null. 12 | func is_not_null() -> GdUnitResultAssert: 13 | return self 14 | 15 | 16 | ## Verifies that the result is ends up with empty 17 | func is_empty() -> GdUnitResultAssert: 18 | return self 19 | 20 | 21 | ## Verifies that the result is ends up with success 22 | func is_success() -> GdUnitResultAssert: 23 | return self 24 | 25 | 26 | ## Verifies that the result is ends up with warning 27 | func is_warning() -> GdUnitResultAssert: 28 | return self 29 | 30 | 31 | ## Verifies that the result is ends up with error 32 | func is_error() -> GdUnitResultAssert: 33 | return self 34 | 35 | 36 | ## Verifies that the result contains the given message 37 | @warning_ignore("unused_parameter") 38 | func contains_message(expected :String) -> GdUnitResultAssert: 39 | return self 40 | 41 | 42 | ## Verifies that the result contains the given value 43 | @warning_ignore("unused_parameter") 44 | func is_value(expected :Variant) -> GdUnitResultAssert: 45 | return self 46 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/GdUnitSignalAssert.gd: -------------------------------------------------------------------------------- 1 | ## An Assertion Tool to verify for emitted signals until a waiting time 2 | class_name GdUnitSignalAssert 3 | extends GdUnitAssert 4 | 5 | 6 | ## Verifies that given signal is emitted until waiting time 7 | @warning_ignore("unused_parameter") 8 | func is_emitted(name :String, args := []) -> GdUnitSignalAssert: 9 | await (Engine.get_main_loop() as SceneTree).process_frame 10 | return self 11 | 12 | 13 | ## Verifies that given signal is NOT emitted until waiting time 14 | @warning_ignore("unused_parameter") 15 | func is_not_emitted(name :String, args := []) -> GdUnitSignalAssert: 16 | await (Engine.get_main_loop() as SceneTree).process_frame 17 | return self 18 | 19 | 20 | ## Verifies the signal exists checked the emitter 21 | @warning_ignore("unused_parameter") 22 | func is_signal_exists(name :String) -> GdUnitSignalAssert: 23 | return self 24 | 25 | 26 | ## Overrides the default failure message by given custom message. 27 | @warning_ignore("unused_parameter") 28 | func override_failure_message(message :String) -> GdUnitSignalAssert: 29 | return self 30 | 31 | 32 | ## Sets the assert signal timeout in ms, if the time over a failure is reported.[br] 33 | ## e.g.[br] 34 | ## do wait until 5s the instance has emitted the signal `signal_a`[br] 35 | ## [code]assert_signal(instance).wait_until(5000).is_emitted("signal_a")[/code] 36 | @warning_ignore("unused_parameter") 37 | func wait_until(timeout :int) -> GdUnitSignalAssert: 38 | return self 39 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/GdUnitTuple.gd: -------------------------------------------------------------------------------- 1 | ## A tuple implementation to hold two or many values 2 | class_name GdUnitTuple 3 | extends RefCounted 4 | 5 | const NO_ARG :Variant = GdUnitConstants.NO_ARG 6 | 7 | var __values :Array = Array() 8 | 9 | 10 | func _init(arg0:Variant, 11 | arg1 :Variant=NO_ARG, 12 | arg2 :Variant=NO_ARG, 13 | arg3 :Variant=NO_ARG, 14 | arg4 :Variant=NO_ARG, 15 | arg5 :Variant=NO_ARG, 16 | arg6 :Variant=NO_ARG, 17 | arg7 :Variant=NO_ARG, 18 | arg8 :Variant=NO_ARG, 19 | arg9 :Variant=NO_ARG) -> void: 20 | __values = GdArrayTools.filter_value([arg0,arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9], NO_ARG) 21 | 22 | 23 | func values() -> Array: 24 | return __values 25 | 26 | 27 | func _to_string() -> String: 28 | return "tuple(%s)" % str(__values) 29 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/GdUnitValueExtractor.gd: -------------------------------------------------------------------------------- 1 | ## This is the base interface for value extraction 2 | class_name GdUnitValueExtractor 3 | extends RefCounted 4 | 5 | 6 | ## Extracts a value by given implementation 7 | func extract_value(value :Variant) -> Variant: 8 | push_error("Uninplemented func 'extract_value'") 9 | return value 10 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/GdUnitVectorAssert.gd: -------------------------------------------------------------------------------- 1 | ## An Assertion Tool to verify Vector values 2 | class_name GdUnitVectorAssert 3 | extends GdUnitAssert 4 | 5 | 6 | ## Verifies that the current value is equal to expected one. 7 | @warning_ignore("unused_parameter") 8 | func is_equal(expected :Variant) -> GdUnitVectorAssert: 9 | return self 10 | 11 | 12 | ## Verifies that the current value is not equal to expected one. 13 | @warning_ignore("unused_parameter") 14 | func is_not_equal(expected :Variant) -> GdUnitVectorAssert: 15 | return self 16 | 17 | 18 | ## Verifies that the current and expected value are approximately equal. 19 | @warning_ignore("unused_parameter", "shadowed_global_identifier") 20 | func is_equal_approx(expected :Variant, approx :Variant) -> GdUnitVectorAssert: 21 | return self 22 | 23 | 24 | ## Verifies that the current value is less than the given one. 25 | @warning_ignore("unused_parameter") 26 | func is_less(expected :Variant) -> GdUnitVectorAssert: 27 | return self 28 | 29 | 30 | ## Verifies that the current value is less than or equal the given one. 31 | @warning_ignore("unused_parameter") 32 | func is_less_equal(expected :Variant) -> GdUnitVectorAssert: 33 | return self 34 | 35 | 36 | ## Verifies that the current value is greater than the given one. 37 | @warning_ignore("unused_parameter") 38 | func is_greater(expected :Variant) -> GdUnitVectorAssert: 39 | return self 40 | 41 | 42 | ## Verifies that the current value is greater than or equal the given one. 43 | @warning_ignore("unused_parameter") 44 | func is_greater_equal(expected :Variant) -> GdUnitVectorAssert: 45 | return self 46 | 47 | 48 | ## Verifies that the current value is between the given boundaries (inclusive). 49 | @warning_ignore("unused_parameter") 50 | func is_between(from :Variant, to :Variant) -> GdUnitVectorAssert: 51 | return self 52 | 53 | 54 | ## Verifies that the current value is not between the given boundaries (inclusive). 55 | @warning_ignore("unused_parameter") 56 | func is_not_between(from :Variant, to :Variant) -> GdUnitVectorAssert: 57 | return self 58 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/asserts/CallBackValueProvider.gd: -------------------------------------------------------------------------------- 1 | # a value provider unsing a callback to get `next` value from a certain function 2 | class_name CallBackValueProvider 3 | extends ValueProvider 4 | 5 | var _cb :Callable 6 | var _args :Array 7 | 8 | 9 | func _init(instance :Object, func_name :String, args :Array = Array(), force_error := true) -> void: 10 | _cb = Callable(instance, func_name); 11 | _args = args 12 | if force_error and not _cb.is_valid(): 13 | push_error("Can't find function '%s' checked instance %s" % [func_name, instance]) 14 | 15 | 16 | func get_value() -> Variant: 17 | if not _cb.is_valid(): 18 | return null 19 | if _args.is_empty(): 20 | return await _cb.call() 21 | return await _cb.callv(_args) 22 | 23 | 24 | func dispose() -> void: 25 | _cb = Callable() 26 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/asserts/DefaultValueProvider.gd: -------------------------------------------------------------------------------- 1 | # default value provider, simple returns the initial value 2 | class_name DefaultValueProvider 3 | extends ValueProvider 4 | 5 | var _value: Variant 6 | 7 | 8 | func _init(value: Variant) -> void: 9 | _value = value 10 | 11 | 12 | func get_value() -> Variant: 13 | return _value 14 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/asserts/GdAssertReports.gd: -------------------------------------------------------------------------------- 1 | class_name GdAssertReports 2 | extends RefCounted 3 | 4 | const LAST_ERROR = "last_assert_error_message" 5 | const LAST_ERROR_LINE = "last_assert_error_line" 6 | 7 | 8 | static func report_success() -> void: 9 | GdUnitSignals.instance().gdunit_set_test_failed.emit(false) 10 | GdAssertReports.set_last_error_line_number(-1) 11 | Engine.remove_meta(LAST_ERROR) 12 | 13 | 14 | static func report_warning(message :String, line_number :int) -> void: 15 | GdUnitSignals.instance().gdunit_set_test_failed.emit(false) 16 | send_report(GdUnitReport.new().create(GdUnitReport.WARN, line_number, message)) 17 | 18 | 19 | static func report_error(message:String, line_number :int) -> void: 20 | GdUnitSignals.instance().gdunit_set_test_failed.emit(true) 21 | GdAssertReports.set_last_error_line_number(line_number) 22 | Engine.set_meta(LAST_ERROR, message) 23 | # if we expect to fail we handle as success test 24 | if _do_expect_assert_failing(): 25 | return 26 | send_report(GdUnitReport.new().create(GdUnitReport.FAILURE, line_number, message)) 27 | 28 | 29 | static func reset_last_error_line_number() -> void: 30 | Engine.remove_meta(LAST_ERROR_LINE) 31 | 32 | 33 | static func set_last_error_line_number(line_number :int) -> void: 34 | Engine.set_meta(LAST_ERROR_LINE, line_number) 35 | 36 | 37 | static func get_last_error_line_number() -> int: 38 | if Engine.has_meta(LAST_ERROR_LINE): 39 | return Engine.get_meta(LAST_ERROR_LINE) 40 | return -1 41 | 42 | 43 | static func _do_expect_assert_failing() -> bool: 44 | if Engine.has_meta(GdUnitConstants.EXPECT_ASSERT_REPORT_FAILURES): 45 | return Engine.get_meta(GdUnitConstants.EXPECT_ASSERT_REPORT_FAILURES) 46 | return false 47 | 48 | 49 | static func current_failure() -> String: 50 | return Engine.get_meta(LAST_ERROR) 51 | 52 | 53 | static func send_report(report :GdUnitReport) -> void: 54 | GdUnitThreadManager.get_current_context().get_execution_context().add_report(report) 55 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/asserts/ValueProvider.gd: -------------------------------------------------------------------------------- 1 | # base interface for assert value provider 2 | class_name ValueProvider 3 | extends RefCounted 4 | 5 | func get_value() -> Variant: 6 | return null 7 | 8 | 9 | func dispose() -> void: 10 | pass 11 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/cmd/CmdArgumentParser.gd: -------------------------------------------------------------------------------- 1 | class_name CmdArgumentParser 2 | extends RefCounted 3 | 4 | var _options :CmdOptions 5 | var _tool_name :String 6 | var _parsed_commands :Dictionary = Dictionary() 7 | 8 | 9 | func _init(p_options :CmdOptions, p_tool_name :String) -> void: 10 | _options = p_options 11 | _tool_name = p_tool_name 12 | 13 | 14 | func parse(args :Array, ignore_unknown_cmd := false) -> GdUnitResult: 15 | _parsed_commands.clear() 16 | 17 | # parse until first program argument 18 | while not args.is_empty(): 19 | var arg :String = args.pop_front() 20 | if arg.find(_tool_name) != -1: 21 | break 22 | 23 | if args.is_empty(): 24 | return GdUnitResult.empty() 25 | 26 | # now parse all arguments 27 | while not args.is_empty(): 28 | var cmd :String = args.pop_front() 29 | var option := _options.get_option(cmd) 30 | 31 | if option: 32 | if _parse_cmd_arguments(option, args) == -1: 33 | return GdUnitResult.error("The '%s' command requires an argument!" % option.short_command()) 34 | elif not ignore_unknown_cmd: 35 | return GdUnitResult.error("Unknown '%s' command!" % cmd) 36 | return GdUnitResult.success(_parsed_commands.values()) 37 | 38 | 39 | func options() -> CmdOptions: 40 | return _options 41 | 42 | 43 | func _parse_cmd_arguments(option: CmdOption, args: Array) -> int: 44 | var command_name := option.short_command() 45 | var command: CmdCommand = _parsed_commands.get(command_name, CmdCommand.new(command_name)) 46 | 47 | if option.has_argument(): 48 | if not option.is_argument_optional() and args.is_empty(): 49 | return -1 50 | if _is_next_value_argument(args): 51 | var value: String = args.pop_front() 52 | command.add_argument(value) 53 | elif not option.is_argument_optional(): 54 | return -1 55 | _parsed_commands[command_name] = command 56 | return 0 57 | 58 | 59 | func _is_next_value_argument(args: PackedStringArray) -> bool: 60 | if args.is_empty(): 61 | return false 62 | return _options.get_option(args[0]) == null 63 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/cmd/CmdCommand.gd: -------------------------------------------------------------------------------- 1 | class_name CmdCommand 2 | extends RefCounted 3 | 4 | var _name: String 5 | var _arguments: PackedStringArray 6 | 7 | 8 | func _init(p_name :String, p_arguments := []) -> void: 9 | _name = p_name 10 | _arguments = PackedStringArray(p_arguments) 11 | 12 | 13 | func name() -> String: 14 | return _name 15 | 16 | 17 | func arguments() -> PackedStringArray: 18 | return _arguments 19 | 20 | 21 | func add_argument(arg :String) -> void: 22 | @warning_ignore("return_value_discarded") 23 | _arguments.append(arg) 24 | 25 | 26 | func _to_string() -> String: 27 | return "%s:%s" % [_name, ", ".join(_arguments)] 28 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/cmd/CmdOption.gd: -------------------------------------------------------------------------------- 1 | class_name CmdOption 2 | extends RefCounted 3 | 4 | 5 | var _commands :PackedStringArray 6 | var _help :String 7 | var _description :String 8 | var _type :int 9 | var _arg_optional :bool = false 10 | 11 | 12 | # constructs a command option by given arguments 13 | # commands : a string with comma separated list of available commands begining with the short form 14 | # help: a help text show howto use 15 | # description: a full description of the command 16 | # type: the argument type 17 | # arg_optional: defines of the argument optional 18 | func _init(p_commands :String, p_help :String, p_description :String, p_type :int = TYPE_NIL, p_arg_optional :bool = false) -> void: 19 | _commands = p_commands.replace(" ", "").replace("\t", "").split(",") 20 | _help = p_help 21 | _description = p_description 22 | _type = p_type 23 | _arg_optional = p_arg_optional 24 | 25 | 26 | func commands() -> PackedStringArray: 27 | return _commands 28 | 29 | 30 | func short_command() -> String: 31 | return _commands[0] 32 | 33 | 34 | func help() -> String: 35 | return _help 36 | 37 | 38 | func description() -> String: 39 | return _description 40 | 41 | 42 | func type() -> int: 43 | return _type 44 | 45 | 46 | func is_argument_optional() -> bool: 47 | return _arg_optional 48 | 49 | 50 | func has_argument() -> bool: 51 | return _type != TYPE_NIL 52 | 53 | 54 | func describe() -> String: 55 | if help().is_empty(): 56 | return " %-32s %s \n" % [commands(), description()] 57 | return " %-32s %s \n %-32s %s\n" % [commands(), description(), "", help()] 58 | 59 | 60 | func _to_string() -> String: 61 | return describe() 62 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/cmd/CmdOptions.gd: -------------------------------------------------------------------------------- 1 | class_name CmdOptions 2 | extends RefCounted 3 | 4 | 5 | var _default_options :Array[CmdOption] 6 | var _advanced_options :Array[CmdOption] 7 | 8 | 9 | func _init(p_options :Array[CmdOption] = [], p_advanced_options :Array[CmdOption] = []) -> void: 10 | # default help options 11 | _default_options = p_options 12 | _advanced_options = p_advanced_options 13 | 14 | 15 | func default_options() -> Array[CmdOption]: 16 | return _default_options 17 | 18 | 19 | func advanced_options() -> Array[CmdOption]: 20 | return _advanced_options 21 | 22 | 23 | func options() -> Array[CmdOption]: 24 | return default_options() + advanced_options() 25 | 26 | 27 | func get_option(cmd :String) -> CmdOption: 28 | for option in options(): 29 | if Array(option.commands()).has(cmd): 30 | return option 31 | return null 32 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/core/GdUnit4Version.gd: -------------------------------------------------------------------------------- 1 | class_name GdUnit4Version 2 | extends RefCounted 3 | 4 | const VERSION_PATTERN = "[center][color=#9887c4]gd[/color][color=#7a57d6]Unit[/color][color=#9887c4]4[/color] [color=#9887c4]${version}[/color][/center]" 5 | 6 | var _major :int 7 | var _minor :int 8 | var _patch :int 9 | 10 | 11 | func _init(major :int, minor :int, patch :int) -> void: 12 | _major = major 13 | _minor = minor 14 | _patch = patch 15 | 16 | 17 | static func parse(value :String) -> GdUnit4Version: 18 | var regex := RegEx.new() 19 | @warning_ignore("return_value_discarded") 20 | regex.compile("[a-zA-Z:,-]+") 21 | var cleaned := regex.sub(value, "", true) 22 | var parts := cleaned.split(".") 23 | var major := parts[0].to_int() 24 | var minor := parts[1].to_int() 25 | var patch := parts[2].to_int() if parts.size() > 2 else 0 26 | return GdUnit4Version.new(major, minor, patch) 27 | 28 | 29 | static func current() -> GdUnit4Version: 30 | var config := ConfigFile.new() 31 | @warning_ignore("return_value_discarded") 32 | config.load('addons/gdUnit4/plugin.cfg') 33 | @warning_ignore("unsafe_cast") 34 | return parse(config.get_value('plugin', 'version') as String) 35 | 36 | 37 | func equals(other :GdUnit4Version) -> bool: 38 | return _major == other._major and _minor == other._minor and _patch == other._patch 39 | 40 | 41 | func is_greater(other :GdUnit4Version) -> bool: 42 | if _major > other._major: 43 | return true 44 | if _major == other._major and _minor > other._minor: 45 | return true 46 | return _major == other._major and _minor == other._minor and _patch > other._patch 47 | 48 | 49 | static func init_version_label(label :Control) -> void: 50 | var config := ConfigFile.new() 51 | @warning_ignore("return_value_discarded") 52 | config.load('addons/gdUnit4/plugin.cfg') 53 | var version :String = config.get_value('plugin', 'version') 54 | if label is RichTextLabel: 55 | (label as RichTextLabel).text = VERSION_PATTERN.replace('${version}', version) 56 | else: 57 | (label as Label).text = "gdUnit4 " + version 58 | 59 | 60 | func _to_string() -> String: 61 | return "v%d.%d.%d" % [_major, _minor, _patch] 62 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/core/GdUnitObjectInteractions.gd: -------------------------------------------------------------------------------- 1 | class_name GdUnitObjectInteractions 2 | extends RefCounted 3 | 4 | 5 | static func verify(interaction_object :Object, interactions_times :int) -> Variant: 6 | if not _is_mock_or_spy(interaction_object, "__verify"): 7 | return interaction_object 8 | @warning_ignore("unsafe_method_access") 9 | return interaction_object.__do_verify_interactions(interactions_times) 10 | 11 | 12 | static func verify_no_interactions(interaction_object :Object) -> GdUnitAssert: 13 | var __gd_assert := GdUnitAssertImpl.new("") 14 | if not _is_mock_or_spy(interaction_object, "__verify"): 15 | return __gd_assert.report_success() 16 | @warning_ignore("unsafe_method_access") 17 | var __summary :Dictionary = interaction_object.__verify_no_interactions() 18 | if __summary.is_empty(): 19 | return __gd_assert.report_success() 20 | return __gd_assert.report_error(GdAssertMessages.error_no_more_interactions(__summary)) 21 | 22 | 23 | static func verify_no_more_interactions(interaction_object :Object) -> GdUnitAssert: 24 | var __gd_assert := GdUnitAssertImpl.new("") 25 | if not _is_mock_or_spy(interaction_object, "__verify_no_more_interactions"): 26 | return __gd_assert 27 | @warning_ignore("unsafe_method_access") 28 | var __summary :Dictionary = interaction_object.__verify_no_more_interactions() 29 | if __summary.is_empty(): 30 | return __gd_assert 31 | return __gd_assert.report_error(GdAssertMessages.error_no_more_interactions(__summary)) 32 | 33 | 34 | static func reset(interaction_object :Object) -> Object: 35 | if not _is_mock_or_spy(interaction_object, "__reset"): 36 | return interaction_object 37 | @warning_ignore("unsafe_method_access") 38 | interaction_object.__reset_interactions() 39 | return interaction_object 40 | 41 | 42 | static func _is_mock_or_spy(interaction_object :Object, mock_function_signature :String) -> bool: 43 | @warning_ignore("unsafe_cast") 44 | if interaction_object is GDScript and not (interaction_object.get_script() as GDScript).has_method(mock_function_signature): 45 | push_error("Error: You try to use a non mock or spy!") 46 | return false 47 | return true 48 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/core/GdUnitProperty.gd: -------------------------------------------------------------------------------- 1 | class_name GdUnitProperty 2 | extends RefCounted 3 | 4 | 5 | var _name :String 6 | var _help :String 7 | var _type :int 8 | var _value :Variant 9 | var _value_set :PackedStringArray 10 | var _default :Variant 11 | 12 | 13 | func _init(p_name :String, p_type :int, p_value :Variant, p_default_value :Variant, p_help :="", p_value_set := PackedStringArray()) -> void: 14 | _name = p_name 15 | _type = p_type 16 | _value = p_value 17 | _value_set = p_value_set 18 | _default = p_default_value 19 | _help = p_help 20 | 21 | 22 | func name() -> String: 23 | return _name 24 | 25 | 26 | func type() -> int: 27 | return _type 28 | 29 | 30 | func value() -> Variant: 31 | return _value 32 | 33 | 34 | func value_as_string() -> String: 35 | return _value 36 | 37 | 38 | func value_set() -> PackedStringArray: 39 | return _value_set 40 | 41 | 42 | func is_selectable_value() -> bool: 43 | return not _value_set.is_empty() 44 | 45 | 46 | func set_value(p_value :Variant) -> void: 47 | match _type: 48 | TYPE_STRING: 49 | _value = str(p_value) 50 | TYPE_BOOL: 51 | _value = convert(p_value, TYPE_BOOL) 52 | TYPE_INT: 53 | _value = convert(p_value, TYPE_INT) 54 | TYPE_FLOAT: 55 | _value = convert(p_value, TYPE_FLOAT) 56 | _: 57 | _value = p_value 58 | 59 | 60 | func default() -> Variant: 61 | return _default 62 | 63 | 64 | func category() -> String: 65 | var elements := _name.split("/") 66 | if elements.size() > 3: 67 | return elements[2] 68 | return "" 69 | 70 | 71 | func help() -> String: 72 | return _help 73 | 74 | 75 | func _to_string() -> String: 76 | return "%-64s %-10s %-10s (%s) help:%s set:%s" % [name(), type(), value(), default(), help(), _value_set] 77 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/core/GdUnitRunner.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=3 format=3 uid="uid://belidlfknh74r"] 2 | 3 | [ext_resource type="Script" path="res://addons/gdUnit4/src/core/GdUnitRunner.gd" id="1"] 4 | [ext_resource type="Script" path="res://addons/gdUnit4/src/network/GdUnitTcpClient.gd" id="2"] 5 | 6 | [node name="Control" type="Node"] 7 | script = ExtResource("1") 8 | 9 | [node name="GdUnitTcpClient" type="Node" parent="."] 10 | script = ExtResource("2") 11 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/core/GdUnitScriptType.gd: -------------------------------------------------------------------------------- 1 | class_name GdUnitScriptType 2 | extends RefCounted 3 | 4 | const UNKNOWN := "" 5 | const CS := "cs" 6 | const GD := "gd" 7 | 8 | 9 | static func type_of(script :Script) -> String: 10 | if script == null: 11 | return UNKNOWN 12 | if GdObjects.is_gd_script(script): 13 | return GD 14 | if GdObjects.is_cs_script(script): 15 | return CS 16 | return UNKNOWN 17 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/core/GdUnitSignals.gd: -------------------------------------------------------------------------------- 1 | class_name GdUnitSignals 2 | extends RefCounted 3 | 4 | @warning_ignore("unused_signal") 5 | signal gdunit_client_connected(client_id :int) 6 | @warning_ignore("unused_signal") 7 | signal gdunit_client_disconnected(client_id :int) 8 | @warning_ignore("unused_signal") 9 | signal gdunit_client_terminated() 10 | 11 | @warning_ignore("unused_signal") 12 | signal gdunit_event(event :GdUnitEvent) 13 | @warning_ignore("unused_signal") 14 | signal gdunit_event_debug(event :GdUnitEvent) 15 | @warning_ignore("unused_signal") 16 | signal gdunit_add_test_suite(test_suite :GdUnitTestSuiteDto) 17 | @warning_ignore("unused_signal") 18 | signal gdunit_message(message :String) 19 | @warning_ignore("unused_signal") 20 | signal gdunit_set_test_failed(is_failed :bool) 21 | @warning_ignore("unused_signal") 22 | signal gdunit_settings_changed(property :GdUnitProperty) 23 | 24 | const META_KEY := "GdUnitSignals" 25 | 26 | 27 | static func instance() -> GdUnitSignals: 28 | if Engine.has_meta(META_KEY): 29 | return Engine.get_meta(META_KEY) 30 | var instance_ := GdUnitSignals.new() 31 | Engine.set_meta(META_KEY, instance_) 32 | return instance_ 33 | 34 | 35 | static func dispose() -> void: 36 | var signals := instance() 37 | # cleanup connected signals 38 | for signal_ in signals.get_signal_list(): 39 | @warning_ignore("unsafe_cast") 40 | for connection in signals.get_signal_connection_list(signal_["name"] as StringName): 41 | var _signal: Signal = connection["signal"] 42 | var _callable: Callable = connection["callable"] 43 | _signal.disconnect(_callable) 44 | signals = null 45 | Engine.remove_meta(META_KEY) 46 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/core/GdUnitTestSuiteBuilder.gd: -------------------------------------------------------------------------------- 1 | class_name GdUnitTestSuiteBuilder 2 | extends RefCounted 3 | 4 | 5 | static func create(source :Script, line_number :int) -> GdUnitResult: 6 | var test_suite_path := GdUnitTestSuiteScanner.resolve_test_suite_path(source.resource_path, GdUnitSettings.test_root_folder()) 7 | # we need to save and close the testsuite and source if is current opened before modify 8 | @warning_ignore("return_value_discarded") 9 | ScriptEditorControls.save_an_open_script(source.resource_path) 10 | @warning_ignore("return_value_discarded") 11 | ScriptEditorControls.save_an_open_script(test_suite_path, true) 12 | if GdObjects.is_cs_script(source): 13 | return GdUnit4CSharpApiLoader.create_test_suite(source.resource_path, line_number+1, test_suite_path) 14 | var parser := GdScriptParser.new() 15 | var lines := source.source_code.split("\n") 16 | var current_line := lines[line_number] 17 | var func_name := parser.parse_func_name(current_line) 18 | if func_name.is_empty(): 19 | return GdUnitResult.error("No function found at line: %d." % line_number) 20 | return GdUnitTestSuiteScanner.create_test_case(test_suite_path, func_name, source.resource_path) 21 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/core/GodotVersionFixures.gd: -------------------------------------------------------------------------------- 1 | ## This service class contains helpers to wrap Godot functions and handle them carefully depending on the current Godot version 2 | class_name GodotVersionFixures 3 | extends RefCounted 4 | 5 | 6 | @warning_ignore("shadowed_global_identifier") 7 | static func type_convert(value: Variant, type: int) -> Variant: 8 | return convert(value, type) 9 | 10 | 11 | @warning_ignore("shadowed_global_identifier") 12 | static func convert(value: Variant, type: int) -> Variant: 13 | return type_convert(value, type) 14 | 15 | 16 | # handle global_position fixed by https://github.com/godotengine/godot/pull/88473 17 | static func set_event_global_position(event: InputEventMouseMotion, global_position: Vector2) -> void: 18 | if Engine.get_version_info().hex >= 0x40202 or Engine.get_version_info().hex == 0x40104: 19 | event.global_position = event.position 20 | else: 21 | event.global_position = global_position 22 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/core/assets/touch-button.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ward727a/RPGCreator/f947ae880dbf07ee88a5c0ebad4ffe7e2ff7ea90/addons/gdUnit4/src/core/assets/touch-button.png -------------------------------------------------------------------------------- /addons/gdUnit4/src/core/assets/touch-button.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://btx5kcrsngasl" 6 | path="res://.godot/imported/touch-button.png-2fff40c8520d8e97a57db1b2b043f641.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://addons/gdUnit4/src/core/assets/touch-button.png" 14 | dest_files=["res://.godot/imported/touch-button.png-2fff40c8520d8e97a57db1b2b043f641.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/core/command/GdUnitCommand.gd: -------------------------------------------------------------------------------- 1 | class_name GdUnitCommand 2 | extends RefCounted 3 | 4 | 5 | func _init(p_name :String, p_is_enabled: Callable, p_runnable: Callable, p_shortcut :GdUnitShortcut.ShortCut = GdUnitShortcut.ShortCut.NONE) -> void: 6 | assert(p_name != null, "(%s) missing parameter 'name'" % p_name) 7 | assert(p_is_enabled != null, "(%s) missing parameter 'is_enabled'" % p_name) 8 | assert(p_runnable != null, "(%s) missing parameter 'runnable'" % p_name) 9 | assert(p_shortcut != null, "(%s) missing parameter 'shortcut'" % p_name) 10 | self.name = p_name 11 | self.is_enabled = p_is_enabled 12 | self.shortcut = p_shortcut 13 | self.runnable = p_runnable 14 | 15 | 16 | var name: String: 17 | set(value): 18 | name = value 19 | get: 20 | return name 21 | 22 | 23 | var shortcut: GdUnitShortcut.ShortCut: 24 | set(value): 25 | shortcut = value 26 | get: 27 | return shortcut 28 | 29 | 30 | var is_enabled: Callable: 31 | set(value): 32 | is_enabled = value 33 | get: 34 | return is_enabled 35 | 36 | 37 | var runnable: Callable: 38 | set(value): 39 | runnable = value 40 | get: 41 | return runnable 42 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/core/command/GdUnitShortcutAction.gd: -------------------------------------------------------------------------------- 1 | class_name GdUnitShortcutAction 2 | extends RefCounted 3 | 4 | 5 | func _init(p_type :GdUnitShortcut.ShortCut, p_shortcut :Shortcut, p_command :String) -> void: 6 | assert(p_type != null, "missing parameter 'type'") 7 | assert(p_shortcut != null, "missing parameter 'shortcut'") 8 | assert(p_command != null, "missing parameter 'command'") 9 | self.type = p_type 10 | self.shortcut = p_shortcut 11 | self.command = p_command 12 | 13 | 14 | var type: GdUnitShortcut.ShortCut: 15 | set(value): 16 | type = value 17 | get: 18 | return type 19 | 20 | 21 | var shortcut: Shortcut: 22 | set(value): 23 | shortcut = value 24 | get: 25 | return shortcut 26 | 27 | 28 | var command: String: 29 | set(value): 30 | command = value 31 | get: 32 | return command 33 | 34 | 35 | func _to_string() -> String: 36 | return "GdUnitShortcutAction: %s (%s) -> %s" % [GdUnitShortcut.ShortCut.keys()[type], shortcut.get_as_text(), command] 37 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/core/discovery/GdUnitTestDiscoverer.gd: -------------------------------------------------------------------------------- 1 | class_name GdUnitTestDiscoverer 2 | extends RefCounted 3 | 4 | 5 | static func run() -> void: 6 | prints("Running test discovery ..") 7 | GdUnitSignals.instance().gdunit_event.emit(GdUnitEventTestDiscoverStart.new()) 8 | await (Engine.get_main_loop() as SceneTree).create_timer(.5).timeout 9 | 10 | # We run the test discovery in an extra thread so that the main thread is not blocked 11 | var t:= Thread.new() 12 | @warning_ignore("return_value_discarded") 13 | t.start(func () -> void: 14 | var test_suite_directories :PackedStringArray = GdUnitCommandHandler.scan_test_directorys("res://" , GdUnitSettings.test_root_folder(), []) 15 | var scanner := GdUnitTestSuiteScanner.new() 16 | var _test_suites_to_process :Array[Node] = [] 17 | 18 | for test_suite_dir in test_suite_directories: 19 | _test_suites_to_process.append_array(scanner.scan(test_suite_dir)) 20 | 21 | # Do sync the main thread before emit the discovered test suites to the inspector 22 | await (Engine.get_main_loop() as SceneTree).process_frame 23 | var test_case_count :int = 0 24 | for test_suite in _test_suites_to_process: 25 | test_case_count += test_suite.get_child_count() 26 | var ts_dto := GdUnitTestSuiteDto.of(test_suite) 27 | GdUnitSignals.instance().gdunit_add_test_suite.emit(ts_dto) 28 | test_suite.free() 29 | 30 | prints("%d test suites discovered." % _test_suites_to_process.size()) 31 | GdUnitSignals.instance().gdunit_event.emit(GdUnitEventTestDiscoverEnd.new(_test_suites_to_process.size(), test_case_count)) 32 | _test_suites_to_process.clear() 33 | ) 34 | # wait unblocked to the tread is finished 35 | while t.is_alive(): 36 | await (Engine.get_main_loop() as SceneTree).process_frame 37 | # needs finally to wait for finish 38 | await t.wait_to_finish() 39 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/core/event/GdUnitEventInit.gd: -------------------------------------------------------------------------------- 1 | class_name GdUnitInit 2 | extends GdUnitEvent 3 | 4 | 5 | var _total_testsuites :int 6 | 7 | 8 | func _init(p_total_testsuites :int, p_total_count :int) -> void: 9 | _event_type = INIT 10 | _total_testsuites = p_total_testsuites 11 | _total_count = p_total_count 12 | 13 | 14 | func total_test_suites() -> int: 15 | return _total_testsuites 16 | 17 | 18 | func total_tests() -> int: 19 | return _total_count 20 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/core/event/GdUnitEventStop.gd: -------------------------------------------------------------------------------- 1 | class_name GdUnitStop 2 | extends GdUnitEvent 3 | 4 | 5 | func _init() -> void: 6 | _event_type = STOP 7 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/core/event/GdUnitEventTestDiscoverEnd.gd: -------------------------------------------------------------------------------- 1 | class_name GdUnitEventTestDiscoverEnd 2 | extends GdUnitEvent 3 | 4 | 5 | var _total_testsuites: int 6 | 7 | 8 | func _init(testsuite_count: int, test_count: int) -> void: 9 | _event_type = DISCOVER_END 10 | _total_testsuites = testsuite_count 11 | _total_count = test_count 12 | 13 | 14 | func total_test_suites() -> int: 15 | return _total_testsuites 16 | 17 | 18 | func total_tests() -> int: 19 | return _total_count 20 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/core/event/GdUnitEventTestDiscoverStart.gd: -------------------------------------------------------------------------------- 1 | class_name GdUnitEventTestDiscoverStart 2 | extends GdUnitEvent 3 | 4 | 5 | func _init() -> void: 6 | _event_type = DISCOVER_START 7 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/core/event/GdUnitEventTestDiscoverTestAdded.gd: -------------------------------------------------------------------------------- 1 | class_name GdUnitEventTestDiscoverTestAdded 2 | extends GdUnitEvent 3 | 4 | 5 | var _test_case_dto: GdUnitTestCaseDto 6 | 7 | 8 | func _init(arg_resource_path: String, arg_suite_name: String, arg_test_case_dto: GdUnitTestCaseDto) -> void: 9 | _event_type = DISCOVER_TEST_ADDED 10 | _resource_path = arg_resource_path 11 | _suite_name = arg_suite_name 12 | _test_name = arg_test_case_dto.name() 13 | _test_case_dto = arg_test_case_dto 14 | 15 | 16 | func test_case_dto() -> GdUnitTestCaseDto: 17 | return _test_case_dto 18 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/core/event/GdUnitEventTestDiscoverTestRemoved.gd: -------------------------------------------------------------------------------- 1 | class_name GdUnitEventTestDiscoverTestRemoved 2 | extends GdUnitEvent 3 | 4 | 5 | func _init(arg_resource_path: String, arg_suite_name: String, arg_test_name: String) -> void: 6 | _event_type = DISCOVER_TEST_REMOVED 7 | _resource_path = arg_resource_path 8 | _suite_name = arg_suite_name 9 | _test_name = arg_test_name 10 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/core/event/GdUnitEventTestDiscoverTestSuiteAdded.gd: -------------------------------------------------------------------------------- 1 | class_name GdUnitEventTestDiscoverTestSuiteAdded 2 | extends GdUnitEvent 3 | 4 | 5 | var _dto: GdUnitTestSuiteDto 6 | 7 | 8 | func _init(arg_resource_path: String, arg_suite_name: String, arg_dto: GdUnitTestSuiteDto) -> void: 9 | _event_type = DISCOVER_SUITE_ADDED 10 | _resource_path = arg_resource_path 11 | _suite_name = arg_suite_name 12 | _dto = arg_dto 13 | 14 | 15 | func suite_dto() -> GdUnitTestSuiteDto: 16 | return _dto 17 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/core/execution/GdUnitTestReportCollector.gd: -------------------------------------------------------------------------------- 1 | # Collects all reports seperated as warnings, failures and errors 2 | class_name GdUnitTestReportCollector 3 | extends RefCounted 4 | 5 | 6 | var _reports :Array[GdUnitReport] = [] 7 | 8 | 9 | static func __filter_is_error(report :GdUnitReport) -> bool: 10 | return report.is_error() 11 | 12 | 13 | static func __filter_is_failure(report :GdUnitReport) -> bool: 14 | return report.is_failure() 15 | 16 | 17 | static func __filter_is_warning(report :GdUnitReport) -> bool: 18 | return report.is_warning() 19 | 20 | 21 | static func __filter_is_skipped(report :GdUnitReport) -> bool: 22 | return report.is_skipped() 23 | 24 | 25 | func count_failures() -> int: 26 | return _reports.filter(__filter_is_failure).size() 27 | 28 | 29 | func count_errors() -> int: 30 | return _reports.filter(__filter_is_error).size() 31 | 32 | 33 | func count_warnings() -> int: 34 | return _reports.filter(__filter_is_warning).size() 35 | 36 | 37 | func count_skipped() -> int: 38 | return _reports.filter(__filter_is_skipped).size() 39 | 40 | 41 | func has_failures() -> bool: 42 | return _reports.any(__filter_is_failure) 43 | 44 | 45 | func has_errors() -> bool: 46 | return _reports.any(__filter_is_error) 47 | 48 | 49 | func has_warnings() -> bool: 50 | return _reports.any(__filter_is_warning) 51 | 52 | 53 | func has_skipped() -> bool: 54 | return _reports.any(__filter_is_skipped) 55 | 56 | 57 | func reports() -> Array[GdUnitReport]: 58 | return _reports 59 | 60 | 61 | func push_back(report :GdUnitReport) -> void: 62 | _reports.push_back(report) 63 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/core/execution/GdUnitTestSuiteExecutor.gd: -------------------------------------------------------------------------------- 1 | ## The executor to run a test-suite 2 | class_name GdUnitTestSuiteExecutor 3 | 4 | 5 | # preload all asserts here 6 | @warning_ignore("unused_private_class_variable") 7 | var _assertions := GdUnitAssertions.new() 8 | var _executeStage := GdUnitTestSuiteExecutionStage.new() 9 | 10 | 11 | func _init(debug_mode :bool = false) -> void: 12 | _executeStage.set_debug_mode(debug_mode) 13 | 14 | 15 | func execute(test_suite :GdUnitTestSuite) -> void: 16 | var orphan_detection_enabled := GdUnitSettings.is_verbose_orphans() 17 | if not orphan_detection_enabled: 18 | prints("!!! Reporting orphan nodes is disabled. Please check GdUnit settings.") 19 | 20 | (Engine.get_main_loop() as SceneTree).root.call_deferred("add_child", test_suite) 21 | await (Engine.get_main_loop() as SceneTree).process_frame 22 | await _executeStage.execute(GdUnitExecutionContext.of_test_suite(test_suite)) 23 | 24 | 25 | func fail_fast(enabled :bool) -> void: 26 | _executeStage.fail_fast(enabled) 27 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/core/execution/stages/GdUnitTestCaseAfterStage.gd: -------------------------------------------------------------------------------- 1 | ## The test case shutdown hook implementation.[br] 2 | ## It executes the 'test_after()' block from the test-suite. 3 | class_name GdUnitTestCaseAfterStage 4 | extends IGdUnitExecutionStage 5 | 6 | 7 | var _call_stage: bool 8 | 9 | 10 | func _init(call_stage := true) -> void: 11 | _call_stage = call_stage 12 | 13 | 14 | func _execute(context: GdUnitExecutionContext) -> void: 15 | var test_suite := context.test_suite 16 | 17 | if _call_stage: 18 | @warning_ignore("redundant_await") 19 | await test_suite.after_test() 20 | # unreference last used assert form the test to prevent memory leaks 21 | GdUnitThreadManager.get_current_context().set_assert(null) 22 | await context.gc() 23 | await context.error_monitor_stop() 24 | 25 | var reports := context.build_reports() 26 | 27 | if context.is_skipped(): 28 | fire_test_skipped(context) 29 | else: 30 | fire_event(GdUnitEvent.new() \ 31 | .test_after(context.get_test_suite_path(), 32 | context.get_test_suite_name(), 33 | context.get_test_case_name(), 34 | context.get_execution_statistics(), 35 | reports)) 36 | 37 | 38 | func fire_test_skipped(context: GdUnitExecutionContext) -> void: 39 | var test_case := context.test_case 40 | var statistics := { 41 | GdUnitEvent.ORPHAN_NODES: 0, 42 | GdUnitEvent.ELAPSED_TIME: 0, 43 | GdUnitEvent.WARNINGS: false, 44 | GdUnitEvent.ERRORS: false, 45 | GdUnitEvent.ERROR_COUNT: 0, 46 | GdUnitEvent.FAILED: false, 47 | GdUnitEvent.FAILED_COUNT: 0, 48 | GdUnitEvent.SKIPPED: true, 49 | GdUnitEvent.SKIPPED_COUNT: 1, 50 | } 51 | var report := GdUnitReport.new() \ 52 | .create(GdUnitReport.SKIPPED, test_case.line_number(), GdAssertMessages.test_skipped(test_case.skip_info())) 53 | fire_event(GdUnitEvent.new() \ 54 | .test_after(context.get_test_suite_path(), 55 | context.get_test_suite_name(), 56 | context.get_test_case_name(), 57 | statistics, 58 | [report])) 59 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/core/execution/stages/GdUnitTestCaseBeforeStage.gd: -------------------------------------------------------------------------------- 1 | ## The test case startup hook implementation.[br] 2 | ## It executes the 'test_before()' block from the test-suite. 3 | class_name GdUnitTestCaseBeforeStage 4 | extends IGdUnitExecutionStage 5 | 6 | var _call_stage :bool 7 | 8 | 9 | func _init(call_stage := true) -> void: 10 | _call_stage = call_stage 11 | 12 | 13 | func _execute(context :GdUnitExecutionContext) -> void: 14 | var test_suite := context.test_suite 15 | 16 | fire_event(GdUnitEvent.new()\ 17 | .test_before(context.get_test_suite_path(), context.get_test_suite_name(), context.get_test_case_name())) 18 | if _call_stage: 19 | @warning_ignore("redundant_await") 20 | await test_suite.before_test() 21 | context.error_monitor_start() 22 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/core/execution/stages/GdUnitTestCaseExecutionStage.gd: -------------------------------------------------------------------------------- 1 | ## The test case execution stage.[br] 2 | class_name GdUnitTestCaseExecutionStage 3 | extends IGdUnitExecutionStage 4 | 5 | 6 | var _stage_single_test :IGdUnitExecutionStage = GdUnitTestCaseSingleExecutionStage.new() 7 | var _stage_fuzzer_test :IGdUnitExecutionStage = GdUnitTestCaseFuzzedExecutionStage.new() 8 | var _stage_parameterized_test :IGdUnitExecutionStage= GdUnitTestCaseParameterizedExecutionStage.new() 9 | 10 | 11 | ## Executes the test case 'test_()'.[br] 12 | ## It executes synchronized following stages[br] 13 | ## -> test_before() [br] 14 | ## -> test_case() [br] 15 | ## -> test_after() [br] 16 | @warning_ignore("redundant_await") 17 | func _execute(context :GdUnitExecutionContext) -> void: 18 | var test_case := context.test_case 19 | 20 | context.error_monitor_start() 21 | 22 | if test_case.is_parameterized(): 23 | await _stage_parameterized_test.execute(context) 24 | elif test_case.is_fuzzed(): 25 | await _stage_fuzzer_test.execute(context) 26 | else: 27 | await _stage_single_test.execute(context) 28 | 29 | await context.gc() 30 | await context.error_monitor_stop() 31 | 32 | # finally fire test statistics report 33 | fire_event(GdUnitEvent.new()\ 34 | .test_statistics(context.get_test_suite_path(), 35 | context.get_test_suite_name(), 36 | context.get_test_case_name(), 37 | context.get_execution_statistics())) 38 | 39 | # finally free the test instance 40 | if is_instance_valid(context.test_case): 41 | context.test_case.dispose() 42 | 43 | 44 | func set_debug_mode(debug_mode :bool = false) -> void: 45 | super.set_debug_mode(debug_mode) 46 | _stage_single_test.set_debug_mode(debug_mode) 47 | _stage_fuzzer_test.set_debug_mode(debug_mode) 48 | _stage_parameterized_test.set_debug_mode(debug_mode) 49 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/core/execution/stages/GdUnitTestSuiteAfterStage.gd: -------------------------------------------------------------------------------- 1 | ## The test suite shutdown hook implementation.[br] 2 | ## It executes the 'after()' block from the test-suite. 3 | class_name GdUnitTestSuiteAfterStage 4 | extends IGdUnitExecutionStage 5 | 6 | 7 | const GdUnitTools := preload("res://addons/gdUnit4/src/core/GdUnitTools.gd") 8 | 9 | 10 | func _execute(context :GdUnitExecutionContext) -> void: 11 | var test_suite := context.test_suite 12 | 13 | @warning_ignore("redundant_await") 14 | await test_suite.after() 15 | # unreference last used assert form the test to prevent memory leaks 16 | GdUnitThreadManager.get_current_context().set_assert(null) 17 | await context.gc() 18 | var reports := context.build_reports(false) 19 | fire_event(GdUnitEvent.new()\ 20 | .suite_after(context.get_test_suite_path(),\ 21 | test_suite.get_name(), 22 | context.get_execution_statistics(), 23 | reports)) 24 | 25 | GdUnitFileAccess.clear_tmp() 26 | # Guard that checks if all doubled (spy/mock) objects are released 27 | GdUnitClassDoubler.check_leaked_instances() 28 | # we hide the scene/main window after runner is finished 29 | DisplayServer.window_set_mode(DisplayServer.WINDOW_MODE_MINIMIZED) 30 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/core/execution/stages/GdUnitTestSuiteBeforeStage.gd: -------------------------------------------------------------------------------- 1 | ## The test suite startup hook implementation.[br] 2 | ## It executes the 'before()' block from the test-suite. 3 | class_name GdUnitTestSuiteBeforeStage 4 | extends IGdUnitExecutionStage 5 | 6 | 7 | func _execute(context :GdUnitExecutionContext) -> void: 8 | var test_suite := context.test_suite 9 | 10 | fire_event(GdUnitEvent.new()\ 11 | .suite_before(context.get_test_suite_path(), test_suite.get_name(), test_suite.get_child_count())) 12 | 13 | @warning_ignore("redundant_await") 14 | await test_suite.before() 15 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/core/execution/stages/IGdUnitExecutionStage.gd: -------------------------------------------------------------------------------- 1 | ## The interface of execution stage.[br] 2 | ## An execution stage is defined as an encapsulated task that can execute 1-n substages covered by its own execution context.[br] 3 | ## Execution stage are always called synchronously. 4 | class_name IGdUnitExecutionStage 5 | extends RefCounted 6 | 7 | var _debug_mode := false 8 | 9 | 10 | ## Executes synchronized the implemented stage in its own execution context.[br] 11 | ## example:[br] 12 | ## [codeblock] 13 | ## # waits for 100ms 14 | ## await MyExecutionStage.new().execute() 15 | ## [/codeblock][br] 16 | func execute(context :GdUnitExecutionContext) -> void: 17 | GdUnitThreadManager.get_current_context().set_execution_context(context) 18 | @warning_ignore("redundant_await") 19 | await _execute(context) 20 | 21 | 22 | ## Sends the event to registered listeners 23 | func fire_event(event :GdUnitEvent) -> void: 24 | if _debug_mode: 25 | GdUnitSignals.instance().gdunit_event_debug.emit(event) 26 | else: 27 | GdUnitSignals.instance().gdunit_event.emit(event) 28 | 29 | 30 | ## Internal testing stuff.[br] 31 | ## Sets the executor into debug mode to emit `GdUnitEvent` via signal `gdunit_event_debug` 32 | func set_debug_mode(debug_mode :bool) -> void: 33 | _debug_mode = debug_mode 34 | 35 | 36 | ## The execution phase to be carried out. 37 | func _execute(_context :GdUnitExecutionContext) -> void: 38 | @warning_ignore("assert_always_false") 39 | assert(false, "The execution stage is not implemented") 40 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/core/execution/stages/fuzzed/GdUnitTestCaseFuzzedExecutionStage.gd: -------------------------------------------------------------------------------- 1 | ## The test case execution stage.[br] 2 | class_name GdUnitTestCaseFuzzedExecutionStage 3 | extends IGdUnitExecutionStage 4 | 5 | var _stage_before :IGdUnitExecutionStage = GdUnitTestCaseBeforeStage.new(false) 6 | var _stage_after :IGdUnitExecutionStage = GdUnitTestCaseAfterStage.new(false) 7 | var _stage_test :IGdUnitExecutionStage = GdUnitTestCaseFuzzedTestStage.new() 8 | 9 | 10 | func _execute(context :GdUnitExecutionContext) -> void: 11 | while context.retry_execution(): 12 | var test_context := GdUnitExecutionContext.of(context) 13 | await _stage_before.execute(test_context) 14 | if not context.test_case.is_skipped(): 15 | await _stage_test.execute(GdUnitExecutionContext.of(test_context)) 16 | await _stage_after.execute(test_context) 17 | if test_context.is_success() or test_context.is_skipped() or test_context.is_interupted(): 18 | break 19 | @warning_ignore("return_value_discarded") 20 | context.evaluate_test_retry_status() 21 | 22 | 23 | func set_debug_mode(debug_mode :bool = false) -> void: 24 | super.set_debug_mode(debug_mode) 25 | _stage_before.set_debug_mode(debug_mode) 26 | _stage_after.set_debug_mode(debug_mode) 27 | _stage_test.set_debug_mode(debug_mode) 28 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/core/execution/stages/parameterized/GdUnitTestCaseParameterSetTestStage.gd: -------------------------------------------------------------------------------- 1 | class_name GdUnitTestCaseParameterSetTestStage 2 | extends IGdUnitExecutionStage 3 | 4 | 5 | ## Executes a parameterized test case 'test_()' by given parameters.[br] 6 | ## It executes synchronized following stages[br] 7 | ## -> test_case() [br] 8 | func _execute(context: GdUnitExecutionContext) -> void: 9 | await context.test_case.execute_paramaterized(context._test_case_parameter_set) 10 | await context.gc() 11 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/core/execution/stages/parameterized/GdUnitTestCaseParameterizedExecutionStage.gd: -------------------------------------------------------------------------------- 1 | ## The test case execution stage.[br] 2 | class_name GdUnitTestCaseParameterizedExecutionStage 3 | extends IGdUnitExecutionStage 4 | 5 | 6 | var _stage_before :IGdUnitExecutionStage = GdUnitTestCaseBeforeStage.new(false) 7 | var _stage_after :IGdUnitExecutionStage = GdUnitTestCaseAfterStage.new(false) 8 | var _stage_test :IGdUnitExecutionStage = GdUnitTestCaseParamaterizedTestStage.new() 9 | 10 | 11 | func _execute(context :GdUnitExecutionContext) -> void: 12 | await _stage_before.execute(context) 13 | if not context.test_case.is_skipped(): 14 | await _stage_test.execute(GdUnitExecutionContext.of(context)) 15 | await _stage_after.execute(context) 16 | 17 | 18 | func set_debug_mode(debug_mode :bool = false) -> void: 19 | super.set_debug_mode(debug_mode) 20 | _stage_before.set_debug_mode(debug_mode) 21 | _stage_after.set_debug_mode(debug_mode) 22 | _stage_test.set_debug_mode(debug_mode) 23 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/core/execution/stages/single/GdUnitTestCaseSingleExecutionStage.gd: -------------------------------------------------------------------------------- 1 | ## The test case execution stage.[br] 2 | class_name GdUnitTestCaseSingleExecutionStage 3 | extends IGdUnitExecutionStage 4 | 5 | 6 | var _stage_before :IGdUnitExecutionStage = GdUnitTestCaseBeforeStage.new() 7 | var _stage_after :IGdUnitExecutionStage = GdUnitTestCaseAfterStage.new() 8 | var _stage_test :IGdUnitExecutionStage = GdUnitTestCaseSingleTestStage.new() 9 | 10 | 11 | func _execute(context :GdUnitExecutionContext) -> void: 12 | while context.retry_execution(): 13 | var test_context := GdUnitExecutionContext.of(context) 14 | await _stage_before.execute(test_context) 15 | if not test_context.is_skipped(): 16 | await _stage_test.execute(GdUnitExecutionContext.of(test_context)) 17 | await _stage_after.execute(test_context) 18 | if test_context.is_success() or test_context.is_skipped() or test_context.is_interupted(): 19 | break 20 | @warning_ignore("return_value_discarded") 21 | context.evaluate_test_retry_status() 22 | 23 | 24 | func set_debug_mode(debug_mode :bool = false) -> void: 25 | super.set_debug_mode(debug_mode) 26 | _stage_before.set_debug_mode(debug_mode) 27 | _stage_after.set_debug_mode(debug_mode) 28 | _stage_test.set_debug_mode(debug_mode) 29 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/core/execution/stages/single/GdUnitTestCaseSingleTestStage.gd: -------------------------------------------------------------------------------- 1 | ## The single test case execution stage.[br] 2 | class_name GdUnitTestCaseSingleTestStage 3 | extends IGdUnitExecutionStage 4 | 5 | 6 | ## Executes a single test case 'test_()'.[br] 7 | ## It executes synchronized following stages[br] 8 | ## -> test_case() [br] 9 | func _execute(context :GdUnitExecutionContext) -> void: 10 | await context.test_case.execute() 11 | await context.gc() 12 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/core/parse/GdClassDescriptor.gd: -------------------------------------------------------------------------------- 1 | class_name GdClassDescriptor 2 | extends RefCounted 3 | 4 | 5 | var _name :String 6 | var _is_inner_class :bool 7 | var _functions :Array[GdFunctionDescriptor] 8 | 9 | 10 | func _init(p_name :String, p_is_inner_class :bool, p_functions :Array[GdFunctionDescriptor]) -> void: 11 | _name = p_name 12 | _is_inner_class = p_is_inner_class 13 | _functions = p_functions 14 | 15 | 16 | func name() -> String: 17 | return _name 18 | 19 | 20 | func is_inner_class() -> bool: 21 | return _is_inner_class 22 | 23 | 24 | func functions() -> Array[GdFunctionDescriptor]: 25 | return _functions 26 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/core/report/GdUnitReport.gd: -------------------------------------------------------------------------------- 1 | class_name GdUnitReport 2 | extends Resource 3 | 4 | # report type 5 | enum { 6 | SUCCESS, 7 | WARN, 8 | FAILURE, 9 | ORPHAN, 10 | TERMINATED, 11 | INTERUPTED, 12 | ABORT, 13 | SKIPPED, 14 | } 15 | 16 | var _type :int 17 | var _line_number :int 18 | var _message :String 19 | 20 | 21 | func create(p_type :int, p_line_number :int, p_message :String) -> GdUnitReport: 22 | _type = p_type 23 | _line_number = p_line_number 24 | _message = p_message 25 | return self 26 | 27 | 28 | func type() -> int: 29 | return _type 30 | 31 | 32 | func line_number() -> int: 33 | return _line_number 34 | 35 | 36 | func message() -> String: 37 | return _message 38 | 39 | 40 | func is_skipped() -> bool: 41 | return _type == SKIPPED 42 | 43 | 44 | func is_warning() -> bool: 45 | return _type == WARN 46 | 47 | 48 | func is_failure() -> bool: 49 | return _type == FAILURE 50 | 51 | 52 | func is_error() -> bool: 53 | return _type == TERMINATED or _type == INTERUPTED or _type == ABORT 54 | 55 | 56 | func _to_string() -> String: 57 | if _line_number == -1: 58 | return "[color=green]line [/color][color=aqua]:[/color] %s" % [_message] 59 | return "[color=green]line [/color][color=aqua]%d:[/color] %s" % [_line_number, _message] 60 | 61 | 62 | func serialize() -> Dictionary: 63 | return { 64 | "type" :_type, 65 | "line_number" :_line_number, 66 | "message" :_message 67 | } 68 | 69 | 70 | func deserialize(serialized :Dictionary) -> GdUnitReport: 71 | _type = serialized["type"] 72 | _line_number = serialized["line_number"] 73 | _message = serialized["message"] 74 | return self 75 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/core/templates/test_suite/GdUnitTestSuiteDefaultTemplate.gd: -------------------------------------------------------------------------------- 1 | class_name GdUnitTestSuiteDefaultTemplate 2 | extends RefCounted 3 | 4 | 5 | const DEFAULT_TEMP_TS_GD =""" 6 | # GdUnit generated TestSuite 7 | class_name ${suite_class_name} 8 | extends GdUnitTestSuite 9 | @warning_ignore('unused_parameter') 10 | @warning_ignore('return_value_discarded') 11 | 12 | # TestSuite generated from 13 | const __source = '${source_resource_path}' 14 | """ 15 | 16 | 17 | const DEFAULT_TEMP_TS_CS = """ 18 | // GdUnit generated TestSuite 19 | 20 | using Godot; 21 | using GdUnit3; 22 | 23 | namespace ${name_space} 24 | { 25 | using static Assertions; 26 | using static Utils; 27 | 28 | [TestSuite] 29 | public class ${suite_class_name} 30 | { 31 | // TestSuite generated from 32 | private const string sourceClazzPath = "${source_resource_path}"; 33 | 34 | } 35 | } 36 | """ 37 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/core/thread/GdUnitThreadContext.gd: -------------------------------------------------------------------------------- 1 | class_name GdUnitThreadContext 2 | extends RefCounted 3 | 4 | var _thread :Thread 5 | var _thread_name :String 6 | var _thread_id :int 7 | var _assert :GdUnitAssert 8 | var _signal_collector :GdUnitSignalCollector 9 | var _execution_context :GdUnitExecutionContext 10 | 11 | 12 | func _init(thread :Thread = null) -> void: 13 | if thread != null: 14 | _thread = thread 15 | _thread_name = thread.get_meta("name") 16 | _thread_id = thread.get_id() as int 17 | else: 18 | _thread_name = "main" 19 | _thread_id = OS.get_main_thread_id() 20 | _signal_collector = GdUnitSignalCollector.new() 21 | 22 | 23 | func dispose() -> void: 24 | _assert = null 25 | if is_instance_valid(_signal_collector): 26 | _signal_collector.clear() 27 | _signal_collector = null 28 | _execution_context = null 29 | _thread = null 30 | 31 | 32 | func set_assert(value :GdUnitAssert) -> void: 33 | _assert = value 34 | 35 | 36 | func get_assert() -> GdUnitAssert: 37 | return _assert 38 | 39 | 40 | func set_execution_context(context :GdUnitExecutionContext) -> void: 41 | _execution_context = context 42 | 43 | 44 | func get_execution_context() -> GdUnitExecutionContext: 45 | return _execution_context 46 | 47 | 48 | func get_execution_context_id() -> int: 49 | return _execution_context.get_instance_id() 50 | 51 | 52 | func get_signal_collector() -> GdUnitSignalCollector: 53 | return _signal_collector 54 | 55 | 56 | func thread_id() -> int: 57 | return _thread_id 58 | 59 | 60 | func _to_string() -> String: 61 | return "ThreadContext <%s>: %s " % [_thread_name, _thread_id] 62 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/fuzzers/FloatFuzzer.gd: -------------------------------------------------------------------------------- 1 | class_name FloatFuzzer 2 | extends Fuzzer 3 | 4 | var _from: float = 0 5 | var _to: float = 0 6 | 7 | func _init(from: float, to: float) -> void: 8 | assert(from <= to, "Invalid range!") 9 | _from = from 10 | _to = to 11 | 12 | func next_value() -> float: 13 | return randf_range(_from, _to) 14 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/fuzzers/Fuzzer.gd: -------------------------------------------------------------------------------- 1 | # Base interface for fuzz testing 2 | # https://en.wikipedia.org/wiki/Fuzzing 3 | class_name Fuzzer 4 | extends RefCounted 5 | # To run a test with a specific fuzzer you have to add defailt argument checked your test case 6 | # all arguments are optional [] 7 | # syntax: 8 | # func test_foo([fuzzer = ], [fuzzer_iterations=], [fuzzer_seed=]) 9 | # example: 10 | # # runs the test 'test_foo' 10 times with a random int value generated by the IntFuzzer 11 | # func test_foo(fuzzer = Fuzzers.randomInt(), fuzzer_iterations=10) 12 | # 13 | # # runs the test 'test_foo2' 1000 times as default with a random seed='101010101' 14 | # func test_foo2(fuzzer = Fuzzers.randomInt(), fuzzer_seed=101010101) 15 | 16 | const ITERATION_DEFAULT_COUNT = 1000 17 | const ARGUMENT_FUZZER_INSTANCE := "fuzzer" 18 | const ARGUMENT_ITERATIONS := "fuzzer_iterations" 19 | const ARGUMENT_SEED := "fuzzer_seed" 20 | 21 | var _iteration_index :int = 0 22 | var _iteration_limit :int = ITERATION_DEFAULT_COUNT 23 | 24 | 25 | # generates the next fuzz value 26 | # needs to be implement 27 | func next_value() -> Variant: 28 | push_error("Invalid vall. Fuzzer not implemented 'next_value()'") 29 | return null 30 | 31 | 32 | # returns the current iteration index 33 | func iteration_index() -> int: 34 | return _iteration_index 35 | 36 | 37 | # returns the amount of iterations where the fuzzer will be run 38 | func iteration_limit() -> int: 39 | return _iteration_limit 40 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/fuzzers/IntFuzzer.gd: -------------------------------------------------------------------------------- 1 | class_name IntFuzzer 2 | extends Fuzzer 3 | 4 | enum { 5 | NORMAL, 6 | EVEN, 7 | ODD 8 | } 9 | 10 | var _from :int = 0 11 | var _to : int = 0 12 | var _mode : int = NORMAL 13 | 14 | 15 | func _init(from: int, to: int, mode :int = NORMAL) -> void: 16 | assert(from <= to, "Invalid range!") 17 | _from = from 18 | _to = to 19 | _mode = mode 20 | 21 | 22 | func next_value() -> int: 23 | var value := randi_range(_from, _to) 24 | match _mode: 25 | NORMAL: 26 | return value 27 | EVEN: 28 | return int((value / 2.0) * 2) 29 | ODD: 30 | return int((value / 2.0) * 2 + 1) 31 | _: 32 | return value 33 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/fuzzers/Vector2Fuzzer.gd: -------------------------------------------------------------------------------- 1 | class_name Vector2Fuzzer 2 | extends Fuzzer 3 | 4 | 5 | var _from :Vector2 6 | var _to : Vector2 7 | 8 | 9 | func _init(from: Vector2, to: Vector2) -> void: 10 | assert(from <= to, "Invalid range!") 11 | _from = from 12 | _to = to 13 | 14 | 15 | func next_value() -> Vector2: 16 | var x := randf_range(_from.x, _to.x) 17 | var y := randf_range(_from.y, _to.y) 18 | return Vector2(x, y) 19 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/fuzzers/Vector3Fuzzer.gd: -------------------------------------------------------------------------------- 1 | class_name Vector3Fuzzer 2 | extends Fuzzer 3 | 4 | 5 | var _from :Vector3 6 | var _to : Vector3 7 | 8 | 9 | func _init(from: Vector3, to: Vector3) -> void: 10 | assert(from <= to, "Invalid range!") 11 | _from = from 12 | _to = to 13 | 14 | 15 | func next_value() -> Vector3: 16 | var x := randf_range(_from.x, _to.x) 17 | var y := randf_range(_from.y, _to.y) 18 | var z := randf_range(_from.z, _to.z) 19 | return Vector3(x, y, z) 20 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/matchers/AnyArgumentMatcher.gd: -------------------------------------------------------------------------------- 1 | class_name AnyArgumentMatcher 2 | extends GdUnitArgumentMatcher 3 | 4 | 5 | @warning_ignore("unused_parameter") 6 | func is_match(value :Variant) -> bool: 7 | return true 8 | 9 | 10 | func _to_string() -> String: 11 | return "any()" 12 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/matchers/AnyBuildInTypeArgumentMatcher.gd: -------------------------------------------------------------------------------- 1 | class_name AnyBuildInTypeArgumentMatcher 2 | extends GdUnitArgumentMatcher 3 | 4 | var _type : PackedInt32Array = [] 5 | 6 | 7 | func _init(type :PackedInt32Array) -> void: 8 | _type = type 9 | 10 | 11 | func is_match(value :Variant) -> bool: 12 | return _type.has(typeof(value)) 13 | 14 | 15 | func _to_string() -> String: 16 | match _type[0]: 17 | TYPE_BOOL: return "any_bool()" 18 | TYPE_STRING, TYPE_STRING_NAME: return "any_string()" 19 | TYPE_INT: return "any_int()" 20 | TYPE_FLOAT: return "any_float()" 21 | TYPE_COLOR: return "any_color()" 22 | TYPE_VECTOR2: return "any_vector2()" if _type.size() == 1 else "any_vector()" 23 | TYPE_VECTOR2I: return "any_vector2i()" 24 | TYPE_VECTOR3: return "any_vector3()" 25 | TYPE_VECTOR3I: return "any_vector3i()" 26 | TYPE_VECTOR4: return "any_vector4()" 27 | TYPE_VECTOR4I: return "any_vector4i()" 28 | TYPE_RECT2: return "any_rect2()" 29 | TYPE_RECT2I: return "any_rect2i()" 30 | TYPE_PLANE: return "any_plane()" 31 | TYPE_QUATERNION: return "any_quat()" 32 | TYPE_AABB: return "any_aabb()" 33 | TYPE_BASIS: return "any_basis()" 34 | TYPE_TRANSFORM2D: return "any_transform_2d()" 35 | TYPE_TRANSFORM3D: return "any_transform_3d()" 36 | TYPE_NODE_PATH: return "any_node_path()" 37 | TYPE_RID: return "any_rid()" 38 | TYPE_OBJECT: return "any_object()" 39 | TYPE_DICTIONARY: return "any_dictionary()" 40 | TYPE_ARRAY: return "any_array()" 41 | TYPE_PACKED_BYTE_ARRAY: return "any_packed_byte_array()" 42 | TYPE_PACKED_INT32_ARRAY: return "any_packed_int32_array()" 43 | TYPE_PACKED_INT64_ARRAY: return "any_packed_int64_array()" 44 | TYPE_PACKED_FLOAT32_ARRAY: return "any_packed_float32_array()" 45 | TYPE_PACKED_FLOAT64_ARRAY: return "any_packed_float64_array()" 46 | TYPE_PACKED_STRING_ARRAY: return "any_packed_string_array()" 47 | TYPE_PACKED_VECTOR2_ARRAY: return "any_packed_vector2_array()" 48 | TYPE_PACKED_VECTOR3_ARRAY: return "any_packed_vector3_array()" 49 | TYPE_PACKED_COLOR_ARRAY: return "any_packed_color_array()" 50 | _: return "any()" 51 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/matchers/AnyClazzArgumentMatcher.gd: -------------------------------------------------------------------------------- 1 | class_name AnyClazzArgumentMatcher 2 | extends GdUnitArgumentMatcher 3 | 4 | var _clazz :Object 5 | 6 | 7 | func _init(clazz :Object) -> void: 8 | _clazz = clazz 9 | 10 | 11 | func is_match(value :Variant) -> bool: 12 | if typeof(value) != TYPE_OBJECT: 13 | return false 14 | if is_instance_valid(value) and GdObjects.is_script(_clazz): 15 | @warning_ignore("unsafe_cast") 16 | return (value as Object).get_script() == _clazz 17 | return is_instance_of(value, _clazz) 18 | 19 | 20 | func _to_string() -> String: 21 | if (_clazz as Object).is_class("GDScriptNativeClass"): 22 | @warning_ignore("unsafe_method_access") 23 | var instance :Object = _clazz.new() 24 | var clazz_name := instance.get_class() 25 | if not instance is RefCounted: 26 | instance.free() 27 | return "any_class(<"+clazz_name+">)"; 28 | if _clazz is GDScript: 29 | var result := GdObjects.extract_class_name(_clazz) 30 | if result.is_success(): 31 | return "any_class(<"+ result.value() + ">)" 32 | return "any_class()" 33 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/matchers/ChainedArgumentMatcher.gd: -------------------------------------------------------------------------------- 1 | class_name ChainedArgumentMatcher 2 | extends GdUnitArgumentMatcher 3 | 4 | var _matchers :Array 5 | 6 | 7 | func _init(matchers :Array) -> void: 8 | _matchers = matchers 9 | 10 | 11 | func is_match(arguments :Variant) -> bool: 12 | var arg_array: Array = arguments 13 | if arg_array == null or arg_array.size() != _matchers.size(): 14 | return false 15 | 16 | for index in arg_array.size(): 17 | var arg: Variant = arg_array[index] 18 | var matcher: GdUnitArgumentMatcher = _matchers[index] 19 | 20 | if not matcher.is_match(arg): 21 | return false 22 | return true 23 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/matchers/EqualsArgumentMatcher.gd: -------------------------------------------------------------------------------- 1 | class_name EqualsArgumentMatcher 2 | extends GdUnitArgumentMatcher 3 | 4 | var _current :Variant 5 | var _auto_deep_check_mode :bool 6 | 7 | 8 | func _init(current :Variant, auto_deep_check_mode := false) -> void: 9 | _current = current 10 | _auto_deep_check_mode = auto_deep_check_mode 11 | 12 | 13 | func is_match(value :Variant) -> bool: 14 | var case_sensitive_check := true 15 | return GdObjects.equals(_current, value, case_sensitive_check, compare_mode(value)) 16 | 17 | 18 | func compare_mode(value :Variant) -> GdObjects.COMPARE_MODE: 19 | if _auto_deep_check_mode and is_instance_valid(value): 20 | # we do deep check on all InputEvent's 21 | return GdObjects.COMPARE_MODE.PARAMETER_DEEP_TEST if value is InputEvent else GdObjects.COMPARE_MODE.OBJECT_REFERENCE 22 | return GdObjects.COMPARE_MODE.OBJECT_REFERENCE 23 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/matchers/GdUnitArgumentMatcher.gd: -------------------------------------------------------------------------------- 1 | ## The base class of all argument matchers 2 | class_name GdUnitArgumentMatcher 3 | extends RefCounted 4 | 5 | 6 | @warning_ignore("unused_parameter") 7 | func is_match(value :Variant) -> bool: 8 | return true 9 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/matchers/GdUnitArgumentMatchers.gd: -------------------------------------------------------------------------------- 1 | class_name GdUnitArgumentMatchers 2 | extends RefCounted 3 | 4 | const TYPE_ANY = TYPE_MAX + 100 5 | 6 | 7 | static func to_matcher(arguments :Array[Variant], auto_deep_check_mode := false) -> ChainedArgumentMatcher: 8 | var matchers :Array[Variant] = [] 9 | for arg :Variant in arguments: 10 | # argument is already a matcher 11 | if arg is GdUnitArgumentMatcher: 12 | matchers.append(arg) 13 | else: 14 | # pass argument into equals matcher 15 | matchers.append(EqualsArgumentMatcher.new(arg, auto_deep_check_mode)) 16 | return ChainedArgumentMatcher.new(matchers) 17 | 18 | 19 | static func any() -> GdUnitArgumentMatcher: 20 | return AnyArgumentMatcher.new() 21 | 22 | 23 | static func by_type(type :int) -> GdUnitArgumentMatcher: 24 | return AnyBuildInTypeArgumentMatcher.new([type]) 25 | 26 | 27 | static func by_types(types :PackedInt32Array) -> GdUnitArgumentMatcher: 28 | return AnyBuildInTypeArgumentMatcher.new(types) 29 | 30 | 31 | static func any_class(clazz :Object) -> GdUnitArgumentMatcher: 32 | return AnyClazzArgumentMatcher.new(clazz) 33 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/mocking/GdUnitMock.gd: -------------------------------------------------------------------------------- 1 | class_name GdUnitMock 2 | extends RefCounted 3 | 4 | ## do call the real implementation 5 | const CALL_REAL_FUNC = "CALL_REAL_FUNC" 6 | ## do return a default value for primitive types or null 7 | const RETURN_DEFAULTS = "RETURN_DEFAULTS" 8 | ## do return a default value for primitive types and a fully mocked value for Object types 9 | ## builds full deep mocked object 10 | const RETURN_DEEP_STUB = "RETURN_DEEP_STUB" 11 | 12 | var _value: Variant 13 | 14 | 15 | func _init(value: Variant) -> void: 16 | _value = value 17 | 18 | 19 | ## Selects the mock to work on, used in combination with [method GdUnitTestSuite.do_return][br] 20 | ## Example: 21 | ## [codeblock] 22 | ## do_return(false).on(myMock).is_selected() 23 | ## [/codeblock] 24 | func on(obj: Variant) -> Variant: 25 | if not GdUnitMock._is_mock_or_spy(obj, "__do_return"): 26 | return obj 27 | @warning_ignore("unsafe_method_access") 28 | return obj.__do_return(_value) 29 | 30 | 31 | ## [color=yellow]`checked` is obsolete, use `on` instead [/color] 32 | func checked(obj :Object) -> Object: 33 | push_warning("Using a deprecated function 'checked' use `on` instead") 34 | return on(obj) 35 | 36 | 37 | static func _is_mock_or_spy(obj: Variant, func_sig: String) -> bool: 38 | if obj is Object and not as_object(obj).has_method(func_sig): 39 | push_error("Error: You try to use a non mock or spy!") 40 | return false 41 | return true 42 | 43 | 44 | static func as_object(value: Variant) -> Object: 45 | return value 46 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/monitor/GdUnitMonitor.gd: -------------------------------------------------------------------------------- 1 | # GdUnit Monitoring Base Class 2 | class_name GdUnitMonitor 3 | extends RefCounted 4 | 5 | var _id :String 6 | 7 | # constructs new Monitor with given id 8 | func _init(p_id :String) -> void: 9 | _id = p_id 10 | 11 | 12 | # Returns the id of the monitor to uniqe identify 13 | func id() -> String: 14 | return _id 15 | 16 | 17 | # starts monitoring 18 | func start() -> void: 19 | pass 20 | 21 | 22 | # stops monitoring 23 | func stop() -> void: 24 | pass 25 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/monitor/GdUnitOrphanNodesMonitor.gd: -------------------------------------------------------------------------------- 1 | class_name GdUnitOrphanNodesMonitor 2 | extends GdUnitMonitor 3 | 4 | var _initial_count := 0 5 | var _orphan_count := 0 6 | var _orphan_detection_enabled :bool 7 | 8 | 9 | func _init(name :String = "") -> void: 10 | super("OrphanNodesMonitor:" + name) 11 | _orphan_detection_enabled = GdUnitSettings.is_verbose_orphans() 12 | 13 | 14 | func start() -> void: 15 | _initial_count = _orphans() 16 | 17 | 18 | func stop() -> void: 19 | _orphan_count = max(0, _orphans() - _initial_count) 20 | 21 | 22 | func _orphans() -> int: 23 | return Performance.get_monitor(Performance.OBJECT_ORPHAN_NODE_COUNT) as int 24 | 25 | 26 | func orphan_nodes() -> int: 27 | return _orphan_count if _orphan_detection_enabled else 0 28 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/mono/GdUnit4CSharpApi.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Reflection; 3 | using System.Linq; 4 | 5 | using Godot; 6 | using Godot.Collections; 7 | using GdUnit4; 8 | 9 | 10 | // GdUnit4 GDScript - C# API wrapper 11 | public partial class GdUnit4CSharpApi : Godot.GodotObject 12 | { 13 | private static Type? apiType; 14 | 15 | private static Type GetApiType() 16 | { 17 | if (apiType == null) 18 | { 19 | var assembly = Assembly.Load("gdUnit4Api"); 20 | apiType = GdUnit4NetVersion() < new Version(4, 2, 2) ? 21 | assembly.GetType("GdUnit4.GdUnit4MonoAPI") : 22 | assembly.GetType("GdUnit4.GdUnit4NetAPI"); 23 | Godot.GD.PrintS($"GdUnit4CSharpApi type:{apiType} loaded."); 24 | } 25 | return apiType!; 26 | } 27 | 28 | private static Version GdUnit4NetVersion() 29 | { 30 | var assembly = Assembly.Load("gdUnit4Api"); 31 | return assembly.GetName().Version!; 32 | } 33 | 34 | private static T InvokeApiMethod(string methodName, params object[] args) 35 | { 36 | var method = GetApiType().GetMethod(methodName)!; 37 | return (T)method.Invoke(null, args)!; 38 | } 39 | 40 | public static string Version() => GdUnit4NetVersion().ToString(); 41 | 42 | public static bool IsTestSuite(string classPath) => InvokeApiMethod("IsTestSuite", classPath); 43 | 44 | public static RefCounted Executor(Node listener) => InvokeApiMethod("Executor", listener); 45 | 46 | public static CsNode? ParseTestSuite(string classPath) => InvokeApiMethod("ParseTestSuite", classPath); 47 | 48 | public static Dictionary CreateTestSuite(string sourcePath, int lineNumber, string testSuitePath) => 49 | InvokeApiMethod("CreateTestSuite", sourcePath, lineNumber, testSuitePath); 50 | } 51 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/network/GdUnitServer.gd: -------------------------------------------------------------------------------- 1 | @tool 2 | extends Node 3 | 4 | @onready var _server :GdUnitTcpServer = $TcpServer 5 | 6 | 7 | @warning_ignore("return_value_discarded") 8 | func _ready() -> void: 9 | var result := _server.start() 10 | if result.is_error(): 11 | push_error(result.error_message()) 12 | return 13 | var server_port :int = result.value() 14 | Engine.set_meta("gdunit_server_port", server_port) 15 | _server.client_connected.connect(_on_client_connected) 16 | _server.client_disconnected.connect(_on_client_disconnected) 17 | _server.rpc_data.connect(_receive_rpc_data) 18 | GdUnitCommandHandler.instance().gdunit_runner_stop.connect(_on_gdunit_runner_stop) 19 | 20 | 21 | func _on_client_connected(client_id: int) -> void: 22 | GdUnitSignals.instance().gdunit_client_connected.emit(client_id) 23 | 24 | 25 | func _on_client_disconnected(client_id: int) -> void: 26 | GdUnitSignals.instance().gdunit_client_disconnected.emit(client_id) 27 | 28 | 29 | func _on_gdunit_runner_stop(client_id: int) -> void: 30 | if _server: 31 | _server.disconnect_client(client_id) 32 | 33 | 34 | func _receive_rpc_data(p_rpc: Variant) -> void: 35 | if p_rpc is RPCMessage: 36 | GdUnitSignals.instance().gdunit_message.emit(p_rpc.message()) 37 | return 38 | if p_rpc is RPCGdUnitEvent: 39 | GdUnitSignals.instance().gdunit_event.emit(p_rpc.event()) 40 | return 41 | if p_rpc is RPCGdUnitTestSuite: 42 | GdUnitSignals.instance().gdunit_add_test_suite.emit(p_rpc.dto()) 43 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/network/GdUnitServer.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=3 format=3 uid="uid://cn5mp3tmi2gb1"] 2 | 3 | [ext_resource type="Script" path="res://addons/gdUnit4/src/network/GdUnitServer.gd" id="1"] 4 | [ext_resource type="Script" path="res://addons/gdUnit4/src/network/GdUnitTcpServer.gd" id="2"] 5 | 6 | [node name="Control" type="Node"] 7 | script = ExtResource("1") 8 | 9 | [node name="TcpServer" type="Node" parent="."] 10 | script = ExtResource("2") 11 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/network/GdUnitServerConstants.gd: -------------------------------------------------------------------------------- 1 | class_name GdUnitServerConstants 2 | extends RefCounted 3 | 4 | const DEFAULT_SERVER_START_RETRY_TIMES :int = 5 5 | const GD_TEST_SERVER_PORT :int = 31002 6 | const JSON_RESPONSE_DELIMITER :String = "<>" 7 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/network/GdUnitTask.gd: -------------------------------------------------------------------------------- 1 | class_name GdUnitTask 2 | extends RefCounted 3 | 4 | const TASK_NAME = "task_name" 5 | const TASK_ARGS = "task_args" 6 | 7 | var _task_name :String 8 | var _fref :Callable 9 | 10 | 11 | func _init(task_name :String,instance :Object,func_name :String) -> void: 12 | _task_name = task_name 13 | if not instance.has_method(func_name): 14 | push_error("Can't create GdUnitTask, Invalid func name '%s' for instance '%s'" % [instance, func_name]) 15 | _fref = Callable(instance, func_name) 16 | 17 | 18 | func name() -> String: 19 | return _task_name 20 | 21 | 22 | func execute(args :Array) -> GdUnitResult: 23 | if args.is_empty(): 24 | return _fref.call() 25 | return _fref.callv(args) 26 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/network/rpc/RPC.gd: -------------------------------------------------------------------------------- 1 | class_name RPC 2 | extends RefCounted 3 | 4 | 5 | func serialize() -> String: 6 | return JSON.stringify(inst_to_dict(self)) 7 | 8 | 9 | # using untyped version see comments below 10 | static func deserialize(json_value :String) -> Object: 11 | var json := JSON.new() 12 | var err := json.parse(json_value) 13 | if err != OK: 14 | push_error("Can't deserialize JSON, error at line %d: %s \n json: '%s'" % [json.get_error_line(), json.get_error_message(), json_value]) 15 | return null 16 | var result :Dictionary = json.get_data() 17 | if not typeof(result) == TYPE_DICTIONARY: 18 | push_error("Can't deserialize JSON, error at line %d: %s \n json: '%s'" % [result.error_line, result.error_string, json_value]) 19 | return null 20 | return dict_to_inst(result) 21 | 22 | # this results in orpan node, for more details https://github.com/godotengine/godot/issues/50069 23 | #func deserialize2(data :Dictionary) -> RPC: 24 | # return dict_to_inst(data) as RPC 25 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/network/rpc/RPCClientConnect.gd: -------------------------------------------------------------------------------- 1 | class_name RPCClientConnect 2 | extends RPC 3 | 4 | var _client_id :int 5 | 6 | 7 | func with_id(p_client_id :int) -> RPCClientConnect: 8 | _client_id = p_client_id 9 | return self 10 | 11 | 12 | func client_id() -> int: 13 | return _client_id 14 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/network/rpc/RPCClientDisconnect.gd: -------------------------------------------------------------------------------- 1 | class_name RPCClientDisconnect 2 | extends RPC 3 | 4 | var _client_id :int 5 | 6 | 7 | func with_id(p_client_id :int) -> RPCClientDisconnect: 8 | _client_id = p_client_id 9 | return self 10 | 11 | 12 | func client_id() -> int: 13 | return _client_id 14 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/network/rpc/RPCGdUnitEvent.gd: -------------------------------------------------------------------------------- 1 | class_name RPCGdUnitEvent 2 | extends RPC 3 | 4 | var _event :Dictionary 5 | 6 | 7 | static func of(p_event :GdUnitEvent) -> RPCGdUnitEvent: 8 | var rpc := RPCGdUnitEvent.new() 9 | rpc._event = p_event.serialize() 10 | return rpc 11 | 12 | 13 | func event() -> GdUnitEvent: 14 | return GdUnitEvent.new().deserialize(_event) 15 | 16 | 17 | func _to_string() -> String: 18 | return "RPCGdUnitEvent: " + str(_event) 19 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/network/rpc/RPCGdUnitTestSuite.gd: -------------------------------------------------------------------------------- 1 | class_name RPCGdUnitTestSuite 2 | extends RPC 3 | 4 | var _data :Dictionary 5 | 6 | 7 | static func of(test_suite :Node) -> RPCGdUnitTestSuite: 8 | var rpc := RPCGdUnitTestSuite.new() 9 | rpc._data = GdUnitTestSuiteDto.new().serialize(test_suite) 10 | return rpc 11 | 12 | 13 | func dto() -> GdUnitResourceDto: 14 | return GdUnitTestSuiteDto.new().deserialize(_data) 15 | 16 | 17 | func _to_string() -> String: 18 | return "RPCGdUnitTestSuite: " + str(_data) 19 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/network/rpc/RPCMessage.gd: -------------------------------------------------------------------------------- 1 | class_name RPCMessage 2 | extends RPC 3 | 4 | var _message :String 5 | 6 | 7 | static func of(p_message :String) -> RPCMessage: 8 | var rpc := RPCMessage.new() 9 | rpc._message = p_message 10 | return rpc 11 | 12 | 13 | func message() -> String: 14 | return _message 15 | 16 | 17 | func _to_string() -> String: 18 | return "RPCMessage: " + _message 19 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/network/rpc/dtos/GdUnitResourceDto.gd: -------------------------------------------------------------------------------- 1 | class_name GdUnitResourceDto 2 | extends Resource 3 | 4 | var _name :String 5 | var _path :String 6 | 7 | 8 | func serialize(resource :Node) -> Dictionary: 9 | var serialized := Dictionary() 10 | serialized["name"] = resource.get_name() 11 | @warning_ignore("unsafe_method_access") 12 | serialized["resource_path"] = resource.ResourcePath() 13 | return serialized 14 | 15 | 16 | func deserialize(data :Dictionary) -> GdUnitResourceDto: 17 | _name = data.get("name", "n.a.") 18 | _path = data.get("resource_path", "") 19 | return self 20 | 21 | 22 | func name() -> String: 23 | return _name 24 | 25 | 26 | func path() -> String: 27 | return _path 28 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/network/rpc/dtos/GdUnitTestCaseDto.gd: -------------------------------------------------------------------------------- 1 | class_name GdUnitTestCaseDto 2 | extends GdUnitResourceDto 3 | 4 | var _line_number :int = -1 5 | var _script_path: String 6 | var _test_case_names :PackedStringArray = [] 7 | 8 | 9 | @warning_ignore("unsafe_method_access") 10 | func serialize(test_case :Node) -> Dictionary: 11 | var serialized := super.serialize(test_case) 12 | if test_case.has_method("line_number"): 13 | serialized["line_number"] = test_case.line_number() 14 | else: 15 | serialized["line_number"] = test_case.get("LineNumber") 16 | if test_case.has_method("script_path"): 17 | serialized["script_path"] = test_case.script_path() 18 | else: 19 | # TODO 'script_path' needs to be implement in c# the the 20 | # serialized["script_path"] = test_case.get("ScriptPath") 21 | serialized["script_path"] = serialized["resource_path"] 22 | if test_case.has_method("test_case_names"): 23 | serialized["test_case_names"] = test_case.test_case_names() 24 | elif test_case.has_method("TestCaseNames"): 25 | serialized["test_case_names"] = test_case.TestCaseNames() 26 | return serialized 27 | 28 | 29 | func deserialize(data :Dictionary) -> GdUnitTestCaseDto: 30 | @warning_ignore("return_value_discarded") 31 | super.deserialize(data) 32 | _line_number = data.get("line_number", -1) 33 | _script_path = data.get("script_path", data.get("resource_path", "")) 34 | _test_case_names = data.get("test_case_names", []) 35 | return self 36 | 37 | 38 | func line_number() -> int: 39 | return _line_number 40 | 41 | 42 | func script_path() -> String: 43 | return _script_path 44 | 45 | 46 | func test_case_names() -> PackedStringArray: 47 | return _test_case_names 48 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/network/rpc/dtos/GdUnitTestSuiteDto.gd: -------------------------------------------------------------------------------- 1 | class_name GdUnitTestSuiteDto 2 | extends GdUnitResourceDto 3 | 4 | 5 | # Dictionary[String, GdUnitTestCaseDto] 6 | var _test_cases_by_name := Dictionary() 7 | 8 | 9 | static func of(test_suite :Node) -> GdUnitTestSuiteDto: 10 | var dto := GdUnitTestSuiteDto.new() 11 | return dto.deserialize(dto.serialize(test_suite)) 12 | 13 | 14 | func serialize(test_suite :Node) -> Dictionary: 15 | var serialized := super.serialize(test_suite) 16 | var test_cases_ := Array() 17 | serialized["test_cases"] = test_cases_ 18 | for test_case in test_suite.get_children(): 19 | test_cases_.append(GdUnitTestCaseDto.new().serialize(test_case)) 20 | return serialized 21 | 22 | 23 | func deserialize(data :Dictionary) -> GdUnitResourceDto: 24 | @warning_ignore("return_value_discarded") 25 | super.deserialize(data) 26 | var test_cases_ :Array = data.get("test_cases", []) 27 | for test_case :Dictionary in test_cases_: 28 | add_test_case(GdUnitTestCaseDto.new().deserialize(test_case)) 29 | return self 30 | 31 | 32 | func add_test_case(test_case :GdUnitTestCaseDto) -> void: 33 | _test_cases_by_name[test_case.name()] = test_case 34 | 35 | 36 | func test_case_count() -> int: 37 | return _test_cases_by_name.size() 38 | 39 | 40 | func test_cases() -> Array[GdUnitTestCaseDto]: 41 | var test_cases_ :Array[GdUnitTestCaseDto] = [] 42 | test_cases_.append_array(_test_cases_by_name.values()) 43 | return test_cases_ 44 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/report/GdUnitTestCaseReport.gd: -------------------------------------------------------------------------------- 1 | class_name GdUnitTestCaseReport 2 | extends GdUnitReportSummary 3 | 4 | var _suite_name :String 5 | var _failure_reports :Array[GdUnitReport] 6 | 7 | 8 | @warning_ignore("shadowed_variable") 9 | func _init(p_resource_path: String, p_suite_name: String, p_test_name: String) -> void: 10 | _resource_path = p_resource_path 11 | _suite_name = p_suite_name 12 | _name = p_test_name 13 | 14 | 15 | func suite_name() -> String: 16 | return _suite_name 17 | 18 | 19 | func failure_report() -> String: 20 | var html_report := "" 21 | for report in get_test_reports(): 22 | html_report += convert_rtf_to_html(str(report)) 23 | return html_report 24 | 25 | 26 | func create_record(_report_dir :String) -> String: 27 | return GdUnitHtmlPatterns.TABLE_RECORD_TESTCASE\ 28 | .replace(GdUnitHtmlPatterns.REPORT_STATE, report_state().to_lower())\ 29 | .replace(GdUnitHtmlPatterns.REPORT_STATE_LABEL, report_state())\ 30 | .replace(GdUnitHtmlPatterns.TESTCASE_NAME, name())\ 31 | .replace(GdUnitHtmlPatterns.SKIPPED_COUNT, str(skipped_count()))\ 32 | .replace(GdUnitHtmlPatterns.ORPHAN_COUNT, str(orphan_count()))\ 33 | .replace(GdUnitHtmlPatterns.DURATION, LocalTime.elapsed(_duration))\ 34 | .replace(GdUnitHtmlPatterns.FAILURE_REPORT, failure_report()) 35 | 36 | 37 | func add_testcase_reports(reports: Array[GdUnitReport]) -> void: 38 | _failure_reports.append_array(reports) 39 | 40 | 41 | func set_testcase_counters(p_error_count: int, p_failure_count: int, p_orphan_count: int, 42 | p_is_skipped: bool, p_is_flaky: bool, p_duration: int) -> void: 43 | _error_count = p_error_count 44 | _failure_count = p_failure_count 45 | _orphan_count = p_orphan_count 46 | _skipped_count = p_is_skipped 47 | _flaky_count = p_is_flaky as int 48 | _duration = p_duration 49 | 50 | 51 | func get_test_reports() -> Array[GdUnitReport]: 52 | return _failure_reports 53 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/report/XmlElement.gd: -------------------------------------------------------------------------------- 1 | class_name XmlElement 2 | extends RefCounted 3 | 4 | var _name :String 5 | # Dictionary[String, String] 6 | var _attributes :Dictionary = {} 7 | var _childs :Array[XmlElement] = [] 8 | var _parent :XmlElement = null 9 | var _text :String = "" 10 | 11 | 12 | func _init(name :String) -> void: 13 | _name = name 14 | 15 | 16 | func dispose() -> void: 17 | for child in _childs: 18 | child.dispose() 19 | _childs.clear() 20 | _attributes.clear() 21 | _parent = null 22 | 23 | 24 | func attribute(name :String, value :Variant) -> XmlElement: 25 | _attributes[name] = str(value) 26 | return self 27 | 28 | 29 | func text(p_text :String) -> XmlElement: 30 | _text = p_text if p_text.ends_with("\n") else p_text + "\n" 31 | return self 32 | 33 | 34 | func add_child(child :XmlElement) -> XmlElement: 35 | _childs.append(child) 36 | child._parent = self 37 | return self 38 | 39 | 40 | func add_childs(childs :Array[XmlElement]) -> XmlElement: 41 | for child in childs: 42 | @warning_ignore("return_value_discarded") 43 | add_child(child) 44 | return self 45 | 46 | 47 | func indentation() -> String: 48 | return "" if _parent == null else _parent.indentation() + " " 49 | 50 | 51 | func to_xml() -> String: 52 | var attributes := "" 53 | for key in _attributes.keys() as Array[String]: 54 | attributes += ' {attr}="{value}"'.format({"attr": key, "value": _attributes.get(key)}) 55 | 56 | var childs := "" 57 | for child in _childs: 58 | childs += child.to_xml() 59 | 60 | return "{_indentation}<{name}{attributes}>\n{childs}{text}{_indentation}\n"\ 61 | .format({"name": _name, 62 | "attributes": attributes, 63 | "childs": childs, 64 | "_indentation": indentation(), 65 | "text": cdata(_text)}) 66 | 67 | 68 | func cdata(p_text :String) -> String: 69 | return "" if p_text.is_empty() else "\n".format({"text" : p_text}) 70 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/report/template/css/breadcrumb.css: -------------------------------------------------------------------------------- 1 | .breadcrumb { 2 | display: flex; 3 | border-radius: 6px; 4 | overflow: hidden; 5 | height: 45px; 6 | z-index: 1; 7 | background-color: #9d73eb; 8 | margin-top: 0px; 9 | margin-bottom: 10px; 10 | box-shadow: 0 0 3px black; 11 | } 12 | 13 | .breadcrumb a { 14 | position: relative; 15 | display: flex; 16 | -ms-flex-positive: 1; 17 | flex-grow: 1; 18 | text-decoration: none; 19 | margin: auto; 20 | height: 100%; 21 | color: white; 22 | } 23 | 24 | .breadcrumb a:first-child { 25 | padding-left: 5.2px; 26 | } 27 | 28 | .breadcrumb a:last-child { 29 | padding-right: 5.2px; 30 | } 31 | 32 | .breadcrumb a:after { 33 | content: ""; 34 | position: absolute; 35 | display: inline-block; 36 | width: 45px; 37 | height: 45px; 38 | top: 0; 39 | right: -20px; 40 | background-color: #9d73eb; 41 | border-top-right-radius: 5px; 42 | transform: scale(0.707) rotate(45deg); 43 | box-shadow: 2px -2px rgba(0, 0, 0, 0.25); 44 | z-index: 1; 45 | } 46 | 47 | .breadcrumb a:last-child:after { 48 | content: none; 49 | } 50 | 51 | .breadcrumb a.active, 52 | .breadcrumb a:hover { 53 | background: #b899f2; 54 | color: white; 55 | text-decoration: underline; 56 | } 57 | 58 | .breadcrumb a.active:after, 59 | .breadcrumb a:hover:after { 60 | background: #b899f2; 61 | } 62 | 63 | .breadcrumb span { 64 | margin: inherit; 65 | z-index: 2; 66 | } 67 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/report/template/css/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ward727a/RPGCreator/f947ae880dbf07ee88a5c0ebad4ffe7e2ff7ea90/addons/gdUnit4/src/report/template/css/logo.png -------------------------------------------------------------------------------- /addons/gdUnit4/src/report/template/css/logo.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://2n0cbwv2t23g" 6 | path="res://.godot/imported/logo.png-37f10c549c1299049c5a6012ef6f9868.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://addons/gdUnit4/src/report/template/css/logo.png" 14 | dest_files=["res://.godot/imported/logo.png-37f10c549c1299049c5a6012ef6f9868.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/spy/GdUnitSpyImpl.gd: -------------------------------------------------------------------------------- 1 | 2 | const __INSTANCE_ID = "${instance_id}" 3 | const __SOURCE_CLASS = "${source_class}" 4 | 5 | var __instance_delegator :Object 6 | var __excluded_methods :PackedStringArray = [] 7 | 8 | 9 | static func __instance() -> Variant: 10 | return Engine.get_meta(__INSTANCE_ID) 11 | 12 | 13 | func _notification(what :int) -> void: 14 | if what == NOTIFICATION_PREDELETE: 15 | if Engine.has_meta(__INSTANCE_ID): 16 | Engine.remove_meta(__INSTANCE_ID) 17 | 18 | 19 | func __instance_id() -> String: 20 | return __INSTANCE_ID 21 | 22 | 23 | func __set_singleton(delegator :Object) -> void: 24 | # store self need to mock static functions 25 | Engine.set_meta(__INSTANCE_ID, self) 26 | __instance_delegator = delegator 27 | 28 | 29 | func __release_double() -> void: 30 | # we need to release the self reference manually to prevent orphan nodes 31 | Engine.remove_meta(__INSTANCE_ID) 32 | __instance_delegator = null 33 | 34 | 35 | func __do_call_real_func(func_name :String) -> bool: 36 | return not __excluded_methods.has(func_name) 37 | 38 | 39 | func __exclude_method_call(exluded_methods :PackedStringArray) -> void: 40 | __excluded_methods.append_array(exluded_methods) 41 | 42 | 43 | func __call_func(func_name :String, arguments :Array) -> Variant: 44 | return __instance_delegator.callv(func_name, arguments) 45 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/ui/GdUnitConsole.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=2 format=3 uid="uid://dm0wvfyeew7vd"] 2 | 3 | [ext_resource type="Script" path="res://addons/gdUnit4/src/ui/GdUnitConsole.gd" id="1"] 4 | 5 | [node name="Control" type="Control"] 6 | use_parent_material = true 7 | clip_contents = true 8 | custom_minimum_size = Vector2(0, 200) 9 | layout_mode = 3 10 | anchors_preset = 15 11 | anchor_right = 1.0 12 | anchor_bottom = 1.0 13 | grow_horizontal = 2 14 | grow_vertical = 2 15 | size_flags_horizontal = 3 16 | size_flags_vertical = 3 17 | script = ExtResource("1") 18 | 19 | [node name="VBoxContainer" type="VBoxContainer" parent="."] 20 | use_parent_material = true 21 | clip_contents = true 22 | layout_mode = 1 23 | anchors_preset = 15 24 | anchor_right = 1.0 25 | anchor_bottom = 1.0 26 | grow_horizontal = 2 27 | grow_vertical = 2 28 | size_flags_horizontal = 3 29 | size_flags_vertical = 3 30 | 31 | [node name="Header" type="PanelContainer" parent="VBoxContainer"] 32 | custom_minimum_size = Vector2(0, 32) 33 | layout_mode = 2 34 | auto_translate = false 35 | localize_numeral_system = false 36 | mouse_filter = 2 37 | 38 | [node name="header_title" type="RichTextLabel" parent="VBoxContainer/Header"] 39 | layout_mode = 2 40 | size_flags_horizontal = 3 41 | size_flags_vertical = 3 42 | auto_translate = false 43 | localize_numeral_system = false 44 | mouse_filter = 2 45 | bbcode_enabled = true 46 | scroll_active = false 47 | autowrap_mode = 0 48 | shortcut_keys_enabled = false 49 | 50 | [node name="Console" type="ScrollContainer" parent="VBoxContainer"] 51 | layout_mode = 2 52 | size_flags_horizontal = 3 53 | size_flags_vertical = 3 54 | 55 | [node name="TextEdit" type="RichTextLabel" parent="VBoxContainer/Console"] 56 | use_parent_material = true 57 | layout_mode = 2 58 | size_flags_horizontal = 3 59 | size_flags_vertical = 3 60 | bbcode_enabled = true 61 | scroll_following = true 62 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/ui/GdUnitInspectorTreeConstants.gd: -------------------------------------------------------------------------------- 1 | class_name GdUnitInspectorTreeConstants 2 | extends RefCounted 3 | 4 | 5 | # the inspector panel presantation 6 | enum TREE_VIEW_MODE { 7 | TREE, 8 | FLAT 9 | } 10 | 11 | 12 | # The inspector sort modes 13 | enum SORT_MODE { 14 | UNSORTED, 15 | NAME_ASCENDING, 16 | NAME_DESCENDING, 17 | EXECUTION_TIME 18 | } 19 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/ui/menu/GdUnitContextMenuItem.gd: -------------------------------------------------------------------------------- 1 | class_name GdUnitContextMenuItem 2 | 3 | enum MENU_ID { 4 | UNDEFINED = 0, 5 | TEST_RUN = 1000, 6 | TEST_DEBUG = 1001, 7 | TEST_RERUN = 1002, 8 | CREATE_TEST = 1010, 9 | } 10 | 11 | var id: MENU_ID = MENU_ID.UNDEFINED: 12 | set(value): 13 | id = value 14 | get: 15 | return id 16 | 17 | var name: StringName: 18 | set(value): 19 | name = value 20 | get: 21 | return name 22 | 23 | var command: GdUnitCommand: 24 | set(value): 25 | command = value 26 | get: 27 | return command 28 | 29 | var visible: Callable: 30 | set(value): 31 | visible = value 32 | get: 33 | return visible 34 | 35 | var icon: String: 36 | set(value): 37 | icon = value 38 | get: 39 | return icon 40 | 41 | 42 | func _init(p_id: MENU_ID, p_name: StringName, p_icon :String, p_is_visible: Callable, p_command: GdUnitCommand) -> void: 43 | assert(p_id != null, "(%s) missing parameter 'MENU_ID'" % p_name) 44 | assert(p_is_visible != null, "(%s) missing parameter 'GdUnitCommand'" % p_name) 45 | assert(p_command != null, "(%s) missing parameter 'GdUnitCommand'" % p_name) 46 | self.id = p_id 47 | self.name = p_name 48 | self.icon = p_icon 49 | self.command = p_command 50 | self.visible = p_is_visible 51 | 52 | 53 | func shortcut() -> Shortcut: 54 | return GdUnitCommandHandler.instance().get_shortcut(command.shortcut) 55 | 56 | 57 | func is_enabled(script: Script) -> bool: 58 | return command.is_enabled.call(script) 59 | 60 | 61 | func is_visible(script: Script) -> bool: 62 | return visible.call(script) 63 | 64 | 65 | func execute(arguments:=[]) -> void: 66 | if arguments.is_empty(): 67 | command.runnable.call() 68 | else: 69 | command.runnable.callv(arguments) 70 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/ui/parts/InspectorMonitor.gd: -------------------------------------------------------------------------------- 1 | @tool 2 | extends PanelContainer 3 | 4 | signal jump_to_orphan_nodes() 5 | 6 | @onready var ICON_GREEN := GdUnitUiTools.get_icon("Unlinked", Color.WEB_GREEN) 7 | @onready var ICON_RED := GdUnitUiTools.get_color_animated_icon("Unlinked", Color.YELLOW, Color.ORANGE_RED) 8 | 9 | @onready var _button_time: Button = %btn_time 10 | @onready var _time: Label = %time_value 11 | @onready var _orphans: Label = %orphan_value 12 | @onready var _orphan_button: Button = %btn_orphan 13 | 14 | var total_elapsed_time := 0 15 | var total_orphans := 0 16 | 17 | 18 | func _ready() -> void: 19 | @warning_ignore("return_value_discarded") 20 | GdUnitSignals.instance().gdunit_event.connect(_on_gdunit_event) 21 | _time.text = "" 22 | _orphans.text = "0" 23 | _button_time.icon = GdUnitUiTools.get_icon("Time") 24 | _orphan_button.icon = ICON_GREEN 25 | 26 | 27 | func status_changed(elapsed_time: int, orphan_nodes: int) -> void: 28 | total_elapsed_time += elapsed_time 29 | total_orphans += orphan_nodes 30 | _time.text = LocalTime.elapsed(total_elapsed_time) 31 | _orphans.text = str(total_orphans) 32 | if total_orphans > 0: 33 | _orphan_button.icon = ICON_RED 34 | 35 | 36 | func _on_gdunit_event(event: GdUnitEvent) -> void: 37 | match event.type(): 38 | GdUnitEvent.INIT: 39 | _orphan_button.icon = ICON_GREEN 40 | total_elapsed_time = 0 41 | total_orphans = 0 42 | status_changed(0, 0) 43 | GdUnitEvent.TESTCASE_BEFORE: 44 | pass 45 | GdUnitEvent.TESTCASE_AFTER: 46 | status_changed(0, event.orphan_nodes()) 47 | GdUnitEvent.TESTSUITE_BEFORE: 48 | pass 49 | GdUnitEvent.TESTSUITE_AFTER: 50 | status_changed(event.elapsed_time(), event.orphan_nodes()) 51 | 52 | 53 | func _on_ToolButton_pressed() -> void: 54 | jump_to_orphan_nodes.emit() 55 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/ui/parts/InspectorProgressBar.gd: -------------------------------------------------------------------------------- 1 | @tool 2 | extends ProgressBar 3 | 4 | @onready var status: Label = $Label 5 | @onready var style: StyleBoxFlat = get("theme_override_styles/fill") 6 | 7 | 8 | func _ready() -> void: 9 | @warning_ignore("return_value_discarded") 10 | GdUnitSignals.instance().gdunit_event.connect(_on_gdunit_event) 11 | style.bg_color = Color.DARK_GREEN 12 | value = 0 13 | max_value = 0 14 | update_text() 15 | 16 | 17 | func progress_init(p_max_value: int) -> void: 18 | value = 0 19 | max_value = p_max_value 20 | style.bg_color = Color.DARK_GREEN 21 | update_text() 22 | 23 | 24 | func progress_update(p_value: int, is_failed: bool) -> void: 25 | value += p_value 26 | update_text() 27 | if is_failed: 28 | style.bg_color = Color.DARK_RED 29 | 30 | 31 | func update_text() -> void: 32 | status.text = "%d:%d" % [value, max_value] 33 | 34 | 35 | func _on_gdunit_event(event: GdUnitEvent) -> void: 36 | match event.type(): 37 | GdUnitEvent.INIT: 38 | progress_init(event.total_count()) 39 | 40 | GdUnitEvent.DISCOVER_END: 41 | progress_init(event.total_count()) 42 | 43 | GdUnitEvent.TESTCASE_STATISTICS: 44 | progress_update(1, event.is_failed() or event.is_error()) 45 | 46 | GdUnitEvent.TESTSUITE_AFTER: 47 | progress_update(0, event.is_failed() or event.is_error()) 48 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/ui/parts/InspectorProgressBar.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=3 format=3 uid="uid://dva3tonxsxrlk"] 2 | 3 | [ext_resource type="Script" path="res://addons/gdUnit4/src/ui/parts/InspectorProgressBar.gd" id="1"] 4 | 5 | [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_ayfir"] 6 | bg_color = Color(0, 0.392157, 0, 1) 7 | 8 | [node name="ProgressBar" type="ProgressBar"] 9 | custom_minimum_size = Vector2(0, 20) 10 | anchors_preset = 15 11 | anchor_right = 1.0 12 | anchor_bottom = 1.0 13 | grow_horizontal = 2 14 | grow_vertical = 2 15 | size_flags_vertical = 9 16 | theme_override_styles/fill = SubResource("StyleBoxFlat_ayfir") 17 | rounded = true 18 | allow_greater = true 19 | show_percentage = false 20 | script = ExtResource("1") 21 | 22 | [node name="Label" type="Label" parent="."] 23 | use_parent_material = true 24 | layout_mode = 1 25 | anchors_preset = 15 26 | anchor_right = 1.0 27 | anchor_bottom = 1.0 28 | grow_horizontal = 2 29 | grow_vertical = 2 30 | size_flags_vertical = 3 31 | horizontal_alignment = 1 32 | vertical_alignment = 1 33 | max_lines_visible = 1 34 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/ui/settings/GdUnitInputCapture.gd: -------------------------------------------------------------------------------- 1 | @tool 2 | class_name GdUnitInputCapture 3 | extends Control 4 | 5 | signal input_completed(input_event: InputEventKey) 6 | 7 | 8 | var _tween: Tween 9 | var _input_event: InputEventKey 10 | 11 | 12 | func _ready() -> void: 13 | reset() 14 | self_modulate = Color.WHITE 15 | _tween = create_tween() 16 | @warning_ignore("return_value_discarded") 17 | _tween.set_loops() 18 | @warning_ignore("return_value_discarded") 19 | _tween.tween_property(%Label, "self_modulate", Color(1, 1, 1, .8), 1.0).from_current().set_trans(Tween.TRANS_BACK).set_ease(Tween.EASE_IN_OUT) 20 | 21 | 22 | func reset() -> void: 23 | _input_event = InputEventKey.new() 24 | 25 | 26 | func _input(event: InputEvent) -> void: 27 | if not is_visible_in_tree(): 28 | return 29 | if event is InputEventKey and event.is_pressed() and not event.is_echo(): 30 | var _event := event as InputEventKey 31 | match _event.keycode: 32 | KEY_CTRL: 33 | _input_event.ctrl_pressed = true 34 | KEY_SHIFT: 35 | _input_event.shift_pressed = true 36 | KEY_ALT: 37 | _input_event.alt_pressed = true 38 | KEY_META: 39 | _input_event.meta_pressed = true 40 | _: 41 | _input_event.keycode = _event.keycode 42 | _apply_input_modifiers(_event) 43 | accept_event() 44 | 45 | if event is InputEventKey and not event.is_pressed(): 46 | input_completed.emit(_input_event) 47 | hide() 48 | 49 | 50 | func _apply_input_modifiers(event: InputEvent) -> void: 51 | if event is InputEventWithModifiers: 52 | var _event := event as InputEventWithModifiers 53 | _input_event.meta_pressed = _event.meta_pressed or _input_event.meta_pressed 54 | _input_event.alt_pressed = _event.alt_pressed or _input_event.alt_pressed 55 | _input_event.shift_pressed = _event.shift_pressed or _input_event.shift_pressed 56 | _input_event.ctrl_pressed = _event.ctrl_pressed or _input_event.ctrl_pressed 57 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/ui/settings/GdUnitInputCapture.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=2 format=3 uid="uid://pmnkxrhglak5"] 2 | 3 | [ext_resource type="Script" path="res://addons/gdUnit4/src/ui/settings/GdUnitInputCapture.gd" id="1_gki1u"] 4 | 5 | [node name="GdUnitInputMapper" type="Control"] 6 | modulate = Color(0.929099, 0.929099, 0.929099, 0.936189) 7 | top_level = true 8 | layout_mode = 3 9 | anchors_preset = 15 10 | anchor_right = 1.0 11 | anchor_bottom = 1.0 12 | grow_horizontal = 2 13 | grow_vertical = 2 14 | size_flags_horizontal = 3 15 | size_flags_vertical = 3 16 | script = ExtResource("1_gki1u") 17 | 18 | [node name="Label" type="Label" parent="."] 19 | unique_name_in_owner = true 20 | self_modulate = Color(0.401913, 0.401913, 0.401913, 0.461723) 21 | top_level = true 22 | layout_mode = 1 23 | anchors_preset = 8 24 | anchor_left = 0.5 25 | anchor_top = 0.5 26 | anchor_right = 0.5 27 | anchor_bottom = 0.5 28 | offset_left = -60.5 29 | offset_top = -19.5 30 | offset_right = 60.5 31 | offset_bottom = 19.5 32 | grow_horizontal = 2 33 | grow_vertical = 2 34 | theme_override_colors/font_color = Color(1, 1, 1, 1) 35 | theme_override_font_sizes/font_size = 26 36 | text = "Press keys for shortcut" 37 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/ui/settings/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ward727a/RPGCreator/f947ae880dbf07ee88a5c0ebad4ffe7e2ff7ea90/addons/gdUnit4/src/ui/settings/logo.png -------------------------------------------------------------------------------- /addons/gdUnit4/src/ui/settings/logo.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://bkh022wwqq7s3" 6 | path="res://.godot/imported/logo.png-deda0e4ba02a0b9e4e4a830029a5817f.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://addons/gdUnit4/src/ui/settings/logo.png" 14 | dest_files=["res://.godot/imported/logo.png-deda0e4ba02a0b9e4e4a830029a5817f.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/update/GdUnitPatch.gd: -------------------------------------------------------------------------------- 1 | class_name GdUnitPatch 2 | extends RefCounted 3 | 4 | const PATCH_VERSION = "patch_version" 5 | 6 | var _version :GdUnit4Version 7 | 8 | 9 | func _init(version_ :GdUnit4Version) -> void: 10 | _version = version_ 11 | 12 | 13 | func version() -> GdUnit4Version: 14 | return _version 15 | 16 | 17 | # this function needs to be implement 18 | func execute() -> bool: 19 | push_error("The function 'execute()' is not implemented at %s" % self) 20 | return false 21 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/update/assets/border_bottom.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ward727a/RPGCreator/f947ae880dbf07ee88a5c0ebad4ffe7e2ff7ea90/addons/gdUnit4/src/update/assets/border_bottom.png -------------------------------------------------------------------------------- /addons/gdUnit4/src/update/assets/border_bottom.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://dmv3ld2otx1e2" 6 | path="res://.godot/imported/border_bottom.png-30d66a4c67e3a03ad191e37cdf16549d.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://addons/gdUnit4/src/update/assets/border_bottom.png" 14 | dest_files=["res://.godot/imported/border_bottom.png-30d66a4c67e3a03ad191e37cdf16549d.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/update/assets/border_top.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ward727a/RPGCreator/f947ae880dbf07ee88a5c0ebad4ffe7e2ff7ea90/addons/gdUnit4/src/update/assets/border_top.png -------------------------------------------------------------------------------- /addons/gdUnit4/src/update/assets/border_top.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://b4sio0j5om50s" 6 | path="res://.godot/imported/border_top.png-c47cbebdb755144731c6ae309e18bbaa.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://addons/gdUnit4/src/update/assets/border_top.png" 14 | dest_files=["res://.godot/imported/border_top.png-c47cbebdb755144731c6ae309e18bbaa.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/update/assets/dot1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ward727a/RPGCreator/f947ae880dbf07ee88a5c0ebad4ffe7e2ff7ea90/addons/gdUnit4/src/update/assets/dot1.png -------------------------------------------------------------------------------- /addons/gdUnit4/src/update/assets/dot1.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://ce2eojg0pwpov" 6 | path="res://.godot/imported/dot1.png-380baf1b5247addda93bce3c799aa4e7.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://addons/gdUnit4/src/update/assets/dot1.png" 14 | dest_files=["res://.godot/imported/dot1.png-380baf1b5247addda93bce3c799aa4e7.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/update/assets/dot2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ward727a/RPGCreator/f947ae880dbf07ee88a5c0ebad4ffe7e2ff7ea90/addons/gdUnit4/src/update/assets/dot2.png -------------------------------------------------------------------------------- /addons/gdUnit4/src/update/assets/dot2.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://cvwa5lg3qj0e2" 6 | path="res://.godot/imported/dot2.png-86a9db80ef4413e353c4339ad8f68a5f.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://addons/gdUnit4/src/update/assets/dot2.png" 14 | dest_files=["res://.godot/imported/dot2.png-86a9db80ef4413e353c4339ad8f68a5f.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/update/assets/embedded.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ward727a/RPGCreator/f947ae880dbf07ee88a5c0ebad4ffe7e2ff7ea90/addons/gdUnit4/src/update/assets/embedded.png -------------------------------------------------------------------------------- /addons/gdUnit4/src/update/assets/embedded.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://63wk5nib3r7q" 6 | path="res://.godot/imported/embedded.png-29390948772209a603567d24f8766495.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://addons/gdUnit4/src/update/assets/embedded.png" 14 | dest_files=["res://.godot/imported/embedded.png-29390948772209a603567d24f8766495.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/update/assets/fonts/static/RobotoMono-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ward727a/RPGCreator/f947ae880dbf07ee88a5c0ebad4ffe7e2ff7ea90/addons/gdUnit4/src/update/assets/fonts/static/RobotoMono-Bold.ttf -------------------------------------------------------------------------------- /addons/gdUnit4/src/update/assets/fonts/static/RobotoMono-Bold.ttf.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="font_data_dynamic" 4 | type="FontFile" 5 | uid="uid://dgpj1y3a73vc" 6 | path="res://.godot/imported/RobotoMono-Bold.ttf-ea008af97d359b7630bd271235703cae.fontdata" 7 | 8 | [deps] 9 | 10 | source_file="res://addons/gdUnit4/src/update/assets/fonts/static/RobotoMono-Bold.ttf" 11 | dest_files=["res://.godot/imported/RobotoMono-Bold.ttf-ea008af97d359b7630bd271235703cae.fontdata"] 12 | 13 | [params] 14 | 15 | Rendering=null 16 | antialiasing=1 17 | generate_mipmaps=false 18 | disable_embedded_bitmaps=true 19 | multichannel_signed_distance_field=false 20 | msdf_pixel_range=8 21 | msdf_size=48 22 | allow_system_fallback=true 23 | force_autohinter=false 24 | hinting=1 25 | subpixel_positioning=1 26 | oversampling=0.0 27 | Fallbacks=null 28 | fallbacks=[] 29 | Compress=null 30 | compress=true 31 | preload=[] 32 | language_support={} 33 | script_support={} 34 | opentype_features={} 35 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/update/assets/fonts/static/RobotoMono-BoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ward727a/RPGCreator/f947ae880dbf07ee88a5c0ebad4ffe7e2ff7ea90/addons/gdUnit4/src/update/assets/fonts/static/RobotoMono-BoldItalic.ttf -------------------------------------------------------------------------------- /addons/gdUnit4/src/update/assets/fonts/static/RobotoMono-BoldItalic.ttf.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="font_data_dynamic" 4 | type="FontFile" 5 | uid="uid://cnrsmyjdnlikm" 6 | path="res://.godot/imported/RobotoMono-BoldItalic.ttf-6e10905211cda810d470782293480777.fontdata" 7 | 8 | [deps] 9 | 10 | source_file="res://addons/gdUnit4/src/update/assets/fonts/static/RobotoMono-BoldItalic.ttf" 11 | dest_files=["res://.godot/imported/RobotoMono-BoldItalic.ttf-6e10905211cda810d470782293480777.fontdata"] 12 | 13 | [params] 14 | 15 | Rendering=null 16 | antialiasing=1 17 | generate_mipmaps=false 18 | disable_embedded_bitmaps=true 19 | multichannel_signed_distance_field=false 20 | msdf_pixel_range=8 21 | msdf_size=48 22 | allow_system_fallback=true 23 | force_autohinter=false 24 | hinting=1 25 | subpixel_positioning=1 26 | oversampling=0.0 27 | Fallbacks=null 28 | fallbacks=[] 29 | Compress=null 30 | compress=true 31 | preload=[] 32 | language_support={} 33 | script_support={} 34 | opentype_features={} 35 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/update/assets/fonts/static/RobotoMono-ExtraLight.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ward727a/RPGCreator/f947ae880dbf07ee88a5c0ebad4ffe7e2ff7ea90/addons/gdUnit4/src/update/assets/fonts/static/RobotoMono-ExtraLight.ttf -------------------------------------------------------------------------------- /addons/gdUnit4/src/update/assets/fonts/static/RobotoMono-ExtraLight.ttf.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="font_data_dynamic" 4 | type="FontFile" 5 | uid="uid://c8ey5njg4eh6d" 6 | path="res://.godot/imported/RobotoMono-ExtraLight.ttf-c8ac954f2ab584e7652e58ccd95cc705.fontdata" 7 | 8 | [deps] 9 | 10 | source_file="res://addons/gdUnit4/src/update/assets/fonts/static/RobotoMono-ExtraLight.ttf" 11 | dest_files=["res://.godot/imported/RobotoMono-ExtraLight.ttf-c8ac954f2ab584e7652e58ccd95cc705.fontdata"] 12 | 13 | [params] 14 | 15 | Rendering=null 16 | antialiasing=1 17 | generate_mipmaps=false 18 | disable_embedded_bitmaps=true 19 | multichannel_signed_distance_field=false 20 | msdf_pixel_range=8 21 | msdf_size=48 22 | allow_system_fallback=true 23 | force_autohinter=false 24 | hinting=1 25 | subpixel_positioning=1 26 | oversampling=0.0 27 | Fallbacks=null 28 | fallbacks=[] 29 | Compress=null 30 | compress=true 31 | preload=[] 32 | language_support={} 33 | script_support={} 34 | opentype_features={} 35 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/update/assets/fonts/static/RobotoMono-ExtraLightItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ward727a/RPGCreator/f947ae880dbf07ee88a5c0ebad4ffe7e2ff7ea90/addons/gdUnit4/src/update/assets/fonts/static/RobotoMono-ExtraLightItalic.ttf -------------------------------------------------------------------------------- /addons/gdUnit4/src/update/assets/fonts/static/RobotoMono-ExtraLightItalic.ttf.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="font_data_dynamic" 4 | type="FontFile" 5 | uid="uid://pghouxn0ujr7" 6 | path="res://.godot/imported/RobotoMono-ExtraLightItalic.ttf-06133dd8b521ead6203b317979387344.fontdata" 7 | 8 | [deps] 9 | 10 | source_file="res://addons/gdUnit4/src/update/assets/fonts/static/RobotoMono-ExtraLightItalic.ttf" 11 | dest_files=["res://.godot/imported/RobotoMono-ExtraLightItalic.ttf-06133dd8b521ead6203b317979387344.fontdata"] 12 | 13 | [params] 14 | 15 | Rendering=null 16 | antialiasing=1 17 | generate_mipmaps=false 18 | disable_embedded_bitmaps=true 19 | multichannel_signed_distance_field=false 20 | msdf_pixel_range=8 21 | msdf_size=48 22 | allow_system_fallback=true 23 | force_autohinter=false 24 | hinting=1 25 | subpixel_positioning=1 26 | oversampling=0.0 27 | Fallbacks=null 28 | fallbacks=[] 29 | Compress=null 30 | compress=true 31 | preload=[] 32 | language_support={} 33 | script_support={} 34 | opentype_features={} 35 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/update/assets/fonts/static/RobotoMono-Italic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ward727a/RPGCreator/f947ae880dbf07ee88a5c0ebad4ffe7e2ff7ea90/addons/gdUnit4/src/update/assets/fonts/static/RobotoMono-Italic.ttf -------------------------------------------------------------------------------- /addons/gdUnit4/src/update/assets/fonts/static/RobotoMono-Italic.ttf.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="font_data_dynamic" 4 | type="FontFile" 5 | uid="uid://hp3750m8e3nq" 6 | path="res://.godot/imported/RobotoMono-Italic.ttf-328fe6d9b2ac5d629c43c335b916d307.fontdata" 7 | 8 | [deps] 9 | 10 | source_file="res://addons/gdUnit4/src/update/assets/fonts/static/RobotoMono-Italic.ttf" 11 | dest_files=["res://.godot/imported/RobotoMono-Italic.ttf-328fe6d9b2ac5d629c43c335b916d307.fontdata"] 12 | 13 | [params] 14 | 15 | Rendering=null 16 | antialiasing=1 17 | generate_mipmaps=false 18 | disable_embedded_bitmaps=true 19 | multichannel_signed_distance_field=false 20 | msdf_pixel_range=8 21 | msdf_size=48 22 | allow_system_fallback=true 23 | force_autohinter=false 24 | hinting=1 25 | subpixel_positioning=1 26 | oversampling=0.0 27 | Fallbacks=null 28 | fallbacks=[] 29 | Compress=null 30 | compress=true 31 | preload=[] 32 | language_support={} 33 | script_support={} 34 | opentype_features={} 35 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/update/assets/fonts/static/RobotoMono-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ward727a/RPGCreator/f947ae880dbf07ee88a5c0ebad4ffe7e2ff7ea90/addons/gdUnit4/src/update/assets/fonts/static/RobotoMono-Light.ttf -------------------------------------------------------------------------------- /addons/gdUnit4/src/update/assets/fonts/static/RobotoMono-Light.ttf.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="font_data_dynamic" 4 | type="FontFile" 5 | uid="uid://dm1xiq8pmd6xk" 6 | path="res://.godot/imported/RobotoMono-Light.ttf-638f745780c834176c3bf9969f0e408e.fontdata" 7 | 8 | [deps] 9 | 10 | source_file="res://addons/gdUnit4/src/update/assets/fonts/static/RobotoMono-Light.ttf" 11 | dest_files=["res://.godot/imported/RobotoMono-Light.ttf-638f745780c834176c3bf9969f0e408e.fontdata"] 12 | 13 | [params] 14 | 15 | Rendering=null 16 | antialiasing=1 17 | generate_mipmaps=false 18 | disable_embedded_bitmaps=true 19 | multichannel_signed_distance_field=false 20 | msdf_pixel_range=8 21 | msdf_size=48 22 | allow_system_fallback=true 23 | force_autohinter=false 24 | hinting=1 25 | subpixel_positioning=1 26 | oversampling=0.0 27 | Fallbacks=null 28 | fallbacks=[] 29 | Compress=null 30 | compress=true 31 | preload=[] 32 | language_support={} 33 | script_support={} 34 | opentype_features={} 35 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/update/assets/fonts/static/RobotoMono-LightItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ward727a/RPGCreator/f947ae880dbf07ee88a5c0ebad4ffe7e2ff7ea90/addons/gdUnit4/src/update/assets/fonts/static/RobotoMono-LightItalic.ttf -------------------------------------------------------------------------------- /addons/gdUnit4/src/update/assets/fonts/static/RobotoMono-LightItalic.ttf.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="font_data_dynamic" 4 | type="FontFile" 5 | uid="uid://crphq80yxhgic" 6 | path="res://.godot/imported/RobotoMono-LightItalic.ttf-473f0d613e289d058b8c392d0c5242bc.fontdata" 7 | 8 | [deps] 9 | 10 | source_file="res://addons/gdUnit4/src/update/assets/fonts/static/RobotoMono-LightItalic.ttf" 11 | dest_files=["res://.godot/imported/RobotoMono-LightItalic.ttf-473f0d613e289d058b8c392d0c5242bc.fontdata"] 12 | 13 | [params] 14 | 15 | Rendering=null 16 | antialiasing=1 17 | generate_mipmaps=false 18 | disable_embedded_bitmaps=true 19 | multichannel_signed_distance_field=false 20 | msdf_pixel_range=8 21 | msdf_size=48 22 | allow_system_fallback=true 23 | force_autohinter=false 24 | hinting=1 25 | subpixel_positioning=1 26 | oversampling=0.0 27 | Fallbacks=null 28 | fallbacks=[] 29 | Compress=null 30 | compress=true 31 | preload=[] 32 | language_support={} 33 | script_support={} 34 | opentype_features={} 35 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/update/assets/fonts/static/RobotoMono-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ward727a/RPGCreator/f947ae880dbf07ee88a5c0ebad4ffe7e2ff7ea90/addons/gdUnit4/src/update/assets/fonts/static/RobotoMono-Medium.ttf -------------------------------------------------------------------------------- /addons/gdUnit4/src/update/assets/fonts/static/RobotoMono-Medium.ttf.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="font_data_dynamic" 4 | type="FontFile" 5 | uid="uid://csdprnrpwr3xp" 6 | path="res://.godot/imported/RobotoMono-Medium.ttf-f165ecef77d89557a95acac0927f13c4.fontdata" 7 | 8 | [deps] 9 | 10 | source_file="res://addons/gdUnit4/src/update/assets/fonts/static/RobotoMono-Medium.ttf" 11 | dest_files=["res://.godot/imported/RobotoMono-Medium.ttf-f165ecef77d89557a95acac0927f13c4.fontdata"] 12 | 13 | [params] 14 | 15 | Rendering=null 16 | antialiasing=1 17 | generate_mipmaps=false 18 | disable_embedded_bitmaps=true 19 | multichannel_signed_distance_field=false 20 | msdf_pixel_range=8 21 | msdf_size=48 22 | allow_system_fallback=true 23 | force_autohinter=false 24 | hinting=1 25 | subpixel_positioning=1 26 | oversampling=0.0 27 | Fallbacks=null 28 | fallbacks=[] 29 | Compress=null 30 | compress=true 31 | preload=[] 32 | language_support={} 33 | script_support={} 34 | opentype_features={} 35 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/update/assets/fonts/static/RobotoMono-MediumItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ward727a/RPGCreator/f947ae880dbf07ee88a5c0ebad4ffe7e2ff7ea90/addons/gdUnit4/src/update/assets/fonts/static/RobotoMono-MediumItalic.ttf -------------------------------------------------------------------------------- /addons/gdUnit4/src/update/assets/fonts/static/RobotoMono-MediumItalic.ttf.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="font_data_dynamic" 4 | type="FontFile" 5 | uid="uid://cdxcb7jq16o5k" 6 | path="res://.godot/imported/RobotoMono-MediumItalic.ttf-40c40d791914284c8092585e839f0cd1.fontdata" 7 | 8 | [deps] 9 | 10 | source_file="res://addons/gdUnit4/src/update/assets/fonts/static/RobotoMono-MediumItalic.ttf" 11 | dest_files=["res://.godot/imported/RobotoMono-MediumItalic.ttf-40c40d791914284c8092585e839f0cd1.fontdata"] 12 | 13 | [params] 14 | 15 | Rendering=null 16 | antialiasing=1 17 | generate_mipmaps=false 18 | disable_embedded_bitmaps=true 19 | multichannel_signed_distance_field=false 20 | msdf_pixel_range=8 21 | msdf_size=48 22 | allow_system_fallback=true 23 | force_autohinter=false 24 | hinting=1 25 | subpixel_positioning=1 26 | oversampling=0.0 27 | Fallbacks=null 28 | fallbacks=[] 29 | Compress=null 30 | compress=true 31 | preload=[] 32 | language_support={} 33 | script_support={} 34 | opentype_features={} 35 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/update/assets/fonts/static/RobotoMono-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ward727a/RPGCreator/f947ae880dbf07ee88a5c0ebad4ffe7e2ff7ea90/addons/gdUnit4/src/update/assets/fonts/static/RobotoMono-Regular.ttf -------------------------------------------------------------------------------- /addons/gdUnit4/src/update/assets/fonts/static/RobotoMono-Regular.ttf.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="font_data_dynamic" 4 | type="FontFile" 5 | uid="uid://ck2sp0iypcks" 6 | path="res://.godot/imported/RobotoMono-Regular.ttf-f5a7315540116b55ba9e010120cbfb0c.fontdata" 7 | 8 | [deps] 9 | 10 | source_file="res://addons/gdUnit4/src/update/assets/fonts/static/RobotoMono-Regular.ttf" 11 | dest_files=["res://.godot/imported/RobotoMono-Regular.ttf-f5a7315540116b55ba9e010120cbfb0c.fontdata"] 12 | 13 | [params] 14 | 15 | Rendering=null 16 | antialiasing=1 17 | generate_mipmaps=false 18 | disable_embedded_bitmaps=true 19 | multichannel_signed_distance_field=false 20 | msdf_pixel_range=8 21 | msdf_size=48 22 | allow_system_fallback=true 23 | force_autohinter=false 24 | hinting=1 25 | subpixel_positioning=1 26 | oversampling=0.0 27 | Fallbacks=null 28 | fallbacks=[] 29 | Compress=null 30 | compress=true 31 | preload=[] 32 | language_support={} 33 | script_support={} 34 | opentype_features={} 35 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/update/assets/fonts/static/RobotoMono-SemiBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ward727a/RPGCreator/f947ae880dbf07ee88a5c0ebad4ffe7e2ff7ea90/addons/gdUnit4/src/update/assets/fonts/static/RobotoMono-SemiBold.ttf -------------------------------------------------------------------------------- /addons/gdUnit4/src/update/assets/fonts/static/RobotoMono-SemiBold.ttf.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="font_data_dynamic" 4 | type="FontFile" 5 | uid="uid://bexpf232jnjbc" 6 | path="res://.godot/imported/RobotoMono-SemiBold.ttf-6012d0b71d40b9767a7b6a480fe0d4b7.fontdata" 7 | 8 | [deps] 9 | 10 | source_file="res://addons/gdUnit4/src/update/assets/fonts/static/RobotoMono-SemiBold.ttf" 11 | dest_files=["res://.godot/imported/RobotoMono-SemiBold.ttf-6012d0b71d40b9767a7b6a480fe0d4b7.fontdata"] 12 | 13 | [params] 14 | 15 | Rendering=null 16 | antialiasing=1 17 | generate_mipmaps=false 18 | disable_embedded_bitmaps=true 19 | multichannel_signed_distance_field=false 20 | msdf_pixel_range=8 21 | msdf_size=48 22 | allow_system_fallback=true 23 | force_autohinter=false 24 | hinting=1 25 | subpixel_positioning=1 26 | oversampling=0.0 27 | Fallbacks=null 28 | fallbacks=[] 29 | Compress=null 30 | compress=true 31 | preload=[] 32 | language_support={} 33 | script_support={} 34 | opentype_features={} 35 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/update/assets/fonts/static/RobotoMono-SemiBoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ward727a/RPGCreator/f947ae880dbf07ee88a5c0ebad4ffe7e2ff7ea90/addons/gdUnit4/src/update/assets/fonts/static/RobotoMono-SemiBoldItalic.ttf -------------------------------------------------------------------------------- /addons/gdUnit4/src/update/assets/fonts/static/RobotoMono-SemiBoldItalic.ttf.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="font_data_dynamic" 4 | type="FontFile" 5 | uid="uid://xuc8ovbe0rku" 6 | path="res://.godot/imported/RobotoMono-SemiBoldItalic.ttf-12b525223c8f2dfb78bca4e7ecaf3ca5.fontdata" 7 | 8 | [deps] 9 | 10 | source_file="res://addons/gdUnit4/src/update/assets/fonts/static/RobotoMono-SemiBoldItalic.ttf" 11 | dest_files=["res://.godot/imported/RobotoMono-SemiBoldItalic.ttf-12b525223c8f2dfb78bca4e7ecaf3ca5.fontdata"] 12 | 13 | [params] 14 | 15 | Rendering=null 16 | antialiasing=1 17 | generate_mipmaps=false 18 | disable_embedded_bitmaps=true 19 | multichannel_signed_distance_field=false 20 | msdf_pixel_range=8 21 | msdf_size=48 22 | allow_system_fallback=true 23 | force_autohinter=false 24 | hinting=1 25 | subpixel_positioning=1 26 | oversampling=0.0 27 | Fallbacks=null 28 | fallbacks=[] 29 | Compress=null 30 | compress=true 31 | preload=[] 32 | language_support={} 33 | script_support={} 34 | opentype_features={} 35 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/update/assets/fonts/static/RobotoMono-Thin.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ward727a/RPGCreator/f947ae880dbf07ee88a5c0ebad4ffe7e2ff7ea90/addons/gdUnit4/src/update/assets/fonts/static/RobotoMono-Thin.ttf -------------------------------------------------------------------------------- /addons/gdUnit4/src/update/assets/fonts/static/RobotoMono-Thin.ttf.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="font_data_dynamic" 4 | type="FontFile" 5 | uid="uid://cnc1pdajlxyxp" 6 | path="res://.godot/imported/RobotoMono-Thin.ttf-a3a6620deea1a01e153a2a60c778e675.fontdata" 7 | 8 | [deps] 9 | 10 | source_file="res://addons/gdUnit4/src/update/assets/fonts/static/RobotoMono-Thin.ttf" 11 | dest_files=["res://.godot/imported/RobotoMono-Thin.ttf-a3a6620deea1a01e153a2a60c778e675.fontdata"] 12 | 13 | [params] 14 | 15 | Rendering=null 16 | antialiasing=1 17 | generate_mipmaps=false 18 | disable_embedded_bitmaps=true 19 | multichannel_signed_distance_field=false 20 | msdf_pixel_range=8 21 | msdf_size=48 22 | allow_system_fallback=true 23 | force_autohinter=false 24 | hinting=1 25 | subpixel_positioning=1 26 | oversampling=0.0 27 | Fallbacks=null 28 | fallbacks=[] 29 | Compress=null 30 | compress=true 31 | preload=[] 32 | language_support={} 33 | script_support={} 34 | opentype_features={} 35 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/update/assets/fonts/static/RobotoMono-ThinItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ward727a/RPGCreator/f947ae880dbf07ee88a5c0ebad4ffe7e2ff7ea90/addons/gdUnit4/src/update/assets/fonts/static/RobotoMono-ThinItalic.ttf -------------------------------------------------------------------------------- /addons/gdUnit4/src/update/assets/fonts/static/RobotoMono-ThinItalic.ttf.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="font_data_dynamic" 4 | type="FontFile" 5 | uid="uid://cvh21iixbcfww" 6 | path="res://.godot/imported/RobotoMono-ThinItalic.ttf-e9ceff3e4cdfbfedd19dbb3d3bba724a.fontdata" 7 | 8 | [deps] 9 | 10 | source_file="res://addons/gdUnit4/src/update/assets/fonts/static/RobotoMono-ThinItalic.ttf" 11 | dest_files=["res://.godot/imported/RobotoMono-ThinItalic.ttf-e9ceff3e4cdfbfedd19dbb3d3bba724a.fontdata"] 12 | 13 | [params] 14 | 15 | Rendering=null 16 | antialiasing=1 17 | generate_mipmaps=false 18 | disable_embedded_bitmaps=true 19 | multichannel_signed_distance_field=false 20 | msdf_pixel_range=8 21 | msdf_size=48 22 | allow_system_fallback=true 23 | force_autohinter=false 24 | hinting=1 25 | subpixel_positioning=1 26 | oversampling=0.0 27 | Fallbacks=null 28 | fallbacks=[] 29 | Compress=null 30 | compress=true 31 | preload=[] 32 | language_support={} 33 | script_support={} 34 | opentype_features={} 35 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/update/assets/horizontal-line2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ward727a/RPGCreator/f947ae880dbf07ee88a5c0ebad4ffe7e2ff7ea90/addons/gdUnit4/src/update/assets/horizontal-line2.png -------------------------------------------------------------------------------- /addons/gdUnit4/src/update/assets/horizontal-line2.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://dgaa5faajesgv" 6 | path="res://.godot/imported/horizontal-line2.png-92618e6ee5cc9002847547a8c9deadbc.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://addons/gdUnit4/src/update/assets/horizontal-line2.png" 14 | dest_files=["res://.godot/imported/horizontal-line2.png-92618e6ee5cc9002847547a8c9deadbc.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /addons/gdUnit4/src/update/assets/progress-background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ward727a/RPGCreator/f947ae880dbf07ee88a5c0ebad4ffe7e2ff7ea90/addons/gdUnit4/src/update/assets/progress-background.png -------------------------------------------------------------------------------- /addons/gdUnit4/src/update/assets/progress-background.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://cwxuep3lbnu3p" 6 | path="res://.godot/imported/progress-background.png-20022b3af2be583c006365edbc69d914.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://addons/gdUnit4/src/update/assets/progress-background.png" 14 | dest_files=["res://.godot/imported/progress-background.png-20022b3af2be583c006365edbc69d914.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /addons/imgui-godot/ImGuiGodot/ImGuiExtensions.cs: -------------------------------------------------------------------------------- 1 | #if GODOT_PC 2 | using Godot; 3 | using ImGuiNET; 4 | using Vector3 = System.Numerics.Vector3; 5 | using Vector4 = System.Numerics.Vector4; 6 | 7 | namespace ImGuiGodot; 8 | 9 | public static class ImGuiExtensions 10 | { 11 | /// 12 | /// Extension method to translate between and 13 | /// 14 | public static ImGuiKey ToImGuiKey(this Key key) 15 | { 16 | return Internal.Input.ConvertKey(key); 17 | } 18 | 19 | /// 20 | /// Extension method to translate between and 21 | /// 22 | public static ImGuiKey ToImGuiKey(this JoyButton button) 23 | { 24 | return Internal.Input.ConvertJoyButton(button); 25 | } 26 | 27 | /// 28 | /// Convert to ImGui color RGBA 29 | /// 30 | public static Vector4 ToVector4(this Color color) 31 | { 32 | return new Vector4(color.R, color.G, color.B, color.A); 33 | } 34 | 35 | /// 36 | /// Convert to ImGui color RGB 37 | /// 38 | public static Vector3 ToVector3(this Color color) 39 | { 40 | return new Vector3(color.R, color.G, color.B); 41 | } 42 | 43 | /// 44 | /// Convert RGB to 45 | /// 46 | public static Color ToColor(this Vector3 vec) 47 | { 48 | return new Color(vec.X, vec.Y, vec.Z); 49 | } 50 | 51 | /// 52 | /// Convert RGBA to 53 | /// 54 | public static Color ToColor(this Vector4 vec) 55 | { 56 | return new Color(vec.X, vec.Y, vec.Z, vec.W); 57 | } 58 | 59 | /// 60 | /// Set IniFilename, converting Godot path to native 61 | /// 62 | public static void SetIniFilename(this ImGuiIOPtr io, string fileName) 63 | { 64 | _ = io; 65 | ImGuiGD.SetIniFilename(fileName); 66 | } 67 | } 68 | #endif 69 | -------------------------------------------------------------------------------- /addons/imgui-godot/ImGuiGodot/ImGuiSync.cs: -------------------------------------------------------------------------------- 1 | using Godot; 2 | #if GODOT_PC 3 | using ImGuiNET; 4 | using System.Runtime.InteropServices; 5 | using System; 6 | 7 | namespace ImGuiGodot; 8 | 9 | public partial class ImGuiSync : GodotObject 10 | { 11 | public static readonly StringName GetImGuiPtrs = "GetImGuiPtrs"; 12 | 13 | public static void SyncPtrs() 14 | { 15 | GodotObject gd = Engine.GetSingleton("ImGuiGD"); 16 | long[] ptrs = (long[])gd.Call(GetImGuiPtrs, 17 | ImGui.GetVersion(), 18 | Marshal.SizeOf(), 19 | Marshal.SizeOf(), 20 | sizeof(ushort), 21 | sizeof(ushort) 22 | ); 23 | 24 | if (ptrs.Length != 3) 25 | { 26 | throw new NotSupportedException("ImGui version mismatch"); 27 | } 28 | 29 | checked 30 | { 31 | ImGui.SetCurrentContext((IntPtr)ptrs[0]); 32 | ImGui.SetAllocatorFunctions((IntPtr)ptrs[1], (IntPtr)ptrs[2]); 33 | } 34 | } 35 | } 36 | #endif 37 | -------------------------------------------------------------------------------- /addons/imgui-godot/ImGuiGodot/Internal/DummyRenderer.cs: -------------------------------------------------------------------------------- 1 | #if GODOT_PC 2 | using Godot; 3 | 4 | namespace ImGuiGodot.Internal; 5 | 6 | internal sealed class DummyRenderer : IRenderer 7 | { 8 | public string Name => "godot4_net_dummy"; 9 | 10 | public void InitViewport(Rid vprid) 11 | { 12 | } 13 | 14 | public void CloseViewport(Rid vprid) 15 | { 16 | } 17 | 18 | public void OnHide() 19 | { 20 | } 21 | 22 | public void Render() 23 | { 24 | } 25 | 26 | public void Dispose() 27 | { 28 | } 29 | } 30 | #endif 31 | -------------------------------------------------------------------------------- /addons/imgui-godot/ImGuiGodot/Internal/IBackend.cs: -------------------------------------------------------------------------------- 1 | #if GODOT_PC 2 | #nullable enable 3 | using Godot; 4 | 5 | namespace ImGuiGodot.Internal; 6 | 7 | internal interface IBackend 8 | { 9 | public bool Visible { get; set; } 10 | public float JoyAxisDeadZone { get; set; } 11 | public float Scale { get; set; } 12 | public void ResetFonts(); 13 | public void AddFont(FontFile fontData, int fontSize, bool merge, ushort[]? glyphRanges); 14 | public void AddFontDefault(); 15 | public void RebuildFontAtlas(); 16 | public void Connect(Callable callable); 17 | public void SetMainViewport(Viewport vp); 18 | public bool SubViewportWidget(SubViewport svp); 19 | public void SetIniFilename(string filename); 20 | } 21 | #endif 22 | -------------------------------------------------------------------------------- /addons/imgui-godot/ImGuiGodot/Internal/IRenderer.cs: -------------------------------------------------------------------------------- 1 | #if GODOT_PC 2 | using Godot; 3 | using System; 4 | 5 | namespace ImGuiGodot.Internal; 6 | 7 | internal interface IRenderer : IDisposable 8 | { 9 | public string Name { get; } 10 | public void InitViewport(Rid vprid); 11 | public void CloseViewport(Rid vprid); 12 | public void Render(); 13 | public void OnHide(); 14 | } 15 | #endif 16 | -------------------------------------------------------------------------------- /addons/imgui-godot/ImGuiGodot/Internal/InputLocal.cs: -------------------------------------------------------------------------------- 1 | #if GODOT_PC 2 | using Godot; 3 | using ImGuiNET; 4 | 5 | namespace ImGuiGodot.Internal; 6 | 7 | internal sealed class InputLocal : Input 8 | { 9 | protected override void UpdateMousePos(ImGuiIOPtr io) 10 | { 11 | // do not use global mouse position 12 | } 13 | 14 | public override bool ProcessInput(InputEvent evt) 15 | { 16 | // no support for SubViewport widgets 17 | 18 | if (evt is InputEventMouseMotion mm) 19 | { 20 | var io = ImGui.GetIO(); 21 | var mousePos = mm.Position; 22 | #pragma warning disable IDE0004 // Remove Unnecessary Cast 23 | io.AddMousePosEvent((float)mousePos.X, (float)mousePos.Y); 24 | #pragma warning restore IDE0004 // Remove Unnecessary Cast 25 | mm.Dispose(); 26 | return io.WantCaptureMouse; 27 | } 28 | return HandleEvent(evt); 29 | } 30 | } 31 | #endif 32 | -------------------------------------------------------------------------------- /addons/imgui-godot/ImGuiGodot/Internal/Util.cs: -------------------------------------------------------------------------------- 1 | #if GODOT_PC 2 | using Godot; 3 | using System; 4 | using System.Reflection; 5 | using System.Reflection.Emit; 6 | 7 | namespace ImGuiGodot.Internal; 8 | 9 | internal static class Util 10 | { 11 | public static readonly Func ConstructRid; 12 | 13 | static Util() 14 | { 15 | ConstructorInfo cinfo = typeof(Rid).GetConstructor( 16 | BindingFlags.NonPublic | BindingFlags.Instance, 17 | [typeof(ulong)]) ?? 18 | throw new PlatformNotSupportedException("failed to get Rid constructor"); 19 | DynamicMethod dm = new("ConstructRid", typeof(Rid), [typeof(ulong)]); 20 | ILGenerator il = dm.GetILGenerator(); 21 | il.Emit(OpCodes.Ldarg_0); 22 | il.Emit(OpCodes.Newobj, cinfo); 23 | il.Emit(OpCodes.Ret); 24 | ConstructRid = dm.CreateDelegate>(); 25 | } 26 | } 27 | #endif 28 | -------------------------------------------------------------------------------- /addons/imgui-godot/bin/libimgui-godot-native.linux.debug.x86_64.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ward727a/RPGCreator/f947ae880dbf07ee88a5c0ebad4ffe7e2ff7ea90/addons/imgui-godot/bin/libimgui-godot-native.linux.debug.x86_64.so -------------------------------------------------------------------------------- /addons/imgui-godot/bin/libimgui-godot-native.linux.release.x86_64.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ward727a/RPGCreator/f947ae880dbf07ee88a5c0ebad4ffe7e2ff7ea90/addons/imgui-godot/bin/libimgui-godot-native.linux.release.x86_64.so -------------------------------------------------------------------------------- /addons/imgui-godot/bin/libimgui-godot-native.macos.debug.framework/libimgui-godot-native.macos.debug: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ward727a/RPGCreator/f947ae880dbf07ee88a5c0ebad4ffe7e2ff7ea90/addons/imgui-godot/bin/libimgui-godot-native.macos.debug.framework/libimgui-godot-native.macos.debug -------------------------------------------------------------------------------- /addons/imgui-godot/bin/libimgui-godot-native.macos.release.framework/libimgui-godot-native.macos.release: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ward727a/RPGCreator/f947ae880dbf07ee88a5c0ebad4ffe7e2ff7ea90/addons/imgui-godot/bin/libimgui-godot-native.macos.release.framework/libimgui-godot-native.macos.release -------------------------------------------------------------------------------- /addons/imgui-godot/bin/libimgui-godot-native.windows.debug.x86_64.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ward727a/RPGCreator/f947ae880dbf07ee88a5c0ebad4ffe7e2ff7ea90/addons/imgui-godot/bin/libimgui-godot-native.windows.debug.x86_64.dll -------------------------------------------------------------------------------- /addons/imgui-godot/bin/libimgui-godot-native.windows.release.x86_64.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ward727a/RPGCreator/f947ae880dbf07ee88a5c0ebad4ffe7e2ff7ea90/addons/imgui-godot/bin/libimgui-godot-native.windows.release.x86_64.dll -------------------------------------------------------------------------------- /addons/imgui-godot/bin/~libimgui-godot-native.windows.debug.x86_64.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ward727a/RPGCreator/f947ae880dbf07ee88a5c0ebad4ffe7e2ff7ea90/addons/imgui-godot/bin/~libimgui-godot-native.windows.debug.x86_64.dll -------------------------------------------------------------------------------- /addons/imgui-godot/data/ImGuiRoot.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=2 format=3 uid="uid://dugmpnsxaagba"] 2 | 3 | [ext_resource type="Script" path="res://addons/imgui-godot/scripts/ImGuiRoot.gd" id="1_lney5"] 4 | 5 | [node name="ImGuiRoot" type="Node"] 6 | script = ExtResource("1_lney5") 7 | -------------------------------------------------------------------------------- /addons/imgui-godot/data/ImGuiShader.glsl: -------------------------------------------------------------------------------- 1 | // shader source borrowed from imgui_impl_vulkan.cpp 2 | 3 | #[vertex] 4 | #version 450 core 5 | layout(location = 0) in vec2 aPos; 6 | layout(location = 1) in vec2 aUV; 7 | layout(location = 2) in vec4 aColor; 8 | layout(push_constant) uniform uPushConstant { vec2 uScale; vec2 uTranslate; } pc; 9 | 10 | out gl_PerVertex { vec4 gl_Position; }; 11 | layout(location = 0) out struct { vec4 Color; vec2 UV; } Out; 12 | 13 | void main() 14 | { 15 | Out.Color = aColor; 16 | Out.UV = aUV; 17 | gl_Position = vec4(aPos * pc.uScale + pc.uTranslate, 0, 1); 18 | } 19 | 20 | #[fragment] 21 | #version 450 core 22 | layout(location = 0) out vec4 fColor; 23 | layout(set=0, binding=0) uniform sampler2D sTexture; 24 | layout(location = 0) in struct { vec4 Color; vec2 UV; } In; 25 | 26 | void main() 27 | { 28 | fColor = In.Color * texture(sTexture, In.UV.st); 29 | } 30 | -------------------------------------------------------------------------------- /addons/imgui-godot/data/ImGuiShader.glsl.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="glsl" 4 | type="RDShaderFile" 5 | uid="uid://belucuvjtb04o" 6 | path="res://.godot/imported/ImGuiShader.glsl-2f8c9595e5031ef8022ed7e6f565729e.res" 7 | 8 | [deps] 9 | 10 | source_file="res://addons/imgui-godot/data/ImGuiShader.glsl" 11 | dest_files=["res://.godot/imported/ImGuiShader.glsl-2f8c9595e5031ef8022ed7e6f565729e.res"] 12 | 13 | [params] 14 | 15 | -------------------------------------------------------------------------------- /addons/imgui-godot/imgui-godot-native.gdextension: -------------------------------------------------------------------------------- 1 | [configuration] 2 | 3 | entry_symbol = "ign_init" 4 | compatibility_minimum = 4.2 5 | 6 | [libraries] 7 | 8 | macos.debug = "bin/libimgui-godot-native.macos.debug.framework" 9 | macos.release = "bin/libimgui-godot-native.macos.release.framework" 10 | windows.debug.x86_64 = "bin/libimgui-godot-native.windows.debug.x86_64.dll" 11 | windows.release.x86_64 = "bin/libimgui-godot-native.windows.release.x86_64.dll" 12 | linux.debug.x86_64 = "bin/libimgui-godot-native.linux.debug.x86_64.so" 13 | linux.release.x86_64 = "bin/libimgui-godot-native.linux.release.x86_64.so" 14 | -------------------------------------------------------------------------------- /addons/imgui-godot/include/.gdignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ward727a/RPGCreator/f947ae880dbf07ee88a5c0ebad4ffe7e2ff7ea90/addons/imgui-godot/include/.gdignore -------------------------------------------------------------------------------- /addons/imgui-godot/plugin.cfg: -------------------------------------------------------------------------------- 1 | [plugin] 2 | 3 | name="imgui-godot" 4 | description="Dear ImGui for Godot" 5 | author="Patrick Dawson" 6 | version="6.2.1" 7 | script="scripts/ImGuiPlugin.gd" 8 | -------------------------------------------------------------------------------- /addons/imgui-godot/scripts/ImGuiConfig.gd: -------------------------------------------------------------------------------- 1 | class_name ImGuiConfig extends Resource 2 | 3 | @export_category("Font Settings") 4 | @export var Fonts: Array[ImGuiFont] 5 | @export var AddDefaultFont: bool = true 6 | 7 | @export_category("Other") 8 | @export_range(0.25, 4.0, 0.001, "or_greater") var Scale: float = 1.0 9 | @export var IniFilename: String = "user://imgui.ini" 10 | @export_enum("RenderingDevice", "Canvas", "Dummy") var Renderer: String = "RenderingDevice" 11 | @export_range(-128, 128) var Layer: int = 128 12 | -------------------------------------------------------------------------------- /addons/imgui-godot/scripts/ImGuiFont.gd: -------------------------------------------------------------------------------- 1 | class_name ImGuiFont extends Resource 2 | 3 | @export var FontData: FontFile 4 | @export var FontSize: int = 16 5 | @export var Merge: bool = true 6 | -------------------------------------------------------------------------------- /addons/imgui-godot/scripts/ImGuiRoot.gd: -------------------------------------------------------------------------------- 1 | extends Node 2 | 3 | signal imgui_layout 4 | 5 | const csharp_controller := "res://addons/imgui-godot/ImGuiGodot/ImGuiController.cs" 6 | const csharp_sync := "res://addons/imgui-godot/ImGuiGodot/ImGuiSync.cs" 7 | 8 | func _enter_tree(): 9 | var has_csharp := false 10 | if ClassDB.class_exists("CSharpScript"): 11 | var script := load(csharp_sync) 12 | has_csharp = script.get_instance_base_type() == "Object" 13 | 14 | if ClassDB.class_exists("ImGuiController"): 15 | # native 16 | add_child(ClassDB.instantiate("ImGuiController")) 17 | if has_csharp: 18 | var obj: Object = load(csharp_sync).new() 19 | obj.SyncPtrs() 20 | obj.free() 21 | else: 22 | # C# only 23 | if has_csharp: 24 | add_child(load(csharp_controller).new()) 25 | -------------------------------------------------------------------------------- /addons/luaAPI/bin/.gdignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ward727a/RPGCreator/f947ae880dbf07ee88a5c0ebad4ffe7e2ff7ea90/addons/luaAPI/bin/.gdignore -------------------------------------------------------------------------------- /addons/luaAPI/bin/libluaapi.ios.template_debug.arm64.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ward727a/RPGCreator/f947ae880dbf07ee88a5c0ebad4ffe7e2ff7ea90/addons/luaAPI/bin/libluaapi.ios.template_debug.arm64.dylib -------------------------------------------------------------------------------- /addons/luaAPI/bin/libluaapi.ios.template_debug.universal.simulator.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ward727a/RPGCreator/f947ae880dbf07ee88a5c0ebad4ffe7e2ff7ea90/addons/luaAPI/bin/libluaapi.ios.template_debug.universal.simulator.dylib -------------------------------------------------------------------------------- /addons/luaAPI/bin/libluaapi.ios.template_release.arm64.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ward727a/RPGCreator/f947ae880dbf07ee88a5c0ebad4ffe7e2ff7ea90/addons/luaAPI/bin/libluaapi.ios.template_release.arm64.dylib -------------------------------------------------------------------------------- /addons/luaAPI/bin/libluaapi.ios.template_release.universal.simulator.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ward727a/RPGCreator/f947ae880dbf07ee88a5c0ebad4ffe7e2ff7ea90/addons/luaAPI/bin/libluaapi.ios.template_release.universal.simulator.dylib -------------------------------------------------------------------------------- /addons/luaAPI/bin/libluaapi.linux.template_debug.x86_32.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ward727a/RPGCreator/f947ae880dbf07ee88a5c0ebad4ffe7e2ff7ea90/addons/luaAPI/bin/libluaapi.linux.template_debug.x86_32.so -------------------------------------------------------------------------------- /addons/luaAPI/bin/libluaapi.linux.template_debug.x86_64.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ward727a/RPGCreator/f947ae880dbf07ee88a5c0ebad4ffe7e2ff7ea90/addons/luaAPI/bin/libluaapi.linux.template_debug.x86_64.so -------------------------------------------------------------------------------- /addons/luaAPI/bin/libluaapi.linux.template_release.x86_32.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ward727a/RPGCreator/f947ae880dbf07ee88a5c0ebad4ffe7e2ff7ea90/addons/luaAPI/bin/libluaapi.linux.template_release.x86_32.so -------------------------------------------------------------------------------- /addons/luaAPI/bin/libluaapi.linux.template_release.x86_64.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ward727a/RPGCreator/f947ae880dbf07ee88a5c0ebad4ffe7e2ff7ea90/addons/luaAPI/bin/libluaapi.linux.template_release.x86_64.so -------------------------------------------------------------------------------- /addons/luaAPI/bin/libluaapi.macos.template_debug.universal.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ward727a/RPGCreator/f947ae880dbf07ee88a5c0ebad4ffe7e2ff7ea90/addons/luaAPI/bin/libluaapi.macos.template_debug.universal.dylib -------------------------------------------------------------------------------- /addons/luaAPI/bin/libluaapi.macos.template_release.universal.dylib: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ward727a/RPGCreator/f947ae880dbf07ee88a5c0ebad4ffe7e2ff7ea90/addons/luaAPI/bin/libluaapi.macos.template_release.universal.dylib -------------------------------------------------------------------------------- /addons/luaAPI/bin/libluaapi.windows.template_debug.x86_32.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ward727a/RPGCreator/f947ae880dbf07ee88a5c0ebad4ffe7e2ff7ea90/addons/luaAPI/bin/libluaapi.windows.template_debug.x86_32.dll -------------------------------------------------------------------------------- /addons/luaAPI/bin/libluaapi.windows.template_debug.x86_64.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ward727a/RPGCreator/f947ae880dbf07ee88a5c0ebad4ffe7e2ff7ea90/addons/luaAPI/bin/libluaapi.windows.template_debug.x86_64.dll -------------------------------------------------------------------------------- /addons/luaAPI/bin/libluaapi.windows.template_release.x86_32.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ward727a/RPGCreator/f947ae880dbf07ee88a5c0ebad4ffe7e2ff7ea90/addons/luaAPI/bin/libluaapi.windows.template_release.x86_32.dll -------------------------------------------------------------------------------- /addons/luaAPI/bin/libluaapi.windows.template_release.x86_64.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ward727a/RPGCreator/f947ae880dbf07ee88a5c0ebad4ffe7e2ff7ea90/addons/luaAPI/bin/libluaapi.windows.template_release.x86_64.dll -------------------------------------------------------------------------------- /addons/luaAPI/bin/~libluaapi.windows.template_debug.x86_64.dll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ward727a/RPGCreator/f947ae880dbf07ee88a5c0ebad4ffe7e2ff7ea90/addons/luaAPI/bin/~libluaapi.windows.template_debug.x86_64.dll -------------------------------------------------------------------------------- /addons/luaAPI/luaAPI.gdextension: -------------------------------------------------------------------------------- 1 | [configuration] 2 | entry_symbol = "luaAPI_library_init" 3 | compatibility_minimum = 4.2 4 | 5 | [libraries] 6 | linux.x86_64.debug = "bin/libluaapi.linux.template_debug.x86_64.so" 7 | linux.x86_64.release = "bin/libluaapi.linux.template_release.x86_64.so" 8 | linux.x86_32.debug = "bin/libluaapi.linux.template_debug.x86_32.so" 9 | linux.x86_32.release = "bin/libluaapi.linux.template_release.x86_32.so" 10 | 11 | windows.x86_64.debug = "bin/libluaapi.windows.template_debug.x86_64.dll" 12 | windows.x86_64.release = "bin/libluaapi.windows.template_release.x86_64.dll" 13 | windows.x86_32.debug = "bin/libluaapi.windows.template_debug.x86_32.dll" 14 | windows.x86_32.release = "bin/libluaapi.windows.template_release.x86_32.dll" 15 | 16 | android.debug.x86_64 = "bin/libluaapi.android.template_debug.x86_64.so" 17 | android.release.x86_64 = "bin/libluaapi.android.template_release.x86_64.so" 18 | android.debug.arm64 = "bin/libluaapi.android.template_debug.arm64.so" 19 | android.release.arm64 = "bin/libluaapi.android.template_release.arm64.so" 20 | 21 | macos.debug = "bin/libluaapi.macos.template_debug.universal.dylib" 22 | macos.release = "bin/libluaapi.macos.template_release.universal.dylib" 23 | 24 | ios.debug.arm64 = "bin/libluaapi.ios.template_debug.arm64.dylib" 25 | ios.release.arm64 = "bin/libluaapi.ios.template_release.arm64.dylib" 26 | ios.debug.simulator = "bin/libluaapi.ios.template_debug.universal.simulator.dylib" 27 | ios.release.simulator = "bin/libluaapi.ios.template_release.universal.simulator.dylib" 28 | -------------------------------------------------------------------------------- /addons/sound_manager/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright © 2024 Xecestel 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 8 | 9 | -------------------------------------------------------------------------------- /addons/sound_manager/dock/SoundManagerDock.cfg: -------------------------------------------------------------------------------- 1 | [window] 2 | 3 | title="Sound Manager" 4 | rect_min_size=Vector2( 0, 140 ) 5 | 6 | [debug] 7 | 8 | print_debug_messages=true 9 | -------------------------------------------------------------------------------- /addons/sound_manager/dock/assets/add_icon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /addons/sound_manager/dock/assets/add_icon.svg.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://cfgkona1snqnw" 6 | path="res://.godot/imported/add_icon.svg-7a0077aa33d926acabad88aeedd4437d.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://addons/sound_manager/dock/assets/add_icon.svg" 14 | dest_files=["res://.godot/imported/add_icon.svg-7a0077aa33d926acabad88aeedd4437d.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | svg/scale=1.0 36 | editor/scale_with_editor_scale=false 37 | editor/convert_colors_with_editor_theme=false 38 | -------------------------------------------------------------------------------- /addons/sound_manager/dock/assets/check-outline.svg.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="StreamTexture" 5 | path="res://.import/check-outline.svg-bc5fb68698d0307793af0c0ac8c1cad2.stex" 6 | metadata={ 7 | "vram_texture": false 8 | } 9 | 10 | [deps] 11 | 12 | source_file="res://addons/sound_manager/dock/assets/check-outline.svg" 13 | dest_files=[ "res://.import/check-outline.svg-bc5fb68698d0307793af0c0ac8c1cad2.stex" ] 14 | 15 | [params] 16 | 17 | compress/mode=0 18 | compress/lossy_quality=0.7 19 | compress/hdr_mode=0 20 | compress/bptc_ldr=0 21 | compress/normal_map=0 22 | flags/repeat=0 23 | flags/filter=true 24 | flags/mipmaps=false 25 | flags/anisotropic=false 26 | flags/srgb=2 27 | process/fix_alpha_border=true 28 | process/premult_alpha=false 29 | process/HDR_as_SRGB=false 30 | process/invert_color=false 31 | stream=false 32 | size_limit=0 33 | detect_3d=true 34 | svg/scale=1.0 35 | -------------------------------------------------------------------------------- /addons/sound_manager/dock/assets/folder_icon.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /addons/sound_manager/dock/assets/folder_icon.svg.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://bwij5tgprr2pr" 6 | path="res://.godot/imported/folder_icon.svg-337eb776e5e20dc8e448418c3a693d29.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://addons/sound_manager/dock/assets/folder_icon.svg" 14 | dest_files=["res://.godot/imported/folder_icon.svg-337eb776e5e20dc8e448418c3a693d29.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | svg/scale=1.0 36 | editor/scale_with_editor_scale=false 37 | editor/convert_colors_with_editor_theme=false 38 | -------------------------------------------------------------------------------- /addons/sound_manager/dock/assets/remove_icon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /addons/sound_manager/dock/assets/remove_icon.svg.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://bv8tlytme3nwp" 6 | path="res://.godot/imported/remove_icon.svg-ba717f4e40a57b2610d1336cbdfd7272.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://addons/sound_manager/dock/assets/remove_icon.svg" 14 | dest_files=["res://.godot/imported/remove_icon.svg-ba717f4e40a57b2610d1336cbdfd7272.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | svg/scale=1.0 36 | editor/scale_with_editor_scale=false 37 | editor/convert_colors_with_editor_theme=false 38 | -------------------------------------------------------------------------------- /addons/sound_manager/dock/assets/restore.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /addons/sound_manager/dock/assets/restore.svg.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://b7c8ya4xhor0q" 6 | path="res://.godot/imported/restore.svg-1f1ecd3f58b6a3fc813b85f81301387b.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://addons/sound_manager/dock/assets/restore.svg" 14 | dest_files=["res://.godot/imported/restore.svg-1f1ecd3f58b6a3fc813b85f81301387b.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | svg/scale=1.0 36 | editor/scale_with_editor_scale=false 37 | editor/convert_colors_with_editor_theme=false 38 | -------------------------------------------------------------------------------- /addons/sound_manager/dock/assets/save_icon.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /addons/sound_manager/dock/assets/save_icon.svg.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://4t3d17idb5o6" 6 | path="res://.godot/imported/save_icon.svg-2224c3835042bfaa6d491ab296a77ed1.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://addons/sound_manager/dock/assets/save_icon.svg" 14 | dest_files=["res://.godot/imported/save_icon.svg-2224c3835042bfaa6d491ab296a77ed1.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | svg/scale=1.0 36 | editor/scale_with_editor_scale=false 37 | editor/convert_colors_with_editor_theme=false 38 | -------------------------------------------------------------------------------- /addons/sound_manager/dock/assets/slider_grabber.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /addons/sound_manager/dock/assets/slider_grabber.svg.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://25dn21f8amun" 6 | path="res://.godot/imported/slider_grabber.svg-237ba107a4032a809df4a34436de6ec1.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://addons/sound_manager/dock/assets/slider_grabber.svg" 14 | dest_files=["res://.godot/imported/slider_grabber.svg-237ba107a4032a809df4a34436de6ec1.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | svg/scale=1.0 36 | editor/scale_with_editor_scale=false 37 | editor/convert_colors_with_editor_theme=false 38 | -------------------------------------------------------------------------------- /addons/sound_manager/dock/assets/slider_grabber_highlighted.svg: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /addons/sound_manager/dock/assets/slider_grabber_highlighted.svg.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://dl0vqixpxa80t" 6 | path="res://.godot/imported/slider_grabber_highlighted.svg-03ecfbe10c3f8f542304dc2d33b3b9f8.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://addons/sound_manager/dock/assets/slider_grabber_highlighted.svg" 14 | dest_files=["res://.godot/imported/slider_grabber_highlighted.svg-03ecfbe10c3f8f542304dc2d33b3b9f8.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | svg/scale=1.0 36 | editor/scale_with_editor_scale=false 37 | editor/convert_colors_with_editor_theme=false 38 | -------------------------------------------------------------------------------- /addons/sound_manager/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Ward727a/RPGCreator/f947ae880dbf07ee88a5c0ebad4ffe7e2ff7ea90/addons/sound_manager/icon.png -------------------------------------------------------------------------------- /addons/sound_manager/icon.png.import: -------------------------------------------------------------------------------- 1 | [remap] 2 | 3 | importer="texture" 4 | type="CompressedTexture2D" 5 | uid="uid://bdibiohpnla02" 6 | path="res://.godot/imported/icon.png-5680e0d378f47e6cf374fc646d6055c2.ctex" 7 | metadata={ 8 | "vram_texture": false 9 | } 10 | 11 | [deps] 12 | 13 | source_file="res://addons/sound_manager/icon.png" 14 | dest_files=["res://.godot/imported/icon.png-5680e0d378f47e6cf374fc646d6055c2.ctex"] 15 | 16 | [params] 17 | 18 | compress/mode=0 19 | compress/high_quality=false 20 | compress/lossy_quality=0.7 21 | compress/hdr_compression=1 22 | compress/normal_map=0 23 | compress/channel_pack=0 24 | mipmaps/generate=false 25 | mipmaps/limit=-1 26 | roughness/mode=0 27 | roughness/src_normal="" 28 | process/fix_alpha_border=true 29 | process/premult_alpha=false 30 | process/normal_map_invert_y=false 31 | process/hdr_as_srgb=false 32 | process/hdr_clamp_exposure=false 33 | process/size_limit=0 34 | detect_3d/compress_to=1 35 | -------------------------------------------------------------------------------- /addons/sound_manager/module/LICENSE: -------------------------------------------------------------------------------- 1 | Copyright © 2024 Xecestel 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: 4 | 5 | The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. 6 | 7 | THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 8 | 9 | -------------------------------------------------------------------------------- /addons/sound_manager/module/SoundManager.tscn: -------------------------------------------------------------------------------- 1 | [gd_scene load_steps=2 format=3 uid="uid://vqnqvndpsftt"] 2 | 3 | [ext_resource type="Script" path="res://addons/sound_manager/module/internal_scripts/SoundManager.gd" id="1"] 4 | 5 | [node name="SoundManager" type="Node"] 6 | script = ExtResource("1") 7 | preload_resources = true 8 | -------------------------------------------------------------------------------- /addons/sound_manager/module/internal_scripts/SoundManager_config.gd: -------------------------------------------------------------------------------- 1 | class_name SoundManagerModule 2 | extends Node 3 | 4 | #################################################################### 5 | #CONFIGURATION FILE FOR THE SOUND MANAGER FOR GODOT 4 6 | # © Xecestel 7 | #################################################################### 8 | # 9 | # This Source Code Form is subject to the terms of the MIT License. 10 | # If a copy of the license was not distributed with this 11 | # file, You can obtain one at https://mit-license.org/. 12 | # 13 | ############################################ 14 | 15 | @export var Audio_Files_Dictionary : Dictionary = { 16 | "SoundName1" : "sound_file_name.extension", 17 | } 18 | -------------------------------------------------------------------------------- /addons/sound_manager/module/internal_scripts/Sounds.gd: -------------------------------------------------------------------------------- 1 | extends AudioStreamPlayer 2 | 3 | #################################################################### 4 | #SOUNDS SCRIPT FOR THE SOUND MANAGER MODULE FOR GODOT 4 5 | # © Xecestel 6 | #################################################################### 7 | # 8 | # This Source Code Form is subject to the terms of the MIT License. 9 | # If a copy of the license was not distributed with this 10 | # file, You can obtain one at https://mit-license.org/. 11 | # 12 | ##################################### 13 | 14 | # Variables 15 | 16 | var sound_type : String 17 | var sound_name : String; 18 | 19 | ########### 20 | 21 | # Signals 22 | 23 | signal finished_playing(sound_name : String) 24 | 25 | ########## 26 | 27 | 28 | func _ready(): 29 | self.set_properties(); 30 | 31 | 32 | func connect_signals(connect_to : Node) -> void: 33 | finished.connect(_on_self_finished) 34 | finished_playing.connect(connect_to._on_sound_finished); 35 | 36 | 37 | func set_properties(volume_db : float = 0.0, pitch_scale : float = 1.0) -> void: 38 | self.set_volume_db(volume_db); 39 | self.set_pitch_scale(pitch_scale); 40 | 41 | 42 | func set_sound_name(sound_name : String) -> void: 43 | self.sound_name = sound_name; 44 | 45 | 46 | func set_sound_type(type : String) -> void: 47 | self.sound_type = type 48 | 49 | 50 | func get_sound_type() -> String: 51 | return self.sound_type 52 | 53 | 54 | func get_sound_name() -> String: 55 | return sound_name 56 | 57 | 58 | func _on_self_finished() -> void: 59 | emit_signal("finished_playing", self.get_sound_name()); 60 | 61 | -------------------------------------------------------------------------------- /addons/sound_manager/plugin.cfg: -------------------------------------------------------------------------------- 1 | [plugin] 2 | name="Sound Manager" 3 | description="A useful Sound Manager for Godot 3 that gives the user more power on the audio of the game." 4 | author="Xecestel & Sarturo" 5 | version="4.0" 6 | script="plugin.gd" 7 | -------------------------------------------------------------------------------- /addons/sound_manager/sound_manager.json: -------------------------------------------------------------------------------- 1 | {"Audio_Busses":{"BGM":"","BGS":"","MFX":"","SFX":""},"Audio_Files_Dictionary":{},"DEBUG":false,"DEFAULT_SOUNDS_PROPERTIES":{"BGM":{"Pitch":1,"Volume":0},"BGS":{"Pitch":1,"Volume":0},"MFX":{"Pitch":1,"Volume":0},"SFX":{"Pitch":1,"Volume":0}},"PREINSTANTIATE_NODES":false,"PRELOAD_RES":false} -------------------------------------------------------------------------------- /project.godot: -------------------------------------------------------------------------------- 1 | ; Engine configuration file. 2 | ; It's best edited using the editor UI and not directly, 3 | ; since the parameters that go here are not all obvious. 4 | ; 5 | ; Format: 6 | ; [section] ; section goes between [] 7 | ; param=value ; assign values to parameters 8 | 9 | config_version=5 10 | 11 | [application] 12 | 13 | config/name="RPGCreatorV2" 14 | config/use_custom_user_dir=true 15 | config/custom_user_dir_name="RPGCreator" 16 | config/features=PackedStringArray("4.2", "Forward Plus") 17 | run/max_fps=144 18 | boot_splash/show_image=false 19 | boot_splash/image="res://Assets/icon.png" 20 | boot_splash/fullsize=false 21 | boot_splash/use_filter=false 22 | config/icon="res://Assets/icon.png" 23 | 24 | [autoload] 25 | 26 | ImGuiRoot="*res://addons/imgui-godot/data/ImGuiRoot.tscn" 27 | SoundManager="*res://addons/sound_manager/module/SoundManager.tscn" 28 | 29 | [display] 30 | 31 | window/size/mode=2 32 | window/subwindows/embed_subwindows=false 33 | window/per_pixel_transparency/allowed=true 34 | 35 | [dotnet] 36 | 37 | project/assembly_name="RPGCreatorV2" 38 | 39 | [editor_plugins] 40 | 41 | enabled=PackedStringArray("res://addons/imgui-godot/plugin.cfg", "res://addons/sound_manager/plugin.cfg", "res://addons/gdUnit4/plugin.cfg") 42 | 43 | [gdunit4] 44 | 45 | settings/test/test_lookup_folder="Tests" 46 | --------------------------------------------------------------------------------