mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-10 13:31:49 +00:00
small fixes
This commit is contained in:
parent
6afb5c8c0f
commit
1cf4fb8703
2 changed files with 9 additions and 5 deletions
|
|
@ -7,7 +7,7 @@
|
||||||
```lua
|
```lua
|
||||||
-- Запрашивает фоновую загрузку текстуры
|
-- Запрашивает фоновую загрузку текстуры
|
||||||
assets.request_texture(
|
assets.request_texture(
|
||||||
-- Файла изображения
|
-- Файл изображения
|
||||||
filename: string,
|
filename: string,
|
||||||
-- Имя текстуры после загрузки
|
-- Имя текстуры после загрузки
|
||||||
name: string,
|
name: string,
|
||||||
|
|
|
||||||
|
|
@ -327,10 +327,14 @@ bool AssetsLoader::loadExternalTexture(
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
for (auto& path : alternatives) {
|
for (auto& path : alternatives) {
|
||||||
logger.info() << (path.string() + ".png");
|
if (io::exists(path)) {
|
||||||
if (io::exists(path.string() + ".png")) {
|
loader.add(
|
||||||
loader.add(AssetType::TEXTURE, path.string(), name, nullptr);
|
AssetType::TEXTURE,
|
||||||
return true; // TODO: fallbacks support
|
(path.parent() / path.stem()).string(),
|
||||||
|
name,
|
||||||
|
nullptr
|
||||||
|
);
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue