mirror of
https://github.com/tobspr/shapez.io.git
synced 2025-06-13 13:04:03 +00:00
* Add mode button to main menu * [WIP] Add mode menu. Add factory-based gameMode creation * Add savefile migration, serialize, deserialize * Add hidden HUD elements, zone, and zoom, boundary constraints * Clean up lint issues * Add building, HUD exclusion, building exclusion, and refactor - [WIP] Add ConstantProducer building that combines ConstantSignal and ItemProducer functionality. Currently using temp assets. - Add pre-placement check to the zone - Use Rectangles for zone and boundary - Simplify zone drawing - Account for exclusion in savegame data - [WIP] Add puzzle play and edit buttons in puzzle mode menu * [WIP] Add building, component, and systems for producing and accepting user-specified items and checking goal criteria * Add ingame puzzle mode UI elements - Add minimal menus in puzzle mode for back, next navigation - Add lower menu for changing zone dimenensions Co-authored-by: Greg Considine <gconsidine@users.noreply.github.com>
60 lines
2.9 KiB
JavaScript
60 lines
2.9 KiB
JavaScript
import { gComponentRegistry } from "../core/global_registries";
|
|
import { StaticMapEntityComponent } from "./components/static_map_entity";
|
|
import { BeltComponent } from "./components/belt";
|
|
import { ItemEjectorComponent } from "./components/item_ejector";
|
|
import { ItemAcceptorComponent } from "./components/item_acceptor";
|
|
import { MinerComponent } from "./components/miner";
|
|
import { ItemProcessorComponent } from "./components/item_processor";
|
|
import { UndergroundBeltComponent } from "./components/underground_belt";
|
|
import { HubComponent } from "./components/hub";
|
|
import { StorageComponent } from "./components/storage";
|
|
import { WiredPinsComponent } from "./components/wired_pins";
|
|
import { BeltUnderlaysComponent } from "./components/belt_underlays";
|
|
import { WireComponent } from "./components/wire";
|
|
import { ConstantSignalComponent } from "./components/constant_signal";
|
|
import { LogicGateComponent } from "./components/logic_gate";
|
|
import { LeverComponent } from "./components/lever";
|
|
import { WireTunnelComponent } from "./components/wire_tunnel";
|
|
import { DisplayComponent } from "./components/display";
|
|
import { BeltReaderComponent } from "./components/belt_reader";
|
|
import { FilterComponent } from "./components/filter";
|
|
import { ItemProducerComponent } from "./components/item_producer";
|
|
import { GoalAcceptorComponent } from "./components/goal_acceptor";
|
|
|
|
export function initComponentRegistry() {
|
|
gComponentRegistry.register(StaticMapEntityComponent);
|
|
gComponentRegistry.register(BeltComponent);
|
|
gComponentRegistry.register(ItemEjectorComponent);
|
|
gComponentRegistry.register(ItemAcceptorComponent);
|
|
gComponentRegistry.register(MinerComponent);
|
|
gComponentRegistry.register(ItemProcessorComponent);
|
|
gComponentRegistry.register(UndergroundBeltComponent);
|
|
gComponentRegistry.register(HubComponent);
|
|
gComponentRegistry.register(StorageComponent);
|
|
gComponentRegistry.register(WiredPinsComponent);
|
|
gComponentRegistry.register(BeltUnderlaysComponent);
|
|
gComponentRegistry.register(WireComponent);
|
|
gComponentRegistry.register(ConstantSignalComponent);
|
|
gComponentRegistry.register(LogicGateComponent);
|
|
gComponentRegistry.register(LeverComponent);
|
|
gComponentRegistry.register(WireTunnelComponent);
|
|
gComponentRegistry.register(DisplayComponent);
|
|
gComponentRegistry.register(BeltReaderComponent);
|
|
gComponentRegistry.register(FilterComponent);
|
|
gComponentRegistry.register(ItemProducerComponent);
|
|
gComponentRegistry.register(GoalAcceptorComponent);
|
|
|
|
// IMPORTANT ^^^^^ UPDATE ENTITY COMPONENT STORAGE AFTERWARDS
|
|
|
|
// Sanity check - If this is thrown, you (=me, lol) forgot to add a new component here
|
|
|
|
assert(
|
|
// @ts-ignore
|
|
require.context("./components", false, /.*\.js/i).keys().length ===
|
|
gComponentRegistry.getNumEntries(),
|
|
"Not all components are registered"
|
|
);
|
|
|
|
console.log("📦 There are", gComponentRegistry.getNumEntries(), "components");
|
|
}
|