Procházet zdrojové kódy

Make the view zoom to keep up when using the grow/shrink buttons

tags/v0.1.0
Fen Dweller před 5 roky
rodič
revize
3ef2c1f325
1 změnil soubory, kde provedl 10 přidání a 0 odebrání
  1. +10
    -0
      macrovision.js

+ 10
- 0
macrovision.js Zobrazit soubor

@@ -1322,6 +1322,16 @@ function doSize() {
updateViewOptions(entity, entity.view); updateViewOptions(entity, entity.view);
updateSizes(true); updateSizes(true);
sizeDirection *= 1.05; sizeDirection *= 1.05;

const ownHeight = entity.views[entity.view].height.toNumber("meters");
const worldHeight = config.height.toNumber("meters");

console.log(ownHeight, worldHeight)
if (ownHeight > worldHeight) {
setWorldHeight(config.height, entity.views[entity.view].height)
} else if (ownHeight * 10 < worldHeight) {
setWorldHeight(config.height, math.multiply(entity.views[entity.view].height, 10));
}
} }
} }




Načítá se…
Zrušit
Uložit