Animators and coilhead animations

This commit is contained in:
2026-11-21 21:54:02 -03:00
parent 69ad4b80d0
commit 0c711b8163
21 changed files with 960 additions and 34 deletions
+6
View File
@@ -750,6 +750,12 @@ export class ModRuntime {
mob.level.entity_event(mob, "swing");
mob.do_hurt_target(entity);
},
get_client_data: (field) => structuredClone(mob.client_data[field]) as never,
set_client_data(field, value) {
if (typeof field !== "string" || field === "") throw new Error("a client data field needs a name");
const { [field]: _, ...rest } = mob.client_data;
mob.client_data = value === undefined ? rest : { ...rest, [field]: structuredClone(value) };
},
};
return Object.defineProperties(living_ref(mob), Object.getOwnPropertyDescriptors(extra)) as MobRef;
}