Merge branch 'copy-paste' of https://github.com/garretsimpson/shapez.io into copy-paste
1
.gitignore
vendored
@ -47,6 +47,7 @@ res_built
|
|||||||
gulp/runnable-texturepacker.jar
|
gulp/runnable-texturepacker.jar
|
||||||
tmp_standalone_files
|
tmp_standalone_files
|
||||||
tmp_standalone_files_china
|
tmp_standalone_files_china
|
||||||
|
tmp_standalone_files_wegame
|
||||||
|
|
||||||
# Local config
|
# Local config
|
||||||
config.local.js
|
config.local.js
|
||||||
|
|||||||
@ -26,6 +26,7 @@ COPY translations ./translations
|
|||||||
COPY src/js ./src/js
|
COPY src/js ./src/js
|
||||||
COPY res_raw ./res_raw
|
COPY res_raw ./res_raw
|
||||||
COPY .git ./.git
|
COPY .git ./.git
|
||||||
|
COPY electron ./electron
|
||||||
|
|
||||||
WORKDIR /shapez.io/gulp
|
WORKDIR /shapez.io/gulp
|
||||||
ENTRYPOINT ["yarn", "gulp"]
|
ENTRYPOINT ["yarn", "gulp"]
|
||||||
|
|||||||
14
README.md
@ -5,11 +5,11 @@
|
|||||||
This is the source code for shapez.io, an open source base building game inspired by Factorio.
|
This is the source code for shapez.io, an open source base building game inspired by Factorio.
|
||||||
Your goal is to produce shapes by cutting, rotating, merging and painting parts of shapes.
|
Your goal is to produce shapes by cutting, rotating, merging and painting parts of shapes.
|
||||||
|
|
||||||
- [Trello Board & Roadmap](https://trello.com/b/ISQncpJP/shapezio)
|
|
||||||
- [Free web version](https://shapez.io)
|
|
||||||
- [itch.io Page](https://tobspr.itch.io/shapezio)
|
|
||||||
- [Steam Page](https://steam.shapez.io)
|
- [Steam Page](https://steam.shapez.io)
|
||||||
- [Official Discord](https://discord.com/invite/HN7EVzV) <- _Highly recommended to join!_
|
- [Official Discord](https://discord.com/invite/HN7EVzV) <- _Highly recommended to join!_
|
||||||
|
- [Trello Board & Roadmap](https://trello.com/b/ISQncpJP/shapezio)
|
||||||
|
- [itch.io Page](https://tobspr.itch.io/shapezio)
|
||||||
|
- [Free web version](https://shapez.io)
|
||||||
|
|
||||||
## Reporting issues, suggestions, feedback, bugs
|
## Reporting issues, suggestions, feedback, bugs
|
||||||
|
|
||||||
@ -35,11 +35,11 @@ Your goal is to produce shapes by cutting, rotating, merging and painting parts
|
|||||||
|
|
||||||
You can use [Gitpod](https://www.gitpod.io/) (an Online Open Source VS Code-like IDE which is free for Open Source) for working on issues and making PRs to this project. With a single click it will start a workspace and automatically:
|
You can use [Gitpod](https://www.gitpod.io/) (an Online Open Source VS Code-like IDE which is free for Open Source) for working on issues and making PRs to this project. With a single click it will start a workspace and automatically:
|
||||||
|
|
||||||
- clone the `shapez.io` repo.
|
- clone the `shapez.io` repo.
|
||||||
- install all of the dependencies.
|
- install all of the dependencies.
|
||||||
- start `gulp` in `gulp/` directory.
|
- start `gulp` in `gulp/` directory.
|
||||||
|
|
||||||
[](https://gitpod.io/from-referrer/)
|
[](https://gitpod.io/#https://github.com/tobspr/shapez.io)
|
||||||
|
|
||||||
## Helping translate
|
## Helping translate
|
||||||
|
|
||||||
|
|||||||
@ -74,20 +74,8 @@ function createWindow() {
|
|||||||
win.on("closed", () => {
|
win.on("closed", () => {
|
||||||
console.log("Window closed");
|
console.log("Window closed");
|
||||||
win = null;
|
win = null;
|
||||||
app.quit();
|
|
||||||
});
|
});
|
||||||
|
|
||||||
function handleWindowBeforeunload(event) {
|
|
||||||
const confirmed = dialog.showMessageBox(remote.getCurrentWindow(), options) === 1;
|
|
||||||
if (confirmed) {
|
|
||||||
remote.getCurrentWindow().close();
|
|
||||||
} else {
|
|
||||||
event.returnValue = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
win.on("", handleWindowBeforeunload);
|
|
||||||
|
|
||||||
if (isDev) {
|
if (isDev) {
|
||||||
menu = new Menu();
|
menu = new Menu();
|
||||||
|
|
||||||
@ -286,7 +274,10 @@ async function performFsJob(job) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ipcMain.handle("fs-job", (event, arg) => performFsJob(arg));
|
ipcMain.on("fs-job", async (event, arg) => {
|
||||||
|
const result = await performFsJob(arg);
|
||||||
|
event.reply("fs-response", { id: arg.id, result });
|
||||||
|
});
|
||||||
|
|
||||||
steam.init(isDev);
|
steam.init(isDev);
|
||||||
steam.listen();
|
steam.listen();
|
||||||
|
|||||||
@ -10,10 +10,10 @@
|
|||||||
"start": "electron --disable-direct-composition --in-process-gpu ."
|
"start": "electron --disable-direct-composition --in-process-gpu ."
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"electron": "10.4.0"
|
"electron": "10.4.3"
|
||||||
},
|
},
|
||||||
"optionalDependencies": {
|
"optionalDependencies": {
|
||||||
"shapez.io-private-artifacts": "github:tobspr/shapez.io-private-artifacts#abi-v85"
|
"shapez.io-private-artifacts": "github:tobspr/shapez.io-private-artifacts#abi-v82"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"async-lock": "^1.2.8"
|
"async-lock": "^1.2.8"
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
const fs = require('fs');
|
const fs = require("fs");
|
||||||
const path = require('path');
|
const path = require("path");
|
||||||
const { ipcMain } = require("electron");
|
const { ipcMain } = require("electron");
|
||||||
|
|
||||||
let greenworks = null;
|
let greenworks = null;
|
||||||
@ -11,10 +11,10 @@ try {
|
|||||||
appId = parseInt(fs.readFileSync(path.join(__dirname, "steam_appid.txt"), "utf8"));
|
appId = parseInt(fs.readFileSync(path.join(__dirname, "steam_appid.txt"), "utf8"));
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
// greenworks is not installed
|
// greenworks is not installed
|
||||||
// throw err;
|
console.warn("Failed to load steam api:", err);
|
||||||
}
|
}
|
||||||
|
|
||||||
function init (isDev) {
|
function init(isDev) {
|
||||||
if (!greenworks) {
|
if (!greenworks) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -34,16 +34,49 @@ function init (isDev) {
|
|||||||
initialized = true;
|
initialized = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
function listen () {
|
function listen() {
|
||||||
ipcMain.handle("steam:is-initialized", isInitialized);
|
ipcMain.handle("steam:is-initialized", isInitialized);
|
||||||
|
|
||||||
if (!greenworks || !initialized) {
|
if (!initialized) {
|
||||||
console.log("Ignoring Steam IPC events");
|
console.warn("Steam not initialized, won't be able to listen");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!greenworks) {
|
||||||
|
console.warn("Greenworks not loaded, won't be able to listen");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log("Adding listeners");
|
||||||
|
|
||||||
ipcMain.handle("steam:get-achievement-names", getAchievementNames);
|
ipcMain.handle("steam:get-achievement-names", getAchievementNames);
|
||||||
ipcMain.handle("steam:activate-achievement", activateAchievement);
|
ipcMain.handle("steam:activate-achievement", activateAchievement);
|
||||||
|
|
||||||
|
function bufferToHex(buffer) {
|
||||||
|
return Array.from(new Uint8Array(buffer))
|
||||||
|
.map(b => b.toString(16).padStart(2, "0"))
|
||||||
|
.join("");
|
||||||
|
}
|
||||||
|
|
||||||
|
ipcMain.handle("steam:get-ticket", (event, arg) => {
|
||||||
|
console.log("Requested steam ticket ...");
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
greenworks.getAuthSessionTicket(
|
||||||
|
success => {
|
||||||
|
const ticketHex = bufferToHex(success.ticket);
|
||||||
|
resolve(ticketHex);
|
||||||
|
},
|
||||||
|
error => {
|
||||||
|
console.error("Failed to get steam ticket:", error);
|
||||||
|
reject(error);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
ipcMain.handle("steam:check-app-ownership", (event, appId) => {
|
||||||
|
return Promise.resolve(greenworks.isDLCInstalled(appId));
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function isInitialized(event) {
|
function isInitialized(event) {
|
||||||
@ -53,7 +86,7 @@ function isInitialized(event) {
|
|||||||
function getAchievementNames(event) {
|
function getAchievementNames(event) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
try {
|
try {
|
||||||
const achievements = greenworks.getAchievementNames()
|
const achievements = greenworks.getAchievementNames();
|
||||||
resolve(achievements);
|
resolve(achievements);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
reject(err);
|
reject(err);
|
||||||
@ -63,11 +96,15 @@ function getAchievementNames(event) {
|
|||||||
|
|
||||||
function activateAchievement(event, id) {
|
function activateAchievement(event, id) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
greenworks.activateAchievement(id, () => resolve(), err => reject(err))
|
greenworks.activateAchievement(
|
||||||
|
id,
|
||||||
|
() => resolve(),
|
||||||
|
err => reject(err)
|
||||||
|
);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
init,
|
init,
|
||||||
listen
|
listen,
|
||||||
};
|
};
|
||||||
|
|||||||
@ -146,10 +146,10 @@ duplexer3@^0.1.4:
|
|||||||
resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2"
|
resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2"
|
||||||
integrity sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=
|
integrity sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=
|
||||||
|
|
||||||
electron@10.4.0:
|
electron@10.4.3:
|
||||||
version "10.4.0"
|
version "10.4.3"
|
||||||
resolved "https://registry.yarnpkg.com/electron/-/electron-10.4.0.tgz#018385914474b56110a5a43087a53c114b67c08d"
|
resolved "https://registry.yarnpkg.com/electron/-/electron-10.4.3.tgz#8d1c0f5e562d1b78dcec8074c0d59e58137fd508"
|
||||||
integrity sha512-qK8OOCWuNvEFWThmjkukkqDwIpBqULlDuMXVC9MC/2P4UaWJEjIYvBmBuTyxtFcKoE3kWvcWyeRDUuvzVxxXjA==
|
integrity sha512-qL8XZBII9KQHr1+YmVMj1AqyTR2I8/lxozvKEWoKKSkF8Hl6GzzxrLXRfISP7aDAvsJEyyhc6b2/42ME8hG5JA==
|
||||||
dependencies:
|
dependencies:
|
||||||
"@electron/get" "^1.0.1"
|
"@electron/get" "^1.0.1"
|
||||||
"@types/node" "^12.0.12"
|
"@types/node" "^12.0.12"
|
||||||
@ -503,9 +503,9 @@ serialize-error@^7.0.1:
|
|||||||
dependencies:
|
dependencies:
|
||||||
type-fest "^0.13.1"
|
type-fest "^0.13.1"
|
||||||
|
|
||||||
"shapez.io-private-artifacts@github:tobspr/shapez.io-private-artifacts#abi-v85":
|
"shapez.io-private-artifacts@github:tobspr/shapez.io-private-artifacts#abi-v82":
|
||||||
version "0.1.0"
|
version "0.1.0"
|
||||||
resolved "git+ssh://git@github.com/tobspr/shapez.io-private-artifacts.git#63adf7e0ea4b90c2a29053ce1f0ec9d573b3ac0a"
|
resolved "git+ssh://git@github.com/tobspr/shapez.io-private-artifacts.git#8aa3bfd3b569eb5695fc8a585a3f2ee3ed2db290"
|
||||||
|
|
||||||
sprintf-js@^1.1.2:
|
sprintf-js@^1.1.2:
|
||||||
version "1.1.2"
|
version "1.1.2"
|
||||||
|
|||||||
1
electron_wegame/.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
wegame_sdk
|
||||||
1
electron_wegame/README.md
Normal file
@ -0,0 +1 @@
|
|||||||
|
To build, place the lib64 folder from the wegame sdk for electron 13 in `wegame_sdk` and run the `wegame.main.standalone` gulp task.
|
||||||
13
electron_wegame/electron_wegame.code-workspace
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"folders": [
|
||||||
|
{
|
||||||
|
"path": "."
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"settings": {
|
||||||
|
"files.exclude": {
|
||||||
|
"**/node_modules": true,
|
||||||
|
"**/typedefs_gen": true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
electron_wegame/favicon.icns
Normal file
BIN
electron_wegame/favicon.ico
Normal file
|
After Width: | Height: | Size: 103 KiB |
BIN
electron_wegame/favicon.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
289
electron_wegame/index.js
Normal file
@ -0,0 +1,289 @@
|
|||||||
|
/* eslint-disable quotes,no-undef */
|
||||||
|
|
||||||
|
const { app, BrowserWindow, Menu, MenuItem, ipcMain, shell } = require("electron");
|
||||||
|
|
||||||
|
app.commandLine.appendSwitch("in-process-gpu");
|
||||||
|
|
||||||
|
const path = require("path");
|
||||||
|
const url = require("url");
|
||||||
|
const fs = require("fs");
|
||||||
|
const wegame = require("./wegame");
|
||||||
|
const asyncLock = require("async-lock");
|
||||||
|
|
||||||
|
const isDev = process.argv.indexOf("--dev") >= 0;
|
||||||
|
const isLocal = process.argv.indexOf("--local") >= 0;
|
||||||
|
|
||||||
|
const roamingFolder =
|
||||||
|
process.env.APPDATA ||
|
||||||
|
(process.platform == "darwin"
|
||||||
|
? process.env.HOME + "/Library/Preferences"
|
||||||
|
: process.env.HOME + "/.local/share");
|
||||||
|
let storePath = path.join(roamingFolder, "shapez.io", "saves");
|
||||||
|
|
||||||
|
if (!fs.existsSync(storePath)) {
|
||||||
|
// No try-catch by design
|
||||||
|
fs.mkdirSync(storePath, { recursive: true });
|
||||||
|
}
|
||||||
|
|
||||||
|
/** @type {BrowserWindow} */
|
||||||
|
let win = null;
|
||||||
|
let menu = null;
|
||||||
|
|
||||||
|
function createWindow() {
|
||||||
|
let faviconExtension = ".png";
|
||||||
|
if (process.platform === "win32") {
|
||||||
|
faviconExtension = ".ico";
|
||||||
|
}
|
||||||
|
|
||||||
|
win = new BrowserWindow({
|
||||||
|
width: 1280,
|
||||||
|
height: 800,
|
||||||
|
show: false,
|
||||||
|
backgroundColor: "#222428",
|
||||||
|
useContentSize: true,
|
||||||
|
minWidth: 800,
|
||||||
|
minHeight: 600,
|
||||||
|
title: "图形工厂",
|
||||||
|
transparent: false,
|
||||||
|
icon: path.join(__dirname, "favicon" + faviconExtension),
|
||||||
|
// fullscreen: true,
|
||||||
|
autoHideMenuBar: true,
|
||||||
|
webPreferences: {
|
||||||
|
nodeIntegration: true,
|
||||||
|
webSecurity: false,
|
||||||
|
contextIsolation: false,
|
||||||
|
},
|
||||||
|
allowRunningInsecureContent: false,
|
||||||
|
});
|
||||||
|
|
||||||
|
if (isLocal) {
|
||||||
|
win.loadURL("http://localhost:3005");
|
||||||
|
} else {
|
||||||
|
win.loadURL(
|
||||||
|
url.format({
|
||||||
|
pathname: path.join(__dirname, "index.html"),
|
||||||
|
protocol: "file:",
|
||||||
|
slashes: true,
|
||||||
|
})
|
||||||
|
);
|
||||||
|
}
|
||||||
|
win.webContents.session.clearCache(() => null);
|
||||||
|
win.webContents.session.clearStorageData();
|
||||||
|
|
||||||
|
win.webContents.on("new-window", (event, pth) => {
|
||||||
|
event.preventDefault();
|
||||||
|
shell.openExternal(pth);
|
||||||
|
});
|
||||||
|
|
||||||
|
win.on("closed", () => {
|
||||||
|
console.log("Window closed");
|
||||||
|
win = null;
|
||||||
|
});
|
||||||
|
|
||||||
|
if (isDev) {
|
||||||
|
menu = new Menu();
|
||||||
|
|
||||||
|
const mainItem = new MenuItem({
|
||||||
|
label: "Toggle Dev Tools",
|
||||||
|
click: () => win.webContents.toggleDevTools(),
|
||||||
|
accelerator: "F12",
|
||||||
|
});
|
||||||
|
menu.append(mainItem);
|
||||||
|
|
||||||
|
const reloadItem = new MenuItem({
|
||||||
|
label: "Restart",
|
||||||
|
click: () => win.reload(),
|
||||||
|
accelerator: "F5",
|
||||||
|
});
|
||||||
|
menu.append(reloadItem);
|
||||||
|
|
||||||
|
const fullscreenItem = new MenuItem({
|
||||||
|
label: "Fullscreen",
|
||||||
|
click: () => win.setFullScreen(!win.isFullScreen()),
|
||||||
|
accelerator: "F11",
|
||||||
|
});
|
||||||
|
menu.append(fullscreenItem);
|
||||||
|
|
||||||
|
Menu.setApplicationMenu(menu);
|
||||||
|
} else {
|
||||||
|
Menu.setApplicationMenu(null);
|
||||||
|
}
|
||||||
|
|
||||||
|
win.once("ready-to-show", () => {
|
||||||
|
win.show();
|
||||||
|
win.focus();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!app.requestSingleInstanceLock()) {
|
||||||
|
app.exit(0);
|
||||||
|
} else {
|
||||||
|
app.on("second-instance", (event, commandLine, workingDirectory) => {
|
||||||
|
// Someone tried to run a second instance, we should focus
|
||||||
|
if (win) {
|
||||||
|
if (win.isMinimized()) {
|
||||||
|
win.restore();
|
||||||
|
}
|
||||||
|
win.focus();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
app.on("ready", createWindow);
|
||||||
|
|
||||||
|
app.on("window-all-closed", () => {
|
||||||
|
console.log("All windows closed");
|
||||||
|
app.quit();
|
||||||
|
});
|
||||||
|
|
||||||
|
ipcMain.on("set-fullscreen", (event, flag) => {
|
||||||
|
win.setFullScreen(flag);
|
||||||
|
});
|
||||||
|
|
||||||
|
ipcMain.on("exit-app", (event, flag) => {
|
||||||
|
win.close();
|
||||||
|
app.quit();
|
||||||
|
});
|
||||||
|
|
||||||
|
let renameCounter = 1;
|
||||||
|
|
||||||
|
const fileLock = new asyncLock({
|
||||||
|
timeout: 30000,
|
||||||
|
maxPending: 1000,
|
||||||
|
});
|
||||||
|
|
||||||
|
function niceFileName(filename) {
|
||||||
|
return filename.replace(storePath, "@");
|
||||||
|
}
|
||||||
|
|
||||||
|
async function writeFileSafe(filename, contents) {
|
||||||
|
++renameCounter;
|
||||||
|
const prefix = "[ " + renameCounter + ":" + niceFileName(filename) + " ] ";
|
||||||
|
const transactionId = String(new Date().getTime()) + "." + renameCounter;
|
||||||
|
|
||||||
|
if (fileLock.isBusy()) {
|
||||||
|
console.warn(prefix, "Concurrent write process on", filename);
|
||||||
|
}
|
||||||
|
|
||||||
|
await fileLock.acquire(filename, async () => {
|
||||||
|
console.log(prefix, "Starting write on", niceFileName(filename), "in transaction", transactionId);
|
||||||
|
|
||||||
|
if (!fs.existsSync(filename)) {
|
||||||
|
// this one is easy
|
||||||
|
console.log(prefix, "Writing file instantly because it does not exist:", niceFileName(filename));
|
||||||
|
fs.writeFileSync(filename, contents, { encoding: "utf8" });
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
// first, write a temporary file (.tmp-XXX)
|
||||||
|
const tempName = filename + ".tmp-" + transactionId;
|
||||||
|
console.log(prefix, "Writing temporary file", niceFileName(tempName));
|
||||||
|
fs.writeFileSync(tempName, contents, { encoding: "utf8" });
|
||||||
|
|
||||||
|
// now, rename the original file to (.backup-XXX)
|
||||||
|
const oldTemporaryName = filename + ".backup-" + transactionId;
|
||||||
|
console.log(
|
||||||
|
prefix,
|
||||||
|
"Renaming old file",
|
||||||
|
niceFileName(filename),
|
||||||
|
"to",
|
||||||
|
niceFileName(oldTemporaryName)
|
||||||
|
);
|
||||||
|
fs.renameSync(filename, oldTemporaryName);
|
||||||
|
|
||||||
|
// now, rename the temporary file (.tmp-XXX) to the target
|
||||||
|
console.log(
|
||||||
|
prefix,
|
||||||
|
"Renaming the temporary file",
|
||||||
|
niceFileName(tempName),
|
||||||
|
"to the original",
|
||||||
|
niceFileName(filename)
|
||||||
|
);
|
||||||
|
fs.renameSync(tempName, filename);
|
||||||
|
|
||||||
|
// we are done now, try to create a backup, but don't fail if the backup fails
|
||||||
|
try {
|
||||||
|
// check if there is an old backup file
|
||||||
|
const backupFileName = filename + ".backup";
|
||||||
|
if (fs.existsSync(backupFileName)) {
|
||||||
|
console.log(prefix, "Deleting old backup file", niceFileName(backupFileName));
|
||||||
|
// delete the old backup
|
||||||
|
fs.unlinkSync(backupFileName);
|
||||||
|
}
|
||||||
|
|
||||||
|
// rename the old file to the new backup file
|
||||||
|
console.log(prefix, "Moving", niceFileName(oldTemporaryName), "to the backup file location");
|
||||||
|
fs.renameSync(oldTemporaryName, backupFileName);
|
||||||
|
} catch (ex) {
|
||||||
|
console.error(prefix, "Failed to switch backup files:", ex);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
async function performFsJob(job) {
|
||||||
|
const fname = path.join(storePath, job.filename);
|
||||||
|
|
||||||
|
switch (job.type) {
|
||||||
|
case "read": {
|
||||||
|
if (!fs.existsSync(fname)) {
|
||||||
|
return {
|
||||||
|
// Special FILE_NOT_FOUND error code
|
||||||
|
error: "file_not_found",
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
const data = fs.readFileSync(fname, { encoding: "utf8" });
|
||||||
|
return {
|
||||||
|
success: true,
|
||||||
|
data,
|
||||||
|
};
|
||||||
|
} catch (ex) {
|
||||||
|
console.error(ex);
|
||||||
|
return {
|
||||||
|
error: ex,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
case "write": {
|
||||||
|
try {
|
||||||
|
writeFileSafe(fname, job.contents);
|
||||||
|
return {
|
||||||
|
success: true,
|
||||||
|
data: job.contents,
|
||||||
|
};
|
||||||
|
} catch (ex) {
|
||||||
|
console.error(ex);
|
||||||
|
return {
|
||||||
|
error: ex,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
case "delete": {
|
||||||
|
try {
|
||||||
|
fs.unlinkSync(fname);
|
||||||
|
} catch (ex) {
|
||||||
|
console.error(ex);
|
||||||
|
return {
|
||||||
|
error: ex,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
return {
|
||||||
|
success: true,
|
||||||
|
data: null,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
default:
|
||||||
|
throw new Error("Unkown fs job: " + job.type);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ipcMain.on("fs-job", async (event, arg) => {
|
||||||
|
const result = await performFsJob(arg);
|
||||||
|
event.sender.send("fs-response", { id: arg.id, result });
|
||||||
|
});
|
||||||
|
wegame.init(isDev);
|
||||||
|
wegame.listen();
|
||||||
18
electron_wegame/package.json
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"name": "electron",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"main": "index.js",
|
||||||
|
"license": "MIT",
|
||||||
|
"private": true,
|
||||||
|
"scripts": {
|
||||||
|
"startDev": "electron --disable-direct-composition --in-process-gpu . --dev --local",
|
||||||
|
"startDevGpu": "electron --enable-gpu-rasterization --enable-accelerated-2d-canvas --num-raster-threads=8 --enable-zero-copy . --dev --local",
|
||||||
|
"start": "electron --disable-direct-composition --in-process-gpu ."
|
||||||
|
},
|
||||||
|
"devDependencies": {
|
||||||
|
"electron": "^13.1.6"
|
||||||
|
},
|
||||||
|
"dependencies": {
|
||||||
|
"async-lock": "^1.2.8"
|
||||||
|
}
|
||||||
|
}
|
||||||
63
electron_wegame/wegame.js
Normal file
@ -0,0 +1,63 @@
|
|||||||
|
const railsdk = require("./wegame_sdk/railsdk.js");
|
||||||
|
const { dialog, app, remote, ipcMain } = require("electron");
|
||||||
|
|
||||||
|
function init(isDev) {
|
||||||
|
console.log("Step 1: wegame: init");
|
||||||
|
|
||||||
|
try {
|
||||||
|
console.log("Step 2: Calling need restart app");
|
||||||
|
const need_restart = railsdk.RailNeedRestartAppForCheckingEnvironment(
|
||||||
|
2001639,
|
||||||
|
[`--rail_render_pid=${process.pid}`] //,"--rail_debug_mode",
|
||||||
|
);
|
||||||
|
console.log("Step 3: Needs restart =", need_restart);
|
||||||
|
if (need_restart) {
|
||||||
|
console.error("Step 4: Need restart");
|
||||||
|
dialog.showErrorBox("加载RailSDK失败", "请先运行WeGame开发者版本");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
} catch (err) {
|
||||||
|
console.error("Rail SDK error:", err);
|
||||||
|
dialog.showErrorBox("加载RailSDK失败", err);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log("Step 5: starting rail sdk");
|
||||||
|
if (railsdk.RailInitialize() === false) {
|
||||||
|
console.error("RailInitialize() = false");
|
||||||
|
dialog.showErrorBox("RailInitialize调用失败", "请先运行WeGame开发者版本");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
console.log("Initialize RailSDK success!");
|
||||||
|
|
||||||
|
railsdk.RailRegisterEvent(railsdk.RailEventID.kRailEventSystemStateChanged, event => {
|
||||||
|
console.log(event);
|
||||||
|
if (event.result === railsdk.RailResult.kSuccess) {
|
||||||
|
if (
|
||||||
|
event.state === railsdk.RailSystemState.kSystemStatePlatformOffline ||
|
||||||
|
event.state === railsdk.RailSystemState.kSystemStatePlatformExit ||
|
||||||
|
event.state === railsdk.RailSystemState.kSystemStateGameExitByAntiAddiction
|
||||||
|
) {
|
||||||
|
app.exit();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function listen() {
|
||||||
|
console.log("wegame: listen");
|
||||||
|
ipcMain.handle("profanity-check", async (event, data) => {
|
||||||
|
if (data.length === 0) {
|
||||||
|
return "";
|
||||||
|
}
|
||||||
|
const result = railsdk.RailUtils.DirtyWordsFilter(data, true);
|
||||||
|
if (result.check_result.dirty_type !== 0 /** kRailDirtyWordsTypeNormalAllowWords */) {
|
||||||
|
return result.check_result.replace_string;
|
||||||
|
}
|
||||||
|
|
||||||
|
return data;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
module.exports = { init, listen };
|
||||||
578
electron_wegame/yarn.lock
Normal file
@ -0,0 +1,578 @@
|
|||||||
|
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
|
||||||
|
# yarn lockfile v1
|
||||||
|
|
||||||
|
|
||||||
|
"@electron/get@^1.0.1":
|
||||||
|
version "1.12.4"
|
||||||
|
resolved "https://registry.yarnpkg.com/@electron/get/-/get-1.12.4.tgz#a5971113fc1bf8fa12a8789dc20152a7359f06ab"
|
||||||
|
integrity sha512-6nr9DbJPUR9Xujw6zD3y+rS95TyItEVM0NVjt1EehY2vUWfIgPiIPVHxCvaTS0xr2B+DRxovYVKbuOWqC35kjg==
|
||||||
|
dependencies:
|
||||||
|
debug "^4.1.1"
|
||||||
|
env-paths "^2.2.0"
|
||||||
|
fs-extra "^8.1.0"
|
||||||
|
got "^9.6.0"
|
||||||
|
progress "^2.0.3"
|
||||||
|
semver "^6.2.0"
|
||||||
|
sumchecker "^3.0.1"
|
||||||
|
optionalDependencies:
|
||||||
|
global-agent "^2.0.2"
|
||||||
|
global-tunnel-ng "^2.7.1"
|
||||||
|
|
||||||
|
"@sindresorhus/is@^0.14.0":
|
||||||
|
version "0.14.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/@sindresorhus/is/-/is-0.14.0.tgz#9fb3a3cf3132328151f353de4632e01e52102bea"
|
||||||
|
integrity sha512-9NET910DNaIPngYnLLPeg+Ogzqsi9uM4mSboU5y6p8S5DzMTVEsJZrawi+BoDNUVBa2DhJqQYUFvMDfgU062LQ==
|
||||||
|
|
||||||
|
"@szmarczak/http-timer@^1.1.2":
|
||||||
|
version "1.1.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/@szmarczak/http-timer/-/http-timer-1.1.2.tgz#b1665e2c461a2cd92f4c1bbf50d5454de0d4b421"
|
||||||
|
integrity sha512-XIB2XbzHTN6ieIjfIMV9hlVcfPU26s2vafYWQcZHWXHOxiaRZYEDKEwdl129Zyg50+foYV2jCgtrqSA6qNuNSA==
|
||||||
|
dependencies:
|
||||||
|
defer-to-connect "^1.0.1"
|
||||||
|
|
||||||
|
"@types/node@^14.6.2":
|
||||||
|
version "14.17.4"
|
||||||
|
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.17.4.tgz#218712242446fc868d0e007af29a4408c7765bc0"
|
||||||
|
integrity sha512-8kQ3+wKGRNN0ghtEn7EGps/B8CzuBz1nXZEIGGLP2GnwbqYn4dbTs7k+VKLTq1HvZLRCIDtN3Snx1Ege8B7L5A==
|
||||||
|
|
||||||
|
async-lock@^1.2.8:
|
||||||
|
version "1.2.8"
|
||||||
|
resolved "https://registry.yarnpkg.com/async-lock/-/async-lock-1.2.8.tgz#7b02bdfa2de603c0713acecd11184cf97bbc7c4c"
|
||||||
|
integrity sha512-G+26B2jc0Gw0EG/WN2M6IczuGepBsfR1+DtqLnyFSH4p2C668qkOCtEkGNVEaaNAVlYwEMazy1+/jnLxltBkIQ==
|
||||||
|
|
||||||
|
boolean@^3.0.1:
|
||||||
|
version "3.1.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/boolean/-/boolean-3.1.2.tgz#e30f210a26b02458482a8cc353ab06f262a780c2"
|
||||||
|
integrity sha512-YN6UmV0FfLlBVvRvNPx3pz5W/mUoYB24J4WSXOKP/OOJpi+Oq6WYqPaNTHzjI0QzwWtnvEd5CGYyQPgp1jFxnw==
|
||||||
|
|
||||||
|
buffer-crc32@~0.2.3:
|
||||||
|
version "0.2.13"
|
||||||
|
resolved "https://registry.yarnpkg.com/buffer-crc32/-/buffer-crc32-0.2.13.tgz#0d333e3f00eac50aa1454abd30ef8c2a5d9a7242"
|
||||||
|
integrity sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=
|
||||||
|
|
||||||
|
buffer-from@^1.0.0:
|
||||||
|
version "1.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/buffer-from/-/buffer-from-1.1.1.tgz#32713bc028f75c02fdb710d7c7bcec1f2c6070ef"
|
||||||
|
integrity sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==
|
||||||
|
|
||||||
|
cacheable-request@^6.0.0:
|
||||||
|
version "6.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/cacheable-request/-/cacheable-request-6.1.0.tgz#20ffb8bd162ba4be11e9567d823db651052ca912"
|
||||||
|
integrity sha512-Oj3cAGPCqOZX7Rz64Uny2GYAZNliQSqfbePrgAQ1wKAihYmCUnraBtJtKcGR4xz7wF+LoJC+ssFZvv5BgF9Igg==
|
||||||
|
dependencies:
|
||||||
|
clone-response "^1.0.2"
|
||||||
|
get-stream "^5.1.0"
|
||||||
|
http-cache-semantics "^4.0.0"
|
||||||
|
keyv "^3.0.0"
|
||||||
|
lowercase-keys "^2.0.0"
|
||||||
|
normalize-url "^4.1.0"
|
||||||
|
responselike "^1.0.2"
|
||||||
|
|
||||||
|
clone-response@^1.0.2:
|
||||||
|
version "1.0.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/clone-response/-/clone-response-1.0.2.tgz#d1dc973920314df67fbeb94223b4ee350239e96b"
|
||||||
|
integrity sha1-0dyXOSAxTfZ/vrlCI7TuNQI56Ws=
|
||||||
|
dependencies:
|
||||||
|
mimic-response "^1.0.0"
|
||||||
|
|
||||||
|
concat-stream@^1.6.2:
|
||||||
|
version "1.6.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/concat-stream/-/concat-stream-1.6.2.tgz#904bdf194cd3122fc675c77fc4ac3d4ff0fd1a34"
|
||||||
|
integrity sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==
|
||||||
|
dependencies:
|
||||||
|
buffer-from "^1.0.0"
|
||||||
|
inherits "^2.0.3"
|
||||||
|
readable-stream "^2.2.2"
|
||||||
|
typedarray "^0.0.6"
|
||||||
|
|
||||||
|
config-chain@^1.1.11:
|
||||||
|
version "1.1.13"
|
||||||
|
resolved "https://registry.yarnpkg.com/config-chain/-/config-chain-1.1.13.tgz#fad0795aa6a6cdaff9ed1b68e9dff94372c232f4"
|
||||||
|
integrity sha512-qj+f8APARXHrM0hraqXYb2/bOVSV4PvJQlNZ/DVj0QrmNM2q2euizkeuVckQ57J+W0mRH6Hvi+k50M4Jul2VRQ==
|
||||||
|
dependencies:
|
||||||
|
ini "^1.3.4"
|
||||||
|
proto-list "~1.2.1"
|
||||||
|
|
||||||
|
core-js@^3.6.5:
|
||||||
|
version "3.15.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/core-js/-/core-js-3.15.2.tgz#740660d2ff55ef34ce664d7e2455119c5bdd3d61"
|
||||||
|
integrity sha512-tKs41J7NJVuaya8DxIOCnl8QuPHx5/ZVbFo1oKgVl1qHFBBrDctzQGtuLjPpRdNTWmKPH6oEvgN/MUID+l485Q==
|
||||||
|
|
||||||
|
core-util-is@~1.0.0:
|
||||||
|
version "1.0.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.2.tgz#b5fd54220aa2bc5ab57aab7140c940754503c1a7"
|
||||||
|
integrity sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=
|
||||||
|
|
||||||
|
debug@^2.6.9:
|
||||||
|
version "2.6.9"
|
||||||
|
resolved "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f"
|
||||||
|
integrity sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==
|
||||||
|
dependencies:
|
||||||
|
ms "2.0.0"
|
||||||
|
|
||||||
|
debug@^4.1.0, debug@^4.1.1:
|
||||||
|
version "4.3.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.2.tgz#f0a49c18ac8779e31d4a0c6029dfb76873c7428b"
|
||||||
|
integrity sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==
|
||||||
|
dependencies:
|
||||||
|
ms "2.1.2"
|
||||||
|
|
||||||
|
decompress-response@^3.3.0:
|
||||||
|
version "3.3.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/decompress-response/-/decompress-response-3.3.0.tgz#80a4dd323748384bfa248083622aedec982adff3"
|
||||||
|
integrity sha1-gKTdMjdIOEv6JICDYirt7Jgq3/M=
|
||||||
|
dependencies:
|
||||||
|
mimic-response "^1.0.0"
|
||||||
|
|
||||||
|
defer-to-connect@^1.0.1:
|
||||||
|
version "1.1.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/defer-to-connect/-/defer-to-connect-1.1.3.tgz#331ae050c08dcf789f8c83a7b81f0ed94f4ac591"
|
||||||
|
integrity sha512-0ISdNousHvZT2EiFlZeZAHBUvSxmKswVCEf8hW7KWgG4a8MVEu/3Vb6uWYozkjylyCxe0JBIiRB1jV45S70WVQ==
|
||||||
|
|
||||||
|
define-properties@^1.1.3:
|
||||||
|
version "1.1.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.3.tgz#cf88da6cbee26fe6db7094f61d870cbd84cee9f1"
|
||||||
|
integrity sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==
|
||||||
|
dependencies:
|
||||||
|
object-keys "^1.0.12"
|
||||||
|
|
||||||
|
detect-node@^2.0.4:
|
||||||
|
version "2.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/detect-node/-/detect-node-2.1.0.tgz#c9c70775a49c3d03bc2c06d9a73be550f978f8b1"
|
||||||
|
integrity sha512-T0NIuQpnTvFDATNuHN5roPwSBG83rFsuO+MXXH9/3N1eFbn4wcPjttvjMLEPWJ0RGUYgQE7cGgS3tNxbqCGM7g==
|
||||||
|
|
||||||
|
duplexer3@^0.1.4:
|
||||||
|
version "0.1.4"
|
||||||
|
resolved "https://registry.yarnpkg.com/duplexer3/-/duplexer3-0.1.4.tgz#ee01dd1cac0ed3cbc7fdbea37dc0a8f1ce002ce2"
|
||||||
|
integrity sha1-7gHdHKwO08vH/b6jfcCo8c4ALOI=
|
||||||
|
|
||||||
|
electron@^13.1.6:
|
||||||
|
version "13.1.6"
|
||||||
|
resolved "https://registry.yarnpkg.com/electron/-/electron-13.1.6.tgz#6ecaf969255d62ce82cc0b5c948bf26e7dfb489b"
|
||||||
|
integrity sha512-XiB55/JTaQpDFQrD9pulYnOGwaWeMyRIub5ispvoE2bWBvM5zVMLptwMLb0m3KTMrfSkzhedZvOu7fwYvR7L7Q==
|
||||||
|
dependencies:
|
||||||
|
"@electron/get" "^1.0.1"
|
||||||
|
"@types/node" "^14.6.2"
|
||||||
|
extract-zip "^1.0.3"
|
||||||
|
|
||||||
|
encodeurl@^1.0.2:
|
||||||
|
version "1.0.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59"
|
||||||
|
integrity sha1-rT/0yG7C0CkyL1oCw6mmBslbP1k=
|
||||||
|
|
||||||
|
end-of-stream@^1.1.0:
|
||||||
|
version "1.4.4"
|
||||||
|
resolved "https://registry.yarnpkg.com/end-of-stream/-/end-of-stream-1.4.4.tgz#5ae64a5f45057baf3626ec14da0ca5e4b2431eb0"
|
||||||
|
integrity sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==
|
||||||
|
dependencies:
|
||||||
|
once "^1.4.0"
|
||||||
|
|
||||||
|
env-paths@^2.2.0:
|
||||||
|
version "2.2.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/env-paths/-/env-paths-2.2.1.tgz#420399d416ce1fbe9bc0a07c62fa68d67fd0f8f2"
|
||||||
|
integrity sha512-+h1lkLKhZMTYjog1VEpJNG7NZJWcuc2DDk/qsqSTRRCOXiLjeQ1d1/udrUGhqMxUgAlwKNZ0cf2uqan5GLuS2A==
|
||||||
|
|
||||||
|
es6-error@^4.1.1:
|
||||||
|
version "4.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/es6-error/-/es6-error-4.1.1.tgz#9e3af407459deed47e9a91f9b885a84eb05c561d"
|
||||||
|
integrity sha512-Um/+FxMr9CISWh0bi5Zv0iOD+4cFh5qLeks1qhAopKVAJw3drgKbKySikp7wGhDL0HPeaja0P5ULZrxLkniUVg==
|
||||||
|
|
||||||
|
escape-string-regexp@^4.0.0:
|
||||||
|
version "4.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz#14ba83a5d373e3d311e5afca29cf5bfad965bf34"
|
||||||
|
integrity sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==
|
||||||
|
|
||||||
|
extract-zip@^1.0.3:
|
||||||
|
version "1.7.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/extract-zip/-/extract-zip-1.7.0.tgz#556cc3ae9df7f452c493a0cfb51cc30277940927"
|
||||||
|
integrity sha512-xoh5G1W/PB0/27lXgMQyIhP5DSY/LhoCsOyZgb+6iMmRtCwVBo55uKaMoEYrDCKQhWvqEip5ZPKAc6eFNyf/MA==
|
||||||
|
dependencies:
|
||||||
|
concat-stream "^1.6.2"
|
||||||
|
debug "^2.6.9"
|
||||||
|
mkdirp "^0.5.4"
|
||||||
|
yauzl "^2.10.0"
|
||||||
|
|
||||||
|
fd-slicer@~1.1.0:
|
||||||
|
version "1.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/fd-slicer/-/fd-slicer-1.1.0.tgz#25c7c89cb1f9077f8891bbe61d8f390eae256f1e"
|
||||||
|
integrity sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4=
|
||||||
|
dependencies:
|
||||||
|
pend "~1.2.0"
|
||||||
|
|
||||||
|
fs-extra@^8.1.0:
|
||||||
|
version "8.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-8.1.0.tgz#49d43c45a88cd9677668cb7be1b46efdb8d2e1c0"
|
||||||
|
integrity sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==
|
||||||
|
dependencies:
|
||||||
|
graceful-fs "^4.2.0"
|
||||||
|
jsonfile "^4.0.0"
|
||||||
|
universalify "^0.1.0"
|
||||||
|
|
||||||
|
get-stream@^4.1.0:
|
||||||
|
version "4.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-4.1.0.tgz#c1b255575f3dc21d59bfc79cd3d2b46b1c3a54b5"
|
||||||
|
integrity sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==
|
||||||
|
dependencies:
|
||||||
|
pump "^3.0.0"
|
||||||
|
|
||||||
|
get-stream@^5.1.0:
|
||||||
|
version "5.2.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/get-stream/-/get-stream-5.2.0.tgz#4966a1795ee5ace65e706c4b7beb71257d6e22d3"
|
||||||
|
integrity sha512-nBF+F1rAZVCu/p7rjzgA+Yb4lfYXrpl7a6VmJrU8wF9I1CKvP/QwPNZHnOlwbTkY6dvtFIzFMSyQXbLoTQPRpA==
|
||||||
|
dependencies:
|
||||||
|
pump "^3.0.0"
|
||||||
|
|
||||||
|
global-agent@^2.0.2:
|
||||||
|
version "2.2.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/global-agent/-/global-agent-2.2.0.tgz#566331b0646e6bf79429a16877685c4a1fbf76dc"
|
||||||
|
integrity sha512-+20KpaW6DDLqhG7JDiJpD1JvNvb8ts+TNl7BPOYcURqCrXqnN1Vf+XVOrkKJAFPqfX+oEhsdzOj1hLWkBTdNJg==
|
||||||
|
dependencies:
|
||||||
|
boolean "^3.0.1"
|
||||||
|
core-js "^3.6.5"
|
||||||
|
es6-error "^4.1.1"
|
||||||
|
matcher "^3.0.0"
|
||||||
|
roarr "^2.15.3"
|
||||||
|
semver "^7.3.2"
|
||||||
|
serialize-error "^7.0.1"
|
||||||
|
|
||||||
|
global-tunnel-ng@^2.7.1:
|
||||||
|
version "2.7.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/global-tunnel-ng/-/global-tunnel-ng-2.7.1.tgz#d03b5102dfde3a69914f5ee7d86761ca35d57d8f"
|
||||||
|
integrity sha512-4s+DyciWBV0eK148wqXxcmVAbFVPqtc3sEtUE/GTQfuU80rySLcMhUmHKSHI7/LDj8q0gDYI1lIhRRB7ieRAqg==
|
||||||
|
dependencies:
|
||||||
|
encodeurl "^1.0.2"
|
||||||
|
lodash "^4.17.10"
|
||||||
|
npm-conf "^1.1.3"
|
||||||
|
tunnel "^0.0.6"
|
||||||
|
|
||||||
|
globalthis@^1.0.1:
|
||||||
|
version "1.0.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/globalthis/-/globalthis-1.0.2.tgz#2a235d34f4d8036219f7e34929b5de9e18166b8b"
|
||||||
|
integrity sha512-ZQnSFO1la8P7auIOQECnm0sSuoMeaSq0EEdXMBFF2QJO4uNcwbyhSgG3MruWNbFTqCLmxVwGOl7LZ9kASvHdeQ==
|
||||||
|
dependencies:
|
||||||
|
define-properties "^1.1.3"
|
||||||
|
|
||||||
|
got@^9.6.0:
|
||||||
|
version "9.6.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/got/-/got-9.6.0.tgz#edf45e7d67f99545705de1f7bbeeeb121765ed85"
|
||||||
|
integrity sha512-R7eWptXuGYxwijs0eV+v3o6+XH1IqVK8dJOEecQfTmkncw9AV4dcw/Dhxi8MdlqPthxxpZyizMzyg8RTmEsG+Q==
|
||||||
|
dependencies:
|
||||||
|
"@sindresorhus/is" "^0.14.0"
|
||||||
|
"@szmarczak/http-timer" "^1.1.2"
|
||||||
|
cacheable-request "^6.0.0"
|
||||||
|
decompress-response "^3.3.0"
|
||||||
|
duplexer3 "^0.1.4"
|
||||||
|
get-stream "^4.1.0"
|
||||||
|
lowercase-keys "^1.0.1"
|
||||||
|
mimic-response "^1.0.1"
|
||||||
|
p-cancelable "^1.0.0"
|
||||||
|
to-readable-stream "^1.0.0"
|
||||||
|
url-parse-lax "^3.0.0"
|
||||||
|
|
||||||
|
graceful-fs@^4.1.6, graceful-fs@^4.2.0:
|
||||||
|
version "4.2.6"
|
||||||
|
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.6.tgz#ff040b2b0853b23c3d31027523706f1885d76bee"
|
||||||
|
integrity sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==
|
||||||
|
|
||||||
|
http-cache-semantics@^4.0.0:
|
||||||
|
version "4.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/http-cache-semantics/-/http-cache-semantics-4.1.0.tgz#49e91c5cbf36c9b94bcfcd71c23d5249ec74e390"
|
||||||
|
integrity sha512-carPklcUh7ROWRK7Cv27RPtdhYhUsela/ue5/jKzjegVvXDqM2ILE9Q2BGn9JZJh1g87cp56su/FgQSzcWS8cQ==
|
||||||
|
|
||||||
|
inherits@^2.0.3, inherits@~2.0.3:
|
||||||
|
version "2.0.4"
|
||||||
|
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
|
||||||
|
integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
|
||||||
|
|
||||||
|
ini@^1.3.4:
|
||||||
|
version "1.3.8"
|
||||||
|
resolved "https://registry.yarnpkg.com/ini/-/ini-1.3.8.tgz#a29da425b48806f34767a4efce397269af28432c"
|
||||||
|
integrity sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==
|
||||||
|
|
||||||
|
isarray@~1.0.0:
|
||||||
|
version "1.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11"
|
||||||
|
integrity sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=
|
||||||
|
|
||||||
|
json-buffer@3.0.0:
|
||||||
|
version "3.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/json-buffer/-/json-buffer-3.0.0.tgz#5b1f397afc75d677bde8bcfc0e47e1f9a3d9a898"
|
||||||
|
integrity sha1-Wx85evx11ne96Lz8Dkfh+aPZqJg=
|
||||||
|
|
||||||
|
json-stringify-safe@^5.0.1:
|
||||||
|
version "5.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb"
|
||||||
|
integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=
|
||||||
|
|
||||||
|
jsonfile@^4.0.0:
|
||||||
|
version "4.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-4.0.0.tgz#8771aae0799b64076b76640fca058f9c10e33ecb"
|
||||||
|
integrity sha1-h3Gq4HmbZAdrdmQPygWPnBDjPss=
|
||||||
|
optionalDependencies:
|
||||||
|
graceful-fs "^4.1.6"
|
||||||
|
|
||||||
|
keyv@^3.0.0:
|
||||||
|
version "3.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/keyv/-/keyv-3.1.0.tgz#ecc228486f69991e49e9476485a5be1e8fc5c4d9"
|
||||||
|
integrity sha512-9ykJ/46SN/9KPM/sichzQ7OvXyGDYKGTaDlKMGCAlg2UK8KRy4jb0d8sFc+0Tt0YYnThq8X2RZgCg74RPxgcVA==
|
||||||
|
dependencies:
|
||||||
|
json-buffer "3.0.0"
|
||||||
|
|
||||||
|
lodash@^4.17.10:
|
||||||
|
version "4.17.21"
|
||||||
|
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c"
|
||||||
|
integrity sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==
|
||||||
|
|
||||||
|
lowercase-keys@^1.0.0, lowercase-keys@^1.0.1:
|
||||||
|
version "1.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-1.0.1.tgz#6f9e30b47084d971a7c820ff15a6c5167b74c26f"
|
||||||
|
integrity sha512-G2Lj61tXDnVFFOi8VZds+SoQjtQC3dgokKdDG2mTm1tx4m50NUHBOZSBwQQHyy0V12A0JTG4icfZQH+xPyh8VA==
|
||||||
|
|
||||||
|
lowercase-keys@^2.0.0:
|
||||||
|
version "2.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/lowercase-keys/-/lowercase-keys-2.0.0.tgz#2603e78b7b4b0006cbca2fbcc8a3202558ac9479"
|
||||||
|
integrity sha512-tqNXrS78oMOE73NMxK4EMLQsQowWf8jKooH9g7xPavRT706R6bkQJ6DY2Te7QukaZsulxa30wQ7bk0pm4XiHmA==
|
||||||
|
|
||||||
|
lru-cache@^6.0.0:
|
||||||
|
version "6.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94"
|
||||||
|
integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==
|
||||||
|
dependencies:
|
||||||
|
yallist "^4.0.0"
|
||||||
|
|
||||||
|
matcher@^3.0.0:
|
||||||
|
version "3.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/matcher/-/matcher-3.0.0.tgz#bd9060f4c5b70aa8041ccc6f80368760994f30ca"
|
||||||
|
integrity sha512-OkeDaAZ/bQCxeFAozM55PKcKU0yJMPGifLwV4Qgjitu+5MoAfSQN4lsLJeXZ1b8w0x+/Emda6MZgXS1jvsapng==
|
||||||
|
dependencies:
|
||||||
|
escape-string-regexp "^4.0.0"
|
||||||
|
|
||||||
|
mimic-response@^1.0.0, mimic-response@^1.0.1:
|
||||||
|
version "1.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/mimic-response/-/mimic-response-1.0.1.tgz#4923538878eef42063cb8a3e3b0798781487ab1b"
|
||||||
|
integrity sha512-j5EctnkH7amfV/q5Hgmoal1g2QHFJRraOtmx0JpIqkxhBhI/lJSl1nMpQ45hVarwNETOoWEimndZ4QK0RHxuxQ==
|
||||||
|
|
||||||
|
minimist@^1.2.5:
|
||||||
|
version "1.2.5"
|
||||||
|
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602"
|
||||||
|
integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==
|
||||||
|
|
||||||
|
mkdirp@^0.5.4:
|
||||||
|
version "0.5.5"
|
||||||
|
resolved "https://registry.yarnpkg.com/mkdirp/-/mkdirp-0.5.5.tgz#d91cefd62d1436ca0f41620e251288d420099def"
|
||||||
|
integrity sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==
|
||||||
|
dependencies:
|
||||||
|
minimist "^1.2.5"
|
||||||
|
|
||||||
|
ms@2.0.0:
|
||||||
|
version "2.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8"
|
||||||
|
integrity sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=
|
||||||
|
|
||||||
|
ms@2.1.2:
|
||||||
|
version "2.1.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009"
|
||||||
|
integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==
|
||||||
|
|
||||||
|
normalize-url@^4.1.0:
|
||||||
|
version "4.5.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-4.5.1.tgz#0dd90cf1288ee1d1313b87081c9a5932ee48518a"
|
||||||
|
integrity sha512-9UZCFRHQdNrfTpGg8+1INIg93B6zE0aXMVFkw1WFwvO4SlZywU6aLg5Of0Ap/PgcbSw4LNxvMWXMeugwMCX0AA==
|
||||||
|
|
||||||
|
npm-conf@^1.1.3:
|
||||||
|
version "1.1.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/npm-conf/-/npm-conf-1.1.3.tgz#256cc47bd0e218c259c4e9550bf413bc2192aff9"
|
||||||
|
integrity sha512-Yic4bZHJOt9RCFbRP3GgpqhScOY4HH3V2P8yBj6CeYq118Qr+BLXqT2JvpJ00mryLESpgOxf5XlFv4ZjXxLScw==
|
||||||
|
dependencies:
|
||||||
|
config-chain "^1.1.11"
|
||||||
|
pify "^3.0.0"
|
||||||
|
|
||||||
|
object-keys@^1.0.12:
|
||||||
|
version "1.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e"
|
||||||
|
integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==
|
||||||
|
|
||||||
|
once@^1.3.1, once@^1.4.0:
|
||||||
|
version "1.4.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
|
||||||
|
integrity sha1-WDsap3WWHUsROsF9nFC6753Xa9E=
|
||||||
|
dependencies:
|
||||||
|
wrappy "1"
|
||||||
|
|
||||||
|
p-cancelable@^1.0.0:
|
||||||
|
version "1.1.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/p-cancelable/-/p-cancelable-1.1.0.tgz#d078d15a3af409220c886f1d9a0ca2e441ab26cc"
|
||||||
|
integrity sha512-s73XxOZ4zpt1edZYZzvhqFa6uvQc1vwUa0K0BdtIZgQMAJj9IbebH+JkgKZc9h+B05PKHLOTl4ajG1BmNrVZlw==
|
||||||
|
|
||||||
|
pend@~1.2.0:
|
||||||
|
version "1.2.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/pend/-/pend-1.2.0.tgz#7a57eb550a6783f9115331fcf4663d5c8e007a50"
|
||||||
|
integrity sha1-elfrVQpng/kRUzH89GY9XI4AelA=
|
||||||
|
|
||||||
|
pify@^3.0.0:
|
||||||
|
version "3.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/pify/-/pify-3.0.0.tgz#e5a4acd2c101fdf3d9a4d07f0dbc4db49dd28176"
|
||||||
|
integrity sha1-5aSs0sEB/fPZpNB/DbxNtJ3SgXY=
|
||||||
|
|
||||||
|
prepend-http@^2.0.0:
|
||||||
|
version "2.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-2.0.0.tgz#e92434bfa5ea8c19f41cdfd401d741a3c819d897"
|
||||||
|
integrity sha1-6SQ0v6XqjBn0HN/UAddBo8gZ2Jc=
|
||||||
|
|
||||||
|
process-nextick-args@~2.0.0:
|
||||||
|
version "2.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2"
|
||||||
|
integrity sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==
|
||||||
|
|
||||||
|
progress@^2.0.3:
|
||||||
|
version "2.0.3"
|
||||||
|
resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8"
|
||||||
|
integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==
|
||||||
|
|
||||||
|
proto-list@~1.2.1:
|
||||||
|
version "1.2.4"
|
||||||
|
resolved "https://registry.yarnpkg.com/proto-list/-/proto-list-1.2.4.tgz#212d5bfe1318306a420f6402b8e26ff39647a849"
|
||||||
|
integrity sha1-IS1b/hMYMGpCD2QCuOJv85ZHqEk=
|
||||||
|
|
||||||
|
pump@^3.0.0:
|
||||||
|
version "3.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/pump/-/pump-3.0.0.tgz#b4a2116815bde2f4e1ea602354e8c75565107a64"
|
||||||
|
integrity sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==
|
||||||
|
dependencies:
|
||||||
|
end-of-stream "^1.1.0"
|
||||||
|
once "^1.3.1"
|
||||||
|
|
||||||
|
readable-stream@^2.2.2:
|
||||||
|
version "2.3.7"
|
||||||
|
resolved "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.7.tgz#1eca1cf711aef814c04f62252a36a62f6cb23b57"
|
||||||
|
integrity sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==
|
||||||
|
dependencies:
|
||||||
|
core-util-is "~1.0.0"
|
||||||
|
inherits "~2.0.3"
|
||||||
|
isarray "~1.0.0"
|
||||||
|
process-nextick-args "~2.0.0"
|
||||||
|
safe-buffer "~5.1.1"
|
||||||
|
string_decoder "~1.1.1"
|
||||||
|
util-deprecate "~1.0.1"
|
||||||
|
|
||||||
|
responselike@^1.0.2:
|
||||||
|
version "1.0.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/responselike/-/responselike-1.0.2.tgz#918720ef3b631c5642be068f15ade5a46f4ba1e7"
|
||||||
|
integrity sha1-kYcg7ztjHFZCvgaPFa3lpG9Loec=
|
||||||
|
dependencies:
|
||||||
|
lowercase-keys "^1.0.0"
|
||||||
|
|
||||||
|
roarr@^2.15.3:
|
||||||
|
version "2.15.4"
|
||||||
|
resolved "https://registry.yarnpkg.com/roarr/-/roarr-2.15.4.tgz#f5fe795b7b838ccfe35dc608e0282b9eba2e7afd"
|
||||||
|
integrity sha512-CHhPh+UNHD2GTXNYhPWLnU8ONHdI+5DI+4EYIAOaiD63rHeYlZvyh8P+in5999TTSFgUYuKUAjzRI4mdh/p+2A==
|
||||||
|
dependencies:
|
||||||
|
boolean "^3.0.1"
|
||||||
|
detect-node "^2.0.4"
|
||||||
|
globalthis "^1.0.1"
|
||||||
|
json-stringify-safe "^5.0.1"
|
||||||
|
semver-compare "^1.0.0"
|
||||||
|
sprintf-js "^1.1.2"
|
||||||
|
|
||||||
|
safe-buffer@~5.1.0, safe-buffer@~5.1.1:
|
||||||
|
version "5.1.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"
|
||||||
|
integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==
|
||||||
|
|
||||||
|
semver-compare@^1.0.0:
|
||||||
|
version "1.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/semver-compare/-/semver-compare-1.0.0.tgz#0dee216a1c941ab37e9efb1788f6afc5ff5537fc"
|
||||||
|
integrity sha1-De4hahyUGrN+nvsXiPavxf9VN/w=
|
||||||
|
|
||||||
|
semver@^6.2.0:
|
||||||
|
version "6.3.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d"
|
||||||
|
integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==
|
||||||
|
|
||||||
|
semver@^7.3.2:
|
||||||
|
version "7.3.5"
|
||||||
|
resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.5.tgz#0b621c879348d8998e4b0e4be94b3f12e6018ef7"
|
||||||
|
integrity sha512-PoeGJYh8HK4BTO/a9Tf6ZG3veo/A7ZVsYrSA6J8ny9nb3B1VrpkuN+z9OE5wfE5p6H4LchYZsegiQgbJD94ZFQ==
|
||||||
|
dependencies:
|
||||||
|
lru-cache "^6.0.0"
|
||||||
|
|
||||||
|
serialize-error@^7.0.1:
|
||||||
|
version "7.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/serialize-error/-/serialize-error-7.0.1.tgz#f1360b0447f61ffb483ec4157c737fab7d778e18"
|
||||||
|
integrity sha512-8I8TjW5KMOKsZQTvoxjuSIa7foAwPWGOts+6o7sgjz41/qMD9VQHEDxi6PBvK2l0MXUmqZyNpUK+T2tQaaElvw==
|
||||||
|
dependencies:
|
||||||
|
type-fest "^0.13.1"
|
||||||
|
|
||||||
|
sprintf-js@^1.1.2:
|
||||||
|
version "1.1.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/sprintf-js/-/sprintf-js-1.1.2.tgz#da1765262bf8c0f571749f2ad6c26300207ae673"
|
||||||
|
integrity sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug==
|
||||||
|
|
||||||
|
string_decoder@~1.1.1:
|
||||||
|
version "1.1.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8"
|
||||||
|
integrity sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==
|
||||||
|
dependencies:
|
||||||
|
safe-buffer "~5.1.0"
|
||||||
|
|
||||||
|
sumchecker@^3.0.1:
|
||||||
|
version "3.0.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/sumchecker/-/sumchecker-3.0.1.tgz#6377e996795abb0b6d348e9b3e1dfb24345a8e42"
|
||||||
|
integrity sha512-MvjXzkz/BOfyVDkG0oFOtBxHX2u3gKbMHIF/dXblZsgD3BWOFLmHovIpZY7BykJdAjcqRCBi1WYBNdEC9yI7vg==
|
||||||
|
dependencies:
|
||||||
|
debug "^4.1.0"
|
||||||
|
|
||||||
|
to-readable-stream@^1.0.0:
|
||||||
|
version "1.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/to-readable-stream/-/to-readable-stream-1.0.0.tgz#ce0aa0c2f3df6adf852efb404a783e77c0475771"
|
||||||
|
integrity sha512-Iq25XBt6zD5npPhlLVXGFN3/gyR2/qODcKNNyTMd4vbm39HUaOiAM4PMq0eMVC/Tkxz+Zjdsc55g9yyz+Yq00Q==
|
||||||
|
|
||||||
|
tunnel@^0.0.6:
|
||||||
|
version "0.0.6"
|
||||||
|
resolved "https://registry.yarnpkg.com/tunnel/-/tunnel-0.0.6.tgz#72f1314b34a5b192db012324df2cc587ca47f92c"
|
||||||
|
integrity sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==
|
||||||
|
|
||||||
|
type-fest@^0.13.1:
|
||||||
|
version "0.13.1"
|
||||||
|
resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.13.1.tgz#0172cb5bce80b0bd542ea348db50c7e21834d934"
|
||||||
|
integrity sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==
|
||||||
|
|
||||||
|
typedarray@^0.0.6:
|
||||||
|
version "0.0.6"
|
||||||
|
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
|
||||||
|
integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=
|
||||||
|
|
||||||
|
universalify@^0.1.0:
|
||||||
|
version "0.1.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/universalify/-/universalify-0.1.2.tgz#b646f69be3942dabcecc9d6639c80dc105efaa66"
|
||||||
|
integrity sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==
|
||||||
|
|
||||||
|
url-parse-lax@^3.0.0:
|
||||||
|
version "3.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/url-parse-lax/-/url-parse-lax-3.0.0.tgz#16b5cafc07dbe3676c1b1999177823d6503acb0c"
|
||||||
|
integrity sha1-FrXK/Afb42dsGxmZF3gj1lA6yww=
|
||||||
|
dependencies:
|
||||||
|
prepend-http "^2.0.0"
|
||||||
|
|
||||||
|
util-deprecate@~1.0.1:
|
||||||
|
version "1.0.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf"
|
||||||
|
integrity sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=
|
||||||
|
|
||||||
|
wrappy@1:
|
||||||
|
version "1.0.2"
|
||||||
|
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
|
||||||
|
integrity sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=
|
||||||
|
|
||||||
|
yallist@^4.0.0:
|
||||||
|
version "4.0.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72"
|
||||||
|
integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==
|
||||||
|
|
||||||
|
yauzl@^2.10.0:
|
||||||
|
version "2.10.0"
|
||||||
|
resolved "https://registry.yarnpkg.com/yauzl/-/yauzl-2.10.0.tgz#c7eb17c93e112cb1086fa6d8e51fb0667b79a5f9"
|
||||||
|
integrity sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk=
|
||||||
|
dependencies:
|
||||||
|
buffer-crc32 "~0.2.3"
|
||||||
|
fd-slicer "~1.1.0"
|
||||||
@ -54,8 +54,11 @@
|
|||||||
|
|
||||||
document.documentElement.appendChild(element);
|
document.documentElement.appendChild(element);
|
||||||
}
|
}
|
||||||
window.addEventListener("error", errorHandler);
|
|
||||||
window.addEventListener("unhandledrejection", errorHandler);
|
if (window.location.host.indexOf("localhost") < 0) {
|
||||||
|
window.addEventListener("error", errorHandler);
|
||||||
|
window.addEventListener("unhandledrejection", errorHandler);
|
||||||
|
}
|
||||||
|
|
||||||
function makeJsTag(src, integrity) {
|
function makeJsTag(src, integrity) {
|
||||||
var script = document.createElement("script");
|
var script = document.createElement("script");
|
||||||
|
|||||||
@ -139,7 +139,12 @@ gulp.task("main.webserver", () => {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
function serve({ standalone, chineseVersion = false }) {
|
/**
|
||||||
|
*
|
||||||
|
* @param {object} param0
|
||||||
|
* @param {"web"|"standalone"|"china"|"wegame"} param0.version
|
||||||
|
*/
|
||||||
|
function serve({ version = "web" }) {
|
||||||
browserSync.init({
|
browserSync.init({
|
||||||
server: buildFolder,
|
server: buildFolder,
|
||||||
port: 3005,
|
port: 3005,
|
||||||
@ -163,7 +168,7 @@ function serve({ standalone, chineseVersion = false }) {
|
|||||||
gulp.watch(["../src/**/*.scss"], gulp.series("css.dev"));
|
gulp.watch(["../src/**/*.scss"], gulp.series("css.dev"));
|
||||||
|
|
||||||
// Watch .html files, those trigger a html rebuild
|
// Watch .html files, those trigger a html rebuild
|
||||||
gulp.watch("../src/**/*.html", gulp.series(standalone ? "html.standalone-dev" : "html.dev"));
|
gulp.watch("../src/**/*.html", gulp.series(version === "web" ? "html.dev" : "html.standalone-dev"));
|
||||||
|
|
||||||
// Watch sound files
|
// Watch sound files
|
||||||
// gulp.watch(["../res_raw/sounds/**/*.mp3", "../res_raw/sounds/**/*.wav"], gulp.series("sounds.dev"));
|
// gulp.watch(["../res_raw/sounds/**/*.mp3", "../res_raw/sounds/**/*.wav"], gulp.series("sounds.dev"));
|
||||||
@ -199,14 +204,25 @@ function serve({ standalone, chineseVersion = false }) {
|
|||||||
return gulp.src(path).pipe(browserSync.reload({ stream: true }));
|
return gulp.src(path).pipe(browserSync.reload({ stream: true }));
|
||||||
});
|
});
|
||||||
|
|
||||||
// Start the webpack watching server (Will never return)
|
switch (version) {
|
||||||
if (standalone) {
|
case "web": {
|
||||||
gulp.series("js.standalone-dev.watch")(() => true);
|
|
||||||
} else {
|
|
||||||
if (chineseVersion) {
|
|
||||||
gulp.series("china.js.dev.watch")(() => true);
|
|
||||||
} else {
|
|
||||||
gulp.series("js.dev.watch")(() => true);
|
gulp.series("js.dev.watch")(() => true);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case "standalone": {
|
||||||
|
gulp.series("js.standalone-dev.watch")(() => true);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case "china": {
|
||||||
|
gulp.series("china.js.dev.watch")(() => true);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
case "wegame": {
|
||||||
|
gulp.series("wegame.js.dev.watch")(() => true);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
default: {
|
||||||
|
throw new Error("Unknown version " + version);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -294,7 +310,7 @@ gulp.task(
|
|||||||
|
|
||||||
// Builds everything (standalone-prod)
|
// Builds everything (standalone-prod)
|
||||||
|
|
||||||
for (const prefix of ["", "china."]) {
|
for (const prefix of ["", "china.", "wegame."]) {
|
||||||
gulp.task(
|
gulp.task(
|
||||||
prefix + "step.standalone-prod.code",
|
prefix + "step.standalone-prod.code",
|
||||||
gulp.series("sounds.fullbuildHQ", "translations.fullBuild", prefix + "js.standalone-prod")
|
gulp.series("sounds.fullbuildHQ", "translations.fullBuild", prefix + "js.standalone-prod")
|
||||||
@ -327,25 +343,45 @@ gulp.task(
|
|||||||
);
|
);
|
||||||
gulp.task("main.deploy.prod", gulp.series("utils.requireCleanWorkingTree", "build.prod", "ftp.upload.prod"));
|
gulp.task("main.deploy.prod", gulp.series("utils.requireCleanWorkingTree", "build.prod", "ftp.upload.prod"));
|
||||||
gulp.task("main.deploy.all", gulp.series("main.deploy.staging", "main.deploy.prod"));
|
gulp.task("main.deploy.all", gulp.series("main.deploy.staging", "main.deploy.prod"));
|
||||||
|
|
||||||
|
// steam
|
||||||
gulp.task("regular.main.standalone", gulp.series("build.standalone-prod", "standalone.package.prod"));
|
gulp.task("regular.main.standalone", gulp.series("build.standalone-prod", "standalone.package.prod"));
|
||||||
|
|
||||||
|
// china
|
||||||
gulp.task(
|
gulp.task(
|
||||||
"china.main.standalone",
|
"china.main.standalone",
|
||||||
gulp.series("china.build.standalone-prod", "china.standalone.package.prod")
|
gulp.series("china.build.standalone-prod", "china.standalone.package.prod")
|
||||||
);
|
);
|
||||||
gulp.task("standalone.all", gulp.series("regular.main.standalone", "china.main.standalone"));
|
|
||||||
|
// wegame
|
||||||
|
gulp.task(
|
||||||
|
"wegame.main.standalone",
|
||||||
|
gulp.series("wegame.build.standalone-prod", "wegame.standalone.package.prod")
|
||||||
|
);
|
||||||
|
|
||||||
|
// all (except wegame)
|
||||||
|
gulp.task("standalone.steam", gulp.series("regular.main.standalone", "china.main.standalone"));
|
||||||
|
gulp.task(
|
||||||
|
"standalone.all",
|
||||||
|
gulp.series("regular.main.standalone", "china.main.standalone", "wegame.main.standalone")
|
||||||
|
);
|
||||||
|
|
||||||
// Live-development
|
// Live-development
|
||||||
gulp.task(
|
gulp.task(
|
||||||
"main.serveDev",
|
"main.serveDev",
|
||||||
gulp.series("build.dev", () => serve({ standalone: false }))
|
gulp.series("build.dev", () => serve({ version: "web" }))
|
||||||
);
|
);
|
||||||
gulp.task(
|
gulp.task(
|
||||||
"main.serveStandalone",
|
"main.serveStandalone",
|
||||||
gulp.series("build.standalone.dev", () => serve({ standalone: true }))
|
gulp.series("build.standalone.dev", () => serve({ version: "standalone" }))
|
||||||
);
|
);
|
||||||
gulp.task(
|
gulp.task(
|
||||||
"china.main.serveDev",
|
"china.main.serveDev",
|
||||||
gulp.series("build.dev", () => serve({ standalone: false, chineseVersion: true }))
|
gulp.series("build.dev", () => serve({ version: "china" }))
|
||||||
|
);
|
||||||
|
gulp.task(
|
||||||
|
"wegame.main.serveDev",
|
||||||
|
gulp.series("build.dev", () => serve({ version: "wegame" }))
|
||||||
);
|
);
|
||||||
|
|
||||||
gulp.task("default", gulp.series("main.serveDev"));
|
gulp.task("default", gulp.series("main.serveDev"));
|
||||||
|
|||||||
47
gulp/js.js
@ -59,6 +59,36 @@ function gulptasksJS($, gulp, buildFolder, browserSync) {
|
|||||||
.pipe(gulp.dest(buildFolder));
|
.pipe(gulp.dest(buildFolder));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
//// DEV WEGAME
|
||||||
|
|
||||||
|
gulp.task("wegame.js.dev.watch", () => {
|
||||||
|
return gulp
|
||||||
|
.src("../src/js/main.js")
|
||||||
|
.pipe(
|
||||||
|
$.webpackStream(
|
||||||
|
requireUncached("./webpack.config.js")({
|
||||||
|
watch: true,
|
||||||
|
wegameVersion: true,
|
||||||
|
})
|
||||||
|
)
|
||||||
|
)
|
||||||
|
.pipe(gulp.dest(buildFolder))
|
||||||
|
.pipe(browserSync.stream());
|
||||||
|
});
|
||||||
|
|
||||||
|
gulp.task("wegame.js.dev", () => {
|
||||||
|
return gulp
|
||||||
|
.src("../src/js/main.js")
|
||||||
|
.pipe(
|
||||||
|
$.webpackStream(
|
||||||
|
requireUncached("./webpack.config.js")({
|
||||||
|
wegameVersion: true,
|
||||||
|
})
|
||||||
|
)
|
||||||
|
)
|
||||||
|
.pipe(gulp.dest(buildFolder));
|
||||||
|
});
|
||||||
|
|
||||||
//// STAGING
|
//// STAGING
|
||||||
|
|
||||||
gulp.task("js.staging.transpiled", () => {
|
gulp.task("js.staging.transpiled", () => {
|
||||||
@ -208,6 +238,23 @@ function gulptasksJS($, gulp, buildFolder, browserSync) {
|
|||||||
)
|
)
|
||||||
.pipe(gulp.dest(buildFolder));
|
.pipe(gulp.dest(buildFolder));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
gulp.task("wegame.js.standalone-prod", () => {
|
||||||
|
return gulp
|
||||||
|
.src("../src/js/main.js")
|
||||||
|
.pipe(
|
||||||
|
$.webpackStream(
|
||||||
|
requireUncached("./webpack.production.config.js")({
|
||||||
|
enableAssert: false,
|
||||||
|
environment: "prod",
|
||||||
|
es6: false,
|
||||||
|
standalone: true,
|
||||||
|
wegameVersion: true,
|
||||||
|
})
|
||||||
|
)
|
||||||
|
)
|
||||||
|
.pipe(gulp.dest(buildFolder));
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
|
|||||||
@ -9,21 +9,31 @@ const buildutils = require("./buildutils");
|
|||||||
const execSync = require("child_process").execSync;
|
const execSync = require("child_process").execSync;
|
||||||
|
|
||||||
function gulptasksStandalone($, gulp) {
|
function gulptasksStandalone($, gulp) {
|
||||||
const electronBaseDir = path.join(__dirname, "..", "electron");
|
|
||||||
const targets = [
|
const targets = [
|
||||||
{
|
{
|
||||||
tempDestDir: path.join(__dirname, "..", "tmp_standalone_files"),
|
tempDestDir: path.join(__dirname, "..", "tmp_standalone_files"),
|
||||||
suffix: "",
|
suffix: "",
|
||||||
taskPrefix: "",
|
taskPrefix: "",
|
||||||
|
electronBaseDir: path.join(__dirname, "..", "electron"),
|
||||||
|
steam: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
tempDestDir: path.join(__dirname, "..", "tmp_standalone_files_china"),
|
tempDestDir: path.join(__dirname, "..", "tmp_standalone_files_china"),
|
||||||
suffix: "china",
|
suffix: "china",
|
||||||
taskPrefix: "china.",
|
taskPrefix: "china.",
|
||||||
|
electronBaseDir: path.join(__dirname, "..", "electron"),
|
||||||
|
steam: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
tempDestDir: path.join(__dirname, "..", "tmp_standalone_files_wegame"),
|
||||||
|
suffix: "wegame",
|
||||||
|
taskPrefix: "wegame.",
|
||||||
|
electronBaseDir: path.join(__dirname, "..", "electron_wegame"),
|
||||||
|
steam: false,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
for (const { tempDestDir, suffix, taskPrefix } of targets) {
|
for (const { tempDestDir, suffix, taskPrefix, electronBaseDir, steam } of targets) {
|
||||||
const tempDestBuildDir = path.join(tempDestDir, "built");
|
const tempDestBuildDir = path.join(tempDestDir, "built");
|
||||||
|
|
||||||
gulp.task(taskPrefix + "standalone.prepare.cleanup", () => {
|
gulp.task(taskPrefix + "standalone.prepare.cleanup", () => {
|
||||||
@ -34,13 +44,17 @@ function gulptasksStandalone($, gulp) {
|
|||||||
const requiredFiles = [
|
const requiredFiles = [
|
||||||
path.join(electronBaseDir, "node_modules", "**", "*.*"),
|
path.join(electronBaseDir, "node_modules", "**", "*.*"),
|
||||||
path.join(electronBaseDir, "node_modules", "**", ".*"),
|
path.join(electronBaseDir, "node_modules", "**", ".*"),
|
||||||
path.join(electronBaseDir, "steam_appid.txt"),
|
path.join(electronBaseDir, "wegame_sdk", "**", "*.*"),
|
||||||
|
path.join(electronBaseDir, "wegame_sdk", "**", ".*"),
|
||||||
path.join(electronBaseDir, "favicon*"),
|
path.join(electronBaseDir, "favicon*"),
|
||||||
|
|
||||||
// fails on platforms which support symlinks
|
// fails on platforms which support symlinks
|
||||||
// https://github.com/gulpjs/gulp/issues/1427
|
// https://github.com/gulpjs/gulp/issues/1427
|
||||||
// path.join(electronBaseDir, "node_modules", "**", "*"),
|
// path.join(electronBaseDir, "node_modules", "**", "*"),
|
||||||
];
|
];
|
||||||
|
if (steam) {
|
||||||
|
requiredFiles.push(path.join(electronBaseDir, "steam_appid.txt"));
|
||||||
|
}
|
||||||
return gulp.src(requiredFiles, { base: electronBaseDir }).pipe(gulp.dest(tempDestBuildDir));
|
return gulp.src(requiredFiles, { base: electronBaseDir }).pipe(gulp.dest(tempDestBuildDir));
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -64,6 +78,11 @@ function gulptasksStandalone($, gulp) {
|
|||||||
});
|
});
|
||||||
|
|
||||||
gulp.task(taskPrefix + "standalone.prepareVDF", cb => {
|
gulp.task(taskPrefix + "standalone.prepareVDF", cb => {
|
||||||
|
if (!steam) {
|
||||||
|
cb();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const hash = buildutils.getRevision();
|
const hash = buildutils.getRevision();
|
||||||
|
|
||||||
const steampipeDir = path.join(__dirname, "steampipe", "scripts");
|
const steampipeDir = path.join(__dirname, "steampipe", "scripts");
|
||||||
@ -116,11 +135,10 @@ function gulptasksStandalone($, gulp) {
|
|||||||
const tomlFile = fs.readFileSync(path.join(__dirname, ".itch.toml"));
|
const tomlFile = fs.readFileSync(path.join(__dirname, ".itch.toml"));
|
||||||
const privateArtifactsPath = "node_modules/shapez.io-private-artifacts";
|
const privateArtifactsPath = "node_modules/shapez.io-private-artifacts";
|
||||||
|
|
||||||
let asar;
|
let asar = steam;
|
||||||
if (fs.existsSync(path.join(tempDestBuildDir, privateArtifactsPath))) {
|
if (steam && fs.existsSync(path.join(tempDestBuildDir, privateArtifactsPath))) {
|
||||||
|
// @ts-expect-error
|
||||||
asar = { unpackDir: privateArtifactsPath };
|
asar = { unpackDir: privateArtifactsPath };
|
||||||
} else {
|
|
||||||
asar = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
packager({
|
packager({
|
||||||
@ -147,24 +165,26 @@ function gulptasksStandalone($, gulp) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
fs.writeFileSync(
|
if (steam) {
|
||||||
path.join(appPath, "LICENSE"),
|
|
||||||
fs.readFileSync(path.join(__dirname, "..", "LICENSE"))
|
|
||||||
);
|
|
||||||
|
|
||||||
fse.copySync(
|
|
||||||
path.join(tempDestBuildDir, "steam_appid.txt"),
|
|
||||||
path.join(appPath, "steam_appid.txt")
|
|
||||||
);
|
|
||||||
|
|
||||||
fs.writeFileSync(path.join(appPath, ".itch.toml"), tomlFile);
|
|
||||||
|
|
||||||
if (platform === "linux") {
|
|
||||||
fs.writeFileSync(
|
fs.writeFileSync(
|
||||||
path.join(appPath, "play.sh"),
|
path.join(appPath, "LICENSE"),
|
||||||
'#!/usr/bin/env bash\n./shapezio --no-sandbox "$@"\n'
|
fs.readFileSync(path.join(__dirname, "..", "LICENSE"))
|
||||||
);
|
);
|
||||||
fs.chmodSync(path.join(appPath, "play.sh"), 0o775);
|
|
||||||
|
fse.copySync(
|
||||||
|
path.join(tempDestBuildDir, "steam_appid.txt"),
|
||||||
|
path.join(appPath, "steam_appid.txt")
|
||||||
|
);
|
||||||
|
|
||||||
|
fs.writeFileSync(path.join(appPath, ".itch.toml"), tomlFile);
|
||||||
|
|
||||||
|
if (platform === "linux") {
|
||||||
|
fs.writeFileSync(
|
||||||
|
path.join(appPath, "play.sh"),
|
||||||
|
'#!/usr/bin/env bash\n./shapezio --no-sandbox "$@"\n'
|
||||||
|
);
|
||||||
|
fs.chmodSync(path.join(appPath, "play.sh"), 0o775);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -2,16 +2,16 @@
|
|||||||
{
|
{
|
||||||
"appid" "1318690"
|
"appid" "1318690"
|
||||||
"desc" "$DESC$"
|
"desc" "$DESC$"
|
||||||
"buildoutput" "C:\work\shapez.io\gulp\steampipe\steamtemp"
|
"buildoutput" "C:\work\shapez\shapez.io\gulp\steampipe\steamtemp"
|
||||||
"contentroot" ""
|
"contentroot" ""
|
||||||
"setlive" ""
|
"setlive" ""
|
||||||
"preview" "0"
|
"preview" "0"
|
||||||
"local" ""
|
"local" ""
|
||||||
"depots"
|
"depots"
|
||||||
{
|
{
|
||||||
"1318691" "C:\work\shapez.io\gulp\steampipe\scripts\windows.vdf"
|
"1318691" "C:\work\shapez\shapez.io\gulp\steampipe\scripts\windows.vdf"
|
||||||
"1318694" "C:\work\shapez.io\gulp\steampipe\scripts\china-windows.vdf"
|
"1318694" "C:\work\shapez\shapez.io\gulp\steampipe\scripts\china-windows.vdf"
|
||||||
"1318692" "C:\work\shapez.io\gulp\steampipe\scripts\linux.vdf"
|
"1318692" "C:\work\shapez\shapez.io\gulp\steampipe\scripts\linux.vdf"
|
||||||
"1318695" "C:\work\shapez.io\gulp\steampipe\scripts\china-linux.vdf"
|
"1318695" "C:\work\shapez\shapez.io\gulp\steampipe\scripts\china-linux.vdf"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
"DepotBuildConfig"
|
"DepotBuildConfig"
|
||||||
{
|
{
|
||||||
"DepotID" "1318695"
|
"DepotID" "1318695"
|
||||||
"contentroot" "C:\work\shapez.io\tmp_standalone_files_china\shapez.io-standalonechina-linux-x64"
|
"contentroot" "C:\work\shapez\shapez.io\tmp_standalone_files_china\shapez.io-standalonechina-linux-x64"
|
||||||
"FileMapping"
|
"FileMapping"
|
||||||
{
|
{
|
||||||
"LocalPath" "*"
|
"LocalPath" "*"
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
"DepotBuildConfig"
|
"DepotBuildConfig"
|
||||||
{
|
{
|
||||||
"DepotID" "1318694"
|
"DepotID" "1318694"
|
||||||
"contentroot" "C:\work\shapez.io\tmp_standalone_files_china\shapez.io-standalonechina-win32-x64"
|
"contentroot" "C:\work\shapez\shapez.io\tmp_standalone_files_china\shapez.io-standalonechina-win32-x64"
|
||||||
"FileMapping"
|
"FileMapping"
|
||||||
{
|
{
|
||||||
"LocalPath" "*"
|
"LocalPath" "*"
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
"DepotBuildConfig"
|
"DepotBuildConfig"
|
||||||
{
|
{
|
||||||
"DepotID" "1318692"
|
"DepotID" "1318692"
|
||||||
"contentroot" "C:\work\shapez.io\tmp_standalone_files\shapez.io-standalone-linux-x64"
|
"contentroot" "C:\work\shapez\shapez.io\tmp_standalone_files\shapez.io-standalone-linux-x64"
|
||||||
"FileMapping"
|
"FileMapping"
|
||||||
{
|
{
|
||||||
"LocalPath" "*"
|
"LocalPath" "*"
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
"DepotBuildConfig"
|
"DepotBuildConfig"
|
||||||
{
|
{
|
||||||
"DepotID" "1318691"
|
"DepotID" "1318691"
|
||||||
"contentroot" "C:\work\shapez.io\tmp_standalone_files\shapez.io-standalone-win32-x64"
|
"contentroot" "C:\work\shapez\shapez.io\tmp_standalone_files\shapez.io-standalone-win32-x64"
|
||||||
"FileMapping"
|
"FileMapping"
|
||||||
{
|
{
|
||||||
"LocalPath" "*"
|
"LocalPath" "*"
|
||||||
|
|||||||
@ -6,7 +6,7 @@ const { getRevision, getVersion, getAllResourceImages } = require("./buildutils"
|
|||||||
const lzString = require("lz-string");
|
const lzString = require("lz-string");
|
||||||
const CircularDependencyPlugin = require("circular-dependency-plugin");
|
const CircularDependencyPlugin = require("circular-dependency-plugin");
|
||||||
|
|
||||||
module.exports = ({ watch = false, standalone = false, chineseVersion = false }) => {
|
module.exports = ({ watch = false, standalone = false, chineseVersion = false, wegameVersion = false }) => {
|
||||||
return {
|
return {
|
||||||
mode: "development",
|
mode: "development",
|
||||||
devtool: "cheap-source-map",
|
devtool: "cheap-source-map",
|
||||||
@ -35,6 +35,7 @@ module.exports = ({ watch = false, standalone = false, chineseVersion = false })
|
|||||||
lzString.compressToEncodedURIComponent("http://localhost:10005/v1")
|
lzString.compressToEncodedURIComponent("http://localhost:10005/v1")
|
||||||
),
|
),
|
||||||
G_CHINA_VERSION: JSON.stringify(chineseVersion),
|
G_CHINA_VERSION: JSON.stringify(chineseVersion),
|
||||||
|
G_WEGAME_VERSION: JSON.stringify(wegameVersion),
|
||||||
G_IS_DEV: "true",
|
G_IS_DEV: "true",
|
||||||
G_IS_RELEASE: "false",
|
G_IS_RELEASE: "false",
|
||||||
G_IS_MOBILE_APP: "false",
|
G_IS_MOBILE_APP: "false",
|
||||||
|
|||||||
@ -17,6 +17,7 @@ module.exports = ({
|
|||||||
isBrowser = true,
|
isBrowser = true,
|
||||||
mobileApp = false,
|
mobileApp = false,
|
||||||
chineseVersion = false,
|
chineseVersion = false,
|
||||||
|
wegameVersion = false,
|
||||||
}) => {
|
}) => {
|
||||||
const globalDefs = {
|
const globalDefs = {
|
||||||
assert: enableAssert ? "window.assert" : "false && window.assert",
|
assert: enableAssert ? "window.assert" : "false && window.assert",
|
||||||
@ -25,6 +26,7 @@ module.exports = ({
|
|||||||
G_IS_DEV: "false",
|
G_IS_DEV: "false",
|
||||||
|
|
||||||
G_CHINA_VERSION: JSON.stringify(chineseVersion),
|
G_CHINA_VERSION: JSON.stringify(chineseVersion),
|
||||||
|
G_WEGAME_VERSION: JSON.stringify(wegameVersion),
|
||||||
G_IS_RELEASE: environment === "prod" ? "true" : "false",
|
G_IS_RELEASE: environment === "prod" ? "true" : "false",
|
||||||
G_IS_STANDALONE: standalone ? "true" : "false",
|
G_IS_STANDALONE: standalone ? "true" : "false",
|
||||||
G_IS_BROWSER: isBrowser ? "true" : "false",
|
G_IS_BROWSER: isBrowser ? "true" : "false",
|
||||||
@ -40,7 +42,7 @@ module.exports = ({
|
|||||||
G_ALL_UI_IMAGES: JSON.stringify(getAllResourceImages()),
|
G_ALL_UI_IMAGES: JSON.stringify(getAllResourceImages()),
|
||||||
};
|
};
|
||||||
|
|
||||||
const minifyNames = environment === "prod";
|
const minifyNames = false;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
mode: "production",
|
mode: "production",
|
||||||
|
|||||||
BIN
res/logo_wegame.png
Normal file
|
After Width: | Height: | Size: 37 KiB |
BIN
res/puzzle_dlc_logo.png
Normal file
|
After Width: | Height: | Size: 32 KiB |
BIN
res/puzzle_dlc_logo_china.png
Normal file
|
After Width: | Height: | Size: 44 KiB |
BIN
res/ui/building_icons/block.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
BIN
res/ui/building_icons/constant_producer.png
Normal file
|
After Width: | Height: | Size: 3.6 KiB |
BIN
res/ui/building_icons/goal_acceptor.png
Normal file
|
After Width: | Height: | Size: 3.5 KiB |
BIN
res/ui/building_tutorials/block.png
Normal file
|
After Width: | Height: | Size: 55 KiB |
BIN
res/ui/building_tutorials/constant_producer.png
Normal file
|
After Width: | Height: | Size: 129 KiB |
BIN
res/ui/building_tutorials/goal_acceptor.png
Normal file
|
After Width: | Height: | Size: 100 KiB |
BIN
res/ui/icons/puzzle_action_liked_no.png
Normal file
|
After Width: | Height: | Size: 2.3 KiB |
BIN
res/ui/icons/puzzle_action_liked_yes.png
Normal file
|
After Width: | Height: | Size: 2.7 KiB |
BIN
res/ui/icons/puzzle_complete_indicator.png
Normal file
|
After Width: | Height: | Size: 1.7 KiB |
BIN
res/ui/icons/puzzle_complete_indicator_inverse.png
Normal file
|
After Width: | Height: | Size: 3.2 KiB |
BIN
res/ui/icons/puzzle_completion_rate.png
Normal file
|
After Width: | Height: | Size: 680 B |
BIN
res/ui/icons/puzzle_plays.png
Normal file
|
After Width: | Height: | Size: 1.6 KiB |
BIN
res/ui/icons/puzzle_upvotes.png
Normal file
|
After Width: | Height: | Size: 2.5 KiB |
BIN
res/ui/icons/state_next_button.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
res/ui/interactive_tutorial.cn.noinline/1_1_extractor.gif
Normal file
|
After Width: | Height: | Size: 120 KiB |
BIN
res/ui/interactive_tutorial.cn.noinline/1_2_conveyor.gif
Normal file
|
After Width: | Height: | Size: 297 KiB |
BIN
res/ui/interactive_tutorial.cn.noinline/1_3_expand.gif
Normal file
|
After Width: | Height: | Size: 993 KiB |
|
After Width: | Height: | Size: 809 KiB |
BIN
res/ui/interactive_tutorial.cn.noinline/21_2_switch_to_wires.gif
Normal file
|
After Width: | Height: | Size: 1.2 MiB |
BIN
res/ui/interactive_tutorial.cn.noinline/21_3_place_button.gif
Normal file
|
After Width: | Height: | Size: 531 KiB |
BIN
res/ui/interactive_tutorial.cn.noinline/21_4_press_button.gif
Normal file
|
After Width: | Height: | Size: 1.4 MiB |
BIN
res/ui/interactive_tutorial.cn.noinline/2_1_place_cutter.gif
Normal file
|
After Width: | Height: | Size: 502 KiB |
BIN
res/ui/interactive_tutorial.cn.noinline/2_2_place_trash.gif
Normal file
|
After Width: | Height: | Size: 575 KiB |
BIN
res/ui/interactive_tutorial.cn.noinline/2_3_more_cutters.gif
Normal file
|
After Width: | Height: | Size: 776 KiB |
BIN
res/ui/interactive_tutorial.cn.noinline/3_1_rectangles.gif
Normal file
|
After Width: | Height: | Size: 1.1 MiB |
42
res/ui/languages/he.svg
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||||
|
<!-- Generator: Adobe Illustrator 19.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||||
|
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||||
|
viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve">
|
||||||
|
<rect style="fill:#41479B;" width="512" height="512"/>
|
||||||
|
<rect y="93.86" style="fill:#F5F5F5;" width="512" height="324.28"/>
|
||||||
|
<path style="fill:#41479B;" d="M317.474,256l30.734-53.234h-61.469L256,149.523l-30.739,53.243h-61.469L194.526,256l-30.734,53.234
|
||||||
|
h61.469L256,362.477l30.739-53.243h61.469L317.474,256z M318.054,220.176l-10.632,18.415l-10.632-18.415H318.054z M297.371,256
|
||||||
|
l-20.683,35.824h-41.376L214.629,256l20.683-35.824h41.376L297.371,256z M256,184.344l10.636,18.422h-21.272L256,184.344z
|
||||||
|
M193.946,220.176h21.264l-10.632,18.415L193.946,220.176z M193.946,291.824l10.632-18.415l10.632,18.415H193.946z M256,327.656
|
||||||
|
l-10.636-18.422h21.272L256,327.656z M307.423,273.409l10.632,18.415h-21.264L307.423,273.409z"/>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
<g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 1.2 KiB |
BIN
res/ui/puzzle_dlc_logo.png
Normal file
|
After Width: | Height: | Size: 32 KiB |
BIN
res/ui/puzzle_dlc_logo_china.png
Normal file
|
After Width: | Height: | Size: 44 KiB |
BIN
res/ui/puzzle_dlc_logo_inverse.png
Normal file
|
After Width: | Height: | Size: 28 KiB |
BIN
res/ui/wegame_isbn_rating.jpg
Normal file
|
After Width: | Height: | Size: 5.8 KiB |
BIN
res_raw/sounds/music/puzzle-full.mp3
Normal file
BIN
res_raw/sprites/blueprints/block.png
Normal file
|
After Width: | Height: | Size: 5.2 KiB |
BIN
res_raw/sprites/blueprints/constant_producer.png
Normal file
|
After Width: | Height: | Size: 24 KiB |
BIN
res_raw/sprites/blueprints/goal_acceptor.png
Normal file
|
After Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 9.6 KiB After Width: | Height: | Size: 9.6 KiB |
BIN
res_raw/sprites/buildings/block.png
Normal file
|
After Width: | Height: | Size: 4.0 KiB |
BIN
res_raw/sprites/buildings/constant_producer.png
Normal file
|
After Width: | Height: | Size: 15 KiB |
BIN
res_raw/sprites/buildings/goal_acceptor.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
@ -41,7 +41,7 @@ def process_image(data, outfilename, src_image):
|
|||||||
if isWire:
|
if isWire:
|
||||||
targetR = 255
|
targetR = 255
|
||||||
targetG = 104
|
targetG = 104
|
||||||
targetB = 232
|
targetB = 232
|
||||||
|
|
||||||
for x in range(img.width):
|
for x in range(img.width):
|
||||||
for y in range(img.height):
|
for y in range(img.height):
|
||||||
@ -85,6 +85,8 @@ def generate_blueprint_sprite(infilename, outfilename):
|
|||||||
buildings = listdir("buildings")
|
buildings = listdir("buildings")
|
||||||
|
|
||||||
for buildingId in buildings:
|
for buildingId in buildings:
|
||||||
|
if not ".png" in buildingId:
|
||||||
|
continue
|
||||||
if "hub" in buildingId:
|
if "hub" in buildingId:
|
||||||
continue
|
continue
|
||||||
if "wire-" in buildingId:
|
if "wire-" in buildingId:
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
#ingame_HUD_BetaOverlay {
|
#ingame_HUD_BetaOverlay {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
@include S(top, 10px);
|
@include S(top, 70px);
|
||||||
left: 50%;
|
left: 50%;
|
||||||
transform: translateX(-50%);
|
transform: translateX(-50%);
|
||||||
color: $colorRedBright;
|
color: $colorRedBright;
|
||||||
|
|||||||
@ -37,7 +37,7 @@
|
|||||||
|
|
||||||
.building {
|
.building {
|
||||||
@include S(width, 30px);
|
@include S(width, 30px);
|
||||||
@include S(height, 22px);
|
@include S(height, 30px);
|
||||||
background-size: 45%;
|
background-size: 45%;
|
||||||
|
|
||||||
&:not(.unlocked) {
|
&:not(.unlocked) {
|
||||||
@ -49,65 +49,98 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.building {
|
.building {
|
||||||
color: $accentColorDark;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
@include S(width, 40px);
|
||||||
position: relative;
|
position: relative;
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
@include S(padding, 5px);
|
|
||||||
@include S(padding-bottom, 1px);
|
|
||||||
@include S(width, 35px);
|
|
||||||
@include S(height, 40px);
|
@include S(height, 40px);
|
||||||
|
.icon {
|
||||||
|
color: $accentColorDark;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column-reverse;
|
||||||
|
position: relative;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
padding: 0;
|
||||||
|
margin: 0;
|
||||||
|
@include S(border-radius, $globalBorderRadius);
|
||||||
|
|
||||||
background: center center / 70% no-repeat;
|
background: center center / 70% no-repeat;
|
||||||
|
}
|
||||||
|
|
||||||
&:not(.unlocked) {
|
&:not(.unlocked) {
|
||||||
@include S(width, 20px);
|
@include S(width, 25px);
|
||||||
opacity: 0.15;
|
.icon {
|
||||||
background-image: none !important;
|
opacity: 0.15;
|
||||||
|
}
|
||||||
&::before {
|
&.editor {
|
||||||
content: " ";
|
.icon {
|
||||||
|
pointer-events: all;
|
||||||
position: absolute;
|
cursor: pointer;
|
||||||
top: 0;
|
&:hover {
|
||||||
right: 0;
|
background-color: rgba(22, 30, 68, 0.1);
|
||||||
bottom: 0;
|
}
|
||||||
left: 0;
|
}
|
||||||
z-index: 4;
|
}
|
||||||
& {
|
&:not(.editor) {
|
||||||
/* @load-async */
|
.icon {
|
||||||
background: uiResource("locked_building.png") center center / #{D(20px)} #{D(20px)}
|
background-image: uiResource("locked_building.png") !important;
|
||||||
no-repeat;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@include S(border-radius, $globalBorderRadius);
|
|
||||||
|
|
||||||
&.unlocked {
|
&.unlocked {
|
||||||
pointer-events: all;
|
.icon {
|
||||||
transition: all 50ms ease-in-out;
|
pointer-events: all;
|
||||||
transition-property: background-color, transform;
|
transition: all 50ms ease-in-out;
|
||||||
|
transition-property: background-color, transform;
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
cursor: pointer;
|
&:hover {
|
||||||
&:hover {
|
background-color: rgba(30, 40, 90, 0.1);
|
||||||
background-color: rgba(30, 40, 90, 0.1);
|
}
|
||||||
|
|
||||||
|
&.pressed {
|
||||||
|
transform: scale(0.9) !important;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&.pressed {
|
|
||||||
transform: scale(0.9) !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
&.selected {
|
&.selected {
|
||||||
// transform: scale(1.05);
|
// transform: scale(1.05);
|
||||||
background-color: rgba(lighten($colorBlueBright, 9), 0.4);
|
background-color: rgba(lighten($colorBlueBright, 9), 0.4);
|
||||||
|
@include S(border-radius, 2px);
|
||||||
|
|
||||||
.keybinding {
|
.keybinding {
|
||||||
color: #111;
|
color: #111;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.puzzle-lock {
|
||||||
|
& {
|
||||||
|
/* @load-async */
|
||||||
|
background: uiResource("locked_building.png") center center / 90% no-repeat;
|
||||||
|
}
|
||||||
|
|
||||||
|
display: grid;
|
||||||
|
grid-auto-flow: column;
|
||||||
|
|
||||||
|
position: absolute;
|
||||||
|
@include S(top, -15px);
|
||||||
|
left: 50%;
|
||||||
|
transform: translateX(-50%) !important;
|
||||||
|
transition: all 0.12s ease-in-out;
|
||||||
|
transition-property: opacity, transform;
|
||||||
|
|
||||||
|
cursor: pointer;
|
||||||
|
pointer-events: all;
|
||||||
|
|
||||||
|
@include S(width, 12px);
|
||||||
|
@include S(height, 12px);
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
opacity: 0.5;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -67,6 +67,14 @@
|
|||||||
* {
|
* {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
|
||||||
|
.text {
|
||||||
|
text-transform: uppercase;
|
||||||
|
@include S(margin-bottom, 10px);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
> .dialogInner {
|
> .dialogInner {
|
||||||
@ -168,6 +176,11 @@
|
|||||||
|
|
||||||
&.errored {
|
&.errored {
|
||||||
background-color: rgb(250, 206, 206);
|
background-color: rgb(250, 206, 206);
|
||||||
|
|
||||||
|
&::placeholder {
|
||||||
|
color: #fff;
|
||||||
|
opacity: 0.8;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
41
src/css/ingame_hud/puzzle_back_to_menu.scss
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
#ingame_HUD_PuzzleBackToMenu {
|
||||||
|
position: absolute;
|
||||||
|
@include S(top, 10px);
|
||||||
|
@include S(left, 0px);
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: flex-start;
|
||||||
|
backdrop-filter: blur(D(1px));
|
||||||
|
padding: D(3px);
|
||||||
|
|
||||||
|
> .button {
|
||||||
|
@include PlainText;
|
||||||
|
pointer-events: all;
|
||||||
|
cursor: pointer;
|
||||||
|
position: relative;
|
||||||
|
color: #333438;
|
||||||
|
transition: all 0.12s ease-in-out;
|
||||||
|
transition-property: opacity, transform;
|
||||||
|
text-transform: uppercase;
|
||||||
|
@include PlainText;
|
||||||
|
@include S(width, 30px);
|
||||||
|
@include S(height, 30px);
|
||||||
|
|
||||||
|
@include DarkThemeInvert;
|
||||||
|
|
||||||
|
opacity: 1;
|
||||||
|
&:hover {
|
||||||
|
opacity: 0.9 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.pressed {
|
||||||
|
transform: scale(0.95) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
& {
|
||||||
|
/* @load-async */
|
||||||
|
background: uiResource("icons/state_back_button.png") center center / D(15px) no-repeat;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
175
src/css/ingame_hud/puzzle_complete_notification.scss
Normal file
@ -0,0 +1,175 @@
|
|||||||
|
#ingame_HUD_PuzzleCompleteNotification {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
overflow: auto;
|
||||||
|
pointer-events: all;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
flex-direction: column;
|
||||||
|
|
||||||
|
& {
|
||||||
|
/* @load-async */
|
||||||
|
background: rgba(#333538, 0.95) uiResource("dialog_bg_pattern.png") top left / #{D(10px)} repeat;
|
||||||
|
}
|
||||||
|
|
||||||
|
@include InlineAnimation(0.1s ease-in-out) {
|
||||||
|
0% {
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
> .dialog {
|
||||||
|
// background: rgba(#222428, 0.5);
|
||||||
|
@include S(border-radius, $globalBorderRadius);
|
||||||
|
@include S(padding, 30px);
|
||||||
|
|
||||||
|
@include InlineAnimation(0.5s ease-in-out) {
|
||||||
|
0% {
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
flex-direction: column;
|
||||||
|
color: #fff;
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
> .title {
|
||||||
|
@include SuperHeading;
|
||||||
|
text-transform: uppercase;
|
||||||
|
@include S(font-size, 30px);
|
||||||
|
@include S(margin-bottom, 40px);
|
||||||
|
color: $colorGreenBright !important;
|
||||||
|
|
||||||
|
@include InlineAnimation(0.5s ease-in-out) {
|
||||||
|
0% {
|
||||||
|
transform: translateY(-50vh);
|
||||||
|
}
|
||||||
|
50% {
|
||||||
|
transform: translateY(5vh);
|
||||||
|
}
|
||||||
|
75% {
|
||||||
|
transform: translateY(-2vh);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
> .contents {
|
||||||
|
@include InlineAnimation(0.5s ease-in-out) {
|
||||||
|
0% {
|
||||||
|
transform: translateX(-100vw);
|
||||||
|
}
|
||||||
|
50% {
|
||||||
|
transform: translateX(5vw);
|
||||||
|
}
|
||||||
|
|
||||||
|
75% {
|
||||||
|
transform: translateX(-2vw);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: flex-start;
|
||||||
|
|
||||||
|
> .stepLike {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
@include S(margin-bottom, 10px);
|
||||||
|
@include SuperSmallText;
|
||||||
|
|
||||||
|
> .buttons {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
@include S(margin, 10px, 0);
|
||||||
|
|
||||||
|
> button {
|
||||||
|
@include S(width, 60px);
|
||||||
|
@include S(height, 60px);
|
||||||
|
@include S(margin, 0, 10px);
|
||||||
|
box-sizing: border-box;
|
||||||
|
border-radius: 50%;
|
||||||
|
transition: opacity 0.12s ease-in-out, background-color 0.12s ease-in-out;
|
||||||
|
@include IncreasedClickArea(0px);
|
||||||
|
|
||||||
|
&.liked-yes {
|
||||||
|
/* @load-async */
|
||||||
|
background: uiResource("icons/puzzle_action_liked_yes.png") center 55% / 60%
|
||||||
|
no-repeat;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover:not(.active) {
|
||||||
|
opacity: 0.5 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.active {
|
||||||
|
background-color: $colorRedBright !important;
|
||||||
|
@include InlineAnimation(0.3s ease-in-out) {
|
||||||
|
0% {
|
||||||
|
transform: scale(0);
|
||||||
|
}
|
||||||
|
50% {
|
||||||
|
transform: scale(1.2);
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
transform: scale(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&:not(.active) {
|
||||||
|
opacity: 0.4;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
> .buttonBar {
|
||||||
|
display: flex;
|
||||||
|
@include S(margin-top, 20px);
|
||||||
|
|
||||||
|
button.continue {
|
||||||
|
background: #555;
|
||||||
|
}
|
||||||
|
|
||||||
|
button.menu {
|
||||||
|
background: #555;
|
||||||
|
}
|
||||||
|
|
||||||
|
button.nextPuzzle {
|
||||||
|
background-color: $colorGreenBright;
|
||||||
|
}
|
||||||
|
|
||||||
|
> button {
|
||||||
|
@include S(min-width, 100px);
|
||||||
|
@include S(padding, 8px, 16px);
|
||||||
|
@include S(margin, 0, 6px);
|
||||||
|
@include IncreasedClickArea(0px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
> .actions {
|
||||||
|
position: absolute;
|
||||||
|
@include S(bottom, 40px);
|
||||||
|
|
||||||
|
display: grid;
|
||||||
|
@include S(grid-gap, 15px);
|
||||||
|
grid-auto-flow: column;
|
||||||
|
|
||||||
|
button {
|
||||||
|
@include SuperSmallText;
|
||||||
|
}
|
||||||
|
.report {
|
||||||
|
background-color: $accentColorDark;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
24
src/css/ingame_hud/puzzle_dlc_logo.scss
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
#ingame_HUD_PuzzleDLCLogo {
|
||||||
|
position: absolute;
|
||||||
|
@include S(width, 120px);
|
||||||
|
@include S(height, 40px);
|
||||||
|
@include S(left, 40px);
|
||||||
|
@include S(top, 7px);
|
||||||
|
|
||||||
|
& {
|
||||||
|
/* @load-async */
|
||||||
|
background: uiResource("puzzle_dlc_logo.png") center center / contain no-repeat;
|
||||||
|
}
|
||||||
|
|
||||||
|
@include DarkThemeOverride {
|
||||||
|
& {
|
||||||
|
/* @load-async */
|
||||||
|
background: uiResource("puzzle_dlc_logo_inverse.png") center center / contain no-repeat;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.china {
|
||||||
|
/* @load-async */
|
||||||
|
background: uiResource("puzzle_dlc_logo_china.png") center center / contain no-repeat !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
36
src/css/ingame_hud/puzzle_editor_controls.scss
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
#ingame_HUD_PuzzleEditorControls {
|
||||||
|
position: absolute;
|
||||||
|
|
||||||
|
@include S(top, 70px);
|
||||||
|
@include S(left, 10px);
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
@include SuperDuperSmallText;
|
||||||
|
@include S(width, 200px);
|
||||||
|
|
||||||
|
> span {
|
||||||
|
@include S(margin-bottom, 10px);
|
||||||
|
|
||||||
|
strong {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@include DarkThemeInvert;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ingame_HUD_PuzzleEditorTitle {
|
||||||
|
position: absolute;
|
||||||
|
|
||||||
|
@include S(top, 18px);
|
||||||
|
left: 50%;
|
||||||
|
transform: translateX(-50%);
|
||||||
|
text-transform: uppercase;
|
||||||
|
@include Heading;
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
@include DarkThemeOverride {
|
||||||
|
color: #eee;
|
||||||
|
}
|
||||||
|
}
|
||||||
50
src/css/ingame_hud/puzzle_editor_review.scss
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
#ingame_HUD_PuzzleEditorReview {
|
||||||
|
position: absolute;
|
||||||
|
@include S(top, 17px);
|
||||||
|
@include S(right, 10px);
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: flex-end;
|
||||||
|
backdrop-filter: blur(D(1px));
|
||||||
|
padding: D(3px);
|
||||||
|
|
||||||
|
> .button {
|
||||||
|
@include ButtonText;
|
||||||
|
@include IncreasedClickArea(0px);
|
||||||
|
pointer-events: all;
|
||||||
|
cursor: pointer;
|
||||||
|
position: relative;
|
||||||
|
color: #333438;
|
||||||
|
transition: all 0.12s ease-in-out;
|
||||||
|
text-transform: uppercase;
|
||||||
|
transition-property: opacity, transform;
|
||||||
|
@include PlainText;
|
||||||
|
@include S(padding-right, 25px);
|
||||||
|
opacity: 1;
|
||||||
|
|
||||||
|
@include DarkThemeInvert;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
opacity: 0.9 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.pressed {
|
||||||
|
transform: scale(0.95) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
& {
|
||||||
|
/* @load-async */
|
||||||
|
background: uiResource("icons/state_next_button.png") right center / D(15px) no-repeat;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
> .content {
|
||||||
|
@include SuperDuperSmallText;
|
||||||
|
@include S(width, 180px);
|
||||||
|
@include S(padding-right, 25px);
|
||||||
|
text-align: right;
|
||||||
|
text-transform: uppercase;
|
||||||
|
color: $accentColorDark;
|
||||||
|
}
|
||||||
|
}
|
||||||
71
src/css/ingame_hud/puzzle_editor_settings.scss
Normal file
@ -0,0 +1,71 @@
|
|||||||
|
#ingame_HUD_PuzzleEditorSettings {
|
||||||
|
position: absolute;
|
||||||
|
background: $ingameHudBg;
|
||||||
|
@include S(padding, 10px);
|
||||||
|
@include S(bottom, 60px);
|
||||||
|
@include S(left, 10px);
|
||||||
|
|
||||||
|
@include SuperSmallText;
|
||||||
|
color: #eee;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
@include S(border-radius, $globalBorderRadius);
|
||||||
|
|
||||||
|
> .section {
|
||||||
|
> label {
|
||||||
|
text-transform: uppercase;
|
||||||
|
}
|
||||||
|
|
||||||
|
.plusMinus {
|
||||||
|
@include S(margin-top, 5px);
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 1fr auto auto auto;
|
||||||
|
align-items: center;
|
||||||
|
@include S(grid-gap, 5px);
|
||||||
|
|
||||||
|
label {
|
||||||
|
@include S(margin-right, 10px);
|
||||||
|
}
|
||||||
|
|
||||||
|
button {
|
||||||
|
@include PlainText;
|
||||||
|
@include S(padding, 0);
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
@include S(width, 15px);
|
||||||
|
@include S(height, 15px);
|
||||||
|
@include IncreasedClickArea(0px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.value {
|
||||||
|
text-align: center;
|
||||||
|
@include S(min-width, 15px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
> .buttons {
|
||||||
|
> .buttonBar {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
@include S(margin-top, 10px);
|
||||||
|
> button {
|
||||||
|
@include S(margin-right, 4px);
|
||||||
|
@include SuperSmallText;
|
||||||
|
&:last-child {
|
||||||
|
margin-right: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
> .buildingsButton {
|
||||||
|
display: grid;
|
||||||
|
align-items: center;
|
||||||
|
@include S(margin-top, 4px);
|
||||||
|
> button {
|
||||||
|
@include SuperSmallText;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
41
src/css/ingame_hud/puzzle_next.scss
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
#ingame_HUD_PuzzleNextPuzzle {
|
||||||
|
position: absolute;
|
||||||
|
@include S(top, 17px);
|
||||||
|
@include S(right, 10px);
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: flex-end;
|
||||||
|
backdrop-filter: blur(D(1px));
|
||||||
|
padding: D(3px);
|
||||||
|
|
||||||
|
> .button {
|
||||||
|
@include ButtonText;
|
||||||
|
@include IncreasedClickArea(0px);
|
||||||
|
pointer-events: all;
|
||||||
|
cursor: pointer;
|
||||||
|
position: relative;
|
||||||
|
color: #333438;
|
||||||
|
transition: all 0.12s ease-in-out;
|
||||||
|
text-transform: uppercase;
|
||||||
|
transition-property: opacity, transform;
|
||||||
|
@include PlainText;
|
||||||
|
@include S(padding-right, 25px);
|
||||||
|
opacity: 1;
|
||||||
|
|
||||||
|
@include DarkThemeInvert;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
opacity: 0.9 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.pressed {
|
||||||
|
transform: scale(0.95) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
& {
|
||||||
|
/* @load-async */
|
||||||
|
background: uiResource("icons/state_next_button.png") right center / D(15px) no-repeat;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
129
src/css/ingame_hud/puzzle_play_metadata.scss
Normal file
@ -0,0 +1,129 @@
|
|||||||
|
#ingame_HUD_PuzzlePlayMetadata {
|
||||||
|
position: absolute;
|
||||||
|
|
||||||
|
@include S(top, 70px);
|
||||||
|
@include S(left, 10px);
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
@include S(width, 200px);
|
||||||
|
|
||||||
|
> .info {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
@include SuperSmallText;
|
||||||
|
@include S(margin-bottom, 5px);
|
||||||
|
|
||||||
|
> label {
|
||||||
|
text-transform: uppercase;
|
||||||
|
@include SuperDuperSmallText;
|
||||||
|
color: $accentColorDark;
|
||||||
|
}
|
||||||
|
> span {
|
||||||
|
display: flex;
|
||||||
|
color: darken($accentColorDark, 25);
|
||||||
|
@include SuperSmallText;
|
||||||
|
@include DarkThemeOverride {
|
||||||
|
color: lighten($accentColorDark, 15);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
> .plays {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-self: end;
|
||||||
|
align-self: end;
|
||||||
|
flex-direction: row;
|
||||||
|
@include S(margin-bottom, 10px);
|
||||||
|
opacity: 0.8;
|
||||||
|
@include DarkThemeInvert;
|
||||||
|
@include DarkThemeOverride {
|
||||||
|
opacity: 0.8;
|
||||||
|
}
|
||||||
|
|
||||||
|
> .downloads {
|
||||||
|
@include SuperSmallText;
|
||||||
|
color: #000;
|
||||||
|
align-self: start;
|
||||||
|
justify-self: start;
|
||||||
|
font-weight: bold;
|
||||||
|
@include S(margin-right, 10px);
|
||||||
|
@include S(padding-left, 14px);
|
||||||
|
opacity: 0.7;
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
|
& {
|
||||||
|
/* @load-async */
|
||||||
|
background: uiResource("icons/puzzle_plays.png") #{D(2px)} center / #{D(8px)} #{D(8px)} no-repeat;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
> .likes {
|
||||||
|
@include SuperSmallText;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
color: #000;
|
||||||
|
align-self: start;
|
||||||
|
justify-self: start;
|
||||||
|
font-weight: bold;
|
||||||
|
@include S(padding-left, 14px);
|
||||||
|
opacity: 0.7;
|
||||||
|
& {
|
||||||
|
/* @load-async */
|
||||||
|
background: uiResource("icons/puzzle_upvotes.png") #{D(2px)} center / #{D(8px)} #{D(8px)} no-repeat;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
> .key {
|
||||||
|
button {
|
||||||
|
@include S(margin-top, 2px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
button {
|
||||||
|
@include SuperSmallText;
|
||||||
|
align-self: start;
|
||||||
|
@include S(min-width, 50px);
|
||||||
|
|
||||||
|
&.report {
|
||||||
|
background-color: $accentColorDark;
|
||||||
|
@include SuperDuperSmallText;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
> .buttons {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
|
||||||
|
> button {
|
||||||
|
@include S(margin-bottom, 4px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#ingame_HUD_PuzzlePlayTitle {
|
||||||
|
position: absolute;
|
||||||
|
|
||||||
|
@include S(top, 18px);
|
||||||
|
left: 50%;
|
||||||
|
transform: translateX(-50%);
|
||||||
|
text-transform: uppercase;
|
||||||
|
@include Heading;
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
|
||||||
|
> .name {
|
||||||
|
@include PlainText;
|
||||||
|
opacity: 0.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
@include DarkThemeOverride {
|
||||||
|
color: #eee;
|
||||||
|
}
|
||||||
|
}
|
||||||
23
src/css/ingame_hud/puzzle_play_settings.scss
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
#ingame_HUD_PuzzlePlaySettings {
|
||||||
|
position: absolute;
|
||||||
|
background: $ingameHudBg;
|
||||||
|
@include S(padding, 10px);
|
||||||
|
@include S(bottom, 60px);
|
||||||
|
@include S(left, 10px);
|
||||||
|
|
||||||
|
@include SuperSmallText;
|
||||||
|
color: #eee;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
@include S(border-radius, $globalBorderRadius);
|
||||||
|
|
||||||
|
> .section {
|
||||||
|
display: grid;
|
||||||
|
@include S(grid-gap, 5px);
|
||||||
|
grid-auto-flow: row;
|
||||||
|
|
||||||
|
> button {
|
||||||
|
@include SuperSmallText;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -21,6 +21,7 @@
|
|||||||
@import "adinplay";
|
@import "adinplay";
|
||||||
@import "changelog_skins";
|
@import "changelog_skins";
|
||||||
|
|
||||||
|
@import "states/wegame_splash";
|
||||||
@import "states/preload";
|
@import "states/preload";
|
||||||
@import "states/main_menu";
|
@import "states/main_menu";
|
||||||
@import "states/ingame";
|
@import "states/ingame";
|
||||||
@ -29,6 +30,7 @@
|
|||||||
@import "states/about";
|
@import "states/about";
|
||||||
@import "states/mobile_warning";
|
@import "states/mobile_warning";
|
||||||
@import "states/changelog";
|
@import "states/changelog";
|
||||||
|
@import "states/puzzle_menu";
|
||||||
|
|
||||||
@import "ingame_hud/buildings_toolbar";
|
@import "ingame_hud/buildings_toolbar";
|
||||||
@import "ingame_hud/building_placer";
|
@import "ingame_hud/building_placer";
|
||||||
@ -55,12 +57,22 @@
|
|||||||
@import "ingame_hud/sandbox_controller";
|
@import "ingame_hud/sandbox_controller";
|
||||||
@import "ingame_hud/standalone_advantages";
|
@import "ingame_hud/standalone_advantages";
|
||||||
@import "ingame_hud/cat_memes";
|
@import "ingame_hud/cat_memes";
|
||||||
|
@import "ingame_hud/puzzle_back_to_menu";
|
||||||
|
@import "ingame_hud/puzzle_editor_review";
|
||||||
|
@import "ingame_hud/puzzle_dlc_logo";
|
||||||
|
@import "ingame_hud/puzzle_editor_controls";
|
||||||
|
@import "ingame_hud/puzzle_editor_settings";
|
||||||
|
@import "ingame_hud/puzzle_play_settings";
|
||||||
|
@import "ingame_hud/puzzle_play_metadata";
|
||||||
|
@import "ingame_hud/puzzle_complete_notification";
|
||||||
|
@import "ingame_hud/puzzle_next";
|
||||||
|
|
||||||
// prettier-ignore
|
// prettier-ignore
|
||||||
$elements:
|
$elements:
|
||||||
// Base
|
// Base
|
||||||
ingame_Canvas,
|
ingame_Canvas,
|
||||||
ingame_VignetteOverlay,
|
ingame_VignetteOverlay,
|
||||||
|
ingame_HUD_PuzzleDLCLogo,
|
||||||
|
|
||||||
// Ingame overlays
|
// Ingame overlays
|
||||||
ingame_HUD_Waypoints,
|
ingame_HUD_Waypoints,
|
||||||
@ -71,6 +83,15 @@ ingame_HUD_PlacerVariants,
|
|||||||
ingame_HUD_PinnedShapes,
|
ingame_HUD_PinnedShapes,
|
||||||
ingame_HUD_GameMenu,
|
ingame_HUD_GameMenu,
|
||||||
ingame_HUD_KeybindingOverlay,
|
ingame_HUD_KeybindingOverlay,
|
||||||
|
ingame_HUD_PuzzleBackToMenu,
|
||||||
|
ingame_HUD_PuzzleNextPuzzle,
|
||||||
|
ingame_HUD_PuzzleEditorReview,
|
||||||
|
ingame_HUD_PuzzleEditorControls,
|
||||||
|
ingame_HUD_PuzzleEditorTitle,
|
||||||
|
ingame_HUD_PuzzleEditorSettings,
|
||||||
|
ingame_HUD_PuzzlePlaySettings,
|
||||||
|
ingame_HUD_PuzzlePlayMetadata,
|
||||||
|
ingame_HUD_PuzzlePlayTitle,
|
||||||
ingame_HUD_Notifications,
|
ingame_HUD_Notifications,
|
||||||
ingame_HUD_DebugInfo,
|
ingame_HUD_DebugInfo,
|
||||||
ingame_HUD_EntityDebugger,
|
ingame_HUD_EntityDebugger,
|
||||||
@ -94,6 +115,7 @@ ingame_HUD_Statistics,
|
|||||||
ingame_HUD_ShapeViewer,
|
ingame_HUD_ShapeViewer,
|
||||||
ingame_HUD_StandaloneAdvantages,
|
ingame_HUD_StandaloneAdvantages,
|
||||||
ingame_HUD_UnlockNotification,
|
ingame_HUD_UnlockNotification,
|
||||||
|
ingame_HUD_PuzzleCompleteNotification,
|
||||||
ingame_HUD_SettingsMenu,
|
ingame_HUD_SettingsMenu,
|
||||||
ingame_HUD_ModalDialogs,
|
ingame_HUD_ModalDialogs,
|
||||||
ingame_HUD_CatMemes;
|
ingame_HUD_CatMemes;
|
||||||
@ -113,6 +135,9 @@ body.uiHidden {
|
|||||||
#ingame_HUD_PlacementHints,
|
#ingame_HUD_PlacementHints,
|
||||||
#ingame_HUD_GameMenu,
|
#ingame_HUD_GameMenu,
|
||||||
#ingame_HUD_PinnedShapes,
|
#ingame_HUD_PinnedShapes,
|
||||||
|
#ingame_HUD_PuzzleBackToMenu,
|
||||||
|
#ingame_HUD_PuzzleNextPuzzle,
|
||||||
|
#ingame_HUD_PuzzleEditorReview,
|
||||||
#ingame_HUD_Notifications,
|
#ingame_HUD_Notifications,
|
||||||
#ingame_HUD_TutorialHints,
|
#ingame_HUD_TutorialHints,
|
||||||
#ingame_HUD_Waypoints,
|
#ingame_HUD_Waypoints,
|
||||||
|
|||||||
@ -15,15 +15,15 @@ $hardwareAcc: null;
|
|||||||
// ----------------------------------------
|
// ----------------------------------------
|
||||||
/** Increased click area for this element, helpful on mobile */
|
/** Increased click area for this element, helpful on mobile */
|
||||||
@mixin IncreasedClickArea($size) {
|
@mixin IncreasedClickArea($size) {
|
||||||
&::after {
|
// &::after {
|
||||||
content: "";
|
// content: "";
|
||||||
position: absolute;
|
// position: absolute;
|
||||||
top: #{D(-$size)};
|
// top: #{D(-$size)};
|
||||||
bottom: #{D(-$size)};
|
// bottom: #{D(-$size)};
|
||||||
left: #{D(-$size)};
|
// left: #{D(-$size)};
|
||||||
right: #{D(-$size)};
|
// right: #{D(-$size)};
|
||||||
// background: rgba(255, 0, 0, 0.3);
|
// // background: rgba(255, 0, 0, 0.3);
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
button,
|
button,
|
||||||
.increasedClickArea {
|
.increasedClickArea {
|
||||||
|
|||||||
@ -1,11 +1,13 @@
|
|||||||
$buildings: belt, cutter, miner, mixer, painter, rotater, balancer, stacker, trash, underground_belt, wire,
|
$buildings: belt, cutter, miner, mixer, painter, rotater, balancer, stacker, trash, underground_belt, wire,
|
||||||
constant_signal, logic_gate, lever, filter, wire_tunnel, display, virtual_processor, reader, storage,
|
constant_signal, logic_gate, lever, filter, wire_tunnel, display, virtual_processor, reader, storage,
|
||||||
transistor, analyzer, comparator, item_producer;
|
transistor, analyzer, comparator, item_producer, constant_producer, goal_acceptor, block;
|
||||||
|
|
||||||
@each $building in $buildings {
|
@each $building in $buildings {
|
||||||
[data-icon="building_icons/#{$building}.png"] {
|
[data-icon="building_icons/#{$building}.png"] {
|
||||||
/* @load-async */
|
/* @load-async */
|
||||||
background-image: uiResource("res/ui/building_icons/#{$building}.png") !important;
|
.icon {
|
||||||
|
background-image: uiResource("res/ui/building_icons/#{$building}.png") !important;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -13,7 +15,8 @@ $buildingsAndVariants: belt, balancer, underground_belt, underground_belt-tier2,
|
|||||||
cutter, cutter-quad, rotater, rotater-ccw, stacker, mixer, painter-double, painter-quad, trash, storage,
|
cutter, cutter-quad, rotater, rotater-ccw, stacker, mixer, painter-double, painter-quad, trash, storage,
|
||||||
reader, rotater-rotate180, display, constant_signal, wire, wire_tunnel, logic_gate-or, logic_gate-not,
|
reader, rotater-rotate180, display, constant_signal, wire, wire_tunnel, logic_gate-or, logic_gate-not,
|
||||||
logic_gate-xor, analyzer, virtual_processor-rotater, virtual_processor-unstacker, item_producer,
|
logic_gate-xor, analyzer, virtual_processor-rotater, virtual_processor-unstacker, item_producer,
|
||||||
virtual_processor-stacker, virtual_processor-painter, wire-second, painter, painter-mirrored, comparator;
|
constant_producer, virtual_processor-stacker, virtual_processor-painter, wire-second, painter,
|
||||||
|
painter-mirrored, comparator, goal_acceptor, block;
|
||||||
@each $building in $buildingsAndVariants {
|
@each $building in $buildingsAndVariants {
|
||||||
[data-icon="building_tutorials/#{$building}.png"] {
|
[data-icon="building_tutorials/#{$building}.png"] {
|
||||||
/* @load-async */
|
/* @load-async */
|
||||||
@ -67,7 +70,7 @@ $icons: notification_saved, notification_success, notification_upgrade;
|
|||||||
}
|
}
|
||||||
|
|
||||||
$languages: en, de, cs, da, et, es-419, fr, it, pt-BR, sv, tr, el, ru, uk, zh-TW, zh-CN, nb, mt-MT, ar, nl, vi,
|
$languages: en, de, cs, da, et, es-419, fr, it, pt-BR, sv, tr, el, ru, uk, zh-TW, zh-CN, nb, mt-MT, ar, nl, vi,
|
||||||
th, hu, pl, ja, kor, no, pt-PT, fi, ro;
|
th, hu, pl, ja, kor, no, pt-PT, fi, ro, he;
|
||||||
|
|
||||||
@each $language in $languages {
|
@each $language in $languages {
|
||||||
[data-languageicon="#{$language}"] {
|
[data-languageicon="#{$language}"] {
|
||||||
|
|||||||
@ -88,9 +88,11 @@
|
|||||||
|
|
||||||
@include S(grid-column-gap, 10px);
|
@include S(grid-column-gap, 10px);
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 1fr;
|
|
||||||
|
|
||||||
&.demo {
|
&[data-columns="1"] {
|
||||||
|
grid-template-columns: 1fr;
|
||||||
|
}
|
||||||
|
&[data-columns="2"] {
|
||||||
grid-template-columns: 1fr 1fr;
|
grid-template-columns: 1fr 1fr;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -183,7 +185,7 @@
|
|||||||
.updateLabel {
|
.updateLabel {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
transform: translateX(50%) rotate(-5deg);
|
transform: translateX(50%) rotate(-5deg);
|
||||||
color: #3291e9;
|
color: #ff590b;
|
||||||
@include Heading;
|
@include Heading;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
@include S(right, 40px);
|
@include S(right, 40px);
|
||||||
@ -223,9 +225,75 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.puzzleContainer {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
flex-direction: column;
|
||||||
|
background: $colorBlueBright;
|
||||||
|
grid-row: 1 / 2;
|
||||||
|
grid-column: 2 / 3;
|
||||||
|
position: relative;
|
||||||
|
@include S(padding, 20px);
|
||||||
|
@include S(border-radius, $globalBorderRadius);
|
||||||
|
|
||||||
|
> .badge {
|
||||||
|
color: #fff;
|
||||||
|
text-transform: uppercase;
|
||||||
|
font-weight: bold;
|
||||||
|
position: absolute;
|
||||||
|
@include S(top, 10px);
|
||||||
|
@include S(right, 10px);
|
||||||
|
|
||||||
|
transform: translateX(50%) rotate(10deg);
|
||||||
|
@include Heading;
|
||||||
|
font-weight: bold;
|
||||||
|
|
||||||
|
@include InlineAnimation(1.3s ease-in-out infinite) {
|
||||||
|
50% {
|
||||||
|
transform: translateX(50%) rotate(12deg) scale(1.1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
> .hint {
|
||||||
|
@include SuperDuperSmallText;
|
||||||
|
@include S(margin-top, 10px);
|
||||||
|
@include S(width, 200px);
|
||||||
|
}
|
||||||
|
|
||||||
|
> .dlcLogo {
|
||||||
|
@include S(width, 190px);
|
||||||
|
}
|
||||||
|
|
||||||
|
> button {
|
||||||
|
@include S(margin-top, 20px);
|
||||||
|
@include Heading;
|
||||||
|
@include S(padding, 10px, 30px);
|
||||||
|
background-color: #333;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.notOwned {
|
||||||
|
p {
|
||||||
|
@include PlainText;
|
||||||
|
color: #333;
|
||||||
|
@include S(margin-top, 10px);
|
||||||
|
@include S(width, 190px);
|
||||||
|
}
|
||||||
|
> button {
|
||||||
|
box-sizing: border-box;
|
||||||
|
@include S(margin-top, 10px);
|
||||||
|
@include S(width, 190px);
|
||||||
|
@include S(padding, 10px, 20px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.mainContainer {
|
.mainContainer {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
grid-row: 1 / 2;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
background: #fafafa;
|
background: #fafafa;
|
||||||
@ -242,6 +310,16 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.modeButtons {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(2, 1fr);
|
||||||
|
@include S(grid-column-gap, 10px);
|
||||||
|
align-items: start;
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
|
||||||
.browserWarning {
|
.browserWarning {
|
||||||
@include S(margin-bottom, 10px);
|
@include S(margin-bottom, 10px);
|
||||||
background-color: $colorRedBright;
|
background-color: $colorRedBright;
|
||||||
@ -285,6 +363,18 @@
|
|||||||
@include S(margin-left, 15px);
|
@include S(margin-left, 15px);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.playModeButton {
|
||||||
|
@include IncreasedClickArea(0px);
|
||||||
|
@include S(margin-top, 15px);
|
||||||
|
@include S(margin-left, 15px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.editModeButton {
|
||||||
|
@include IncreasedClickArea(0px);
|
||||||
|
@include S(margin-top, 15px);
|
||||||
|
@include S(margin-left, 15px);
|
||||||
|
}
|
||||||
|
|
||||||
.savegames {
|
.savegames {
|
||||||
@include S(max-height, 105px);
|
@include S(max-height, 105px);
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
@ -439,6 +529,37 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.bottomContainer {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
flex-direction: row;
|
||||||
|
@include S(padding-top, 10px);
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
|
||||||
|
.buttons {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(2, 1fr);
|
||||||
|
@include S(grid-column-gap, 10px);
|
||||||
|
align-items: start;
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#crosspromo {
|
||||||
|
position: absolute;
|
||||||
|
@include S(bottom, 50px);
|
||||||
|
@include S(right, 20px);
|
||||||
|
@include S(width, 190px);
|
||||||
|
@include S(height, 100px);
|
||||||
|
pointer-events: all;
|
||||||
|
border: 0;
|
||||||
|
}
|
||||||
|
|
||||||
.footer {
|
.footer {
|
||||||
display: grid;
|
display: grid;
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
@ -450,10 +571,45 @@
|
|||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
@include S(grid-gap, 4px);
|
@include S(grid-gap, 4px);
|
||||||
|
|
||||||
&.china {
|
&.noLinks {
|
||||||
grid-template-columns: auto 1fr;
|
grid-template-columns: auto 1fr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&.wegameDisclaimer {
|
||||||
|
@include SuperSmallText;
|
||||||
|
display: grid;
|
||||||
|
justify-content: center;
|
||||||
|
grid-template-columns: 1fr auto 1fr;
|
||||||
|
text-align: center;
|
||||||
|
|
||||||
|
> .disclaimer {
|
||||||
|
grid-column: 2 / 3;
|
||||||
|
|
||||||
|
@include DarkThemeOverride {
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
> .rating {
|
||||||
|
grid-column: 3 / 4;
|
||||||
|
justify-self: end;
|
||||||
|
align-self: end;
|
||||||
|
|
||||||
|
@include S(width, 32px);
|
||||||
|
@include S(height, 40px);
|
||||||
|
background: green;
|
||||||
|
cursor: pointer !important;
|
||||||
|
pointer-events: all;
|
||||||
|
@include S(border-radius, 4px);
|
||||||
|
overflow: hidden;
|
||||||
|
|
||||||
|
& {
|
||||||
|
/* @load-async */
|
||||||
|
background: #fff uiResource("wegame_isbn_rating.jpg") center center / contain no-repeat;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.author {
|
.author {
|
||||||
flex-grow: 1;
|
flex-grow: 1;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
|
|||||||
@ -17,7 +17,7 @@
|
|||||||
@include S(border-radius, 3px);
|
@include S(border-radius, 3px);
|
||||||
|
|
||||||
@include DarkThemeOverride {
|
@include DarkThemeOverride {
|
||||||
background: #424242;
|
background: #33343c;
|
||||||
}
|
}
|
||||||
|
|
||||||
.version {
|
.version {
|
||||||
|
|||||||
382
src/css/states/puzzle_menu.scss
Normal file
@ -0,0 +1,382 @@
|
|||||||
|
#state_PuzzleMenuState {
|
||||||
|
> .headerBar {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 1fr auto;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
> h1 {
|
||||||
|
justify-self: start;
|
||||||
|
}
|
||||||
|
|
||||||
|
.createPuzzle {
|
||||||
|
background-color: $colorGreenBright;
|
||||||
|
@include S(margin-left, 5px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
> .container {
|
||||||
|
.searchForm {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
|
color: #333;
|
||||||
|
background: $accentColorBright;
|
||||||
|
@include S(padding, 5px);
|
||||||
|
@include S(border-radius, $globalBorderRadius);
|
||||||
|
flex-wrap: wrap;
|
||||||
|
|
||||||
|
@include DarkThemeOverride {
|
||||||
|
background: $accentColorDark;
|
||||||
|
}
|
||||||
|
|
||||||
|
input.search {
|
||||||
|
color: #333;
|
||||||
|
margin: 0;
|
||||||
|
display: inline-block;
|
||||||
|
flex-grow: 1;
|
||||||
|
@include S(padding, 5px, 10px);
|
||||||
|
@include S(min-width, 50px);
|
||||||
|
|
||||||
|
&::placeholder {
|
||||||
|
color: #aaa;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
select {
|
||||||
|
color: #333;
|
||||||
|
border: 0;
|
||||||
|
@include S(padding, 5px);
|
||||||
|
@include S(border-radius, $globalBorderRadius);
|
||||||
|
@include S(padding, 7px, 10px);
|
||||||
|
@include S(margin-left, 5px);
|
||||||
|
@include PlainText;
|
||||||
|
}
|
||||||
|
|
||||||
|
.filterCompleted {
|
||||||
|
@include S(margin-left, 20px);
|
||||||
|
pointer-events: all;
|
||||||
|
cursor: pointer;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
text-transform: uppercase;
|
||||||
|
@include PlainText;
|
||||||
|
@include S(margin-right, 10px);
|
||||||
|
|
||||||
|
@include DarkThemeOverride {
|
||||||
|
color: #bbbbc4;
|
||||||
|
}
|
||||||
|
|
||||||
|
input {
|
||||||
|
@include S(width, 15px);
|
||||||
|
@include S(height, 15px);
|
||||||
|
@include S(margin-right, 5px);
|
||||||
|
@include S(border-radius, $globalBorderRadius);
|
||||||
|
border: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
button[type="submit"] {
|
||||||
|
@include S(padding, 7px, 10px, 5px);
|
||||||
|
@include S(margin-left, 20px);
|
||||||
|
@include S(margin-top, 4px);
|
||||||
|
@include S(margin-bottom, 4px);
|
||||||
|
margin-left: auto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
> .mainContent {
|
||||||
|
overflow: hidden;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
|
||||||
|
> .categoryChooser {
|
||||||
|
> .categories {
|
||||||
|
display: grid;
|
||||||
|
grid-auto-columns: 1fr;
|
||||||
|
grid-auto-flow: column;
|
||||||
|
@include S(grid-gap, 2px);
|
||||||
|
@include S(padding-right, 10px);
|
||||||
|
@include S(margin-bottom, 5px);
|
||||||
|
|
||||||
|
.category {
|
||||||
|
background: $accentColorBright;
|
||||||
|
border-radius: 0;
|
||||||
|
color: $accentColorDark;
|
||||||
|
transition: all 0.12s ease-in-out;
|
||||||
|
transition-property: opacity, background-color, color;
|
||||||
|
|
||||||
|
&:first-child {
|
||||||
|
@include S(border-top-left-radius, $globalBorderRadius);
|
||||||
|
@include S(border-bottom-left-radius, $globalBorderRadius);
|
||||||
|
}
|
||||||
|
&:last-child {
|
||||||
|
border-top-right-radius: $globalBorderRadius;
|
||||||
|
border-bottom-right-radius: $globalBorderRadius;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.active {
|
||||||
|
background: $colorBlueBright;
|
||||||
|
opacity: 1 !important;
|
||||||
|
color: #fff;
|
||||||
|
cursor: default;
|
||||||
|
}
|
||||||
|
|
||||||
|
@include DarkThemeOverride {
|
||||||
|
background: $accentColorDark;
|
||||||
|
color: #bbbbc4;
|
||||||
|
|
||||||
|
&.active {
|
||||||
|
background: $colorBlueBright;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.root {
|
||||||
|
@include S(padding-top, 10px);
|
||||||
|
@include S(padding-bottom, 10px);
|
||||||
|
@include Text;
|
||||||
|
}
|
||||||
|
&.child {
|
||||||
|
@include PlainText;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
> .puzzles {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(auto-fit, minmax(D(240px), 1fr));
|
||||||
|
@include S(grid-auto-rows, 65px);
|
||||||
|
@include S(grid-gap, 7px);
|
||||||
|
@include S(margin-top, 10px);
|
||||||
|
@include S(padding-right, 4px);
|
||||||
|
overflow-y: scroll;
|
||||||
|
flex-grow: 1;
|
||||||
|
pointer-events: all;
|
||||||
|
position: relative;
|
||||||
|
|
||||||
|
> .puzzle {
|
||||||
|
width: 100%;
|
||||||
|
@include S(height, 65px);
|
||||||
|
background: #f3f3f8;
|
||||||
|
@include S(border-radius, $globalBorderRadius);
|
||||||
|
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: auto 1fr;
|
||||||
|
grid-template-rows: D(15px) D(15px) 1fr;
|
||||||
|
@include S(padding, 5px);
|
||||||
|
@include S(grid-column-gap, 5px);
|
||||||
|
box-sizing: border-box;
|
||||||
|
pointer-events: all;
|
||||||
|
cursor: pointer;
|
||||||
|
position: relative;
|
||||||
|
@include S(padding-left, 10px);
|
||||||
|
|
||||||
|
@include DarkThemeOverride {
|
||||||
|
background: rgba(0, 0, 10, 0.2);
|
||||||
|
}
|
||||||
|
|
||||||
|
@include InlineAnimation(0.12s ease-in-out) {
|
||||||
|
0% {
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background: #f0f0f8;
|
||||||
|
}
|
||||||
|
|
||||||
|
> .title {
|
||||||
|
grid-column: 2 / 3;
|
||||||
|
grid-row: 1 / 2;
|
||||||
|
@include PlainText;
|
||||||
|
white-space: nowrap;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
overflow: hidden;
|
||||||
|
align-self: center;
|
||||||
|
justify-self: start;
|
||||||
|
width: 100%;
|
||||||
|
box-sizing: border-box;
|
||||||
|
@include S(padding, 2px, 5px);
|
||||||
|
@include S(height, 17px);
|
||||||
|
}
|
||||||
|
|
||||||
|
> .author {
|
||||||
|
grid-column: 2 / 2;
|
||||||
|
grid-row: 2 / 3;
|
||||||
|
@include SuperSmallText;
|
||||||
|
color: $accentColorDark;
|
||||||
|
align-self: center;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
white-space: nowrap;
|
||||||
|
@include S(padding, 2px, 5px);
|
||||||
|
}
|
||||||
|
|
||||||
|
> .icon {
|
||||||
|
grid-column: 1 / 2;
|
||||||
|
grid-row: 1 / 4;
|
||||||
|
align-self: center;
|
||||||
|
justify-self: center;
|
||||||
|
@include S(width, 45px);
|
||||||
|
@include S(height, 45px);
|
||||||
|
|
||||||
|
canvas {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
> button.delete {
|
||||||
|
position: absolute;
|
||||||
|
@include S(top, 5px);
|
||||||
|
@include S(right, 5px);
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: center center;
|
||||||
|
background-size: 70%;
|
||||||
|
background-color: transparent !important;
|
||||||
|
@include S(width, 20px);
|
||||||
|
@include S(height, 20px);
|
||||||
|
padding: 0;
|
||||||
|
opacity: 0.7;
|
||||||
|
@include DarkThemeInvert;
|
||||||
|
|
||||||
|
& {
|
||||||
|
/* @load-async */
|
||||||
|
background-image: uiResource("icons/delete.png") !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
> .stats {
|
||||||
|
grid-column: 2 / 3;
|
||||||
|
grid-row: 3 / 4;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-self: end;
|
||||||
|
justify-content: center;
|
||||||
|
align-self: end;
|
||||||
|
@include S(height, 14px);
|
||||||
|
|
||||||
|
> .downloads {
|
||||||
|
@include SuperSmallText;
|
||||||
|
color: #000;
|
||||||
|
font-weight: bold;
|
||||||
|
@include S(margin-right, 5px);
|
||||||
|
@include S(padding-left, 12px);
|
||||||
|
opacity: 0.7;
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
@include DarkThemeInvert;
|
||||||
|
|
||||||
|
& {
|
||||||
|
/* @load-async */
|
||||||
|
background: uiResource("icons/puzzle_plays.png") #{D(2px)} #{D(2.5px)} / #{D(
|
||||||
|
8px
|
||||||
|
)} #{D(8px)} no-repeat;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
> .likes {
|
||||||
|
@include SuperSmallText;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
color: #000;
|
||||||
|
font-weight: bold;
|
||||||
|
@include S(padding-left, 14px);
|
||||||
|
opacity: 0.7;
|
||||||
|
@include DarkThemeInvert;
|
||||||
|
|
||||||
|
& {
|
||||||
|
/* @load-async */
|
||||||
|
background: uiResource("icons/puzzle_upvotes.png") #{D(2px)} #{D(2.4px)} / #{D(
|
||||||
|
9px
|
||||||
|
)} #{D(9px)} no-repeat;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
> .difficulty {
|
||||||
|
@include SuperSmallText;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
color: #000;
|
||||||
|
font-weight: bold;
|
||||||
|
@include S(margin-right, 3px);
|
||||||
|
opacity: 0.7;
|
||||||
|
text-transform: uppercase;
|
||||||
|
|
||||||
|
&.stage--easy {
|
||||||
|
color: $colorGreenBright;
|
||||||
|
}
|
||||||
|
&.stage--medium {
|
||||||
|
color: $colorOrangeBright;
|
||||||
|
}
|
||||||
|
&.stage--hard {
|
||||||
|
color: $colorRedBright;
|
||||||
|
}
|
||||||
|
&.stage--unknown {
|
||||||
|
color: #888;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&.completed {
|
||||||
|
> .icon,
|
||||||
|
> .stats,
|
||||||
|
> .author,
|
||||||
|
> .title {
|
||||||
|
opacity: 0.3;
|
||||||
|
}
|
||||||
|
|
||||||
|
background: #fafafa;
|
||||||
|
|
||||||
|
@include DarkThemeOverride {
|
||||||
|
background: rgba(0, 0, 0, 0.05);
|
||||||
|
}
|
||||||
|
|
||||||
|
&::after {
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
@include S(top, 10px);
|
||||||
|
@include S(right, 10px);
|
||||||
|
@include S(width, 30px);
|
||||||
|
@include S(height, 30px);
|
||||||
|
opacity: 0.1;
|
||||||
|
|
||||||
|
& {
|
||||||
|
/* @load-async */
|
||||||
|
background: uiResource("icons/puzzle_complete_indicator.png") center center /
|
||||||
|
contain no-repeat;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@include DarkThemeOverride {
|
||||||
|
&::after {
|
||||||
|
/* @load-async */
|
||||||
|
background: uiResource("icons/puzzle_complete_indicator_inverse.png") center
|
||||||
|
center / contain no-repeat;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
> .loader,
|
||||||
|
> .empty {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
color: $accentColorDark;
|
||||||
|
justify-content: center;
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -50,7 +50,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
button.categoryButton,
|
button.categoryButton,
|
||||||
button.about {
|
button.about,
|
||||||
|
button.privacy {
|
||||||
background-color: $colorCategoryButton;
|
background-color: $colorCategoryButton;
|
||||||
color: #777a7f;
|
color: #777a7f;
|
||||||
|
|
||||||
@ -68,6 +69,10 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
button.privacy {
|
||||||
|
@include S(margin-top, 4px);
|
||||||
|
}
|
||||||
|
|
||||||
.versionbar {
|
.versionbar {
|
||||||
@include S(margin-top, 10px);
|
@include S(margin-top, 10px);
|
||||||
|
|
||||||
@ -180,7 +185,8 @@
|
|||||||
.container .content {
|
.container .content {
|
||||||
.sidebar {
|
.sidebar {
|
||||||
button.categoryButton,
|
button.categoryButton,
|
||||||
button.about {
|
button.about,
|
||||||
|
button.privacy {
|
||||||
color: #ccc;
|
color: #ccc;
|
||||||
background-color: darken($darkModeControlsBackground, 5);
|
background-color: darken($darkModeControlsBackground, 5);
|
||||||
|
|
||||||
|
|||||||
38
src/css/states/wegame_splash.scss
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
#state_WegameSplashState {
|
||||||
|
background: #000 !important;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
|
.wrapper {
|
||||||
|
opacity: 0;
|
||||||
|
@include InlineAnimation(5.9s ease-in-out) {
|
||||||
|
0% {
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
20% {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
90% {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
100% {
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
text-align: center;
|
||||||
|
color: #fff;
|
||||||
|
@include Heading;
|
||||||
|
|
||||||
|
strong {
|
||||||
|
display: block;
|
||||||
|
@include SuperHeading;
|
||||||
|
@include S(margin-bottom, 20px);
|
||||||
|
}
|
||||||
|
|
||||||
|
div {
|
||||||
|
@include S(margin-bottom, 10px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -18,8 +18,10 @@ $textLineHeight: 21px;
|
|||||||
$plainTextFontSize: 13px;
|
$plainTextFontSize: 13px;
|
||||||
$plainTextLineHeight: 17px;
|
$plainTextLineHeight: 17px;
|
||||||
|
|
||||||
$supersmallTextFontSize: 10px;
|
$superDuperSmallTextFontSize: 8px;
|
||||||
$supersmallTextLineHeight: 13px;
|
$superDuperSmallTextLineHeight: 9px;
|
||||||
|
$superSmallTextFontSize: 10px;
|
||||||
|
$superSmallTextLineHeight: 13px;
|
||||||
$buttonFontSize: 14px;
|
$buttonFontSize: 14px;
|
||||||
$buttonLineHeight: 18px;
|
$buttonLineHeight: 18px;
|
||||||
|
|
||||||
@ -33,6 +35,7 @@ $accentColorDark: #7d808a;
|
|||||||
$colorGreenBright: #66bb6a;
|
$colorGreenBright: #66bb6a;
|
||||||
$colorBlueBright: rgb(74, 151, 223);
|
$colorBlueBright: rgb(74, 151, 223);
|
||||||
$colorRedBright: #ef5072;
|
$colorRedBright: #ef5072;
|
||||||
|
$colorOrangeBright: #ef9d50;
|
||||||
$themeColor: #393747;
|
$themeColor: #393747;
|
||||||
$ingameHudBg: rgba(#333438, 0.9);
|
$ingameHudBg: rgba(#333438, 0.9);
|
||||||
|
|
||||||
@ -76,8 +79,16 @@ $mainFontScale: 1;
|
|||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@mixin SuperDuperSmallText {
|
||||||
|
@include ScaleFont($superDuperSmallTextFontSize, $superDuperSmallTextLineHeight);
|
||||||
|
font-weight: $mainFontWeight;
|
||||||
|
font-family: $mainFont;
|
||||||
|
letter-spacing: $mainFontSpacing;
|
||||||
|
@include DebugText(green);
|
||||||
|
}
|
||||||
|
|
||||||
@mixin SuperSmallText {
|
@mixin SuperSmallText {
|
||||||
@include ScaleFont($supersmallTextFontSize, $supersmallTextLineHeight);
|
@include ScaleFont($superSmallTextFontSize, $superSmallTextLineHeight);
|
||||||
font-weight: $mainFontWeight;
|
font-weight: $mainFontWeight;
|
||||||
font-family: $mainFont;
|
font-family: $mainFont;
|
||||||
letter-spacing: $mainFontSpacing;
|
letter-spacing: $mainFontSpacing;
|
||||||
|
|||||||
@ -31,6 +31,10 @@ import { PreloadState } from "./states/preload";
|
|||||||
import { SettingsState } from "./states/settings";
|
import { SettingsState } from "./states/settings";
|
||||||
import { ShapezGameAnalytics } from "./platform/browser/game_analytics";
|
import { ShapezGameAnalytics } from "./platform/browser/game_analytics";
|
||||||
import { RestrictionManager } from "./core/restriction_manager";
|
import { RestrictionManager } from "./core/restriction_manager";
|
||||||
|
import { PuzzleMenuState } from "./states/puzzle_menu";
|
||||||
|
import { ClientAPI } from "./platform/api";
|
||||||
|
import { LoginState } from "./states/login";
|
||||||
|
import { WegameSplashState } from "./states/wegame_splash";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @typedef {import("./platform/achievement_provider").AchievementProviderInterface} AchievementProviderInterface
|
* @typedef {import("./platform/achievement_provider").AchievementProviderInterface} AchievementProviderInterface
|
||||||
@ -72,6 +76,7 @@ export class Application {
|
|||||||
this.savegameMgr = new SavegameManager(this);
|
this.savegameMgr = new SavegameManager(this);
|
||||||
this.inputMgr = new InputDistributor(this);
|
this.inputMgr = new InputDistributor(this);
|
||||||
this.backgroundResourceLoader = new BackgroundResourcesLoader(this);
|
this.backgroundResourceLoader = new BackgroundResourcesLoader(this);
|
||||||
|
this.clientApi = new ClientAPI(this);
|
||||||
|
|
||||||
// Restrictions (Like demo etc)
|
// Restrictions (Like demo etc)
|
||||||
this.restrictionMgr = new RestrictionManager(this);
|
this.restrictionMgr = new RestrictionManager(this);
|
||||||
@ -151,6 +156,7 @@ export class Application {
|
|||||||
registerStates() {
|
registerStates() {
|
||||||
/** @type {Array<typeof GameState>} */
|
/** @type {Array<typeof GameState>} */
|
||||||
const states = [
|
const states = [
|
||||||
|
WegameSplashState,
|
||||||
PreloadState,
|
PreloadState,
|
||||||
MobileWarningState,
|
MobileWarningState,
|
||||||
MainMenuState,
|
MainMenuState,
|
||||||
@ -159,6 +165,8 @@ export class Application {
|
|||||||
KeybindingsState,
|
KeybindingsState,
|
||||||
AboutState,
|
AboutState,
|
||||||
ChangelogState,
|
ChangelogState,
|
||||||
|
PuzzleMenuState,
|
||||||
|
LoginState,
|
||||||
];
|
];
|
||||||
|
|
||||||
for (let i = 0; i < states.length; ++i) {
|
for (let i = 0; i < states.length; ++i) {
|
||||||
@ -324,8 +332,12 @@ export class Application {
|
|||||||
|
|
||||||
Loader.linkAppAfterBoot(this);
|
Loader.linkAppAfterBoot(this);
|
||||||
|
|
||||||
|
if (G_WEGAME_VERSION) {
|
||||||
|
this.stateMgr.moveToState("WegameSplashState");
|
||||||
|
}
|
||||||
|
|
||||||
// Check for mobile
|
// Check for mobile
|
||||||
if (IS_MOBILE) {
|
else if (IS_MOBILE) {
|
||||||
this.stateMgr.moveToState("MobileWarningState");
|
this.stateMgr.moveToState("MobileWarningState");
|
||||||
} else {
|
} else {
|
||||||
this.stateMgr.moveToState("PreloadState");
|
this.stateMgr.moveToState("PreloadState");
|
||||||
|
|||||||
@ -1,12 +1,75 @@
|
|||||||
export const CHANGELOG = [
|
export const CHANGELOG = [
|
||||||
{
|
{
|
||||||
version: "1.3.1",
|
version: "1.4.4",
|
||||||
date: "beta",
|
date: "29.08.2021",
|
||||||
entries: [
|
entries: [
|
||||||
"Fixed savegames getting corrupt in rare conditions",
|
"Hotfix: Fixed the balancer not distributing items evenly, caused by the 1.4.3 update. Sorry for any inconveniences!",
|
||||||
"Fixed game crashing sometimes since the achievements update",
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
version: "1.4.3",
|
||||||
|
date: "28.08.2021",
|
||||||
|
entries: [
|
||||||
|
"You can now hold 'ALT' while hovering a building to see its output! (Thanks to Sense101) (PS: There is now a setting to have it always on!)",
|
||||||
|
"The map overview should now be much more performant! As a consequence, you can now zoom out farther! (Thanks to PFedak)",
|
||||||
|
"Puzzle DLC: There is now a 'next puzzle' button!",
|
||||||
|
"Puzzle DLC: There is now a search function!",
|
||||||
|
"Edit signal dialog now has the previous signal filled (Thanks to EmeraldBlock)",
|
||||||
|
"Further performance improvements (Thanks to PFedak)",
|
||||||
|
"Improved puzzle validation (Thanks to Sense101)",
|
||||||
|
"Input fields in dialogs should now automatically focus",
|
||||||
|
"Fix selected building being deselected at level up (Thanks to EmeraldBlock)",
|
||||||
|
"Updated translations",
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
version: "1.4.2",
|
||||||
|
date: "24.06.2021",
|
||||||
|
entries: [
|
||||||
|
"Puzzle DLC: Goal acceptors now reset after getting no items for a while (This should prevent being able to 'cheat' puzzles) (by Sense101)",
|
||||||
|
"Puzzle DLC: Added button to clear all buildings / reset the puzzle (by Sense101)",
|
||||||
|
"Puzzle DLC: Allow copy-paste in puzzle mode (by Sense101)",
|
||||||
|
"Fixed level achievements being given on the wrong level (by DJ1TJOO)",
|
||||||
|
"Fixed blueprint not properly clearing on right click",
|
||||||
|
"Updated translations",
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
version: "1.4.1",
|
||||||
|
date: "22.06.2021",
|
||||||
|
entries: [
|
||||||
|
"The <a href='https://store.steampowered.com/app/1625400/shapezio__Puzzle_DLC/?utm_medium=changelog' target='_blank'>Puzzle DLC</a> is now available on Steam!",
|
||||||
|
"The <a href='https://store.steampowered.com/app/1573840/shapezio_Soundtrack/?utm_medium=changelog' target='_blank'>Soundtrack</a> is now also available to wishlist and will be released within the next days, including the new music from the Puzzle DLC!",
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
version: "1.4.0",
|
||||||
|
date: "04.06.2021",
|
||||||
|
entries: [
|
||||||
|
"Belts in blueprints should now always paste correctly",
|
||||||
|
"You can now clear belts by selecting them and then pressing 'B'",
|
||||||
|
"Preparations for the <a href='https://store.steampowered.com/app/1625400/shapezio__Puzzle_DLC/?utm_medium=changelog2' target='_blank'>Puzzle DLC</a>, coming June 22nd!",
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
version: "1.3.1",
|
||||||
|
date: "16.04.2021",
|
||||||
|
entries: G_CHINA_VERSION
|
||||||
|
? [
|
||||||
|
"第13关的交付目标更改为:中国古代指南针。(感谢玩家:凯风入心 创作并提供",
|
||||||
|
"第17关的交付目标更改为:永乐通宝。(感谢玩家:金天赐 创作并提供",
|
||||||
|
"第22关的交付目标更改为:凤凰。(感谢玩家:我没得眼镜 创作并提供",
|
||||||
|
"第23关的交付目标更改为:古代车轮。(感谢玩家:我没得眼镜 创作并提供",
|
||||||
|
"第24关的交付目标更改为:大熊猫。(感谢玩家:窝囸倪现任 创作并提供",
|
||||||
|
|
||||||
|
"修复了一些特定情况下偶尔会发生的存档损坏问题",
|
||||||
|
"修复了成就更新后有时候游戏崩溃的问题",
|
||||||
|
]
|
||||||
|
: [
|
||||||
|
"Fixed savegames getting corrupt in rare conditions",
|
||||||
|
"Fixed game crashing sometimes since the achievements update",
|
||||||
|
],
|
||||||
|
},
|
||||||
{
|
{
|
||||||
version: "1.3.0",
|
version: "1.3.0",
|
||||||
date: "12.03.2020",
|
date: "12.03.2020",
|
||||||
|
|||||||
@ -51,9 +51,12 @@ export class AnimationFrame {
|
|||||||
dt = resetDtMs;
|
dt = resetDtMs;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.frameEmitted.dispatch(dt);
|
try {
|
||||||
|
this.frameEmitted.dispatch(dt);
|
||||||
|
} catch (ex) {
|
||||||
|
console.error(ex);
|
||||||
|
}
|
||||||
this.lastTime = time;
|
this.lastTime = time;
|
||||||
|
|
||||||
window.requestAnimationFrame(this.boundMethod);
|
window.requestAnimationFrame(this.boundMethod);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -12,8 +12,13 @@ import { cachebust } from "./cachebust";
|
|||||||
|
|
||||||
const logger = createLogger("background_loader");
|
const logger = createLogger("background_loader");
|
||||||
|
|
||||||
|
export function getLogoSprite() {
|
||||||
|
// @todo: ugh, in a hurry
|
||||||
|
return G_WEGAME_VERSION ? "logo_wegame.png" : G_CHINA_VERSION ? "logo_cn.png" : "logo.png";
|
||||||
|
}
|
||||||
|
|
||||||
const essentialMainMenuSprites = [
|
const essentialMainMenuSprites = [
|
||||||
G_CHINA_VERSION ? "logo_cn.png" : "logo.png",
|
getLogoSprite(),
|
||||||
...G_ALL_UI_IMAGES.filter(src => src.startsWith("ui/") && src.indexOf(".gif") < 0),
|
...G_ALL_UI_IMAGES.filter(src => src.startsWith("ui/") && src.indexOf(".gif") < 0),
|
||||||
];
|
];
|
||||||
const essentialMainMenuSounds = [
|
const essentialMainMenuSounds = [
|
||||||
|
|||||||
@ -167,4 +167,25 @@ export class BufferMaintainer {
|
|||||||
});
|
});
|
||||||
return canvas;
|
return canvas;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param {object} param0
|
||||||
|
* @param {string} param0.key
|
||||||
|
* @param {string} param0.subKey
|
||||||
|
* @returns {HTMLCanvasElement?}
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
getForKeyOrNullNoUpdate({ key, subKey }) {
|
||||||
|
let parent = this.cache.get(key);
|
||||||
|
if (!parent) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Now search for sub key
|
||||||
|
const cacheHit = parent.get(subKey);
|
||||||
|
if (cacheHit) {
|
||||||
|
return cacheHit.canvas;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,7 +7,7 @@ export const IS_DEBUG =
|
|||||||
|
|
||||||
export const SUPPORT_TOUCH = false;
|
export const SUPPORT_TOUCH = false;
|
||||||
|
|
||||||
export const IS_MAC = navigator.platform.toLowerCase().indexOf("mac") >= 0;
|
export const IS_MAC = navigator.platform.toLowerCase().indexOf("mac") >= 0 && !G_IS_DEV;
|
||||||
|
|
||||||
const smoothCanvas = true;
|
const smoothCanvas = true;
|
||||||
|
|
||||||
@ -17,7 +17,11 @@ export const THIRDPARTY_URLS = {
|
|||||||
reddit: "https://www.reddit.com/r/shapezio",
|
reddit: "https://www.reddit.com/r/shapezio",
|
||||||
shapeViewer: "https://viewer.shapez.io",
|
shapeViewer: "https://viewer.shapez.io",
|
||||||
|
|
||||||
|
privacyPolicy: "https://tobspr.io/privacy.html",
|
||||||
|
|
||||||
standaloneStorePage: "https://store.steampowered.com/app/1318690/shapezio/",
|
standaloneStorePage: "https://store.steampowered.com/app/1318690/shapezio/",
|
||||||
|
stanaloneCampaignLink: "https://get.shapez.io",
|
||||||
|
puzzleDlcStorePage: "https://store.steampowered.com/app/1625400/shapezio__Puzzle_DLC",
|
||||||
|
|
||||||
levelTutorialVideos: {
|
levelTutorialVideos: {
|
||||||
21: "https://www.youtube.com/watch?v=0nUfRLMCcgo&",
|
21: "https://www.youtube.com/watch?v=0nUfRLMCcgo&",
|
||||||
@ -53,6 +57,7 @@ export const globalConfig = {
|
|||||||
|
|
||||||
// Map
|
// Map
|
||||||
mapChunkSize: 16,
|
mapChunkSize: 16,
|
||||||
|
chunkAggregateSize: 4,
|
||||||
mapChunkOverviewMinZoom: 0.9,
|
mapChunkOverviewMinZoom: 0.9,
|
||||||
mapChunkWorldSize: null, // COMPUTED
|
mapChunkWorldSize: null, // COMPUTED
|
||||||
|
|
||||||
@ -71,6 +76,13 @@ export const globalConfig = {
|
|||||||
|
|
||||||
readerAnalyzeIntervalSeconds: 10,
|
readerAnalyzeIntervalSeconds: 10,
|
||||||
|
|
||||||
|
goalAcceptorItemsRequired: 12,
|
||||||
|
goalAcceptorsPerProducer: 5,
|
||||||
|
puzzleModeSpeed: 3,
|
||||||
|
puzzleMinBoundsSize: 2,
|
||||||
|
puzzleMaxBoundsSize: 20,
|
||||||
|
puzzleValidationDurationSeconds: 30,
|
||||||
|
|
||||||
buildingSpeeds: {
|
buildingSpeeds: {
|
||||||
cutter: 1 / 4,
|
cutter: 1 / 4,
|
||||||
cutterQuad: 1 / 4,
|
cutterQuad: 1 / 4,
|
||||||
@ -93,7 +105,7 @@ export const globalConfig = {
|
|||||||
gameSpeed: 1,
|
gameSpeed: 1,
|
||||||
|
|
||||||
warmupTimeSecondsFast: 0.5,
|
warmupTimeSecondsFast: 0.5,
|
||||||
warmupTimeSecondsRegular: 3,
|
warmupTimeSecondsRegular: 1.5,
|
||||||
|
|
||||||
smoothing: {
|
smoothing: {
|
||||||
smoothMainCanvas: smoothCanvas && true,
|
smoothMainCanvas: smoothCanvas && true,
|
||||||
|
|||||||
@ -53,7 +53,7 @@ export default {
|
|||||||
// Replace all translations with emojis to see which texts are translateable
|
// Replace all translations with emojis to see which texts are translateable
|
||||||
// testTranslations: true,
|
// testTranslations: true,
|
||||||
// -----------------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------------
|
||||||
// Enables an inspector which shows information about the entity below the curosr
|
// Enables an inspector which shows information about the entity below the cursor
|
||||||
// enableEntityInspector: true,
|
// enableEntityInspector: true,
|
||||||
// -----------------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------------
|
||||||
// Enables ads in the local build (normally they are deactivated there)
|
// Enables ads in the local build (normally they are deactivated there)
|
||||||
@ -62,6 +62,9 @@ export default {
|
|||||||
// Allows unlocked achievements to be logged to console in the local build
|
// Allows unlocked achievements to be logged to console in the local build
|
||||||
// testAchievements: true,
|
// testAchievements: true,
|
||||||
// -----------------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------------
|
||||||
|
// Enables use of (some) existing flags within the puzzle mode context
|
||||||
|
// testPuzzleMode: true,
|
||||||
|
// -----------------------------------------------------------------------------------
|
||||||
// Disables the automatic switch to an overview when zooming out
|
// Disables the automatic switch to an overview when zooming out
|
||||||
// disableMapOverview: true,
|
// disableMapOverview: true,
|
||||||
// -----------------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------------
|
||||||
|
|||||||
@ -91,26 +91,6 @@ export class GameState {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
* @param {string} nextStateId
|
|
||||||
* @param {object=} nextStatePayload
|
|
||||||
*/
|
|
||||||
watchAdAndMoveToState(nextStateId, nextStatePayload = {}) {
|
|
||||||
if (this.app.adProvider.getCanShowVideoAd() && this.app.isRenderable()) {
|
|
||||||
this.moveToState(
|
|
||||||
"WatchAdState",
|
|
||||||
{
|
|
||||||
nextStateId,
|
|
||||||
nextStatePayload,
|
|
||||||
},
|
|
||||||
true
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
this.moveToState(nextStateId, nextStatePayload);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Tracks clicks on a given element and calls the given callback *on this state*.
|
* Tracks clicks on a given element and calls the given callback *on this state*.
|
||||||
* If you want to call another function wrap it inside a lambda.
|
* If you want to call another function wrap it inside a lambda.
|
||||||
|
|||||||
@ -5,6 +5,7 @@ import { Factory } from "./factory";
|
|||||||
* @typedef {import("../game/time/base_game_speed").BaseGameSpeed} BaseGameSpeed
|
* @typedef {import("../game/time/base_game_speed").BaseGameSpeed} BaseGameSpeed
|
||||||
* @typedef {import("../game/component").Component} Component
|
* @typedef {import("../game/component").Component} Component
|
||||||
* @typedef {import("../game/base_item").BaseItem} BaseItem
|
* @typedef {import("../game/base_item").BaseItem} BaseItem
|
||||||
|
* @typedef {import("../game/game_mode").GameMode} GameMode
|
||||||
* @typedef {import("../game/meta_building").MetaBuilding} MetaBuilding
|
* @typedef {import("../game/meta_building").MetaBuilding} MetaBuilding
|
||||||
|
|
||||||
|
|
||||||
@ -19,6 +20,9 @@ export let gBuildingsByCategory = null;
|
|||||||
/** @type {FactoryTemplate<Component>} */
|
/** @type {FactoryTemplate<Component>} */
|
||||||
export let gComponentRegistry = new Factory("component");
|
export let gComponentRegistry = new Factory("component");
|
||||||
|
|
||||||
|
/** @type {FactoryTemplate<GameMode>} */
|
||||||
|
export let gGameModeRegistry = new Factory("gameMode");
|
||||||
|
|
||||||
/** @type {FactoryTemplate<BaseGameSpeed>} */
|
/** @type {FactoryTemplate<BaseGameSpeed>} */
|
||||||
export let gGameSpeedRegistry = new Factory("gamespeed");
|
export let gGameSpeedRegistry = new Factory("gamespeed");
|
||||||
|
|
||||||
|
|||||||