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:
parent
366a2a9f58
commit
b702b99150
@ -185,7 +185,7 @@ export class ShapeDefinitionManager extends BasicSerializableObject {
|
|||||||
* @returns {ShapeDefinition}
|
* @returns {ShapeDefinition}
|
||||||
*/
|
*/
|
||||||
shapeActionStack(lowerDefinition, upperDefinition) {
|
shapeActionStack(lowerDefinition, upperDefinition) {
|
||||||
const key = "stack:" + lowerDefinition.getHash() + ":" + upperDefinition.getHash();
|
const key = "stack:" + lowerDefinition.getHash() + "+" + upperDefinition.getHash();
|
||||||
if (this.operationCache[key]) {
|
if (this.operationCache[key]) {
|
||||||
return /** @type {ShapeDefinition} */ (this.operationCache[key]);
|
return /** @type {ShapeDefinition} */ (this.operationCache[key]);
|
||||||
}
|
}
|
||||||
@ -202,7 +202,7 @@ export class ShapeDefinitionManager extends BasicSerializableObject {
|
|||||||
* @returns {ShapeDefinition}
|
* @returns {ShapeDefinition}
|
||||||
*/
|
*/
|
||||||
shapeActionPaintWith(definition, color) {
|
shapeActionPaintWith(definition, color) {
|
||||||
const key = "paint:" + definition.getHash() + ":" + color;
|
const key = "paint:" + definition.getHash() + "+" + color;
|
||||||
if (this.operationCache[key]) {
|
if (this.operationCache[key]) {
|
||||||
return /** @type {ShapeDefinition} */ (this.operationCache[key]);
|
return /** @type {ShapeDefinition} */ (this.operationCache[key]);
|
||||||
}
|
}
|
||||||
@ -219,7 +219,7 @@ export class ShapeDefinitionManager extends BasicSerializableObject {
|
|||||||
* @returns {ShapeDefinition}
|
* @returns {ShapeDefinition}
|
||||||
*/
|
*/
|
||||||
shapeActionPaintWith4Colors(definition, colors) {
|
shapeActionPaintWith4Colors(definition, colors) {
|
||||||
const key = "paint4:" + definition.getHash() + ":" + colors.join(",");
|
const key = "paint4:" + definition.getHash() + "+" + colors.join(",");
|
||||||
if (this.operationCache[key]) {
|
if (this.operationCache[key]) {
|
||||||
return /** @type {ShapeDefinition} */ (this.operationCache[key]);
|
return /** @type {ShapeDefinition} */ (this.operationCache[key]);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user