Refactor Flammable to be ECS. (#4671)
- Refactor IHotItem into IsHotEvent. - Refactor IFireAct into TileFireEvent.
This commit is contained in:
committed by
GitHub
parent
9bde39c533
commit
6cea9cb973
@@ -1,18 +0,0 @@
|
||||
using System;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Shared.Atmos.Components
|
||||
{
|
||||
public class SharedFlammableComponent : Component
|
||||
{
|
||||
public override string Name => "Flammable";
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public enum FireVisuals
|
||||
{
|
||||
OnFire,
|
||||
FireStacks,
|
||||
}
|
||||
}
|
||||
12
Content.Shared/Atmos/FireVisuals.cs
Normal file
12
Content.Shared/Atmos/FireVisuals.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Shared.Atmos
|
||||
{
|
||||
[Serializable, NetSerializable]
|
||||
public enum FireVisuals
|
||||
{
|
||||
OnFire,
|
||||
FireStacks,
|
||||
}
|
||||
}
|
||||
@@ -1,17 +0,0 @@
|
||||
using Robust.Shared.Analyzers;
|
||||
|
||||
namespace Content.Shared.Temperature
|
||||
{
|
||||
/// <summary>
|
||||
/// This interface gives components hot quality when they are used.
|
||||
/// E.g if you hold a lit match or a welder then it will be hot,
|
||||
/// presuming match is lit or the welder is on respectively.
|
||||
/// However say you hold an item that is always hot like lava rock,
|
||||
/// it will be permanently hot.
|
||||
/// </summary>
|
||||
[RequiresExplicitImplementation]
|
||||
public interface IHotItem
|
||||
{
|
||||
bool IsCurrentlyHot();
|
||||
}
|
||||
}
|
||||
14
Content.Shared/Temperature/IsHotEvent.cs
Normal file
14
Content.Shared/Temperature/IsHotEvent.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using Robust.Shared.Analyzers;
|
||||
using Robust.Shared.GameObjects;
|
||||
|
||||
namespace Content.Shared.Temperature
|
||||
{
|
||||
/// <summary>
|
||||
/// Directed event raised on entities to query whether they're "hot" or not.
|
||||
/// For example, a lit welder or matchstick would be hot, etc.
|
||||
/// </summary>
|
||||
public class IsHotEvent : EntityEventArgs
|
||||
{
|
||||
public bool IsHot { get; set; } = false;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user