Merge branch 'master' into 2021-12-03-remove-IEntity-komm-süsser-todd
# Conflicts: # Content.Client/Crayon/CrayonDecalVisualizer.cs # Content.Client/Tabletop/TabletopSystem.cs # Content.IntegrationTests/Tests/InventoryHelpersTest.cs # Content.Server/AI/EntitySystems/AiSystem.cs # Content.Server/AI/Utility/AiLogic/UtilityAI.cs # Content.Server/AME/AMENodeGroup.cs # Content.Server/Administration/AdminVerbSystem.cs # Content.Server/Body/Systems/RespiratorSystem.cs # Content.Server/Chemistry/Components/InjectorComponent.cs # Content.Server/Chemistry/TileReactions/CleanTileReaction.cs # Content.Server/Chemistry/TileReactions/SpillTileReaction.cs # Content.Server/Crayon/CrayonComponent.cs # Content.Server/Doors/Components/ServerDoorComponent.cs # Content.Server/Explosion/EntitySystems/TriggerSystem.cs # Content.Server/Fluids/Components/MopComponent.cs # Content.Server/Fluids/Components/SpillExtensions.cs # Content.Server/Fluids/EntitySystems/PuddleSystem.cs # Content.Server/Instruments/InstrumentSystem.cs # Content.Server/Nutrition/EntitySystems/DrinkSystem.cs # Content.Server/Nutrition/EntitySystems/FoodSystem.cs # Content.Server/PneumaticCannon/PneumaticCannonSystem.cs # Content.Server/Storage/Components/EntityStorageComponent.cs # Content.Server/Storage/Components/StorageFillComponent.cs # Content.Server/Stunnable/StunbatonSystem.cs # Content.Server/Throwing/ThrowHelper.cs # Content.Server/Weapon/Ranged/Barrels/BarrelSystem.cs # Content.Server/Weapon/Ranged/Barrels/Components/ServerBatteryBarrelComponent.cs # Content.Server/Weapon/Ranged/ServerRangedWeaponComponent.cs # Content.Shared/Containers/ItemSlot/ItemSlotsSystem.cs # Content.Shared/Damage/Components/DamageableComponent.cs # Content.Shared/Damage/Systems/DamageableSystem.cs # Content.Shared/MobState/Components/MobStateComponent.cs # Content.Shared/Slippery/SharedSlipperySystem.cs
This commit is contained in:
@@ -1,4 +1,3 @@
|
||||
using Content.Shared.Chemistry.Reagent;
|
||||
using Content.Shared.Sound;
|
||||
using JetBrains.Annotations;
|
||||
using Robust.Shared.GameObjects;
|
||||
@@ -7,6 +6,7 @@ using Robust.Shared.ViewVariables;
|
||||
using Content.Server.Nutrition.EntitySystems;
|
||||
using Content.Shared.FixedPoint;
|
||||
using Robust.Shared.Analyzers;
|
||||
using System.Threading;
|
||||
|
||||
namespace Content.Server.Nutrition.Components
|
||||
{
|
||||
@@ -50,8 +50,9 @@ namespace Content.Server.Nutrition.Components
|
||||
public float ForceFeedDelay = 3;
|
||||
|
||||
/// <summary>
|
||||
/// If true, this drink has some DoAfter active (someone is being force fed).
|
||||
/// Token for interrupting a do-after action (e.g., force feeding). If not null, implies component is
|
||||
/// currently "in use".
|
||||
/// </summary>
|
||||
public bool InUse = false;
|
||||
public CancellationTokenSource? CancelToken;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Threading;
|
||||
using Content.Server.Chemistry.EntitySystems;
|
||||
using Content.Server.Nutrition.EntitySystems;
|
||||
using Content.Shared.FixedPoint;
|
||||
@@ -55,9 +56,10 @@ namespace Content.Server.Nutrition.Components
|
||||
public float ForceFeedDelay = 3;
|
||||
|
||||
/// <summary>
|
||||
/// If true, this food has some DoAfter active (someone is being force fed).
|
||||
/// Token for interrupting a do-after action (e.g., force feeding). If not null, implies component is
|
||||
/// currently "in use".
|
||||
/// </summary>
|
||||
public bool InUse = false;
|
||||
public CancellationTokenSource? CancelToken;
|
||||
|
||||
[ViewVariables]
|
||||
public int UsesRemaining
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.Analyzers;
|
||||
using Robust.Shared.ViewVariables;
|
||||
using Robust.Shared.Serialization.Manager.Attributes;
|
||||
|
||||
namespace Content.Server.Nutrition.EntitySystems;
|
||||
|
||||
/// <summary>
|
||||
/// Component that denotes a piece of clothing that blocks the mouth or otherwise prevents eating & drinking.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// In the event that more head-wear & mask functionality is added (like identity systems, or raising/lowering of
|
||||
/// masks), then this component might become redundant.
|
||||
/// </remarks>
|
||||
[RegisterComponent, Friend(typeof(FoodSystem), typeof(DrinkSystem))]
|
||||
public class IngestionBlockerComponent : Component
|
||||
{
|
||||
public override string Name => "IngestionBlocker";
|
||||
|
||||
/// <summary>
|
||||
/// Is this component currently blocking consumption.
|
||||
/// </summary>
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
[DataField("enabled")]
|
||||
public bool Enabled { get; set; } = true;
|
||||
}
|
||||
Reference in New Issue
Block a user