mirror of
https://github.com/tobspr/shapez.io.git
synced 2025-12-16 03:31:52 +00:00
Add variables for shape-percentages
- Add `fullShapePercentage` and `wierdShapePercentage` to `BaseMap` - added migration for `fullShapePercentage` and `wierdShapePercentage` in `savegame/1010.js` Signed-off-by: Daan Breur <git@daanbreur.systems>
This commit is contained in:
parent
564085466d
commit
3897b41d45
@ -16,6 +16,8 @@ export class BaseMap extends BasicSerializableObject {
|
|||||||
return {
|
return {
|
||||||
seed: types.uint,
|
seed: types.uint,
|
||||||
allowNonPrimaryColors: types.bool,
|
allowNonPrimaryColors: types.bool,
|
||||||
|
fullShapePercentage: types.uint,
|
||||||
|
wierdShapePercentage: types.uint,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -29,6 +31,8 @@ export class BaseMap extends BasicSerializableObject {
|
|||||||
|
|
||||||
this.seed = 0;
|
this.seed = 0;
|
||||||
this.allowNonPrimaryColors = false;
|
this.allowNonPrimaryColors = false;
|
||||||
|
this.fullShapePercentage = 0;
|
||||||
|
this.wierdShapePercentage = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Mapping of 'X|Y' to chunk
|
* Mapping of 'X|Y' to chunk
|
||||||
|
|||||||
@ -26,5 +26,13 @@ export class SavegameInterface_V1010 extends SavegameInterface_V1009 {
|
|||||||
if (!dump.map.hasOwnProperty("allowNonPrimaryColors")) {
|
if (!dump.map.hasOwnProperty("allowNonPrimaryColors")) {
|
||||||
dump.map.allowNonPrimaryColors = false;
|
dump.map.allowNonPrimaryColors = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!dump.map.hasOwnProperty("fullShapePercentage")) {
|
||||||
|
dump.map.fullShapePercentage = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!dump.map.hasOwnProperty("wierdShapePercentage")) {
|
||||||
|
dump.map.wierdShapePercentage = 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user