Adds FlammableComponent, humans can now catch on fire. (#2115)

This commit is contained in:
Víctor Aguilera Puerto
2020-09-22 15:40:04 +02:00
committed by GitHub
parent 4c34a12c67
commit 31e0dfc10c
33 changed files with 457 additions and 54 deletions

View File

@@ -13,13 +13,14 @@ namespace Content.Server.GameObjects.EntitySystems
{
[Dependency] private readonly IEntityManager _entityManager = default!;
private const float UpdateDelay = 3f;
private const float UpdateDelay = 1f;
private float _lastUpdate;
public override void Update(float frameTime)
{
_lastUpdate += frameTime;
if (_lastUpdate < UpdateDelay) return;
var atmosSystem = EntitySystemManager.GetEntitySystem<AtmosphereSystem>();
// creadth: everything exposable by atmos should be updated as well
foreach (var atmosExposedComponent in EntityManager.ComponentManager.EntityQuery<AtmosExposedComponent>())
{