Compare commits

...

691 Commits

Author SHA1 Message Date
Mascali 13714e889f apt -y
CI / CI (push) Failing after 7m33s Details
CI / yaml-lint (push) Failing after 3s Details
2024-03-26 01:38:46 +01:00
Mascali 6aa836da30 removed sudo
CI / CI (push) Failing after 16s Details
CI / yaml-lint (push) Failing after 3s Details
2024-03-26 01:37:42 +01:00
Mascali 8f671a0f89 changed runner ?
CI / CI (push) Failing after 1m41s Details
CI / yaml-lint (push) Failing after 1s Details
2024-03-26 01:35:12 +01:00
Mascali fa3a82a1dd Actualiser .github/workflows/ci.yml
CI / CI (push) Waiting to run Details
CI / yaml-lint (push) Waiting to run Details
2024-03-26 01:32:12 +01:00
Thomas (DJ1TJOO) 0713c850ec
Fixed dev and devStandalone script (#1503)
* Fixed dev and devStandalone script

* Added eslint no-unreachable code rule

* Fix small type issue
2022-12-29 09:57:34 +01:00
Даниїл Григор'єв ed6922f912
Await asynchronous mod initialization (#1485) 2022-11-03 23:17:07 +01:00
tobspr b07e04e7b1 Disable GA on shapez for better privacy 2022-10-24 09:54:36 +02:00
tobspr 885d1e609e Update repository links, add patreon link 2022-10-22 16:14:54 +02:00
tobspr b42488f7b5 Update menu text & announcement 2022-10-13 15:23:14 +02:00
tobspr e0bc74a4fd Fix steam login not working 2022-10-13 11:25:47 +02:00
tobspr ee2279d5f0 Add shapez 2 hint to the game 2022-10-09 13:09:31 +02:00
tobspr 82980ae849 Add hint for shapez 2 2022-10-09 12:46:16 +02:00
Carlos Morette c93435f510
translate shapeTooltip (#1481) 2022-10-06 21:14:00 +02:00
tobspr c77e428ffb Fix darwin builds on gog 2022-07-20 18:16:14 +02:00
tobspr b0c9894bf6 Add CLA 2022-07-19 14:52:41 +02:00
tobspr 400ee8e737 Support for GOG 2022-07-18 14:18:02 +02:00
Gumball73 81e3d2ba76
Update base-pt-PT.yaml (#1460)
Update base-pt-PT
2022-07-18 13:00:08 +02:00
tobspr 52166fdd86 Fix discount still being active 2022-07-07 20:40:47 +02:00
tobspr b67f925f4f Update since summer sale ended 2022-07-07 20:36:05 +02:00
tobspr a5022443f3 Remove events connector 2022-06-28 10:41:46 +02:00
tobspr 8ff2f43d0c Better Incognito warning 2022-06-28 10:22:43 +02:00
tobspr 934cba22a2 Merge branch 'master' of github.com:tobspr/shapez.io 2022-06-28 09:19:46 +02:00
tobspr 3b79662721 Fix invalid ids 2022-06-28 09:19:44 +02:00
LSowyer c51468157f
Update base-tr.yaml (#1458)
55. Kısım düzeltildi
2022-06-27 17:59:53 +02:00
tobspr e4f8d3b569 Fix game on small resolutions 2022-06-27 17:42:21 +02:00
tobspr 8454a782b4 Further crazygames sdk integration 2022-06-27 17:34:43 +02:00
tobspr a39195c972 Support for crazgames sdk 2022-06-27 17:20:01 +02:00
tobspr 56296ab88a Minor adjustments 2022-06-26 18:51:39 +02:00
tobspr 80754247a1 Hide kiwi clicker banner when mods are installed 2022-06-25 10:17:30 +02:00
tobspr 39b4f44018 Fix typo 2022-06-23 19:58:47 +02:00
tobspr e2907a1ab8 Adjust for the summer sale 2022-06-23 19:48:53 +02:00
tobspr 1e6199b213 Forward utm campaign 2022-06-23 18:09:40 +02:00
tobspr 4e25bf4045 Compatibility for old mods 2022-06-23 16:03:55 +02:00
tobspr aa273d39a1 Merge branch 'master' of github.com:tobspr/shapez.io 2022-06-23 14:59:11 +02:00
tobspr 9f3cf49fad Properly render discounts 2022-06-23 14:59:09 +02:00
Lolappa 3a43cdcb47
Update base-fi.yaml (#1457)
* Update base-fi.yaml

* Update base-fi.yaml
2022-06-23 11:44:26 +02:00
tobspr d976245cc1 Allow hiding kiwi clicker link - try 2 2022-06-22 16:18:36 +02:00
tobspr befd8a7877 Make side project info closeable 2022-06-22 10:29:50 +02:00
tobspr 5627d656cc Rebalance levels, adjustments, etc 2022-06-22 10:22:20 +02:00
tobspr dab688cefb Sync translations 2022-06-22 10:21:51 +02:00
tobspr 3bf9bfe066 Merge branch 'master' of github.com:tobspr/shapez.io 2022-06-22 10:20:22 +02:00
tobspr 1e8c5f7074 Update translations (closes #1453) 2022-06-22 10:20:17 +02:00
Ivan 7694b7be2b
Russian translation overhaul (#1455) 2022-06-22 10:17:59 +02:00
Gumball73 b33d54ccab
Update base-pt-PT.yaml (#1456)
Update Base-pt-PT - correcting some typos.
2022-06-22 09:11:52 +02:00
timofey 0bd43b28c3
Update base-ru.yaml (#1454) 2022-06-22 09:11:04 +02:00
tobspr 42cfeed771 Minor demo adjustments 2022-06-21 14:44:26 +02:00
tobspr 4796aec1ff Don't build steam-china on darwin 2022-06-21 14:11:10 +02:00
tobspr bb363ce69e Always login for DLC, fixes 403 in standalone 2022-06-21 14:04:21 +02:00
tobspr 1235e70c74 Update css again for standalone 2022-06-21 13:51:43 +02:00
tobspr a187cd7f25 Fix typo 2022-06-21 13:36:49 +02:00
tobspr 99b5688039 Further UI improvements 2022-06-21 13:29:33 +02:00
tobspr 3988d71f5a Improve main menu for standalone 2022-06-21 13:17:12 +02:00
tobspr e4da0e437b Minor adjustments (incl. CSS) 2022-06-21 12:17:08 +02:00
tobspr 566d80a928 Minor css adjustment 2022-06-21 12:07:46 +02:00
tobspr ae485a0385 Update translations 2022-06-21 12:07:22 +02:00
tobspr 715b04fd32 Merge branch 'master' of github.com:tobspr/shapez.io 2022-06-21 11:50:06 +02:00
tobspr acbbf5a539 Rework main menu 2022-06-21 11:50:02 +02:00
Robert Ferree 512174ee93
fix the linting errors (#1451) 2022-06-21 08:01:42 +02:00
Gumball73 d94dab55d5
Update base-pt-PT.yaml (#1450)
Update Base-pt-PT to the latest version and correcting some typos.
2022-06-20 20:51:37 +02:00
tobspr e0ccf06531 Update changelog 2022-06-20 19:46:32 +02:00
tobspr c35349a668 Fix css 2022-06-20 19:14:14 +02:00
tobspr 8001727196 Update translations and minor fixes 2022-06-20 19:08:14 +02:00
tobspr d3d364b0f2 Fix dlc not being available in browser full version 2022-06-20 18:44:19 +02:00
tobspr 145f734907 Allow playing full version in browser via steam sso 2022-06-20 18:22:23 +02:00
tobspr b446a4a915 Add missing tracking 2022-06-20 15:32:41 +02:00
tobspr 52629c5bb2 Merge branch 'master' of github.com:tobspr/shapez.io 2022-06-20 12:17:21 +02:00
tobspr 88f5c41716 Minor polishing and standlaone adjustments 2022-06-20 12:17:19 +02:00
Stoneblackdog f09ad8f9a0
Remove the ".io" from the name (#1441)
Removed the ".io" from the name
2022-06-20 12:04:34 +02:00
tobspr 0052c30553 Fix gulptasks 2022-06-20 11:24:38 +02:00
tobspr a065c64baa Also clean build_output on build 2022-06-20 11:18:57 +02:00
tobspr 7797546ed4 Fix being unable to delete savegames when it was deleted before, minor adjustments 2022-06-20 11:17:33 +02:00
tobspr 690483fd89 Deploy new baseline 2022-06-20 11:05:38 +02:00
tobspr b9a72fe965 Fix missing sound 2022-06-20 11:00:20 +02:00
tobspr 8c952435e7 Fix resources missing in main menu 2022-06-20 10:49:55 +02:00
tobspr 4056cdaad2 Update translations 2022-06-20 10:48:07 +02:00
tobspr 773609a2e2 Fix debug option being enabled by default 2022-06-20 10:30:12 +02:00
tobspr 8c5e593ceb v1.5.5 - Rework tutorial and polishing 2022-06-20 10:21:13 +02:00
tobspr 482a4990ba Fix unhandled promise rejection, minor polishing 2022-06-20 06:38:52 +02:00
tobspr c3f029d887 Add missing G_IS_DEV 2022-06-19 22:28:05 +02:00
tobspr 424a4b8a61 Remove no longer working preload script 2022-06-19 21:18:34 +02:00
tobspr 4faea1aea9 bump hash 2022-06-19 18:05:07 +02:00
tobspr 166b288898 Revert "Fix #1446 (#1447)"
This reverts commit 2d45fa8cd1.
2022-06-19 17:59:32 +02:00
tobspr 2ddbdda4b3 Different links for standalone version 2022-06-19 17:53:03 +02:00
tobspr 75b49b3b1b Minor bugfixes for the standalone 2022-06-19 17:48:43 +02:00
tobspr 3fe2264c80 Improve color theme 2022-06-19 17:15:02 +02:00
tobspr ffe9095d2e Disable automatic background switch in map view when placing buildings 2022-06-19 17:11:23 +02:00
tobspr 1642354f40 Merge branch 'master' of github.com:tobspr/shapez.io 2022-06-19 17:08:38 +02:00
tobspr 3ab5ca99fd 1.5.4 update (polishing + minor rebalancing) 2022-06-19 17:08:35 +02:00
Jasper Meggitt 2d45fa8cd1
Fix #1446 (#1447)
* Fix #1446 by modifying gulp/atlas2json.js

* Clean up gulp/atlas2json.js and add more comments
2022-06-19 16:41:57 +02:00
tobspr 6a8e519c0a Update translations 2022-06-18 18:59:28 +02:00
tobspr 34764eca16 Allow downloading savegame in demo 2022-06-18 18:47:27 +02:00
tobspr 7c77944d43 Multiple preload-adjustments 2022-06-18 17:36:51 +02:00
tobspr e870317a4f Estimate progress when Content-Length header is missing 2022-06-18 16:47:35 +02:00
tobspr c74e4b9819 Fix invalid css urls 2022-06-18 14:45:15 +02:00
tobspr 34ed689875 Refactor background resources loader - game should now load much faster and also reports progress while downloading resources 2022-06-18 14:43:26 +02:00
tobspr 7fe088a0c8 Disable browser warning 2022-06-17 17:58:33 +02:00
tobspr 4c515eb6e8 Increase request timeout to allow playing on slow connections 2022-06-17 17:48:46 +02:00
tobspr 574a9d9d25 More verbose errors 2022-06-17 16:21:32 +02:00
tobspr 3717fe16c1 Text improvements 2022-06-17 15:55:00 +02:00
tobspr d790a9355f Minor UI fixes 2022-06-17 15:52:34 +02:00
tobspr fde4ff9e5e Localize standalone advantages title 2022-06-17 15:36:27 +02:00
tobspr 913149d5b8 Accessibility optimizations 2022-06-17 15:18:46 +02:00
tobspr 0eeb03baf7 Do not preload async css 2022-06-17 14:55:08 +02:00
tobspr dfa392907d Vastly improve game loading time 2022-06-17 14:52:25 +02:00
tobspr 400cc5fe81 Reduce unlock notification interval 2022-06-17 14:20:01 +02:00
tobspr de56764103 Fix issues in preload state 2022-06-17 14:16:25 +02:00
tobspr e730a88ad1 Do not show changelog in demo 2022-06-17 14:09:11 +02:00
tobspr 51fcc1e470 Improve preload screen 2022-06-17 13:04:19 +02:00
tobspr 11d2c701a2 Fix invalid language code for romanian 2022-06-17 12:36:31 +02:00
tobspr 37ff7a132e Fix invalid korean language code 2022-06-17 12:34:30 +02:00
tobspr 4ba70cf2ef Fix buttons not working in Mods View 2022-06-17 12:10:27 +02:00
tobspr e57a1f8212 Merge branch 'master' of github.com:tobspr/shapez.io 2022-06-17 12:02:52 +02:00
tobspr 9b8789527e Update savegame imports, minor adjustments 2022-06-17 12:02:48 +02:00
tobspr 42112f1660 Update savegame imports 2022-06-17 09:57:41 +02:00
tobspr 8f6ccc0d67 Update translations 2022-06-17 09:51:19 +02:00
tobspr 5ef7749a09 Fix css issue 2022-06-17 09:41:36 +02:00
tobspr d39ae528f0 Update demo to try out timed demo 2022-06-17 09:35:55 +02:00
tobspr abd26182f5 Change button animation interval 2022-06-16 20:57:38 +02:00
tobspr 04e5d340a7 Fix DLC logo 2022-06-16 20:08:14 +02:00
tobspr 2e1451ab3c Fix outdated translations 2022-06-16 19:39:59 +02:00
tobspr e2460edb32 Allow changing abt variant 2022-06-16 19:27:20 +02:00
tobspr 2a63d7474c Update translations 2022-06-16 19:11:12 +02:00
tobspr 7eef96ec21 Update translations 2022-06-16 18:35:49 +02:00
tobspr 24a4010935 Abt adjustments, again 2022-06-16 18:09:26 +02:00
tobspr 0d6bdd9bfb Fix lighthouse issues 2022-06-16 13:59:37 +02:00
tobspr aae4395111 Adjust preloading intervals 2022-06-16 13:50:17 +02:00
tobspr cc068d8245 Improve loading screen 2022-06-16 13:47:11 +02:00
tobspr d766df23e3 Fix bundle loader 2022-06-16 12:47:33 +02:00
tobspr 15de686de1 Fix build errors 2022-06-16 12:22:10 +02:00
tobspr 80a80c11e6 Switch to es6 again 2022-06-16 12:21:03 +02:00
tobspr 781273e91d Add html element remove polyfill 2022-06-16 12:10:09 +02:00
tobspr de2098f0cf Disable block scoping 2022-06-16 12:04:59 +02:00
tobspr 8a669f1a58 Fix undefined variable 2022-06-16 12:01:12 +02:00
tobspr 197adf8120 Fix babel options 2022-06-16 11:58:49 +02:00
tobspr 2e1271ecb7 Fix es5 builds 2022-06-16 11:28:37 +02:00
tobspr bf5199d77a Try out different babel properties to fix compilation issues 2022-06-16 10:52:49 +02:00
tobspr 07fb65f3b6 Fix build issues 2022-06-16 10:39:02 +02:00
tobspr 3b4ae39caa Try out transpiled-only builds 2022-06-16 10:35:58 +02:00
tobspr 6abe731b32 Always use transpiled variant for web 2022-06-16 10:20:04 +02:00
tobspr dd0508e777 Only load required resources 2022-06-16 10:02:45 +02:00
tobspr 96ce442b69 Update favicon and improve loading time 2022-06-16 09:58:12 +02:00
tobspr 9d28a1f2f6 Further abt testing, v2 2022-06-15 21:29:10 +02:00
tobspr 0a733907d5 Minor adjustments 2022-06-15 20:25:08 +02:00
tobspr 6b0fecb4af Send steam auth ticket on game start 2022-06-15 19:57:46 +02:00
tobspr cc835312f4 Reduce abt count 2022-06-15 16:50:04 +02:00
tobspr 918dd5dc25 Allow steam:// protocol links 2022-06-15 12:28:14 +02:00
tobspr f9fa3cd6a7 Minor refactorings 2022-06-15 12:27:11 +02:00
tobspr e9e88241b4 Further abt testing 2022-06-15 11:43:04 +02:00
Arnaud Stephan 94253c9370
Update base-fr.yaml (#1438) 2022-06-14 15:33:00 +02:00
Povilas Vaitkus d9dbc20f39
Update base-lt.yaml (#1436) 2022-06-14 15:31:15 +02:00
tobspr 6a79d47158 Update gulpfile 2022-06-13 21:09:00 +02:00
tobspr ac4109a900 Fix typos 2022-06-13 20:56:18 +02:00
tobspr 27906caa84 Further Abt Testing 2022-06-13 20:31:19 +02:00
tobspr 9b545b7255 Update abt variants, again 2022-06-13 18:00:15 +02:00
tobspr d2a2293a5f New abt variant 2022-06-13 12:15:38 +02:00
tobspr 44d0a8bcf7 Use better random number generation package 2022-06-12 17:33:54 +02:00
tobspr 48ac343260 Adjust abt variants 2022-06-12 15:55:43 +02:00
Puchkov Evgenii bdc34f1ddd
Update base-ru.yaml (#1434) 2022-06-11 11:23:23 +02:00
tobspr 360937ce5f Change popup interval 2022-06-11 11:12:37 +02:00
tobspr 42b6132866 Update translations 2022-06-10 12:55:35 +02:00
tobspr 45331dc650 Fix typo 2022-06-09 10:06:18 +02:00
tobspr 959a365de6 Allow specifying abt in url params 2022-06-09 10:01:02 +02:00
tobspr e1cd08d2f9 try out different variants 2022-06-09 08:58:37 +02:00
tobspr 8c5118e41d Fix randomInt not being evenly distributed 2022-06-07 14:16:14 +02:00
tobspr 21e37792e0 Minor adjustments 2022-06-06 15:48:21 +02:00
tobspr 737ce41041 Properly write app id 2022-06-06 15:34:19 +02:00
tobspr b821c7259c refactor steam pipe generation 2022-06-06 15:28:30 +02:00
tobspr 691911104e Update translations 2022-06-06 14:39:10 +02:00
tobspr 4003fdd103 Fix css issues 2022-06-06 14:37:08 +02:00
tobspr de288afeb5 Fix prod environment 2022-06-06 14:29:25 +02:00
tobspr c32f987c4f Fix invalid url 2022-06-06 14:10:47 +02:00
tobspr 1272ba7614 Fix typo 2022-06-06 14:06:30 +02:00
tobspr 222ea8c261 Merge steam-demo branch 2022-06-06 14:06:09 +02:00
tobspr 09551fa0e5 Fix translation issues 2022-06-05 21:18:21 +02:00
tobspr 0d52ded6c8 Merge branch 'master' of github.com:tobspr/shapez.io 2022-06-05 21:17:49 +02:00
tobspr f7b4647352 Update to 1.5.3 2022-06-05 21:17:47 +02:00
Scott Miller d99b68784c
update texturepacker url (#1423)
`runnable-texturepacker.jar` seems to have moved. This is the current address according to https://libgdx.com/wiki/tools/texture-packer
2022-06-05 21:16:37 +02:00
SungHyun 87eccb2ec8
Update base-kor.yaml (#1420)
* Update base-kor.yaml

* Update translations/base-kor.yaml

Co-authored-by: YJSoft <yjsoft@yjsoft.xyz>

* Update translations/base-kor.yaml

Co-authored-by: YJSoft <yjsoft@yjsoft.xyz>

* Update translations/base-kor.yaml

Co-authored-by: Lastorder <18280396+Lastorder-DC@users.noreply.github.com>

Co-authored-by: YJSoft <yjsoft@yjsoft.xyz>
Co-authored-by: Lastorder <18280396+Lastorder-DC@users.noreply.github.com>
2022-06-05 21:11:17 +02:00
Даниїл Григор'єв 6ed4542f52
Update CI to use Node.js 16.x (#1428)
This makes ESLint/TSLint work again.
2022-06-05 21:10:48 +02:00
ST3O b5e836864b
Update base-uk.yaml (#1430)
I updated some translations.
2022-06-05 21:10:30 +02:00
IcedDog a929be5399
Update base-zh-CN.yaml (#1429)
I'm trying to keep it up to date as quickly as possible, so if there's more translation changes coming up in a short time, it's better to merge this later lol.
2022-06-05 21:10:12 +02:00
tobspr e789a6c5ea Fix puzzle dlc: Buildings not lockable 2022-06-05 21:08:42 +02:00
tobspr 9c247f3756 Revert to electron 16 since 18 causes issues with proton 2022-06-05 21:02:14 +02:00
tobspr a6b707c917 Update readme 2022-06-04 09:54:28 +02:00
tobspr 0974dee6d4 Get rid of legacy 1.19 savegame logic 2022-06-03 10:58:05 +02:00
tobspr 9e0193399f Add mods icon 2022-06-03 10:50:27 +02:00
tobspr f0f259829f Update demo advantages 2022-06-03 10:50:23 +02:00
IcedDog e7fd169ecb
Fixes & adding translations (#1426)
* Fixes & adding translations

- Added missing translations
- Corrected a bunch of mistakes according to "Chinese Copywriting Guidelines"
- Corrected small amount of spelling mistakes

* Updated to v1.5.2
2022-06-03 08:58:48 +02:00
tobspr 282f200b9a web improvements 2022-06-02 20:55:20 +02:00
MaxwellSalmon 29b0d41d66
Update base-da.yaml (#1427)
Fixed some grammatical and spelling issues and translated a few strings.
2022-06-02 20:34:10 +02:00
tobspr dea9008c11 Fix invalid abi binaries for greenworks 2022-06-02 20:05:33 +02:00
tobspr bbb418a1d8 v1.5.2 2022-06-02 19:44:50 +02:00
tobspr 43430dcbf2 Specify commit in registration 2022-06-02 14:17:07 +02:00
tobspr 559c0fa854 Rebranding and minor polishing, part 2 2022-06-02 14:06:33 +02:00
tobspr c848f21725 Merge branch 'master' of github.com:tobspr/shapez.io 2022-06-02 12:57:01 +02:00
tobspr 082932bb46 Update branding from shapez.io to shapez 2022-06-02 12:56:58 +02:00
Norbiros 1715682808
All polish translations done! (#1424)
* All polish translations done!

* Fix trailing spaces

* Remove all trailing spaces
2022-06-01 13:17:14 +02:00
tobspr 50e92bb42f Fix tobspr-osx-sign issues 2022-05-30 07:00:14 +02:00
Norbiros 7734cefc65
Some new polish translations (#1421) 2022-05-30 06:43:12 +02:00
tobspr c746df3a06 Update standalone status 2022-05-30 06:41:43 +02:00
tobspr 57678664d4 Fix DOM token error in watermark 2022-05-20 20:34:59 +02:00
tobspr 75d3a13688 Fix discounts 2022-05-20 17:39:47 +02:00
tobspr c2c3bd67f4 Add smooth_zooming mod example, Fix UI toggle, (hopefully) fix vram issues, add latest discounts 2022-05-20 17:11:39 +02:00
tobspr 18f7ff1fea Adjust animation timing 2022-04-22 09:44:54 +02:00
tobspr ef6e1a223c Fix discount being active in standalone 2022-04-20 11:18:31 +02:00
tobspr 7e198f2a72 Promote current discount 2022-04-20 11:17:56 +02:00
tobspr 6a0254b358 Demo adjustments, fix missing dependency 2022-04-13 16:07:25 +02:00
tobspr a3a72e95ad MacOS Support 2022-04-13 15:43:58 +02:00
Emerald Block 6c88ccd7e2
simplify colors.js (#1412) 2022-04-13 08:23:53 +02:00
HexFive 9d426f4fe1
Fix Dockerfile (#1409)
Fix node version to working, in readme writed 16v but on Dockerfile 12v.
2022-04-04 08:56:29 +02:00
Pierre Beitz 287e8e6ecd
Fix a grammar mistake in the french translation (#1408) 2022-04-04 08:56:16 +02:00
Quentin Roy c9110e81cf
Fix a few typos in the french translation (#1407)
* Fix a few typos in the french translation

* Fix a few more typos in French translation

* Fix quotation marks in French translation

* Fix incorrect French translation
2022-04-04 08:56:03 +02:00
Gautam Narayan 340e252264
Update base-ar.yaml (#1403) 2022-04-04 08:55:34 +02:00
Der Feldspatz 01d1a86cc7
Update base-de translation for mods (#1402)
* Update base-de translation for mods

* Trim trailing whitespace
2022-04-04 08:55:16 +02:00
tobspr 8ef914adc0 Update readme 2022-03-09 09:27:33 +01:00
Emerald Block 4e5e5c8ef7
fix adding constant signal editing to puzzle editor (#1399) 2022-03-05 08:37:01 +01:00
Chunkybanana ced9e186f5
Update README.md (#1398) 2022-03-05 08:36:51 +01:00
Pet Pumpkin 9565bb0c17
typo fix (#1394) 2022-03-04 22:17:39 +01:00
Ademaro 603bb775cd
Update base-ru.yaml (#1393) 2022-03-04 22:17:28 +01:00
snailman07 f7c1ece5c6
Update base-sv.yaml (#1392) 2022-03-04 22:17:14 +01:00
TcePrepK 93f91ca8b3
typo (#1391) 2022-03-04 22:17:05 +01:00
tobspr 679e7f168c Fix crash when replacing wire-layer buildings 2022-02-25 15:56:33 +01:00
tobspr 7e436f2f2e Fix bad changelog date 2022-02-25 12:28:26 +01:00
tobspr a74533ed76 Fix item producer being always unlocked 2022-02-25 12:27:44 +01:00
tobspr c743a4968f Update changelog 2022-02-24 13:44:38 +01:00
tobspr 3079e007a3 Fix changelog 2022-02-23 08:17:47 +01:00
tobspr 6ed7ec6010 Pass variant to getHasDirectionLockAvailable 2022-02-22 16:39:03 +01:00
tobspr 556caed760 Pass variant and rotationVariant to getIsReplaceable 2022-02-22 16:37:55 +01:00
sou7 895a9eb7ae
Translate tips for Japanese (#1387)
Some of them are in Japanese and English at the same tip, so I fix them too.
2022-02-20 10:38:08 +01:00
Thomas (DJ1TJOO) d7c2ca874f
Added a can process hook (#1382)
* Added mod processing requirements

* Added missing bind

* Renamed to mods

* Added can process

* Squashed commit of the following:

commit ea2f32b3ff
Author: tobspr <tobias.springer1@googlemail.com>
Date:   Tue Feb 15 09:09:30 2022 +0100

    Fix examples

commit 561318b7db
Author: Dimava <dimava2@ya.ru>
Date:   Tue Feb 15 10:31:47 2022 +0300

    mark all abstract functions abstract (#1383)

commit 81d65e5801
Author: WaffleDevsAlt <81845843+WaffleDevsAlt@users.noreply.github.com>
Date:   Tue Feb 15 02:31:02 2022 -0500

    Removes unwanted ], (#1384)

    The ], breaks build, with a core error

commit 4f0af32a5e
Author: Ved_s <53968411+Ved-s@users.noreply.github.com>
Date:   Mon Feb 14 07:14:34 2022 +1100

    Update base-ru.yaml (#1312)

    * Update base-ru.yaml

    I think other's comments about the game should stay in English, as Russian translation cannot precisely describe this

    * Update base-ru.yaml

commit 3f3a2e0981
Author: Daan Breur <git@daanbreur.systems>
Date:   Sun Feb 13 21:11:52 2022 +0100

    NL Translations for Mods and puzzleDLC (#1381)

    * [NL] Mods and puzzleDLC

    * Update base-nl.yaml

    * Update base-nl.yaml

commit c4f26320a4
Author: dobidon <35607008+dobidon@users.noreply.github.com>
Date:   Sun Feb 13 23:11:38 2022 +0300

    Translating new keys (#1380)

commit cb5c3f798a
Author: Pimak <37274338+Pimak@users.noreply.github.com>
Date:   Sun Feb 13 21:11:16 2022 +0100

    Update base-fr.yaml for mods translation (#1377)

commit dee4f23b7e
Author: Sense101 <67970865+Sense101@users.noreply.github.com>
Date:   Sun Feb 13 20:11:02 2022 +0000

    Fix method for adding variants to an existing building (#1378)

commit b7bc2ac1b7
Author: jbelbaz <32191774+jbelbaz@users.noreply.github.com>
Date:   Sun Feb 13 21:10:11 2022 +0100

    Update base-fr.yaml (#1328)

    Change of a few lines in English. I was unable to verify in-game integration ... I hope my work will fit.
    glad to help :D

commit 93b9340ab7
Author: Pimak <37274338+Pimak@users.noreply.github.com>
Date:   Sun Feb 13 21:09:56 2022 +0100

    Update README.md (#1376)

    Small mistake

commit f534a88f80
Author: Bagel03 <70449196+Bagel03@users.noreply.github.com>
Date:   Sun Feb 13 15:09:41 2022 -0500

    Fix that whole export debacle (#1370)

    * Re-add setting exports

    * Update webpack.production.config.js

    * Update mod.js

    * Slight change

    * Update mod.js

    * Update webpack.production.config.js

    * Update webpack.config.js

commit dab4aa9cda
Author: Emerald Block <69981203+EmeraldBlock@users.noreply.github.com>
Date:   Sun Feb 13 14:07:02 2022 -0600

    fix fs-job sanitization (#1375)

commit 4466821557
Author: Thomas (DJ1TJOO) <44841260+DJ1TJOO@users.noreply.github.com>
Date:   Sun Feb 13 21:06:42 2022 +0100

    Added display hook for getting the signelton and the drawing (#1374)

commit 65ae26cb53
Author: Thomas (DJ1TJOO) <44841260+DJ1TJOO@users.noreply.github.com>
Date:   Sun Feb 13 21:06:24 2022 +0100

    Added hook for storage can accept item (#1373)

    * Added hook for storage can accept item

    * Fixed order

commit e5742fd577
Author: Thomas (DJ1TJOO) <44841260+DJ1TJOO@users.noreply.github.com>
Date:   Sun Feb 13 21:06:10 2022 +0100

    Added constant signal resolver hook (#1372)

    * Added constant signal resolver hook

    * Added apply

commit 41c6b1c595
Author: Thomas (DJ1TJOO) <44841260+DJ1TJOO@users.noreply.github.com>
Date:   Sun Feb 13 21:05:58 2022 +0100

    Added mod processing requirements (#1371)

    * Added mod processing requirements

    * Added missing bind

    * Renamed to mods
2022-02-15 18:05:53 +01:00
tobspr ea2f32b3ff Fix examples 2022-02-15 09:09:30 +01:00
Dimava 561318b7db
mark all abstract functions abstract (#1383) 2022-02-15 08:31:47 +01:00
WaffleDevsAlt 81d65e5801
Removes unwanted ], (#1384)
The ], breaks build, with a core error
2022-02-15 08:31:02 +01:00
Ved_s 4f0af32a5e
Update base-ru.yaml (#1312)
* Update base-ru.yaml

I think other's comments about the game should stay in English, as Russian translation cannot precisely describe this

* Update base-ru.yaml
2022-02-13 21:14:34 +01:00
Daan Breur 3f3a2e0981
NL Translations for Mods and puzzleDLC (#1381)
* [NL] Mods and puzzleDLC

* Update base-nl.yaml

* Update base-nl.yaml
2022-02-13 21:11:52 +01:00
dobidon c4f26320a4
Translating new keys (#1380) 2022-02-13 21:11:38 +01:00
Pimak cb5c3f798a
Update base-fr.yaml for mods translation (#1377) 2022-02-13 21:11:16 +01:00
Sense101 dee4f23b7e
Fix method for adding variants to an existing building (#1378) 2022-02-13 21:11:02 +01:00
jbelbaz b7bc2ac1b7
Update base-fr.yaml (#1328)
Change of a few lines in English. I was unable to verify in-game integration ... I hope my work will fit.
glad to help :D
2022-02-13 21:10:11 +01:00
Pimak 93b9340ab7
Update README.md (#1376)
Small mistake
2022-02-13 21:09:56 +01:00
Bagel03 f534a88f80
Fix that whole export debacle (#1370)
* Re-add setting exports

* Update webpack.production.config.js

* Update mod.js

* Slight change

* Update mod.js

* Update webpack.production.config.js

* Update webpack.config.js
2022-02-13 21:09:41 +01:00
Emerald Block dab4aa9cda
fix fs-job sanitization (#1375) 2022-02-13 21:07:02 +01:00
Thomas (DJ1TJOO) 4466821557
Added display hook for getting the signelton and the drawing (#1374) 2022-02-13 21:06:42 +01:00
Thomas (DJ1TJOO) 65ae26cb53
Added hook for storage can accept item (#1373)
* Added hook for storage can accept item

* Fixed order
2022-02-13 21:06:24 +01:00
Thomas (DJ1TJOO) e5742fd577
Added constant signal resolver hook (#1372)
* Added constant signal resolver hook

* Added apply
2022-02-13 21:06:10 +01:00
Thomas (DJ1TJOO) 41c6b1c595
Added mod processing requirements (#1371)
* Added mod processing requirements

* Added missing bind

* Renamed to mods
2022-02-13 21:05:58 +01:00
tobspr 86b104080f Simplify readme link 2022-02-04 17:56:17 +01:00
tobspr 71ac87bfac Update mod examples readme 2022-02-04 17:33:37 +01:00
tobspr bbeb5b1158 Merge branch 'master' of github.com:tobspr/shapez.io 2022-02-04 09:53:47 +01:00
tobspr c0d034520a Fix wrong if clause 2022-02-04 09:53:44 +01:00
tobspr aa8d105e14 Revert being able to override exports since it breaks in prod 2022-02-03 20:26:29 +01:00
Thomas (DJ1TJOO) 8e38ef0708
Modloader custom items fix (#1369)
* Added item register and resolver for savegames

* Changed new item type example to register

* Fixed typings
2022-02-03 20:03:02 +01:00
WaffleDevsAlt edd57b3956
Fixed extremely unimportant typo. (#1368)
'ot' to 'to'
2022-02-03 08:40:32 +01:00
Bagel03 10fb7ddb5c
Whoops shouldn't have forgotten that (#1367)
Yea, should not have forgotten that :P
2022-02-03 08:40:24 +01:00
RevosCZ a1cc0cc49c
Update base-cz.yaml (#1366)
Added translations for the new mod update.
2022-02-03 08:40:06 +01:00
tobspr f13a48e812 Update translations 2022-02-01 17:34:38 +01:00
Thomas (DJ1TJOO) cb5df2473e
Fixed different resolutions (#1362)
* Fixed different resolutions

* Fixed replacing shapezio vanilla sprites
2022-02-01 17:33:18 +01:00
Manolo Edge e9c26a71e2
fixes typo in es translation file (#1359)
Just found a typo in Spanish translations, "trasnportadora" -> "transportadora"
2022-02-01 17:32:57 +01:00
Stamen b30916953f
Updated base-sr.yaml (#1334)
Translated the rest and fixed minor typos.
2022-02-01 17:32:45 +01:00
Erik 4a811be1c1
Update translations (#1331)
Added translations from last game update, fixed some typos.
2022-02-01 17:31:50 +01:00
wed 25273b308e
Update base-fr.yaml (#1321)
change letter case in "reward_cutter_and_trash" description
2022-02-01 17:30:09 +01:00
Thomas (DJ1TJOO) 97434a8e4f
Button fix when right click with placement building (#1319) 2022-02-01 17:29:13 +01:00
Froggi22 c346a25d6a
Update base-sv.yaml (#1314)
Edited and translated to row 412
2022-02-01 17:27:56 +01:00
Wumpus-js 896397cfad
Update base-fr.yaml (#1307) 2022-02-01 17:26:17 +01:00
Gumball73 376a4f5b23
Update base-pt-PT.yaml (#1305) 2022-02-01 17:25:59 +01:00
Artur Osipov 8f6e2cd30e
Added some translation for the main screen lines (#1300) 2022-02-01 17:25:27 +01:00
tobspr 2aa30fb32f Update changelog 2022-02-01 17:19:08 +01:00
tobspr 80b1bc70f4 Mass selector draw optimizations 2022-02-01 17:18:44 +01:00
tobspr 3ad502c5a7 Fix belt path optimization 2022-02-01 17:04:43 +01:00
tobspr c41aaa1fc5
Mod Support - 1.5.0 Update (#1361)
* initial modloader draft

* modloader features

* Refactor mods to use signals

* Add support for modifying and registering new transltions

* Minor adjustments

* Support for string building ids for mods

* Initial support for adding new buildings

* Refactor how mods are loaded to resolve circular dependencies and prepare for future mod loading

* Lazy Load mods to make sure all dependencies are loaded

* Expose all exported members automatically to mods

* Fix duplicate exports

* Allow loading mods from standalone

* update changelog

* Fix mods folder incorrect path

* Fix modloading in standalone

* Fix sprites not getting replaced, update demo mod

* Load dev mod via raw loader

* Improve mod developing so mods are directly ready to be deployed, load mods from local file server

* Proper mods ui

* Allow mods to register game systems and draw stuff

* Change mods path

* Fix sprites not loading

* Minor adjustments, closes #1333

* Add support for loading atlases via mods

* Add support for loading mods from external sources in DEV

* Add confirmation when loading mods

* Fix circular dependency

* Minor Keybindings refactor, add support for keybindings to mods, add support for dialogs to mods

* Add some mod signals

* refactor game loading states

* Make shapez exports global

* Start to make mods safer

* Refactor file system electron event handling

* Properly isolate electron renderer process

* Update to latest electron

* Show errors when loading mods

* Update confirm dialgo

* Minor restructure, start to add mod examples

* Allow adding custom themesw

* Add more examples and allow defining custom item processor operations

* Add interface to register new buildings

* Fixed typescript type errors (#1335)

* Refactor building registry, make it easier for mods to add new buildings

* Allow overriding existing methods

* Add more examples and more features

* More mod examples

* Make mod loading simpler

* Add example how to add custom drawings

* Remove unused code

* Minor modloader adjustments

* Support for rotation variants in mods (was broken previously)

* Allow mods to replace builtin sub shapes

* Add helper methods to extend classes

* Fix menu bar on mac os

* Remember window state

* Add support for paste signals

* Add example how to add custom components and systems

* Support for mod settings

* Add example for adding a new item type

* Update class extensions

* Minor adjustments

* Fix typo

* Add notification blocks mod example

* Add small tutorial

* Update readme

* Add better instructions

* Update JSDoc for Replacing Methods (#1336)

* upgraded types for overriding methods

* updated comments

Co-authored-by: Edward Badel <you@example.com>

* Direction lock now indicates when there is a building inbetween

* Fix mod examples

* Fix linter error

* Game state register (#1341)

* Added a gamestate register helper

Added a gamestate register helper

* Update mod_interface.js

* export build options

* Fix runBeforeMethod and runAfterMethod

* Minor game system code cleanup

* Belt path drawing optimization

* Fix belt path optimization

* Belt drawing improvements, again

* Do not render belts in statics disabled view

* Allow external URL to load more than one mod (#1337)

* Allow external URL to load more than one mod

Instead of loading the text returned from the remote server, load a JSON object with a `mods` field, containing strings of all the mods. This lets us work on more than one mod at a time or without separate repos. This will break tooling such as `create-shapezio-mod` though.

* Update modloader.js

* Prettier fixes

* Added link to create-shapezio-mod npm page (#1339)

Added link to create-shapezio-mod npm page: https://www.npmjs.com/package/create-shapezio-mod

* allow command line switch to load more than one mod (#1342)

* Fixed class handle type (#1345)

* Fixed class handle type

* Fixed import game state

* Minor adjustments

* Refactor item acceptor to allow only single direction slots

* Allow specifying minimumGameVersion

* Add sandbox example

* Replaced concatenated strings with template literals (#1347)

* Mod improvements

* Make wired pins component optional on the storage

* Fix mod examples

* Bind `this` for method overriding JSDoc (#1352)

* fix entity debugger reaching HTML elements (#1353)

* Store mods in savegame and show warning when it differs

* Closes #1357

* Fix All Shapez Exports Being Const (#1358)

* Allowed setting of variables inside webpack modules

* remove console log

* Fix stringification of things inside of eval

Co-authored-by: Edward Badel <you@example.com>

* Fix building placer intersection warning

* Add example for storing data in the savegame

* Fix double painter bug (#1349)

* Add example on how to extend builtin buildings

* update readme

* Disable steam achievements when playing with mods

* Update translations

Co-authored-by: Thomas (DJ1TJOO) <44841260+DJ1TJOO@users.noreply.github.com>
Co-authored-by: Bagel03 <70449196+Bagel03@users.noreply.github.com>
Co-authored-by: Edward Badel <you@example.com>
Co-authored-by: Emerald Block <69981203+EmeraldBlock@users.noreply.github.com>
Co-authored-by: saile515 <63782477+saile515@users.noreply.github.com>
Co-authored-by: Sense101 <67970865+Sense101@users.noreply.github.com>
2022-02-01 16:35:49 +01:00
tobspr a7a2aad2b6 Minor wegame adjustments 2021-09-28 08:21:21 +02:00
tobspr 58fe6e2f51 Wegame adjustments 2021-09-18 19:17:27 +02:00
tobspr 0d1552e38c Merge branch 'master' of github.com:tobspr/shapez.io 2021-09-16 18:41:09 +02:00
tobspr 06011285d9 update translations 2021-09-16 18:41:07 +02:00
Andrei7506238 dae39dec9f
Update base-ro.yaml (#1299)
- Fixed some issues with previous translation
- Completed the translation of the base game to RO
- Translated the Puzzle DLC to RO

The translation is not always "mot-a-mot". It is rather an adaptation to RO (as some words in EN don't have a direct correspondent in RO). I tried to keep the same formating as before.
2021-09-14 08:43:11 +02:00
tobspr f483523f25 Merge branch 'master' of github.com:tobspr/shapez.io 2021-09-12 11:04:35 +02:00
tobspr 112e179bce Minor wegame adjustments 2021-09-12 11:04:32 +02:00
Erik 48ad65969e
Fix minor grammar fail. (#1297) 2021-09-12 10:55:48 +02:00
tobspr f00b8790bc Translation fixes 2021-09-02 16:25:47 +02:00
Kruger-Doggie c26496e7a7
updated base-en.yaml to new version (#1292) 2021-09-02 13:05:07 +02:00
dobidon 6c24730de7
Translating Turkish (base-tr.yaml) (#1294)
* Translating Turkish (base-tr.yaml)

- Translating additional keys

* Update base-tr.yaml
2021-09-02 13:04:34 +02:00
tobspr 2a51dad814 v1.4.4 2021-08-29 14:48:29 +02:00
tobspr 358754307a Fix balancers 2021-08-29 14:43:13 +02:00
Vincent Ching a71d5f3db9
Update base-zh-TW.yaml (#1287)
* Update base-zh-TW.yaml

fix some misleading translations (e.g. logic gate descriptions), try to re-use pointers from English translation to unify some terms and names,

* Update base-zh-TW.yaml

adding pointer and unifying terms, fixing descriptions

* Update base-zh-TW.yaml

update translations

* Update base-zh-TW.yaml

reward descriptions

* Update base-zh-TW.yaml

formatting item, reward descriptions
2021-08-29 12:33:57 +02:00
battistalonardi 53d31b32d5
Fix italian translation (#1289)
Added italian translation for text that were still in English. Made uniform translations for rotater and painter
2021-08-29 12:00:54 +02:00
tobspr ba92e556cc Merge branch 'master' of github.com:tobspr/shapez.io 2021-08-28 13:54:55 +02:00
tobspr f8609d75cd Update chinese translation 2021-08-28 13:54:52 +02:00
즈눅 e4cb2094dd
Translate 'clear belt' for korean (#1286) 2021-08-28 13:37:10 +02:00
tobspr da7494213d Update translations 2021-08-26 17:01:12 +02:00
tobspr 4546ca63c1 Fix ad provider 2021-08-26 14:47:28 +02:00
tobspr f61f25934f Add setting to always show shape tooltip 2021-08-26 14:29:22 +02:00
tobspr ae6c5b151e Improve shape tooltip 2021-08-26 14:24:09 +02:00
tobspr 2695694f50 Fix lint 2021-08-26 14:14:53 +02:00
tobspr abff623194 Show unrated puzzles different, dark theme adjustments 2021-08-26 09:11:56 +02:00
tobspr f3b82961dc Fix map chunk view 2021-08-26 09:04:46 +02:00
tobspr 874c792e4e Set 1.4.3 release date 2021-08-25 17:17:06 +02:00
tobspr 0bba4dc5fa Update changelog 2021-08-25 17:01:31 +02:00
tobspr 8b5cd160b6 DLC: Next Puzzle button & Search functionality, other stuff 2021-08-25 16:56:52 +02:00
tobspr 06d5c6a6dc Fixes & update changelog 2021-08-25 13:23:02 +02:00
PFedak 6f56d77535
Aggregate map chunks in overlay. (#1247)
Overlay rendering performance seemed bottlenecked by drawImage calls. To
reduce both the number of calls and the number of different source
buffers, cache overlay buffers for squares of chunks. This adds a very
small extra cost for updates (one additional drawImage) and some cost
for drawing chunks outside of view, but this is more than made up for by
the savings.

By default, the aggregate are 4x4 squares of chunks.
2021-08-25 13:04:52 +02:00
Emerald Block 2b4eb6771f
fix deselect on level up (#1033) 2021-08-25 12:59:03 +02:00
tobspr 993bd53a07 Shape tooltip adjustments 2021-08-25 12:55:59 +02:00
Sense101 4b36426a77
Added shape tooltip - final version (#1251)
* Added shape tooltip

* Shortened and simplified shape tooltip code

* added special logic for cutters so they remove overlays of empty outputs, and added clearing overlays on clear items
2021-08-25 11:56:29 +02:00
Sense101 736fbaed42
cleanup of trim code (#1283) 2021-08-24 19:38:16 +02:00
tobspr d3fb22a54a Further wegame version adjustments 2021-08-19 09:58:26 +02:00
tobspr ff47920e81 Further wegame adjustments 2021-08-18 17:22:50 +02:00
tobspr 0751eec7d5 Gamedistribution version adjustments 2021-08-17 21:13:32 +02:00
tobspr c4ef7d4431 wegame version adjustments 2021-08-17 19:51:28 +02:00
tobspr 012818841d Wegame version adjustments 2021-08-16 12:34:40 +02:00
tobspr aea668d7e3 Minor crosspromo update 2021-08-11 16:40:28 +02:00
tobspr 009e515336 Bump version, again 2021-08-11 16:36:17 +02:00
tobspr 24525344aa Do not show changelog yet 2021-08-11 16:31:26 +02:00
tobspr 14c6883fc4 Merge branch 'master' of github.com:tobspr/shapez.io 2021-08-11 16:27:43 +02:00
tobspr fb695d7413 Crosspromo 2021-08-11 16:27:39 +02:00
Ved-s 12783d5631
Update base-ru.yaml (#1278) 2021-08-06 14:55:55 +02:00
tobspr 2e245bda91 Fix wegame filter 2021-08-04 14:15:33 +02:00
tobspr e9db892399 Bump version 2021-08-04 13:46:42 +02:00
tobspr 97b44a8767 Merge branch 'master' of https://github.com/tobspr/shapez.io 2021-08-04 13:46:05 +02:00
tobspr 75b5f68ade Wegame version fixes 2021-08-04 13:45:40 +02:00
tobspr eb628526c9 Wegame adjustments 2021-08-04 13:44:02 +02:00
Stamen 354bb63b0a
Updated base-sr.yaml (#1275)
* Updated base-sr.yaml

Added all translations for Serbian language. This translation is, to my knowledge, 100% complete.

* Update base-sr.yaml

Fixed yamllint errors.
2021-08-04 12:55:45 +02:00
Stormweb b1b1f83782
Update base-nl.yaml (#1274)
* Update base-nl.yaml

New translation added

* Update base-nl.yaml

Fix #1194
2021-08-04 12:55:19 +02:00
tobspr 8547dc409d Merge branch 'master' of github.com:tobspr/shapez.io 2021-08-04 12:52:49 +02:00
tobspr 1b34346c0b Closes 1266 2021-08-04 12:52:45 +02:00
Michael Möller 9c5658c668
Mere dansk (#1264)
* Update base-da.yaml

* En hel del mere dansk

* Tweaked some translations

* Commit conflicts resolved

* Typos
2021-08-04 12:51:07 +02:00
Sense101 599cc7cf9f
fixed allowing puzzles which autocomplete (#1262) 2021-08-04 12:50:31 +02:00
tobspr d8b34ca438 Minor PR adjustments 2021-08-04 12:49:01 +02:00
PFedak e4f02abeb3
Simplify item processor slot logic. (#1257)
Track input slot assignment by array index rather than including extra
data in a new object. This greatly reduces the amount of garbage
generated by tryTakeItem and other item process operations.
2021-08-04 12:34:15 +02:00
Emerald Block 0a15958af9
Highlight focused text inputs, Show old signal (#1255)
* provide previous key when editing signal

* highlight text in focused text input
2021-08-04 12:19:58 +02:00
Alexis c11f571dd2
Update base-fr.yaml (#1191)
* Update base-fr.yaml

I added some translations for the puzzle mode and fixed some spelling and grammar errors made on previous traductions.

* Update base-fr.yaml

Many other translations (including puzzle mode) and some corrections

* Update base-fr.yaml

Many other translations (including puzzle mode) and some corrections

* Update base-fr.yaml

Some corrections

* Update base-fr.yaml

Some translations made on untranslated texts
2021-08-04 12:14:33 +02:00
Allie c99992aedd
docs: fix gitpod link (#1277)
The from-referrer goes to gitpod.io/#https://github.com so I changed it to be the actual repo
2021-08-04 12:13:26 +02:00
Sense101 260041702b
Hotfix to prevent pasting locked buildings (#1272)
* fix to prevent pasting locked buildings

* only check when in editor
2021-07-28 09:20:08 +02:00
tobspr 62b6504917 Fix wegame sdk 2021-07-15 19:33:02 +02:00
tobspr a1c6a99df0 Update wegame sdk to latest version 2021-07-06 15:51:39 +02:00
Stan e8cd01e8e0
Just a little typo (#1252)
This isn't of any significance, but I figured why not.
2021-07-01 13:24:10 +02:00
Galo223344 d5fed6794d
Update base-es.yaml (#1249) 2021-06-30 10:28:36 +02:00
tobspr 87152d000a Merge branch 'master' of https://github.com/tobspr/shapez.io 2021-06-30 10:17:18 +02:00
tobspr 232ad79c02 Demo version adjustments 2021-06-30 10:17:16 +02:00
tobspr cc044e2547 Fix translation 2021-06-27 16:00:16 +02:00
RevosCZ 838deb380f
Update base-cz.yaml (#1244)
Translated the additional lines.
2021-06-27 15:54:14 +02:00
즈눅 efa2bfcea8
Update base-kor.yaml for DLC-related texts (#1243) 2021-06-27 15:54:00 +02:00
Der Feldspatz 3c0a544f03
Update base-de.yaml (#1241)
* sort, streamline and correct german translation

* fix spelling mistake

* Trim trailing whitespace in base-tr.yaml

* Minor spelling fixes in german translation

Co-authored-by: BuildTools <unconfigured@null.spigotmc.org>
2021-06-27 15:53:47 +02:00
즈눅 82a9ada891
Update base-kor.yaml (#1242) 2021-06-27 15:53:35 +02:00
tobspr 479539d9b8 Properly activate Puzzle DLC on steam version (Fixes having to activate it manually in some cases) 2021-06-27 15:52:37 +02:00
tobspr b6de716bee Clean up links 2021-06-25 19:29:23 +02:00
tobspr dba91fa50c Merge branch 'master' of https://github.com/tobspr/shapez.io 2021-06-25 16:31:56 +02:00
tobspr db355da09e Minor puzzle control refactoring 2021-06-25 16:31:54 +02:00
DirkieDurky 79e8bd3196
Update translations (#1237)
New translations updated and fixed typing error
2021-06-25 16:20:20 +02:00
Kruger-Doggie 6ec2ff5d52
Updated base-de.yaml (#1232)
* Updated base-de.yaml

- Missing translations added
-Typing errors (from me) fixed

* Update base-de.yaml
2021-06-25 16:20:02 +02:00
Barış Can Yılmaz 8e8133ac15
fix turkish translation (#1228)
fixed typoes and translated english texts
2021-06-25 16:19:30 +02:00
Sense101 5fb7bb0586
Minor goal acceptor adjustments to help prevent backing up belts to complete (#1236)
* added the new splitter

* Update base-en.yaml

* added the new splitter

Update changelog and update translation regarding 20 upgrade tiers, closes #907

* Update base-en.yaml

* minor goal acceptor adjustments to help prevent backing up belts to complete

* removed gap between completion and fill as it doesn't look nice

* removed api override

* fixed mistake with fill percentage

* Allowed for copying acceptors to remember the required shape

* further adjusted required items, so it looks a bit nicer
2021-06-25 16:16:09 +02:00
tobspr 285dd3840d Some fixes 2021-06-25 16:15:05 +02:00
tobspr 6359bbeadf Update changelog 2021-06-25 16:10:27 +02:00
Sense101 a75a880126
Fixed blueprint not properly clearing on right click (#1235)
* added the new splitter

* Update base-en.yaml

* added the new splitter

Update changelog and update translation regarding 20 upgrade tiers, closes #907

* Update base-en.yaml

* fixed blueprints not clearing properly
2021-06-25 16:08:00 +02:00
Thomas (DJ1TJOO) aa553e63eb
Fixed when achievements are given on levels (#1233)
Co-authored-by: TcePrepK <TcePrepK@users.noreply.github.com>

Co-authored-by: TcePrepK <TcePrepK@users.noreply.github.com>
2021-06-25 16:06:50 +02:00
tobspr 5074727efa Update translations and changelog 2021-06-24 19:16:10 +02:00
Sooxin 3cc179e283
Replace some punctuation marks by Chinese version and optimize format (#1225) 2021-06-24 19:15:39 +02:00
Kruger-Doggie d4ef3a3a5e
Updated base-de.yaml (#1231)
Missing translations for Puzzle DLC added
2021-06-24 19:15:16 +02:00
YJSoft 4c2d1ba2d3
Fix korean translation (#1224) 2021-06-24 19:14:17 +02:00
dobidon 8eedd52963
Update base-tr.yaml (#1223)
* Update base-tr.yaml

* Update base-tr.yaml

Fixing YAML Syntax Error
2021-06-24 19:14:06 +02:00
Gumball73 bee3e6c626
Update base-pt-PT.yaml (#1222) 2021-06-24 19:13:53 +02:00
tobspr 7b18d54cbe Minor PR adjustments 2021-06-24 19:13:21 +02:00
tobspr d24a4a848e Merge branch 'master' of https://github.com/tobspr/shapez.io 2021-06-24 18:46:49 +02:00
tobspr 9703187105 Start changelog for 1.4.2 2021-06-24 18:46:47 +02:00
Sense101 f7cc313ff4
Add back copy/paste in puzzle mode. (#1230)
* added the new splitter

* Update base-en.yaml

* added the new splitter

Update changelog and update translation regarding 20 upgrade tiers, closes #907

* Update base-en.yaml

* Added back copy/paste in puzzle mode

* fixed rotating non-rotatable buildings as blueprints and made blocker non-rotatable
2021-06-24 18:45:48 +02:00
Sense101 1c23549b39
Added a button to clear all non fixed buildings in both modes (#1229)
* added the new splitter

* Update base-en.yaml

* added clear buildings button to both game modes

* Minor cleanups and added translation for new button
2021-06-24 18:41:37 +02:00
Sense101 6efbdc6ad1
Fix for cheating puzzles by quickly switching belts (#1226)
* added the new splitter

* Update base-en.yaml

* adjusted how acceptor works to fix macro

* fixed a minor bug

* applied changes to the puzzle-editor-review script

* minor cleanups
2021-06-24 18:39:50 +02:00
Thomas (DJ1TJOO) 68f208181d
Added puzzle translations (#1220)
Removed inconsistencies in formal and informal language
2021-06-23 08:04:28 +02:00
lotgood 53b321422a
Update base-kor.yaml (#1219)
make to 100% translite
2021-06-23 08:04:06 +02:00
Andrea Nardecchia 0a1004aa7a
Italian translation addendum (#1218)
* Italian translation addendum

Added translation for the last added part

* Italian translation addendum

Fixed YAML warning

* Italian translation addendum

Fixed YAML error

* Fixed missing suff, again (italian)

Translated a missing section

* Fix typos

* Typo
2021-06-23 08:03:42 +02:00
tobspr 1290ae9af4 Rename "Official" to "Tutorial" to avoid confusions 2021-06-23 08:02:14 +02:00
tobspr 7042afed84 Merge branch 'master' of https://github.com/tobspr/shapez.io 2021-06-23 07:59:06 +02:00
tobspr d7abdfef90 Try out new DLC ownership checkling 2021-06-23 07:59:03 +02:00
tobspr 6fa878109d Fix typo 2021-06-22 15:16:18 +02:00
tobspr acc25a93f0 Add hint about activating the DLC 2021-06-22 15:13:22 +02:00
tobspr 10428ec6b9 Fix "disableGrid" option causing glitches in the puzzle dlc 2021-06-22 14:37:03 +02:00
tobspr 5b035d7778 Merge branch 'master' of https://github.com/tobspr/shapez.io 2021-06-22 11:22:51 +02:00
tobspr 6d3faabce5 v1.4.1 2021-06-22 11:22:49 +02:00
RevosCZ 1fa2ce29f9
Update base-cz.yaml (#1217)
* Update base-cz.yaml

Translated the additional lines for puzzle DLC.

* Update base-cz.yaml
2021-06-22 00:01:38 +02:00
NullTesla a2c9b1cbda
Update base-ru.yaml (#1216)
* Update base-ru.yaml

* Update base-ru.yaml
2021-06-21 13:40:26 +02:00
Intron014 704f850905
Update base-es.yaml (#1215) 2021-06-21 13:40:12 +02:00
tobspr cab21a43ca Update translations 2021-06-21 13:39:55 +02:00
tobspr af05a997d8 Update blueprint previews 2021-06-20 19:05:24 +02:00
tobspr 66d01f6f3f Update music 2021-06-20 18:55:45 +02:00
tobspr 59156c7a03 Update translation files, again 2021-06-20 17:43:00 +02:00
tobspr cc3242011f Allow deleting puzzles 2021-06-20 17:42:44 +02:00
tobspr 2765e6e81d Merge branch 'master' of https://github.com/tobspr/shapez.io 2021-06-20 17:15:43 +02:00
tobspr a5879b2123 Update translations 2021-06-20 17:15:10 +02:00
Intron014 d70fa78ff2
Update base-es.yaml (#1214)
* Translation of Logging in

* Typo fixed
2021-06-20 12:43:29 +02:00
Lejo 540b4b8742
Fix docker image (#1213) 2021-06-20 12:43:15 +02:00
tobspr 4e763ae93a Merge branch 'master' of https://github.com/tobspr/shapez.io 2021-06-20 11:53:50 +02:00
tobspr c6bb1a22fb Bugfix backport 2021-06-20 11:53:37 +02:00
tobspr 39d6d3d565 Minor adjustments, add "trending weekly" 2021-06-20 11:50:36 +02:00
tobspr 8149ba875b Minor artwork adjustments 2021-06-19 17:46:28 +02:00
tobspr 416f89bbf4 - Puzzle DLC browser improvements / new categories
- Fix errors not being thrown sometimes
- Minor other stuff
2021-06-19 17:16:01 +02:00
tobspr 978c07ccc4 Fix typo 2021-06-19 16:20:04 +02:00
tobspr cc49e3ccc3 Fix translations 2021-06-19 16:19:40 +02:00
Andrea Nardecchia 3cfa016e54
Italian puzzle translation (#1211)
* Italian puzzle translation

Notes for reviewers:
-Celebs comments are not translated
-Bad puzzle title has been translated with a more generic loading failed
-I left "Puzzle DLC" everywhere even if not quite correct in Italian as it is found as such on steam
-Backend error types are not translated

* Update base-it.yaml
2021-06-19 16:18:26 +02:00
Jesús Lapastora d74d58afb7
Fixed `compressInt` cache bug (#1210)
Now `compressInt` uses the cache properly.
2021-06-19 16:17:42 +02:00
Yalun Hsu 4608f33c03
Correct zh-TW translation (#1208)
`painter` should be `上色機`
`切割機`  means `cutter` in zh-TW
2021-06-19 16:15:34 +02:00
DyDyou 3f273b41dc
Update base-fr.yaml (#1207)
* Update base-fr.yaml

i updated all translations of the puzzleMenu (French)  and how could i please if the translations are aprouved.

* Update base-fr.yaml

I heard the suggestions and modified some errors, thank you.
2021-06-19 16:15:17 +02:00
Roland Szabó d6e07b27c8
Dlc hungarian translation (#1206)
* WIP

* DLC Hungarian Translation
2021-06-19 16:14:43 +02:00
NullTesla 9715fc1563
Update base-ru.yaml (#1205)
Translation of Puzzle DLC.
2021-06-19 16:14:18 +02:00
Jesús Lapastora 3739f3c999
base-es.yaml updated (#1202)
* added puzzle DLC translations; fixed a couple

* added puzzle DLC translations; fixed a couple

* Fix YAML Syntax

L79: Had 6 spaces, replaced with 8 spaces (2 tabs), which was the
original indent.

* Fixed `short key` translation

The translation for `short key` didn't fit very well its meaning,
it was too literal. I've updated it with something that makes more
sense.
2021-06-19 13:31:24 +02:00
Glenn Martin Jensen 1183390603
Update Norwegian Translation (#1199)
* Update Norwegian Translation

Update Norwegian Translation

* Update base-no.yaml

* Update base-no.yaml
2021-06-19 13:30:35 +02:00
YJSoft 5629a50842
kor translation for Puzzle DLC (#1198)
I also translated missing translation for wire update
2021-06-19 13:29:54 +02:00
DirkieDurky 030356e053
Fixed slight mistakes (#1196)
Fixed some slight grammar mistakes, inconsistencies and made things sound better
2021-06-19 13:27:36 +02:00
dobidon c054ad6bd2
Base-tr.yaml Puzzles Translations (#1195)
* Base-tr.yaml Puzzles Translations

- Translated Puzzles DLC Additions

Discussion:
- Unsure about Line 429 Trim Zone.

* Update base-tr.yaml
2021-06-19 13:26:59 +02:00
RevosCZ f6829f29bc
Update base-cz.yaml (#1189)
* Update base-cz.yaml

* Update base-cz.yaml

* Update base-cz.yaml

* Update base-cz.yaml

* Update base-cz.yaml

* Update base-cz.yaml

* Update base-cz.yaml

* Update base-cz.yaml

* Update base-cz.yaml
2021-06-19 13:22:32 +02:00
GalaxyGamingBoy d160390421
Update base-el.yaml (#1188)
I added some general and puzzle translations
2021-06-19 13:20:12 +02:00
Jeremy Meissner 0555ebbaa7
Update base-fr.yaml (#1187) 2021-06-19 13:19:46 +02:00
HY0077 e765286ad2
Update base-de.yaml (#1183)
* Update base-de.yaml

* Update base-de.yaml

Müsste jetzt passen

* Update base-de.yaml
2021-06-19 13:19:23 +02:00
tobspr b2c9a7715c Merge branch 'master' of https://github.com/tobspr/shapez.io 2021-06-19 13:18:40 +02:00
tobspr e4c1355e9c Query login token for puzzle DLC api 2021-06-19 13:18:38 +02:00
Debucquoy Anthony tonitch 1046e7d4bd
Update base-fr.yaml (#1186) 2021-06-04 13:53:50 +02:00
RevosCZ 784680381b
Update base-cz.yaml (#1185)
* Update base-cz.yaml

* Update base-cz.yaml

* Update base-cz.yaml

* Update base-cz.yaml
2021-06-04 13:53:35 +02:00
Henning 1c35a3038c
Update base-de.yaml (#1184)
Ich habe item(s) nicht übersetzt, da es im allgemeinen Sprachgebrauch recht häufig vorkommt. Außerdem bin ich mit der Übersetzung von "goal acceptor" noch nicht ganz zufrieden.
2021-06-04 13:52:46 +02:00
tobspr 276ff22027 Merge branch 'master' of https://github.com/tobspr/shapez.io 2021-06-04 11:56:08 +02:00
tobspr a4b122a91c Preparations for 1.4.0 2021-06-04 11:56:05 +02:00
horsse 273342caf0
Update base-pt-BR.yaml for the Puzzle DLC. (#1178)
* Update base-pt-BR.yaml for the Puzzle DLC.

I updated the Brazilian Portuguese translation of the Puzzle DLC. It's my first time working with translation on GitHub so some things might not be perfect.

* Update base-pt-BR.yaml

* Update base-pt-BR.yaml for the Puzzle DLC.

More translation for the Puzzle DLC.

* Update base-pt-BR.yaml for the Puzzle DLC.

Just some corrections/improvements

* Update base-pt.BR.yaml

More improvements

* Update base-pt-BR.yaml

fixed double space
2021-06-04 11:55:41 +02:00
Gumball73 b6b2b873cc
Update base-pt-PT.yaml (#1177)
* Update base-pt-PT.yaml

* Update base-pt-PT.yaml
2021-06-04 11:55:21 +02:00
Thomas (DJ1TJOO) 58cdc8f348
Translated Puzzle DLC (#1176)
* Translated Puzzle DLC

Translated all puzzle dlc text

If you find any spelling mistakes or sentences that sound weird please correct me. 
Also I couldn't find a better names for the new buildings:
Constant Producer --> Constante Producent
Goal Acceptor --> Doel Acceptant
Block --> Muur

* Made names consistent

* Fixed some lint issues

* Changed the name for block from muur to blokkade

* Doel Acceptant --> Ontvanger
2021-06-04 11:54:55 +02:00
tobspr 291614cb3c Support for building wegame specific version 2021-05-25 21:29:44 +02:00
tobspr 56214defaf Support for building on non-steam platforms 2021-05-25 13:12:38 +02:00
tobspr 6e9fa89792 Start to prepare wegame build 2021-05-25 13:09:33 +02:00
tobspr a3fb3c432a Fix another bug 2021-05-25 12:09:54 +02:00
tobspr 7537494226 Merge branch 'master' of https://github.com/tobspr/shapez.io 2021-05-25 09:44:41 +02:00
tobspr 253b8cf33d Update chinese translation 2021-05-25 09:44:39 +02:00
tobspr 0f5ec8b62a Fix gulpfile tasks 2021-05-25 09:42:30 +02:00
tobspr f5d03ae027 Localized puzzle dlc logo 2021-05-25 09:24:53 +02:00
tobspr b3d1204d9c Wegame version & DLC Translation in Chinese 2021-05-25 09:19:57 +02:00
tobspr 65721e0837 Fix savegame bugs 2021-05-24 16:47:36 +02:00
tobspr e1e27b4822 Update translations for the puzzle dlc 2021-05-23 20:19:50 +02:00
tobspr a0e1cb68aa Fix bugs found during testing 2021-05-23 20:19:43 +02:00
tobspr 42af2b63d6 Authorize via steam 2021-05-23 17:28:39 +02:00
tobspr 329cefb3c9 Authorize via steam for the puzzle api 2021-05-23 17:34:13 +02:00
tobspr ec4d198df3 Preparations for the puzzle DLC 2021-05-23 17:03:59 +02:00
tobspr 3c3cb5924f Fix typo 2021-05-23 16:40:09 +02:00
TimerErTim b259c7576a
Fix formatItemsPerSecond with double = true (#1148)
* Show double flag with items per second being 1

formatItemsPerSecond in utils.js does not indicate two items being processed in a building
if speed is exactly one item per second. That is now fixed.

* Fix code style to fit guidelines
2021-05-23 16:39:34 +02:00
Vilser1 3363255984
Update base-uk.yaml (#1166)
I dont really know how to do "yarn syncTranslations" so...
2021-05-23 16:37:04 +02:00
AlvarGD 8a4f7efebe
Update base-es.yaml (#1162)
HUB -> Centro 
HUD -> Interfaz (almost no-one that knows spanish uses "HUD")
All (hopefully) things that weren't translated now are
Decimals and thousands are now how they should be in spanish: 1.000.000,69
2021-05-23 16:36:37 +02:00
Alexander Munko b4d96b45b5
Update Russian translation (#1161)
* Update Russian translation

Fix typos;
Restore the order of keys;
Add missing translations.

* Fix typo style
2021-05-23 16:36:09 +02:00
KapitanOczywisty 276a468384
Update base-pl.yaml (#1160)
Left output - Lewe wyjście
2021-05-23 16:35:42 +02:00
Quantum 0701287407
Update base-kor.yaml (#1152) 2021-05-23 16:34:57 +02:00
SinonJZH 4beebf22a9
Update base-zh-CN.yaml (#1118)
Fix some translation error.
2021-05-23 16:33:40 +02:00
Chris Ho 09c2320f55
Update base-zh-TW.yaml (#1114)
* Update base-zh-TW.yaml

* Update base-zh-TW.yaml
2021-05-23 16:33:17 +02:00
tobspr 931c8a5821
Puzzle DLC (#1172)
* Puzzle mode (#1135)

* Add mode button to main menu

* [WIP] Add mode menu. Add factory-based gameMode creation

* Add savefile migration, serialize, deserialize

* Add hidden HUD elements, zone, and zoom, boundary constraints

* Clean up lint issues

* Add building, HUD exclusion, building exclusion, and refactor

- [WIP] Add ConstantProducer building that combines ConstantSignal
and ItemProducer functionality. Currently using temp assets.
- Add pre-placement check to the zone
- Use Rectangles for zone and boundary
- Simplify zone drawing
- Account for exclusion in savegame data
- [WIP] Add puzzle play and edit buttons in puzzle mode menu

* [WIP] Add building, component, and systems for producing and
accepting user-specified items and checking goal criteria

* Add ingame puzzle mode UI elements

- Add minimal menus in puzzle mode for back, next navigation
- Add lower menu for changing zone dimenensions

Co-authored-by: Greg Considine <gconsidine@users.noreply.github.com>

* Performance optimizations (#1154)

* 1.3.1 preparations

* Minor fixes, update translations

* Fix achievements not working

* Lots of belt optimizations, ~15% performance boost

* Puzzle mode, part 1

* Puzzle mode, part 2

* Fix missing import

* Puzzle mode, part 3

* Fix typo

* Puzzle mode, part 4

* Puzzle Mode fixes: Correct zone restrictions and more (#1155)

* Hide Puzzle Editor Controls in regular game mode, fix typo

* Disallow shrinking zone if there are buildings

* Fix multi-tile buildings for shrinking

* Puzzle mode, Refactor hud

* Puzzle mode

* Fixed typo in latest puzzle commit (#1156)

* Allow completing puzzles

* Puzzle mode, almost done

* Bump version to 1.4.0

* Fixes

* [puzzle] Prevent pipette cheats (miners, emitters) (#1158)

* Puzzle mode, almost done

* Allow clearing belts with 'B'

* Multiple users for the puzzle dlc

* Bump api key

* Minor adjustments

* Update

* Minor fixes

* Fix throughput

* Fix belts

* Minor puzzle adjustments

* New difficulty

* Minor puzzle improvements

* Fix belt path

* Update translations

* Added a button to return to the menu after a puzzle is completed (#1170)

* added another button to return to the menu

* improved menu return

* fixed continue button to not go back to menu

* [Puzzle] Added ability to lock buildings in the puzzle editor! (#1164)

* initial test

* tried to get it to work

* added icon

* added test exclusion

* reverted css

* completed flow for building locking

* added lock option

* finalized look and changed locked building to same sprite

* removed unused art

* added clearing every goal acceptor on lock to prevent creating impossible puzzles

* heavily improved validation and prevented autocompletion

* validation only checks every 100 ticks to improve performance

* validation only checks every 100 ticks to improve performance

* removed clearing goal acceptors as it isn't needed because of validation

* Add soundtrack, puzzle dlc fixes

Co-authored-by: Greg Considine <gconsidine@users.noreply.github.com>
Co-authored-by: dengr1065 <dengr1065@gmail.com>
Co-authored-by: Sense101 <67970865+Sense101@users.noreply.github.com>
2021-05-23 16:32:05 +02:00
GorunmezBKZ 5f0a95ba11
Update base-tr.yaml (#1125)
* Update base-tr.yaml

Changed wrong translations and misspellings

* Fixed yaml errors

* Update base-tr.yaml
2021-03-26 15:49:00 +01:00
cojua8 dd93fe630e
Update base-es.yaml (#1123)
fixed wires tutorial typos
2021-03-26 15:48:48 +01:00
Komanc a03e5fb0ca
Fix czech grammar (#1120) 2021-03-26 15:48:38 +01:00
Hüseyin Can Ergün a0d7d9d383
Update base-tr.yaml (#1116)
Köprü means bridge it should be tünel
2021-03-26 15:48:22 +01:00
dobidon 7ff76c76c4
Update base-tr.yaml (#1115)
- Translating new steamPage keys.
2021-03-26 15:48:12 +01:00
HY0077 6a62ec8f63
Update base-de.yaml (#1111)
* Update base-de.yaml

I translated some things to german.

* Update base-de.yaml

* Update base-de.yaml
2021-03-16 18:08:39 +01:00
Thomas (DJ1TJOO) 22b8777aa0
Changed electron fs-job to invoke, for simplefying storage (#1106)
* Changed electron fs-job to invoke, for simplefying storage
(And it helps for the modloader)

* Reverted some unneeded chages

* Uploaded wrong file

* Removed uneeded promise
2021-03-16 17:59:23 +01:00
Greg Considine 7f2132d763
Fix 'Oops' achievement shape validation (#1113) 2021-03-16 17:58:37 +01:00
Lincoln V Schreiber ed89d67773
Update base-pt-BR.yaml (#1108)
* Update base-pt-BR.yaml

Some changes in the use of the word "hotkey" and translation of the comments.

* Update base-pt-BR.yaml

* Update base-pt-BR.yaml
2021-03-16 09:52:00 +01:00
Mutt cce8a92d33
Update base-ind.yaml (#1107)
translated new section
2021-03-16 09:51:47 +01:00
Hermanni Saresma b105cac3ee
Update base-fi.yaml (#1098)
Translated the new content in lines 632-637 and 955-972. Also fixed some awkward translations to more fitting ones from before, now that I've played the game more
2021-03-16 09:44:50 +01:00
Rijicho 25f8f7d9c3
Update Japanese translation (#1097)
- Translated the added texts.
- Renamed Color Mixer from "混合機" to "混色機" because the former has only represented "Mixer".
- Fixed some wrong or incomprehensible texts (e.g. the information about tick-rate setting). 
- Fixed some inconsistency and redundancy.
2021-03-16 09:44:36 +01:00
Tobias Springer 5a3da57f10 Fix missing dependencies, autoformat 2021-03-14 09:52:15 +01:00
Tobias Springer ab2beaab49 Update changelog 2021-03-14 09:07:27 +01:00
Tobias Springer 858057c5a9 Switch to electron 10 2021-03-14 08:56:48 +01:00
tobspr 3d9c8f591d Merge branch 'master' of https://github.com/tobspr/shapez.io 2021-03-14 08:51:13 +01:00
tobspr 5dddb846ef Attempt #1 on preserving savegame files 2021-03-14 08:51:10 +01:00
Rijicho 7ed6a9c7b6
Revert some inappropriate updates on Japanese tips (#1096)
Some Japanese translations of tips were updated by the commit 65d4c64, but it was just deletion and English duplication of some existing tips, so I fixed them in accordance with the latest English tips.
2021-03-13 17:12:43 +01:00
tobspr 71d5b02e02 Fix spelling mistake in changelog 2021-03-13 08:11:12 +01:00
tobspr 27d94bd29c Merge branch 'master' of https://github.com/tobspr/shapez.io 2021-03-12 20:31:53 +01:00
tobspr 38bb393190 Disable nft until properly announced 2021-03-12 20:31:50 +01:00
Gumball73 2cbda7f9f6
Update base-pt-PT.yaml (#1095)
* Update base-pt-PT.yaml

* Update base-pt-PT.yaml
2021-03-12 18:55:32 +01:00
tobspr 89b99c74ce Fix achievements bug 2021-03-12 13:28:42 +01:00
tobspr 4bc918dedd Add finish, italian, romania, ukrainian, minor adjustments 2021-03-12 12:42:16 +01:00
tobspr 65d4c64ae5 Update translations 2021-03-12 11:18:43 +01:00
Rijicho b6b738a598
Update Japanese translation (#1090)
* Update Japanese translation

Fixed some spelling inconsistencies, typos and unnatural expressions in Japanese translation file.
Also, the spaces after the exclamation marks are unified to full-width, which is a custom of Japanese writing.

* Removed trailing-space

yaml-lint test has notified me the error.
2021-03-12 10:59:26 +01:00
Ved-s 95464db91a
Fixed small typo (#1089)
Fixed small typo in lvl3 description
2021-03-12 10:58:49 +01:00
Garrow Bedrossian d887439966
Set building rotation with arrow keys ⬆⬇⬅➡ (#1074)
* Set building rotation with arrow keys ⬆⬇⬅➡

Adds 4 default keybinds to quickly set building rotation in each of the
four cardinal directions - up, down, left, and right - using the arrow keys.

* Address feedback, remove needless else
2021-03-11 13:48:10 +01:00
Greg Considine d1ef3f834e
Fix/achievements (#1091)
* [WIP] Fix achievements with unlock attempt on init. Fix lint

* Add init checks for more achievements

* Fix tslint errors

* Update CI step to include config.local copy from template if not present
2021-03-11 06:11:29 +01:00
Tobias Springer 4685f813e8 Achievements, fix no. 2 2021-03-10 12:50:43 +01:00
Tobias Springer f83e9f0fb8 Multiple fixes to the achievements 2021-03-10 11:59:47 +01:00
Tobias Springer c6e18e9beb Minor release adjustments 2021-03-10 10:49:54 +01:00
Tobias Springer dfd64a901b Minor marketing adjustments 2021-03-10 10:10:18 +01:00
Tobias Springer 226149a40f Prepare the achievements update 2021-03-10 09:29:20 +01:00
Rijicho 837b0d8007
Update Japanese translation of tips (#1088)
fixed some strange/duplicated/ambiguous Japanese texts in tips.
2021-03-10 07:34:39 +01:00
hcanergun 6c46c3a5bc
Update base-tr.yaml (#1086)
Some "i" letters in the translation were capitalized
+  there were one english word fixed that tho
2021-03-10 07:34:13 +01:00
Greg Considine 26b842494f
Achievements (#1087)
* [WIP] Add boilerplate for achievement implementation

* Add config.local.template.js and rm cached copy of config.local.js

* [WIP] Implement painting, cutting, rotating achievements (to log only)

* [WIP] Refactor achievements, jsdoc fixes, add npm script

- Refactor achievements to make use of Signals
- Move implemented achievement interfaces to appropriate
platform folders (SteamAchievements in currently in use
in browser wrapper for testing)
- Fix invalid jsdocs
- Add dev-standalone script to package.json scripts

* Add steam/greenworks IPC calls and optional private-artifact dependency

* Include private artifacts in standalone builds

* Uncomment appid include

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

* Update electron, greenworks. Add task to add local config if not present

* Add more achievements, refactor achievement code

* Add receiver flexibility and more achievements
- Add check to see if necessary to create achievement and add receiver
- Add remove receiver functionality when achievement is unlocked

* Add achievements and accommodations for switching states
- Fix startup code to avoid clobbering achievements on state switch
- Add a few more achievements

* Add achievements, ids. Update names, keys for consistency

* Add play time achievements

* [WIP] Add more achievements

* Add more achievements. Add bulk achievement check signal

* [WIP] Add achievements. Start savefile migration

* Add achievements. Add savefile migration

* Remove superfluous achievement stat

* Update lock files, fix merge conflict
2021-03-10 07:33:39 +01:00
Tobias Springer afdce2268e Minor path fixes 2021-03-09 11:44:12 +01:00
Tobias Springer 1ee03d7398 Adjustments to support chinese versions 2021-03-09 10:07:19 +01:00
tobspr e53ec8d6af Update chinese translation 2021-03-08 11:59:45 +01:00
anitmyan 0b18cedd81
Update base-ja.yaml (#1085)
Changed ベルトリーダ to ベルトリーダー
2021-03-08 11:01:34 +01:00
hcanergun 3f7b0053c3
Update base-tr.yaml (#1083)
Dödürcü was wrong for rotator there was typo it should be "Döndürücü"
2021-03-08 11:01:21 +01:00
RevosCZ b03f117728
Update base-cz.yaml (#1080)
* Update base-cz.yaml

Decided to solve the issue with the picture overlapping the name of buildings by shortening the words into shortcuts.

* Update base-cz.yaml
2021-03-08 11:01:04 +01:00
Flipper5201 24240d514b
massCutConfirm, line 187 (#1079)
This should translated to (<count> w roli ścisłości), not (<count> gwoli ścisłości).
2021-03-08 11:00:45 +01:00
RevosCZ 8850ab6c08
Update base-cz.yaml (#1075)
* Update base-cz.yaml

Nothing special, just noticed a missing gap :D

* Update base-cz.yaml
2021-03-04 07:00:55 +01:00
coderadu 14d09a7d52
Translated more and made it more understandable (#1068) 2021-02-11 13:06:19 +01:00
Atum d1d91dcf3c
Portuguese translation fixes (#1064)
Some more fixes i came across on the Portuguese translation, typos and suggestions
2021-02-03 09:25:54 +01:00
Fernando 1ab3c8c05d
translated what was missing for PT-BR (#1060) 2021-02-03 09:25:15 +01:00
Specter711497 aa4949c90f
Update base-zh-TW.yaml (#1057)
912  - 地圖永遠部會自然生成完整的風車圖形。is not correct.
        - 地圖永遠不會自然生成完整的風車圖形。is correct.
2021-01-17 15:16:29 +01:00
tobspr 5a928a8ad3 Merge branch 'master' of https://github.com/tobspr/shapez.io 2021-01-17 15:14:32 +01:00
tobspr d8261a0b31 Closes #1052 2021-01-17 15:14:29 +01:00
Gumball73 abb7ac782d
Update base-pt-PT.yaml (#1046)
Fix some typos.
2021-01-02 10:30:41 +01:00
Kexogg 38a69fbd38
Update base-ru.yaml (#1038)
Fixed incorrect description of Tick Rate, added new translations. 

If possible, please change fallback for cyrillic font. It's literally Times New Roman (in-game)
2020-12-29 10:40:46 +01:00
dengr1065 6f486767b6
SCSS: Fix refactoring variable name (#1042) 2020-12-29 10:39:52 +01:00
dengr1065 b51c0fdbd4
Replace gulp-sass with gulp-dart-sass (#1036) 2020-12-25 22:57:57 +01:00
imreallybadatnames™️ 9b5811b874
fix "banancer" typo (#1030)
* fix "banancer" typo

* fix confusion "and output everything else on the right"

changed from "right" to "left" like in the original text

* translate logic gate names
2020-12-21 10:49:35 +01:00
Citron b41a0ca1cb
Minor translation fix (#1022)
* Update base-pt-BR.yaml

Typo fix

* Update base-pt-BR.yaml

Minor translations and a typo fix.

* Update base-pt-BR.yaml

Removed untranslated text
2020-12-10 15:53:45 +01:00
tobspr c9cee9d22b Fix typo 2020-12-09 14:03:53 +01:00
Mironov Danil 117afd3291
Update base-ru.yaml (#1019)
Changes in tips: 1 typo, removed 1 English phrase (this phrase was in Russian here) and some other changes.
2020-12-09 10:44:59 +01:00
tobspr aa2b64eae5 Fix items overlapping sometimes, fix constant signal being editable 2020-12-09 10:41:49 +01:00
tobspr 22735591e9 Minor hotfixes 2020-12-07 20:14:23 +01:00
tobspr b5a96a91a9 Merge branch 'master' of https://github.com/tobspr/shapez.io 2020-12-07 19:37:57 +01:00
tobspr 46e53244d4 display version in main menu 2020-12-07 19:37:55 +01:00
Fernando Zanutto 90eb088e76
Update base-pt-BR.yaml (#1013) 2020-12-07 19:31:27 +01:00
tobspr 2b685ee98c Merge branch 'master' of https://github.com/tobspr/shapez.io 2020-12-07 19:30:40 +01:00
tobspr cf22c7d984 Fix save icon not matching up, closes #1010, closes #905 2020-12-07 19:30:38 +01:00
JoaoP22 813fb941a7
Update base-pt-br.yaml (#1009)
I updated some translations
2020-12-07 19:26:25 +01:00
Yami Odymel 6572d68d7d
Localized base-zh-TW.yaml (#1003)
The words in the file were based on Chinese localization which doesn't fit the best for Taiwanese locale. This change modified the words below:

傳送帶 → 輸送帶
當前 → 目前
鼠標 → 游標
觸控板 → 軌跡板
屏幕 → 螢幕
導入 → 匯入
刷新率 → 更新率
信息 → 資訊
攝像頭 → 視角
設置 → 設定
性能 → 效能
創建 → 建立
獲取 → 取得
加載 → 載入
教程 → 教學
2020-12-07 19:26:12 +01:00
Gumball73 ddf3e56f8d
Update base-pt-PT.yaml (#1002)
Fix some typos.
2020-12-07 19:25:46 +01:00
tobspr 01733c48a3 Prevent items from being rendered on each other when a belt stalls, closes #1000 2020-12-07 19:24:39 +01:00
tobspr 203cd88ad9 Merge branch 'master' of https://github.com/tobspr/shapez.io 2020-12-07 19:15:59 +01:00
tobspr 8e2efb0756 Fix belts being too slow sometimes, closes #999 2020-12-07 19:15:57 +01:00
Polarbub f92a04f1df
Fix Dependency errors (#996) 2020-12-07 18:48:22 +01:00
Mironov Danil ea064d41b6
Update base-ru.yaml (#994)
Some changes in "reward_belt_reader".
2020-12-07 18:46:34 +01:00
Jesper Welagen 5e074dd9fe
Update base-nl.yaml (#993)
I made some small grammar improvements (some were really weird). Also, I used more simple and basic Dutch to make it understandable for people that can't talk fluent dutch.
I really wanted to contribute to the game, so I hope this makes it into the game :)
2020-12-07 18:46:19 +01:00
tobspr edc52a9271 Merge branch 'master' of https://github.com/tobspr/shapez.io 2020-12-07 18:45:55 +01:00
tobspr eecabf1a07 Update changelog 2020-12-07 18:45:52 +01:00
catyo bb4fe006b6
Update base-zh-TW.yaml (#992)
Consistency for "pipette" vocab.  :)
2020-12-07 18:45:43 +01:00
EmeraldBlock c0027778ef
Hide wires layer grid with disable grid option (#991)
When the Disable Grid option is on,
the grid shown on the wires layer also disappears.
This is done by replacing the wires tile grid pattern
with a pure color that is the average color of the tile image.
The color also has the same transparency as the tile image.
The use of a pure color loses the grainy look of the image.
2020-12-07 18:43:58 +01:00
L404-Venik d0596be38c
Update base-ru.yaml (#990)
* Update base-ru.yaml

* Update base-ru.yaml

* Update base-ru.yaml

Sorry, even with my English knowledge I'm not really a programmer, so I badly understand error notifications. Give me time, maby I'll try couple times to get into it.  Please disregard if there will be some more failed versions.

* Update base-ru.yaml

* Update base-ru.yaml

* Update base-ru.yaml
2020-12-07 18:43:06 +01:00
Hyron 100ee57d10
Update base-pt-BR.yaml (#985)
* Update base-pt-BR.yaml

Fixed a few typos, and translated reward_storage and reward_miner_chainable

* Update base-pt-BR.yaml

fixed a space and a missing "
2020-12-07 18:41:41 +01:00
tobspr 3b268294df Minor adjustments 2020-12-07 18:39:12 +01:00
Ethan Chapman 1230b873aa
Require LMB to place blueprints (#979) 2020-12-07 18:37:49 +01:00
Erha b080236b0b
Update base-zh-CN.yaml (#977)
All English translated into Chinese
2020-12-07 18:36:15 +01:00
tobspr 94f22af899 Merge branch 'master' of https://github.com/tobspr/shapez.io 2020-12-07 18:35:31 +01:00
tobspr c8623ff1a5 Fix typo in german translation, closes #971 2020-12-07 18:35:29 +01:00
Cervon Wong dd1d1ffe78
Update base-zh-CN.yaml (#969) 2020-12-07 18:34:20 +01:00
Cervon Wong 119d7c60ca
Update base-zh-CN.yaml (#968)
Fix hoursAndMinutesShort
2020-12-07 18:33:58 +01:00
BananoGamer 5cc70c7f51
Update base-it.yaml (#962)
some minor fixes, it's ready to be implemented
2020-12-07 18:33:46 +01:00
Emil 6ad8fa5fd4
Update base-sv.yaml (#958)
More translations and grammar fixes
2020-12-07 18:33:22 +01:00
Ciramor 2432e025ac
Fixed french translation (#950)
* very small fix

* removed colons for steam text (line 14 and 24)

* proofread by krop

* final fix. If anyone else wants to proofread?

* Update base-fr.yaml
2020-12-07 18:32:35 +01:00
tobspr 5d0fc117b1 Merge branch 'master' of https://github.com/tobspr/shapez.io 2020-12-07 18:30:35 +01:00
tobspr 3ada0d5774 Allow to cycle variants backwards with SHIFT + T, other fixes and misc stuff 2020-12-07 18:30:33 +01:00
Chris Kruining 2bbecb37fc
Update base-nl.yaml (#887)
* Update base-nl.yaml

global.suffix.thousands :: should be uppercase as is stands for Kilo, which is shortened to K
global.infinite :: `oneindig` is the translation for infinite, not sure if keeping it as `inf` was on purpose.
global.time.* :: consistency
mainMenu.changelog :: -
mainMenu.continue :: technically a more correct translation
dialogs.buttons.restart :: consistency
dialogs.gameLoadFailure.title :: seems better to me


I will try to translate some more in the future, but my patience has run out at this moment :P

* Update base-nl.yaml

* Update base-nl.yaml
2020-12-07 18:28:18 +01:00
artemisSystem 503e643fd4
add separate unpin button to pinned shapes (#839)
Co-authored-by: 3ddy <39034386+3ddyy@users.noreply.github.com>
2020-12-07 13:11:41 +01:00
tobspr bcaf24c49f Update changelog 2020-12-07 13:08:19 +01:00
LeopoldTal f620706ed7
Format all upgrade tiers as Roman numerals (#830)
* format all upgrade tiers as Roman numerals

* show upgrade tiers 50+ as Arabic numerals
2020-12-07 13:06:54 +01:00
tobspr ca1af5a505 Allow cycling backwards, closes #790 2020-12-07 13:04:58 +01:00
tobspr f5032a02ce Add layersupport for waypoints 2020-12-07 12:57:49 +01:00
Daan Breur 944b3c011c
Added layersupport to waypoints!! (#703)
* Added layersupport to waypoints!!
It will now save what layer its made on!

* Added Migrator for 1006 to 1007

* Corrected Version Number

* Updated Comment

* Changed HUB Layer to be hardcoded
2020-12-07 12:48:30 +01:00
tobspr 82aaf7f037 Add ability to edit constant signals, bump version 2020-12-07 12:47:19 +01:00
tobspr 4b088980f3 Set 1.2.1 release date 2020-10-31 12:46:25 +01:00
tobspr d33a72202a Update changelog and update translation regarding 20 upgrade tiers, closes #907 2020-10-31 12:41:18 +01:00
Anykan 607650dae3
Update base-de.yaml (#931)
N-Gate  description is wrong. it makes from a 1 a zero and  from a zero a 1
2020-10-31 12:28:59 +01:00
MineJulRBX 6b0df96179
Update base-da.yaml (#926) 2020-10-31 12:28:33 +01:00
Katie Chan 48c3db4a28
Update base-zh-TW.yaml (#921) 2020-10-31 12:25:47 +01:00
CEbbinghaus ff37013074
Added Flooring the Required amount (#904) 2020-10-31 12:23:13 +01:00
LeopoldTal 400e3e0b08
match tutorials to the correct painter variants (#901) 2020-10-31 12:22:23 +01:00
LeopoldTal b6e6970e0e
use electron builtin to open links (#897)
When opening a link on standalone, use [shell.openExternal](https://github.com/electron/electron/blob/master/docs/api/shell.md#shellopenexternalurl-options). This works cross-platform, and looks less suspicious to antivirus than explicitly shelling out.
2020-10-31 12:21:39 +01:00
Roland Szabó 1cd26f74b2
Hungarian Translation 100% (#895)
* Translate all to Hungarian

* Hungarian added to language selector
2020-10-31 12:20:29 +01:00
tobspr b17cb6952b Update changelog and minor fixes 2020-10-31 12:19:51 +01:00
LeopoldTal 785eb31c8d
make save compressor faster (#888)
Fixes #836 by using a Map instead of an array. The Map maps the values to their indices rather than the reverse, making finding the index constant-time rather than linear, and so building the full map linear rather than quadratic. Flipping it to build the final array is also linear.
2020-10-31 12:12:05 +01:00
Galo223344 61f3b1991f
Translated strings and improved translation (#875)
* Translating the rest of the strings to spanish

Don't merge yet! Only commiting to save progress

* Update base-es.yaml

* Translated strings and improved translation

- Translated 99% of the strings, there's only one hint left that I didn't quite understand
- Fixed some typos
- Changed the translation of hub from "Central building" to "HUB"

* Update base-es.yaml

* More improvements, also changed 20 upgrades to infinite upgrades.
2020-10-31 12:09:12 +01:00
Polarbub 91cb53b6ce
Fix Dependency errors (#869)
* Add files via upload

* Fixed Dependence error

* Fixed Dependence errors

* Add files via upload

* Add files via upload
2020-10-31 12:07:25 +01:00
AdJaGu 9f985babca
Merge base-*.yaml & fix YAML lint errors and warnings. (#918)
* Update base-en.yaml

Updated spelling, grammar, and to a lesser extent the information of some tips.

* Update base-en.yaml

* Update base-en.yaml

* Update base-en.yaml

Applied most of EmeraldBlock's suggestions

* Update base-ind.yaml

Update on tips, matching it with the new improved version, and corrected some things.

- PresS#9257

* Update base-cz.yaml

Corrected one of the tips.

* Update base-zh-TW.yaml

* Update base-en.yaml

Issue #849

* Few more spelling mistakes.

* Update base-en.yaml

Fixed inconsistencies and mispellations of Rotator (previously was Rotater, which is wrong)

* Update base-en.yaml

* Improving existing CZ translations and yaml check

* Update base-en.yaml

* Update base-zh-TW.yaml

* Update base-ind.yaml

* Update base-cz.yaml

* Completed translation

* Update base-en.yaml

Changed "20 Upgrade Tiers" to "Unlimited"

* Update base-zh-TW.yaml

* Update base-pl.yaml

Updated some polish translations.

* Update base-uk.yaml

* Update base-pl.yaml

Fix linter

* Update base-uk.yaml

* Update base-fi.yaml

Full translation. Fixed some bad grammar. Anything you need here?

* Update base-zh-TW.yaml

Finish translating.
Still need to review it all over again.

* fixing errors

* fixed errors. found few paragraphs not translated

* changed settings

* edits

* more edits

* quote marks 129

* fixed last errors. should work now

* ready now?

* colon error fix, hopefully

* 2

* new try. still error with colon

* Fixed idents

* fixed some syntax errors

* fixed more idents

* Fixed missing lines and stuff

* update translation ja-jp

* Update base-en.yaml

Upgrade text should say ∞ instead of 20 upgrade tiers, for real this time

* Update base-en.yaml

Changed "it" to "the game" because there wasn't enough context to know what "it" means

* Update base-ind.yaml

Fixed some things

* Update base-kor.yaml

* Update base-zh-TW.yaml

* A little more Polish

* Update base-it.yaml

Uploaded the new text relative to the wire layer and other small corrections, it's 100% done

* Update base-sv.yaml

Advantages, title_future, planned, title_open_source and title_links text translated

* Update base-sv.yaml

Trailing space fixed

* Update base-sv.yaml

* Update base-sv.yaml

Fix trailing spaces and wierd syntax error

* Update base-en.yaml

Removed changes present in a future pr

* Update for base-ro.yaml

I found some words like Roadmap and Standalone to be better suited when they're in English, I think some neologisms are better kept in their language.

* Update base-it.yaml

* Fix YAML Lint errors and warnings

Co-authored-by: Hyperion-21 <69665635+Hyperion-21@users.noreply.github.com>
Co-authored-by: presdm <72538204+presdm@users.noreply.github.com>
Co-authored-by: RevosCZ <72229413+RevosCZ@users.noreply.github.com>
Co-authored-by: Colleabois <12426652+Colleabois@users.noreply.github.com>
Co-authored-by: ZrubekLukas <39225468+ZrubekLukas@users.noreply.github.com>
Co-authored-by: VL4DL3N <6233477+Vlad1slaw@users.noreply.github.com>
Co-authored-by: Jędrzej Stolarz <jedrek1993@gmail.com>
Co-authored-by: Hermanni Saresma <hermukka@gmail.com>
Co-authored-by: Nucleareal <nukereiuzi@gmail.com>
Co-authored-by: sindaehyeon <56984093+sindaehyeon@users.noreply.github.com>
Co-authored-by: BananoGamer <72351355+BananoGamer@users.noreply.github.com>
Co-authored-by: Oscar Bäck <oscar.back96@outlook.com>
Co-authored-by: Memel <30528044+MemelDanzig@users.noreply.github.com>
Co-authored-by: tobspr <tobspr@users.noreply.github.com>
2020-10-31 10:20:00 +01:00
presdm b1faff31ed
Update base-ind.yaml (#837)
* Update base-ind.yaml

Update on tips, matching it with the new improved version, and corrected some things.

- PresS#9257

* Update base-ind.yaml

* Update base-ind.yaml

Fixed some things
2020-10-31 10:18:24 +01:00
LeopoldTal 070245270f
Use locale decimal separator on belt reader display (#816)
* use locale decimal separator on belt reader display

* rename formatter method
2020-10-31 10:15:45 +01:00
LeopoldTal 0146aa91bb
fix syntax in translations (#846) 2020-10-11 18:45:49 +02:00
tobspr 1696eabec2 Merge branch 'master' of https://github.com/tobspr/shapez.io 2020-10-11 08:42:15 +02:00
tobspr 09850954b1 Update changelog 2020-10-11 08:42:13 +02:00
Miro Rauhala f621924a4e
Update base-fi.yaml (#834) 2020-10-11 08:33:43 +02:00
Colleabois 223918eab2
Update base-zh-TW.yaml (#829) 2020-10-11 08:31:36 +02:00
LeopoldTal 6cf875fe6b
make reward notification scrollable (#828) 2020-10-11 08:31:07 +02:00
Nisar Hassan Naqvi 523fd0e833
simplify code contributions + reviews by fully automating the dev setup with Gitpod. (#824) 2020-10-11 08:29:26 +02:00
Galo223344 2f56fc2cd4
Translated ~90% of the strings to spanish (#823)
* Translated like half the strings to spanish

* Translated ~90% of strings

There are some strings left and the tips and hints are not translated.
2020-10-11 08:25:06 +02:00
Ved-s bec244d5c7
Update base-ru.yaml (#822)
* Update base-ru.yaml

* Update base-ru.yaml

Fixed check error at line 324
2020-10-11 08:24:42 +02:00
Hyperion-21 a1cc3176a3
Improved base-en.yaml translations for tips (#817)
* Update base-en.yaml

Updated spelling, grammar, and to a lesser extent the information of some tips.

* Update base-en.yaml

* Update base-en.yaml

* Update base-en.yaml

Applied most of EmeraldBlock's suggestions
2020-10-11 08:20:51 +02:00
tobspr 01e865cc0b Merge branch 'master' of https://github.com/tobspr/shapez.io 2020-10-11 08:18:57 +02:00
tobspr 1ab0fb7d9c Fix stacking bug and bump version, fixes #814 2020-10-11 08:18:55 +02:00
ItzSpiro 923a78910e
base-nl.yaml (#812)
* base-nl.yaml

I changed a couple translations so they fit better and I made every translation that wasn't done yet. I hope this helped a lot since I put a lot of time in it.

* base-nl.yaml

updated 870-875 because i forgot those

* Update base-nl.yaml

* base-nl.yaml

Changed the spaces in some words like m / s so they all stay on the same line.

Co-authored-by: MisterPengu <45737819+MisterPengu@users.noreply.github.com>
2020-10-11 08:16:58 +02:00
tobspr 1ac0fe5387 Fix french translation 2020-10-11 08:15:44 +02:00
LeopoldTal 97db304b6f
translate hints to French (#808) 2020-10-11 08:14:47 +02:00
dobidon b1c822d630
Update base-tr.yaml (#807)
* Update base-tr.yaml

- Translating additional keys
- Replacing reverted translations at lines:
  688-690
  712-716
  736-742

* Update base-tr.yaml

* Update base-tr.yaml

- Translating time abbreviations in statistics
2020-10-11 08:14:02 +02:00
presdm f595eecd37
Update base-ind.yaml (#805)
* Update base-ind.yaml

Finished the translation entirely! Also corrected some things, will review it a couple more times again tomorrow.

Hope this helps!
- PresS#9257

* Update base-ind.yaml

Changed 'you' (formal) to 'you' (informal) making it more enjoyable. Also corrected some more things.

* Update base-ind.yaml

* Update base-ind.yaml
2020-10-11 08:13:32 +02:00
Gumball73 329a770c05
Update Base-pt-PT (#804)
Update Base-pt-PT to the latest version and correcting some typos.

Gumball73
2020-10-11 08:13:09 +02:00
sindaehyeon 29673106ab
Update base-kor.yaml (#803) 2020-10-11 08:12:51 +02:00
RevosCZ 5ac2fb82fc
Update base-cz.yaml (#802)
* Update base-cz.yaml

Reopened the translations of the new settings, also added translations for the new tutorial.

* Update base-cz.yaml

* Update base-cz.yaml

* Update base-cz.yaml

* Update base-cz.yaml

* Update base-cz.yaml

* Update base-cz.yaml

* Update base-cz.yaml

* Update base-cz.yaml

* Update base-cz.yaml

* Delete base-cz.yaml

* Revert "Delete base-cz.yaml"

This reverts commit 80fc83112a.

* Update base-cz.yaml

* Update base-cz.yaml

* Update base-cz.yaml
2020-10-11 08:12:33 +02:00
EmeraldBlock 868f9bc06a
Fix reader cap (#810) 2020-10-10 19:36:08 +02:00
tobspr 366a2a9f58 Improve tutorial css 2020-10-09 08:36:35 +02:00
tobspr c4354161ad Add tutorial video links 2020-10-09 08:33:14 +02:00
tobspr e798ffae9f Update german translation 2020-10-09 08:32:30 +02:00
tobspr c1381f66d0 Update translations 2020-10-09 08:21:37 +02:00
ZrubekLukas d83c19434a
Modified translations, formatting and order (#801)
Reviewed first 273 lines of file. Formatting and order was changed acc. to EN version for easier comparison. Added and translated comments from EN. Started list of rules (file start) for consistent future translations.
2020-10-09 08:18:07 +02:00
BananoGamer ceb53ac98e
Update base-it.yaml (#799)
* Update base-it.yaml

I fixed everything, it's all translated ready to be implemented

* Update base-it.yaml

* Update base-it.yaml

* Update base-it.yaml

* Update base-it.yaml
2020-10-09 08:16:59 +02:00
tobspr 1164ef4030 Offer tutorial videos 2020-10-09 08:16:20 +02:00
tobspr d25a548ff3 Rebalance 2020-10-08 23:18:01 +02:00
tobspr 8260edb373 Get rid of some todos / fixmes 2020-10-08 19:47:27 +02:00
tobspr 1025bede1f Add wires tutorial 2020-10-08 19:40:58 +02:00
tobspr deab844d04 Add more tutorials 2020-10-08 19:01:12 +02:00
tobspr 93d6c7e532 Fix artwork, #2 2020-10-08 18:09:27 +02:00
tobspr 96e05bbc01 Fix artwork 2020-10-08 18:07:26 +02:00
Dobidon 149dba7dee
Update base-tr.yaml (#797)
* Update base-tr.yaml

- Translating new and untranslated keys

* Update base-tr.yaml

- Removing Trailing Spaces
- Moving RangeSliderPercentage up in settings values against syntax error (could not find expected ':' (syntax)).

* Update base-tr.yaml

- Fixing Indentation error at 882
2020-10-08 17:37:01 +02:00
Der Feldspatz 2c8564695d
fix trailing spaces (#794)
* Update base-de.yaml

Minor typo fix

* Update base-cat.yaml

Fix trailing spaces

* Update base-ind.yaml

fix trailing spaces
2020-10-08 17:36:18 +02:00
sindaehyeon 215619fb29
Update base-kor.yaml (#796) 2020-10-08 17:35:59 +02:00
Oscar dadad8bb74
Fixed spelling error (#795)
I notices that a space was missing after "är" so I inserted it
2020-10-08 17:35:29 +02:00
Colleabois bfb6ac92a3
Update base-zh-TW.yaml (#793)
* Update base-zh-TW.yaml

* Update base-zh-TW.yaml

* Update base-zh-TW.yaml

* Update base-zh-TW.yaml
2020-10-08 17:30:08 +02:00
tobspr 27242cdadf Fix toolbar color 2020-10-08 17:23:07 +02:00
tobspr c8ac2de44d Add storage to wires toolbar 2020-10-08 12:56:44 +02:00
tobspr 7744712f39 Fix language choose 2020-10-08 11:06:56 +02:00
tobspr b54ecdc906 Merge branch 'master' of https://github.com/tobspr/shapez.io 2020-10-08 10:41:09 +02:00
tobspr 7b01db5dae Minor fixes 2020-10-08 10:41:06 +02:00
presdm e8cd62c39a
Update on Bahasa Indonesia (#792)
Hey! Just bought your game and thought maybe I could help you to translate my own native language. I've fixed some words that I think is not quite right or fitting, and also worked on some more of the translations, will be correcting and finishing it some more later on my free time. (I'm new to GitHub, so please tell me if something's not right)

Cheers!
PresS#9257
2020-10-08 09:54:00 +02:00
tobspr c65c955984 Update translations 2020-10-08 09:32:47 +02:00
tobspr 1b5cde8b9c DE Translation adjustments 2020-10-08 09:26:40 +02:00
Der Feldspatz b91b748744
Update base-de.yaml (#786)
This should complete the german translation for the new update. I took some inspiration from @everthingArduino's propositions. As always, it would be nice if someone has an addidional pair of eyes on this 👀 Just in case. Maybe someone can have a look at the german unlock message of virtual processing who knows how to build from GitHub? I have a feeling it might be too long 😅 
However, I'm excited for the new update and I wish a good and smooth launch to @tobspr this friday! 🥳
2020-10-08 09:23:37 +02:00
tobspr e1f3454629 Merge branch 'master' of https://github.com/tobspr/shapez.io 2020-10-08 09:13:55 +02:00
tobspr 5a96e76151 Allow configuring map resources scale 2020-10-08 09:13:53 +02:00
EmeraldBlock a79500d574
Fix non-uniform distribution for freeplay shape color palette (#789)
* use nextIntRange instead of nextIntRangeInclusive

* Remove nextIntRangeInclusive

This function gave the minimum and maximum integer half as much weight, and it was not used anywhere except to generate a freeplay shape color palette, and that now uses nextIntRange.
2020-10-08 08:44:10 +02:00
RevosCZ da9f91aca4
Update base-cz.yaml (#787)
Small corrections.
2020-10-08 08:43:47 +02:00
JDC b1be518754
Update base-ru.yaml (#784)
* Update base-ru.yaml

* Update base-ru.yaml

* Update base-ru.yaml

* Update base-ru.yaml

* Update base-ru.yaml

* Update base-ru.yaml

* Update base-ru.yaml
2020-10-08 08:31:24 +02:00
Colleabois 81b920f751
Update base-zh-TW.yaml (#782)
* Update base-zh-TW.yaml

* Update base-zh-TW.yaml
2020-10-08 08:30:50 +02:00
tobspr 21c9c3cee6 Fix belt path epsilon 2020-10-07 19:31:11 +02:00
tobspr 38ba763897 Allow disabling zoom towards cursor 2020-10-07 19:12:49 +02:00
tobspr bc5ffcddd1 Change rotator, improve artwork 2020-10-07 19:02:42 +02:00
tobspr 1bb8b6f079 Get rid of performance warning, refactor roman numbers, mark balancers, rebalance upgrades 2020-10-07 18:35:03 +02:00
tobspr f3dcdeb2b8 Fix pinned shapes not being removable 2020-10-07 18:05:11 +02:00
tobspr 7dccc1a844 Unlock all levels when having a legacy savegame 2020-10-07 15:02:27 +02:00
tobspr fa27d1681f Cleanup IS_DEMO flags and introduce Restriction Manager 2020-10-07 09:48:31 +02:00
tobspr 81e7d96dd8 Merge branch 'master' of https://github.com/tobspr/shapez.io 2020-10-07 08:36:26 +02:00
tobspr 9844641d11 Missing parts from last commit 2020-10-07 08:36:24 +02:00
tobspr 94266173d8 Introduce game modes and get rid of global level definitions etc 2020-10-07 08:36:02 +02:00
Kai Sforza 07fc3b0dc5
Trailing spaces fixed (#780)
Some missed in #765
2020-10-07 07:58:21 +02:00
Norbert635 b045c0d0cf
Update base-ind.yaml (#779)
* Update base-ind.yaml

I updated some translations

* Update base-ind.yaml

* Update base-ind.yaml
2020-10-07 07:57:55 +02:00
kedi c3f33c3495
Tr trans (#759)
* nice

* add more translete more

* Update base-tr.yaml

* Update base-tr.yaml

* Update base-tr.yaml

* Update base-tr.yaml

* Update base-tr.yaml

* Update base-tr.yaml
2020-10-07 07:57:30 +02:00
CEbbinghaus 0beb3cedfc
Added EditorConfig (#778) 2020-10-06 17:28:17 +02:00
EmeraldBlock 00cce9479a
Set atlas scale for screenshot to constant value (#776) 2020-10-06 17:27:47 +02:00
tobspr 816fd37b55 Fix build 2020-10-06 17:25:58 +02:00
Gumball73 07b98d3d79
Update Base-pt-PT.yaml (#775)
Update Base-pt-PT to the latest version and correcting some typos.

Gumball73
2020-10-06 14:50:46 +02:00
mohaemen bcd3943b3f
Added Arabic translation (#773)
* Started translating the arabic file

* Added more translation

Co-authored-by: Mohaemen Giali <memjal@hotmail.com>
2020-10-06 14:49:55 +02:00
Caio Ricci 78d52a54a4
Update base-pt-BR.yaml (#772) 2020-10-06 14:49:23 +02:00
juitinglu 94132f85cd
Update base-zh-TW.yaml (#770)
* Update base-zh-TW.yaml

 Added some translations.

* Update base-zh-TW.yaml

* Update base-zh-TW.yaml

* Update base-zh-TW.yaml

Try to overcome the trailing spaces issues.

* Update base-zh-TW.yaml

* Update base-zh-TW.yaml

* Update base-zh-TW.yaml

* Update base-zh-TW.yaml
2020-10-06 14:48:31 +02:00
Caio Ricci a75ef0c661
Update base-pt-BR.yaml (#769) 2020-10-06 14:48:13 +02:00
Hannes d5726b95fd
Improved Dockerfile performance + added java dependency (#768)
* Added Java dependency to Dockerfile

* Improved Dockerfile performance

Co-authored-by: hrosseel <hannesrosseel@gmail.com>
2020-10-06 14:47:46 +02:00
sindaehyeon cdf0f0de76
Update base-kor.yaml (#767) 2020-10-06 14:47:15 +02:00
KhalO 0760fd609e
Update base-es.yaml (#765) 2020-10-06 14:45:44 +02:00
ZrubekLukas 6354cef8c6
Added Czech language to the list (#763) 2020-10-06 14:45:21 +02:00
RevosCZ 88b46d7dde
Update base-cz.yaml (#761)
* Update base-cz.yaml

Noticed few thing that werent translated yet.

* Update base-cz.yaml
2020-10-06 14:45:05 +02:00
Kai Sforza 9f53d9543f
Run yamllint in parallel (#758)
This doesn't require yarn to build anything or ffmpeg to be ready, so
just do this in parallel with the rest of the jobs.
2020-10-04 10:38:28 +02:00
Kai Sforza 7c13a03b5c
Fix yaml errors in CI (#757)
Don't warn on document start (cleanup, no one is using this)

Remove a bunch of trailing spaces and fix some bad indentation in the
pt-PT file.

There are still a bunch of lines that are significantly too long, should
be multiline strings.
2020-10-04 10:38:02 +02:00
AriFijan a4495428d1
Update base-nl.yaml (#754) 2020-10-04 10:37:06 +02:00
EmeraldBlock 0481c84e72
"Fix" getStringForKeyCode returning incorrect strings (#753)
* Fix getStringForKeyCode returning wrong result

This adds the full stop/period (.) key to the switch statement, and replaces String.fromCharCode (which works with Unicode) with the replacement character (�).

* Make letter keys work properly

* Add digits and display unknown codes in brackets

* better formatting
2020-10-04 10:34:40 +02:00
AriFijan 7517d4a979
Update base-nl.yaml (#746)
Fixed grammatical error in line 864
2020-10-04 10:28:46 +02:00
Caio Ricci 85984817d1
Update base-pt-BR.yaml (#745) 2020-10-04 10:28:31 +02:00
Der Feldspatz fa547e2b39
Update base-de.yaml (#737)
* Update base-de.yaml

Translation of the new content and improvement to old/already existing translation.

Also rearranged the translation keys so it matches english version and trimmed all free rows (Is this needed? I know the translation file got very long, but now it's kind of one mishmash and hard to read).

Some of the rewards are still missing, but I will complete it before October 8th.

* Update base-de.yaml

Fix YAML fint error and warnings, add document start

* Update base-de.yaml

Several fixes/typos

* Update base-de.yaml

Signalgeber statt konstantes Signal (Da Gebäude)
2020-10-04 10:28:09 +02:00
endofzero 746154c428
Dockerfile use for Node12 (#727)
* Create Dockerfile

* Update Dockerfile

git is already installed in the node:12 image

* Remove git-lfs curl pull for node12 image

* Remove the rest of the lfs references
2020-10-04 10:25:18 +02:00
tobspr 9217ee252d MInor adjustments to atlas padding 2020-10-04 09:30:31 +02:00
dengr1065 a02438a70a
LibGDX Texture Packing (finally!) (#755)
* Format tsconfig, remove atlas files

* Add helpers for texture packing

* Rest of the texture packing...

* Update gitignores

* Update readme
2020-10-04 09:21:37 +02:00
3ddyy beb09a9e3e
Fix YAML errors with cz and pt-PT translations (#744)
* Fix base-cz.yaml

* Fix base-pt-PT.yaml
2020-10-02 13:10:24 +02:00
RevosCZ be5d4f792e
Update base-cz.yaml (#743)
* Update base-cz.yaml

I made some corrections and added some further translations

* Update base-cz.yaml

* Update base-cz.yaml

* Update base-cz.yaml
2020-10-02 11:25:15 +02:00
Flash4433 ba134ead48
Update base-pt-PT.yaml (#741) 2020-10-02 11:24:40 +02:00
mini-bomba d989d50986
Add more polish translations & polish new translations (#740) 2020-10-02 11:24:16 +02:00
LeopoldTal 873d60b18d
specify path to config file in build instructions (#739) 2020-10-02 11:23:53 +02:00
LeopoldTal 5356fc3996
small improvements to French translation (#738)
- restore missing translations
- rename "moulin" to "hélice"
- use "supprimer" rather than "effacer" when appropriate
- abbreviate "maximal" to fit in available space
2020-10-02 11:23:37 +02:00
ぬくれあ 62231168e4
repush and resolve conflicts (#736) 2020-10-02 11:14:24 +02:00
Hannes Fant 1014c3462b
Update base-sv.yaml (#735)
Translated a couple strings and a few of the tips
2020-10-02 11:13:44 +02:00
TcePrepK 42ae104e13
Update base-tr.yalm (#732)
I updated some of the translations and there was items not translated I translated them
2020-10-01 10:21:07 +02:00
dengr1065 56ca6b40c5
Remove git lfs install from gulpfile (#731) 2020-10-01 10:20:47 +02:00
tobspr 83c4552f9c DE translation fixes 2020-10-01 09:25:29 +02:00
tobspr 74201a0894 Fix outdated keys in translations 2020-10-01 08:49:16 +02:00
tobspr 4df2ccbfae Merge branch 'master' of https://github.com/tobspr/shapez.io 2020-10-01 08:43:35 +02:00
tobspr 6f600ef4d3 Update german translation 2020-10-01 08:43:33 +02:00
oguz523 d7400379f9
Updating base-tr.yaml 1.2.0 (#728)
- Translation of new keys
2020-10-01 08:24:48 +02:00
Bzucak12 b9e3bef51d
Update base-cz.yaml (#726)
* Update base-cz.yaml

I translated some things

* Update base-cz.yaml
2020-10-01 08:22:30 +02:00
Andrea Nardecchia 38ce6d817c
Complete italian translation for the wires update (#724)
* Work in progress sulla traduzione fino a riga 528

* Complete italian translation fo wires update

Complete translation. hopefully there are no typos

* Update base-it.yaml

* Update base-it.yaml

* Update base-it.yaml

* Update base-it.yaml

* Update base-it.yaml

* Update base-it.yaml

* Update base-it.yaml
2020-10-01 08:22:06 +02:00
tobspr 31b0036e36 Minor adjustments to NL translation 2020-10-01 08:20:17 +02:00
Underlyingglitch e22e4e15fd
Update base-nl.yaml (#722)
Full translation to dutch.
2020-10-01 08:18:49 +02:00
tobspr ebcac0967f Changes to the english translation, closes #725 2020-10-01 08:11:37 +02:00
tobspr b226862110 Fix translations 2020-09-30 16:46:15 +02:00
tobspr 5cfdf5c534 Merge branch 'master' of https://github.com/tobspr/shapez.io 2020-09-30 16:40:15 +02:00
tobspr 2e919c62aa Minor translation fix 2020-09-30 16:40:12 +02:00
JSansoP ad12822744
Update base-cat.yaml (#721)
Finished translatin the whole file (both steampage and tips added).
2020-09-30 15:43:28 +02:00
JSansoP 8594f64447
Update base-cat.yaml (#720)
Translated all new options and items/features. Left steampage and free version translations untranslated because they get reseted every time there is a new version. Tobias, if you want them translated contact me on discord ItzSanso#6913 and i will do it whenver i can.
2020-09-30 12:19:54 +02:00
AAA_shuibiao f4c0ef2ea7
Updated and improved some zh-CN translations. (#717)
* Updated and improved some zh-CN translations.

Updated and improved some zh-CN translations. The translations are still incomplete and needed to be worked on in the future.

* Fixed missing document start

Linter said 'warning  missing document start "---"  (document-start)', so I added "---" to the start of the document
2020-09-30 08:31:42 +02:00
LeopoldTal 8fcb30ba48
Complete French translation with wires (#718)
* complete French translation with wires

* add document start guard
2020-09-30 08:31:12 +02:00
Caio Ricci 73b68ccda8
Update base-pt-BR.yaml (#714) 2020-09-30 08:30:12 +02:00
Karbir 4648822659
Started translation of intro and related sections (#713) 2020-09-30 08:29:07 +02:00
Starwort f25b10918c
Add some Japanese text (#712)
I'm still learning so the long sentences are too complex for me, but I did some shorter keys. I hope it helps :)
2020-09-30 08:28:53 +02:00
Daan Breur 567fc79e4b
Dutch Translation! (#711)
* Changed a small portion of the dutch translation.

* Update base-nl.yaml
2020-09-30 08:28:34 +02:00
McMistrzYT b78cce8bd9
Update base-pl.yaml (#710)
Updated some text boxes with polish translations
2020-09-30 08:27:56 +02:00
CandyCrystal 6a071ede77
Update base-no.yaml (#709)
Translated the new strings for the Wires Update!
2020-09-30 08:27:41 +02:00
tobspr 6096f1c842 Fix FR translation 2020-09-29 20:44:04 +02:00
tobspr f984733783 Add store page to translations 2020-09-29 20:40:55 +02:00
jojolebestof 8ec64a368c
Update base-fr.yaml (#708)
New traductions
2020-09-29 19:36:45 +02:00
tobspr abaf9890b8 Don't cache pattern 2020-09-29 19:30:03 +02:00
558 changed files with 73411 additions and 49584 deletions

8
.editorconfig Executable file
View File

@ -0,0 +1,8 @@
root = true
[{src, translations}/*]
end_of_line = crlf
insert_final_newline = true
indent_style = space
indent_size = 4
charset = utf-8

View File

@ -21,5 +21,6 @@ rules:
prettier/prettier: error
no-undef: off
no-unused-vars: off
no-unreachable: off
no-prototype-builtins: off
linebreak-style: off

View File

@ -13,18 +13,18 @@ jobs:
setup:
name: CI
runs-on: ubuntu-latest
runs-on: docker
steps:
- name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install ffmpeg
apt-get update
apt-get install -y ffmpeg
- name: Setup Node
uses: actions/setup-node@v2-beta
with:
node-version: 10.x
node-version: 16.x
- name: Checkout repo
uses: actions/checkout@v2
@ -35,19 +35,25 @@ jobs:
cd gulp/
yarn
cd ..
- name: Lint
run: |
yarn lint
- name: TSLint
run: |
cd gulp
yarn gulp translations.fullBuild
yarn gulp localConfig.findOrCreate
cd ..
yarn tslint
yaml-lint:
name: yaml-lint
runs-on: docker
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: YAML Lint
uses: ibiqlik/action-yamllint@v1.0.0
with:
file_or_dir: translations/*.yaml
- name: TSLint
run: |
cd gulp
yarn gulp translations.fullBuild
cd ..
yarn tslint

78
.gitignore vendored
View File

@ -15,34 +15,11 @@ pids
*.seed
*.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
*.lcov
# nyc test coverage
.nyc_output
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules/
jspm_packages/
# TypeScript v1 declaration files
typings/
# TypeScript cache
*.tsbuildinfo
@ -53,18 +30,9 @@ typings/
# Optional eslint cache
.eslintcache
# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
@ -72,43 +40,25 @@ typings/
.env
.env.test
# parcel-bundler cache (https://parceljs.org/)
.cache
# Next.js build output
.next
# Nuxt.js build / generate output
.nuxt
dist
# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and *not* Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public
# vuepress build output
.vuepress/dist
# Serverless directories
.serverless/
# FuseBox cache
.fusebox/
# DynamoDB Local files
.dynamodb/
# TernJS port file
.tern-port
# Buildfiles
build
res_built
gulp/runnable-texturepacker.jar
tmp_standalone_files
tmp_standalone_files_china
tmp_standalone_files_wegame
# Local config
config.local.js
.DS_Store
# Editor artifacts
*.*.swp
*.*.swo
app.vdf
steamtmp
build_output
built_vdfs
tmp

4
.gitpod.Dockerfile vendored Normal file
View File

@ -0,0 +1,4 @@
FROM gitpod/workspace-full
RUN sudo apt-get update \
&& sudo apt install ffmpeg -yq

10
.gitpod.yml Normal file
View File

@ -0,0 +1,10 @@
image:
file: .gitpod.Dockerfile
tasks:
- init: yarn && gp sync-done boot
- before: cd gulp
init: gp sync-await boot && yarn
command: yarn gulp
ports:
- port: 3005
onOpen: open-preview

View File

@ -1,3 +1,5 @@
{
"editor.defaultFormatter": "esbenp.prettier-vscode"
"editor.defaultFormatter": "esbenp.prettier-vscode",
"files.trimTrailingWhitespace": true,
"editor.formatOnSave": true
}

View File

@ -4,3 +4,4 @@ rules:
line-length:
level: warning
max: 200
document-start: disable

33
CONTRIBUTING.md Normal file
View File

@ -0,0 +1,33 @@
Contributor license agreement (CLA)
1. Preamble
Thank you for your interest in shapez by tobspr IT Solutions (the "Company"). In order to clarify the intellectual property license granted with Contributions from any person or entity, the Company must have a Contributor License Agreement ("CLA") on file that has been signed by each Contributor, indicating agreement to the license terms below. This license is for your protection as a Contributor as well as the protection of the Company and its users; it does not change your rights to use your own Contributions for any other purpose.
2. General
You accept and agree to the following terms and conditions for Your present and future Contributions submitted to the Company. In return, the Company shall not use Your Contributions in a way that is contrary to the public benefit or inconsistent with its bylaws in effect at the time of the Contribution. Except for the license granted herein to the Company and recipients of software distributed by the Company, You reserve all right, title, and interest in and to Your Contributions.
You represent that you have the full authority to enter into this agreement.
3. Definitions
"You" (or "Your") "You" (or "Your") shall mean the copyright owner or legal entity authorized by the copyright owner that is making this Agreement with the Company. For legal entities, the entity making a Contribution and all other entities that control, are controlled by, or are under common control with that entity are considered to be a single Contributor. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
"Contribution" "Contribution" shall mean any original work of authorship, including any modifications or additions to an existing work, that is intentionally submitted by You to the Company for inclusion in, or documentation of, any of the products owned or managed by the Company (the "Work"). For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Company or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Company for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by You as "Not a Contribution."
4. Grant of Copyright License
Subject to the terms and conditions of this Agreement, You hereby grant to the Company and to recipients of software distributed by the Company a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute Your Contributions and such derivative works.
You agree that your changes/additions are incorporated into the source code under a GPL-3 license.
You agree that the Company is free to use its code without a GPL-3 license as closed source in any context, including for commercial purposes, without any license whatsoever
5. Grant of Patent License
Subject to the terms and conditions of this Agreement, You hereby grant to the Company and to recipients of software distributed by the Company a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by You that are necessarily infringed by Your Contribution(s) alone or by combination of Your Contribution(s) with the Work to which such Contribution(s) was submitted. If any entity institutes patent litigation against You or any other entity (including a cross-claim or counterclaim in a lawsuit) alleging that your Contribution, or the Work to which you have contributed, constitutes direct or contributory patent infringement, then any patent licenses granted to that entity under this Agreement for that Contribution or Work shall terminate as of the date such litigation is filed.
6. Liability / Obligations
You represent that you are legally entitled to grant the above license. If your employer(s) has rights to intellectual property that you create that includes your Contributions, you represent that you have received permission to make Contributions on behalf of that employer, that your employer has waived such rights for your Contributions to the Company, or that your employer has executed a separate Corporate CLA with the Company.
You represent that each of Your Contributions is Your original creation (see section 7 for submissions on behalf of others). You represent that Your Contribution submissions include complete details of any third-party license or other restriction (including, but not limited to, related patents and trademarks) of which you are personally aware and which are associated with any part of Your Contributions.
If you make changes or additions to the code, you assume full liability for this and assure that the changes/additions do not infringe the rights of third parties (e.g. copyrights).
You are not expected to provide support for Your Contributions, except to the extent You desire to provide support. You may provide support for free, for a fee, or not at all. Unless required by applicable law or agreed to in writing, You provide Your Contributions on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON- INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE.
Should You wish to submit work that is not Your original creation, You may submit it to the Company separately from any Contribution, identifying the complete details of its source and of any license or other restriction (including, but not limited to, related patents, trademarks, and license agreements) of which you are personally aware, and conspicuously marking the work as "Submitted on behalf of a third-party: [named here]".
You agree to notify the Company of any facts or circumstances of which you become aware that would make these representations inaccurate in any respect.
7. Final provisions
The law of the Federal Republic of Germany applies to this agreement.
The contract remains binding in its remaining parts even if individual points are legally ineffective. In place of the ineffective points, the statutory provisions, if any, apply. Insofar as this would represent unreasonable hardship for one of the contracting parties, the contract as a whole will become ineffective.

32
Dockerfile Normal file
View File

@ -0,0 +1,32 @@
FROM node:16
EXPOSE 3001 3005
WORKDIR /shapez.io
RUN apt-get update && apt-get install -y --no-install-recommends \
ffmpeg default-jre \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*
COPY package.json yarn.lock ./
RUN yarn
COPY gulp ./gulp
WORKDIR /shapez.io/gulp
RUN yarn
WORKDIR /shapez.io
COPY res ./res
COPY src/html ./src/html
COPY src/css ./src/css
COPY version ./version
COPY sync-translations.js ./
COPY translations ./translations
COPY src/js ./src/js
COPY res_raw ./res_raw
COPY .git ./.git
COPY electron ./electron
WORKDIR /shapez.io/gulp
ENTRYPOINT ["yarn", "gulp"]

134
README.md
View File

@ -1,34 +1,61 @@
# shapez.io
## NEW: Shapez 2!
<img src="https://i.imgur.com/Y5Z2iqQ.png" alt="shapez.io Logo">
We are currently working on a successor to shapez, with 3D Graphics, Exploration, Layers, Mass transport, New Shape Mechanics, Research and a lot more! Be sure to check it out:
This is the source code for shapez.io, an open source base building game inspired by Factorio.
<a href="https://tobspr.io/shapez-2" title="shapez 2">
<img src="https://i.imgur.com/6T7UP3p.png" alt="shapez 2 Announcement">
</a>
<br>
# shapez
<a href="https://get.shapez.io/ghi" title="shapez on Steam">
<img src="https://i.imgur.com/ihW2bUE.png" alt="shapez Logo">
</a>
<hr>
This is the source code for shapez, an open source base building game inspired by Factorio.
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)
- [Play on Steam](https://get.shapez.io/ghr)
- [Online Demo](https://shapez.io)
- [Official Discord](https://discord.com/invite/HN7EVzV) <- _Highly recommended to join!_
- [Trello Board & Roadmap](https://trello.com/b/ISQncpJP/shapezio)
## Reporting issues, suggestions, feedback, bugs
1. Ask in `#bugs` / `#feedback` / `#questions` on the [Official Discord](https://discord.com/invite/HN7EVzV) if you are not entirely sure if it's a bug etc.
1. Ask in `#bugs` / `#feedback` / `#questions` on the [Official Discord](https://discord.com/invite/HN7EVzV) if you are not entirely sure if it's a bug
2. Check out the trello board: https://trello.com/b/ISQncpJP/shapezio
3. See if it's already there - If so, vote for it, done. I will see it. (You have to be signed in on trello)
4. If not, check if it's already reported here: https://github.com/tobspr/shapez.io/issues
5. If not, file a new issue here: https://github.com/tobspr/shapez.io/issues/new
4. If not, check if it's already reported here: https://github.com/tobspr-games/shapez.io/issues
5. If not, file a new issue here: https://github.com/tobspr-games/shapez.io/issues/new
6. I will then have a look (This can take days or weeks) and convert it to trello, and comment with the link. You can then vote there ;)
## Building
- Make sure `ffmpeg` is on your path
- Install Node.js and Yarn
- Install Node.js 16 and Yarn
- Install Java (required for texture packer)
- Run `yarn` in the root folder
- Cd into `gulp` folder
- `cd` into `gulp` folder
- Run `yarn` and then `yarn gulp` - it should now open in your browser
**Notice**: This will produce a debug build with several debugging flags enabled. If you want to disable them, modify `config.js`.
**Notice**: This will produce a debug build with several debugging flags enabled. If you want to disable them, modify [`src/js/core/config.js`](src/js/core/config.js).
## Creating Mods
Mods can be found [here](https://shapez.mod.io). The documentation for creating mods can be found [here](mod_examples/), including a bunch of sample mods.
## Build Online with one-click setup
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.
- install all of the dependencies.
- start `gulp` in `gulp/` directory.
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/tobspr-games/shapez.io)
## Helping translate
@ -36,11 +63,9 @@ Please checkout the [Translations readme](translations/).
## Contributing
Since this game is in the more or less early development, I will only accept pull requests which add an immediate benefit. Please understand that low quality PR's might be closed by me with a short comment explaining why.
I will only accept pull requests which add a benefit to a large portion of the player base. If the feature is useful but only to a fraction of players, or is controversial, I recommend making a mod instead.
**If you want to add a new building, please understand that I can not simply add every building to the game!** I recommend to talk to me before implementing anything, to make sure its actually useful. Otherwise there is a high chance of your PR not getting merged.
If you want to add a new feature or in generally contribute I recommend to get in touch with me on Discord:
If you want to add a new feature or in generally contribute I recommend to get in touch on Discord in advance, which largely increases the chance of the PR to get merged:
<a href="https://discord.com/invite/HN7EVzV" target="_blank">
<img src="https://i.imgur.com/SoawBhW.png" alt="discord logo" width="100">
@ -51,71 +76,20 @@ If you want to add a new feature or in generally contribute I recommend to get i
The game is based on a custom engine which itself is based on the YORG.io 3 game engine (Actually it shares almost the same core).
The code within the engine is relatively clean with some code for the actual game on top being hacky.
This project is based on ES5. Some ES2015 features are used but most of them are too slow, especially when polyfilled. For example, `Array.prototype.forEach` is only used within non-critical loops since its slower than a plain for loop.
#### Adding a new component
1. Create the component file in `src/js/game/components/<name_lowercase>.js`
2. Create a component class (e.g. `MyFancyComponent`) which `extends Component`
3. Create a `static getId()` method which should return the `PascalCaseName` without component (e.g. `MyFancy`)
4. If any data needs to be persisted, create a `static getSchema()` which should return the properties to be saved (See other components)
5. Add a constructor. **The constructor must be called with optional parameters only!** `new MyFancyComponent({})` should always work.
6. Add any props you need in the constructor.
7. Add the component in `src/js/game/component_registry.js`
8. Add the component in `src/js/game/entity_components.js`
9. Done! You can use your component now
#### Adding a new building
(The easiest way is to copy an existing building)
1. Create your building in `src/js/game/buildings/<my_building.js>`
2. Create the building meta class, e.g. `MetaMyFancyBuilding extends MetaBuilding`
3. Override the methods from MetaBuilding you want to override.
4. Most important is `setupEntityComponents`
5. Add the building to `src/js/game/meta_building_registry.js`: You need to register it on the registry, and also call `registerBuildingVariant`.
6. Add the building to the right toolbar, e.g. `src/js/game/hud/parts/buildings_toolbar.js`:`supportedBuildings`
7. Add a keybinding for the building in `src/js/game/key_action_mapper.js` in `KEYMAPPINGS.buildings`
8. In `translations/base-en.yaml` add it to two sections: `buildings.[my_building].XXX` (See other buildings) and also `keybindings.mappings.[my_building]`. Be sure to do it the same way as other buildings do!
9. Create a icon (128x128, [prefab](https://github.com/tobspr/shapez.io-artwork/blob/master/ui/toolbar-icons.psd)) for your building and save it in `res/ui/buildings_icons` with the id of your building
10. Create a tutorial image (600x600) for your building and save it in `res/ui/building_tutorials`
11. In `src/css/resources.scss` add your building to `$buildings` as well as `$buildingAndVariants`
12. Done! Optional: Add a new reward for unlocking your building at some point.
#### Adding a new game system
1. Create the class in `src/js/game/systems/<system_name>.js`
2. Derive it from `GameSystemWithFilter` if you want it to work on certain entities only which have the given components. Otherwise use `GameSystem` to do more generic stuff.
3. Implement the `update()` method.
4. Add the system in `src/js/game/game_system_manager.js` (To `this.systems` and also call `add` in the `internalInitSystems()` method)
5. If your system should draw stuff, this is a bit more complicated. Have a look at existing systems on how they do it.
#### Checklist for a new building / testing it
This is a quick checklist, if a new building is added this points should be fulfilled:
2. The translation for all variants is done and finalized
3. The artwork (regular sprite) is finalized
4. The blueprint sprite has been generated and is up to date
5. The building has been added to the appropriate toolbar
6. The building has a keybinding which makes sense
7. The building has a reward assigned and is unlocked at a meaningful point
8. The reward for the building has a proper translation
9. The reward for the building has a proper image
10. The building has a proper tutorial image assigned
11. The buliding has a proper toolbar icon
12. The reward requires a proper shape
13. The building has a proper silhouette color
14. The building has a proper matrix for being rendered on the minimap
15. The building has proper statistics in the dialog
16. The building properly contributes to the shapes produced analytics
17. The building is properly persisted in the savegame
18. The building is explained properly, ideally via an interactive tutorial
This project is based on ES5 (If I would develop it again, I would definitely use TypeScript). Some ES2015 features are used but most of them are too slow, especially when polyfilled. For example, `Array.prototype.forEach` is only used within non-critical loops since its slower than a plain for loop.
### Assets
For most assets I use Adobe Photoshop, you can find them in `assets/`.
You can find most assets <a href="//github.com/tobspr-games/shapez.io-artwork" target="_blank">here</a>.
You will need a <a href="https://www.codeandweb.com/texturepacker" target="_blank">Texture Packer</a> license in order to regenerate the atlas. If you don't have one but want to contribute assets, let me know and I might compile it for you. I'm currently switching to an open source solution but I can't give an estimate when that's done.
All assets will be automatically rebuilt into the atlas once changed (Thanks to dengr1065!)
<img src="https://i.imgur.com/W25Fkl0.png" alt="shapez.io Screenshot">
<img src="https://i.imgur.com/W25Fkl0.png" alt="shapez Screenshot">
<br>
## Check out our other games!
<a href="https://tobspr.io" title="tobspr Games">
<img src="https://i.imgur.com/uA2wcUy.png" alt="tobspr Games">
</a>

View File

@ -1,3 +0,0 @@
The artwork can be found here:
https://github.com/tobspr/shapez.io-artwork

1
electron/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
mods/*.js

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 103 KiB

After

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 21 KiB

View File

@ -1,26 +1,40 @@
/* eslint-disable quotes,no-undef */
const { app, BrowserWindow, Menu, MenuItem, session } = require("electron");
const { app, BrowserWindow, Menu, MenuItem, ipcMain, shell, dialog, session } = require("electron");
const path = require("path");
const url = require("url");
const childProcess = require("child_process");
const { ipcMain } = require("electron");
const fs = require("fs");
const isDev = process.argv.indexOf("--dev") >= 0;
const isLocal = process.argv.indexOf("--local") >= 0;
const steam = require("./steam");
const asyncLock = require("async-lock");
const windowStateKeeper = require("electron-window-state");
// Disable hardware key handling, i.e. being able to pause/resume the game music
// with hardware keys
app.commandLine.appendSwitch("disable-features", "HardwareMediaKeyHandling");
const isDev = app.commandLine.hasSwitch("dev");
const isLocal = app.commandLine.hasSwitch("local");
const safeMode = app.commandLine.hasSwitch("safe-mode");
const externalMod = app.commandLine.getSwitchValue("load-mod");
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");
let modsPath = path.join(roamingFolder, "shapez.io", "mods");
if (!fs.existsSync(storePath)) {
// No try-catch by design
fs.mkdirSync(storePath, { recursive: true });
}
if (!fs.existsSync(modsPath)) {
fs.mkdirSync(modsPath, { recursive: true });
}
/** @type {BrowserWindow} */
let win = null;
let menu = null;
@ -31,26 +45,44 @@ function createWindow() {
faviconExtension = ".ico";
}
const mainWindowState = windowStateKeeper({
defaultWidth: 1000,
defaultHeight: 800,
});
win = new BrowserWindow({
width: 1280,
height: 800,
x: mainWindowState.x,
y: mainWindowState.y,
width: mainWindowState.width,
height: mainWindowState.height,
show: false,
backgroundColor: "#222428",
useContentSize: true,
useContentSize: false,
minWidth: 800,
minHeight: 600,
title: "shapez.io Standalone",
title: "shapez",
transparent: false,
icon: path.join(__dirname, "favicon" + faviconExtension),
// fullscreen: true,
autoHideMenuBar: true,
autoHideMenuBar: !isDev,
webPreferences: {
nodeIntegration: true,
webSecurity: false,
nodeIntegration: false,
nodeIntegrationInWorker: false,
nodeIntegrationInSubFrames: false,
contextIsolation: true,
enableRemoteModule: false,
disableBlinkFeatures: "Auxclick",
webSecurity: true,
sandbox: true,
preload: path.join(__dirname, "preload.js"),
experimentalFeatures: false,
},
allowRunningInsecureContent: false,
});
mainWindowState.manage(win);
if (isLocal) {
win.loadURL("http://localhost:3005");
} else {
@ -65,44 +97,88 @@ function createWindow() {
win.webContents.session.clearCache();
win.webContents.session.clearStorageData();
////// SECURITY
// Disable permission requests
win.webContents.session.setPermissionRequestHandler((webContents, permission, callback) => {
callback(false);
});
session.fromPartition("default").setPermissionRequestHandler((webContents, permission, callback) => {
callback(false);
});
app.on("web-contents-created", (event, contents) => {
// Disable vewbiew
contents.on("will-attach-webview", (event, webPreferences, params) => {
event.preventDefault();
});
// Disable navigation
contents.on("will-navigate", (event, navigationUrl) => {
event.preventDefault();
});
});
win.webContents.on("will-redirect", (contentsEvent, navigationUrl) => {
// Log and prevent the app from redirecting to a new page
console.error(
`The application tried to redirect to the following address: '${navigationUrl}'. This attempt was blocked.`
);
contentsEvent.preventDefault();
});
// Filter loading any module via remote;
// you shouldn't be using remote at all, though
// https://electronjs.org/docs/tutorial/security#16-filter-the-remote-module
app.on("remote-require", (event, webContents, moduleName) => {
event.preventDefault();
});
// built-ins are modules such as "app"
app.on("remote-get-builtin", (event, webContents, moduleName) => {
event.preventDefault();
});
app.on("remote-get-global", (event, webContents, globalName) => {
event.preventDefault();
});
app.on("remote-get-current-window", (event, webContents) => {
event.preventDefault();
});
app.on("remote-get-current-web-contents", (event, webContents) => {
event.preventDefault();
});
//// END SECURITY
win.webContents.on("new-window", (event, pth) => {
event.preventDefault();
if (process.platform == "win32") {
childProcess.execSync("start " + pth);
} else if (process.platform == "linux") {
childProcess.execSync("xdg-open " + pth);
if (pth.startsWith("https://") || pth.startsWith("steam://")) {
shell.openExternal(pth);
}
});
win.on("closed", () => {
console.log("Window closed");
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) {
menu = new Menu();
win.webContents.toggleDevTools();
const mainItem = new MenuItem({
label: "Toggle Dev Tools",
click: () => win.toggleDevTools(),
click: () => win.webContents.toggleDevTools(),
accelerator: "F12",
});
menu.append(mainItem);
const reloadItem = new MenuItem({
label: "Restart",
label: "Reload",
click: () => win.reload(),
accelerator: "F5",
});
@ -115,7 +191,15 @@ function createWindow() {
});
menu.append(fullscreenItem);
Menu.setApplicationMenu(menu);
const mainMenu = new Menu();
mainMenu.append(
new MenuItem({
label: "shapez.io",
submenu: menu,
})
);
Menu.setApplicationMenu(mainMenu);
} else {
Menu.setApplicationMenu(null);
}
@ -129,7 +213,7 @@ function createWindow() {
if (!app.requestSingleInstanceLock()) {
app.exit(0);
} else {
app.on("second-instance", (event, commandLine, workingDirectory) => {
app.on("second-instance", () => {
// Someone tried to run a second instance, we should focus
if (win) {
if (win.isMinimized()) {
@ -151,78 +235,155 @@ ipcMain.on("set-fullscreen", (event, flag) => {
win.setFullScreen(flag);
});
ipcMain.on("exit-app", (event, flag) => {
ipcMain.on("exit-app", () => {
win.close();
app.quit();
});
function performFsJob(job) {
const fname = path.join(storePath, job.filename);
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);
}
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));
await fs.promises.writeFile(filename, contents, "utf8");
return;
}
// first, write a temporary file (.tmp-XXX)
const tempName = filename + ".tmp-" + transactionId;
console.log(prefix, "Writing temporary file", niceFileName(tempName));
await fs.promises.writeFile(tempName, contents, "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)
);
await fs.promises.rename(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)
);
await fs.promises.rename(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
await fs.promises.unlink(backupFileName);
}
// rename the old file to the new backup file
console.log(prefix, "Moving", niceFileName(oldTemporaryName), "to the backup file location");
await fs.promises.rename(oldTemporaryName, backupFileName);
} catch (ex) {
console.error(prefix, "Failed to switch backup files:", ex);
}
});
}
ipcMain.handle("fs-job", async (event, job) => {
const filenameSafe = job.filename.replace(/[^a-z\.\-_0-9]/gi, "_");
const fname = path.join(storePath, filenameSafe);
switch (job.type) {
case "read": {
if (!fs.existsSync(fname)) {
return {
// Special FILE_NOT_FOUND error code
error: "file_not_found",
};
// Special FILE_NOT_FOUND error code
return { error: "file_not_found" };
}
let contents = "";
try {
contents = fs.readFileSync(fname, { encoding: "utf8" });
} catch (ex) {
return {
error: ex,
};
}
return {
success: true,
data: contents,
};
return await fs.promises.readFile(fname, "utf8");
}
case "write": {
try {
fs.writeFileSync(fname, job.contents);
} catch (ex) {
return {
error: ex,
};
}
return {
success: true,
data: job.contents,
};
await writeFileSafe(fname, job.contents);
return job.contents;
}
case "delete": {
try {
fs.unlinkSync(fname);
} catch (ex) {
return {
error: ex,
};
}
return {
success: true,
data: null,
};
await fs.promises.unlink(fname);
return;
}
default:
throw new Error("Unkown fs job: " + job.type);
throw new Error("Unknown fs job: " + job.type);
}
});
ipcMain.handle("open-mods-folder", async () => {
shell.openPath(modsPath);
});
console.log("Loading mods ...");
function loadMods() {
if (safeMode) {
console.log("Safe Mode enabled for mods, skipping mod search");
}
console.log("Loading mods from", modsPath);
let modFiles = safeMode
? []
: fs
.readdirSync(modsPath)
.filter(filename => filename.endsWith(".js"))
.map(filename => path.join(modsPath, filename));
if (externalMod) {
console.log("Adding external mod source:", externalMod);
const externalModPaths = externalMod.split(",");
modFiles = modFiles.concat(externalModPaths);
}
return modFiles.map(filename => fs.readFileSync(filename, "utf8"));
}
ipcMain.on("fs-job", (event, arg) => {
const result = performFsJob(arg);
event.reply("fs-response", { id: arg.id, result });
let mods = [];
try {
mods = loadMods();
console.log("Loaded", mods.length, "mods");
} catch (ex) {
console.error("Failed to load mods");
dialog.showErrorBox("Failed to load mods:", ex);
}
ipcMain.handle("get-mods", async () => {
return mods;
});
ipcMain.on("fs-sync-job", (event, arg) => {
const result = performFsJob(arg);
event.returnValue = result;
});
steam.init(isDev);
// Only allow achievements and puzzle DLC if no mods are loaded
if (mods.length === 0) {
steam.listen();
}

6
electron/mods/README.txt Normal file
View File

@ -0,0 +1,6 @@
Here you can place mods. Every mod should be a single file ending with ".js".
--- WARNING ---
Mods can potentially access to your filesystem.
Please only install mods from trusted sources and developers.
--- WARNING ---

View File

@ -9,8 +9,13 @@
"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": "10.1.3"
"devDependencies": {},
"optionalDependencies": {
"shapez.io-private-artifacts": "github:tobspr/shapez.io-private-artifacts#abi-v99"
},
"dependencies": {}
"dependencies": {
"async-lock": "^1.2.8",
"electron": "16.2.8",
"electron-window-state": "^5.0.3"
}
}

7
electron/preload.js Normal file
View File

@ -0,0 +1,7 @@
const { contextBridge, ipcRenderer } = require("electron");
contextBridge.exposeInMainWorld("ipcRenderer", {
invoke: ipcRenderer.invoke.bind(ipcRenderer),
on: ipcRenderer.on.bind(ipcRenderer),
send: ipcRenderer.send.bind(ipcRenderer),
});

112
electron/steam.js Normal file
View File

@ -0,0 +1,112 @@
const fs = require("fs");
const path = require("path");
const { ipcMain } = require("electron");
let greenworks = null;
let appId = null;
let initialized = false;
try {
greenworks = require("shapez.io-private-artifacts/steam/greenworks");
appId = parseInt(fs.readFileSync(path.join(__dirname, "steam_appid.txt"), "utf8"));
} catch (err) {
// greenworks is not installed
console.warn("Failed to load steam api:", err);
}
console.log("App ID:", appId);
function init(isDev) {
if (!greenworks) {
return;
}
if (!isDev) {
if (greenworks.restartAppIfNecessary(appId)) {
console.log("Restarting ...");
process.exit(0);
}
}
if (!greenworks.init()) {
console.log("Failed to initialize greenworks");
process.exit(1);
}
initialized = true;
}
function listen() {
ipcMain.handle("steam:is-initialized", isInitialized);
if (!initialized) {
console.warn("Steam not initialized, won't be able to listen");
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: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) {
return Promise.resolve(initialized);
}
function getAchievementNames(event) {
return new Promise((resolve, reject) => {
try {
const achievements = greenworks.getAchievementNames();
resolve(achievements);
} catch (err) {
reject(err);
}
});
}
function activateAchievement(event, id) {
return new Promise((resolve, reject) => {
greenworks.activateAchievement(
id,
() => resolve(),
err => reject(err)
);
});
}
module.exports = {
init,
listen,
};

View File

@ -1 +1 @@
1134480
1318690

File diff suppressed because it is too large Load Diff

BIN
electron_gog/favicon.icns Normal file

Binary file not shown.

BIN
electron_gog/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 KiB

BIN
electron_gog/favicon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

381
electron_gog/index.js Normal file
View File

@ -0,0 +1,381 @@
/* eslint-disable quotes,no-undef */
const { app, BrowserWindow, Menu, MenuItem, ipcMain, shell, dialog, session } = require("electron");
const path = require("path");
const url = require("url");
const fs = require("fs");
const asyncLock = require("async-lock");
const windowStateKeeper = require("electron-window-state");
// Disable hardware key handling, i.e. being able to pause/resume the game music
// with hardware keys
app.commandLine.appendSwitch("disable-features", "HardwareMediaKeyHandling");
const isDev = app.commandLine.hasSwitch("dev");
const isLocal = app.commandLine.hasSwitch("local");
const safeMode = app.commandLine.hasSwitch("safe-mode");
const externalMod = app.commandLine.getSwitchValue("load-mod");
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");
let modsPath = path.join(roamingFolder, "shapez.io", "mods");
if (!fs.existsSync(storePath)) {
// No try-catch by design
fs.mkdirSync(storePath, { recursive: true });
}
if (!fs.existsSync(modsPath)) {
fs.mkdirSync(modsPath, { recursive: true });
}
/** @type {BrowserWindow} */
let win = null;
let menu = null;
function createWindow() {
let faviconExtension = ".png";
if (process.platform === "win32") {
faviconExtension = ".ico";
}
const mainWindowState = windowStateKeeper({
defaultWidth: 1000,
defaultHeight: 800,
});
win = new BrowserWindow({
x: mainWindowState.x,
y: mainWindowState.y,
width: mainWindowState.width,
height: mainWindowState.height,
show: false,
backgroundColor: "#222428",
useContentSize: false,
minWidth: 800,
minHeight: 600,
title: "shapez",
transparent: false,
icon: path.join(__dirname, "favicon" + faviconExtension),
// fullscreen: true,
autoHideMenuBar: !isDev,
webPreferences: {
nodeIntegration: false,
nodeIntegrationInWorker: false,
nodeIntegrationInSubFrames: false,
contextIsolation: true,
enableRemoteModule: false,
disableBlinkFeatures: "Auxclick",
webSecurity: true,
sandbox: true,
preload: path.join(__dirname, "preload.js"),
experimentalFeatures: false,
},
allowRunningInsecureContent: false,
});
mainWindowState.manage(win);
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();
win.webContents.session.clearStorageData();
////// SECURITY
// Disable permission requests
win.webContents.session.setPermissionRequestHandler((webContents, permission, callback) => {
callback(false);
});
session.fromPartition("default").setPermissionRequestHandler((webContents, permission, callback) => {
callback(false);
});
app.on("web-contents-created", (event, contents) => {
// Disable vewbiew
contents.on("will-attach-webview", (event, webPreferences, params) => {
event.preventDefault();
});
// Disable navigation
contents.on("will-navigate", (event, navigationUrl) => {
event.preventDefault();
});
});
win.webContents.on("will-redirect", (contentsEvent, navigationUrl) => {
// Log and prevent the app from redirecting to a new page
console.error(
`The application tried to redirect to the following address: '${navigationUrl}'. This attempt was blocked.`
);
contentsEvent.preventDefault();
});
// Filter loading any module via remote;
// you shouldn't be using remote at all, though
// https://electronjs.org/docs/tutorial/security#16-filter-the-remote-module
app.on("remote-require", (event, webContents, moduleName) => {
event.preventDefault();
});
// built-ins are modules such as "app"
app.on("remote-get-builtin", (event, webContents, moduleName) => {
event.preventDefault();
});
app.on("remote-get-global", (event, webContents, globalName) => {
event.preventDefault();
});
app.on("remote-get-current-window", (event, webContents) => {
event.preventDefault();
});
app.on("remote-get-current-web-contents", (event, webContents) => {
event.preventDefault();
});
//// END SECURITY
win.webContents.on("new-window", (event, pth) => {
event.preventDefault();
if (pth.startsWith("https://")) {
shell.openExternal(pth);
}
});
win.on("closed", () => {
console.log("Window closed");
win = null;
});
if (isDev) {
menu = new Menu();
win.webContents.toggleDevTools();
const mainItem = new MenuItem({
label: "Toggle Dev Tools",
click: () => win.webContents.toggleDevTools(),
accelerator: "F12",
});
menu.append(mainItem);
const reloadItem = new MenuItem({
label: "Reload",
click: () => win.reload(),
accelerator: "F5",
});
menu.append(reloadItem);
const fullscreenItem = new MenuItem({
label: "Fullscreen",
click: () => win.setFullScreen(!win.isFullScreen()),
accelerator: "F11",
});
menu.append(fullscreenItem);
const mainMenu = new Menu();
mainMenu.append(
new MenuItem({
label: "shapez.io",
submenu: menu,
})
);
Menu.setApplicationMenu(mainMenu);
} else {
Menu.setApplicationMenu(null);
}
win.once("ready-to-show", () => {
win.show();
win.focus();
});
}
if (!app.requestSingleInstanceLock()) {
app.exit(0);
} else {
app.on("second-instance", () => {
// 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", () => {
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);
}
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));
await fs.promises.writeFile(filename, contents, "utf8");
return;
}
// first, write a temporary file (.tmp-XXX)
const tempName = filename + ".tmp-" + transactionId;
console.log(prefix, "Writing temporary file", niceFileName(tempName));
await fs.promises.writeFile(tempName, contents, "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)
);
await fs.promises.rename(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)
);
await fs.promises.rename(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
await fs.promises.unlink(backupFileName);
}
// rename the old file to the new backup file
console.log(prefix, "Moving", niceFileName(oldTemporaryName), "to the backup file location");
await fs.promises.rename(oldTemporaryName, backupFileName);
} catch (ex) {
console.error(prefix, "Failed to switch backup files:", ex);
}
});
}
ipcMain.handle("fs-job", async (event, job) => {
const filenameSafe = job.filename.replace(/[^a-z\.\-_0-9]/gi, "_");
const fname = path.join(storePath, filenameSafe);
switch (job.type) {
case "read": {
if (!fs.existsSync(fname)) {
// Special FILE_NOT_FOUND error code
return { error: "file_not_found" };
}
return await fs.promises.readFile(fname, "utf8");
}
case "write": {
await writeFileSafe(fname, job.contents);
return job.contents;
}
case "delete": {
await fs.promises.unlink(fname);
return;
}
default:
throw new Error("Unknown fs job: " + job.type);
}
});
ipcMain.handle("open-mods-folder", async () => {
shell.openPath(modsPath);
});
console.log("Loading mods ...");
function loadMods() {
if (safeMode) {
console.log("Safe Mode enabled for mods, skipping mod search");
}
console.log("Loading mods from", modsPath);
let modFiles = safeMode
? []
: fs
.readdirSync(modsPath)
.filter(filename => filename.endsWith(".js"))
.map(filename => path.join(modsPath, filename));
if (externalMod) {
console.log("Adding external mod source:", externalMod);
const externalModPaths = externalMod.split(",");
modFiles = modFiles.concat(externalModPaths);
}
return modFiles.map(filename => fs.readFileSync(filename, "utf8"));
}
let mods = [];
try {
mods = loadMods();
console.log("Loaded", mods.length, "mods");
} catch (ex) {
console.error("Failed to load mods");
dialog.showErrorBox("Failed to load mods:", ex);
}
ipcMain.handle("get-mods", async () => {
return mods;
});

17
electron_gog/package.json Normal file
View File

@ -0,0 +1,17 @@
{
"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 ."
},
"dependencies": {
"async-lock": "^1.2.8",
"electron": "16.2.8",
"electron-window-state": "^5.0.3"
}
}

7
electron_gog/preload.js Normal file
View File

@ -0,0 +1,7 @@
const { contextBridge, ipcRenderer } = require("electron");
contextBridge.exposeInMainWorld("ipcRenderer", {
invoke: ipcRenderer.invoke.bind(ipcRenderer),
on: ipcRenderer.on.bind(ipcRenderer),
send: ipcRenderer.send.bind(ipcRenderer),
});

580
electron_gog/yarn.lock Normal file
View File

@ -0,0 +1,580 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
"@electron/get@^1.13.0":
version "1.13.1"
resolved "https://registry.yarnpkg.com/@electron/get/-/get-1.13.1.tgz#42a0aa62fd1189638bd966e23effaebb16108368"
integrity sha512-U5vkXDZ9DwXtkPqlB45tfYnnYBN8PePp1z/XDCupnSpdrxT8/ThCv9WCwPLf9oqiSGZTkH6dx2jDUPuoXpjkcA==
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 "^3.0.0"
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.18.20"
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.18.20.tgz#268f028b36eaf51181c3300252f605488c4f0650"
integrity sha512-Q8KKwm9YqEmUBRsqJ2GWJDtXltBDxTdC4m5vTdXBolu2PeQh8LX+f6BTwU+OuXPu37fLxoN6gidqBmnky36FXA==
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.0.2"
resolved "https://registry.yarnpkg.com/boolean/-/boolean-3.0.2.tgz#df1baa18b6a2b0e70840475e1d93ec8fe75b2570"
integrity sha512-RwywHlpCRc3/Wh81MiCKun4ydaIFyW5Ea6JbL6sRCVx5q5irDw7pMXBUFYF/jArQ6YrG36q0kpovc9P/Kd3I4g==
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.12"
resolved "https://registry.yarnpkg.com/config-chain/-/config-chain-1.1.12.tgz#0fde8d091200eb5e808caf25fe618c02f48e4efa"
integrity sha512-a1eOIcu8+7lUInge4Rpf/n4Krkf3Dd9lqhljRzII1/Zno/kRtUWnznPO3jOKBmTEktkt3fkxisUcivoj0ebzoA==
dependencies:
ini "^1.3.4"
proto-list "~1.2.1"
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.1"
resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.1.tgz#f0d229c505e0c6d8c49ac553d1b13dc183f6b2ee"
integrity sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==
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.0.4"
resolved "https://registry.yarnpkg.com/detect-node/-/detect-node-2.0.4.tgz#014ee8f8f669c5c58023da64b8179c083a28c46c"
integrity sha512-ZIzRpLJrOj7jjP2miAtgqIfmzbxa4ZOr5jJc601zklsfEx9oTzmmj2nVpIPRpNlRTIh8lc1kyViIY7BWSGNmKw==
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-window-state@^5.0.3:
version "5.0.3"
resolved "https://registry.yarnpkg.com/electron-window-state/-/electron-window-state-5.0.3.tgz#4f36d09e3f953d87aff103bf010f460056050aa8"
integrity sha512-1mNTwCfkolXl3kMf50yW3vE2lZj0y92P/HYWFBrb+v2S/pCka5mdwN3cagKm458A7NjndSwijynXgcLWRodsVg==
dependencies:
jsonfile "^4.0.0"
mkdirp "^0.5.1"
electron@16.2.8:
version "16.2.8"
resolved "https://registry.yarnpkg.com/electron/-/electron-16.2.8.tgz#b7f2bd1184701e54a1bc902839d5a3ec95bb8982"
integrity sha512-KSOytY6SPLsh3iCziztqa/WgJyfDOKzCvNqku9gGIqSdT8CqtV66dTU1SOrKZQjRFLxHaF8LbyxUL1vwe4taqw==
dependencies:
"@electron/get" "^1.13.0"
"@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@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/global-agent/-/global-agent-3.0.0.tgz#ae7cd31bd3583b93c5a16437a1afe27cc33a1ab6"
integrity sha512-PT6XReJ+D07JvGoxQMkT6qji/jVNfX/h364XHZOWeRzy64sSFr+xJ5OX7LI3b4MPQzdL4H8Y8M0xzPpsVMwA8Q==
dependencies:
boolean "^3.0.1"
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.1, 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.0"
resolved "https://registry.yarnpkg.com/normalize-url/-/normalize-url-4.5.0.tgz#453354087e6ca96957bd8f5baf753f5982142129"
integrity sha512-2s47yzUxdexf1OhyRi4Em83iQk0aPvwTddtFz4hnSSw9dCEsLEGf6SwIO8ss/19S9iBb5sJaOuTvTGDeZI00BQ==
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.4"
resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.4.tgz#27aaa7d2e4ca76452f98d3add093a72c943edc97"
integrity sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==
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"

1
electron_wegame/.gitignore vendored Normal file
View File

@ -0,0 +1 @@
wegame_sdk

View 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.

View File

@ -0,0 +1,13 @@
{
"folders": [
{
"path": "."
}
],
"settings": {
"files.exclude": {
"**/node_modules": true,
"**/typedefs_gen": true
}
}
}

Binary file not shown.

BIN
electron_wegame/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 KiB

BIN
electron_wegame/favicon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

253
electron_wegame/index.js Normal file
View File

@ -0,0 +1,253 @@
/* 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: false,
webSecurity: true,
sandbox: true,
contextIsolation: true,
preload: path.join(__dirname, "preload.js"),
},
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);
}
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));
await fs.promises.writeFile(filename, contents, "utf8");
return;
}
// first, write a temporary file (.tmp-XXX)
const tempName = filename + ".tmp-" + transactionId;
console.log(prefix, "Writing temporary file", niceFileName(tempName));
await fs.promises.writeFile(tempName, contents, "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)
);
await fs.promises.rename(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)
);
await fs.promises.rename(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
await fs.promises.unlink(backupFileName);
}
// rename the old file to the new backup file
console.log(prefix, "Moving", niceFileName(oldTemporaryName), "to the backup file location");
await fs.promises.rename(oldTemporaryName, backupFileName);
} catch (ex) {
console.error(prefix, "Failed to switch backup files:", ex);
}
});
}
ipcMain.handle("fs-job", async (event, job) => {
const filenameSafe = job.filename.replace(/[^a-z\.\-_0-9]/i, "");
const fname = path.join(storePath, filenameSafe);
switch (job.type) {
case "read": {
if (!fs.existsSync(fname)) {
// Special FILE_NOT_FOUND error code
return { error: "file_not_found" };
}
return await fs.promises.readFile(fname, "utf8");
}
case "write": {
await writeFileSafe(fname, job.contents);
return job.contents;
}
case "delete": {
await fs.promises.unlink(fname);
return;
}
default:
throw new Error("Unknown fs job: " + job.type);
}
});
wegame.init(isDev);
wegame.listen();

View 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
View 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
View 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"

View File

@ -1,9 +0,0 @@
[[actions]]
name = "play"
path = "shapezio.exe"
platform = "windows"
[[actions]]
name = "play"
path = "play.sh"
platform = "linux"

127
gulp/atlas2json.js Normal file
View File

@ -0,0 +1,127 @@
const { join, resolve } = require("path");
const { readFileSync, readdirSync, writeFileSync } = require("fs");
const suffixToScale = {
lq: "0.25",
mq: "0.5",
hq: "0.75"
};
function convert(srcDir) {
const full = resolve(srcDir);
const srcFiles = readdirSync(full)
.filter(n => n.endsWith(".atlas"))
.map(n => join(full, n));
for (const atlas of srcFiles) {
console.log(`Processing: ${atlas}`);
// Read all text, split it into line array
// and filter all empty lines
const lines = readFileSync(atlas, "utf-8")
.split("\n")
.filter(n => n.trim());
// Get source image name
const image = lines.shift();
const srcMeta = {};
// Read all metadata (supports only one page)
while (true) {
const kv = lines.shift().split(":");
if (kv.length != 2) {
lines.unshift(kv[0]);
break;
}
srcMeta[kv[0]] = kv[1].trim();
}
const frames = {};
let current = null;
lines.push("Dummy line to make it convert last frame");
for (const line of lines) {
if (!line.startsWith(" ")) {
// New frame, convert previous if it exists
if (current != null) {
let { name, rotate, xy, size, orig, offset, index } = current;
// Convert to arrays because Node.js doesn't
// support latest JS features
xy = xy.split(",").map(v => Number(v));
size = size.split(",").map(v => Number(v));
orig = orig.split(",").map(v => Number(v));
offset = offset.split(",").map(v => Number(v));
// GDX TexturePacker removes index suffixes
const indexSuff = index != -1 ? `_${index}` : "";
const isTrimmed = size != orig;
frames[`${name}${indexSuff}.png`] = {
// Bounds on atlas
frame: {
x: xy[0],
y: xy[1],
w: size[0],
h: size[1]
},
// Whether image was rotated
rotated: rotate == "true",
trimmed: isTrimmed,
// How is the image trimmed
spriteSourceSize: {
x: offset[0],
y: (orig[1] - size[1]) - offset[1],
w: size[0],
h: size[1]
},
sourceSize: {
w: orig[0],
h: orig[1]
}
}
}
// Simple object that will hold other metadata
current = {
name: line
};
} else {
// Read and set current image metadata
const kv = line.split(":").map(v => v.trim());
current[kv[0]] = isNaN(Number(kv[1])) ? kv[1] : Number(kv[1]);
}
}
const atlasSize = srcMeta.size.split(",").map(v => Number(v));
const atlasScale = suffixToScale[atlas.match(/_(\w+)\.atlas$/)[1]];
const result = JSON.stringify({
frames,
meta: {
image,
format: srcMeta.format,
size: {
w: atlasSize[0],
h: atlasSize[1]
},
scale: atlasScale.toString()
}
});
writeFileSync(atlas.replace(".atlas", ".json"), result, {
encoding: "utf-8"
});
}
}
if (require.main == module) {
convert(process.argv[2]);
}
module.exports = { convert };

View File

@ -4,7 +4,14 @@ module.exports = function (api) {
[
"@babel/preset-env",
{
targets: "cover 99.5%",
// targets: ">0.01%",
targets: {
edge: 10,
firefox: 37,
chrome: 24,
safari: 10,
ie: 10,
},
useBuiltIns: "usage",
corejs: 3,
loose: true,
@ -14,14 +21,15 @@ module.exports = function (api) {
],
];
const plugins = [
"@babel/plugin-transform-arrow-functions",
"closure-elimination",
// var is faster than let and const!
[
"@babel/plugin-transform-block-scoping",
{
throwIfClosureRequired: false,
},
],
// [
// "@babel/plugin-transform-block-scoping",
// {
// throwIfClosureRequired: true,
// },
// ],
[
"@babel/plugin-transform-classes",
{
@ -33,10 +41,10 @@ module.exports = function (api) {
presets,
plugins,
highlightCode: true,
sourceType: "module",
sourceType: "unambiguous",
sourceMaps: false,
parserOpts: {},
only: ["../src/js"],
exclude: /(core-js|babel-core|babel-runtime)/,
generatorOpts: {
retainLines: false,
compact: true,

74
gulp/build_variants.js Normal file
View File

@ -0,0 +1,74 @@
/**
* @type {Record<string, {
* standalone: boolean,
* environment?: 'dev' | 'staging' | 'prod',
* electronBaseDir?: string,
* steamAppId?: number,
* executableName?: string,
* buildArgs: {
* chineseVersion?: boolean,
* wegameVersion?: boolean,
* steamDemo?: boolean,
* gogVersion?: boolean
* }}>}
*/
const BUILD_VARIANTS = {
"web-localhost": {
standalone: false,
environment: "dev",
buildArgs: {},
},
"web-shapezio-beta": {
standalone: false,
environment: "staging",
buildArgs: {},
},
"web-shapezio": {
standalone: false,
environment: "prod",
buildArgs: {},
},
"standalone-steam": {
standalone: true,
executableName: "shapez",
steamAppId: 1318690,
buildArgs: {},
},
"standalone-steam-china": {
standalone: true,
steamAppId: 1318690,
buildArgs: {
chineseVersion: true,
},
},
"standalone-steam-demo": {
standalone: true,
steamAppId: 1930750,
buildArgs: {
steamDemo: true,
},
},
"standalone-steam-china-demo": {
standalone: true,
steamAppId: 1930750,
buildArgs: {
steamDemo: true,
chineseVersion: true,
},
},
"standalone-wegame": {
standalone: true,
electronBaseDir: "electron_wegame",
buildArgs: {
wegameVersion: true,
},
},
"standalone-gog": {
standalone: true,
electronBaseDir: "electron_gog",
buildArgs: {
gogVersion: true,
},
},
};
module.exports = { BUILD_VARIANTS };

View File

@ -29,7 +29,7 @@ module.exports = {
try {
return execSync("git describe --tag --exact-match").toString("ascii");
} catch (e) {
throw new Error('Current git HEAD is not a version tag');
throw new Error("Current git HEAD is not a version tag");
}
},

View File

@ -1,112 +0,0 @@
/**
* ES6 Bundle Loader
*
* Attempts to load the game code, and if that fails tries with the transpiled
* version. Also handles errors during load.
*/
(function () {
var loadTimeout = null;
var callbackDone = false;
// Catch load errors
function errorHandler(event, source, lineno, colno, error) {
console.error("👀 Init Error:", event, source, lineno, colno, error);
var element = document.createElement("div");
element.style.position = "fixed";
element.style.top = "0";
element.style.right = "0";
element.style.bottom = "0";
element.style.left = "0";
element.style.zIndex = "29999";
element.style.backgroundColor = "#222429";
element.style.display = "flex";
element.style.justifyContent = "center";
element.style.alignItems = "center";
var inner = document.createElement("div");
inner.style.color = "#fff";
inner.style.fontFamily = "GameFont, sans-serif";
inner.style.fontSize = "15px";
inner.style.padding = "30px";
inner.style.textAlign = "center";
element.appendChild(inner);
var heading = document.createElement("h3");
heading.style.color = "#ef5072";
heading.innerText = "Error";
heading.style.marginBottom = "40px";
heading.style.fontSize = "45px";
inner.appendChild(heading);
var content = document.createElement("p");
content.style.color = "#eee";
content.innerText = error || (event && event.message) || event || "Unknown Error";
inner.appendChild(content);
if (source) {
var sourceElement = document.createElement("p");
sourceElement.style.color = "#777";
sourceElement.innerText = sourceElement + ":" + lineno + ":" + colno;
inner.appendChild(sourceElement);
}
document.documentElement.appendChild(element);
}
window.addEventListener("error", errorHandler);
window.addEventListener("unhandledrejection", errorHandler);
function makeJsTag(src, integrity) {
var script = document.createElement("script");
script.src = src;
script.type = "text/javascript";
script.charset = "utf-8";
script.defer = true;
if (integrity) {
script.setAttribute("integrity", integrity);
}
return script;
}
function loadFallbackJs(error) {
console.warn("👀 ES6 Script not supported, loading transpiled code.");
console.warn("👀 Error was:", error);
var scriptTransp = makeJsTag(bundleSrcTranspiled, bundleIntegrityTranspiled);
scriptTransp.addEventListener("error", scriptFail);
scriptTransp.addEventListener("load", onJsLoaded);
document.head.appendChild(scriptTransp);
}
function scriptFail(error) {
console.error("👀 Failed to load bundle!");
console.error("👀 Error was:", error);
throw new Error("Core load failed.");
}
function expectJsParsed() {
if (!callbackDone) {
console.error("👀 Got no core callback");
throw new Error("Core thread failed to respond within time.");
}
}
function onJsLoaded() {
console.log("👀 Core loaded at", Math.floor(performance.now()), "ms");
loadTimeout = setTimeout(expectJsParsed, 15000);
window.removeEventListener("error", errorHandler);
window.removeEventListener("unhandledrejection", errorHandler);
}
window.coreThreadLoadedCb = function () {
console.log("👀 Core responded at", Math.floor(performance.now()), "ms");
clearTimeout(loadTimeout);
loadTimeout = null;
callbackDone = true;
};
var scriptEs6 = makeJsTag(bundleSrc, bundleIntegrity);
scriptEs6.addEventListener("error", loadFallbackJs);
scriptEs6.addEventListener("load", onJsLoaded);
document.head.appendChild(scriptEs6);
})();

139
gulp/cordova.js vendored
View File

@ -1,139 +0,0 @@
const path = require("path");
const fs = require("fs");
const buildUtils = require("./buildutils");
function gulptasksCordova($, gulp, buildFolder) {
const cdvRes = path.join("..", "..", "res");
// Cleans up the app assets
// Removes all temporary folders used while optimizing the assets
gulp.task("cleanupAppAssetsBuiltFolder", () => {
return gulp
.src(path.join(cdvRes, "built"), { read: false, allowEmpty: true })
.pipe($.clean({ force: true }));
});
// Optimizes all built assets
gulp.task("optimizeBuiltAppAssets", () => {
return gulp
.src(path.join(cdvRes, "built", "**", "*.png"))
.pipe($.flatten())
.pipe($.imagemin([$.imagemin.optipng({ optimizationLevel: 1 })]))
.pipe(gulp.dest(path.join(cdvRes, "built")));
});
// Scales the icon resources
gulp.task("scaleIconIos", async () => {
const sizes = [
180,
60,
120,
76,
152,
40,
80,
57,
114,
72,
144,
167,
29,
58,
87,
50,
100,
167,
20,
1024,
24,
48,
55,
172,
196,
];
for (let i = 0; i < sizes.length; ++i) {
const size = sizes[i];
console.log("Scaling icon to", size, "x", size);
const img = await $.jimp.read(path.join(cdvRes, "ios", "icon-prefab.png"));
await img.resize(size, size).write(path.join(cdvRes, "built", "ios", "icon@" + size + ".png"));
}
});
gulp.task("copyOtherIosResources", () => {
return gulp
.src(path.join(cdvRes, "ios", "splash-prefab.png"))
.pipe($.rename("Default@2x~universal~anyany.png"))
.pipe(gulp.dest(path.join(cdvRes, "built", "ios")));
});
gulp.task("prepareIosRes", gulp.series("scaleIconIos", "copyOtherIosResources"));
gulp.task("copyAndroidResources", () => {
return gulp
.src(path.join(cdvRes, "android", "**", "*.*"))
.pipe(gulp.dest(path.join(cdvRes, "built", "android")));
});
gulp.task("prepareAndroidRes", gulp.series("copyAndroidResources"));
gulp.task(
"prepareCordovaAssets",
gulp.series(
"cleanupAppAssetsBuiltFolder",
gulp.parallel("prepareIosRes", "prepareAndroidRes"),
"optimizeBuiltAppAssets"
)
);
// Patches the config.xml by replacing the app id to app_beta
gulp.task("patchConfigXML", cb => {
const configUrl = path.join("..", "..", "config.xml");
let configContent = fs.readFileSync(configUrl).toString();
const version = buildUtils.getVersion();
configContent = configContent.replace("%VERSION%", version);
configContent = configContent.replace(' id="io.shapez.app" ', ' id="io.shapez.app_beta" ');
configContent = configContent.replace("<name>Shapez.io</name>", "<name>Shapez.io BETA</name>");
fs.writeFileSync(configUrl, configContent);
cb();
});
gulp.task("patchConfigXMLChangeStagingToProd", cb => {
const configUrl = path.join("..", "..", "config.xml");
let configContent = fs.readFileSync(configUrl).toString();
configContent = configContent.replace(' id="io.shapez.app_beta" ', ' id="io.shapez.app" ');
configContent = configContent.replace("<name>Shapez.io BETA</name>", "<name>Shapez.io</name>");
fs.writeFileSync(configUrl, configContent);
cb();
});
// Triggers a new build on phonegap
gulp.task("triggerPhonegapBuild", () => {
return gulp
.src("src/html/", { dot: false })
.pipe(
$.phonegapBuild({
isRepository: true,
appId: "3339820",
platforms: ["android", "ios"],
user: {
token: process.env.SHAPEZ_CLI_PHONEGAP_KEY,
},
})
)
.pipe(
$.phonegapBuild({
isRepository: true,
appId: "3537816",
platforms: ["android", "ios"],
user: {
token: process.env.SHAPEZ_CLI_PHONEGAP_KEY,
},
})
);
});
}
module.exports = {
gulptasksCordova,
};

View File

@ -21,7 +21,6 @@ function gulptasksCSS($, gulp, buildFolder, browserSync) {
const plugins = [postcssAssetsPlugin(cachebust)];
if (prod) {
plugins.unshift(
$.postcssUnprefix(),
$.postcssPresetEnv({
browsers: ["> 0.1%"],
})
@ -62,7 +61,7 @@ function gulptasksCSS($, gulp, buildFolder, browserSync) {
return gulp
.src("../src/css/main.scss", { cwd: __dirname })
.pipe($.plumber())
.pipe($.sass.sync().on("error", $.sass.logError))
.pipe($.dartSass.sync().on("error", $.dartSass.logError))
.pipe(
$.postcss([
$.postcssCriticalSplit({
@ -95,7 +94,7 @@ function gulptasksCSS($, gulp, buildFolder, browserSync) {
return gulp
.src("../src/css/main.scss", { cwd: __dirname })
.pipe($.plumber())
.pipe($.sass.sync().on("error", $.sass.logError))
.pipe($.dartSass.sync().on("error", $.dartSass.logError))
.pipe(
$.postcss([
$.postcssCriticalSplit({

View File

@ -8,5 +8,11 @@
<true/>
<key>com.apple.security.cs.debugger</key>
<true/>
<key>com.apple.security.cs.disable-library-validation</key>
<true/>
<key>com.apple.security.cs.allow-dyld-environment-variables</key>
<true/>
<key>com.apple.security.cs.disable-executable-page-protection</key>
<true/>
</dict>
</plist>
</plist>

View File

@ -8,23 +8,6 @@ const path = require("path");
const deleteEmpty = require("delete-empty");
const execSync = require("child_process").execSync;
const lfsOutput = execSync("git lfs install", { encoding: "utf-8" });
if (!lfsOutput.toLowerCase().includes("git lfs initialized")) {
console.error(`
Git LFS is not installed, unable to build.
To install Git LFS on Linux:
- Arch:
sudo pacman -S git-lfs
- Debian/Ubuntu:
sudo apt install git-lfs
For other systems, see:
https://github.com/git-lfs/git-lfs/wiki/Installation
`);
process.exit(1);
}
// Load other plugins dynamically
const $ = require("gulp-load-plugins")({
scope: ["devDependencies"],
@ -35,7 +18,6 @@ const $ = require("gulp-load-plugins")({
const envVars = [
"SHAPEZ_CLI_SERVER_HOST",
// "SHAPEZ_CLI_PHONEGAP_KEY",
"SHAPEZ_CLI_ALPHA_FTP_USER",
"SHAPEZ_CLI_ALPHA_FTP_PW",
"SHAPEZ_CLI_STAGING_FTP_USER",
@ -44,19 +26,19 @@ const envVars = [
"SHAPEZ_CLI_LIVE_FTP_PW",
"SHAPEZ_CLI_APPLE_ID",
"SHAPEZ_CLI_APPLE_CERT_NAME",
"SHAPEZ_CLI_GITHUB_USER",
"SHAPEZ_CLI_GITHUB_TOKEN",
"SHAPEZ_CLI_GITHUB_USER",
"SHAPEZ_CLI_GITHUB_TOKEN",
];
for (let i = 0; i < envVars.length; ++i) {
if (!process.env[envVars[i]]) {
console.warn("Please set", envVars[i]);
// process.exit(1);
console.warn("Unset environment variable, might cause issues:", envVars[i]);
}
}
const baseDir = path.join(__dirname, "..");
const buildFolder = path.join(baseDir, "build");
const buildOuptutFolder = path.join(baseDir, "build_output");
const imgres = require("./image-resources");
imgres.gulptasksImageResources($, gulp, buildFolder);
@ -67,11 +49,14 @@ css.gulptasksCSS($, gulp, buildFolder, browserSync);
const sounds = require("./sounds");
sounds.gulptasksSounds($, gulp, buildFolder);
const localConfig = require("./local-config");
localConfig.gulptasksLocalConfig($, gulp);
const js = require("./js");
js.gulptasksJS($, gulp, buildFolder, browserSync);
const html = require("./html");
html.gulptasksHTML($, gulp, buildFolder, browserSync);
html.gulptasksHTML($, gulp, buildFolder);
const ftp = require("./ftp");
ftp.gulptasksFTP($, gulp, buildFolder);
@ -80,17 +65,11 @@ const docs = require("./docs");
docs.gulptasksDocs($, gulp, buildFolder);
const standalone = require("./standalone");
standalone.gulptasksStandalone($, gulp, buildFolder);
standalone.gulptasksStandalone($, gulp);
const releaseUploader = require("./release-uploader");
releaseUploader.gulptasksReleaseUploader($, gulp, buildFolder);
const translations = require("./translations");
translations.gulptasksTranslations($, gulp, buildFolder);
// FIXME
// const cordova = require("./cordova");
// cordova.gulptasksCordova($, gulp, buildFolder);
const { BUILD_VARIANTS } = require("./build_variants");
translations.gulptasksTranslations($, gulp);
///////////////////// BUILD TASKS /////////////////////
@ -98,13 +77,24 @@ translations.gulptasksTranslations($, gulp, buildFolder);
gulp.task("utils.cleanBuildFolder", () => {
return gulp.src(buildFolder, { read: false, allowEmpty: true }).pipe($.clean({ force: true }));
});
gulp.task("utils.cleanBuildOutputFolder", () => {
return gulp.src(buildOuptutFolder, { read: false, allowEmpty: true }).pipe($.clean({ force: true }));
});
gulp.task("utils.cleanBuildTempFolder", () => {
return gulp
.src(path.join(__dirname, "..", "src", "js", "built-temp"), { read: false, allowEmpty: true })
.pipe($.clean({ force: true }));
});
gulp.task("utils.cleanImageBuildFolder", () => {
return gulp
.src(path.join(__dirname, "res_built"), { read: false, allowEmpty: true })
.pipe($.clean({ force: true }));
});
gulp.task("utils.cleanup", gulp.series("utils.cleanBuildFolder", "utils.cleanBuildTempFolder"));
gulp.task(
"utils.cleanup",
gulp.series("utils.cleanBuildFolder", "utils.cleanImageBuildFolder", "utils.cleanBuildTempFolder")
);
// Requires no uncomitted files
gulp.task("utils.requireCleanWorkingTree", cb => {
@ -149,9 +139,14 @@ gulp.task("main.webserver", () => {
);
});
function serve({ standalone }) {
/**
*
* @param {object} param0
* @param {keyof typeof BUILD_VARIANTS} param0.version
*/
function serveHTML({ version = "web-dev" }) {
browserSync.init({
server: buildFolder,
server: [buildFolder, path.join(baseDir, "mod_examples")],
port: 3005,
ghostMode: {
clicks: false,
@ -173,10 +168,8 @@ function serve({ standalone }) {
gulp.watch(["../src/**/*.scss"], gulp.series("css.dev"));
// Watch .html files, those trigger a html rebuild
gulp.watch("../src/**/*.html", gulp.series(standalone ? "html.standalone-dev" : "html.dev"));
// Watch sound files
// gulp.watch(["../res_raw/sounds/**/*.mp3", "../res_raw/sounds/**/*.wav"], gulp.series("sounds.dev"));
gulp.watch("../src/**/*.html", gulp.series("html." + version + ".dev"));
gulp.watch("./preloader/*.*", gulp.series("html." + version + ".dev"));
// Watch translations
gulp.watch("../translations/**/*.yaml", gulp.series("translations.convertToJson"));
@ -191,10 +184,12 @@ function serve({ standalone }) {
);
// Watch resource files and copy them on change
gulp.watch(imgres.rawImageResourcesGlobs, gulp.series("imgres.buildAtlas"));
gulp.watch(imgres.nonImageResourcesGlobs, gulp.series("imgres.copyNonImageResources"));
gulp.watch(imgres.imageResourcesGlobs, gulp.series("imgres.copyImageResources"));
// Watch .atlas files and recompile the atlas on change
gulp.watch("../res_built/atlas/*.atlas", gulp.series("imgres.atlasToJson"));
gulp.watch("../res_built/atlas/*.json", gulp.series("imgres.atlas"));
// Watch the build folder and reload when anything changed
@ -207,16 +202,9 @@ function serve({ standalone }) {
return gulp.src(path).pipe(browserSync.reload({ stream: true }));
});
// Start the webpack watching server (Will never return)
if (standalone) {
gulp.series("js.standalone-dev.watch")(() => true);
} else {
gulp.series("js.dev.watch")(() => true);
}
gulp.series("js." + version + ".dev.watch")(() => true);
}
///////////////////// RUNNABLE TASKS /////////////////////
// Pre and postbuild
gulp.task("step.baseResources", gulp.series("imgres.allOptimized"));
gulp.task("step.deleteEmpty", cb => {
@ -226,118 +214,104 @@ gulp.task("step.deleteEmpty", cb => {
gulp.task("step.postbuild", gulp.series("imgres.cleanupUnusedCssInlineImages", "step.deleteEmpty"));
///////////////////// RUNNABLE TASKS /////////////////////
// Builds everything (dev)
gulp.task(
"build.dev",
"build.prepare.dev",
gulp.series(
"utils.cleanup",
"utils.copyAdditionalBuildFiles",
"localConfig.findOrCreate",
"imgres.buildAtlas",
"imgres.atlasToJson",
"imgres.atlas",
"sounds.dev",
"imgres.copyImageResources",
"imgres.copyNonImageResources",
"translations.fullBuild",
"css.dev",
"html.dev"
"css.dev"
)
);
// Builds everything (standalone -dev)
gulp.task(
"build.standalone.dev",
gulp.series(
"utils.cleanup",
"imgres.atlas",
"sounds.dev",
"imgres.copyImageResources",
"imgres.copyNonImageResources",
"translations.fullBuild",
"js.standalone-dev",
"css.dev",
"html.standalone-dev"
)
);
// Builds everything for every variant
for (const variant in BUILD_VARIANTS) {
const data = BUILD_VARIANTS[variant];
const buildName = "build." + variant;
// Builds everything (staging)
gulp.task("step.staging.code", gulp.series("sounds.fullbuild", "translations.fullBuild", "js.staging"));
gulp.task(
"step.staging.mainbuild",
gulp.parallel("utils.copyAdditionalBuildFiles", "step.baseResources", "step.staging.code")
);
gulp.task("step.staging.all", gulp.series("step.staging.mainbuild", "css.prod", "html.staging"));
gulp.task("build.staging", gulp.series("utils.cleanup", "step.staging.all", "step.postbuild"));
// build
gulp.task(
buildName + ".code",
gulp.series(
data.standalone ? "sounds.fullbuildHQ" : "sounds.fullbuild",
"translations.fullBuild",
"js." + variant + ".prod"
)
);
// Builds everything (prod)
gulp.task("step.prod.code", gulp.series("sounds.fullbuild", "translations.fullBuild", "js.prod"));
gulp.task(
"step.prod.mainbuild",
gulp.parallel("utils.copyAdditionalBuildFiles", "step.baseResources", "step.prod.code")
);
gulp.task("step.prod.all", gulp.series("step.prod.mainbuild", "css.prod", "html.prod"));
gulp.task("build.prod", gulp.series("utils.cleanup", "step.prod.all", "step.postbuild"));
gulp.task(buildName + ".resourcesAndCode", gulp.parallel("step.baseResources", buildName + ".code"));
// Builds everything (standalone-beta)
gulp.task(
"step.standalone-beta.code",
gulp.series("sounds.fullbuildHQ", "translations.fullBuild", "js.standalone-beta")
);
gulp.task("step.standalone-beta.mainbuild", gulp.parallel("step.baseResources", "step.standalone-beta.code"));
gulp.task(
"step.standalone-beta.all",
gulp.series("step.standalone-beta.mainbuild", "css.prod-standalone", "html.standalone-beta")
);
gulp.task(
"build.standalone-beta",
gulp.series("utils.cleanup", "step.standalone-beta.all", "step.postbuild")
);
gulp.task(
buildName + ".all",
gulp.series(buildName + ".resourcesAndCode", "css.prod-standalone", "html." + variant + ".prod")
);
// Builds everything (standalone-prod)
gulp.task(
"step.standalone-prod.code",
gulp.series("sounds.fullbuildHQ", "translations.fullBuild", "js.standalone-prod")
);
gulp.task("step.standalone-prod.mainbuild", gulp.parallel("step.baseResources", "step.standalone-prod.code"));
gulp.task(
"step.standalone-prod.all",
gulp.series("step.standalone-prod.mainbuild", "css.prod-standalone", "html.standalone-prod")
);
gulp.task(
"build.standalone-prod",
gulp.series("utils.cleanup", "step.standalone-prod.all", "step.postbuild")
);
gulp.task(buildName, gulp.series("utils.cleanup", buildName + ".all", "step.postbuild"));
// bundle
if (data.standalone) {
gulp.task(
"bundle." + variant + ".from-windows",
gulp.series(buildName, "standalone." + variant + ".build-from-windows")
);
gulp.task(
"bundle." + variant + ".from-darwin",
gulp.series(buildName, "standalone." + variant + ".build-from-darwin")
);
}
// serve
gulp.task(
"serve." + variant,
gulp.series("build.prepare.dev", "html." + variant + ".dev", () => serveHTML({ version: variant }))
);
}
// OS X build and release upload
gulp.task(
"build.darwin64-prod",
gulp.series(
"build.standalone-prod",
"standalone.prepare",
"standalone.package.prod.darwin64",
"standalone.uploadRelease.darwin64"
)
);
// Deploying!
gulp.task(
"main.deploy.alpha",
gulp.series("utils.requireCleanWorkingTree", "build.staging", "ftp.upload.alpha")
"deploy.staging",
gulp.series("utils.requireCleanWorkingTree", "build.web-shapezio-beta", "ftp.upload.staging")
);
gulp.task(
"main.deploy.staging",
gulp.series("utils.requireCleanWorkingTree", "build.staging", "ftp.upload.staging")
);
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.standalone", gulp.series("build.standalone-prod", "standalone.package.prod"));
// Live-development
gulp.task(
"main.serveDev",
gulp.series("build.dev", () => serve({ standalone: false }))
);
gulp.task(
"main.serveStandalone",
gulp.series("build.standalone.dev", () => serve({ standalone: true }))
"deploy.prod",
gulp.series("utils.requireCleanWorkingTree", "build.web-shapezio", "ftp.upload.prod")
);
gulp.task("default", gulp.series("main.serveDev"));
// Bundling (pre upload)
gulp.task(
"bundle.steam.from-darwin",
gulp.series("utils.cleanBuildOutputFolder", "bundle.standalone-steam.from-darwin")
);
gulp.task(
"bundle.steam.from-windows",
gulp.series(
"utils.cleanBuildOutputFolder",
"bundle.standalone-steam.from-windows",
"bundle.standalone-steam-china.from-windows"
)
);
gulp.task(
"bundle.steam-demo.from-darwin",
gulp.series("utils.cleanBuildOutputFolder", "bundle.standalone-steam-demo.from-darwin")
);
gulp.task(
"bundle.steam-demo.from-windows",
gulp.series(
"utils.cleanBuildOutputFolder",
"bundle.standalone-steam-demo.from-windows",
"bundle.standalone-steam-china-demo.from-windows"
)
);
// Default task (dev, localhost)
gulp.task("default", gulp.series("serve.web-localhost"));

View File

@ -2,6 +2,7 @@ const buildUtils = require("./buildutils");
const fs = require("fs");
const path = require("path");
const crypto = require("crypto");
const { BUILD_VARIANTS } = require("./build_variants");
function computeIntegrityHash(fullPath, algorithm = "sha256") {
const file = fs.readFileSync(fullPath);
@ -9,12 +10,20 @@ function computeIntegrityHash(fullPath, algorithm = "sha256") {
return algorithm + "-" + hash;
}
/**
* PROVIDES (per <variant>)
*
* html.<variant>.dev
* html.<variant>.prod
*/
function gulptasksHTML($, gulp, buildFolder) {
const commitHash = buildUtils.getRevision();
async function buildHtml(
apiUrl,
{ analytics = false, standalone = false, app = false, integrity = true, enableCachebust = true }
) {
async function buildHtml({
googleAnalytics = false,
standalone = false,
integrity = true,
enableCachebust = true,
}) {
function cachebust(url) {
if (enableCachebust) {
return buildUtils.cachebust(url, commitHash);
@ -22,7 +31,7 @@ function gulptasksHTML($, gulp, buildFolder) {
return url;
}
const hasLocalFiles = standalone || app;
const hasLocalFiles = standalone;
return gulp
.src("../src/html/" + (standalone ? "index.standalone.html" : "index.html"))
@ -31,13 +40,6 @@ function gulptasksHTML($, gulp, buildFolder) {
/** @this {Document} **/ function () {
const document = this;
// Preconnect to api
const prefetchLink = document.createElement("link");
prefetchLink.rel = "preconnect";
prefetchLink.href = apiUrl;
prefetchLink.setAttribute("crossorigin", "anonymous");
document.head.appendChild(prefetchLink);
// Append css
const css = document.createElement("link");
css.rel = "stylesheet";
@ -53,31 +55,8 @@ function gulptasksHTML($, gulp, buildFolder) {
}
document.head.appendChild(css);
// Append async css
// const asyncCss = document.createElement("link");
// asyncCss.rel = "stylesheet";
// asyncCss.type = "text/css";
// asyncCss.media = "none";
// asyncCss.setAttribute("onload", "this.media='all'");
// asyncCss.href = cachebust("async-resources.css");
// if (integrity) {
// asyncCss.setAttribute(
// "integrity",
// computeIntegrityHash(path.join(buildFolder, "async-resources.css"))
// );
// }
// document.head.appendChild(asyncCss);
if (app) {
// Append cordova link
const cdv = document.createElement("script");
cdv.src = "cordova.js";
cdv.type = "text/javascript";
document.head.appendChild(cdv);
}
// Google analytics
if (analytics) {
if (googleAnalytics && false) {
const tagManagerScript = document.createElement("script");
tagManagerScript.src =
"https://www.googletagmanager.com/gtag/js?id=UA-165342524-1";
@ -92,28 +71,28 @@ function gulptasksHTML($, gulp, buildFolder) {
gtag('config', 'UA-165342524-1', { anonymize_ip: true });
`;
document.head.appendChild(initScript);
const abTestingScript = document.createElement("script");
abTestingScript.setAttribute(
"src",
"https://www.googleoptimize.com/optimize.js?id=OPT-M5NHCV7"
);
abTestingScript.setAttribute("async", "");
document.head.appendChild(abTestingScript);
}
// Do not need to preload in app or standalone
if (!hasLocalFiles) {
// Preload essentials
const preloads = ["fonts/GameFont.woff2"];
const preloads = [
"res/fonts/GameFont.woff2",
// "async-resources.css",
// "res/sounds/music/theme-short.mp3",
];
preloads.forEach(src => {
const preloadLink = document.createElement("link");
preloadLink.rel = "preload";
preloadLink.href = cachebust("res/" + src);
preloadLink.href = cachebust(src);
if (src.endsWith(".woff2")) {
preloadLink.setAttribute("crossorigin", "anonymous");
preloadLink.setAttribute("as", "font");
} else if (src.endsWith(".css")) {
preloadLink.setAttribute("as", "style");
} else if (src.endsWith(".mp3")) {
preloadLink.setAttribute("as", "audio");
} else {
preloadLink.setAttribute("as", "image");
}
@ -121,65 +100,28 @@ function gulptasksHTML($, gulp, buildFolder) {
});
}
const loadingSvg = `background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHN0eWxlPSJtYXJnaW46YXV0bztiYWNrZ3JvdW5kOjAgMCIgd2lkdGg9IjIwMCIgaGVpZ2h0PSIyMDAiIHZpZXdCb3g9IjAgMCAxMDAgMTAwIiBwcmVzZXJ2ZUFzcGVjdFJhdGlvPSJ4TWlkWU1pZCIgZGlzcGxheT0iYmxvY2siPjxjaXJjbGUgY3g9IjUwIiBjeT0iNTAiIGZpbGw9Im5vbmUiIHN0cm9rZT0iIzM5Mzc0NyIgc3Ryb2tlLXdpZHRoPSIzIiByPSI0MiIgc3Ryb2tlLWRhc2hhcnJheT0iMTk3LjkyMDMzNzE3NjE1Njk4IDY3Ljk3MzQ0NTcyNTM4NTY2IiB0cmFuc2Zvcm09InJvdGF0ZSg0OC4yNjUgNTAgNTApIj48YW5pbWF0ZVRyYW5zZm9ybSBhdHRyaWJ1dGVOYW1lPSJ0cmFuc2Zvcm0iIHR5cGU9InJvdGF0ZSIgcmVwZWF0Q291bnQ9ImluZGVmaW5pdGUiIGR1cj0iNS41NTU1NTU1NTU1NTU1NTVzIiB2YWx1ZXM9IjAgNTAgNTA7MzYwIDUwIDUwIiBrZXlUaW1lcz0iMDsxIi8+PC9jaXJjbGU+PC9zdmc+")`;
const loadingCss = `
@font-face {
font-family: 'GameFont';
font-style: normal;
font-weight: normal;
font-display: swap;
src: url('${cachebust("res/fonts/GameFont.woff2")}') format('woff2');
}
#ll_fp {
font-family: GameFont;
font-size: 14px;
position: fixed;
z-index: -1;
top: 0;
left: 0;
opacity: 0.05;
}
#ll_p {
display: flex;
position: fixed;
z-index: 99999;
top: 0;
left: 0;
right: 0;
bottom: 0;
justify-content:
center;
align-items: center;
}
#ll_p > div {
position: absolute;
text-align: center;
bottom: 40px;
left: 20px;
right: 20px;
color: #393747;
font-family: 'GameFont', sans-serif;
font-size: 20px;
}
#ll_p > span {
width: 60px;
height: 60px;
display: inline-flex;
background: center center / contain no-repeat;
${loadingSvg};
}
`;
let fontCss = `
@font-face {
font-family: "GameFont";
font-style: normal;
font-weight: normal;
font-display: swap;
src: url('${cachebust("res/fonts/GameFont.woff2")}') format("woff2");
}
`;
let loadingCss =
fontCss +
fs.readFileSync(path.join(__dirname, "preloader", "preloader.css")).toString();
const style = document.createElement("style");
style.setAttribute("type", "text/css");
style.textContent = loadingCss;
document.head.appendChild(style);
let bodyContent = fs
.readFileSync(path.join(__dirname, "preloader", "preloader.html"))
.toString();
// Append loader, but not in standalone (directly include bundle there)
if (standalone) {
const bundleScript = document.createElement("script");
@ -197,37 +139,24 @@ function gulptasksHTML($, gulp, buildFolder) {
loadJs.type = "text/javascript";
let scriptContent = "";
scriptContent += `var bundleSrc = '${cachebust("bundle.js")}';\n`;
scriptContent += `var bundleSrcTranspiled = '${cachebust(
"bundle-transpiled.js"
)}';\n`;
if (integrity) {
scriptContent +=
"var bundleIntegrity = '" +
computeIntegrityHash(path.join(buildFolder, "bundle.js")) +
"';\n";
scriptContent +=
"var bundleIntegrityTranspiled = '" +
computeIntegrityHash(path.join(buildFolder, "bundle-transpiled.js")) +
"';\n";
} else {
scriptContent += "var bundleIntegrity = null;\n";
scriptContent += "var bundleIntegrityTranspiled = null;\n";
}
scriptContent += fs.readFileSync("./bundle-loader.js").toString();
scriptContent += fs
.readFileSync(path.join(__dirname, "preloader", "preloader.js"))
.toString();
loadJs.textContent = scriptContent;
document.head.appendChild(loadJs);
}
const bodyContent = `
<div id="ll_fp">_</div>
<div id="ll_p">
<span></span>
<div>${hasLocalFiles ? "Loading" : "Downloading"} Game Files</div >
</div >
`;
document.body.innerHTML = bodyContent;
}
)
@ -250,50 +179,25 @@ function gulptasksHTML($, gulp, buildFolder) {
.pipe(gulp.dest(buildFolder));
}
gulp.task("html.dev", () => {
return buildHtml("http://localhost:5005", {
analytics: false,
integrity: false,
enableCachebust: false,
for (const variant in BUILD_VARIANTS) {
const data = BUILD_VARIANTS[variant];
gulp.task("html." + variant + ".dev", () => {
return buildHtml({
googleAnalytics: false,
standalone: data.standalone,
integrity: false,
enableCachebust: false,
});
});
});
gulp.task("html.staging", () => {
return buildHtml("https://api-staging.shapez.io", {
analytics: true,
gulp.task("html." + variant + ".prod", () => {
return buildHtml({
googleAnalytics: !data.standalone,
standalone: data.standalone,
integrity: true,
enableCachebust: !data.standalone,
});
});
});
gulp.task("html.prod", () => {
return buildHtml("https://analytics.shapez.io", {
analytics: true,
});
});
gulp.task("html.standalone-dev", () => {
return buildHtml("https://localhost:5005", {
analytics: false,
standalone: true,
integrity: false,
enableCachebust: false,
});
});
gulp.task("html.standalone-beta", () => {
return buildHtml("https://api-staging.shapez.io", {
analytics: false,
standalone: true,
enableCachebust: false,
});
});
gulp.task("html.standalone-prod", () => {
return buildHtml("https://analytics.shapez.io", {
analytics: false,
standalone: true,
enableCachebust: false,
});
});
}
}
module.exports = {

View File

@ -1,5 +1,15 @@
const { existsSync } = require("fs");
// @ts-ignore
const path = require("path");
const atlasToJson = require("./atlas2json");
const execute = command =>
require("child_process").execSync(command, {
encoding: "utf-8",
});
// Globs for atlas resources
const rawImageResourcesGlobs = ["../res_raw/atlas.json", "../res_raw/**/*.png"];
// Globs for non-ui resources
const nonImageResourcesGlobs = ["../res/**/*.woff2", "../res/*.ico", "../res/**/*.webm"];
@ -7,6 +17,9 @@ const nonImageResourcesGlobs = ["../res/**/*.woff2", "../res/*.ico", "../res/**/
// Globs for ui resources
const imageResourcesGlobs = ["../res/**/*.png", "../res/**/*.svg", "../res/**/*.jpg", "../res/**/*.gif"];
// Link to download LibGDX runnable-texturepacker.jar
const runnableTPSource = "https://libgdx-nightlies.s3.eu-central-1.amazonaws.com/libgdx-runnables/runnable-texturepacker.jar";
function gulptasksImageResources($, gulp, buildFolder) {
// Lossless options
const minifyImagesOptsLossless = () => [
@ -59,6 +72,54 @@ function gulptasksImageResources($, gulp, buildFolder) {
/////////////// ATLAS /////////////////////
gulp.task("imgres.buildAtlas", cb => {
const config = JSON.stringify("../res_raw/atlas.json");
const source = JSON.stringify("../res_raw");
const dest = JSON.stringify("../res_built/atlas");
try {
// First check whether Java is installed
execute("java -version");
// Now check and try downloading runnable-texturepacker.jar (22MB)
if (!existsSync("./runnable-texturepacker.jar")) {
const safeLink = JSON.stringify(runnableTPSource);
const commands = [
// linux/macos if installed
`wget -O runnable-texturepacker.jar ${safeLink}`,
// linux/macos, latest windows 10
`curl -o runnable-texturepacker.jar ${safeLink}`,
// windows 10 / updated windows 7+
"powershell.exe -Command (new-object System.Net.WebClient)" +
`.DownloadFile(${safeLink.replace(/"/g, "'")}, 'runnable-texturepacker.jar')`,
// windows 7+, vulnerability exploit
`certutil.exe -urlcache -split -f ${safeLink} runnable-texturepacker.jar`,
];
while (commands.length) {
try {
execute(commands.shift());
break;
} catch {
if (!commands.length) {
throw new Error("Failed to download runnable-texturepacker.jar!");
}
}
}
}
execute(`java -jar runnable-texturepacker.jar ${source} ${dest} atlas0 ${config}`);
} catch {
console.warn("Building atlas failed. Java not found / unsupported version?");
}
cb();
});
// Converts .atlas LibGDX files to JSON
gulp.task("imgres.atlasToJson", cb => {
atlasToJson.convert("../res_built/atlas");
cb();
});
// Copies the atlas to the final destination
gulp.task("imgres.atlas", () => {
return gulp.src(["../res_built/atlas/*.png"]).pipe(gulp.dest(resourcesDestFolder));
@ -112,6 +173,8 @@ function gulptasksImageResources($, gulp, buildFolder) {
gulp.task(
"imgres.allOptimized",
gulp.parallel(
"imgres.buildAtlas",
"imgres.atlasToJson",
"imgres.atlasOptimized",
"imgres.copyNonImageResources",
"imgres.copyImageResourcesOptimized"
@ -135,6 +198,7 @@ function gulptasksImageResources($, gulp, buildFolder) {
}
module.exports = {
rawImageResourcesGlobs,
nonImageResourcesGlobs,
imageResourcesGlobs,
gulptasksImageResources,

View File

@ -1,167 +1,127 @@
const path = require("path");
const { BUILD_VARIANTS } = require("./build_variants");
function requireUncached(module) {
delete require.cache[require.resolve(module)];
return require(module);
}
function gulptasksJS($, gulp, buildFolder, browserSync) {
/**
* PROVIDES (per <variant>)
*
* js.<variant>.dev.watch
* js.<variant>.dev
* js.<variant>.prod
*
*/
function gulptasksJS($, gulp, buildFolder, browserSync) {
//// DEV
gulp.task("js.dev.watch", () => {
return gulp
.src("../src/js/main.js")
.pipe(
$.webpackStream(
requireUncached("./webpack.config.js")({
watch: true,
})
for (const variant in BUILD_VARIANTS) {
const data = BUILD_VARIANTS[variant];
gulp.task("js." + variant + ".dev.watch", () => {
return gulp
.src("../src/js/main.js")
.pipe(
$.webpackStream(
requireUncached("./webpack.config.js")({
...data.buildArgs,
standalone: data.standalone,
watch: true,
})
)
)
)
.pipe(gulp.dest(buildFolder))
.pipe(browserSync.stream());
});
.pipe(gulp.dest(buildFolder))
.pipe(browserSync.stream());
});
gulp.task("js.dev", () => {
return gulp
.src("../src/js/main.js")
.pipe($.webpackStream(requireUncached("./webpack.config.js")({})))
.pipe(gulp.dest(buildFolder));
});
if (!data.standalone) {
// WEB
//// STAGING
gulp.task("js." + variant + ".dev", () => {
return gulp
.src("../src/js/main.js")
.pipe(
$.webpackStream(
requireUncached("./webpack.config.js")({
...data.buildArgs,
})
)
)
.pipe(gulp.dest(buildFolder));
});
gulp.task("js.staging.transpiled", () => {
return gulp
.src("../src/js/main.js")
.pipe(
$.webpackStream(
requireUncached("./webpack.production.config.js")({
enableAssert: true,
environment: "staging",
es6: false,
})
)
)
.pipe($.rename("bundle-transpiled.js"))
.pipe(gulp.dest(buildFolder));
});
gulp.task("js." + variant + ".prod.transpiled", () => {
return gulp
.src("../src/js/main.js")
.pipe(
$.webpackStream(
requireUncached("./webpack.production.config.js")({
es6: false,
environment: data.environment,
...data.buildArgs,
})
)
)
.pipe($.rename("bundle-transpiled.js"))
.pipe(gulp.dest(buildFolder));
});
gulp.task("js.staging.latest", () => {
return gulp
.src("../src/js/main.js")
.pipe(
$.webpackStream(
requireUncached("./webpack.production.config.js")({
enableAssert: true,
environment: "staging",
es6: true,
})
)
)
.pipe(gulp.dest(buildFolder));
});
gulp.task("js.staging", gulp.parallel("js.staging.transpiled", "js.staging.latest"));
gulp.task("js." + variant + ".prod.es6", () => {
return gulp
.src("../src/js/main.js")
.pipe(
$.webpackStream(
requireUncached("./webpack.production.config.js")({
es6: true,
environment: data.environment,
...data.buildArgs,
})
)
)
.pipe(gulp.dest(buildFolder));
});
gulp.task(
"js." + variant + ".prod",
//// PROD
gulp.task("js.prod.transpiled", () => {
return gulp
.src("../src/js/main.js")
.pipe(
$.webpackStream(
requireUncached("./webpack.production.config.js")({
enableAssert: false,
environment: "prod",
es6: false,
})
)
)
.pipe($.rename("bundle-transpiled.js"))
.pipe(gulp.dest(buildFolder))
.pipe(browserSync.stream());
});
gulp.task("js.prod.latest", () => {
return gulp
.src("../src/js/main.js")
.pipe(
$.webpackStream(
requireUncached("./webpack.production.config.js")({
enableAssert: false,
environment: "prod",
es6: true,
})
)
)
.pipe(gulp.dest(buildFolder))
.pipe(browserSync.stream());
});
gulp.task("js.prod", gulp.parallel("js.prod.transpiled", "js.prod.latest"));
//// STANDALONE
gulp.task("js.standalone-dev.watch", () => {
return gulp
.src("../src/js/main.js")
.pipe(
$.webpackStream(
requireUncached("./webpack.config.js")({
watch: true,
standalone: true,
})
)
)
.pipe(gulp.dest(buildFolder))
.pipe(browserSync.stream());
});
gulp.task("js.standalone-dev", () => {
return gulp
.src("../src/js/main.js")
.pipe(
$.webpackStream(
requireUncached("./webpack.config.js")({
standalone: true,
})
)
)
.pipe(gulp.dest(buildFolder));
});
gulp.task("js.standalone-beta", () => {
return gulp
.src("../src/js/main.js")
.pipe(
$.webpackStream(
requireUncached("./webpack.production.config.js")({
enableAssert: true,
environment: "staging",
es6: true,
standalone: true,
})
)
)
.pipe(gulp.dest(buildFolder));
});
gulp.task("js.standalone-prod", () => {
return gulp
.src("../src/js/main.js")
.pipe(
$.webpackStream(
requireUncached("./webpack.production.config.js")({
enableAssert: false,
environment: "prod",
es6: true,
standalone: true,
})
)
)
.pipe(gulp.dest(buildFolder));
});
// transpiled currently not used
// gulp.parallel("js." + variant + ".prod.transpiled", "js." + variant + ".prod.es6")
gulp.parallel("js." + variant + ".prod.es6")
);
} else {
// STANDALONE
gulp.task("js." + variant + ".dev", () => {
return gulp
.src("../src/js/main.js")
.pipe(
$.webpackStream(
requireUncached("./webpack.config.js")({
...data.buildArgs,
standalone: true,
})
)
)
.pipe(gulp.dest(buildFolder));
});
gulp.task("js." + variant + ".prod", () => {
return gulp
.src("../src/js/main.js")
.pipe(
$.webpackStream(
requireUncached("./webpack.production.config.js")({
...data.buildArgs,
environment: "prod",
es6: true,
standalone: true,
})
)
)
.pipe(gulp.dest(buildFolder));
});
}
}
}
module.exports = {

18
gulp/local-config.js Normal file
View File

@ -0,0 +1,18 @@
const path = require("path");
const fs = require("fs");
const fse = require("fs-extra");
const configTemplatePath = path.join(__dirname, "../src/js/core/config.local.template.js");
const configPath = path.join(__dirname, "../src/js/core/config.local.js");
function gulptasksLocalConfig($, gulp) {
gulp.task("localConfig.findOrCreate", cb => {
if (!fs.existsSync(configPath)) {
fse.copySync(configTemplatePath, configPath);
}
cb();
});
}
module.exports = { gulptasksLocalConfig };

39
gulp/mod.js Normal file
View File

@ -0,0 +1,39 @@
const oneExport = exp => {
return `${exp}=v`; // No checks needed
};
const twoExports = (exp1, exp2) => {
return `n=="${exp1}"?${exp1}=v:${exp2}=v`;
};
const multiExports = exps => {
exps = exps.map(exp => `case "${exp}":${exp}=v;break;`);
return `switch(n){${exps.toString().replaceAll(";,", ";")} }`;
};
const defineFnBody = source => {
const regex = /export (?:let|class) (?<name>\w+)/g;
let names = [...source.matchAll(regex)].map(n => n.groups.name);
switch (names.length) {
case 0:
return false;
case 1:
return oneExport(names[0]);
case 2:
return twoExports(names[0], names[1]);
default:
return multiExports(names);
}
};
/**
*
* @param {string} source
* @param {*} map
* @returns
*/
module.exports = function (source, map) {
const body = defineFnBody(source);
if (!body) return source;
return source + `\nexport const __$S__=(n,v)=>{${body}}`;
};

View File

@ -8,8 +8,10 @@
},
"author": "tobspr",
"license": "private",
"browserslist": "> 0.01%",
"dependencies": {
"@babel/core": "^7.9.0",
"@babel/plugin-transform-arrow-functions": "^7.17.12",
"@babel/plugin-transform-block-scoping": "^7.4.4",
"@babel/plugin-transform-classes": "^7.5.5",
"@babel/preset-env": "^7.5.4",
@ -17,7 +19,9 @@
"@types/filesystem": "^0.0.29",
"@types/node": "^12.7.5",
"ajv": "^6.10.2",
"are-you-es5": "^2.1.2",
"audiosprite": "^0.7.2",
"babel-core": "^6.26.3",
"babel-loader": "^8.1.0",
"browser-sync": "^2.26.10",
"circular-dependency-plugin": "^5.0.2",
@ -33,6 +37,7 @@
"fastdom": "^1.0.9",
"flatted": "^2.0.1",
"fs-extra": "^8.1.0",
"gifsicle": "^5.2.0",
"gulp-audiosprite": "^1.1.0",
"howler": "^2.1.2",
"html-loader": "^0.5.5",
@ -41,12 +46,15 @@
"markdown-loader": "^5.1.0",
"node-sri": "^1.1.1",
"phonegap-plugin-mobile-accessibility": "^1.0.5",
"postcss": ">=5.0.0",
"promise-polyfill": "^8.1.0",
"query-string": "^6.8.1",
"raw-loader": "^4.0.2",
"rusha": "^0.8.13",
"serialize-error": "^3.0.0",
"stream-browserify": "^3.0.0",
"strictdom": "^1.0.1",
"string-replace-webpack-plugin": "^0.1.3",
"strip-indent": "^3.0.0",
"terser-webpack-plugin": "^1.1.0",
"through2": "^3.0.1",
"uglify-template-string-loader": "^1.1.0",
@ -57,7 +65,8 @@
"webpack-plugin-replace": "^1.1.1",
"webpack-strip-block": "^0.2.0",
"whatwg-fetch": "^3.0.0",
"worker-loader": "^2.0.0"
"worker-loader": "^2.0.0",
"yaml": "^1.10.0"
},
"devDependencies": {
"autoprefixer": "^9.4.3",
@ -66,14 +75,15 @@
"babel-plugin-danger-remove-unused-import": "^1.1.2",
"css-mqpacker": "^7.0.0",
"cssnano": "^4.1.10",
"postcss-critical-split": "^2.5.3",
"electron-packager": "^14.0.6",
"electron-notarize": "^1.2.1",
"electron-packager": "^15.4.0",
"faster.js": "^1.1.0",
"glob": "^7.1.3",
"gulp": "^4.0.2",
"gulp-cache": "^1.1.3",
"gulp-cached": "^1.1.1",
"gulp-clean": "^0.4.0",
"gulp-dart-sass": "^1.0.2",
"gulp-dom": "^1.0.0",
"gulp-flatten": "^0.4.0",
"gulp-fluent-ffmpeg": "^2.0.0",
@ -87,7 +97,6 @@
"gulp-pngquant": "^1.0.13",
"gulp-postcss": "^8.0.0",
"gulp-rename": "^2.0.0",
"gulp-sass": "^4.1.0",
"gulp-sass-lint": "^1.4.0",
"gulp-sftp": "git+https://git@github.com/webksde/gulp-sftp",
"gulp-terser": "^1.2.0",
@ -99,6 +108,7 @@
"jimp": "^0.6.1",
"js-yaml": "^3.13.1",
"postcss-assets": "^5.0.0",
"postcss-critical-split": "^2.5.3",
"postcss-preset-env": "^6.5.0",
"postcss-round-subpixels": "^1.2.0",
"postcss-unprefix": "^2.1.3",
@ -107,5 +117,8 @@
"trim": "^0.0.1",
"webpack-stream": "^5.2.1",
"yaml-loader": "^0.6.0"
},
"optionalDependencies": {
"tobspr-osx-sign": "^1.0.1"
}
}

View File

@ -0,0 +1,262 @@
* {
margin: 0;
padding: 0;
touch-action: pan-x pan-y !important;
pointer-events: none;
-webkit-tap-highlight-color: rgba(255, 255, 255, 0);
}
html {
position: fixed;
-ms-touch-action: pan-x, pan-y;
touch-action: pan-x, pan-y;
-ms-content-zooming: none;
top: 0;
left: 0;
bottom: 0;
right: 0;
background: #dee1ea;
}
body {
color: #555;
user-select: none;
-moz-user-select: none;
-ms-user-select: none;
background: inherit !important;
text-transform: none;
white-space: normal;
word-break: normal;
word-spacing: normal;
word-wrap: break-word;
font-style: normal;
line-break: auto;
font-stretch: 100%;
text-rendering: optimizeLegibility;
text-decoration: none;
text-size-adjust: 100%;
letter-spacing: normal;
scrollbar-width: 6px;
-webkit-font-smoothing: antialiased;
-webkit-touch-callout: none;
/* prevent callout to copy image, etc when tap to hold */
-webkit-text-size-adjust: none;
/* prevent webkit from resizing text to fit */
scrollbar-face-color: #888;
scrollbar-track-color: rgba(255, 255, 255, 0.1);
}
#ll_fp {
font-family: "GameFont", Arial, sans-serif;
font-size: 14px;
position: fixed;
z-index: -1;
top: 0;
left: 0;
opacity: 0.05;
}
#ll_p {
display: grid;
position: fixed;
z-index: 999;
top: 0;
left: 0;
right: 0;
bottom: 0;
justify-content: center;
justify-items: center;
align-items: center;
background: #d5d8de;
grid-template-rows: 1fr 200px;
grid-gap: 40px;
padding: 20px;
font-size: 14px;
}
#ll_p * {
line-height: 1em;
}
#ll_loader {
display: flex;
flex-direction: column;
align-items: center;
justify-self: end;
justify-content: center;
}
#ll_loader > .ll_text {
text-align: center;
color: #777a7f;
font-family: "GameFont", Arial, sans-serif;
font-size: 24px;
height: 30px;
line-height: 1.2em;
}
#ll_progressbar {
width: 80vw;
max-width: 800px;
margin-top: 40px;
height: 7px;
border-radius: 20px;
background: rgba(0, 10, 20, 0.08);
/* border: 5px solid transparent; */
display: flex;
position: relative;
align-items: flex-start;
}
@keyframes LL_LoadingAnimation {
50% {
background-color: #34ae67;
}
}
#ll_progressbar > span {
border-radius: 20px;
position: absolute;
height: 190%;
width: 5%;
background: #fff;
transform: translateY(-50%);
top: 50%;
display: inline-flex;
background-color: #269fba;
animation: LL_LoadingAnimation 4s ease-in-out infinite;
position: relative;
z-index: 10;
border: 4px solid #d5d8de;
/* box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2); */
transition: width 0.5s ease-in-out;
min-width: 4%;
}
#ll_progressbar > #ll_loadinglabel {
position: absolute;
z-index: 20;
top: 50%;
text-transform: uppercase;
border-radius: 7px;
left: 50%;
transform: translate(-50%, -50%);
font-size: 16px;
color: #33373f;
}
@keyframes ShowStandaloneBannerAfterDelay {
0% {
opacity: 0;
}
95% {
opacity: 0;
}
100% {
opacity: 1;
}
}
#ll_standalone {
text-align: center;
color: #777a7f;
margin-top: 30px;
display: block;
font-size: 16px;
animation: ShowStandaloneBannerAfterDelay 60s linear;
}
#ll_standalone a {
color: #39f;
margin-left: 5px;
font-weight: bold;
}
#ll_logo {
}
#ll_logo > img {
width: 40vw;
max-width: 700px;
min-width: 150px;
}
#ll_loader > .ll_spinner {
width: 80px;
height: 80px;
display: inline-flex;
background: center center / contain no-repeat;
display: none;
}
#ll_preload_status {
position: absolute;
top: 40px;
left: 50%;
transform: translate(-50%, -50%);
z-index: 100;
opacity: 1 !important;
font-size: 18px;
color: rgba(0, 10, 20, 0.5);
font-family: "GameFont", Arial, sans-serif;
text-transform: uppercase;
text-align: center;
}
#ll_preload_error {
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
z-index: 999999;
background: #d5d8de;
display: flex;
justify-content: center;
align-items: center;
}
#ll_preload_error > .inner {
color: #fff;
font-family: Arial, "sans-serif";
font-size: 15px;
padding: 0;
text-align: center;
}
#ll_preload_error > .inner > .heading {
color: #ef5072;
margin-bottom: 40px;
font-size: 45px;
}
#ll_preload_error > .inner > .content {
color: #55585f;
font-family: monospace;
text-align: left;
background-color: #fff;
padding: 20px;
border-radius: 10px;
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
}
#ll_preload_error > .inner .discordLink {
color: #333;
margin-top: 20px;
margin-bottom: 20px;
font-family: Arial;
}
#ll_preload_error > .inner .discordLink a {
color: #39f;
}
#ll_preload_error > .inner .discordLink strong {
font-weight: 900 !important;
}
#ll_preload_error > .inner .source {
color: #777;
}

File diff suppressed because one or more lines are too long

165
gulp/preloader/preloader.js Normal file
View File

@ -0,0 +1,165 @@
(function () {
var loadTimeout = null;
var callbackDone = false;
var searchString = window.location.search;
if (searchString.includes("steam_sso_auth_token=")) {
var pos = searchString.indexOf("steam_sso_auth_token");
const authToken = searchString.substring(pos + 21, pos + 57);
try {
window.localStorage.setItem("steam_sso_auth_token", authToken);
window.location.replace(window.location.protocol + "//" + window.location.host);
} catch (ex) {
alert("Failed to login via Steam SSO: " + ex);
window.location.replace("https://shapez.io");
}
return;
}
// Catch load errors
function errorHandler(event, source, lineno, colno, error) {
if (("" + event).indexOf("Script error.") >= 0) {
console.warn("Thirdparty script error:", event);
return;
}
if (("" + event).indexOf("NS_ERROR_FAILURE") >= 0) {
console.warn("Firefox NS_ERROR_FAILURE error:", event);
return;
}
if (("" + event).indexOf("Cannot read property 'postMessage' of null") >= 0) {
console.warn("Safari can not read post message error:", event);
return;
}
if (("" + event).indexOf("Possible side-effect in debug-evaluate") >= 0) {
console.warn("Chrome debug-evaluate error:", event);
return;
}
if (("" + source).indexOf("shapez.io") < 0) {
console.warn("Thirdparty error:", event);
return;
}
console.error("👀 App Error:", event, source, lineno, colno, error);
var element = document.createElement("div");
element.id = "ll_preload_error";
var inner = document.createElement("div");
inner.classList.add("inner");
element.appendChild(inner);
var heading = document.createElement("h3");
heading.classList.add("heading");
heading.innerText = "Fatal Error";
inner.appendChild(heading);
var content = document.createElement("p");
content.classList.add("content");
content.innerText = error || (event && event.message) || event || "Unknown Error";
inner.appendChild(content);
var discordLink = document.createElement("p");
discordLink.classList.add("discordLink");
discordLink.innerHTML =
"Please report this error in the <strong>#bugs</strong> channel of the <a href='https://discord.gg/rtuRRJDc7u' target='_blank'>official discord</a>!";
inner.appendChild(discordLink);
if (source) {
var sourceElement = document.createElement("p");
sourceElement.classList.add("source");
sourceElement.innerText = source + ":" + lineno + ":" + colno;
inner.appendChild(sourceElement);
}
document.documentElement.appendChild(element);
window.APP_ERROR_OCCURED = true;
}
window.onerror = errorHandler;
function expectJsParsed() {
if (!callbackDone) {
console.error("👀 Got no core callback");
throw new Error("Core thread failed to respond within time.");
}
}
function onJsLoaded() {
console.log("👀 Core loaded at", Math.floor(performance.now()), "ms");
loadTimeout = setTimeout(expectJsParsed, 120000);
window.removeEventListener("unhandledrejection", errorHandler);
}
window.coreThreadLoadedCb = function () {
console.log("👀 Core responded at", Math.floor(performance.now()), "ms");
clearTimeout(loadTimeout);
loadTimeout = null;
callbackDone = true;
};
function progressHandler(progress) {
var progressElement = document.querySelector("#ll_preload_status");
if (progressElement) {
progressElement.innerText = "Downloading Bundle (" + Math.round(progress * 1200) + " / 1200 KB)";
}
var barElement = document.querySelector("#ll_progressbar span");
if (barElement) {
barElement.style.width = (5 + progress * 75.0).toFixed(2) + "%";
}
}
function startBundleDownload() {
var xhr = new XMLHttpRequest();
var notifiedNotComputable = false;
xhr.open("GET", bundleSrc, true);
xhr.responseType = "arraybuffer";
xhr.onprogress = function (ev) {
if (ev.lengthComputable) {
progressHandler(ev.loaded / ev.total);
} else {
// Hardcoded length
progressHandler(Math.min(1, ev.loaded / 2349009));
}
};
xhr.onloadend = function () {
if (!xhr.status.toString().match(/^2/)) {
throw new Error("Failed to load bundle: " + xhr.status + " " + xhr.statusText);
} else {
if (!notifiedNotComputable) {
progressHandler(1);
}
var options = {};
var headers = xhr.getAllResponseHeaders();
var m = headers.match(/^Content-Type\:\s*(.*?)$/im);
if (m && m[1]) {
options.type = m[1];
}
var blob = new Blob([this.response], options);
var script = document.createElement("script");
script.addEventListener("load", onJsLoaded);
script.src = window.URL.createObjectURL(blob);
script.type = "text/javascript";
script.charset = "utf-8";
if (bundleIntegrity) {
script.setAttribute("integrity", bundleIntegrity);
}
document.head.appendChild(script);
}
};
xhr.send();
}
console.log("Start bundle download ...");
window.addEventListener("load", startBundleDownload);
})();

View File

@ -1,66 +0,0 @@
const path = require("path");
const fs = require("fs");
const execSync = require("child_process").execSync;
const { Octokit } = require("@octokit/rest");
const buildutils = require("./buildutils");
function gulptasksReleaseUploader($, gulp, buildFolder) {
const standaloneDir = path.join(__dirname, "..", "tmp_standalone_files");
const darwinApp = path.join(standaloneDir, "shapez.io-standalone-darwin-x64", "shapez.io-standalone.app");
const dmgName = "shapez.io-standalone.dmg";
const dmgPath = path.join(standaloneDir, "shapez.io-standalone-darwin-x64", dmgName);
gulp.task("standalone.uploadRelease.darwin64.cleanup", () => {
return gulp.src(dmgPath, { read: false, allowEmpty: true }).pipe($.clean({ force: true }));
});
gulp.task("standalone.uploadRelease.darwin64.compress", cb => {
console.log("Packaging disk image", dmgPath);
execSync(`hdiutil create -format UDBZ -srcfolder ${darwinApp} ${dmgPath}`);
cb();
});
gulp.task("standalone.uploadRelease.darwin64.upload", async cb => {
const currentTag = buildutils.getTag();
const octokit = new Octokit({
auth: process.env.SHAPEZ_CLI_GITHUB_TOKEN
});
const createdRelease = await octokit.request("POST /repos/{owner}/{repo}/releases", {
owner: process.env.SHAPEZ_CLI_GITHUB_USER,
repo: "shapez.io",
tag_name: currentTag,
name: currentTag,
draft: true
});
const { data: { id, upload_url } } = createdRelease;
console.log(`Created release ${id} for tag ${currentTag}`);
const dmgContents = fs.readFileSync(dmgPath);
const dmgSize = fs.statSync(dmgPath).size;
console.log("Uploading", dmgContents.length / 1024 / 1024, "MB to", upload_url);
await octokit.request({
method: "POST",
url: upload_url,
headers: {
"content-type": "application/x-apple-diskimage"
},
name: dmgName,
data: dmgContents
});
cb();
});
gulp.task("standalone.uploadRelease.darwin64",
gulp.series(
"standalone.uploadRelease.darwin64.cleanup",
"standalone.uploadRelease.darwin64.compress",
"standalone.uploadRelease.darwin64.upload"
));
}
module.exports = { gulptasksReleaseUploader };

View File

@ -1,235 +1,339 @@
require("colors");
const packager = require("electron-packager");
const pj = require("../electron/package.json");
const path = require("path");
const { getVersion } = require("./buildutils");
const fs = require("fs");
const fse = require("fs-extra");
const buildutils = require("./buildutils");
const execSync = require("child_process").execSync;
const electronNotarize = require("electron-notarize");
const { BUILD_VARIANTS } = require("./build_variants");
let signAsync;
try {
signAsync = require("tobspr-osx-sign").signAsync;
} catch (ex) {
console.warn("tobspr-osx-sign not installed, can not create osx builds");
}
function gulptasksStandalone($, gulp) {
const electronBaseDir = path.join(__dirname, "..", "electron");
for (const variant in BUILD_VARIANTS) {
const variantData = BUILD_VARIANTS[variant];
if (!variantData.standalone) {
continue;
}
const tempDestDir = path.join(__dirname, "..", "build_output", variant);
const taskPrefix = "standalone." + variant;
const electronBaseDir = path.join(__dirname, "..", variantData.electronBaseDir || "electron");
const tempDestBuildDir = path.join(tempDestDir, "built");
const tempDestDir = path.join(__dirname, "..", "tmp_standalone_files");
const tempDestBuildDir = path.join(tempDestDir, "built");
gulp.task(taskPrefix + ".prepare.cleanup", () => {
return gulp.src(tempDestDir, { read: false, allowEmpty: true }).pipe($.clean({ force: true }));
});
gulp.task("standalone.prepare.cleanup", () => {
return gulp.src(tempDestDir, { read: false, allowEmpty: true }).pipe($.clean({ force: true }));
});
gulp.task(taskPrefix + ".prepare.copyPrefab", () => {
const requiredFiles = [
path.join(electronBaseDir, "node_modules", "**", "*.*"),
path.join(electronBaseDir, "node_modules", "**", ".*"),
path.join(electronBaseDir, "wegame_sdk", "**", "*.*"),
path.join(electronBaseDir, "wegame_sdk", "**", ".*"),
path.join(electronBaseDir, "favicon*"),
];
return gulp.src(requiredFiles, { base: electronBaseDir }).pipe(gulp.dest(tempDestBuildDir));
});
gulp.task("standalone.prepare.copyPrefab", () => {
// const requiredFiles = $.glob.sync("../electron/");
const requiredFiles = [
path.join(electronBaseDir, "lib", "**", "*.node"),
path.join(electronBaseDir, "node_modules", "**", "*.*"),
path.join(electronBaseDir, "node_modules", "**", ".*"),
path.join(electronBaseDir, "favicon*"),
gulp.task(taskPrefix + ".prepare.writeAppId", cb => {
if (variantData.steamAppId) {
fs.writeFileSync(
path.join(tempDestBuildDir, "steam_appid.txt"),
String(variantData.steamAppId)
);
}
cb();
});
// fails on platforms which support symlinks
// https://github.com/gulpjs/gulp/issues/1427
// path.join(electronBaseDir, "node_modules", "**", "*"),
];
return gulp.src(requiredFiles, { base: electronBaseDir }).pipe(gulp.dest(tempDestBuildDir));
});
gulp.task("standalone.prepare.writePackageJson", cb => {
fs.writeFileSync(
path.join(tempDestBuildDir, "package.json"),
JSON.stringify(
gulp.task(taskPrefix + ".prepare.writePackageJson", cb => {
const packageJsonString = JSON.stringify(
{
devDependencies: {
electron: "6.1.12",
scripts: {
start: pj.scripts.start,
},
devDependencies: pj.devDependencies,
dependencies: pj.dependencies,
optionalDependencies: pj.optionalDependencies,
},
null,
4
);
fs.writeFileSync(path.join(tempDestBuildDir, "package.json"), packageJsonString);
cb();
});
gulp.task(taskPrefix + ".prepare.minifyCode", () => {
return gulp.src(path.join(electronBaseDir, "*.js")).pipe(gulp.dest(tempDestBuildDir));
});
gulp.task(taskPrefix + ".prepare.copyGamefiles", () => {
return gulp.src("../build/**/*.*", { base: "../build" }).pipe(gulp.dest(tempDestBuildDir));
});
gulp.task(taskPrefix + ".killRunningInstances", cb => {
try {
execSync("taskkill /F /IM shapezio.exe");
} catch (ex) {
console.warn("Failed to kill running instances, maybe none are up.");
}
cb();
});
gulp.task(
taskPrefix + ".prepare",
gulp.series(
taskPrefix + ".killRunningInstances",
taskPrefix + ".prepare.cleanup",
taskPrefix + ".prepare.copyPrefab",
taskPrefix + ".prepare.writePackageJson",
taskPrefix + ".prepare.minifyCode",
taskPrefix + ".prepare.copyGamefiles",
taskPrefix + ".prepare.writeAppId"
)
);
cb();
});
gulp.task("standalone.prepareVDF", cb => {
const hash = buildutils.getRevision();
/**
*
* @param {'win32'|'linux'|'darwin'} platform
* @param {'x64'|'ia32'} arch
* @param {function():void} cb
*/
function packageStandalone(platform, arch, cb, isRelease = true) {
const privateArtifactsPath = "node_modules/shapez.io-private-artifacts";
const steampipeDir = path.join(__dirname, "steampipe", "scripts");
const templateContents = fs
.readFileSync(path.join(steampipeDir, "app.vdf.template"), { encoding: "utf-8" })
.toString();
// Only use asar on steam builds (not supported by wegame)
let asar = Boolean(variantData.steamAppId);
const convertedContents = templateContents.replace("$DESC$", "Commit " + hash);
fs.writeFileSync(path.join(steampipeDir, "app.vdf"), convertedContents);
cb();
});
gulp.task("standalone.prepare.minifyCode", () => {
return gulp.src(path.join(electronBaseDir, "*.js")).pipe(gulp.dest(tempDestBuildDir));
});
gulp.task("standalone.prepare.copyGamefiles", () => {
return gulp.src("../build/**/*.*", { base: "../build" }).pipe(gulp.dest(tempDestBuildDir));
});
gulp.task("standalone.killRunningInstances", cb => {
try {
execSync("taskkill /F /IM shapezio.exe");
} catch (ex) {
console.warn("Failed to kill running instances, maybe none are up.");
}
cb();
});
gulp.task(
"standalone.prepare",
gulp.series(
"standalone.killRunningInstances",
"standalone.prepare.cleanup",
"standalone.prepare.copyPrefab",
"standalone.prepare.writePackageJson",
"standalone.prepare.minifyCode",
"standalone.prepare.copyGamefiles"
)
);
/**
*
* @param {'win32'|'linux'|'darwin'} platform
* @param {'x64'|'ia32'} arch
* @param {function():void} cb
* @param {boolean=} isRelease
*/
function packageStandalone(platform, arch, cb, isRelease = true) {
const tomlFile = fs.readFileSync(path.join(__dirname, ".itch.toml"));
packager({
dir: tempDestBuildDir,
appCopyright: "Tobias Springer",
appVersion: getVersion(),
buildVersion: "1.0.0",
arch,
platform,
asar: true,
executableName: "shapezio",
icon: path.join(electronBaseDir, "favicon"),
name: "shapez.io-standalone",
out: tempDestDir,
overwrite: true,
appBundleId: "io.shapez.standalone",
appCategoryType: "public.app-category.games",
...(isRelease &&
platform === "darwin" && {
osxSign: {
"identity": process.env.SHAPEZ_CLI_APPLE_CERT_NAME,
"hardened-runtime": true,
"hardenedRuntime": true,
"entitlements": "entitlements.plist",
"entitlements-inherit": "entitlements.plist",
"signature-flags": "library",
},
osxNotarize: {
appleId: process.env.SHAPEZ_CLI_APPLE_ID,
appleIdPassword: "@keychain:SHAPEZ_CLI_APPLE_ID",
},
}),
}).then(
appPaths => {
console.log("Packages created:", appPaths);
appPaths.forEach(appPath => {
if (!fs.existsSync(appPath)) {
console.error("Bad app path gotten:", appPath);
return;
}
fs.writeFileSync(
path.join(appPath, "LICENSE"),
fs.readFileSync(path.join(__dirname, "..", "LICENSE"))
);
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);
}
if (process.platform === "win32" && platform === "darwin") {
console.warn(
"Cross-building for macOS on Windows: dereferencing symlinks.\n".red +
"This will nearly double app size and make code signature invalid. Sorry!\n"
.red.bold +
"For more information, see " +
"https://github.com/electron/electron-packager/issues/71".underline
);
// Clear up framework folders
fs.writeFileSync(
path.join(appPath, "play.sh"),
'#!/usr/bin/env bash\n./shapez.io-standalone.app/Contents/MacOS/shapezio --no-sandbox "$@"\n'
);
fs.chmodSync(path.join(appPath, "play.sh"), 0o775);
fs.chmodSync(
path.join(appPath, "shapez.io-standalone.app", "Contents", "MacOS", "shapezio"),
0o775
);
const finalPath = path.join(appPath, "shapez.io-standalone.app");
const frameworksDir = path.join(finalPath, "Contents", "Frameworks");
const frameworkFolders = fs
.readdirSync(frameworksDir)
.filter(fname => fname.endsWith(".framework"));
for (let i = 0; i < frameworkFolders.length; ++i) {
const folderName = frameworkFolders[i];
const frameworkFolder = path.join(frameworksDir, folderName);
console.log(" -> ", frameworkFolder);
const filesToDelete = fs
.readdirSync(frameworkFolder)
.filter(fname => fname.toLowerCase() !== "versions");
filesToDelete.forEach(fname => {
console.log(" -> Deleting", fname);
fs.unlinkSync(path.join(frameworkFolder, fname));
});
const frameworkSourceDir = path.join(frameworkFolder, "Versions", "A");
fse.copySync(frameworkSourceDir, frameworkFolder);
}
}
});
cb();
},
err => {
console.error("Packaging error:", err);
cb();
// Unpack private artifacts though
if (asar && fs.existsSync(path.join(tempDestBuildDir, privateArtifactsPath))) {
// @ts-expect-error
asar = { unpackDir: privateArtifactsPath };
}
packager({
dir: tempDestBuildDir,
appCopyright: "tobspr Games",
appVersion: getVersion(),
buildVersion: "1.0.0",
arch,
platform,
asar: asar,
executableName: "shapezio",
icon: path.join(electronBaseDir, "favicon"),
name: "shapez",
out: tempDestDir,
overwrite: true,
appBundleId: "tobspr.shapezio." + variant,
appCategoryType: "public.app-category.games",
...(isRelease &&
platform === "darwin" && {
osxSign: {
"identity": process.env.SHAPEZ_CLI_APPLE_CERT_NAME,
"hardenedRuntime": true,
"entitlements": "entitlements.plist",
"entitlements-inherit": "entitlements.plist",
// @ts-ignore
"signatureFlags": ["library"],
"version": "16.0.7",
},
osxNotarize: {
appleId: process.env.SHAPEZ_CLI_APPLE_ID,
appleIdPassword: process.env.SHAPEZ_CLI_APPLE_APP_PW,
},
}),
}).then(
appPaths => {
console.log("Packages created:", appPaths);
appPaths.forEach(appPath => {
if (!fs.existsSync(appPath)) {
console.error("Bad app path:", appPath);
return;
}
if (variantData.steamAppId) {
fs.writeFileSync(
path.join(appPath, "LICENSE"),
fs.readFileSync(path.join(__dirname, "..", "LICENSE"))
);
fs.writeFileSync(
path.join(appPath, "steam_appid.txt"),
String(variantData.steamAppId)
);
if (platform === "linux") {
// Write launcher script
fs.writeFileSync(
path.join(appPath, "play.sh"),
'#!/usr/bin/env bash\n./shapezio --no-sandbox "$@"\n'
);
fs.chmodSync(path.join(appPath, "play.sh"), 0o775);
}
if (platform === "darwin") {
if (!isRelease) {
// Needs special location
fs.writeFileSync(
path.join(
appPath,
"shapez.app",
"Contents",
"MacOS",
"steam_appid.txt"
),
String(variantData.steamAppId)
);
}
}
}
});
cb();
},
err => {
console.error("Packaging error:", err);
cb();
}
);
}
// Manual signing with patched @electron/osx-sign (we need --no-strict)
gulp.task(taskPrefix + ".package.darwin64", cb =>
packageStandalone(
"darwin",
"x64",
() => {
const appFile = path.join(tempDestDir, "shapez-darwin-x64");
const appFileInner = path.join(appFile, "shapez.app");
console.warn("++ Signing ++");
if (variantData.steamAppId) {
const appIdDest = path.join(
path.join(appFileInner, "Contents", "MacOS"),
"steam_appid.txt"
);
// console.warn("++ Preparing ++");
// fse.copySync(path.join(tempDestBuildDir, "steam_appid.txt"), appIdDest);
console.warn("Signing steam_appid.txt");
execSync(
`codesign --force --verbose --options runtime --timestamp --no-strict --sign "${
process.env.SHAPEZ_CLI_APPLE_CERT_NAME
}" --entitlements "${path.join(__dirname, "entitlements.plist")}" ${appIdDest}`,
{
cwd: appFile,
}
);
}
console.warn("Base dir:", appFile);
signAsync({
app: appFileInner,
hardenedRuntime: true,
identity: process.env.SHAPEZ_CLI_APPLE_CERT_NAME,
strictVerify: false,
version: "16.0.7",
type: "distribution",
optionsForFile: f => {
return {
entitlements: path.join(__dirname, "entitlements.plist"),
hardenedRuntime: true,
signatureFlags: ["runtime"],
};
},
}).then(() => {
execSync(`codesign --verify --verbose ${path.join(appFile, "shapez.app")}`, {
cwd: appFile,
});
console.warn("++ Notarizing ++");
electronNotarize
.notarize({
appPath: path.join(appFile, "shapez.app"),
tool: "legacy",
appBundleId: "tobspr.shapezio.standalone",
appleId: process.env.SHAPEZ_CLI_APPLE_ID,
appleIdPassword: process.env.SHAPEZ_CLI_APPLE_APP_PW,
teamId: process.env.SHAPEZ_CLI_APPLE_TEAM_ID,
})
.then(() => {
console.warn("-> Notarized!");
cb();
});
});
},
false
)
);
gulp.task(taskPrefix + ".package.win64", cb => packageStandalone("win32", "x64", cb));
gulp.task(taskPrefix + ".package.linux64", cb => packageStandalone("linux", "x64", cb));
gulp.task(
taskPrefix + ".build-from-windows",
gulp.series(
taskPrefix + ".prepare",
gulp.parallel(taskPrefix + ".package.win64", taskPrefix + ".package.linux64")
)
);
gulp.task(
taskPrefix + ".build-from-darwin",
gulp.series(taskPrefix + ".prepare", gulp.parallel(taskPrefix + ".package.darwin64"))
);
}
gulp.task("standalone.package.prod.win64", cb => packageStandalone("win32", "x64", cb));
gulp.task("standalone.package.prod.win32", cb => packageStandalone("win32", "ia32", cb));
gulp.task("standalone.package.prod.linux64", cb => packageStandalone("linux", "x64", cb));
gulp.task("standalone.package.prod.linux32", cb => packageStandalone("linux", "ia32", cb));
gulp.task("standalone.package.prod.darwin64", cb => packageStandalone("darwin", "x64", cb));
gulp.task("standalone.package.prod.darwin64.unsigned", cb =>
packageStandalone("darwin", "x64", cb, false)
);
// Steam helpers
gulp.task("standalone.prepareVDF", cb => {
const hash = buildutils.getRevision();
const version = buildutils.getVersion();
gulp.task(
"standalone.package.prod",
gulp.series(
"standalone.prepare",
gulp.parallel(
"standalone.package.prod.win64",
"standalone.package.prod.linux64",
"standalone.package.prod.darwin64"
)
)
);
// for (const platform of ["steampipe", "steampipe-darwin"]) {
const templatesSource = path.join(__dirname, "steampipe", "templates");
const templatesDest = path.join(__dirname, "steampipe", "built_vdfs");
const variables = {
PROJECT_DIR: path.resolve(path.join(__dirname, "..")).replace(/\\/g, "/"),
BUNDLE_DIR: path.resolve(path.join(__dirname, "..", "build_output")).replace(/\\/g, "/"),
TMP_DIR: path.resolve(path.join(__dirname, "steampipe", "tmp")).replace(/\\/g, "/"),
// BUILD_DESC: "v" + version + " @ " + hash,
VDF_DIR: path.resolve(path.join(__dirname, "steampipe", "built_vdfs")).replace(/\\/g, "/"),
};
const files = fs.readdirSync(templatesSource);
for (const file of files) {
if (!file.endsWith(".vdf")) {
continue;
}
variables.BUILD_DESC = file.replace(".vdf", "") + " - v" + version + " @ " + hash;
let content = fs.readFileSync(path.join(templatesSource, file)).toString("utf-8");
content = content.replace(/\$([^$]+)\$/gi, (_, variable) => {
if (!variables[variable]) {
throw new Error("Unknown variable " + variable + " in " + file);
}
return variables[variable];
});
fs.writeFileSync(path.join(templatesDest, file), content, { encoding: "utf8" });
}
cb();
});
}
module.exports = { gulptasksStandalone };

View File

@ -1,2 +1 @@
steamtemp
app.vdf

View File

@ -1,15 +0,0 @@
"appbuild"
{
"appid" "1318690"
"desc" "$DESC$"
"buildoutput" "C:\work\shapez\shapez.io\gulp\steampipe\steamtemp"
"contentroot" ""
"setlive" ""
"preview" "0"
"local" ""
"depots"
{
"1318691" "C:\work\shapez\shapez.io\gulp\steampipe\scripts\windows.vdf"
"1318692" "C:\work\shapez\shapez.io\gulp\steampipe\scripts\linux.vdf"
}
}

View File

@ -0,0 +1,14 @@
"appbuild"
{
"appid" "1930750"
"desc" "$BUILD_DESC$"
"buildoutput" "$TMP_DIR$"
"contentroot" ""
"setlive" ""
"preview" "0"
"local" ""
"depots"
{
"1930756" "$VDF_DIR$/demo-darwin.vdf"
}
}

View File

@ -0,0 +1,14 @@
"appbuild"
{
"appid" "1318690"
"desc" "$BUILD_DESC$"
"buildoutput" "$TMP_DIR$"
"contentroot" ""
"setlive" ""
"preview" "0"
"local" ""
"depots"
{
"1318693" "$VDF_DIR$/standalone-darwin.vdf"
}
}

View File

@ -0,0 +1,17 @@
"appbuild"
{
"appid" "1930750"
"desc" "$BUILD_DESC$"
"buildoutput" "$TMP_DIR$"
"contentroot" ""
"setlive" ""
"preview" "0"
"local" ""
"depots"
{
"1930753" "$VDF_DIR$/demo-windows.vdf"
"1930754" "$VDF_DIR$/demo-china-windows.vdf"
"1930752" "$VDF_DIR$/demo-linux.vdf"
"1930755" "$VDF_DIR$/demo-china-linux.vdf"
}
}

View File

@ -0,0 +1,17 @@
"appbuild"
{
"appid" "1318690"
"desc" "$BUILD_DESC$"
"buildoutput" "$TMP_DIR$"
"contentroot" ""
"setlive" ""
"preview" "0"
"local" ""
"depots"
{
"1318691" "$VDF_DIR$\standalone-windows.vdf"
"1318694" "$VDF_DIR$\standalone-china-windows.vdf"
"1318692" "$VDF_DIR$\standalone-linux.vdf"
"1318695" "$VDF_DIR$\standalone-china-linux.vdf"
}
}

View File

@ -0,0 +1,12 @@
"DepotBuildConfig"
{
"DepotID" "1930755"
"contentroot" "$BUNDLE_DIR$\standalone-steam-china-demo\shapez-linux-x64"
"FileMapping"
{
"LocalPath" "*"
"DepotPath" "."
"recursive" "1"
}
"FileExclusion" "*.pdb"
}

View File

@ -0,0 +1,12 @@
"DepotBuildConfig"
{
"DepotID" "1930754"
"contentroot" "$BUNDLE_DIR$\standalone-steam-china-demo\shapez-win32-x64"
"FileMapping"
{
"LocalPath" "*"
"DepotPath" "."
"recursive" "1"
}
"FileExclusion" "*.pdb"
}

View File

@ -0,0 +1,12 @@
"DepotBuildConfig"
{
"DepotID" "1930756"
"contentroot" "$BUNDLE_DIR$\standalone-steam-demo\shapez-darwin-x64"
"FileMapping"
{
"LocalPath" "*"
"DepotPath" "."
"recursive" "1"
}
"FileExclusion" "*.pdb"
}

View File

@ -0,0 +1,12 @@
"DepotBuildConfig"
{
"DepotID" "1930752"
"contentroot" "$BUNDLE_DIR$\standalone-steam-demo\shapez-linux-x64"
"FileMapping"
{
"LocalPath" "*"
"DepotPath" "."
"recursive" "1"
}
"FileExclusion" "*.pdb"
}

View File

@ -0,0 +1,12 @@
"DepotBuildConfig"
{
"DepotID" "1930753"
"contentroot" "$BUNDLE_DIR$\standalone-steam-demo\shapez-win32-x64"
"FileMapping"
{
"LocalPath" "*"
"DepotPath" "."
"recursive" "1"
}
"FileExclusion" "*.pdb"
}

View File

@ -0,0 +1,12 @@
"DepotBuildConfig"
{
"DepotID" "1318695"
"contentroot" "$BUNDLE_DIR$\standalone-steam-china\shapez-linux-x64"
"FileMapping"
{
"LocalPath" "*"
"DepotPath" "."
"recursive" "1"
}
"FileExclusion" "*.pdb"
}

View File

@ -0,0 +1,12 @@
"DepotBuildConfig"
{
"DepotID" "1318694"
"contentroot" "$BUNDLE_DIR$\standalone-steam-china\shapez-win32-x64"
"FileMapping"
{
"LocalPath" "*"
"DepotPath" "."
"recursive" "1"
}
"FileExclusion" "*.pdb"
}

View File

@ -0,0 +1,12 @@
"DepotBuildConfig"
{
"DepotID" "1318693"
"contentroot" "$BUNDLE_DIR$\standalone-steam\shapez-darwin-x64"
"FileMapping"
{
"LocalPath" "*"
"DepotPath" "."
"recursive" "1"
}
"FileExclusion" "*.pdb"
}

View File

@ -1,7 +1,7 @@
"DepotBuildConfig"
{
"DepotID" "1318692"
"contentroot" "C:\work\shapez\shapez.io\tmp_standalone_files\shapez.io-standalone-linux-x64"
"contentroot" "$BUNDLE_DIR$\standalone-steam\shapez-linux-x64"
"FileMapping"
{
"LocalPath" "*"

View File

@ -1,7 +1,7 @@
"DepotBuildConfig"
{
"DepotID" "1318691"
"contentroot" "C:\work\shapez\shapez.io\tmp_standalone_files\shapez.io-standalone-win32-x64"
"contentroot" "$BUNDLE_DIR$\standalone-steam\shapez-win32-x64"
"FileMapping"
{
"LocalPath" "*"

View File

@ -0,0 +1,3 @@
#!/bin/sh
yarn gulp standalone.prepareVDF
steamcmd.sh +login $STEAM_UPLOAD_SHAPEZ_ID $STEAM_UPLOAD_SHAPEZ_USER +run_app_build $PWD/built_vdfs/app-darwin-demo.vdf +quit

View File

@ -0,0 +1,3 @@
#!/bin/sh
yarn gulp standalone.prepareVDF
steamcmd.sh +login $STEAM_UPLOAD_SHAPEZ_ID $STEAM_UPLOAD_SHAPEZ_USER +run_app_build $PWD/built_vdfs/app-darwin.vdf +quit

View File

@ -0,0 +1,3 @@
@echo off
cmd /c yarn gulp standalone.prepareVDF
steamcmd +login %STEAM_UPLOAD_SHAPEZ_ID% %STEAM_UPLOAD_SHAPEZ_USER% +run_app_build %cd%/built_vdfs/app-winlinux-demo.vdf +quit

View File

@ -0,0 +1,3 @@
@echo off
cmd /c yarn gulp standalone.prepareVDF
steamcmd +login %STEAM_UPLOAD_SHAPEZ_ID% %STEAM_UPLOAD_SHAPEZ_USER% +run_app_build %cd%/built_vdfs/app-winlinux.vdf +quit

View File

@ -1,4 +0,0 @@
@echo off
cmd /c gulp standalone.prepareVDF
steamcmd +login %STEAM_UPLOAD_SHAPEZ_ID% %STEAM_UPLOAD_SHAPEZ_USER% +run_app_build %cd%/scripts/app.vdf +quit
start https://partner.steamgames.com/apps/builds/1318690

View File

@ -1,22 +1,64 @@
const path = require("path");
const yaml = require("gulp-yaml");
const translationsSourceDir = path.join(__dirname, "..", "translations");
const translationsJsonDir = path.join(__dirname, "..", "src", "js", "built-temp");
function gulptasksTranslations($, gulp) {
gulp.task("translations.convertToJson", () => {
return gulp
.src(path.join(translationsSourceDir, "*.yaml"))
.pipe($.plumber())
.pipe(yaml({ space: 2, safe: true }))
.pipe(gulp.dest(translationsJsonDir));
});
gulp.task("translations.fullBuild", gulp.series("translations.convertToJson"));
}
module.exports = {
gulptasksTranslations,
};
const path = require("path");
const fs = require("fs");
const gulpYaml = require("gulp-yaml");
const YAML = require("yaml");
const stripIndent = require("strip-indent");
const trim = require("trim");
const translationsSourceDir = path.join(__dirname, "..", "translations");
const translationsJsonDir = path.join(__dirname, "..", "src", "js", "built-temp");
function gulptasksTranslations($, gulp) {
gulp.task("translations.convertToJson", () => {
return gulp
.src(path.join(translationsSourceDir, "*.yaml"))
.pipe($.plumber())
.pipe(gulpYaml({ space: 2, safe: true }))
.pipe(gulp.dest(translationsJsonDir));
});
gulp.task("translations.fullBuild", gulp.series("translations.convertToJson"));
gulp.task("translations.prepareSteamPage", cb => {
const files = fs.readdirSync(translationsSourceDir);
files
.filter(name => name.endsWith(".yaml"))
.forEach(fname => {
console.log("Loading", fname);
const languageName = fname.replace(".yaml", "");
const abspath = path.join(translationsSourceDir, fname);
const destpath = path.join(translationsSourceDir, "tmp", languageName + "-store.txt");
const contents = fs.readFileSync(abspath, { encoding: "utf-8" });
const data = YAML.parse(contents);
const storePage = data.steamPage;
const content = `
[img]{STEAM_APP_IMAGE}/extras/store_page_gif.gif[/img]
${storePage.intro.replace(/\n/gi, "\n\n")}
[h2]${storePage.what_others_say}[/h2]
[list]
[*] [i]${storePage.nothernlion_comment}[/i] [b]- Northernlion, YouTube[/b]
[*] [i]${storePage.notch_comment}[/i] [b]- Notch[/b]
[*] [i]${storePage.steam_review_comment}[/i] [b]- Steam User[/b]
[/list]
`;
fs.writeFileSync(destpath, trim(content.replace(/(\n[ \t\r]*)/gi, "\n")), {
encoding: "utf-8",
});
});
cb();
});
}
module.exports = {
gulptasksTranslations,
};

View File

@ -3,10 +3,16 @@
const path = require("path");
const webpack = require("webpack");
const { getRevision, getVersion, getAllResourceImages } = require("./buildutils");
const lzString = require("lz-string");
const CircularDependencyPlugin = require("circular-dependency-plugin");
module.exports = ({ watch = false, standalone = false }) => {
module.exports = ({
watch = false,
standalone = false,
chineseVersion = false,
wegameVersion = false,
steamDemo = false,
gogVersion = false,
}) => {
return {
mode: "development",
devtool: "cheap-source-map",
@ -31,14 +37,14 @@ module.exports = ({ watch = false, standalone = false }) => {
"window.assert(false, 'abstract method called of: ' + (this.name || (this.constructor && this.constructor.name)));",
G_HAVE_ASSERT: "true",
G_APP_ENVIRONMENT: JSON.stringify("dev"),
G_TRACKING_ENDPOINT: JSON.stringify(
lzString.compressToEncodedURIComponent("http://localhost:10005/v1")
),
G_CHINA_VERSION: JSON.stringify(chineseVersion),
G_WEGAME_VERSION: JSON.stringify(wegameVersion),
G_GOG_VERSION: JSON.stringify(gogVersion),
G_IS_DEV: "true",
G_IS_RELEASE: "false",
G_IS_MOBILE_APP: "false",
G_IS_BROWSER: "true",
G_IS_STANDALONE: standalone ? "true" : "false",
G_IS_STANDALONE: JSON.stringify(standalone),
G_IS_STEAM_DEMO: JSON.stringify(steamDemo),
G_BUILD_TIME: "" + new Date().getTime(),
G_BUILD_COMMIT_HASH: JSON.stringify(getRevision()),
G_BUILD_VERSION: JSON.stringify(getVersion()),
@ -69,6 +75,7 @@ module.exports = ({ watch = false, standalone = false }) => {
type: "javascript/auto",
},
{ test: /\.(png|jpe?g|svg)$/, loader: "ignore-loader" },
{ test: /\.nobuild/, loader: "ignore-loader" },
{
test: /\.md$/,
use: [
@ -90,6 +97,9 @@ module.exports = ({ watch = false, standalone = false }) => {
end: "typehints:end",
},
},
{
loader: path.resolve(__dirname, "mod.js"),
},
],
},
{

View File

@ -3,41 +3,45 @@
const path = require("path");
const webpack = require("webpack");
const { getRevision, getVersion, getAllResourceImages } = require("./buildutils");
const lzString = require("lz-string");
const TerserPlugin = require("terser-webpack-plugin");
const StringReplacePlugin = require("string-replace-webpack-plugin");
const UnusedFilesPlugin = require("unused-files-webpack-plugin").UnusedFilesWebpackPlugin;
module.exports = ({
enableAssert = false,
environment,
es6 = false,
standalone = false,
isBrowser = true,
mobileApp = false,
chineseVersion = false,
wegameVersion = false,
steamDemo = false,
gogVersion = false,
}) => {
const globalDefs = {
assert: enableAssert ? "window.assert" : "false && window.assert",
assert: "false && window.assert",
assertAlways: "window.assert",
abstract: "window.assert(false, 'abstract method called');",
G_IS_DEV: "false",
G_CHINA_VERSION: JSON.stringify(chineseVersion),
G_WEGAME_VERSION: JSON.stringify(wegameVersion),
G_GOG_VERSION: JSON.stringify(gogVersion),
G_IS_RELEASE: environment === "prod" ? "true" : "false",
G_IS_STANDALONE: standalone ? "true" : "false",
G_IS_STEAM_DEMO: JSON.stringify(steamDemo),
G_IS_BROWSER: isBrowser ? "true" : "false",
G_IS_MOBILE_APP: mobileApp ? "true" : "false",
G_TRACKING_ENDPOINT: JSON.stringify(
lzString.compressToEncodedURIComponent("https://tracking.shapez.io/v1")
),
G_APP_ENVIRONMENT: JSON.stringify(environment),
G_HAVE_ASSERT: enableAssert ? "true" : "false",
G_HAVE_ASSERT: "false",
G_BUILD_TIME: "" + new Date().getTime(),
G_BUILD_COMMIT_HASH: JSON.stringify(getRevision()),
G_BUILD_VERSION: JSON.stringify(getVersion()),
G_ALL_UI_IMAGES: JSON.stringify(getAllResourceImages()),
};
const minifyNames = environment === "prod";
const minifyNames = false;
return {
mode: "production",
@ -58,7 +62,6 @@ module.exports = ({
// Display bailout reasons
optimizationBailout: true,
},
// devtool: "source-map",
devtool: false,
resolve: {
alias: {
@ -126,6 +129,7 @@ module.exports = ({
warnings: true,
},
mangle: {
reserved: ["__$S__"],
eval: true,
keep_classnames: !minifyNames,
keep_fnames: !minifyNames,
@ -140,7 +144,7 @@ module.exports = ({
braces: false,
ecma: es6 ? 6 : 5,
preamble:
"/* shapez.io Codebase - Copyright 2020 Tobias Springer - " +
"/* shapez.io Codebase - Copyright 2022 tobspr Games - " +
getVersion() +
" @ " +
getRevision() +
@ -172,6 +176,7 @@ module.exports = ({
type: "javascript/auto",
},
{ test: /\.(png|jpe?g|svg)$/, loader: "ignore-loader" },
{ test: /\.nobuild/, loader: "ignore-loader" },
{
test: /\.js$/,
enforce: "pre",
@ -204,6 +209,9 @@ module.exports = ({
test: /\.js$/,
use: [
// "thread-loader",
{
loader: path.resolve(__dirname, "mod.js"),
},
{
loader: "babel-loader?cacheDirectory",
options: {

File diff suppressed because it is too large Load Diff

58
mod_examples/README.md Normal file
View File

@ -0,0 +1,58 @@
# shapez.io Modding
## General Instructions
Currently there are two options to develop mods for shapez.io:
1. Writing single file mods, which doesn't require any additional tools and can be loaded directly in the game
2. Using the [create-shapezio-mod](https://www.npmjs.com/package/create-shapezio-mod) package. This package is still in development but allows you to pack multiple files and images into a single mod file, so you don't have to base64 encode your images etc.
## Mod Developer Discord
A great place to get help with mod development is the official [shapez.io modloader discord](https://discord.gg/xq5v8uyMue).
## Setting up your development environment
The simplest way of developing mods is by just creating a `mymod.js` file and putting it in the `mods/` folder of the standalone (You can find the `mods/` folder by clicking "Open Mods Folder" in the shapez Standalone, be sure to select the 1.5.0-modloader branch on Steam).
You can then add `--dev` to the launch options on Steam. This adds an application menu where you can click "Restart" to reload your mod, and will also show the developer console where you can see any potential errors.
## Getting started
To get into shapez.io modding, I highly recommend checking out all of the examples in this folder. Here's a list of examples and what features of the modloader they show:
| Example | Description | Demonstrates |
| ---------------------------------------------------------- | ------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------- |
| [base.js](base.js) | The most basic mod | Base structure of a mod |
| [class_extensions.js](class_extensions.js) | Shows how to extend multiple methods of one class at once, useful for overriding a lot of methods | Overriding and extending builtin methods |
| [custom_css.js](custom_css.js) | Modifies the Main Menu State look | Modifying the UI styles with CSS |
| [replace_builtin_sprites.js](replace_builtin_sprites.js) | Replaces all color sprites with icons | Replacing builtin sprites |
| [translations.js](translations.js) | Shows how to replace and add new translations in multiple languages | Adding and replacing translations |
| [add_building_basic.js](add_building_basic.js) | Shows how to add a new building | Registering a new building |
| [add_building_flipper.js](add_building_flipper.js) | Adds a "flipper" building which mirrors shapes from top to bottom | Registering a new building, Adding a custom shape and item processing operation (flip) |
| [custom_drawing.js](custom_drawing.js) | Displays a a small indicator on every item processing building whether it is currently working | Adding a new GameSystem and drawing overlays |
| [custom_keybinding.js](custom_keybinding.js) | Adds a new customizable ingame keybinding (Shift+F) | Adding a new keybinding |
| [custom_sub_shapes.js](custom_sub_shapes.js) | Adds a new type of sub-shape (Line) | Adding a new sub shape and drawing it, making it spawn on the map, modifying the builtin levels |
| [modify_theme.js](modify_theme.js) | Modifies the default game themes | Modifying the builtin themes |
| [custom_theme.js](custom_theme.js) | Adds a new UI and map theme | Adding a new game theme |
| [mod_settings.js](mod_settings.js) | Shows a dialog counting how often the mod has been launched | Reading and storing mod settings |
| [storing_data_in_savegame.js](storing_data_in_savegame.js) | Shows how to store custom (structured) data in the savegame | Storing custom data in savegame |
| [modify_existing_building.js](modify_existing_building.js) | Makes the rotator building always unlocked and adds a new statistic to the building panel | Modifying a builtin building, replacing builtin methods |
| [modify_ui.js](modify_ui.js) | Shows how to add custom UI elements to builtin game states (the Main Menu in this case) | Extending builtin UI states, Adding CSS |
| [pasting.js](pasting.js) | Shows a dialog when pasting text in the game | Listening to paste events |
| [smooth_zooming.js](smooth_zooming.js) | Allows to smoothly zoom in and out | Keybindings, overriding methods |
| [sandbox.js](sandbox.js) | Makes blueprints free and always unlocked | Overriding builtin methods |
### Advanced Examples
| Example | Description | Demonstrates |
| ------------------------------------------------ | ---------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [notification_blocks.js](notification_blocks.js) | Adds a notification block building, which shows a user defined notification when receiving a truthy signal | Adding a new Component, Adding a new GameSystem, Working with wire networks, Adding a new building, Adding a new HUD part, Using Input Dialogs, Adding Translations |
| [usage_statistics.js](usage_statistics.js) | Displays a percentage on every building showing its utilization | Adding a new component, Adding a new GameSystem, Drawing within a GameSystem, Modifying builtin buildings, Adding custom game logic |
| [new_item_type.js](new_item_type.js) | Adds a new type of items to the map (fluids) | Adding a new item type, modifying map generation |
| [buildings_have_cost.js](buildings_have_cost.js) | Adds a new currency, and belts cost 1 of that currency | Extending and replacing builtin methods, Adding CSS and custom sprites |
| [mirrored_cutter.js](mirrored_cutter.js) | Adds a mirrored variant of the cutter | Adding a new variant to existing buildings |
### Creating new sprites
If you want to add new buildings and create sprites for them, you can download the original Photoshop PSD files here: https://static.shapez.io/building-psds.zip

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

20
mod_examples/base.js Normal file
View File

@ -0,0 +1,20 @@
// @ts-nocheck
const METADATA = {
website: "https://tobspr.io",
author: "tobspr",
name: "Mod Example: Base",
version: "1",
id: "base",
description: "The most basic mod",
minimumGameVersion: ">=1.5.0",
// You can specify this parameter if savegames will still work
// after your mod has been uninstalled
doesNotAffectSavegame: true,
};
class Mod extends shapez.Mod {
init() {
// Start the modding here
}
}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,32 @@
// @ts-nocheck
const METADATA = {
website: "https://tobspr.io",
author: "tobspr",
name: "Mod Example: Class Extensions",
version: "1",
id: "class-extensions",
description: "Shows how to extend builtin classes",
minimumGameVersion: ">=1.5.0",
};
const BeltExtension = ({ $super, $old }) => ({
getShowWiresLayerPreview() {
// Access the old method
return !$old.getShowWiresLayerPreview();
},
getIsReplaceable(variant, rotationVariant) {
// Instead of super, use $super
return $super.getIsReplaceable.call(this, variant, rotationVariant);
},
getIsRemoveable() {
return false;
},
});
class Mod extends shapez.Mod {
init() {
this.modInterface.extendClass(shapez.MetaBeltBuilding, BeltExtension);
}
}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,63 @@
// @ts-nocheck
const METADATA = {
website: "https://tobspr.io",
author: "tobspr",
name: "Mod Example: custom drawing",
version: "1",
id: "base",
description: "Displays an indicator on every item processing building when its working",
minimumGameVersion: ">=1.5.0",
// You can specify this parameter if savegames will still work
// after your mod has been uninstalled
doesNotAffectSavegame: true,
};
class ItemProcessorStatusGameSystem extends shapez.GameSystem {
drawChunk(parameters, chunk) {
const contents = chunk.containedEntitiesByLayer.regular;
for (let i = 0; i < contents.length; ++i) {
const entity = contents[i];
const processorComp = entity.components.ItemProcessor;
if (!processorComp) {
continue;
}
const staticComp = entity.components.StaticMapEntity;
const context = parameters.context;
const center = staticComp.getTileSpaceBounds().getCenter().toWorldSpace();
// Culling for better performance
if (parameters.visibleRect.containsCircle(center.x, center.y, 40)) {
// Circle
context.fillStyle = processorComp.ongoingCharges.length === 0 ? "#aaa" : "#53cf47";
context.strokeStyle = "#000";
context.lineWidth = 1;
context.beginCircle(center.x + 5, center.y + 5, 4);
context.fill();
context.stroke();
}
}
}
}
class Mod extends shapez.Mod {
init() {
// Register our game system
this.modInterface.registerGameSystem({
id: "item_processor_status",
systemClass: ItemProcessorStatusGameSystem,
// Specify at which point the update method will be called,
// in this case directly before the belt system. You can use
// before: "end" to make it the last system
before: "belt",
// Specify where our drawChunk method should be called, check out
// map_chunk_view
drawHooks: ["staticAfter"],
});
}
}

View File

@ -0,0 +1,32 @@
// @ts-nocheck
const METADATA = {
website: "https://tobspr.io",
author: "tobspr",
name: "Mod Example: Custom Keybindings",
version: "1",
id: "base",
description: "Shows how to add a new keybinding",
minimumGameVersion: ">=1.5.0",
// You can specify this parameter if savegames will still work
// after your mod has been uninstalled
doesNotAffectSavegame: true,
};
class Mod extends shapez.Mod {
init() {
// Register keybinding
this.modInterface.registerIngameKeybinding({
id: "demo_mod_binding",
keyCode: shapez.keyToKeyCode("F"),
translation: "Do something (always with SHIFT)",
modifiers: {
shift: true,
},
handler: root => {
this.dialogs.showInfo("Mod Message", "It worked!");
return shapez.STOP_PROPAGATION;
},
});
}
}

View File

@ -0,0 +1,46 @@
// @ts-nocheck
const METADATA = {
website: "https://tobspr.io",
author: "tobspr",
name: "Mod Example: Custom Sub Shapes",
version: "1",
id: "custom-sub-shapes",
description: "Shows how to add custom sub shapes",
minimumGameVersion: ">=1.5.0",
};
class Mod extends shapez.Mod {
init() {
// Add a new type of sub shape ("Line", short code "L")
this.modInterface.registerSubShapeType({
id: "line",
shortCode: "L",
// Make it spawn on the map
weightComputation: distanceToOriginInChunks =>
Math.round(20 + Math.max(Math.min(distanceToOriginInChunks, 30), 0)),
// This defines how to draw it
draw: ({ context, quadrantSize, layerScale }) => {
const quadrantHalfSize = quadrantSize / 2;
context.beginPath();
context.moveTo(-quadrantHalfSize, quadrantHalfSize);
context.arc(
-quadrantHalfSize,
quadrantHalfSize,
quadrantSize * layerScale,
-Math.PI * 0.25,
0
);
context.closePath();
context.fill();
context.stroke();
},
});
// Modify the goal of the first level to add our goal
this.signals.modifyLevelDefinitions.add(definitions => {
definitions[0].shape = "LuLuLuLu";
});
}
}

View File

@ -0,0 +1,99 @@
// @ts-nocheck
const METADATA = {
website: "https://tobspr.io",
author: "tobspr",
name: "Mod Example: Custom Game Theme",
version: "1",
id: "custom-theme",
description: "Shows how to add a custom game theme",
minimumGameVersion: ">=1.5.0",
// You can specify this parameter if savegames will still work
// after your mod has been uninstalled
doesNotAffectSavegame: true,
};
class Mod extends shapez.Mod {
init() {
this.modInterface.registerGameTheme({
id: "my-theme",
name: "My fancy theme",
theme: RESOURCES["my-theme.json"],
});
}
}
const RESOURCES = {
"my-theme.json": {
map: {
background: "#abc",
grid: "#ccc",
gridLineWidth: 1,
selectionOverlay: "rgba(74, 163, 223, 0.7)",
selectionOutline: "rgba(74, 163, 223, 0.5)",
selectionBackground: "rgba(74, 163, 223, 0.2)",
chunkBorders: "rgba(0, 30, 50, 0.03)",
directionLock: {
regular: {
color: "rgb(74, 237, 134)",
background: "rgba(74, 237, 134, 0.2)",
},
wires: {
color: "rgb(74, 237, 134)",
background: "rgba(74, 237, 134, 0.2)",
},
error: {
color: "rgb(255, 137, 137)",
background: "rgba(255, 137, 137, 0.2)",
},
},
colorBlindPickerTile: "rgba(50, 50, 50, 0.4)",
resources: {
shape: "#eaebec",
red: "#ffbfc1",
green: "#cbffc4",
blue: "#bfdaff",
},
chunkOverview: {
empty: "#a6afbb",
filled: "#c5ccd6",
beltColor: "#777",
},
wires: {
overlayColor: "rgba(97, 161, 152, 0.75)",
previewColor: "rgb(97, 161, 152, 0.4)",
highlightColor: "rgba(72, 137, 255, 1)",
},
connectedMiners: {
overlay: "rgba(40, 50, 60, 0.5)",
textColor: "#fff",
textColorCapped: "#ef5072",
background: "rgba(40, 50, 60, 0.8)",
},
zone: {
borderSolid: "rgba(23, 192, 255, 1)",
outerColor: "rgba(240, 240, 255, 0.5)",
},
},
items: {
outline: "#55575a",
outlineWidth: 0.75,
circleBackground: "rgba(40, 50, 65, 0.1)",
},
shapeTooltip: {
background: "#dee1ea",
outline: "#54565e",
},
},
};

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,32 @@
// @ts-nocheck
const METADATA = {
website: "https://tobspr.io",
author: "tobspr",
name: "Mod Example: Mod Settings",
version: "1",
id: "mod-settings",
description: "Shows how to add settings to your mod",
minimumGameVersion: ">=1.5.0",
settings: {
timesLaunched: 0,
},
};
class Mod extends shapez.Mod {
init() {
// Increment the setting every time we launch the mod
this.settings.timesLaunched++;
this.saveSettings();
// Show a dialog in the main menu with the settings
this.signals.stateEntered.add(state => {
if (state instanceof shapez.MainMenuState) {
this.dialogs.showInfo(
"Welcome back",
`You have launched this mod ${this.settings.timesLaunched} times`
);
}
});
}
}

View File

@ -0,0 +1,27 @@
// @ts-nocheck
const METADATA = {
website: "https://tobspr.io",
author: "tobspr",
name: "Mod Example: Modify existing building",
version: "1",
id: "modify-existing-building",
description: "Shows how to modify an existing building",
minimumGameVersion: ">=1.5.0",
};
class Mod extends shapez.Mod {
init() {
// Make Rotator always unlocked
this.modInterface.replaceMethod(shapez.MetaRotaterBuilding, "getIsUnlocked", function () {
return true;
});
// Add some custom stats to the info panel when selecting the building
this.modInterface.replaceMethod(shapez.MetaRotaterBuilding, "getAdditionalStatistics", function (
root,
variant
) {
return [["Awesomeness", 5]];
});
}
}

Some files were not shown because too many files have changed in this diff Show More