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

748 Commits

Author SHA1 Message Date
Даниїл Григор'єв
7854e10173
Rename incorrectly named .d.ts files
These files do not describe existing JS types and instead define their
own. Usage of .d.ts extension prevents these types from being emitted
when using emitDeclarationOnly, which affects generation of typings for
mod development.
2025-06-19 05:48:23 +03:00
Даниїл Григор'єв
2990f55dfb
Minor "buffers" cleanup
Remove the canvas context loss handling as it was incorrect, simplify
the error conditions in makeOffscreenBuffer and remove commented out
code.
2025-06-19 05:38:39 +03:00
Даниїл Григор'єв
94b7c754ad
Remove non-standard attribute assignment
Don't set the non-existent "opaque", "webkitOpaque" and "mozOpaque"
properties on a canvas. Keep using { alpha: false } when initializing
the context, which is the correct way.
2025-06-14 22:11:14 +03:00
Даниїл Григор'єв
d6390e88a4
Replace Object#hasOwnProperty with Object.hasOwn
Change most, but not all usages. This is mostly to please the linter,
but Object.hasOwn is also slightly shorter, especially when compared to
the proper form, Object.prototype.hasOwnProperty...
2025-06-14 22:11:14 +03:00
Даниїл Григор'єв
2f23c0174d
Inline {enable,disable}ImageSmoothing usages
The method isn't as complex as it used to be, and is only used in two
places. It is simpler to have it inlined instead.
2025-06-14 06:10:23 +03:00
Даниїл Григор'єв
bd4e31653c
Remove beginRoundedRect utility
No longer needed, as CanvasRenderingContext2D#roundRect is a built-in
way to achieve the same result now.
2025-06-14 04:24:46 +03:00
TcePrepK
c12bc13df6 Added gameInitialized check to onEntityChanged in map_view.js 2025-06-12 16:15:17 +03:00
Даниїл Григор'єв
e041369a7d
Avoid null uid in EntityManager#registerEntity
Apply suggestion by @chunkybanana to improve readability.
2025-06-12 15:27:38 +03:00
Даниїл Григор'єв
69fb06e817
Use Set for entities access during belt recompute
Create a method to return all entities with the specified component as a
set (without array indirection), and use the method for belt
recomputations.
2025-06-12 15:27:38 +03:00
Даниїл Григор'єв
9cbb797ef6
Use Map and Set for entity storage
This is not a big optimization but an optimization nonetheless. Mostly
based on awesome work by @Xiving. Further work should be done to get
most out of these changes.
2025-06-12 15:27:38 +03:00
Даниїл Григор'єв
cd7c132411
[TS] Rename EntityManager 2025-06-12 15:27:38 +03:00
Даниїл Григор'єв
f9ad135fe3
Merge pull request #63 from tobspr-games/dengr1065/remove-achievements
Remove support for achievements
2025-04-08 17:26:06 +03:00
Даниїл Григор'єв
7ca3bf9664
Remove achievement support
Suggested by @SkimnerPhi. If needed, mods should provide their own
support for achievements. For vanilla this is dead code.
2025-04-08 15:39:14 +03:00
Даниїл Григор'єв
c265145c19
Clean up SCSS stylesheets
Can have minor effect on game appearance, most importantly the removal
of letter-spacing by default. Styles are now much lighter though.
Changes all keybinding code to use kbd instead of code as well.
2025-04-08 14:17:16 +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
Даниїл Григор'єв
a2b21cc6dd
Fix all instances of "reciever" typo 2024-07-21 02:27:06 +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
Даниїл Григор'єв
89992e2299
Apply formatting to src/js 2024-06-20 12:59:07 +03: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
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
Bagel03
ddb904432e Prettier 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
tobspr
52166fdd86 Fix discount still being active 2022-07-07 20:40:47 +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
e2907a1ab8 Adjust for the summer sale 2022-06-23 19:48:53 +02:00
tobspr
9f3cf49fad Properly render discounts 2022-06-23 14:59:09 +02:00
tobspr
5627d656cc Rebalance levels, adjustments, etc 2022-06-22 10:22:20 +02:00
Robert Ferree
512174ee93
fix the linting errors (#1451) 2022-06-21 08:01:42 +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
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
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
3ab5ca99fd 1.5.4 update (polishing + minor rebalancing) 2022-06-19 17:08:35 +02:00