mirror of
https://github.com/tobspr/shapez.io.git
synced 2026-03-02 03:39:21 +00:00
Get rid of item ejector / acceptor layers and new wires buildings for now
This commit is contained in:
@@ -440,11 +440,6 @@ export class HUDBuildingPlacer extends HUDBuildingPlacerLogic {
|
||||
for (let acceptorSlotIndex = 0; acceptorSlotIndex < slots.length; ++acceptorSlotIndex) {
|
||||
const slot = slots[acceptorSlotIndex];
|
||||
|
||||
// Only draw same layer slots
|
||||
if (slot.layer !== this.root.currentLayer) {
|
||||
continue;
|
||||
}
|
||||
|
||||
const acceptorSlotWsTile = staticComp.localTileToWorld(slot.pos);
|
||||
const acceptorSlotWsPos = acceptorSlotWsTile.toWorldSpaceCenterOfTile();
|
||||
|
||||
@@ -478,20 +473,12 @@ export class HUDBuildingPlacer extends HUDBuildingPlacerLogic {
|
||||
|
||||
// If this entity is on the same layer as the slot - if so, it can either be
|
||||
// connected, or it can not be connected and thus block the input
|
||||
if (sourceEntity.layer === slot.layer) {
|
||||
if (
|
||||
sourceEjector &&
|
||||
sourceEjector.anySlotEjectsToLocalTile(
|
||||
ejectorAcceptLocalTile,
|
||||
this.root.currentLayer
|
||||
)
|
||||
) {
|
||||
// This one is connected, all good
|
||||
isConnected = true;
|
||||
} else {
|
||||
// This one is blocked
|
||||
isBlocked = true;
|
||||
}
|
||||
if (sourceEjector && sourceEjector.anySlotEjectsToLocalTile(ejectorAcceptLocalTile)) {
|
||||
// This one is connected, all good
|
||||
isConnected = true;
|
||||
} else {
|
||||
// This one is blocked
|
||||
isBlocked = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -520,11 +507,6 @@ export class HUDBuildingPlacer extends HUDBuildingPlacerLogic {
|
||||
for (let ejectorSlotIndex = 0; ejectorSlotIndex < slots.length; ++ejectorSlotIndex) {
|
||||
const slot = slots[ejectorSlotIndex];
|
||||
|
||||
// Only draw same layer slots
|
||||
if (slot.layer !== this.root.currentLayer) {
|
||||
continue;
|
||||
}
|
||||
|
||||
const ejectorSlotWsTile = staticComp.localTileToWorld(
|
||||
ejectorComp.getSlotTargetLocalTile(ejectorSlotIndex)
|
||||
);
|
||||
@@ -546,21 +528,14 @@ export class HUDBuildingPlacer extends HUDBuildingPlacerLogic {
|
||||
const destAcceptor = destEntity.components.ItemAcceptor;
|
||||
const destStaticComp = destEntity.components.StaticMapEntity;
|
||||
|
||||
// If this entity is on the same layer as the slot - if so, it can either be
|
||||
// connected, or it can not be connected and thus block the input
|
||||
if (destEntity.layer === slot.layer) {
|
||||
const destLocalTile = destStaticComp.worldToLocalTile(ejectorSlotWsTile);
|
||||
const destLocalDir = destStaticComp.worldDirectionToLocal(ejectorSlotWsDirection);
|
||||
if (
|
||||
destAcceptor &&
|
||||
destAcceptor.findMatchingSlot(destLocalTile, destLocalDir, this.root.currentLayer)
|
||||
) {
|
||||
// This one is connected, all good
|
||||
isConnected = true;
|
||||
} else {
|
||||
// This one is blocked
|
||||
isBlocked = true;
|
||||
}
|
||||
const destLocalTile = destStaticComp.worldToLocalTile(ejectorSlotWsTile);
|
||||
const destLocalDir = destStaticComp.worldDirectionToLocal(ejectorSlotWsDirection);
|
||||
if (destAcceptor && destAcceptor.findMatchingSlot(destLocalTile, destLocalDir)) {
|
||||
// This one is connected, all good
|
||||
isConnected = true;
|
||||
} else {
|
||||
// This one is blocked
|
||||
isBlocked = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { MetaBeltBaseBuilding } from "../../buildings/belt_base";
|
||||
import { MetaCutterBuilding } from "../../buildings/cutter";
|
||||
import { MetaEnergyGenerator } from "../../buildings/energy_generator";
|
||||
import { MetaMinerBuilding } from "../../buildings/miner";
|
||||
import { MetaMixerBuilding } from "../../buildings/mixer";
|
||||
import { MetaPainterBuilding } from "../../buildings/painter";
|
||||
@@ -11,7 +10,6 @@ import { MetaTrashBuilding } from "../../buildings/trash";
|
||||
import { MetaUndergroundBeltBuilding } from "../../buildings/underground_belt";
|
||||
import { enumLayer } from "../../root";
|
||||
import { HUDBaseToolbar } from "./base_toolbar";
|
||||
import { MetaAdvancedProcessorBuilding } from "../../buildings/advanced_processor";
|
||||
|
||||
const supportedBuildings = [
|
||||
MetaBeltBaseBuilding,
|
||||
@@ -24,9 +22,6 @@ const supportedBuildings = [
|
||||
MetaMixerBuilding,
|
||||
MetaPainterBuilding,
|
||||
MetaTrashBuilding,
|
||||
|
||||
MetaEnergyGenerator,
|
||||
MetaAdvancedProcessorBuilding,
|
||||
];
|
||||
|
||||
export class HUDBuildingsToolbar extends HUDBaseToolbar {
|
||||
|
||||
@@ -66,9 +66,6 @@ export class HUDColorBlindHelper extends BaseHUDPart {
|
||||
if (ejectorComp) {
|
||||
for (let i = 0; i < ejectorComp.slots.length; ++i) {
|
||||
const slot = ejectorComp.slots[i];
|
||||
if (slot.layer !== this.root.currentLayer) {
|
||||
continue;
|
||||
}
|
||||
if (slot.item && slot.item.getItemType() === enumItemType.color) {
|
||||
return /** @type {ColorItem} */ (slot.item).color;
|
||||
}
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
import { MetaWireBaseBuilding } from "../../buildings/wire_base";
|
||||
import { enumLayer } from "../../root";
|
||||
import { HUDBaseToolbar } from "./base_toolbar";
|
||||
import { MetaWireCrossingsBuilding } from "../../buildings/wire_crossings";
|
||||
|
||||
const supportedBuildings = [MetaWireBaseBuilding, MetaWireCrossingsBuilding];
|
||||
const supportedBuildings = [];
|
||||
|
||||
export class HUDWiresToolbar extends HUDBaseToolbar {
|
||||
constructor(root) {
|
||||
|
||||
@@ -92,7 +92,7 @@ export class TrailerMaker {
|
||||
const speed =
|
||||
globalConfig.tileSize *
|
||||
globalConfig.beltSpeedItemsPerSecond *
|
||||
globalConfig.beltItemSpacingByLayer[enumLayer.regular];
|
||||
globalConfig.itemSpacingOnBelts;
|
||||
// let time =
|
||||
// this.currentPlaybackOrigin.distance(Vector.fromSerializedObject(nextMarker.pos)) / speed;
|
||||
const time = nextMarker.time;
|
||||
|
||||
Reference in New Issue
Block a user