Tags everything that should be tagged (#3372)
* GlassBeaker and FirelockElectronics * Moves BaseItem * The rest * Indentations * Functional * for sloth * Applied zum reviews Co-authored-by: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com>
This commit is contained in:
@@ -1,10 +0,0 @@
|
||||
using Robust.Shared.GameObjects;
|
||||
|
||||
namespace Content.Server.GameObjects.Components.Botany
|
||||
{
|
||||
[RegisterComponent]
|
||||
public class BotanySharpComponent : Component
|
||||
{
|
||||
public override string Name => "BotanySharp";
|
||||
}
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
using Robust.Shared.GameObjects;
|
||||
|
||||
namespace Content.Server.GameObjects.Components.Botany
|
||||
{
|
||||
[RegisterComponent]
|
||||
public class HoeComponent : Component
|
||||
{
|
||||
public override string Name => "Hoe";
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using System.Threading.Tasks;
|
||||
using System.Threading.Tasks;
|
||||
using Content.Shared.GameObjects.Components.Tag;
|
||||
using Content.Shared.GameObjects.EntitySystems.ActionBlocker;
|
||||
using Content.Shared.Interfaces.GameObjects.Components;
|
||||
using Content.Shared.Utility;
|
||||
@@ -16,7 +17,7 @@ namespace Content.Server.GameObjects.Components.Botany
|
||||
if (!ActionBlockerSystem.CanInteract(eventArgs.User))
|
||||
return false;
|
||||
|
||||
if (eventArgs.Using.HasComponent<BotanySharpComponent>())
|
||||
if (eventArgs.Using.HasTag("BotanySharp"))
|
||||
{
|
||||
for (var i = 0; i < 2; i++)
|
||||
{
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#nullable enable
|
||||
#nullable enable
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
@@ -13,6 +13,7 @@ using Content.Shared.Audio;
|
||||
using Content.Shared.Chemistry;
|
||||
using Content.Shared.GameObjects.Components.Botany;
|
||||
using Content.Shared.GameObjects.Components.Chemistry;
|
||||
using Content.Shared.GameObjects.Components.Tag;
|
||||
using Content.Shared.GameObjects.EntitySystems;
|
||||
using Content.Shared.GameObjects.EntitySystems.ActionBlocker;
|
||||
using Content.Shared.Interfaces;
|
||||
@@ -681,7 +682,7 @@ namespace Content.Server.GameObjects.Components.Botany
|
||||
return false;
|
||||
}
|
||||
|
||||
if (usingItem.HasComponent<HoeComponent>())
|
||||
if (usingItem.HasTag("Hoe"))
|
||||
{
|
||||
if (WeedLevel > 0)
|
||||
{
|
||||
@@ -698,7 +699,7 @@ namespace Content.Server.GameObjects.Components.Botany
|
||||
return true;
|
||||
}
|
||||
|
||||
if (usingItem.HasComponent<ShovelComponent>())
|
||||
if (usingItem.HasTag("Shovel"))
|
||||
{
|
||||
if (Seed != null)
|
||||
{
|
||||
@@ -744,7 +745,7 @@ namespace Content.Server.GameObjects.Components.Botany
|
||||
return true;
|
||||
}
|
||||
|
||||
if (usingItem.HasComponent<PlantSampleTakerComponent>())
|
||||
if (usingItem.HasTag("PlantSampleTaker"))
|
||||
{
|
||||
if (Seed == null)
|
||||
{
|
||||
@@ -779,7 +780,7 @@ namespace Content.Server.GameObjects.Components.Botany
|
||||
return true;
|
||||
}
|
||||
|
||||
if (usingItem.HasComponent<BotanySharpComponent>())
|
||||
if (usingItem.HasTag("BotanySharp"))
|
||||
{
|
||||
return DoHarvest(user);
|
||||
}
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
using Robust.Shared.GameObjects;
|
||||
|
||||
namespace Content.Server.GameObjects.Components.Botany
|
||||
{
|
||||
[RegisterComponent]
|
||||
public class PlantSampleTakerComponent : Component
|
||||
{
|
||||
public override string Name => "PlantSampleTaker";
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
#nullable enable
|
||||
using Robust.Shared.GameObjects;
|
||||
|
||||
namespace Content.Server.GameObjects.Components.Botany
|
||||
{
|
||||
[RegisterComponent]
|
||||
public class ShovelComponent : Component
|
||||
{
|
||||
public override string Name => "Shovel";
|
||||
}
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
using Robust.Shared.GameObjects;
|
||||
|
||||
namespace Content.Server.GameObjects.Components.Chemistry
|
||||
{
|
||||
[RegisterComponent]
|
||||
public class GlassBeakerComponent : Component
|
||||
{
|
||||
public override string Name => "GlassBeaker";
|
||||
}
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
using Robust.Shared.GameObjects;
|
||||
|
||||
namespace Content.Server.GameObjects.Components.Conveyor
|
||||
{
|
||||
/// <summary>
|
||||
/// Dummy component for construction graph
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public class ConveyorAssemblyComponent : Component
|
||||
{
|
||||
public override string Name => "ConveyorAssembly";
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
using Robust.Shared.GameObjects;
|
||||
|
||||
|
||||
namespace Content.Server.GameObjects.Components.Items
|
||||
{
|
||||
[RegisterComponent]
|
||||
class FirelockElectronics : Component
|
||||
{
|
||||
public override string Name => "FirelockElectronics";
|
||||
}
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
using Robust.Shared.GameObjects;
|
||||
|
||||
namespace Content.Server.GameObjects.Components.Kitchen
|
||||
{
|
||||
/// <summary>
|
||||
/// Tag component that denotes an entity as Grindable by the reagentgrinder.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public class GrindableComponent : Component
|
||||
{
|
||||
public override string Name => "Grindable";
|
||||
}
|
||||
}
|
||||
@@ -9,6 +9,7 @@ using Content.Server.GameObjects.Components.Power.ApcNetComponents;
|
||||
using Content.Server.Interfaces.GameObjects.Components.Items;
|
||||
using Content.Server.Utility;
|
||||
using Content.Shared.Chemistry;
|
||||
using Content.Shared.GameObjects.Components.Tag;
|
||||
using Content.Shared.Interfaces;
|
||||
using Content.Shared.Interfaces.GameObjects.Components;
|
||||
using Content.Shared.Kitchen;
|
||||
@@ -197,7 +198,7 @@ namespace Content.Server.GameObjects.Components.Kitchen
|
||||
foreach (var entity in _chamber.ContainedEntities)
|
||||
{
|
||||
if (!canJuice && entity.HasComponent<JuiceableComponent>()) canJuice = true;
|
||||
if (!canGrind && entity.HasComponent<GrindableComponent>()) canGrind = true;
|
||||
if (!canGrind && entity.HasTag("Grindable")) canGrind = true;
|
||||
if (canJuice && canGrind) break;
|
||||
}
|
||||
}
|
||||
@@ -287,7 +288,7 @@ namespace Content.Server.GameObjects.Components.Kitchen
|
||||
}
|
||||
|
||||
//Next, see if the user is trying to insert something they want to be ground/juiced.
|
||||
if(!heldEnt.TryGetComponent(out GrindableComponent? grind) && !heldEnt.TryGetComponent(out JuiceableComponent? juice))
|
||||
if(!heldEnt.HasTag("Grindable") && !heldEnt.TryGetComponent(out JuiceableComponent? juice))
|
||||
{
|
||||
//Entity did NOT pass the whitelist for grind/juice.
|
||||
//Wouldn't want the clown grinding up the Captain's ID card now would you?
|
||||
@@ -333,7 +334,7 @@ namespace Content.Server.GameObjects.Components.Kitchen
|
||||
{
|
||||
foreach (var item in _chamber.ContainedEntities.ToList())
|
||||
{
|
||||
if (!item.HasComponent<GrindableComponent>()) continue;
|
||||
if (!item.HasTag("Grindable")) continue;
|
||||
if (!item.TryGetComponent<SolutionContainerComponent>(out var solution)) continue;
|
||||
if (_heldBeaker.CurrentVolume + solution.CurrentVolume > _heldBeaker.MaxVolume) continue;
|
||||
_heldBeaker.TryAddSolution(solution.Solution);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#nullable enable
|
||||
#nullable enable
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
@@ -13,6 +13,7 @@ using Content.Server.Interfaces.GameObjects.Components.Items;
|
||||
using Content.Server.Interfaces.PDA;
|
||||
using Content.Server.Utility;
|
||||
using Content.Shared.GameObjects.Components.PDA;
|
||||
using Content.Shared.GameObjects.Components.Tag;
|
||||
using Content.Shared.GameObjects.EntitySystems.ActionBlocker;
|
||||
using Content.Shared.GameObjects.Verbs;
|
||||
using Content.Shared.Interfaces;
|
||||
@@ -262,7 +263,7 @@ namespace Content.Server.GameObjects.Components.PDA
|
||||
return TryInsertIdCard(eventArgs, idCardComponent);
|
||||
}
|
||||
|
||||
if (item.HasComponent<WriteComponent>())
|
||||
if (item.HasTag("Write"))
|
||||
{
|
||||
return TryInsertPen(eventArgs);
|
||||
}
|
||||
|
||||
@@ -1,7 +1,8 @@
|
||||
#nullable enable
|
||||
#nullable enable
|
||||
using System.Threading.Tasks;
|
||||
using Content.Server.Utility;
|
||||
using Content.Shared.GameObjects.Components;
|
||||
using Content.Shared.GameObjects.Components.Tag;
|
||||
using Content.Shared.GameObjects.EntitySystems;
|
||||
using Content.Shared.Interfaces.GameObjects.Components;
|
||||
using Robust.Server.GameObjects;
|
||||
@@ -74,7 +75,7 @@ namespace Content.Server.GameObjects.Components.Paper
|
||||
|
||||
async Task<bool> IInteractUsing.InteractUsing(InteractUsingEventArgs eventArgs)
|
||||
{
|
||||
if (!eventArgs.Using.HasComponent<WriteComponent>())
|
||||
if (!eventArgs.Using.HasTag("Write"))
|
||||
return false;
|
||||
if (!eventArgs.User.TryGetComponent(out IActorComponent? actor))
|
||||
return false;
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
using Robust.Shared.GameObjects;
|
||||
|
||||
namespace Content.Server.GameObjects.Components.Paper
|
||||
{
|
||||
[RegisterComponent]
|
||||
public class WriteComponent : Component
|
||||
{
|
||||
public override string Name => "Write";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user