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

Wegame version & DLC Translation in Chinese

This commit is contained in:
tobspr
2021-05-25 09:19:57 +02:00
parent 65721e0837
commit b3d1204d9c
18 changed files with 332 additions and 222 deletions

View File

@@ -101,7 +101,10 @@ export class ClientAPI {
*/
apiTryLogin() {
if (!G_IS_STANDALONE) {
return Promise.reject("Not possible outside of standalone.");
const token = window.prompt(
"Please enter the auth token for the puzzle DLC (If you have none, you can't login):"
);
return Promise.resolve({ token });
}
const renderer = getIPCRenderer();

View File

@@ -53,6 +53,10 @@ export class ShapezGameAnalytics extends GameAnalyticsInterface {
initialize() {
this.syncKey = null;
if (G_WEGAME_VERSION) {
return;
}
setInterval(() => this.sendTimePoints(), 60 * 1000);
// Retrieve sync key from player
@@ -136,6 +140,10 @@ export class ShapezGameAnalytics extends GameAnalyticsInterface {
* @param {string} value
*/
sendGameEvent(category, value) {
if (G_WEGAME_VERSION) {
return;
}
if (!this.syncKey) {
logger.warn("Can not send event due to missing sync key");
return;