Add sell value for every block and item in the game, crazy
This commit is contained in:
+6
-2
@@ -92,7 +92,8 @@ export function check_references(mods: LoadedMod[], engine_textures: Iterable<st
|
||||
add(block_owners, json.id, mod.id);
|
||||
if (json.item !== false) add(item_owners, json.id, mod.id);
|
||||
}
|
||||
for (const { json } of mod.items) add(item_owners, json.id, mod.id);
|
||||
// one without a texture is the item of the mod's block, which is already counted
|
||||
for (const { json } of mod.items) if (json.texture !== undefined) add(item_owners, json.id, mod.id);
|
||||
for (const { json } of mod.models) add(model_owners, json.id, mod.id);
|
||||
for (const { json } of mod.entities) {
|
||||
add(entity_owners, json.id, mod.id);
|
||||
@@ -182,7 +183,10 @@ export function check_references(mods: LoadedMod[], engine_textures: Iterable<st
|
||||
if ((item_owners.get(json.id)?.length ?? 0) > 1) {
|
||||
errors.push(`${file}: item ${json.id} is also defined by ${item_owners.get(json.id)!.join(", ")}`);
|
||||
}
|
||||
uses(file, json.texture, "texture");
|
||||
if (json.texture !== undefined) uses(file, json.texture, "texture");
|
||||
else if (!mod.blocks.some((block) => block.json.id === json.id && block.json.item !== false)) {
|
||||
errors.push(`${file}: item ${json.id} has no texture, and no block of this mod gives it an item`);
|
||||
}
|
||||
for (const texture of Object.values(json.data_textures ?? {})) uses(file, texture, "texture");
|
||||
if (json.places) uses(file, json.places, "block");
|
||||
if (json.food?.returns) uses(file, json.food.returns, "item");
|
||||
|
||||
Reference in New Issue
Block a user