mirror of
https://github.com/tobspr/shapez.io.git
synced 2024-10-27 20:34:29 +00:00
Fix stacking bug and bump version, fixes #814
This commit is contained in:
parent
1ac0fe5387
commit
1ab0fb7d9c
@ -1,4 +1,12 @@
|
||||
export const CHANGELOG = [
|
||||
{
|
||||
version: "1.2.1",
|
||||
date: "unreleased",
|
||||
entries: [
|
||||
"Fixed stacking bug for level 26 which required restarting the game",
|
||||
"Updated translations",
|
||||
],
|
||||
},
|
||||
{
|
||||
version: "1.2.0",
|
||||
date: "09.10.2020",
|
||||
|
@ -31,7 +31,7 @@ export class ShapeDefinitionManager extends BasicSerializableObject {
|
||||
*/
|
||||
this.shapeKeyToItem = {};
|
||||
|
||||
// Caches operations in the form of 'operation:def1[:def2]'
|
||||
// Caches operations in the form of 'operation/def1[/def2]'
|
||||
/** @type {Object.<string, Array<ShapeDefinition>|ShapeDefinition>} */
|
||||
this.operationCache = {};
|
||||
}
|
||||
@ -89,7 +89,7 @@ export class ShapeDefinitionManager extends BasicSerializableObject {
|
||||
* @returns {[ShapeDefinition, ShapeDefinition]}
|
||||
*/
|
||||
shapeActionCutHalf(definition) {
|
||||
const key = "cut:" + definition.getHash();
|
||||
const key = "cut/" + definition.getHash();
|
||||
if (this.operationCache[key]) {
|
||||
return /** @type {[ShapeDefinition, ShapeDefinition]} */ (this.operationCache[key]);
|
||||
}
|
||||
@ -108,7 +108,7 @@ export class ShapeDefinitionManager extends BasicSerializableObject {
|
||||
* @returns {[ShapeDefinition, ShapeDefinition, ShapeDefinition, ShapeDefinition]}
|
||||
*/
|
||||
shapeActionCutQuad(definition) {
|
||||
const key = "cut-quad:" + definition.getHash();
|
||||
const key = "cut-quad/" + definition.getHash();
|
||||
if (this.operationCache[key]) {
|
||||
return /** @type {[ShapeDefinition, ShapeDefinition, ShapeDefinition, ShapeDefinition]} */ (this
|
||||
.operationCache[key]);
|
||||
@ -130,7 +130,7 @@ export class ShapeDefinitionManager extends BasicSerializableObject {
|
||||
* @returns {ShapeDefinition}
|
||||
*/
|
||||
shapeActionRotateCW(definition) {
|
||||
const key = "rotate-cw:" + definition.getHash();
|
||||
const key = "rotate-cw/" + definition.getHash();
|
||||
if (this.operationCache[key]) {
|
||||
return /** @type {ShapeDefinition} */ (this.operationCache[key]);
|
||||
}
|
||||
@ -148,7 +148,7 @@ export class ShapeDefinitionManager extends BasicSerializableObject {
|
||||
* @returns {ShapeDefinition}
|
||||
*/
|
||||
shapeActionRotateCCW(definition) {
|
||||
const key = "rotate-ccw:" + definition.getHash();
|
||||
const key = "rotate-ccw/" + definition.getHash();
|
||||
if (this.operationCache[key]) {
|
||||
return /** @type {ShapeDefinition} */ (this.operationCache[key]);
|
||||
}
|
||||
@ -166,7 +166,7 @@ export class ShapeDefinitionManager extends BasicSerializableObject {
|
||||
* @returns {ShapeDefinition}
|
||||
*/
|
||||
shapeActionRotate180(definition) {
|
||||
const key = "rotate-fl:" + definition.getHash();
|
||||
const key = "rotate-fl/" + definition.getHash();
|
||||
if (this.operationCache[key]) {
|
||||
return /** @type {ShapeDefinition} */ (this.operationCache[key]);
|
||||
}
|
||||
@ -185,7 +185,7 @@ export class ShapeDefinitionManager extends BasicSerializableObject {
|
||||
* @returns {ShapeDefinition}
|
||||
*/
|
||||
shapeActionStack(lowerDefinition, upperDefinition) {
|
||||
const key = "stack:" + lowerDefinition.getHash() + ":" + upperDefinition.getHash();
|
||||
const key = "stack/" + lowerDefinition.getHash() + "/" + upperDefinition.getHash();
|
||||
if (this.operationCache[key]) {
|
||||
return /** @type {ShapeDefinition} */ (this.operationCache[key]);
|
||||
}
|
||||
@ -202,7 +202,7 @@ export class ShapeDefinitionManager extends BasicSerializableObject {
|
||||
* @returns {ShapeDefinition}
|
||||
*/
|
||||
shapeActionPaintWith(definition, color) {
|
||||
const key = "paint:" + definition.getHash() + ":" + color;
|
||||
const key = "paint/" + definition.getHash() + "/" + color;
|
||||
if (this.operationCache[key]) {
|
||||
return /** @type {ShapeDefinition} */ (this.operationCache[key]);
|
||||
}
|
||||
@ -219,7 +219,7 @@ export class ShapeDefinitionManager extends BasicSerializableObject {
|
||||
* @returns {ShapeDefinition}
|
||||
*/
|
||||
shapeActionPaintWith4Colors(definition, colors) {
|
||||
const key = "paint4:" + definition.getHash() + ":" + colors.join(",");
|
||||
const key = "paint4/" + definition.getHash() + "/" + colors.join(",");
|
||||
if (this.operationCache[key]) {
|
||||
return /** @type {ShapeDefinition} */ (this.operationCache[key]);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user