mirror of
https://github.com/tobspr/shapez.io.git
synced 2024-10-27 20:34:29 +00:00
Fix bug with pinned shapes not properly refreshed
This commit is contained in:
parent
7870f011b8
commit
2c9867c837
@ -37,7 +37,7 @@ export const globalConfig = {
|
|||||||
|
|
||||||
// Belt speeds
|
// Belt speeds
|
||||||
// NOTICE: Update webpack.production.config too!
|
// NOTICE: Update webpack.production.config too!
|
||||||
beltSpeedItemsPerSecond: 10,
|
beltSpeedItemsPerSecond: 1,
|
||||||
itemSpacingOnBelts: 0.63,
|
itemSpacingOnBelts: 0.63,
|
||||||
minerSpeedItemsPerSecond: 0, // COMPUTED
|
minerSpeedItemsPerSecond: 0, // COMPUTED
|
||||||
|
|
||||||
@ -71,7 +71,7 @@ export const globalConfig = {
|
|||||||
|
|
||||||
debug: {
|
debug: {
|
||||||
/* dev:start */
|
/* dev:start */
|
||||||
fastGameEnter: true,
|
// fastGameEnter: true,
|
||||||
noArtificialDelays: true,
|
noArtificialDelays: true,
|
||||||
// disableSavegameWrite: true,
|
// disableSavegameWrite: true,
|
||||||
showEntityBounds: false,
|
showEntityBounds: false,
|
||||||
|
@ -18,6 +18,7 @@ export class HUDPinnedShapes extends BaseHUDPart {
|
|||||||
this.rerenderFull();
|
this.rerenderFull();
|
||||||
|
|
||||||
this.root.signals.storyGoalCompleted.add(this.rerenderFull, this);
|
this.root.signals.storyGoalCompleted.add(this.rerenderFull, this);
|
||||||
|
this.root.signals.postLoadHook.add(this.rerenderFull, this);
|
||||||
this.root.hud.signals.shapePinRequested.add(this.pinNewShape, this);
|
this.root.hud.signals.shapePinRequested.add(this.pinNewShape, this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -161,7 +161,7 @@ export class SavegameManager extends ReadWriteProxy {
|
|||||||
sortSavegames() {
|
sortSavegames() {
|
||||||
this.currentData.savegames.sort((a, b) => b.lastUpdate - a.lastUpdate);
|
this.currentData.savegames.sort((a, b) => b.lastUpdate - a.lastUpdate);
|
||||||
let promiseChain = Promise.resolve();
|
let promiseChain = Promise.resolve();
|
||||||
while (this.currentData.savegames.length > 100) {
|
while (this.currentData.savegames.length > 30) {
|
||||||
const toRemove = this.currentData.savegames.pop();
|
const toRemove = this.currentData.savegames.pop();
|
||||||
|
|
||||||
// Try to remove the savegame since its no longer available
|
// Try to remove the savegame since its no longer available
|
||||||
@ -200,7 +200,7 @@ export class SavegameManager extends ReadWriteProxy {
|
|||||||
if (G_IS_DEV && globalConfig.debug.disableSavegameWrite) {
|
if (G_IS_DEV && globalConfig.debug.disableSavegameWrite) {
|
||||||
return Promise.resolve();
|
return Promise.resolve();
|
||||||
}
|
}
|
||||||
return this.writeAsync();
|
return this.sortSavegames().then(() => this.writeAsync());
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user