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:
Swept
2021-02-23 07:48:57 +00:00
committed by GitHub
parent 898996abe9
commit e05698c027
28 changed files with 105 additions and 153 deletions

View File

@@ -1,10 +0,0 @@
using Robust.Shared.GameObjects;
namespace Content.Server.GameObjects.Components.Botany
{
[RegisterComponent]
public class BotanySharpComponent : Component
{
public override string Name => "BotanySharp";
}
}

View File

@@ -1,10 +0,0 @@
using Robust.Shared.GameObjects;
namespace Content.Server.GameObjects.Components.Botany
{
[RegisterComponent]
public class HoeComponent : Component
{
public override string Name => "Hoe";
}
}

View File

@@ -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++)
{

View File

@@ -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);
}

View File

@@ -1,10 +0,0 @@
using Robust.Shared.GameObjects;
namespace Content.Server.GameObjects.Components.Botany
{
[RegisterComponent]
public class PlantSampleTakerComponent : Component
{
public override string Name => "PlantSampleTaker";
}
}

View File

@@ -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";
}
}