mirror of
https://github.com/tobspr/shapez.io.git
synced 2025-06-13 13:04:03 +00:00
copy past broken, check for more uids in draw
This commit is contained in:
parent
a80ae03b68
commit
9ab92a1bdb
@ -12,6 +12,7 @@ import { KEYMAPPINGS } from "../../key_action_mapper";
|
||||
import { THEME } from "../../theme";
|
||||
import { enumHubGoalRewards } from "../../tutorial_goals";
|
||||
import { BaseHUDPart } from "../base_hud_part";
|
||||
import { enumMouseButton } from "../../camera";
|
||||
|
||||
const logger = createLogger("hud/mass_selector");
|
||||
|
||||
@ -139,13 +140,12 @@ export class HUDMassSelector extends BaseHUDPart {
|
||||
}
|
||||
|
||||
clearBelts() {
|
||||
for (const uid of this.selectedUids) {
|
||||
const entity = this.root.entityMgr.findByUid(uid);
|
||||
for (const entity of this.selectedEntities) {
|
||||
for (const component of Object.values(entity.components)) {
|
||||
/** @type {Component} */ (component).clear();
|
||||
}
|
||||
}
|
||||
this.selectedUids = new Set();
|
||||
this.selectedEntities = new Set();
|
||||
}
|
||||
|
||||
confirmCut() {
|
||||
|
@ -12,14 +12,9 @@ export class BeltReaderSystem extends GameSystemWithFilter {
|
||||
const now = this.root.time.now();
|
||||
const minimumTime = now - globalConfig.readerAnalyzeIntervalSeconds;
|
||||
const minimumTimeForThroughput = now - 1;
|
||||
<<<<<<< HEAD
|
||||
|
||||
for (let i = this.allEntitiesArray.length - 1; i >= 0; --i) {
|
||||
const entity = this.allEntitiesArray[i];
|
||||
=======
|
||||
for (let i = 0; i < this.allEntities.length; ++i) {
|
||||
const entity = this.allEntities[i];
|
||||
>>>>>>> 5074727efa4910acdb298bbed28c9e7bd1d7849d
|
||||
const readerComp = entity.components.BeltReader;
|
||||
const pinsComp = entity.components.WiredPins;
|
||||
|
||||
|
@ -14,8 +14,8 @@ export class ConstantProducerSystem extends GameSystemWithFilter {
|
||||
}
|
||||
|
||||
update() {
|
||||
for (let i = 0; i < this.allEntities.length; ++i) {
|
||||
const entity = this.allEntities[i];
|
||||
for (let i = this.allEntitiesArray.length - 1; i >= 0; --i) {
|
||||
const entity = this.allEntitiesArray[i];
|
||||
const signalComp = entity.components.ConstantSignal;
|
||||
const ejectorComp = entity.components.ItemEjector;
|
||||
if (!ejectorComp) {
|
||||
|
@ -20,8 +20,8 @@ export class GoalAcceptorSystem extends GameSystemWithFilter {
|
||||
|
||||
let allAccepted = true;
|
||||
|
||||
for (let i = 0; i < this.allEntities.length; ++i) {
|
||||
const entity = this.allEntities[i];
|
||||
for (let i = this.allEntitiesArray.length - 1; i >= 0; --i) {
|
||||
const entity = this.allEntitiesArray[i];
|
||||
const goalComp = entity.components.GoalAcceptor;
|
||||
|
||||
if (!goalComp.lastDelivery) {
|
||||
|
Loading…
Reference in New Issue
Block a user