mirror of
https://github.com/tobspr/shapez.io.git
synced 2025-06-13 13:04:03 +00:00
Fix commented issues
This commit is contained in:
parent
c3c59cc6fc
commit
6320372e73
@ -470,31 +470,13 @@ export class ShapeDefinition extends BasicSerializableObject {
|
||||
*/
|
||||
cloneAndUnstack() {
|
||||
const lowerLayers = this.internalCloneLayers();
|
||||
const upperLayers = [];
|
||||
|
||||
if (this.isEntirelyEmpty()) {
|
||||
assert(false, "Can not stack entirely empty definition");
|
||||
}
|
||||
|
||||
// Check if there is only one layer
|
||||
if (this.layers.length === 1) {
|
||||
return [new ShapeDefinition({ layers: lowerLayers })];
|
||||
}
|
||||
|
||||
let upperLayers = [];
|
||||
|
||||
layerCheck:
|
||||
for (let i = lowerLayers.length - 1; i >= 0; --i) {
|
||||
const layerToCheck = lowerLayers[i];
|
||||
|
||||
for (let quadrantIndex = 0; quadrantIndex < 4; ++quadrantIndex) {
|
||||
// Check for a layer with items on it to remove
|
||||
if (layerToCheck[quadrantIndex]) {
|
||||
upperLayers.push(layerToCheck);
|
||||
lowerLayers[i] = [null, null, null, null];
|
||||
break layerCheck;
|
||||
}
|
||||
}
|
||||
}
|
||||
upperLayers.push(lowerLayers.pop());
|
||||
|
||||
return [
|
||||
new ShapeDefinition({ layers: lowerLayers }),
|
||||
|
@ -23,7 +23,7 @@ export class ItemProcessorSystem extends GameSystemWithFilter {
|
||||
// First of all, process the current recipe
|
||||
processorComp.secondsUntilEject = Math_max(
|
||||
0,
|
||||
processorComp.secondsUntilEject - this.root.dynamicTickrate.deltaSeconds,
|
||||
processorComp.secondsUntilEject - this.root.dynamicTickrate.deltaSeconds
|
||||
);
|
||||
|
||||
// Check if we have any finished items we can eject
|
||||
@ -196,7 +196,7 @@ export class ItemProcessorSystem extends GameSystemWithFilter {
|
||||
|
||||
const stackedDefinition = this.root.shapeDefinitionMgr.shapeActionStack(
|
||||
lowerItem.definition,
|
||||
upperItem.definition,
|
||||
upperItem.definition
|
||||
);
|
||||
outItems.push({
|
||||
item: new ShapeItem(stackedDefinition),
|
||||
@ -213,11 +213,14 @@ export class ItemProcessorSystem extends GameSystemWithFilter {
|
||||
const unstackedDefinitions = this.root.shapeDefinitionMgr.shapeActionUnstack(item.definition);
|
||||
|
||||
for (let i = 0; i < unstackedDefinitions.length; ++i) {
|
||||
const definition = unstackedDefinitions[i];
|
||||
if (!definition.isEntirelyEmpty()) {
|
||||
outItems.push({
|
||||
item: new ShapeItem(unstackedDefinitions[i]),
|
||||
item: new ShapeItem(definition),
|
||||
requiredSlot: i,
|
||||
});
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@ -261,7 +264,7 @@ export class ItemProcessorSystem extends GameSystemWithFilter {
|
||||
|
||||
const colorizedDefinition = this.root.shapeDefinitionMgr.shapeActionPaintWith(
|
||||
shapeItem.definition,
|
||||
colorItem.color,
|
||||
colorItem.color
|
||||
);
|
||||
|
||||
outItems.push({
|
||||
@ -284,12 +287,12 @@ export class ItemProcessorSystem extends GameSystemWithFilter {
|
||||
|
||||
const colorizedDefinition1 = this.root.shapeDefinitionMgr.shapeActionPaintWith(
|
||||
shapeItem1.definition,
|
||||
colorItem.color,
|
||||
colorItem.color
|
||||
);
|
||||
|
||||
const colorizedDefinition2 = this.root.shapeDefinitionMgr.shapeActionPaintWith(
|
||||
shapeItem2.definition,
|
||||
colorItem.color,
|
||||
colorItem.color
|
||||
);
|
||||
outItems.push({
|
||||
item: new ShapeItem(colorizedDefinition1),
|
||||
@ -319,7 +322,7 @@ export class ItemProcessorSystem extends GameSystemWithFilter {
|
||||
|
||||
const colorizedDefinition = this.root.shapeDefinitionMgr.shapeActionPaintWith4Colors(
|
||||
shapeItem.definition,
|
||||
[colorItem2.color, colorItem3.color, colorItem4.color, colorItem1.color],
|
||||
[colorItem2.color, colorItem3.color, colorItem4.color, colorItem1.color]
|
||||
);
|
||||
|
||||
outItems.push({
|
||||
|
@ -434,6 +434,10 @@ storyRewards:
|
||||
title: Storage Buffer
|
||||
desc: You have unlocked a variant of the <strong>trash</strong> - It allows to store items up to a given capacity!
|
||||
|
||||
reward_unstacker:
|
||||
title: Unstacker
|
||||
desc: You can now unstack shapes with the <strong>unstacker</strong>! The top shape is taken off the input and comes out the right output.
|
||||
|
||||
reward_freeplay:
|
||||
title: Freeplay
|
||||
desc: You did it! You unlocked the <strong>free-play mode</strong>! This means that shapes are now randomly generated! (No worries, more content is planned for the standalone!)
|
||||
|
Loading…
Reference in New Issue
Block a user