mirror of
https://github.com/tobspr/shapez.io.git
synced 2024-10-27 20:34:29 +00:00
Catch up with enum change / merge
This commit is contained in:
parent
6a447e3583
commit
7e139d116d
@ -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) {
|
||||
|
@ -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;
|
||||
|
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user