Remove uncompleted stuff

This commit is contained in:
Insality
2025-03-26 23:30:29 +02:00
parent 91f2d593d2
commit dee77ab313
17 changed files with 13 additions and 600 deletions

View File

@@ -1,37 +0,0 @@
-- Place this script nearby with the gui component to able make requests
-- To the go namespace from GUI with events systems (cross context)
local event_queue = require("druid.event_queue")
---Usage: event_queue.request("druid.get_atlas_path", callback, gui.get_texture(self.node), msg.url())
---Pass texture name to get atlas info and sender url to check if the request is valid
local MESSAGE_GET_ATLAS_PATH = "druid.get_atlas_path"
---@param texture_name hash The name from gui.get_texture(node)
---@param sender hash Just msg.url from the caller
local function get_atlas_path(texture_name, sender)
local my_url = msg.url()
my_url.fragment = nil
local copy_url = msg.url(sender)
copy_url.fragment = nil
-- This check should works well
local is_my_url = my_url == copy_url
if not is_my_url then
return nil
end
return go.get(sender, "textures", { key = texture_name })
end
function init(self)
event_queue.subscribe(MESSAGE_GET_ATLAS_PATH, get_atlas_path)
end
function final(self)
event_queue.unsubscribe(MESSAGE_GET_ATLAS_PATH, get_atlas_path)
end