1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2025-06-13 13:04:03 +00:00

Fix stacking

Also formats other 2-input keys
This commit is contained in:
EmeraldBlock 2020-10-09 15:10:38 -05:00 committed by GitHub
parent 366a2a9f58
commit b702b99150
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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]);
}