1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2025-06-13 13:04:03 +00:00

[WIP] Add steam overlay fix, add hash to artifact dependency

This commit is contained in:
Greg Considine 2021-02-28 15:31:19 -05:00
parent 3f6adbd791
commit 42d9901614
5 changed files with 23 additions and 4 deletions

View File

@ -11,7 +11,7 @@
"electron": "9.4.3"
},
"optionalDependencies": {
"shapez.io-private-artifacts": "github:tobspr/shapez.io-private-artifacts"
"shapez.io-private-artifacts": "github:tobspr/shapez.io-private-artifacts#af8d792fe1429af95d990bba4a68362c2aa907c9"
}
},
"node_modules/@electron/get": {
@ -1547,7 +1547,7 @@
"shapez.io-private-artifacts": {
"version": "git+ssh://git@github.com/tobspr/shapez.io-private-artifacts.git",
"integrity": "sha512-Sp3JL2gSJloqkZ5hINBTcrFomwnCD0mguuRMfJb91SkcZfZuySPEtfi7m2S+96GedA1BI6+gLygDRY217ElTFg==",
"from": "shapez.io-private-artifacts@github:tobspr/shapez.io-private-artifacts",
"from": "git+ssh://git@github.com/tobspr/shapez.io-private-artifacts.git",
"optional": true
},
"sprintf-js": {

View File

@ -13,6 +13,6 @@
"electron": "9.4.3"
},
"optionalDependencies": {
"shapez.io-private-artifacts": "github:tobspr/shapez.io-private-artifacts"
"shapez.io-private-artifacts": "github:tobspr/shapez.io-private-artifacts#af8d792fe1429af95d990bba4a68362c2aa907c9"
}
}

View File

@ -498,7 +498,7 @@
dependencies:
"type-fest" "^0.13.1"
"shapez.io-private-artifacts@github:tobspr/shapez.io-private-artifacts":
"shapez.io-private-artifacts@github:tobspr/shapez.io-private-artifacts#af8d792fe1429af95d990bba4a68362c2aa907c9":
"integrity" "sha512-Sp3JL2gSJloqkZ5hINBTcrFomwnCD0mguuRMfJb91SkcZfZuySPEtfi7m2S+96GedA1BI6+gLygDRY217ElTFg=="
"resolved" "git+ssh://git@github.com/tobspr/shapez.io-private-artifacts.git"
"version" "0.1.0"

View File

@ -151,6 +151,11 @@ function gulptasksStandalone($, gulp) {
fs.writeFileSync(path.join(appPath, ".itch.toml"), tomlFile);
fse.copySync(
path.join(tempDestBuildDir, "steam_appid.txt"),
path.join(appPath, "steam_appid.txt")
);
if (platform === "linux") {
fs.writeFileSync(
path.join(appPath, "play.sh"),

View File

@ -9,12 +9,26 @@ const logger = createLogger("electron-wrapper");
export class PlatformWrapperImplElectron extends PlatformWrapperImplBrowser {
initialize() {
this.steamOverlayCanvasFix = document.createElement("canvas");
this.steamOverlayCanvasFix.width = 1;
this.steamOverlayCanvasFix.height = 1;
this.steamOverlayCanvasFix.id = "steamOverlayCanvasFix";
this.steamOverlayContextFix = this.steamOverlayCanvasFix.getContext("2d");
document.documentElement.appendChild(this.steamOverlayCanvasFix);
this.app.ticker.frameEmitted.add(this.steamOverlayFixRedrawCanvas, this);
this.app.storage = new StorageImplElectron(this);
this.app.achievements = new SteamAchievements(this.app);
return PlatformWrapperInterface.prototype.initialize.call(this);
}
steamOverlayFixRedrawCanvas() {
this.steamOverlayContextFix.clearRect(0, 0, 1, 1);
}
getId() {
return "electron";
}