Catch up with enum change / merge

This commit is contained in:
tobspr 2020-08-15 19:50:22 +02:00
parent 6a447e3583
commit 7e139d116d
3 changed files with 3 additions and 5 deletions

View File

@ -14,7 +14,6 @@ import { GameSystemWithFilter } from "../game_system_with_filter";
import { MapChunkView } from "../map_chunk_view";
import { defaultBuildingVariant } from "../meta_building";
import { getCodeFromBuildingData } from "../building_codes";
import { enumLayer } from "../root";
export const BELT_ANIM_COUNT = 14;
@ -496,7 +495,7 @@ export class BeltSystem extends GameSystemWithFilter {
((this.root.time.realtimeNow() * speedMultiplier * BELT_ANIM_COUNT * 126) / 42) *
globalConfig.itemSpacingOnBelts
);
const contents = chunk.containedEntitiesByLayer[enumLayer.regular];
const contents = chunk.containedEntitiesByLayer.regular;
for (let i = 0; i < contents.length; ++i) {
const entity = contents[i];
if (entity.components.Belt) {

View File

@ -7,7 +7,6 @@ import { GameSystemWithFilter } from "../game_system_with_filter";
import { BELT_ANIM_COUNT } from "./belt";
import { MapChunkView } from "../map_chunk_view";
import { DrawParameters } from "../../core/draw_parameters";
import { enumLayer } from "../root";
export class BeltUnderlaysSystem extends GameSystemWithFilter {
constructor(root) {
@ -29,7 +28,7 @@ export class BeltUnderlaysSystem extends GameSystemWithFilter {
// Limit speed to avoid belts going backwards
const speedMultiplier = Math.min(this.root.hubGoals.getBeltBaseSpeed(), 10);
const contents = chunk.containedEntitiesByLayer[enumLayer.regular];
const contents = chunk.containedEntitiesByLayer.regular;
for (let i = 0; i < contents.length; ++i) {
const entity = contents[i];
const underlayComp = entity.components.BeltUnderlays;

View File

@ -84,7 +84,7 @@ export class DisplaySystem extends GameSystemWithFilter {
globalConfig.tileSize
);
} else if (value.getItemType() === "shape") {
value.draw(
value.drawCentered(
(origin.x + 0.5) * globalConfig.tileSize,
(origin.y + 0.5) * globalConfig.tileSize,
parameters,