mirror of
https://github.com/tobspr/shapez.io.git
synced 2026-03-02 03:39:21 +00:00
Statistics tab
This commit is contained in:
@@ -157,9 +157,11 @@ export class ItemProcessorSystem extends GameSystemWithFilter {
|
||||
item: new ShapeItem(cutDefinition1),
|
||||
requiredSlot: 0,
|
||||
});
|
||||
this.root.signals.shapeProduced.dispatch(cutDefinition1);
|
||||
}
|
||||
|
||||
if (!cutDefinition2.isEntirelyEmpty()) {
|
||||
this.root.signals.shapeProduced.dispatch(cutDefinition2);
|
||||
outItems.push({
|
||||
item: new ShapeItem(cutDefinition2),
|
||||
requiredSlot: 1,
|
||||
@@ -176,6 +178,7 @@ export class ItemProcessorSystem extends GameSystemWithFilter {
|
||||
const inputDefinition = inputItem.definition;
|
||||
|
||||
const rotatedDefinition = this.root.shapeDefinitionMgr.shapeActionRotateCW(inputDefinition);
|
||||
this.root.signals.shapeProduced.dispatch(rotatedDefinition);
|
||||
outItems.push({
|
||||
item: new ShapeItem(rotatedDefinition),
|
||||
});
|
||||
@@ -197,6 +200,7 @@ export class ItemProcessorSystem extends GameSystemWithFilter {
|
||||
lowerItem.definition,
|
||||
upperItem.definition
|
||||
);
|
||||
this.root.signals.shapeProduced.dispatch(stackedDefinition);
|
||||
outItems.push({
|
||||
item: new ShapeItem(stackedDefinition),
|
||||
});
|
||||
@@ -249,6 +253,7 @@ export class ItemProcessorSystem extends GameSystemWithFilter {
|
||||
colorItem.color
|
||||
);
|
||||
|
||||
this.root.signals.shapeProduced.dispatch(colorizedDefinition);
|
||||
outItems.push({
|
||||
item: new ShapeItem(colorizedDefinition),
|
||||
});
|
||||
|
||||
@@ -3,6 +3,7 @@ import { DrawParameters } from "../../core/draw_parameters";
|
||||
import { MinerComponent } from "../components/miner";
|
||||
import { GameSystemWithFilter } from "../game_system_with_filter";
|
||||
import { MapChunkView } from "../map_chunk_view";
|
||||
import { ShapeItem } from "../items/shape_item";
|
||||
|
||||
export class MinerSystem extends GameSystemWithFilter {
|
||||
constructor(root) {
|
||||
@@ -36,6 +37,11 @@ export class MinerSystem extends GameSystemWithFilter {
|
||||
continue;
|
||||
}
|
||||
|
||||
// Analytics hook
|
||||
if (lowerLayerItem instanceof ShapeItem) {
|
||||
this.root.signals.shapeProduced.dispatch(lowerLayerItem.definition);
|
||||
}
|
||||
|
||||
// Try actually ejecting
|
||||
if (!ejectComp.tryEject(0, lowerLayerItem)) {
|
||||
assert(false, "Failed to eject");
|
||||
|
||||
Reference in New Issue
Block a user