Animation clips

This commit is contained in:
2026-11-21 20:07:10 -03:00
parent 607be76ca6
commit 69ad4b80d0
10 changed files with 514 additions and 6 deletions
+6
View File
@@ -10,6 +10,7 @@ import {
choice_ids,
choice_list,
choice_problems,
ClipJson,
EffectJson,
EntityJson,
EntityModelJson,
@@ -59,6 +60,8 @@ export interface ModData {
spawns: SpawnJson[];
entities: EntityJson[];
entity_models: EntityModelJson[];
// clips, see ANIMATION.md. missing from mods packed before there were any
animations?: ClipJson[];
// status effects, see EffectJson
effects: EffectJson[];
// kinds of fluid, see FluidJson
@@ -224,6 +227,9 @@ export function register_mod_data(mods: { id: string; data: ModData }[]): Recipe
for (const model of data.entity_models) {
EverythingRegistry.register<EntityModelJson>("entity_models", model.id, model);
}
for (const clip of data.animations ?? []) {
EverythingRegistry.register<ClipJson>("animations", clip.id, clip);
}
for (const json of data.entities) {
EverythingRegistry.register<EntityJson>("entities", json.id, json);
}