Implement tags !

This commit is contained in:
2026-09-30 13:41:29 -03:00
parent dc70ada7c4
commit 342b45d593
51 changed files with 978 additions and 219 deletions
+2
View File
@@ -3,6 +3,7 @@
import { BlockRegistry, EverythingRegistry, ItemRegistry } from "$/common/everything_registry.ts";
import { Container as EngineContainer, ItemStack as EngineItemStack } from "$/common/inventory.ts";
import { get_state_value, set_state_value } from "$/common/utils.ts";
import { tag_api } from "$/common/tags.ts";
import type {
BlockComponent,
BlockRef,
@@ -514,6 +515,7 @@ export class ModRuntime {
},
list: (type) => structuredClone(game().recipes.by_type.get(type) ?? []),
},
tags: tag_api(),
containers: {
create: (size) => {
if (!Number.isInteger(size) || size < 1 || size > MAX_CONTAINER_SIZE) {