Explorar el Código

Sort buildings by height

tags/v0.0.6
Fen Dweller hace 5 años
padre
commit
2fd8298f29
Se han modificado 1 ficheros con 6 adiciones y 0 borrados
  1. +6
    -0
      presets/buildings.js

+ 6
- 0
presets/buildings.js Ver fichero

@@ -119,5 +119,11 @@ function makeBuildings() {
)
});

results.sort((b1, b2) => {
e1 = b1.constructor();
e2 = b2.constructor();
return -math.subtract(e1.views[e1.defaultView].height, e2.views[e2.defaultView].height).value;
});

return results;
}

Cargando…
Cancelar
Guardar