1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2025-12-11 09:11:50 +00:00
Commit Graph

2490 Commits

Author SHA1 Message Date
Даниїл Григор'єв
a9aab92bbb
Remove theme-short.mp3
Not used anywhere. Reduces size of each uncompressed bundle by 6 MB.
2025-04-05 22:52:25 +03:00
Даниїл Григор'єв
b057382328
Mass-rename rotater -> rotator (#51)
Rename all references of rotater to rotator, including code, styles,
assets and translation files.
2025-04-04 22:55:24 +03:00
Даниїл Григор'єв
8e87398c3c
Update TypeScript packages
Yarn seems to complain due to my hand-edited package.json, but
TypeScript packages are out of sync if I let it update the electron one.
To avoid these issues, update both packages.
2025-03-29 20:11:07 +02:00
Даниїл Григор'єв
2997cf8daf
Handle window.open calls with external browser
Re-use the same openExternalUrl logic meant for frame navigation to
handle window.open calls as well. Possibly a partial solution, as the
ability to open new windows might be useful for mods.
2025-03-27 23:02:45 +02:00
Даниїл Григор'єв
ae1cd71d3b
Fix file writes to non-existent directories
When the game attempts to create the settings file but its directory
does not exist yet, an early error occurs. In reality, there is no way
for the directory to be created without user intervention. This change
makes sure the directory is created before any attempt to write a file
is done. Errors related to directory creation and/or file writes are
still reported as usual.
2025-03-26 22:46:14 +02:00
Даниїл Григор'єв
03bf14f10a
Add missing TypeScript package and update readme
Unfortunately we have to keep a second copy for now. The lockfile
specifies the same version as used in the root package to avoid issues.
This may be replaced with Node.js type stripping in the future.

README.md is updated to include the correct command for testing the
Electron wrapper.
2025-03-26 22:23:17 +02:00
Даниїл Григор'єв
c836589d9b
Rewrite the Electron wrapper (#47)
* Migrate Electron wrapper to ESM

Use ESM syntax for main process, move some fs usages to fs.promises,
switch to import.meta.url/import.meta.dirname to handle file paths;
clean up redundant code.

* Add TypeScript support to Electron wrapper

The support is very basic, tsc is used to transpile code. Build scripts
are modified to not copy any Electron code other than preload.cjs and
use an extremely cursed setup to call the TypeScript compiler.

* [TS] Rename platform/storage

* Rewrite Electron wrapper

MVP, missing some features from the old wrapper and most planned
features. Some of the functionality hasn't been verified.
2025-03-21 16:30:13 +02:00
Mohamed A. Abdallah
17a18fce41
Adding full Arabic Translation (#46)
* Updated steamPage AR Translation

* Updated global AR Translation

* Updated demoBanners AR Translation

* Updated mainMenu AR Translation

* Updated dialogs AR Translation

* Updated ingame AR Translation

* Updated shopUpgrades AR Translation

* Updated buildings AR Translation

* Updated storyRewards AR Translation

* Updated Settings AR Translation

* Updated keybindings AR Translation

* Updated about AR Translation

* Updated changelog AR Translation

* Updated demo AR Translation

* Updated tips AR Translation

* Updated puzzleMenu AR Translation

* Updated backendErrors AR Translation

* Updated game name to be more cosistent

* Updated dialogs to be less than the 200 char limit

* Rewrote the storyRewards to be less than the 200 char limit

* Fixed syntax errors
2025-03-15 22:11:42 +02:00
Даниїл Григор'єв
7814c3a15a
Merge pull request #44 from tobspr-games/fix/tgs-fallback
Fix TextualGameState HTML string fallback
2024-09-23 23:48:10 +03:00
Даниїл Григор'єв
7882533daf
Fix TextualGameState HTML string fallback
Move the additional wrapping for getMainContentHTML into getInnerHTML
and call it from GameState super method. Also apply the same wrapping to
getInitialContent (if not null) to ensure equal treatment of legacy HTML
strings and modern JSX/TSX methods.
2024-09-23 23:39:07 +03:00
Даниїл Григор'єв
7dac0baa6b
Merge pull request #39 from tobspr-games/dengr1065/textual-game-state-work
Basic support for JSX/TSX in GameStates
2024-09-22 11:21:26 +03:00
Даниїл Григор'єв
8955e37c78
Simplify GameState legacy HTML string support
Move the getInnerHTML fallback to the default implementation of
getContentLayout; this allows for code reuse in TextualGameState too.
2024-09-21 21:41:12 +03:00
Даниїл Григор'єв
4e2694922d
Merge pull request #43 from ozgurozbek/patch-1
Update base-tr.yaml
2024-09-16 21:38:44 +03:00
Даниїл Григор'єв
ef2591d0f8
Merge pull request #42 from Ecconia/fix-texturepacker-download
Fix runnable-textpacker.jar download
2024-08-29 23:24:17 +03:00
Ecconia
241f166989
Fix runnable-textpacker.jar download
Adds 'await' to ensure the download will be complete.

Without this the download might never complete. This issue occurred on a Linux OS (which seem to handle file streams a bit different than some other OSs).
Effects of not fixing this are that the java execution following this download fails for funny "corrupted jar" and other reasons - depending on the size and content of the incomplete jar file.
2024-08-29 22:16:51 +02:00
Даниїл Григор'єв
6ff5cc26d2
Merge pull request #41 from tobspr-games/dengr1065/electron-updates
Update the Electron wrapper
2024-08-13 12:12:22 +03:00
Даниїл Григор'єв
a2e192f610
Modify Electron wrapper
Minimal set of changes, not a refactor yet. Make shapez store all of
its data in a single directory whose path is provided by Electron APIs.
Useless checks and web preferences are removed and app.isPackaged is
used to detect whether the app should try to load a localhost URL.
2024-07-27 23:08:57 +03:00
Даниїл Григор'єв
7bc48c1f28
Update Electron 2024-07-27 22:32:52 +03:00
Даниїл Григор'єв
cbd3f20f20
Merge pull request #40 from tobspr-games/dengr1065/even-more-cleanups
Even more cleanups
2024-07-27 21:59:26 +03:00
Даниїл Григор'єв
ad6e3c3b92
Fix Vector#equalsEpsilon ignoring parameter
Provided epsilon parameter was used for Y axis but ignored for X axis.
Some useless return statements are also removed.
2024-07-26 18:59:55 +03:00
Даниїл Григор'єв
67f7babd09
Drop support for SHA1 checksums
Also remove an unused function and switch to crypto.randomUUID() for
savegame ID generation.
2024-07-26 18:01:38 +03:00
Даниїл Григор'єв
bbde68df23
Remove some polyfills
The Math polyfills might still be needed (even though they are polluting
the Math object) and I'm not sure about DOM polyfills yet.
2024-07-26 17:48:52 +03:00
Даниїл Григор'єв
ed44ff1ebe
Remove prefixed imageSmoothingEnabled
webkitImageSmoothingEnabled got deprecated back in 2016.
globalConfig.smoothing.quality is now properly typed as well.
2024-07-26 17:39:38 +03:00
Даниїл Григор'єв
79c4f3b9b0
[TS] Rename globalConfig 2024-07-26 17:36:31 +03:00
Даниїл Григор'єв
e618776013
Minor globalConfig and unused code cleanup
Remove secrets that are no longer used and fetchDiscounts preload step.
2024-07-26 17:01:57 +03:00
Даниїл Григор'єв
bf0e3f7949
Remove compression prefix fallback
All modern browsers should support \1 as the compression prefix, even
outside of Electron or recent Chromium versions. Local storage /
IndexedDB platform wrappers were removed a while ago.
2024-07-26 16:27:31 +03:00
Даниїл Григор'єв
89ca498613
Remove some legacy browser support code
Includes prefixed document.hidden property with respective
visibilitychanged event and redundant support for navigator.language /
lack of navigator.languages check.
2024-07-26 16:24:20 +03:00
Даниїл Григор'єв
a3d82cc46a
Remove accessNestedPropertyReverse
Obfuscation is useless in an open source game.
2024-07-26 16:15:41 +03:00
Даниїл Григор'єв
04e96e0d68
Merge pull request #37 from tobspr-games/dengr1065/avoid-storedshapes-direct-access
Replace some outside usages of HubGoals#storedShapes
2024-07-24 19:56:13 +03:00
Даниїл Григор'єв
ec8a6dec18
Rewrite mods state
Most existing mods aren't going to work in CE and the system will be
reworked some time later, so this will work for now.
2024-07-21 03:56:50 +03:00
Даниїл Григор'єв
0fe28a7cd1
[TS] Rename ModsState 2024-07-21 03:08:17 +03:00
Даниїл Григор'єв
69ce8ffc17
Basic JSX support in states
Quite hacky considering the complex indirection and minor differences in
the appearance of each state, as well as legacy code and need to support
HTML strings for now. Some methods could be improved, refactored or
deleted, but no major changes were made.

Mods and puzzles menu states are broken in this commit.
2024-07-21 02:46:48 +03:00
Даниїл Григор'єв
a2b21cc6dd
Fix all instances of "reciever" typo 2024-07-21 02:27:06 +03:00
Даниїл Григор'єв
178744e065
[TS] Rename TextualGameState
This time with .tsx extension.
2024-07-21 01:48:43 +03:00
Даниїл Григор'єв
3a20244e38
Use @ exclusively for root imports
Remove "root" resolve alias and now-redundant jsx-runtime alias.
2024-07-21 01:38:08 +03:00
Даниїл Григор'єв
78b9ab49f1
Allow Node in JSX runtime
The typings are not consistent, but they seem to work. I'll leave the
rest as-is and just hope that someone fixes them later.
2024-07-20 13:35:11 +03:00
Даниїл Григор'єв
400a4cae37
[TS] Rename GameState 2024-07-20 13:34:13 +03:00
Acquario1310
807f3306aa
Update italian translation (#38) 2024-07-20 10:52:25 +03:00
Даниїл Григор'єв
ee11931c9f
Resolve @/jsx-runtime in webpack
TypeScript compiler on its own will only inject this import, but not
resolve it. The bundler is supposed to resolve the import, so just do
that.
2024-07-11 12:52:03 +03:00
Даниїл Григор'єв
26e854f983
[TS] Rename TextualGameState 2024-07-11 11:13:57 +03:00
Даниїл Григор'єв
ad8eccef55
Avoid direct HubGoals#storedShapes access
Use getShapesStored and getShapesStoredByKey when possible instead. Only
covers usages outside of hub goals.
2024-07-11 10:36:44 +03:00
Даниїл Григор'єв
8b7560a09c
Merge pull request #36 from tobspr-games/fix/shapez-exports-nondev
Fix shapez exports not being exposed in production
2024-07-10 10:14:53 +03:00
Даниїл Григор'єв
318baaa42d
Fix shapez exports not being exposed in production
A previous commit has mistakenly changed the behavior of a condition
checking for standalone version. Instead of always being true, shapez
exports were only exposed if the game was built in development mode.
2024-07-02 15:09:51 +03:00
Даниїл Григор'єв
ddc4513e46
Merge pull request #35 from tobspr-games/dengr1065/more-cleanups
Various cleanups
2024-06-25 21:31:16 +03:00
Даниїл Григор'єв
4bf8011b88
Remove unused typehints block 2024-06-25 21:15:50 +03:00
Даниїл Григор'єв
f5d8b73d8a
Remove FTP tasks 2024-06-20 19:48:57 +03:00
Даниїл Григор'єв
1e24b11834
Fix external link handling 2024-06-20 19:46:26 +03:00
Даниїл Григор'єв
a7ec1e53bf
Remove more unused styles 2024-06-20 19:43:59 +03:00
Даниїл Григор'єв
0e7082dbbd
Get rid of more Steam leftovers 2024-06-20 18:31:52 +03:00
Даниїл Григор'єв
4940135140
Remove some mobile-web code 2024-06-20 16:09:43 +03:00