1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2025-12-13 02:01:51 +00:00
Commit Graph

1257 Commits

Author SHA1 Message Date
Даниїл Григор'єв
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
Даниїл Григор'єв
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
Даниїл Григор'єв
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
Даниїл Григор'єв
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
Даниїл Григор'єв
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
Даниїл Григор'єв
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
Даниїл Григор'єв
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
Даниїл Григор'єв
4bf8011b88
Remove unused typehints block 2024-06-25 21:15:50 +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
Даниїл Григор'єв
2f0a505297
Apply formatting to the rest of files 2024-06-20 13:02:02 +03:00
Даниїл Григор'єв
f49def0c19
Apply formatting to src/css 2024-06-20 12:59:43 +03:00
Даниїл Григор'єв
89992e2299
Apply formatting to src/js 2024-06-20 12:59:07 +03:00
Даниїл Григор'єв
392b4cad13
Merge .gitignore files
Prettier only takes the root .gitignore into account, which leads to
formatting of auto-generated files. Moving ignore patterns into the root
.gitignore file makes Prettier follow them and cleans up the workspace.
2024-06-20 12:50:37 +03:00
cody-ferguson
894ceab854 Remove folders and steam stuff 2024-06-19 17:12:08 -05:00
cody-ferguson
6662cb2694 Remove all references of "G_IS_STANDALONE" 2024-06-19 13:47:50 -05:00
Даниїл Григор'єв
d8f378d7e1
Redo ESLint and TypeScript compiler config
Many configuration files in this repository were created a long time
ago, then were modified as problems occurred. Now that there is
TypeScript support, it makes sense to clean up this mess, at least by
making small steps. This configuration is based on strict settings, but
most of these are currently disabled - otherwise it would be too hard to
work with existing JavaScript code. The downside of this change is
pollution of files with warnings and errors, even though they are valid.

- ESLint/TypeScript upgraded
- TS configuration is now shared between arbitrary Node scripts, Gulp
  files and the Electron wrapper
- A few eslint-disable comments are removed
2024-04-27 00:23:34 +03:00
EmeraldBlock
b5a7f7736a fix hub double-rendering 2024-04-24 16:09:28 -05:00
EmeraldBlock
a7f66e89a7 remember about blueprints 2024-04-24 10:46:45 +03:00
EmeraldBlock
731510007b make tiled sprites pixel-aligned to avoid transparent seams 2024-04-24 10:46:45 +03:00
EmeraldBlock
838f26f198 be more consistent with drawing methods 2024-04-24 10:46:45 +03:00
Danyil Hryhoriev
f2596ef845 Remove cache busting
Cache busting is not required in standalone context.
2024-04-20 13:23:02 +03:00
Даниїл Григор'єв
aa49f063c3
Remove ads, analytics and Steam SSO, simplify HTML tasks (#21)
* Remove ad support, analytics and Wegame leftovers

The game may be somewhat broken in a few places, but it doesn't matter
for now. This is still not the end.

* Remove Steam SSO and demo stuff

Steam SSO is completely removed, a few things from demo like simplified
level sets are gone as well. Puzzle DLC on the other hand is now always
"owned" and will ask for a token to log in.

Removes

* Use shapez dialogs for Puzzle DLC token input

Yes, this sucks *a lot*. But it's a temporary measure, trust me :P

* Simplify HTML tasks

Removes the web (demo) index.html page and makes HTML tasks independent
of the build variant. This might not be the best solution, but it works
for now.
2024-04-16 10:25:16 +03:00
Danyil Hryhoriev
b55001dd1a Remove the restriction manager
Restriction manager is completely removed as it's only useful for demo
version. Lots of other demo-related things are left, such as ad support
or extended telemetry. This should be cleaned up later.
2024-04-13 01:51:36 +03:00
Bagel03
6db782d66a
Add Most Useful TS files (#13)
* Update Signal

* Update modal_dialogs

* Inputs

* Update factories

* Update tracked state

* Changed let to const where possible

* Add HUD typings

* improvements to typings

* fix exports not being exposed to mods

* fix signal typings

* remove TypedSignal

* fix all reported type errors

---------

Co-authored-by: Thomas B <t.ferb1@gmail.com>
Co-authored-by: EmeraldBlock <yygengjunior@gmail.com>
2023-11-17 16:02:08 -06:00
Даниїл Григор'єв
1be520afb9
Clean up and update workspace files
* Remove deprecated TSLint config

* Remove jsconfig.json

jsconfig.json is an alternative name for tsconfig.json that has allowJs
set to true. Since the directory already contains a tsconfig.json file,
this file does nothing.

* Remove Gitpod configuration

Gitpod is not as useful in CE because we're focusing on standalone.
Also, the configuration was added just to promote the service and there
are other similar services which may be preferred by the user.

* Remove Travis CI configuration

Travis CI is not used in shapez anymore in favor of GitHub Actions. In
addition to that, CI setup for the community edition will be done once
the codebase is in a better condition.

* Remove CONTRIBUTORS and CONTRIBUTING.md

The contributors file is out of date and unneeded as GitHub now shows
all collaborators anyway - however it could be still used in the future
to show a list of contributors in the game. CONTRIBUTING.md contains the
text of CLA, which is not enforced in this repository.

* Replace VSC workspaces with regular settings files

VSCode workspaces don't provide much benefit in a source tree like
shapez. This commit also adds EditorConfig and ESLint VSCode extensions
to the recommended extensions list.

* Remove CI workflow for building the game

It hasn't been updated in a while and we don't need it for now. Once the
codebase is in a more managable state, a new workflow will be added.

* Remove some unused resources

There are still many resources left, but they will be removed along with
the relevant code later.
2023-10-25 08:05:56 +03:00
Bagel03
81df743334
Add support for JSX
Allows usage of JSX across the codebase, JSX is turned into regular HTML elements.
2023-10-24 16:58:53 +03:00
Thomas (DJ1TJOO)
77fb9b76b6
Fixed missed trim replacement (#9) 2023-03-05 20:01:10 +01:00
Bagel03
ddb904432e Prettier 2023-03-04 21:32:47 -06:00
Bagel03
1eb264716a Add ts support 2023-03-04 21:32:47 -06:00
EmeraldBlock
24ceb6664d ES modules and config refactor
- switches to ES modules in gulp and src
- uses dengr's webpack configs and package.json, with modifications
- removes gulp/package.json
- removes babel stuff
- removes gulp-load-plugins, instead importing gulp plugins manually
- removes unused and trivial packages
- upgrades packages
- uses path/posix, for gulp
- removes __dirname in favor of relative urls
2023-03-04 00:46:55 -06:00
Thomas (DJ1TJOO)
2dc7f963fe
Removed china, wegame, gog and demo (#3)
* Removed build and global variables for china, wegame
* Removed google analitycs
2023-03-04 02:44:19 +02: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
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
400ee8e737 Support for GOG 2022-07-18 14:18:02 +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
3b79662721 Fix invalid ids 2022-06-28 09:19:44 +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
9f3cf49fad Properly render discounts 2022-06-23 14:59:09 +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
42cfeed771 Minor demo adjustments 2022-06-21 14:44:26 +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
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
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
88f5c41716 Minor polishing and standlaone adjustments 2022-06-20 12:17:19 +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
773609a2e2 Fix debug option being enabled by default 2022-06-20 10:30:12 +02:00