Adds FlammableComponent, humans can now catch on fire. (#2115)
This commit is contained in:
committed by
GitHub
parent
4c34a12c67
commit
31e0dfc10c
@@ -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>())
|
||||
{
|
||||
|
||||
@@ -7,9 +7,11 @@ using Content.Server.Atmos.Reactions;
|
||||
using Content.Server.GameObjects.Components.Atmos;
|
||||
using Content.Shared.GameObjects.EntitySystems.Atmos;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Server.GameObjects.EntitySystems.TileLookup;
|
||||
using Robust.Server.Interfaces.Timing;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.GameObjects.Components.Map;
|
||||
using Robust.Shared.GameObjects.Systems;
|
||||
using Robust.Shared.Interfaces.GameObjects;
|
||||
using Robust.Shared.Interfaces.Map;
|
||||
using Robust.Shared.IoC;
|
||||
@@ -29,6 +31,7 @@ namespace Content.Server.GameObjects.EntitySystems
|
||||
private GasReactionPrototype[] _gasReactions = Array.Empty<GasReactionPrototype>();
|
||||
|
||||
private SpaceGridAtmosphereComponent _spaceAtmos = default!;
|
||||
private GridTileLookupSystem? _gridTileLookup = null;
|
||||
|
||||
/// <summary>
|
||||
/// List of gas reactions ordered by priority.
|
||||
@@ -40,6 +43,8 @@ namespace Content.Server.GameObjects.EntitySystems
|
||||
/// </summary>
|
||||
public IEventBus EventBus => _entityManager.EventBus;
|
||||
|
||||
public GridTileLookupSystem GridTileLookupSystem => _gridTileLookup ??= Get<GridTileLookupSystem>();
|
||||
|
||||
public override void Initialize()
|
||||
{
|
||||
base.Initialize();
|
||||
|
||||
Reference in New Issue
Block a user