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,9 +1,10 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Content.Server.GameObjects.Components.Botany;
|
||||
using Content.Server.GameObjects.EntitySystems;
|
||||
using Content.Shared.Atmos;
|
||||
using Content.Shared.GameObjects.Components.Tag;
|
||||
using Content.Shared.Interfaces;
|
||||
using Content.Shared.Utility;
|
||||
using Robust.Server.GameObjects;
|
||||
@@ -347,7 +348,7 @@ namespace Content.Server.Botany
|
||||
|
||||
public bool CheckHarvest(IEntity user, IEntity held = null)
|
||||
{
|
||||
return (!Ligneous || (Ligneous && held != null && held.HasComponent<BotanySharpComponent>()));
|
||||
return (!Ligneous || (Ligneous && held != null && held.HasTag("BotanySharp")));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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";
|
||||
}
|
||||
}
|
||||
@@ -46,11 +46,13 @@
|
||||
suffix: assembly
|
||||
description: A conveyor belt assembly. Used to construct a conveyor belt.
|
||||
components:
|
||||
- type: Tag
|
||||
tags:
|
||||
- ConveyorAssembly
|
||||
- type: Sprite
|
||||
netsync: false
|
||||
sprite: Constructible/Power/conveyor.rsi
|
||||
state: conveyor_loose
|
||||
- type: ConveyorAssembly
|
||||
- type: Construction
|
||||
graph: ConveyorGraph
|
||||
node: item
|
||||
|
||||
@@ -4,6 +4,9 @@
|
||||
id: FoodBase
|
||||
abstract: true
|
||||
components:
|
||||
- type: Tag
|
||||
tags:
|
||||
- Grindable
|
||||
- type: Food
|
||||
- type: LoopingSound
|
||||
- type: SolutionContainer
|
||||
@@ -11,7 +14,6 @@
|
||||
- type: Sprite
|
||||
state: icon
|
||||
netsync: false
|
||||
- type: Grindable
|
||||
|
||||
# Only use visualizer if there's multiple steps available
|
||||
# - type: Appearance
|
||||
|
||||
@@ -4,7 +4,9 @@
|
||||
name: Firelock Electronics
|
||||
description: Advanced circuit board used to detect differences in pressure, temperature and gas concentrations between the two sides of the door.
|
||||
components:
|
||||
- type: Tag
|
||||
tags:
|
||||
- FirelockElectronics
|
||||
- type: Sprite
|
||||
sprite: Constructible/Misc/module.rsi
|
||||
state: mainboard
|
||||
- type: FirelockElectronics
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
layers:
|
||||
- state: paper_words
|
||||
- state: paper
|
||||
|
||||
- type: Paper
|
||||
- type: UserInterface
|
||||
interfaces:
|
||||
@@ -22,8 +21,9 @@
|
||||
id: Pen
|
||||
description: 'A dark ink pen.'
|
||||
components:
|
||||
- type: Tag
|
||||
tags:
|
||||
- Write
|
||||
- type: Sprite
|
||||
sprite: Objects/Misc/bureaucracy.rsi
|
||||
state: pen
|
||||
|
||||
- type: Write
|
||||
|
||||
@@ -12,9 +12,11 @@
|
||||
name: fork
|
||||
description: An eating utensil, perfect for stabbing.
|
||||
components:
|
||||
- type: Tag
|
||||
tags:
|
||||
- Hoe
|
||||
- type: Sprite
|
||||
state: fork
|
||||
- type: Hoe
|
||||
- type: Utensil
|
||||
types:
|
||||
- Fork
|
||||
@@ -27,7 +29,6 @@
|
||||
components:
|
||||
- type: Sprite
|
||||
state: plastic_fork
|
||||
|
||||
- type: Utensil
|
||||
types:
|
||||
- Fork
|
||||
@@ -41,7 +42,6 @@
|
||||
components:
|
||||
- type: Sprite
|
||||
state: spoon
|
||||
|
||||
- type: Utensil
|
||||
types:
|
||||
- Spoon
|
||||
@@ -54,7 +54,6 @@
|
||||
components:
|
||||
- type: Sprite
|
||||
state: plastic_spoon
|
||||
|
||||
- type: Utensil
|
||||
types:
|
||||
- Spoon
|
||||
@@ -68,7 +67,6 @@
|
||||
components:
|
||||
- type: Sprite
|
||||
state: plastic_knife
|
||||
|
||||
- type: Utensil
|
||||
types:
|
||||
- Knife
|
||||
|
||||
@@ -4,6 +4,9 @@
|
||||
id: HydroponicsToolMiniHoe
|
||||
description: It's used for removing weeds or scratching your back.
|
||||
components:
|
||||
- type: Tag
|
||||
tags:
|
||||
- Hoe
|
||||
- type: Sprite
|
||||
sprite: Objects/Tools/Hydroponics/hoe.rsi
|
||||
state: icon
|
||||
@@ -11,7 +14,6 @@
|
||||
- type: MeleeWeapon
|
||||
- type: Item
|
||||
sprite: Objects/Tools/Hydroponics/hoe.rsi
|
||||
- type: Hoe
|
||||
|
||||
- type: entity
|
||||
name: scythe
|
||||
@@ -19,12 +21,14 @@
|
||||
id: HydroponicsToolScythe
|
||||
description: A sharp and curved blade on a long fibremetal handle, this tool makes it easy to reap what you sow.
|
||||
components:
|
||||
- type: Tag
|
||||
tags:
|
||||
- BotanySharp
|
||||
- type: Sprite
|
||||
sprite: Objects/Tools/Hydroponics/scythe.rsi
|
||||
state: icon
|
||||
- type: ItemCooldown
|
||||
- type: MeleeWeapon
|
||||
- type: BotanySharp
|
||||
- type: Item
|
||||
sprite: Objects/Tools/Hydroponics/scythe.rsi
|
||||
|
||||
@@ -34,12 +38,14 @@
|
||||
id: HydroponicsToolHatchet
|
||||
description: A very sharp axe blade upon a short fibremetal handle. It has a long history of chopping things, but now it is used for chopping wood.
|
||||
components:
|
||||
- type: Tag
|
||||
tags:
|
||||
- BotanySharp
|
||||
- type: Sprite
|
||||
sprite: Objects/Tools/Hydroponics/hatchet.rsi
|
||||
state: icon
|
||||
- type: ItemCooldown
|
||||
- type: MeleeWeapon
|
||||
- type: BotanySharp
|
||||
- type: Item
|
||||
sprite: Objects/Tools/Hydroponics/hatchet.rsi
|
||||
|
||||
@@ -49,11 +55,13 @@
|
||||
id: Spade
|
||||
description: A small tool for digging and moving dirt.
|
||||
components:
|
||||
- type: Tag
|
||||
tags:
|
||||
- Shovel
|
||||
- type: Sprite
|
||||
sprite: Objects/Tools/Hydroponics/spade.rsi
|
||||
state: icon
|
||||
- type: ItemCooldown
|
||||
- type: MeleeWeapon
|
||||
- type: Shovel
|
||||
- type: Item
|
||||
sprite: Objects/Tools/Hydroponics/spade.rsi
|
||||
|
||||
@@ -5,6 +5,9 @@
|
||||
description: Used to contain a moderate amount of chemicals and solutions.
|
||||
id: Beaker
|
||||
components:
|
||||
- type: Tag
|
||||
tags:
|
||||
- GlassBeaker
|
||||
- type: Sprite
|
||||
sprite: Objects/Specific/Chemistry/beakers.rsi
|
||||
state: beaker
|
||||
@@ -18,28 +21,22 @@
|
||||
- type: SolutionTransfer
|
||||
transferAmount: 5.0
|
||||
- type: Spillable
|
||||
- type: GlassBeaker
|
||||
|
||||
- type: entity
|
||||
name: large beaker
|
||||
parent: BaseItem
|
||||
parent: Beaker
|
||||
description: Used to contain a large amount of chemicals or solutions.
|
||||
id: LargeBeaker
|
||||
components:
|
||||
- type: Sprite
|
||||
sprite: Objects/Specific/Chemistry/beakers.rsi
|
||||
state: beakerlarge
|
||||
- type: Item
|
||||
sprite: Objects/Specific/Chemistry/beakers.rsi
|
||||
HeldPrefix: beaker
|
||||
- type: SolutionContainer
|
||||
fillingState: beakerlarge
|
||||
maxVol: 100
|
||||
caps: OpenContainer, FitsInDispenser
|
||||
- type: SolutionTransfer
|
||||
transferAmount: 5.0
|
||||
- type: Spillable
|
||||
- type: GlassBeaker
|
||||
|
||||
- type: entity
|
||||
name: dropper
|
||||
|
||||
@@ -4,6 +4,9 @@
|
||||
id: Haycutters
|
||||
description: This kills the wire. Moo!
|
||||
components:
|
||||
- type: Tag
|
||||
tags:
|
||||
- PlantSampleTaker
|
||||
- type: Sprite
|
||||
sprite: Objects/Tools/Cowtools/haycutters.rsi
|
||||
state: haycutters
|
||||
@@ -16,7 +19,6 @@
|
||||
speed: 0.05
|
||||
- type: Item
|
||||
sprite: Objects/Tools/Cowtools/haycutters.rsi
|
||||
- type: PlantSampleTaker
|
||||
|
||||
- type: entity
|
||||
name: moodriver
|
||||
@@ -174,3 +176,5 @@
|
||||
- name: Mooltitool
|
||||
- name: Cowelder
|
||||
- name: Milkalyzer
|
||||
|
||||
# I hate these fucking cowtools I hope the burn in hell -Swept
|
||||
|
||||
@@ -4,6 +4,9 @@
|
||||
id: Wirecutter
|
||||
description: This kills the wire.
|
||||
components:
|
||||
- type: Tag
|
||||
tags:
|
||||
- PlantSampleTaker
|
||||
- type: Sprite
|
||||
sprite: Objects/Tools/wirecutters.rsi
|
||||
layers:
|
||||
@@ -27,7 +30,6 @@
|
||||
yellow: "#d58c18"
|
||||
- type: Item
|
||||
sprite: Objects/Tools/wirecutters.rsi
|
||||
- type: PlantSampleTaker
|
||||
|
||||
- type: entity
|
||||
name: screwdriver
|
||||
@@ -201,11 +203,13 @@
|
||||
id: Shovel
|
||||
description: A large tool for digging and moving dirt.
|
||||
components:
|
||||
- type: Tag
|
||||
tags:
|
||||
- Shovel
|
||||
- type: Sprite
|
||||
sprite: Objects/Tools/Hydroponics/shovel.rsi
|
||||
state: icon
|
||||
- type: ItemCooldown
|
||||
- type: MeleeWeapon
|
||||
- type: Shovel
|
||||
- type: Item
|
||||
sprite: Objects/Tools/Hydroponics/shovel.rsi
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
edges:
|
||||
- to: entity
|
||||
steps:
|
||||
- component: ConveyorAssembly
|
||||
# Replace with tag ASAP
|
||||
- prototype: ConveyorAssembly
|
||||
icon:
|
||||
sprite: Constructible/Power/conveyor.rsi
|
||||
state: conveyor_loose
|
||||
|
||||
@@ -50,8 +50,7 @@
|
||||
- !type:EntityAnchored
|
||||
anchored: true
|
||||
steps:
|
||||
- component: FirelockElectronics
|
||||
store: Firelock Electronics
|
||||
- prototype: FirelockElectronics
|
||||
name: Firelock Electronics
|
||||
icon:
|
||||
sprite: "Constructible/Misc/module.rsi"
|
||||
|
||||
@@ -1,11 +1,38 @@
|
||||
- type: Tag
|
||||
id: BotanySharp
|
||||
|
||||
- type: Tag
|
||||
id: ConveyorAssembly
|
||||
|
||||
- type: Tag
|
||||
id: ExplosivePassable
|
||||
|
||||
- type: Tag
|
||||
id: FirelockElectronics
|
||||
|
||||
- type: Tag
|
||||
id: FootstepSound
|
||||
|
||||
- type: Tag
|
||||
id: GlassBeaker
|
||||
|
||||
- type: Tag
|
||||
id: Grindable
|
||||
|
||||
- type: Tag
|
||||
id: Hoe
|
||||
|
||||
- type: Tag
|
||||
id: PlantSampleTaker
|
||||
|
||||
- type: Tag
|
||||
id: Shovel
|
||||
|
||||
- type: Tag
|
||||
id: Teleportable
|
||||
|
||||
- type: Tag
|
||||
id: Wall
|
||||
|
||||
- type: Tag
|
||||
id: Teleportable
|
||||
|
||||
- type: Tag
|
||||
id: FootstepSound
|
||||
id: Write
|
||||
|
||||
Reference in New Issue
Block a user