Use automatic component registration.

This commit is contained in:
Pieter-Jan Briers
2019-07-31 15:02:36 +02:00
parent a90d7a645c
commit ceb8cc8421
94 changed files with 353 additions and 540 deletions

View File

@@ -1,8 +1,11 @@
using Content.Shared.GameObjects.Components.Mobs;
using Robust.Shared.GameObjects;
using Robust.Shared.Maths;
namespace Content.Server.GameObjects.Components.Mobs
{
[RegisterComponent]
[ComponentReference(typeof(SharedCameraRecoilComponent))]
public sealed class CameraRecoilComponent : SharedCameraRecoilComponent
{
public override void Kick(Vector2 recoil)

View File

@@ -8,6 +8,7 @@ namespace Content.Server.GameObjects.Components.Mobs
/// This is used to differentiate between regular item interactions or
/// using *everything* as a weapon.
/// </summary>
[RegisterComponent]
public sealed class CombatModeComponent : Component
{
public override string Name => "CombatMode";

View File

@@ -1,9 +1,10 @@
using System;
using Robust.Shared.GameObjects;
using Content.Shared.GameObjects.Components.Inventory;
using Robust.Shared.GameObjects;
namespace Content.Server.GameObjects
{
[RegisterComponent]
public class HeatResistanceComponent : Component
{
public override string Name => "HeatResistance";

View File

@@ -1,14 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Content.Server.Mobs;
using Robust.Server.GameObjects;
using Content.Server.Mobs;
using Robust.Shared.GameObjects;
using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Interfaces.Network;
using Robust.Shared.Log;
using Robust.Shared.ViewVariables;
namespace Content.Server.GameObjects.Components.Mobs
@@ -16,6 +8,7 @@ namespace Content.Server.GameObjects.Components.Mobs
/// <summary>
/// Stores a <see cref="Server.Mobs.Mind"/> on a mob.
/// </summary>
[RegisterComponent]
public class MindComponent : Component
{
/// <inheritdoc />

View File

@@ -12,6 +12,7 @@ using Robust.Shared.Serialization;
namespace Content.Server.GameObjects
{
[RegisterComponent]
public class SpeciesComponent : SharedSpeciesComponent, IActionBlocker, IOnDamageBehavior, IExAct
{
/// <summary>