Commit Graph

9 Commits

Author SHA1 Message Date
Vera Aguilera Puerto
a5b57c8e10 Inline Transform 2021-12-03 14:20:34 +01:00
Vera Aguilera Puerto
69b270017b Inline TryGetComponent completely, for real 2021-12-03 14:17:01 +01:00
Vera Aguilera Puerto
5e177ae734 Inline EntityManager 2021-12-03 11:18:05 +01:00
Acruid
fa0ec5cbd9 AppearanceComponent API Changes (#5446) 2021-11-23 18:22:59 +11:00
Visne
c67160ae19 Disable warnings that would be refactored anyway (#5047) 2021-10-27 18:10:40 +02:00
Vera Aguilera Puerto
189a5c7847 ConstructionGL2 Part 1: ECSification, events and steps. (#5017)
- Completely rewrited the `ConstructionComponent` logic to be ECS, *without* looking too much at the original implementation.
    - The original implementation was dirty and unmaintainable, whereas this new implementation is much cleaner, well-organized and maintainable. I've made sure to leave many comments around, explaining what everything does.
- Construction now has a framework for handling events other than `InteractUsing`.
    - This means that you can now have CGL steps for things other than inserting items, using tools...
- Construction no longer uses `async` everywhere for `DoAfter`s. Instead it uses events.
- Construction event handling occurs in the `ConstructionSystem` update tick, instead of on event handlers.
    - This ensures we can delete/modify entities without worrying about "collection modified while enumerating" exceptions.
    - This also means the construction update tick is where all the fun happens, meaning it'll show up on our metrics and give us an idea of how expensive it is/how much tick time is spent in construction.
- `IGraphCondition` and `IGraphAction` have been refactored to take in `EntityUid`, `IEntityManager`, and to not be async.
- Removes nested steps, as they made maintainability significantly worse, and nothing used them yet.
- This fixes #4892 and fixes #4857

Please note, this leaves many things unchanged, as my idea is to split this into multiple PRs. Some unchanged things:
- Initial construction code is the same. In the future, it'll probably use dummy entities.
- Client-side guided steps are the same. In the future, the server will generate the guided steps and send them to clients as needed, caching these in both the server and client to save cycles and bandwidth.
- No new construction graph steps... Yet! 👀
2021-10-26 16:38:03 +02:00
Pieter-Jan Briers
103bc19508 Pow3r: stage 1 (#4208)
Co-authored-by: 20kdc <asdd2808@gmail.com>
2021-07-04 18:11:52 +02:00
Acruid
15fb554c28 Engine Entity Anchoring Changes (#4195)
* Converted all SnapGridPositionChangedEvent subscriptions to AnchorStateChangedEvent.

* Fixes power tests with new anchored requirements.

* Moved AnchorableComponent into construction.
AnchorableComponent now uses Transform.Anchored.

* Fixed bug with nodes, power works again.

* Adds lifetime stages to Component.

* Update Engine to v0.4.70.
2021-06-19 19:41:26 -07:00
DrSmugleaf
ff1a2d97ea Re-organize all projects (#4166) 2021-06-09 22:19:39 +02:00