Bläddra i källkod

Give size-less entities a default 'Normal' size

tags/v0.1.0
Fen Dweller 6 år sedan
förälder
incheckning
8aaaffbb3d
1 ändrade filer med 9 tillägg och 0 borttagningar
  1. +9
    -0
      macrovision.js

+ 9
- 0
macrovision.js Visa fil

@@ -279,6 +279,15 @@ function makeEntity(info, views, sizes) {
if (this.size === undefined && this.sizes.length > 0) {
this.views[this.defaultView].height = this.sizes[0].height;
this.size = this.sizes[0];
console.warn("No default size set for " + info.name);
} else if (this.sizes.length == 0) {
this.sizes = [
{
name: "Normal",
height: this.views[this.defaultView].height
}
];
this.size = this.sizes[0];
}

this.desc = {};


Laddar…
Avbryt
Spara