Commit Graph
12 Commits
Author SHA1 Message Date
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 43081c57e7 Add acruid's funny entity query (#2440) 2022-01-21 10:45:10 +11:00
metalgearslothandGitHub 7a31525c3c EntityQuery funnies (#2347) 2021-12-15 18:02:02 +11:00
DrSmugleaf 5655dea1c7 Fix more errors, client and server now build 2021-12-06 14:00:38 +01:00
Vera Aguilera Puerto c39f6d09eb Lots of manual fixing. More to come. 2021-12-03 17:01:46 +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 Puerto ee894d8a8e Move the last responsabilities from Entity to EntityManager. 2021-11-08 16:09:12 +01: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