mirror of
				https://github.com/tobspr/shapez.io.git
				synced 2025-06-13 13:04:03 +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 { MapChunkView } from "../map_chunk_view";
 | 
				
			||||||
import { defaultBuildingVariant } from "../meta_building";
 | 
					import { defaultBuildingVariant } from "../meta_building";
 | 
				
			||||||
import { getCodeFromBuildingData } from "../building_codes";
 | 
					import { getCodeFromBuildingData } from "../building_codes";
 | 
				
			||||||
import { enumLayer } from "../root";
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
export const BELT_ANIM_COUNT = 14;
 | 
					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) *
 | 
					            ((this.root.time.realtimeNow() * speedMultiplier * BELT_ANIM_COUNT * 126) / 42) *
 | 
				
			||||||
                globalConfig.itemSpacingOnBelts
 | 
					                globalConfig.itemSpacingOnBelts
 | 
				
			||||||
        );
 | 
					        );
 | 
				
			||||||
        const contents = chunk.containedEntitiesByLayer[enumLayer.regular];
 | 
					        const contents = chunk.containedEntitiesByLayer.regular;
 | 
				
			||||||
        for (let i = 0; i < contents.length; ++i) {
 | 
					        for (let i = 0; i < contents.length; ++i) {
 | 
				
			||||||
            const entity = contents[i];
 | 
					            const entity = contents[i];
 | 
				
			||||||
            if (entity.components.Belt) {
 | 
					            if (entity.components.Belt) {
 | 
				
			||||||
 | 
				
			|||||||
@ -7,7 +7,6 @@ import { GameSystemWithFilter } from "../game_system_with_filter";
 | 
				
			|||||||
import { BELT_ANIM_COUNT } from "./belt";
 | 
					import { BELT_ANIM_COUNT } from "./belt";
 | 
				
			||||||
import { MapChunkView } from "../map_chunk_view";
 | 
					import { MapChunkView } from "../map_chunk_view";
 | 
				
			||||||
import { DrawParameters } from "../../core/draw_parameters";
 | 
					import { DrawParameters } from "../../core/draw_parameters";
 | 
				
			||||||
import { enumLayer } from "../root";
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
export class BeltUnderlaysSystem extends GameSystemWithFilter {
 | 
					export class BeltUnderlaysSystem extends GameSystemWithFilter {
 | 
				
			||||||
    constructor(root) {
 | 
					    constructor(root) {
 | 
				
			||||||
@ -29,7 +28,7 @@ export class BeltUnderlaysSystem extends GameSystemWithFilter {
 | 
				
			|||||||
        // Limit speed to avoid belts going backwards
 | 
					        // Limit speed to avoid belts going backwards
 | 
				
			||||||
        const speedMultiplier = Math.min(this.root.hubGoals.getBeltBaseSpeed(), 10);
 | 
					        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) {
 | 
					        for (let i = 0; i < contents.length; ++i) {
 | 
				
			||||||
            const entity = contents[i];
 | 
					            const entity = contents[i];
 | 
				
			||||||
            const underlayComp = entity.components.BeltUnderlays;
 | 
					            const underlayComp = entity.components.BeltUnderlays;
 | 
				
			||||||
 | 
				
			|||||||
@ -84,7 +84,7 @@ export class DisplaySystem extends GameSystemWithFilter {
 | 
				
			|||||||
                        globalConfig.tileSize
 | 
					                        globalConfig.tileSize
 | 
				
			||||||
                    );
 | 
					                    );
 | 
				
			||||||
                } else if (value.getItemType() === "shape") {
 | 
					                } else if (value.getItemType() === "shape") {
 | 
				
			||||||
                    value.draw(
 | 
					                    value.drawCentered(
 | 
				
			||||||
                        (origin.x + 0.5) * globalConfig.tileSize,
 | 
					                        (origin.x + 0.5) * globalConfig.tileSize,
 | 
				
			||||||
                        (origin.y + 0.5) * globalConfig.tileSize,
 | 
					                        (origin.y + 0.5) * globalConfig.tileSize,
 | 
				
			||||||
                        parameters,
 | 
					                        parameters,
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user