From d019247ae404ce0361fcbcdd4515f17c55febea2 Mon Sep 17 00:00:00 2001 From: Insality Date: Wed, 2 Jul 2025 21:50:48 +0300 Subject: [PATCH] Update for event v12 --- .vscode/settings.json | 3 ++- README.md | 2 +- druid/custom/tiling_node/tiling_node.lua | 4 ++-- druid/druid.script | 8 ++++---- game.project | 4 ++-- 5 files changed, 11 insertions(+), 10 deletions(-) diff --git a/.vscode/settings.json b/.vscode/settings.json index 277b66a..ba8f221 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -33,7 +33,8 @@ "Lua.runtime.version": "Lua 5.1", "Lua.workspace.library": [ "~/Library/Application Support/Cursor/User/globalStorage/astronachos.defold", - "~/Library/Application Support/Cursor/User/workspaceStorage/1446075a23c89451a63f0e82b2291def/astronachos.defold" + "~/Library/Application Support/Cursor/User/workspaceStorage/1446075a23c89451a63f0e82b2291def/astronachos.defold", + "~/Library/Application Support/Cursor/User/workspaceStorage/7975bec62a9fa9724d190779fa01ec63/astronachos.defold" ], "files.exclude": { "**/*.gui": true diff --git a/README.md b/README.md index c8ec557..f03b0c3 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ https://github.com/Insality/druid/archive/refs/tags/1.1.4.zip **[Defold Event](https://github.com/Insality/defold-event)** ``` -https://github.com/Insality/defold-event/archive/refs/tags/11.zip +https://github.com/Insality/defold-event/archive/refs/tags/12.zip ``` After that, select `Project ▸ Fetch Libraries` to update [library dependencies]((https://defold.com/manuals/libraries/#setting-up-library-dependencies)). This happens automatically whenever you open a project so you will only need to do this if the dependencies change without re-opening the project. diff --git a/druid/custom/tiling_node/tiling_node.lua b/druid/custom/tiling_node/tiling_node.lua index 2fef09b..bea3cd6 100644 --- a/druid/custom/tiling_node/tiling_node.lua +++ b/druid/custom/tiling_node/tiling_node.lua @@ -1,6 +1,6 @@ local component = require("druid.component") local helper = require("druid.helper") -local defer = require("event.defer") +local queues = require("event.queues") ---@class druid.tiling_node: druid.component ---@field animation table @@ -28,7 +28,7 @@ function M:init(node) print("The druid.script is not found, please add it nearby to the GUI collection", msg.url()) end) - defer.push("druid.get_atlas_path", { + queues.push("druid.get_atlas_path", { texture_name = gui.get_texture(self.node), sender = msg.url(), }, self.on_get_atlas_path, self) diff --git a/druid/druid.script b/druid/druid.script index 61738f7..a40fe8b 100644 --- a/druid/druid.script +++ b/druid/druid.script @@ -3,9 +3,9 @@ -- This one is a required to make a unified "Shaders" pipeline in the GUI scripts -- This required to grab a texture data with `go.get` function -local defer = require("event.defer") +local queues = require("event.queues") ----Usage: defer.push("druid.get_atlas_path", { +---Usage: queues.push("druid.get_atlas_path", { --- texture_name = gui.get_texture(self.node), --- sender = msg.url(), ---}, callback, [context]) @@ -35,10 +35,10 @@ end function init(self) - defer.subscribe(MESSAGE_GET_ATLAS_PATH, get_atlas_path, self) + queues.subscribe(MESSAGE_GET_ATLAS_PATH, get_atlas_path, self) end function final(self) - defer.unsubscribe(MESSAGE_GET_ATLAS_PATH, get_atlas_path, self) + queues.unsubscribe(MESSAGE_GET_ATLAS_PATH, get_atlas_path, self) end diff --git a/game.project b/game.project index 8ae4531..7375436 100644 --- a/game.project +++ b/game.project @@ -23,7 +23,7 @@ dependencies#1 = https://github.com/Insality/defold-saver/archive/refs/tags/5.zi dependencies#2 = https://github.com/Insality/defold-tweener/archive/refs/tags/3.zip dependencies#3 = https://github.com/Insality/panthera/archive/refs/tags/runtime.4.zip dependencies#4 = https://github.com/Insality/defold-lang/archive/refs/tags/3.zip -dependencies#5 = https://github.com/Insality/defold-event/archive/refs/tags/11.zip +dependencies#5 = https://github.com/Insality/defold-event/archive/refs/tags/12.zip dependencies#6 = https://github.com/subsoap/defos/archive/refs/tags/v2.8.0.zip [library] @@ -58,7 +58,7 @@ cssfile = /builtins/manifests/web/dark_theme.css show_console_banner = 0 [native_extension] -app_manifest = +app_manifest = [graphics] texture_profiles = /builtins/graphics/default.texture_profiles