mirror of
https://github.com/tobspr/shapez.io.git
synced 2024-10-27 20:34:29 +00:00
Revert item filter behaviour
This commit is contained in:
parent
06e276f021
commit
b210db2361
@ -2,12 +2,11 @@ import { globalConfig } from "../../core/config";
|
||||
import { DrawParameters } from "../../core/draw_parameters";
|
||||
import { createLogger } from "../../core/logging";
|
||||
import { Rectangle } from "../../core/rectangle";
|
||||
import { enumDirection, enumDirectionToVector, Vector } from "../../core/vector";
|
||||
import { enumDirection, enumDirectionToVector } from "../../core/vector";
|
||||
import { BaseItem } from "../base_item";
|
||||
import { ItemEjectorComponent } from "../components/item_ejector";
|
||||
import { Entity } from "../entity";
|
||||
import { GameSystemWithFilter } from "../game_system_with_filter";
|
||||
import { enumItemProcessorTypes } from "../components/item_processor";
|
||||
import { MapChunkView } from "../map_chunk_view";
|
||||
|
||||
const logger = createLogger("systems/ejector");
|
||||
|
@ -117,14 +117,6 @@ export class ItemProcessorSystem extends GameSystemWithFilter {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Check if "false" was passed in
|
||||
const item = network.currentValue;
|
||||
if (item.getItemType() === "boolean") {
|
||||
if (!(/** @type {BooleanItem} */ (item).value)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Otherwise, all good
|
||||
return true;
|
||||
}
|
||||
|
@ -53,11 +53,11 @@ export class ItemProcessorOverlaysSystem extends GameSystem {
|
||||
|
||||
switch (requirement) {
|
||||
case enumItemProcessorRequirements.painterQuad: {
|
||||
this.drawConnectedSlotRequirement(parameters, entity);
|
||||
this.drawConnectedSlotRequirement(parameters, entity, { drawIfFalse: true });
|
||||
break;
|
||||
}
|
||||
case enumItemProcessorRequirements.filter: {
|
||||
this.drawConnectedSlotRequirement(parameters, entity);
|
||||
this.drawConnectedSlotRequirement(parameters, entity, { drawIfFalse: false });
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -100,8 +100,10 @@ export class ItemProcessorOverlaysSystem extends GameSystem {
|
||||
*
|
||||
* @param {import("../../core/draw_utils").DrawParameters} parameters
|
||||
* @param {Entity} entity
|
||||
* @param {object} param0
|
||||
* @param {boolean=} param0.drawIfFalse
|
||||
*/
|
||||
drawConnectedSlotRequirement(parameters, entity) {
|
||||
drawConnectedSlotRequirement(parameters, entity, { drawIfFalse = true }) {
|
||||
const staticComp = entity.components.StaticMapEntity;
|
||||
const pinsComp = entity.components.WiredPins;
|
||||
|
||||
@ -114,7 +116,7 @@ export class ItemProcessorOverlaysSystem extends GameSystem {
|
||||
if (network && network.currentValue) {
|
||||
anySlotConnected = true;
|
||||
|
||||
if (isTrueItem(network.currentValue)) {
|
||||
if (isTrueItem(network.currentValue) || !drawIfFalse) {
|
||||
// No need to draw anything
|
||||
return;
|
||||
}
|
||||
|
@ -123,6 +123,15 @@ export const autosaveIntervals = [
|
||||
},
|
||||
];
|
||||
|
||||
const refreshRateOptions = ["60", "75", "100", "120", "144", "165", "250", "500"];
|
||||
|
||||
if (G_IS_DEV) {
|
||||
refreshRateOptions.push("1000");
|
||||
refreshRateOptions.push("2000");
|
||||
refreshRateOptions.push("5000");
|
||||
refreshRateOptions.push("10000");
|
||||
}
|
||||
|
||||
/** @type {Array<BaseSetting>} */
|
||||
export const allApplicationSettings = [
|
||||
new EnumSetting("language", {
|
||||
@ -251,7 +260,7 @@ export const allApplicationSettings = [
|
||||
new BoolSetting("rotationByBuilding", enumCategories.advanced, (app, value) => {}),
|
||||
|
||||
new EnumSetting("refreshRate", {
|
||||
options: ["60", "75", "100", "120", "144", "165", "250", "500"],
|
||||
options: refreshRateOptions,
|
||||
valueGetter: rate => rate,
|
||||
textGetter: rate => rate + " Hz",
|
||||
category: enumCategories.performance,
|
||||
|
Loading…
Reference in New Issue
Block a user