1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2026-03-02 03:39:21 +00:00

Refactor item processor to use charges and thus be more correct, even at low tick rates

This commit is contained in:
tobspr
2020-08-30 15:31:53 +02:00
parent 091401e52b
commit 9b8745535b
20 changed files with 2105 additions and 1975 deletions

View File

@@ -123,10 +123,9 @@ export const autosaveIntervals = [
},
];
const refreshRateOptions = ["60", "75", "100", "120", "144", "165", "250", "500"];
const refreshRateOptions = ["30", "60", "120", "180", "240"];
if (G_IS_DEV) {
refreshRateOptions.unshift("30");
refreshRateOptions.unshift("10");
refreshRateOptions.unshift("5");
refreshRateOptions.push("1000");
@@ -511,7 +510,7 @@ export class ApplicationSettings extends ReadWriteProxy {
}
getCurrentVersion() {
return 23;
return 24;
}
/** @param {{settings: SettingsStorage, version: number}} data */
@@ -614,6 +613,11 @@ export class ApplicationSettings extends ReadWriteProxy {
data.version = 23;
}
if (data.version < 24) {
data.settings.refreshRate = "60";
data.version = 24;
}
return ExplainedResult.good();
}
}