1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2025-06-13 13:04:03 +00:00
This commit is contained in:
DJ1TJOO 2021-03-10 17:15:00 +01:00
parent 2e3cd126fb
commit ef7e76c1e4
6 changed files with 8802 additions and 7682 deletions

View File

@ -1,5 +1,5 @@
const fs = require('fs');
const path = require('path');
const fs = require("fs");
const path = require("path");
const { ipcMain } = require("electron");
let greenworks = null;
@ -14,7 +14,7 @@ try {
// throw err;
}
function init (isDev) {
function init(isDev) {
if (!greenworks) {
return;
}
@ -34,7 +34,7 @@ function init (isDev) {
initialized = true;
}
function listen () {
function listen() {
ipcMain.handle("steam:is-initialized", isInitialized);
if (!greenworks || !initialized) {
@ -53,7 +53,7 @@ function isInitialized(event) {
function getAchievementNames(event) {
return new Promise((resolve, reject) => {
try {
const achievements = greenworks.getAchievementNames()
const achievements = greenworks.getAchievementNames();
resolve(achievements);
} catch (err) {
reject(err);
@ -63,11 +63,15 @@ function getAchievementNames(event) {
function activateAchievement(event, id) {
return new Promise((resolve, reject) => {
greenworks.activateAchievement(id, () => resolve(), err => reject(err))
greenworks.activateAchievement(
id,
() => resolve(),
err => reject(err)
);
});
}
module.exports = {
init,
listen
listen,
};

View File

@ -9,6 +9,13 @@
dependencies:
"@babel/highlight" "^7.8.3"
"@babel/code-frame@^7.12.13":
version "7.12.13"
resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.13.tgz#dcfc826beef65e75c50e21d3837d7d95798dd658"
integrity sha512-HV1Cm0Q3ZrpCR93tkWOYiuYIgLxZXZFVG2VgK+MBWjUqZTundupbfx2aXarXuw5Ko5aMcjtJgbSs4vUGBS5v6g==
dependencies:
"@babel/highlight" "^7.12.13"
"@babel/core@^7.9.0":
version "7.9.0"
resolved "https://registry.npmjs.org/@babel/core/-/core-7.9.0.tgz"
@ -31,6 +38,15 @@
semver "^5.4.1"
source-map "^0.5.0"
"@babel/generator@^7.13.0":
version "7.13.9"
resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.13.9.tgz#3a7aa96f9efb8e2be42d38d80e2ceb4c64d8de39"
integrity sha512-mHOOmY0Axl/JCTkxTU6Lf5sWOg/v8nUa+Xkt4zMTftX0wqmb6Sh7J8gvcehBw7q0AhrhAR+FDacKjCZ2X8K+Sw==
dependencies:
"@babel/types" "^7.13.0"
jsesc "^2.5.1"
source-map "^0.5.0"
"@babel/generator@^7.9.0", "@babel/generator@^7.9.5":
version "7.9.5"
resolved "https://registry.npmjs.org/@babel/generator/-/generator-7.9.5.tgz"
@ -65,6 +81,17 @@
"@babel/traverse" "^7.4.4"
"@babel/types" "^7.4.4"
"@babel/helper-create-class-features-plugin@^7.13.0":
version "7.13.10"
resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.13.10.tgz#073b2bbb925a097643c6fc5770e5f13394e887c9"
integrity sha512-YV7r2YxdTUaw84EwNkyrRke/TJHR/UXGiyvACRqvdVJ2/syV2rQuJNnaRLSuYiop8cMRXOgseTGoJCWX0q2fFg==
dependencies:
"@babel/helper-function-name" "^7.12.13"
"@babel/helper-member-expression-to-functions" "^7.13.0"
"@babel/helper-optimise-call-expression" "^7.12.13"
"@babel/helper-replace-supers" "^7.13.0"
"@babel/helper-split-export-declaration" "^7.12.13"
"@babel/helper-define-map@^7.5.5":
version "7.5.5"
resolved "https://registry.npmjs.org/@babel/helper-define-map/-/helper-define-map-7.5.5.tgz"
@ -91,6 +118,15 @@
"@babel/template" "^7.8.3"
"@babel/types" "^7.9.5"
"@babel/helper-function-name@^7.12.13":
version "7.12.13"
resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.12.13.tgz#93ad656db3c3c2232559fd7b2c3dbdcbe0eb377a"
integrity sha512-TZvmPn0UOqmvi5G4vvw0qZTpVptGkB1GL61R6lKvrSdIxGm5Pky7Q3fpKiIkQCAtRCBUwB0PaThlx9vebCDSwA==
dependencies:
"@babel/helper-get-function-arity" "^7.12.13"
"@babel/template" "^7.12.13"
"@babel/types" "^7.12.13"
"@babel/helper-get-function-arity@^7.0.0", "@babel/helper-get-function-arity@^7.8.3":
version "7.8.3"
resolved "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.8.3.tgz"
@ -98,6 +134,13 @@
dependencies:
"@babel/types" "^7.8.3"
"@babel/helper-get-function-arity@^7.12.13":
version "7.12.13"
resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.12.13.tgz#bc63451d403a3b3082b97e1d8b3fe5bd4091e583"
integrity sha512-DjEVzQNz5LICkzN0REdpD5prGoidvbdYk1BVgRUOINaWJP2t6avB27X1guXK1kXNrX0WMfsrm1A/ZBthYuIMQg==
dependencies:
"@babel/types" "^7.12.13"
"@babel/helper-hoist-variables@^7.4.4":
version "7.4.4"
resolved "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.4.4.tgz"
@ -105,6 +148,13 @@
dependencies:
"@babel/types" "^7.4.4"
"@babel/helper-member-expression-to-functions@^7.13.0":
version "7.13.0"
resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.13.0.tgz#6aa4bb678e0f8c22f58cdb79451d30494461b091"
integrity sha512-yvRf8Ivk62JwisqV1rFRMxiSMDGnN6KH1/mDMmIrij4jztpQNRoHqqMG3U6apYbGRPJpgPalhva9Yd06HlUxJQ==
dependencies:
"@babel/types" "^7.13.0"
"@babel/helper-member-expression-to-functions@^7.8.3":
version "7.8.3"
resolved "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.8.3.tgz"
@ -139,11 +189,23 @@
dependencies:
"@babel/types" "^7.8.3"
"@babel/helper-optimise-call-expression@^7.12.13":
version "7.12.13"
resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.12.13.tgz#5c02d171b4c8615b1e7163f888c1c81c30a2aaea"
integrity sha512-BdWQhoVJkp6nVjB7nkFWcn43dkprYauqtk++Py2eaf/GRDFm5BxRqEIZCiHlZUGAVmtwKcsVL1dC68WmzeFmiA==
dependencies:
"@babel/types" "^7.12.13"
"@babel/helper-plugin-utils@^7.0.0":
version "7.0.0"
resolved "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0.tgz"
integrity sha512-CYAOUCARwExnEixLdB6sDm2dIJ/YgEAKDM1MOeMeZu9Ld/bDgVo8aiWrXwcY7OBh+1Ea2uUcVRcxKk0GJvW7QA==
"@babel/helper-plugin-utils@^7.13.0":
version "7.13.0"
resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.13.0.tgz#806526ce125aed03373bc416a828321e3a6a33af"
integrity sha512-ZPafIPSwzUlAoWT8DKs1W2VyF2gOWthGd5NGFMsBcMMol+ZhK+EQY/e6V96poa6PA/Bh+C9plWN0hXO1uB8AfQ==
"@babel/helper-regex@^7.0.0", "@babel/helper-regex@^7.4.4":
version "7.5.5"
resolved "https://registry.npmjs.org/@babel/helper-regex/-/helper-regex-7.5.5.tgz"
@ -162,6 +224,16 @@
"@babel/traverse" "^7.1.0"
"@babel/types" "^7.0.0"
"@babel/helper-replace-supers@^7.13.0":
version "7.13.0"
resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.13.0.tgz#6034b7b51943094cb41627848cb219cb02be1d24"
integrity sha512-Segd5me1+Pz+rmN/NFBOplMbZG3SqRJOBlY+mA0SxAv6rjj7zJqr1AVr3SfzUVTLCv7ZLU5FycOM/SBGuLPbZw==
dependencies:
"@babel/helper-member-expression-to-functions" "^7.13.0"
"@babel/helper-optimise-call-expression" "^7.12.13"
"@babel/traverse" "^7.13.0"
"@babel/types" "^7.13.0"
"@babel/helper-replace-supers@^7.5.5", "@babel/helper-replace-supers@^7.8.6":
version "7.8.6"
resolved "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.8.6.tgz"
@ -180,6 +252,13 @@
"@babel/template" "^7.8.3"
"@babel/types" "^7.8.3"
"@babel/helper-split-export-declaration@^7.12.13":
version "7.12.13"
resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.12.13.tgz#e9430be00baf3e88b0e13e6f9d4eaf2136372b05"
integrity sha512-tCJDltF83htUtXx5NLcaDqRmknv652ZWCHyoTETf1CXYJdPC7nohZohjUgieXhv0hTJdRf2FjDueFehdNucpzg==
dependencies:
"@babel/types" "^7.12.13"
"@babel/helper-split-export-declaration@^7.4.4", "@babel/helper-split-export-declaration@^7.8.3":
version "7.8.3"
resolved "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.8.3.tgz"
@ -187,6 +266,11 @@
dependencies:
"@babel/types" "^7.8.3"
"@babel/helper-validator-identifier@^7.12.11":
version "7.12.11"
resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz#c9a1f021917dcb5ccf0d4e453e399022981fc9ed"
integrity sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==
"@babel/helper-validator-identifier@^7.9.0", "@babel/helper-validator-identifier@^7.9.5":
version "7.9.5"
resolved "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.9.5.tgz"
@ -211,6 +295,15 @@
"@babel/traverse" "^7.9.0"
"@babel/types" "^7.9.0"
"@babel/highlight@^7.12.13":
version "7.13.10"
resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.13.10.tgz#a8b2a66148f5b27d666b15d81774347a731d52d1"
integrity sha512-5aPpe5XQPzflQrFwL1/QoeHkP2MsA4JCntcXHRhEsdsfPVkvPi2w7Qix4iV7t5S/oC9OodGrggd8aco1g3SZFg==
dependencies:
"@babel/helper-validator-identifier" "^7.12.11"
chalk "^2.0.0"
js-tokens "^4.0.0"
"@babel/highlight@^7.8.3":
version "7.9.0"
resolved "https://registry.npmjs.org/@babel/highlight/-/highlight-7.9.0.tgz"
@ -220,6 +313,11 @@
chalk "^2.0.0"
js-tokens "^4.0.0"
"@babel/parser@^7.12.13", "@babel/parser@^7.13.0":
version "7.13.10"
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.13.10.tgz#8f8f9bf7b3afa3eabd061f7a5bcdf4fec3c48409"
integrity sha512-0s7Mlrw9uTWkYua7xWr99Wpk2bnGa0ANleKfksYAES8LpWH4gW1OUr42vqKNf0us5UQNfru2wPqMqRITzq/SIQ==
"@babel/parser@^7.8.6", "@babel/parser@^7.9.0":
version "7.9.4"
resolved "https://registry.npmjs.org/@babel/parser/-/parser-7.9.4.tgz"
@ -234,6 +332,14 @@
"@babel/helper-remap-async-to-generator" "^7.1.0"
"@babel/plugin-syntax-async-generators" "^7.2.0"
"@babel/plugin-proposal-class-properties@^7.13.0":
version "7.13.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.13.0.tgz#146376000b94efd001e57a40a88a525afaab9f37"
integrity sha512-KnTDjFNC1g+45ka0myZNvSBFLhNCLN+GeGYLDEA8Oq7MZ6yMgfLoIRh86GRT0FjtJhZw8JyUskP9uvj5pHM9Zg==
dependencies:
"@babel/helper-create-class-features-plugin" "^7.13.0"
"@babel/helper-plugin-utils" "^7.13.0"
"@babel/plugin-proposal-dynamic-import@^7.5.0":
version "7.5.0"
resolved "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.5.0.tgz"
@ -266,6 +372,14 @@
"@babel/helper-plugin-utils" "^7.0.0"
"@babel/plugin-syntax-optional-catch-binding" "^7.2.0"
"@babel/plugin-proposal-private-methods@^7.13.0":
version "7.13.0"
resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.13.0.tgz#04bd4c6d40f6e6bbfa2f57e2d8094bad900ef787"
integrity sha512-MXyyKQd9inhx1kDYPkFRVOBXQ20ES8Pto3T7UZ92xj2mY0EVD8oAVzeyYuVfy/mxAdTSIayOvg+aVzcHV2bn6Q==
dependencies:
"@babel/helper-create-class-features-plugin" "^7.13.0"
"@babel/helper-plugin-utils" "^7.13.0"
"@babel/plugin-proposal-unicode-property-regex@^7.4.4":
version "7.4.4"
resolved "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.4.4.tgz"
@ -628,6 +742,15 @@
"@babel/parser" "^7.8.6"
"@babel/types" "^7.8.6"
"@babel/template@^7.12.13":
version "7.12.13"
resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.12.13.tgz#530265be8a2589dbb37523844c5bcb55947fb327"
integrity sha512-/7xxiGA57xMo/P2GVvdEumr8ONhFOhfgq2ihK3h1e6THqzTAkHbkXgB0xI9yeTfIUoH3+oAeHhqm/I43OTbbjA==
dependencies:
"@babel/code-frame" "^7.12.13"
"@babel/parser" "^7.12.13"
"@babel/types" "^7.12.13"
"@babel/traverse@^7.1.0", "@babel/traverse@^7.4.4", "@babel/traverse@^7.8.6", "@babel/traverse@^7.9.0":
version "7.9.5"
resolved "https://registry.npmjs.org/@babel/traverse/-/traverse-7.9.5.tgz"
@ -643,6 +766,21 @@
globals "^11.1.0"
lodash "^4.17.13"
"@babel/traverse@^7.13.0":
version "7.13.0"
resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.13.0.tgz#6d95752475f86ee7ded06536de309a65fc8966cc"
integrity sha512-xys5xi5JEhzC3RzEmSGrs/b3pJW/o87SypZ+G/PhaE7uqVQNv/jlmVIBXuoh5atqQ434LfXV+sf23Oxj0bchJQ==
dependencies:
"@babel/code-frame" "^7.12.13"
"@babel/generator" "^7.13.0"
"@babel/helper-function-name" "^7.12.13"
"@babel/helper-split-export-declaration" "^7.12.13"
"@babel/parser" "^7.13.0"
"@babel/types" "^7.13.0"
debug "^4.1.0"
globals "^11.1.0"
lodash "^4.17.19"
"@babel/types@^7.0.0", "@babel/types@^7.2.0", "@babel/types@^7.4.4", "@babel/types@^7.5.5", "@babel/types@^7.6.0", "@babel/types@^7.8.3", "@babel/types@^7.8.6", "@babel/types@^7.9.0", "@babel/types@^7.9.5":
version "7.9.5"
resolved "https://registry.npmjs.org/@babel/types/-/types-7.9.5.tgz"
@ -652,6 +790,15 @@
lodash "^4.17.13"
to-fast-properties "^2.0.0"
"@babel/types@^7.12.13", "@babel/types@^7.13.0":
version "7.13.0"
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.13.0.tgz#74424d2816f0171b4100f0ab34e9a374efdf7f80"
integrity sha512-hE+HE8rnG1Z6Wzo+MhaKE5lM5eMx71T4EHJgku2E3xIfaULhDcxiiRxUYgwX8qwP1BBSlag+TdGOt6JAidIZTA==
dependencies:
"@babel/helper-validator-identifier" "^7.12.11"
lodash "^4.17.19"
to-fast-properties "^2.0.0"
"@csstools/convert-colors@^1.4.0":
version "1.4.0"
resolved "https://registry.npmjs.org/@csstools/convert-colors/-/convert-colors-1.4.0.tgz"
@ -1794,6 +1941,25 @@ babel-generator@^6.26.0:
source-map "^0.5.7"
trim-right "^1.0.1"
babel-helper-function-name@^6.24.1:
version "6.24.1"
resolved "https://registry.yarnpkg.com/babel-helper-function-name/-/babel-helper-function-name-6.24.1.tgz#d3475b8c03ed98242a25b48351ab18399d3580a9"
integrity sha1-00dbjAPtmCQqJbSDUasYOZ01gKk=
dependencies:
babel-helper-get-function-arity "^6.24.1"
babel-runtime "^6.22.0"
babel-template "^6.24.1"
babel-traverse "^6.24.1"
babel-types "^6.24.1"
babel-helper-get-function-arity@^6.24.1:
version "6.24.1"
resolved "https://registry.yarnpkg.com/babel-helper-get-function-arity/-/babel-helper-get-function-arity-6.24.1.tgz#8f7782aa93407c41d3aa50908f89b031b1b6853d"
integrity sha1-j3eCqpNAfEHTqlCQj4mwMbG2hT0=
dependencies:
babel-runtime "^6.22.0"
babel-types "^6.24.1"
babel-helpers@^6.24.1:
version "6.24.1"
resolved "https://registry.npmjs.org/babel-helpers/-/babel-helpers-6.24.1.tgz"
@ -1842,6 +2008,26 @@ babel-plugin-dynamic-import-node@^2.3.0:
dependencies:
object.assign "^4.1.0"
babel-plugin-shake-class-properties@^0.2.0:
version "0.2.0"
resolved "https://registry.yarnpkg.com/babel-plugin-shake-class-properties/-/babel-plugin-shake-class-properties-0.2.0.tgz#fb8346725f8418f992d5d193014c57533c404a85"
integrity sha512-++i7B90ohCRp4t6rvuq3xO1Ugq5rf4r2+a0bU4cjSWNwJqq9m2MueiJ3epQ+CTBGUrzf4f7l+ReLcSlA1i0ckA==
babel-plugin-syntax-class-properties@^6.8.0:
version "6.13.0"
resolved "https://registry.yarnpkg.com/babel-plugin-syntax-class-properties/-/babel-plugin-syntax-class-properties-6.13.0.tgz#d7eb23b79a317f8543962c505b827c7d6cac27de"
integrity sha1-1+sjt5oxf4VDlixQW4J8fWysJ94=
babel-plugin-transform-class-properties@^6.24.1:
version "6.24.1"
resolved "https://registry.yarnpkg.com/babel-plugin-transform-class-properties/-/babel-plugin-transform-class-properties-6.24.1.tgz#6a79763ea61d33d36f37b611aa9def81a81b46ac"
integrity sha1-anl2PqYdM9NvN7YRqp3vgagbRqw=
dependencies:
babel-helper-function-name "^6.24.1"
babel-plugin-syntax-class-properties "^6.8.0"
babel-runtime "^6.22.0"
babel-template "^6.24.1"
babel-register@^6.26.0:
version "6.26.0"
resolved "https://registry.npmjs.org/babel-register/-/babel-register-6.26.0.tgz"
@ -1882,7 +2068,7 @@ babel-template@^6.24.1, babel-template@^6.26.0:
babylon "^6.18.0"
lodash "^4.17.4"
babel-traverse@^6.26.0:
babel-traverse@^6.24.1, babel-traverse@^6.26.0:
version "6.26.0"
resolved "https://registry.npmjs.org/babel-traverse/-/babel-traverse-6.26.0.tgz"
integrity sha1-RqnL1+3MYsjlwGTi0tjQ9ANXZu4=
@ -1897,7 +2083,7 @@ babel-traverse@^6.26.0:
invariant "^2.2.2"
lodash "^4.17.4"
babel-types@^6.26.0:
babel-types@^6.24.1, babel-types@^6.26.0:
version "6.26.0"
resolved "https://registry.npmjs.org/babel-types/-/babel-types-6.26.0.tgz"
integrity sha1-o7Bz+Uq0nrb6Vc1lInozQ4BjJJc=
@ -7727,6 +7913,11 @@ lodash@^4.0.0, lodash@^4.15.0, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.12
resolved "https://registry.npmjs.org/lodash/-/lodash-4.17.15.tgz"
integrity sha512-8xOcRHvCjnocdS5cpwXQXVzmmh5e5+saE2QGoeQmbKmRS6J3VQppPOIt0MnmE+4xlZoumy0GPG0D0MVIQbNA1A==
lodash@^4.17.19:
version "4.17.21"
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"
integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==
lodash@~1.0.1:
version "1.0.2"
resolved "https://registry.npmjs.org/lodash/-/lodash-1.0.2.tgz"
@ -13051,16 +13242,11 @@ yaml-loader@^0.6.0:
loader-utils "^1.4.0"
yaml "^1.8.3"
yaml@^1.10.0:
yaml@^1.10.0, yaml@^1.8.3:
version "1.10.0"
resolved "https://registry.yarnpkg.com/yaml/-/yaml-1.10.0.tgz#3b593add944876077d4d683fee01081bd9fff31e"
integrity sha512-yr2icI4glYaNG+KWONODapy2/jDdMSDnrONSjblABjD9B4Z5LgiircSt8m8sRZFNi08kG9Sm0uSHtEmP3zaEGg==
yaml@^1.8.3:
version "1.10.0"
resolved "https://registry.npmjs.org/yaml/-/yaml-1.10.0.tgz"
integrity sha512-yr2icI4glYaNG+KWONODapy2/jDdMSDnrONSjblABjD9B4Z5LgiircSt8m8sRZFNi08kG9Sm0uSHtEmP3zaEGg==
yargs-parser@5.0.0-security.0:
version "5.0.0-security.0"
resolved "https://registry.npmjs.org/yargs-parser/-/yargs-parser-5.0.0-security.0.tgz"

2
src/js/globals.d.ts vendored
View File

@ -19,7 +19,7 @@ declare const G_BUILD_VERSION: string;
declare const G_ALL_UI_IMAGES: Array<string>;
declare const G_IS_RELEASE: boolean;
declare const G_CHINA_VERSION : boolean;
declare const G_CHINA_VERSION: boolean;
// Polyfills
declare interface String {

View File

@ -5,11 +5,7 @@ import { GameRoot } from "../../game/root";
import { createLogger } from "../../core/logging";
import { getIPCRenderer } from "../../core/utils";
import {
ACHIEVEMENTS,
AchievementCollection,
AchievementProviderInterface
} from "../achievement_provider";
import { ACHIEVEMENTS, AchievementCollection, AchievementProviderInterface } from "../achievement_provider";
const logger = createLogger("achievements/steam");
@ -111,16 +107,15 @@ export class SteamAchievementProvider extends AchievementProviderInterface {
this.ipc = getIPCRenderer();
return this.ipc.invoke("steam:is-initialized")
.then(initialized => {
this.initialized = initialized;
return this.ipc.invoke("steam:is-initialized").then(initialized => {
this.initialized = initialized;
if (!this.initialized) {
logger.warn("Steam failed to intialize. Achievements won't sync.");
} else {
logger.log("Steam achievement provider initialized");
}
});
if (!this.initialized) {
logger.warn("Steam failed to intialize. Achievements won't sync.");
} else {
logger.log("Steam achievement provider initialized");
}
});
}
/**

View File

@ -23,8 +23,9 @@ export class PlatformWrapperImplElectron extends PlatformWrapperImplBrowser {
this.app.storage = new StorageImplElectron(this);
this.app.achievementProvider = new SteamAchievementProvider(this.app);
return this.initializeAchievementProvider()
.then(() => PlatformWrapperInterface.prototype.initialize.call(this));
return this.initializeAchievementProvider().then(() =>
PlatformWrapperInterface.prototype.initialize.call(this)
);
}
steamOverlayFixRedrawCanvas() {
@ -58,12 +59,11 @@ export class PlatformWrapperImplElectron extends PlatformWrapperImplBrowser {
}
initializeAchievementProvider() {
return this.app.achievementProvider.initialize()
.catch(err => {
logger.error("Failed to initialize achievement provider, disabling:", err);
return this.app.achievementProvider.initialize().catch(err => {
logger.error("Failed to initialize achievement provider, disabling:", err);
this.app.achievementProvider = new NoAchievementProvider(this.app);
});
this.app.achievementProvider = new NoAchievementProvider(this.app);
});
}
getSupportsFullscreen() {

16225
yarn.lock

File diff suppressed because it is too large Load Diff