Commit Graph

18 Commits

Author SHA1 Message Date
Pieter-Jan Briers
cb563c75fd Update map loader to work with grid entities. 2019-12-28 03:22:09 +01:00
Pieter-Jan Briers
f2c8b343bb Fix initialize not getting called for components added during initialize. 2019-12-22 21:42:30 +01:00
Acruid
df34ce025a Entities now require a location when being spawned. 2019-12-16 21:43:24 -08:00
Acruid
ea8e5e9fe7 EventBus Refactor (#909)
* Extracts the ECS event system out of EntityManager, and into a new class called EventBus.
XML Docs and full test coverage for EventBus.
2019-12-08 19:36:52 -08:00
Acruid
d9a411b260 Shared IMap/Map class removal (#904)
* Moved IMap from Shared/Interfaces/Map to Shared/Map namespace.

* Extracted Map class out of the MapManager class.

* Removed the Map class and interface.

* Fully removed the Map and IMap class.
2019-11-26 20:47:04 +01:00
Pieter-Jan Briers
78ebf99296 Fix a compiler warning. 2019-10-10 15:48:00 +02:00
Acruid
5b3aaea5ec A null event handler delegate cannot be subscribed to an event type.
Resolved https://github.com/space-wizards/RobustToolbox/issues/575.
2019-09-03 13:36:52 -07:00
Acruid
58aac5ea2b Refactored the entity event handling spaghetti.
Renamed some of the code regions to better reflect what the functions were a part of.
2019-09-03 13:32:11 -07:00
Acruid
8765c67872 All entities are now allocated with a TransformComponent.
Prototypes will now use existing components, like transform, when loading an entity. Previously they blindly created new ones on the entity.
AddComponent now cannot overwrite a protected component, ie TransformComponent and MetaDataComponent. Entity caches these components, they cannot be changed.
Regular RemoveComponent functions are now not able to remove protected components.
2019-08-30 00:49:20 -07:00
Pieter-Jan Briers
e6c4cbb662 Make placement respect map init. 2019-07-08 13:46:14 +02:00
Pieter-Jan Briers
1b57d4ec0b Remove TrySpawn* entity methods. (#833) 2019-07-07 22:24:21 +02:00
Pieter-Jan Briers
bb4a1eda8e Project file refactor (#819)
* Project file refactor

Move all the .csproj files to the new .NET Core style.
This doesn't make any difference for compiling for Framework,
but it does reduce a ton of useless boilerplate.

As an extension of this, killed a bunch of uncompiled & unmaintained .cs files.

Compiling for release (to profile) works now.
Removed AnyCPU targets from the solution file.

* Fix compiler warnings.
2019-05-28 00:16:01 +02:00
Acruid
61aba8fc50 Create Entities Without Prototypes (#815)
* Retrofitted ComponentManager_Test to use DependencyCollection.

* Renamed ComponentManager_Test to ComponentManager_Tests to follow naming conventions.

* Added component add/remove/delete events to IComponentManager.
Removed IEntity dependency from ComponentManager.

* Entities can now be spawned without a prototype.

* Removed unused function.

* CreateEntity now actually works with a null prototype ID. The other spawn functions should work as well.
Updated doc comments for IEntityManager.SpawnEntity().
2019-05-24 21:37:28 +02:00
Pieter-Jan Briers
0340cecd6d Clean up entity events some more. 2019-05-08 09:54:04 +02:00
Pieter-Jan Briers
285f68b4dd Minor clean up of entity events. 2019-05-07 23:13:35 +02:00
Acruid
5fe0bd6e55 EntityStates (#798)
* Added a new special MetaDataComponent to store entity data that isn't specific to a component.

* Adds ExposeData to MetaDataComponent.
Name of the entity now defaults to the prototype name.

* EntityStates changed so that the list of networked components is not sent every tick for a modified entity.

* Code cleanup & doc comments.

* MetaDataComponent Name and Description are taken from the prototype before storing them in the component.

* Adds the EntityState serializer benchmark. This isn't a test, but is really useful.

* Redesigned the logic in ServerGameStateManager.

* Adds MetaDataComponent registration to the UnitTesting project.
2019-04-26 15:38:56 +02:00
Acruid
faf99d2231 By default events raised on the ECS event bus are now dispatched immediately. (#794)
Added a new EntityManager.QueueEvent() method that queues the event for the next tick.
2019-04-20 10:58:04 +02:00
Silver
25926a17b7 Renames SS14.* to Robust.* (#793)
RobustToolbox projects should be named Robust.* 

This PR changes the RobustToolbox projects from SS14.* to Robust.*

Updates SS14.* prefixes/namespaces to Robust.*
Updates SpaceStation14.sln to RobustToolbox.sln
Updates MSBUILD/SS14.* to MSBUILD/Robust.*
Updates CSProject and MSBuild references for the above
Updates git_helper.py
Removes Runserver and Runclient as they are unusable
2019-04-15 20:24:59 -06:00