fix: search global asset only if there is no local
This commit is contained in:
parent
e5d8e699bc
commit
92c10440a1
1 changed files with 3 additions and 2 deletions
|
@ -70,13 +70,14 @@ function AssetManager:get(name)
|
||||||
local asset
|
local asset
|
||||||
if self.locals[name] ~= nil then
|
if self.locals[name] ~= nil then
|
||||||
asset = self.locals[name]
|
asset = self.locals[name]
|
||||||
|
else
|
||||||
|
asset = self.globals[name]
|
||||||
end
|
end
|
||||||
asset = self.globals[name]
|
|
||||||
|
|
||||||
if (asset ~= nil) then
|
if (asset ~= nil) then
|
||||||
return asset
|
return asset
|
||||||
else
|
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
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue