Commit Graph
43 Commits
Author SHA1 Message Date
83c2a1be11 [Dependency] source generator part 2 (#6550)
* [Dependency] source generator

No more reflection, no more codegen at runtime

Also various changes to Roslyn helpers to make this easier to write.

Requires all types with dependencies to be partial and not have readonly dependency fields. An analyzer enforces this at warning level, the previous injection strategies have remained in the code *for now* as a fallback.

No fallback is available for [field: Dependency] properties, due to a Roslyn bug.

Code Fixes exist. We love Roslyn

* Apply dependencies generator changes to all code

* Release notes

* Preprocessor got hands

* Handle nullable dependencies

These are bad but gotta deal with it.

* Apply suggestions from code review

Co-authored-by: Moony <moony@hellomouse.net>

* Fine, let's not use collection expressions

---------

Co-authored-by: Moony <moony@hellomouse.net>
2026-05-08 12:38:33 +02:00
PJB3005 7c0f1b8031 Fix unused dependency warning outside DEBUG
Supersedes #6069
2025-07-22 18:10:49 +02:00
TayrtahnandGitHub 196e59b7e4 Clean up all missing EntitySystem proxy method uses (#6027)
* Clean up all missing EntitySystem proxy method uses

* Restore comment

* Fix bad change that caused closure allocation

* tuple

* Revert "tuple"

This reverts commit 14581a40aa.

* Revert "Fix bad change that caused closure allocation"

This reverts commit 215b2559ed.

* Revert "Restore comment"

This reverts commit 4a47a36557.

* Revert "Clean up all missing EntitySystem proxy method uses"

This reverts commit 3b1fe4ce7f.

* Redo with improved code fixer.
Let's see how it fares this time
2025-06-21 00:05:09 +02:00
metalgearslothandGitHub ee8ea4ec3b Purge PhysicsMapComponent (#5766)
* Replace PhysicsMapComponent

- Dumb idea
- Lots of book-keeping and perf overhead.
- Much saner this way.

* stuff

* More work

* Purge

* Fixes

* Eh?

* Fixes

* Also this

* weh

* Fixes

* ice-cream

* Fix

* Fix stacking / gravity

* Gravity query

* MoveBuffer optimisations

* Fixes for test

* World gravity

* Fix build

* Avoid some transform resolves for contactless ents

* Less getcomps

* Fix contact caching

* Possibly less copies

* reh

* bulldoze

* Test "fix"

* seikrets

* a

* I saw this but now I decideded against it

* true
2025-05-28 19:18:36 +10:00
B_KirillandGitHub 2a8b776ee9 Cleanup warnings: CS0414 (#5892)
* Clean up

* Use #pragma
2025-05-10 12:39:46 +10:00
metalgearslothandGitHub 2ac17009ee Deep-copy fixtures on client (#5863)
Fixes a LOTTA bugs
2025-04-19 19:31:36 +10:00
Leon FriedrichandGitHub 32d8a1cba9 Misc grid state changes (#5597) 2025-01-17 17:07:09 +01:00
metalgearslothandGitHub 0bc3c51707 Contact QOL stuff (#5385)
* Contact QOL stuff

Only just made the enumerator version need to test with AI branch had an IEnumerable before.

* Fix
2024-08-25 11:54:05 +10:00
2b55d39e51 Make various ValueList enumerators use spans (#5019)
* Make various ValueList enumerators use spans

* Remove reference to EntityEventBus.OrderedRegistration

---------

Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
2024-03-31 17:01:03 +11:00
TayrtahnandGitHub 16c7c71ca6 Code cleanup: Dirty(Comp) (#4979)
* The easy ones

* SharedPhysicsSystem
2024-03-18 21:36:52 +01:00
metalgearslothandGitHub d45ce7742e Entitylookup approx / shape changes (#4842)
* Entitylookup approx / shape changes

- Make the shape queries respect the approx flag.
- Make everything use shape queries.
- Hopefully reduce some of the internal cruft.
- Add some new methods I need for trade station.

* Bunch of deduplication

* Remove some more duplication abuse

* Remove intersection duplication

* Bunch more cleanup

* MapManager rejig

* Fix some stuff

* More fixes

* Release notes

* Fix TryFindGrid

* Sensor check

* Fix query

* Fix map queries

* More cleanup

* Fix whatever this is.

* also dis

* Fix entity query

* Smol optimisations

* Also this
2024-01-19 13:02:22 +11:00
Leon FriedrichandGitHub 7b171b2212 Fix some physics bugs (#4746)
* Fix SetAwake()

* Remove bad debug assert

* EntityQuery & misc optimizations

* Remove bad(?) code, and add new test

* I love engine tests

* Add debug assert
2023-12-24 17:28:43 +11:00
DrSmugleafandGitHub b737ecf9b3 Add generic EntityUid, remove some usages of .Owner (#4498) 2023-10-19 12:23:48 -07:00
metalgearslothandGitHub f4f0967fdc Fix double contact deletion throwing (#4450) 2023-09-28 20:12:45 +10:00
Leon FriedrichandGitHub f3e3e64db3 Re-add entity check to fixture equality (#4397) 2023-09-15 18:44:24 +10:00
metalgearslothandGitHub 0624ac36cd Remove PhysicsComponent ref from fixtures (#4374) 2023-09-12 12:49:33 +10:00
metalgearslothandGitHub f05ed96461 Remove FixtureId from fixtures (#4270) 2023-08-23 18:50:48 +10:00
metalgearslothandGitHub d4171351f4 Metadata + cancollide stuff (#4247) 2023-08-08 12:03:27 +10:00
VordenburgandGitHub cd72523701 Add CollisionLayerChangeEvent (#4147) 2023-07-27 18:20:29 +10:00
e71f1cc8a5 Warning fixes (#4160)
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
2023-07-01 22:02:12 +10:00
Leon FriedrichandGitHub 1678a26d0c Remove obsolete Fixture.Body references (#4014) 2023-05-09 17:21:14 +10:00
metalgearslothandGitHub a52719b53f Refactor fixture serialization (#3923) 2023-05-06 16:26:06 +10:00
metalgearslothandGitHub 733c0e7a45 Box2D updates (#3957) 2023-04-22 16:41:05 +10:00
Leon FriedrichandGitHub ac66038bb5 Make Resolve() fail on deleted components. (#3952) 2023-04-21 14:02:06 +10:00
Pieter-Jan BriersandGitHub 6bdb7c040f Fix some warnings. (#3803) 2023-02-25 11:20:29 +11:00
metalgearslothandGitHub f0e77b49f9 Fix fixture mispredict (#3714)
Fixes https://github.com/space-wizards/space-station-14/issues/13616
2023-01-21 13:44:53 +11:00
metalgearslothandGitHub b969cee2a6 Fix slipping mispredict (#3713) 2023-01-20 11:16:28 +11:00
metalgearslothandGitHub 3d039118c6 Ensure DestroyContacts is called on fixture deletion (#3658) 2023-01-19 13:59:43 +11:00
metalgearslothandGitHub 1c36d919e4 Physics ECS 2 (#3648) 2023-01-15 15:38:53 +11:00
metalgearslothandGitHub 6c4b71e06b Make phys contacts per-world rather than per-map (#3619) 2022-12-28 13:54:36 +11:00
metalgearslothandGitHub ace8500240 Remove client/server split on sharedphysicsmap (#3618) 2022-12-27 13:17:54 +11:00
Leon FriedrichandGitHub af7d8c4601 Fix broadphase/lookup bugs (#3538) 2022-12-02 10:21:06 +11:00
metalgearslothandGitHub 025fa95854 Remove dupe grid serialization (#3522) 2022-11-26 13:55:48 +11:00
Paul RitterandGitHub 329e2b0cdc removes beforeserialization hook (#3422) 2022-11-03 12:50:40 +11:00
metalgearslothandGitHub 05fb110f40 Fix client fixture state handling (#3431) 2022-11-03 12:32:07 +11:00
Leon FriedrichandGitHub 635387a23e Disable collision for fixtureless entities. (#3412) 2022-10-31 10:06:47 +11:00
Leon FriedrichandGitHub 2b594f6356 Cache broadphases and container rejig (#3407) 2022-10-31 10:06:08 +11:00
ae2f3fe70c Remove EntityLookupComponent and de-dupe AABBs (#3367)
Co-authored-by: metalgearsloth <metalgearsloth@gmail.com>
2022-10-27 23:36:01 +11:00
Leon FriedrichandGitHub 2bae6abbc0 Entity deletion changes (#3355) 2022-10-24 03:50:58 +11:00
8fad4d291f fixes heaps of build warnings (#3329)
Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
2022-10-20 23:36:32 +11:00
metalgearslothandGitHub 7c2a010c71 Change mass to density (#3282) 2022-10-04 15:30:33 +11:00
metalgearslothandGitHub 51f00d4b3b ECS 90% of physics component (#3256) 2022-09-21 20:44:49 +10:00
metalgearslothandGitHub de01b9d8cb Raise collision events by-ref (#3201) 2022-09-14 17:23:35 +10:00