Scrap !!
This commit is contained in:
@@ -150,11 +150,16 @@ Deno.test("an entity needs a texture and a size", () => {
|
||||
Deno.test("an entity without a model is drawn as its texture, and a scripted one has no ai", () => {
|
||||
assertEquals(validate_entity({ id: "a:b", texture: "a:b", behavior: "scripted", width: 0.25, height: 0.25 }), []);
|
||||
assertEquals(validate_entity({ id: "a:b", texture: "a:b", behavior: "flying", width: 0.25, height: 0.25 }), [
|
||||
'behavior must be "animal", "monster", "scripted" or a behavior id like "my_mod:thing"',
|
||||
'behavior must be "animal", "monster", "scripted", "object" or a behavior id like "my_mod:thing"',
|
||||
]);
|
||||
assertEquals(validate_entity({ id: "a:b", texture: "a:b", behavior: "a:flying", width: 0.25, height: 0.25 }), []);
|
||||
});
|
||||
|
||||
Deno.test("only an object can go without a texture, it's drawn as the item it holds", () => {
|
||||
assertEquals(validate_entity({ id: "a:b", behavior: "object", width: 0.5, height: 0.5 }), []);
|
||||
assertEquals(validate_entity({ id: "a:b", width: 0.5, height: 0.5 }).length, 1);
|
||||
});
|
||||
|
||||
Deno.test("an entity can say it doesn't jump and how far it drops, in whole blocks", () => {
|
||||
const entity = { id: "a:b", texture: "a:b", width: 1, height: 1 };
|
||||
assertEquals(validate_entity({ ...entity, jumps: false, max_fall: 0 }), []);
|
||||
|
||||
Reference in New Issue
Block a user