Entities can have now a default view other than the first one provided for them.master
| @@ -459,6 +459,11 @@ function makeEntity(info, views, sizes) { | |||||
| this.view = viewKey; | this.view = viewKey; | ||||
| } | } | ||||
| if (view.default) { | |||||
| this.defaultView = viewKey; | |||||
| this.view = viewKey; | |||||
| } | |||||
| Object.entries(view.attributes).forEach(([key, val]) => { | Object.entries(view.attributes).forEach(([key, val]) => { | ||||
| Object.defineProperty( | Object.defineProperty( | ||||
| view, | view, | ||||
| @@ -16,7 +16,8 @@ function makeCharacter(info, viewInfo, defaultSizes) { | |||||
| image: value.image, | image: value.image, | ||||
| name: value.name, | name: value.name, | ||||
| info: value.info, | info: value.info, | ||||
| rename: value.rename | |||||
| rename: value.rename, | |||||
| default: value.default | |||||
| } | } | ||||
| if (value.weight) { | if (value.weight) { | ||||
| @@ -24,17 +24,18 @@ speciesMakers["Synx"] = () => { | |||||
| }, | }, | ||||
| synx: { | synx: { | ||||
| height: math.unit(3.4, "feet"), | height: math.unit(3.4, "feet"), | ||||
| weight: math.unit(150, "lb"), | |||||
| weight: math.unit(300, "lb"), | |||||
| name: "Synx", | name: "Synx", | ||||
| image: { | image: { | ||||
| source: "./media/species/synx/synx.svg", | source: "./media/species/synx/synx.svg", | ||||
| extra: 8.06 / 6.6, | extra: 8.06 / 6.6, | ||||
| bottom: 0.05 | bottom: 0.05 | ||||
| } | |||||
| }, | |||||
| default: true | |||||
| }, | }, | ||||
| weeper: { | weeper: { | ||||
| height: math.unit(3.9, "feet"), | height: math.unit(3.9, "feet"), | ||||
| weight: math.unit(300, "lb"), | |||||
| weight: math.unit(450, "lb"), | |||||
| name: "Weeper", | name: "Weeper", | ||||
| image: { | image: { | ||||
| source: "./media/species/synx/weeper.svg", | source: "./media/species/synx/weeper.svg", | ||||