Commit Graph
48 Commits
Author SHA1 Message Date
Leon FriedrichandGitHub 241bce56c8 Add Resolve() to component queries (#2607) 2022-03-19 15:53:39 +11:00
AcruidandGitHub 6b9b56ca83 Grid Components Allocate Grids (#2597)
* Deleting a map is now routed through MapComponent deletion.

* Remove map and grid deletions from map networking, just delete the entity if you want to remove the map.

* Moved the chunkSize property of created grids from the networked MapData to the MapGridComponent state.

* Remove unused IMapManager.DefaultMap property.

* Removed MapCreationTick field from MapManager.MapCollection.

* Removed _maps hashset field from MapManager.

* Removed CreatedMaps array from network MapData.

* MapGrid.ParentMapId is now derived from the bound TransformComponent, and isn't required in the MapGrid ctor.
Removed MapGrid.CreatedTick, it can be found on MapGridComponent.CreationTick.

* Remove a bunch of ApplyGameStatePre code duplication.

* Completely refactored CreateGrid.

* Adds AddComponentUninitialized to the ECS system. This allows you to access a component before it is initialized in a using block.

* Use AddComponentUninitialized to allocate a grid after the component is allocated.

* MapLoader now creates the grids after creating the map entities.

* Chunksize and TileSize properties are now actually read out of the map yaml.
TileSize has a public Setter.

* Minor cleanup.

* Moved grid allocation onto the MapGridComponent.

* Final Cleanup.

* Merge Fail.

* Fixed test, grid was getting deleted because it was empty.

* Remove DeletedChunkDatum from grid networking.

* ApplyMapGridState moved from map manager to the MapGridComponent.
2022-03-13 18:28:59 -07:00
metalgearsloth 7409df07f8 Merge remote-tracking branch 'upstream/master' into 2022-02-07_EnsureCompOut 2022-02-07 19:55:45 +11:00
metalgearslothandGitHub 2e646fe2b6 EntityQueryEnumerator "fix" (#2501) 2022-02-07 12:06:50 +11:00
metalgearsloth 3f10dbe770 EnsureComponent<T> with out variable
Useful for EnsureComponent<T>(uid, out var comp) && comp.Thing
2022-02-07 00:07:01 +11:00
metalgearslothandGitHub 933724e4ee Nuke CompGetStateAttempt allocs (#2497) 2022-02-04 12:35:57 +11:00
Leon FriedrichandGitHub 213955566b remove GetBus() (#2491) 2022-02-02 10:03:03 +11:00
metalgearslothandGitHub 8f790c28be Deprecate component.Paused (#2449) 2022-01-26 16:10:25 +11:00
wrexbeandGitHub d1e0f2cd94 Automatic Component Names (Alternate ending) (#2389) 2022-01-25 14:10:08 +01:00
metalgearslothandGitHub 753f3f8c0f Add dirty method to entmanager for components (#2453) 2022-01-25 14:00:03 +01:00
metalgearslothandGitHub 2e70cd4f2e Add HasComp to EntityQuery struct (#2451) 2022-01-24 18:48:45 +11:00
metalgearslothandGitHub 43081c57e7 Add acruid's funny entity query (#2440) 2022-01-21 10:45:10 +11:00
wrexbe 0538e89948 Fixes warnings 2022-01-17 19:13:54 -08:00
Paul RitterandGitHub 013a3e3e8c removes componentdependencies (#2423) 2022-01-15 13:06:29 +11:00
metalgearslothandGitHub 9d9ad15274 Entity deletion stuff (#2365) 2021-12-23 12:20:44 +01:00
Pieter-Jan Briers 4be572ba58 whoops 2021-12-23 01:25:42 +01:00
Pieter-Jan Briers baf86b5b83 Get rid of ComponentTypeCache stuff.
It didn't really work.
2021-12-23 01:15:25 +01:00
Pieter-Jan Briers e56c77319c Fix tests breaking due to component index stuff. 2021-12-23 01:12:56 +01:00
Pieter-Jan Briers 0b2693cb98 Optimize TryGetComponent & friends with array type -> dict lookups. 2021-12-21 17:16:08 +01:00
Paul b7b2a0ab5e quickly put that back 2021-12-20 15:33:50 +01:00
Paul 03505da382 fixes a bunch of warnings 2021-12-20 13:59:01 +01:00
metalgearslothandGitHub 7a31525c3c EntityQuery funnies (#2347) 2021-12-15 18:02:02 +11:00
wrexbeandGitHub c94e49ed08 Cache Component Types (#2325) 2021-12-12 16:06:51 -08:00
Wrexbe 4df03f859b Fix release building 2021-12-07 09:50:07 -08:00
metalgearsloth 8377acb672 more cast memes 2021-12-07 22:14:44 +11:00
DrSmugleaf 5655dea1c7 Fix more errors, client and server now build 2021-12-06 14:00:38 +01:00
DrSmugleaf 163deff564 Fix 3000 errors 2021-12-05 18:13:33 +01:00
20kdc 8aa6fb478b Susser Todd: Robust.Shared, Error Pass 2 "It Now Compiles" 2021-12-03 19:36:16 +00:00
20kdc 5e7d617736 Susser Todd: Robust.Shared, Error Pass 1 2021-12-03 18:40:55 +00:00
Vera Aguilera Puerto 5eda1b326d Inline OwnerUid 2021-12-03 16:30:34 +01:00
Vera Aguilera Puerto 7a06db60cf Inline UID 2021-12-03 15:53:10 +01:00
44649eea1c pvs refactor (#2247)
Co-authored-by: Paul <ritter.paul1+git@googlemail.com>
2021-11-30 15:07:08 +01:00
Vera Aguilera PuertoandGitHub 52d669e032 Fixes exceptions on shutdown. (#2219) 2021-11-11 17:39:25 +01:00
Vera Aguilera Puerto 079e099a3b Makes many things use OwnerUid instead of Owner.Uid 2021-11-09 15:11:02 +01:00
Vera Aguilera Puerto ee894d8a8e Move the last responsabilities from Entity to EntityManager. 2021-11-08 16:09:12 +01:00
Vera Aguilera PuertoandGitHub ce169ed15e Move LastModifiedTick out of Entity and into MetaDataComponent. (#2209) 2021-11-08 15:56:49 +01:00
Vera Aguilera Puerto 78d01fd25d Remove every ITransformComponent usage. 2021-11-08 12:44:03 +01:00
metalgearslothandGitHub a4ff5d65ec Dirty changes (#2174) 2021-11-02 16:05:45 +11:00
Vera Aguilera PuertoandGitHub 2f03640200 Removing a component from an entity removes & deletes it immediately. (#2151) 2021-10-22 23:38:37 +02:00
Vera Aguilera Puerto 88dec23a03 Fix wrong logic with protected component removal, use fancy pattern. 2021-10-21 15:10:38 +02:00
Vera Aguilera PuertoandGitHub a0ef63bd4a Makes RemoveComponentImmediate more like RemoveComponentDeferred. (#2126)
- Exception tolerance added
- UID is now passed in the arguments
- Is able to remove protected components if needed.
- Actually calls `ComponentDependencyManager` to let it know the component has been removed.
2021-10-14 00:41:57 +02:00
20kdc a3a69f821f Revert "Fix stuck lathes properly. (#2091)" b/c of "Tried to overwrite a protected component." errors
This reverts commit a60993c60d.
2021-10-07 02:23:57 +01:00
Vera Aguilera Puerto 3935c63a80 EntityManager Initialized set by Initialize() method and not InitializeComponents() 2021-10-05 11:40:19 +02:00
20kdcandGitHub a60993c60d Fix stuck lathes properly. (#2091) 2021-10-04 12:33:35 +02:00
Vera Aguilera PuertoandGitHub ab4f2c91b4 Move LifeStage and Paused data to MetaDataComponent. (#2068) 2021-10-04 12:29:13 +02:00
Vera Aguilera Puerto 87f5c059c4 Remove IComponentManager entirely. 2021-09-28 13:40:48 +02:00
Vera Aguilera Puerto 949a584325 Fix missing using directive when EXCEPTION_TOLERANCE is enabled. 2021-09-25 18:31:18 +02:00
Vera Aguilera PuertoandGitHub c7461221b9 Merge ComponentManager into EntityManager. (#2064)
* Merge ComponentManager into EntityManager.

* Obsolete IComponentManager.
2021-09-25 18:23:11 +02:00