mirror of
https://github.com/tobspr/shapez.io.git
synced 2025-06-13 13:04:03 +00:00
Ok Display's should work like charm for now.
This commit is contained in:
parent
224dad1cec
commit
1eb3cae5cd
@ -37,6 +37,7 @@ const enumWireVariantToVariant = {
|
|||||||
export class MetaWireBuilding extends MetaBuilding {
|
export class MetaWireBuilding extends MetaBuilding {
|
||||||
constructor() {
|
constructor() {
|
||||||
super("wire");
|
super("wire");
|
||||||
|
this.a = "a";
|
||||||
}
|
}
|
||||||
|
|
||||||
getHasDirectionLockAvailable() {
|
getHasDirectionLockAvailable() {
|
||||||
@ -177,7 +178,6 @@ export class MetaWireBuilding extends MetaBuilding {
|
|||||||
|
|
||||||
// First, reset rotation
|
// First, reset rotation
|
||||||
rotation = 0;
|
rotation = 0;
|
||||||
|
|
||||||
switch (flag) {
|
switch (flag) {
|
||||||
case 0b0000:
|
case 0b0000:
|
||||||
// Nothing
|
// Nothing
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import { enumDirection, Vector } from "../../core/vector";
|
import { enumDirection, Vector } from "../../core/vector";
|
||||||
import { enumPinSlotType, WiredPinsComponent } from "../components/wired_pins";
|
import { enumPinSlotType, WiredPinsComponent } from "../components/wired_pins";
|
||||||
import { WirelessCodeComponent } from "../components/wireless_code";
|
|
||||||
import { Entity } from "../entity";
|
import { Entity } from "../entity";
|
||||||
import { defaultBuildingVariant, MetaBuilding } from "../meta_building";
|
import { defaultBuildingVariant, MetaBuilding } from "../meta_building";
|
||||||
import { GameRoot } from "../root";
|
import { GameRoot } from "../root";
|
||||||
|
@ -1,9 +1,5 @@
|
|||||||
import { enumDirection, Vector } from "../../core/vector";
|
|
||||||
import { BaseItem } from "../base_item";
|
|
||||||
import { Component } from "../component";
|
import { Component } from "../component";
|
||||||
import { types } from "../../savegame/serialization";
|
import { types } from "../../savegame/serialization";
|
||||||
import { typeItemSingleton } from "../item_resolver";
|
|
||||||
import { gComponentRegistry } from "../../core/global_registries";
|
|
||||||
|
|
||||||
export class WirelessCodeComponent extends Component {
|
export class WirelessCodeComponent extends Component {
|
||||||
static getId() {
|
static getId() {
|
||||||
@ -24,8 +20,4 @@ export class WirelessCodeComponent extends Component {
|
|||||||
super();
|
super();
|
||||||
this.wireless_code = id;
|
this.wireless_code = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
getWirelessCode() {
|
|
||||||
return this.wireless_code;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -74,7 +74,6 @@ export class EntityManager extends BasicSerializableObject {
|
|||||||
|
|
||||||
this.entities.push(entity);
|
this.entities.push(entity);
|
||||||
|
|
||||||
//console.log(entity.components);
|
|
||||||
// Register into the componentToEntity map
|
// Register into the componentToEntity map
|
||||||
for (const componentId in entity.components) {
|
for (const componentId in entity.components) {
|
||||||
if (entity.components[componentId]) {
|
if (entity.components[componentId]) {
|
||||||
|
@ -79,7 +79,7 @@ export class GameLogic {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Perform additional placement checks
|
// Perform additional placement checks
|
||||||
if (this.root.signals.prePlacementCheck.dispatch(entity, offset) === STOP_PROPAGATION && !entity.components.Wire) {
|
if (this.root.signals.prePlacementCheck.dispatch(entity, offset) === STOP_PROPAGATION) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,8 +6,6 @@ import { StaticMapEntityComponent } from "./components/static_map_entity";
|
|||||||
import { Entity } from "./entity";
|
import { Entity } from "./entity";
|
||||||
import { GameRoot } from "./root";
|
import { GameRoot } from "./root";
|
||||||
import { getCodeFromBuildingData } from "./building_codes";
|
import { getCodeFromBuildingData } from "./building_codes";
|
||||||
import { WirelessCodeComponent } from "./components/wireless_code";
|
|
||||||
import { WirelessDisplayComponent } from "./components/wireless_display";
|
|
||||||
|
|
||||||
export const defaultBuildingVariant = "default";
|
export const defaultBuildingVariant = "default";
|
||||||
|
|
||||||
|
@ -7,20 +7,13 @@ import { GameSystemWithFilter } from "../game_system_with_filter";
|
|||||||
import { isTrueItem } from "../items/boolean_item";
|
import { isTrueItem } from "../items/boolean_item";
|
||||||
import { ColorItem, COLOR_ITEM_SINGLETONS } from "../items/color_item";
|
import { ColorItem, COLOR_ITEM_SINGLETONS } from "../items/color_item";
|
||||||
import { MapChunkView } from "../map_chunk_view";
|
import { MapChunkView } from "../map_chunk_view";
|
||||||
import trim from "trim";
|
|
||||||
import { THIRDPARTY_URLS } from "../../core/config";
|
import { THIRDPARTY_URLS } from "../../core/config";
|
||||||
import { DialogWithForm } from "../../core/modal_dialog_elements";
|
import { DialogWithForm } from "../../core/modal_dialog_elements";
|
||||||
import { FormElementInput, FormElementItemChooser } from "../../core/modal_dialog_forms";
|
import { FormElementInput, FormElementItemChooser } from "../../core/modal_dialog_forms";
|
||||||
import { fillInLinkIntoTranslation } from "../../core/utils";
|
import { fillInLinkIntoTranslation } from "../../core/utils";
|
||||||
import { T } from "../../translations";
|
import { T } from "../../translations";
|
||||||
import { Entity } from "../entity";
|
import { Entity } from "../entity";
|
||||||
import { ShapeDefinition } from "../shape_definition";
|
|
||||||
import { BOOL_FALSE_SINGLETON, BOOL_TRUE_SINGLETON } from "../items/boolean_item";
|
|
||||||
import { init } from "logrocket";
|
|
||||||
import { Signal } from "../../core/signal";
|
|
||||||
import { serializeError } from "../../core/logging";
|
|
||||||
import { WirelessCodeComponent } from "../components/wireless_code";
|
import { WirelessCodeComponent } from "../components/wireless_code";
|
||||||
import { enumInvertedDirections } from "../../core/vector";
|
|
||||||
|
|
||||||
export class WirelessDisplaySystem extends GameSystemWithFilter {
|
export class WirelessDisplaySystem extends GameSystemWithFilter {
|
||||||
constructor(root) {
|
constructor(root) {
|
||||||
|
Loading…
Reference in New Issue
Block a user