From 92c10440a1441a2516d950acff5ff9e0c4f5c160 Mon Sep 17 00:00:00 2001 From: Kazhnuz Date: Sat, 23 Jan 2021 11:28:40 +0100 Subject: [PATCH] fix: search global asset only if there is no local --- birb/core/assets.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/birb/core/assets.lua b/birb/core/assets.lua index 45ed313..3eac342 100644 --- a/birb/core/assets.lua +++ b/birb/core/assets.lua @@ -70,13 +70,14 @@ function AssetManager:get(name) local asset if self.locals[name] ~= nil then asset = self.locals[name] + else + asset = self.globals[name] end - asset = self.globals[name] if (asset ~= nil) then return asset else - core.debug:fail("birb.modules.assets", "L'asset " .. name .. " n'existe pas.") + core.debug:fail("core.assets", "L'asset " .. name .. " n'existe pas.") end end