Allow for textures that aren't 16x16
This commit is contained in:
+3
-3
@@ -11,7 +11,7 @@ import {
|
||||
validate_recipe,
|
||||
} from "$/common/mod_data.ts";
|
||||
import { check_references, load_order, type LoadedMod, type ModReport } from "$/common/mod_check.ts";
|
||||
import { png_size } from "$/common/bmod.ts";
|
||||
import { png_size, texture_size_problem } from "$/common/bmod.ts";
|
||||
|
||||
export { load_order, type LoadedMod, type ModReport };
|
||||
|
||||
@@ -140,8 +140,8 @@ function load_mod(mods_dir: string, id: string): LoadedMod {
|
||||
const size = png_size(Deno.readFileSync(`${dir}/textures/${file}`));
|
||||
if (!size) {
|
||||
error(`textures/${file}: isn't a png`);
|
||||
} else if (size.width !== 16 || size.height !== 16) {
|
||||
error(`textures/${file}: is ${size.width}×${size.height}, textures must be 16×16`);
|
||||
} else if (texture_size_problem(size)) {
|
||||
error(`textures/${file}: ${texture_size_problem(size)}`);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user