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,73 +1,22 @@
using Content.Server.Chat;
using Content.Server.GameObjects;
using Content.Server.GameObjects.Components;
using Content.Server.GameObjects.Components.Power;
using Content.Server.GameObjects.Components.Interactable.Tools;
using Content.Server.Interfaces.GameObjects;
using Content.Server.Placement;
using Robust.Server;
using Robust.Server.Interfaces;
using Robust.Server.Interfaces.Maps;
using Robust.Server.Interfaces.Player;
using Robust.Server.Player;
using Robust.Shared.Console;
using Robust.Shared.ContentPack;
using Robust.Shared.Enums;
using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Interfaces.Map;
using Robust.Shared.Interfaces.Timers;
using Robust.Shared.IoC;
using Robust.Shared.Log;
using Robust.Shared.Map;
using Robust.Shared.Timers;
using Robust.Shared.Interfaces.Timing;
using Robust.Shared.Maths;
using Content.Server.GameObjects.Components.Weapon.Ranged.Hitscan;
using Content.Server.GameObjects.Components.Weapon.Ranged.Projectile;
using Content.Server.GameObjects.Components.Projectiles;
using Content.Server.GameObjects.Components.Weapon.Melee;
using Content.Server.GameObjects.Components.Stack;
using Content.Server.GameObjects.Components.Construction;
using Content.Server.GameObjects.Components.Mobs;
using Content.Server.GameObjects.EntitySystems;
using Content.Server.Mobs;
using Content.Server.Players;
using Content.Server.GameObjects.Components.Interactable;
using Content.Server.GameObjects.Components.Markers;
using Content.Server.GameObjects.Components.Sound;
using Content.Server.GameObjects.Components.Weapon.Ranged;
using Content.Server.GameTicking;
using Content.Server.Interfaces;
using Content.Server.Interfaces.GameTicking;
using Content.Shared.GameObjects.Components.Chemistry;
using Content.Shared.GameObjects.Components.Materials;
using Content.Shared.GameObjects.Components.Inventory;
using Content.Shared.GameObjects.Components.Markers;
using Content.Shared.GameObjects.Components.Mobs;
using Content.Shared.Interfaces;
using Robust.Server.Interfaces.ServerStatus;
using Robust.Shared.Timing;
using Content.Server.GameObjects.Components.Destructible;
using Content.Server.GameObjects.Components.Items.Storage;
using Content.Server.GameObjects.Components.Items.Storage.Fill;
using Content.Server.GameObjects.Components.Movement;
using Content.Server.Interfaces.Chat;
using Content.Server.Interfaces.GameObjects.Components.Movement;
using Content.Server.GameObjects.Components.Research;
using Content.Shared.GameObjects.Components.Research;
using Content.Server.Interfaces.GameTicking;
using Content.Shared.Interfaces;
using Robust.Server.Interfaces.Player;
using Robust.Shared.ContentPack;
using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Interfaces.Log;
using Content.Server.GameObjects.Components.Explosive;
using Content.Server.GameObjects.Components.Items;
using Content.Server.GameObjects.Components.Triggers;
using Content.Shared.GameObjects.Components.Movement;
using SolutionComponent = Content.Server.GameObjects.Components.Chemistry.SolutionComponent;
using Robust.Shared.IoC;
using Robust.Shared.Log;
using Robust.Shared.Timing;
namespace Content.Server
{
public class EntryPoint : GameServer
{
private IGameTicker _gameTicker;
private IMoMMILink _mommiLink;
private StatusShell _statusShell;
/// <inheritdoc />
@@ -77,129 +26,19 @@ namespace Content.Server
var factory = IoCManager.Resolve<IComponentFactory>();
factory.Register<HandsComponent>();
factory.RegisterReference<HandsComponent, IHandsComponent>();
factory.DoAutoRegistrations();
factory.Register<InventoryComponent>();
var registerIgnore = new[]
{
"ConstructionGhost",
"IconSmooth",
"SubFloorHide"
};
factory.Register<StoreableComponent>();
factory.Register<ItemComponent>();
factory.RegisterReference<ItemComponent, StoreableComponent>();
factory.Register<ClothingComponent>();
factory.RegisterReference<ClothingComponent, ItemComponent>();
factory.RegisterReference<ClothingComponent, StoreableComponent>();
factory.Register<PlaceableSurfaceComponent>();
factory.Register<DamageableComponent>();
factory.Register<DestructibleComponent>();
factory.Register<TemperatureComponent>();
factory.Register<ServerDoorComponent>();
factory.RegisterReference<ServerDoorComponent, IActivate>();
factory.Register<Content.Server.GameObjects.Components.Chemistry.SolutionComponent>();
//Power Components
factory.Register<PowerTransferComponent>();
factory.Register<PowerProviderComponent>();
factory.RegisterReference<PowerProviderComponent, PowerDeviceComponent>();
factory.Register<PowerNodeComponent>();
factory.Register<PowerStorageNetComponent>();
factory.RegisterReference<PowerStorageNetComponent, PowerStorageComponent>();
factory.Register<PowerCellComponent>();
factory.RegisterReference<PowerCellComponent, PowerStorageComponent>();
factory.Register<PowerDeviceComponent>();
factory.Register<PowerGeneratorComponent>();
factory.Register<LightBulbComponent>();
//Tools
factory.Register<MultitoolComponent>();
factory.Register<WirecutterComponent>();
factory.Register<WrenchComponent>();
factory.Register<WelderComponent>();
factory.Register<ScrewdriverComponent>();
factory.Register<CrowbarComponent>();
factory.Register<HitscanWeaponComponent>();
factory.Register<RangedWeaponComponent>();
factory.Register<BallisticMagazineWeaponComponent>();
factory.Register<ProjectileComponent>();
factory.Register<ThrownItemComponent>();
factory.Register<MeleeWeaponComponent>();
factory.Register<HealingComponent>();
factory.Register<SoundComponent>();
factory.Register<HandheldLightComponent>();
factory.Register<ServerStorageComponent>();
factory.RegisterReference<ServerStorageComponent, IStorageComponent>();
factory.RegisterReference<ServerStorageComponent, IActivate>();
factory.Register<EntityStorageComponent>();
factory.RegisterReference<EntityStorageComponent, IStorageComponent>();
factory.RegisterReference<EntityStorageComponent, IActivate>();
factory.Register<ToolLockerFillComponent>();
factory.Register<ToolboxElectricalFillComponent>();
factory.Register<PowerDebugTool>();
factory.Register<PoweredLightComponent>();
factory.Register<SmesComponent>();
factory.Register<ApcComponent>();
factory.RegisterReference<ApcComponent, IActivate>();
factory.Register<MaterialComponent>();
factory.Register<StackComponent>();
factory.Register<MaterialStorageComponent>();
factory.RegisterReference<MaterialStorageComponent, SharedMaterialStorageComponent>();
factory.Register<ConstructionComponent>();
factory.Register<ConstructorComponent>();
factory.RegisterIgnore("ConstructionGhost");
factory.Register<MindComponent>();
factory.Register<SpeciesComponent>();
factory.Register<HeatResistanceComponent>();
factory.Register<SpawnPointComponent>();
factory.RegisterReference<SpawnPointComponent, SharedSpawnPointComponent>();
factory.Register<LatheComponent>();
factory.RegisterReference<LatheComponent, IActivate>();
factory.Register<LatheDatabaseComponent>();
factory.RegisterReference<LatheDatabaseComponent, SharedLatheDatabaseComponent>();
factory.Register<BallisticBulletComponent>();
factory.Register<BallisticMagazineComponent>();
factory.Register<HitscanWeaponCapacitorComponent>();
factory.Register<CameraRecoilComponent>();
factory.RegisterReference<CameraRecoilComponent, SharedCameraRecoilComponent>();
factory.RegisterIgnore("IconSmooth");
factory.RegisterIgnore("SubFloorHide");
factory.Register<PlayerInputMoverComponent>();
factory.RegisterReference<PlayerInputMoverComponent, IMoverComponent>();
factory.Register<AiControllerComponent>();
factory.Register<ServerPortalComponent>();
factory.Register<ServerTeleporterComponent>();
factory.Register<TeleportableComponent>();
factory.Register<CatwalkComponent>();
factory.Register<DiceComponent>();
factory.Register<ExplosiveComponent>();
factory.Register<OnUseTimerTriggerComponent>();
factory.Register<FootstepModifierComponent>();
factory.Register<EmitSoundOnUseComponent>();
factory.Register<CombatModeComponent>();
factory.Register<ExaminerComponent>();
foreach (var ignoreName in registerIgnore)
{
factory.RegisterIgnore(ignoreName);
}
IoCManager.Register<ISharedNotifyManager, ServerNotifyManager>();
IoCManager.Register<IServerNotifyManager, ServerNotifyManager>();
@@ -218,8 +57,6 @@ namespace Content.Server
IoCManager.Resolve<IServerNotifyManager>().Initialize();
IoCManager.Resolve<IChatManager>().Initialize();
_mommiLink = IoCManager.Resolve<IMoMMILink>();
var playerManager = IoCManager.Resolve<IPlayerManager>();
_statusShell = new StatusShell();

View File

@@ -5,6 +5,7 @@ namespace Content.Server.GameObjects.Components
/// <summary>
/// Literally just a marker component for footsteps for now.
/// </summary>
[RegisterComponent]
public sealed class CatwalkComponent : Component
{
public override string Name => "Catwalk";

View File

@@ -1,6 +1,7 @@
using System;
using Content.Shared.Chemistry;
using Content.Shared.GameObjects;
using Robust.Shared.GameObjects;
using Robust.Shared.Interfaces.GameObjects;
namespace Content.Server.GameObjects.Components.Chemistry
@@ -8,6 +9,7 @@ namespace Content.Server.GameObjects.Components.Chemistry
/// <summary>
/// Shared ECS component that manages a liquid solution of reagents.
/// </summary>
[RegisterComponent]
internal class SolutionComponent : Shared.GameObjects.Components.Chemistry.SolutionComponent
{
/// <summary>
@@ -131,7 +133,7 @@ namespace Content.Server.GameObjects.Components.Chemistry
// pulling from an empty container, pointless to continue
if (transferQuantity <= 0)
return;
var transferSolution = component.SplitSolution(transferQuantity);
handSolutionComp.TryAddSolution(transferSolution);
}

View File

@@ -17,6 +17,7 @@ using static Content.Shared.Construction.ConstructionStepTool;
namespace Content.Server.GameObjects.Components.Construction
{
[RegisterComponent]
public class ConstructionComponent : Component, IAttackBy
{
public override string Name => "Construction";

View File

@@ -3,13 +3,11 @@ using Content.Server.GameObjects.Components.Stack;
using Content.Server.GameObjects.EntitySystems;
using Content.Shared.Construction;
using Content.Shared.GameObjects.Components.Construction;
using Robust.Server.GameObjects;
using Robust.Server.GameObjects.EntitySystems;
using Robust.Server.Interfaces.GameObjects;
using Robust.Shared.GameObjects;
using Robust.Shared.Interfaces.Map;
using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Interfaces.GameObjects.Components;
using Robust.Shared.Interfaces.Map;
using Robust.Shared.Interfaces.Network;
using Robust.Shared.IoC;
using Robust.Shared.Map;
@@ -18,6 +16,7 @@ using Robust.Shared.Prototypes;
namespace Content.Server.GameObjects.Components.Construction
{
[RegisterComponent]
public class ConstructorComponent : SharedConstructorComponent
{
#pragma warning disable 649

View File

@@ -1,12 +1,9 @@
using Content.Server.Interfaces.GameObjects;
using System;
using System;
using System.Collections.Generic;
using Robust.Shared.Maths;
using Robust.Shared.GameObjects;
using Robust.Shared.Utility;
using YamlDotNet.RepresentationModel;
using Content.Server.Interfaces;
using Content.Server.Interfaces.GameObjects;
using Content.Shared.GameObjects;
using Robust.Shared.GameObjects;
using Robust.Shared.Serialization;
using Robust.Shared.ViewVariables;
@@ -18,6 +15,7 @@ namespace Content.Server.GameObjects
/// A component that handles receiving damage and healing,
/// as well as informing other components of it.
/// </summary>
[RegisterComponent]
public class DamageableComponent : SharedDamageableComponent, IDamageableComponent
{
/// <inheritdoc />

View File

@@ -1,21 +1,21 @@
using System;
using System.Collections.Generic;
using Content.Server.GameObjects.EntitySystems;
using Content.Server.Interfaces;
using Content.Shared.GameObjects;
using Robust.Shared.GameObjects;
using Robust.Shared.Serialization;
using Robust.Shared.ViewVariables;
using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Log;
using Robust.Shared.Maths;
using Content.Server.Interfaces;
using Content.Server.GameObjects.EntitySystems;
using Content.Shared.GameObjects;
using Robust.Shared.Serialization;
using Robust.Shared.ViewVariables;
namespace Content.Server.GameObjects.Components.Destructible
{
/// <summary>
/// Deletes the entity once a certain damage threshold has been reached.
/// </summary>
[RegisterComponent]
public class DestructibleComponent : Component, IOnDamageBehavior, IDestroyAct, IExAct
{
#pragma warning disable 649
@@ -63,7 +63,7 @@ namespace Content.Server.GameObjects.Components.Destructible
/// <inheritdoc />
void IOnDamageBehavior.OnDamageThresholdPassed(object obj, DamageThresholdPassedEventArgs e)
{
{
if (e.Passed && e.DamageThreshold == Threshold && destroyed == false)
{
destroyed = true;

View File

@@ -10,6 +10,8 @@ using Robust.Shared.Timers;
namespace Content.Server.GameObjects
{
[RegisterComponent]
[ComponentReference(typeof(IActivate))]
public class ServerDoorComponent : Component, IActivate
{
public override string Name => "Door";

View File

@@ -1,28 +1,27 @@
using System;
using System.Linq;
using System.Collections.Generic;
using Content.Server.GameObjects.Components.Mobs;
using Robust.Server.Interfaces.GameObjects;
using Content.Server.GameObjects.EntitySystems;
using Content.Shared.Maps;
using Robust.Server.GameObjects.EntitySystems;
using Robust.Shared.GameObjects.EntitySystemMessages;
using Robust.Server.Interfaces.GameObjects;
using Robust.Server.Interfaces.Player;
using Robust.Shared.GameObjects;
using Robust.Shared.Interfaces.Timing;
using Robust.Shared.Interfaces.Map;
using Robust.Shared.GameObjects.EntitySystemMessages;
using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Interfaces.Map;
using Robust.Shared.Interfaces.Timing;
using Robust.Shared.IoC;
using Robust.Shared.Map;
using Robust.Shared.Maths;
using Robust.Shared.Serialization;
using Content.Server.GameObjects.EntitySystems;
using Content.Shared.GameObjects;
using Content.Shared.Maps;
using Robust.Server.Interfaces.Player;
namespace Content.Server.GameObjects.Components.Explosive
{
[RegisterComponent]
public class ExplosiveComponent : Component, ITimerTrigger, IDestroyAct
{
#pragma warning disable 649
#pragma warning disable 649
[Dependency] private readonly ITileDefinitionManager _tileDefinitionManager;
[Dependency] private readonly IMapManager _mapManager;
[Dependency] private readonly IServerEntityManager _serverEntityManager;
@@ -66,7 +65,7 @@ namespace Content.Server.GameObjects.Components.Explosive
if (distanceFromEntity < DevastationRange)
{
severity = ExplosionSeverity.Destruction;
}
}
else if (distanceFromEntity < HeavyImpactRange)
{
severity = ExplosionSeverity.Heavy;

View File

@@ -5,8 +5,8 @@ using Content.Shared.GameObjects;
using Robust.Server.GameObjects.Components.Container;
using Robust.Server.Interfaces.Player;
using Robust.Shared.GameObjects;
using Robust.Shared.Interfaces.GameObjects.Components;
using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Interfaces.GameObjects.Components;
using Robust.Shared.Interfaces.Network;
using Robust.Shared.IoC;
using Robust.Shared.Utility;
@@ -16,6 +16,7 @@ using static Content.Shared.GameObjects.SharedInventoryComponent.ClientInventory
namespace Content.Server.GameObjects
{
[RegisterComponent]
public class InventoryComponent : SharedInventoryComponent
{
[ViewVariables]

View File

@@ -3,16 +3,12 @@ using System.Collections.Generic;
using Content.Server.GameObjects.EntitySystems;
using Content.Server.Interfaces.GameObjects;
using Content.Shared.GameObjects;
using Content.Shared.Input;
using JetBrains.Annotations;
using Robust.Server.GameObjects;
using Robust.Server.GameObjects.Components.Container;
using Robust.Server.GameObjects.EntitySystemMessages;
using Robust.Server.Interfaces.Player;
using Robust.Shared.GameObjects;
using Robust.Shared.Input;
using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Interfaces.GameObjects.Components;
using Robust.Shared.Interfaces.Network;
using Robust.Shared.IoC;
using Robust.Shared.Log;
@@ -24,6 +20,8 @@ using Robust.Shared.ViewVariables;
namespace Content.Server.GameObjects
{
[RegisterComponent]
[ComponentReference(typeof(IHandsComponent))]
public class HandsComponent : SharedHandsComponent, IHandsComponent
{
#pragma warning disable 649

View File

@@ -1,21 +1,12 @@
using System;
using Content.Server.GameObjects.Components.Stack;
using Robust.Shared.GameObjects;
using Content.Server.GameObjects.Components.Stack;
using Content.Server.GameObjects.EntitySystems;
using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Map;
using Robust.Shared.IoC;
using Robust.Server.GameObjects;
using Robust.Shared.Maths;
using Robust.Server.Interfaces.GameObjects;
using Robust.Shared.Interfaces.Timing;
using Robust.Shared.GameObjects.EntitySystemMessages;
using Robust.Shared.Serialization;
using Robust.Shared.Interfaces.GameObjects.Components;
using Content.Shared.GameObjects;
using Robust.Shared.GameObjects;
using Robust.Shared.Serialization;
namespace Content.Server.GameObjects.Components.Weapon.Melee
{
[RegisterComponent]
public class HealingComponent : Component, IAfterAttack, IUse
{
public override string Name => "Healing";

View File

@@ -16,6 +16,7 @@ namespace Content.Server.GameObjects.Components.Interactable
/// <summary>
/// Component that represents a handheld lightsource which can be toggled on and off.
/// </summary>
[RegisterComponent]
internal class HandheldLightComponent : Component, IUse, IExamine, IAttackBy, IMapInit
{
public const float Wattage = 10;

View File

@@ -1,6 +1,7 @@
using Content.Server.GameObjects.EntitySystems;
using Content.Shared.Maps;
using Robust.Server.GameObjects.EntitySystems;
using Robust.Shared.GameObjects;
using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Interfaces.Map;
using Robust.Shared.IoC;
@@ -8,6 +9,7 @@ using Robust.Shared.Map;
namespace Content.Server.GameObjects.Components.Interactable.Tools
{
[RegisterComponent]
public class CrowbarComponent : ToolComponent, IAfterAttack
{
#pragma warning disable 649

View File

@@ -1,10 +1,13 @@
namespace Content.Server.GameObjects.Components.Interactable.Tools
using Robust.Shared.GameObjects;
namespace Content.Server.GameObjects.Components.Interactable.Tools
{
/// <summary>
/// Tool used for interfacing/hacking into configurable computers
/// </summary>
[RegisterComponent]
public class MultitoolComponent : ToolComponent
{
public override string Name => "Multitool";
}
}
}

View File

@@ -1,5 +1,8 @@
namespace Content.Server.GameObjects.Components.Interactable.Tools
using Robust.Shared.GameObjects;
namespace Content.Server.GameObjects.Components.Interactable.Tools
{
[RegisterComponent]
public class ScrewdriverComponent : ToolComponent
{
/// <summary>
@@ -7,4 +10,4 @@
/// </summary>
public override string Name => "Screwdriver";
}
}
}

View File

@@ -1,12 +1,10 @@
using System;
using System.Text;
using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Utility;
using YamlDotNet.RepresentationModel;
using Robust.Server.GameObjects;
using Content.Server.GameObjects.EntitySystems;
using Robust.Server.GameObjects;
using Robust.Shared.GameObjects;
using Robust.Shared.Maths;
using Robust.Shared.Serialization;
using Robust.Shared.Utility;
using Robust.Shared.ViewVariables;
namespace Content.Server.GameObjects.Components.Interactable.Tools
@@ -14,6 +12,7 @@ namespace Content.Server.GameObjects.Components.Interactable.Tools
/// <summary>
/// Tool used to weld metal together, light things on fire, or melt into constituent parts
/// </summary>
[RegisterComponent]
class WelderComponent : ToolComponent, EntitySystems.IUse, EntitySystems.IExamine
{
SpriteComponent spriteComponent;

View File

@@ -1,10 +1,13 @@
namespace Content.Server.GameObjects.Components.Interactable.Tools
using Robust.Shared.GameObjects;
namespace Content.Server.GameObjects.Components.Interactable.Tools
{
/// <summary>
/// Tool that can be used for some cutting interactions such as wires or hacking
/// </summary>
[RegisterComponent]
public class WirecutterComponent : ToolComponent
{
public override string Name => "Wirecutter";
}
}
}

View File

@@ -1,10 +1,13 @@
namespace Content.Server.GameObjects.Components.Interactable.Tools
using Robust.Shared.GameObjects;
namespace Content.Server.GameObjects.Components.Interactable.Tools
{
/// <summary>
/// Wrenches bolts, and interacts with things that have been bolted
/// </summary>
[RegisterComponent]
public class WrenchComponent : ToolComponent
{
public override string Name => "Wrench";
}
}
}

View File

@@ -1,15 +1,18 @@
using System;
using System.Collections.Generic;
using Content.Server.GameObjects.EntitySystems;
using Content.Shared.GameObjects;
using Content.Shared.GameObjects.Components.Items;
using Robust.Shared.GameObjects;
using Robust.Shared.Serialization;
using System;
using System.Collections.Generic;
using Content.Server.GameObjects.EntitySystems;
using Robust.Shared.Utility;
using static Content.Shared.GameObjects.Components.Inventory.EquipmentSlotDefines;
namespace Content.Server.GameObjects
{
[RegisterComponent]
[ComponentReference(typeof(ItemComponent))]
[ComponentReference(typeof(StoreableComponent))]
public class ClothingComponent : ItemComponent, IUse
{
public override string Name => "Clothing";

View File

@@ -6,7 +6,6 @@ using Robust.Server.GameObjects;
using Robust.Shared.Audio;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Log;
using Robust.Shared.Maths;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization;
@@ -15,6 +14,7 @@ using Robust.Shared.ViewVariables;
namespace Content.Server.GameObjects.Components.Items
{
[RegisterComponent]
public class DiceComponent : Component, IActivate, IUse, ILand, IExamine
{
#pragma warning disable 649

View File

@@ -1,4 +1,9 @@
using Content.Server.GameObjects.EntitySystems;
using System.Linq;
using Content.Server.GameObjects.Components.Items.Storage;
using Content.Server.GameObjects.Components.Sound;
using Content.Server.GameObjects.EntitySystems;
using Content.Shared.GameObjects.Components.Storage;
using Robust.Server.GameObjects;
using Robust.Server.GameObjects.Components.Container;
using Robust.Shared.GameObjects;
using Robust.Shared.Interfaces.GameObjects;
@@ -7,14 +12,12 @@ using Robust.Shared.Interfaces.Network;
using Robust.Shared.Maths;
using Robust.Shared.Serialization;
using Robust.Shared.ViewVariables;
using System.Linq;
using Content.Server.GameObjects.Components.Items.Storage;
using Content.Server.GameObjects.Components.Sound;
using Content.Shared.GameObjects.Components.Storage;
using Robust.Server.GameObjects;
namespace Content.Server.GameObjects.Components
{
[RegisterComponent]
[ComponentReference(typeof(IActivate))]
[ComponentReference(typeof(IStorageComponent))]
public class EntityStorageComponent : Component, IActivate, IStorageComponent
{
public override string Name => "EntityStorage";

View File

@@ -7,6 +7,7 @@ using Robust.Shared.Maths;
namespace Content.Server.GameObjects.Components.Items.Storage.Fill
{
[RegisterComponent]
internal sealed class ToolLockerFillComponent : Component, IMapInit
{
public override string Name => "ToolLockerFill";

View File

@@ -7,6 +7,7 @@ using Robust.Shared.Maths;
namespace Content.Server.GameObjects.Components.Items.Storage.Fill
{
[RegisterComponent]
internal sealed class ToolboxElectricalFillComponent : Component, IMapInit
{
public override string Name => "ToolboxElectricalFill";

View File

@@ -1,17 +1,18 @@
using Content.Server.Interfaces.GameObjects;
using Robust.Server.Interfaces.GameObjects;
using Content.Shared.GameObjects;
using Robust.Shared.Interfaces.GameObjects;
using System;
using Content.Server.GameObjects.EntitySystems;
using Robust.Shared.GameObjects;
using System;
using Content.Server.Interfaces.GameObjects;
using Content.Shared.GameObjects;
using Content.Shared.GameObjects.Components.Items;
using Content.Server.GameObjects.Components;
using Robust.Server.GameObjects;
using Robust.Server.Interfaces.GameObjects;
using Robust.Shared.GameObjects;
using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Maths;
namespace Content.Server.GameObjects
{
[RegisterComponent]
[ComponentReference(typeof(StoreableComponent))]
public class ItemComponent : StoreableComponent, IAttackHand
{
public override string Name => "Item";

View File

@@ -1,32 +1,33 @@
using System.Linq;
using System.Collections.Generic;
using System.Linq;
using Content.Server.GameObjects.Components;
using Content.Server.GameObjects.Components.Items.Storage;
using Content.Server.GameObjects.EntitySystems;
using Content.Shared.GameObjects.Components.Storage;
using Content.Shared.Interfaces;
using Robust.Server.GameObjects;
using Robust.Server.GameObjects.Components.Container;
using Robust.Server.GameObjects.EntitySystemMessages;
using Robust.Server.Interfaces.Player;
using Robust.Server.Player;
using Robust.Shared.Enums;
using Robust.Shared.GameObjects;
using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Interfaces.GameObjects.Components;
using Robust.Shared.Interfaces.Map;
using Robust.Shared.Interfaces.Network;
using Robust.Shared.IoC;
using Robust.Shared.Log;
using Robust.Shared.Serialization;
using System.Collections.Generic;
using Content.Shared.Interfaces;
using Robust.Shared.GameObjects.EntitySystemMessages;
using Robust.Shared.Interfaces.Map;
using Robust.Shared.ViewVariables;
using Content.Server.GameObjects.Components;
using Content.Server.GameObjects.Components.Items.Storage;
using Robust.Server.GameObjects.EntitySystemMessages;
namespace Content.Server.GameObjects
{
/// <summary>
/// Storage component for containing entities within this one, matches a UI on the client which shows stored entities
/// </summary>
[RegisterComponent]
[ComponentReference(typeof(IActivate))]
[ComponentReference(typeof(IStorageComponent))]
public class ServerStorageComponent : SharedStorageComponent, IAttackBy, IUse, IActivate, IStorageComponent, IDestroyAct
{
#pragma warning disable 649
@@ -149,7 +150,7 @@ namespace Content.Server.GameObjects
{
return false;
}
//Check that we can drop the item from our hands first otherwise we obviously cant put it inside
if (CanInsert(hands.GetActiveHand.Owner) && hands.Drop(hands.ActiveIndex))
{

View File

@@ -3,6 +3,7 @@ using Robust.Shared.Serialization;
namespace Content.Server.GameObjects
{
[RegisterComponent]
public class StoreableComponent : Component
{
public override string Name => "Storeable";

View File

@@ -1,4 +1,3 @@
using System;
using Content.Shared.GameObjects.Components.Markers;
using Robust.Shared.GameObjects;
using Robust.Shared.Serialization;
@@ -6,6 +5,8 @@ using Robust.Shared.ViewVariables;
namespace Content.Server.GameObjects.Components.Markers
{
[RegisterComponent]
[ComponentReference(typeof(SharedSpawnPointComponent))]
public sealed class SpawnPointComponent : SharedSpawnPointComponent
{
private SpawnPointType _spawnType;

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>

View File

@@ -5,6 +5,7 @@ using Robust.Shared.Serialization;
namespace Content.Server.GameObjects.Components.Movement
{
[RegisterComponent]
public class AiControllerComponent : Component, IMoverComponent
{
private string _logicName;

View File

@@ -12,6 +12,8 @@ namespace Content.Server.GameObjects.Components.Movement
/// <summary>
/// Moves the entity based on input from a KeyBindingInputComponent.
/// </summary>
[RegisterComponent]
[ComponentReference(typeof(IMoverComponent))]
public class PlayerInputMoverComponent : Component, IMoverComponent
{
private bool _movingUp;

View File

@@ -4,6 +4,7 @@ using Content.Shared.GameObjects.Components.Movement;
using Robust.Server.GameObjects;
using Robust.Server.GameObjects.EntitySystems;
using Robust.Server.Interfaces.GameObjects;
using Robust.Shared.GameObjects;
using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Serialization;
@@ -12,6 +13,7 @@ using Robust.Shared.ViewVariables;
namespace Content.Server.GameObjects.Components.Movement
{
[RegisterComponent]
public class ServerPortalComponent : SharedPortalComponent
{
#pragma warning disable 649

View File

@@ -9,7 +9,6 @@ using Robust.Shared.GameObjects;
using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Interfaces.Map;
using Robust.Shared.IoC;
using Robust.Shared.Log;
using Robust.Shared.Map;
using Robust.Shared.Maths;
using Robust.Shared.Serialization;
@@ -19,6 +18,7 @@ using Robust.Shared.ViewVariables;
namespace Content.Server.GameObjects.Components.Movement
{
[RegisterComponent]
public class ServerTeleporterComponent : Component, IAfterAttack
{
#pragma warning disable 649

View File

@@ -1,8 +1,8 @@
using Robust.Shared.GameObjects;
using Robust.Shared.Log;
namespace Content.Server.GameObjects.Components.Movement
{
[RegisterComponent]
public class TeleportableComponent : Component
{
public override string Name => "Teleportable";

View File

@@ -4,6 +4,7 @@ using Robust.Shared.Serialization;
namespace Content.Server.GameObjects.Components
{
[RegisterComponent]
public class PlaceableSurfaceComponent : Component, IAttackBy
{
public override string Name => "PlaceableSurface";

View File

@@ -3,15 +3,15 @@ using Content.Server.GameObjects.EntitySystems;
using Content.Shared.GameObjects.Components.Power;
using Robust.Server.GameObjects;
using Robust.Server.GameObjects.Components.UserInterface;
using Robust.Server.GameObjects.EntitySystems;
using Robust.Server.Interfaces.GameObjects;
using Robust.Shared.Audio;
using Robust.Shared.GameObjects;
using Robust.Shared.GameObjects.Components.UserInterface;
using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.IoC;
namespace Content.Server.GameObjects.Components.Power
{
[RegisterComponent]
[ComponentReference(typeof(IActivate))]
public sealed class ApcComponent : SharedApcComponent, IActivate
{
PowerStorageComponent Storage;

View File

@@ -1,9 +1,9 @@
using System;
using Robust.Server.GameObjects;
using Robust.Shared.GameObjects;
using Robust.Shared.Maths;
using Robust.Shared.Serialization;
using Robust.Shared.ViewVariables;
using SpriteComponent = Robust.Server.GameObjects.SpriteComponent;
namespace Content.Server.GameObjects.Components.Power
{
@@ -23,6 +23,7 @@ namespace Content.Server.GameObjects.Components.Power
/// <summary>
/// Component that represents a light bulb. Can be broken, or burned, which turns them mostly useless.
/// </summary>
[RegisterComponent]
public class LightBulbComponent : Component
{

View File

@@ -1,8 +1,11 @@
using Content.Shared.GameObjects.Components.Power;
using Robust.Server.GameObjects;
using Robust.Shared.GameObjects;
namespace Content.Server.GameObjects.Components.Power
{
[RegisterComponent]
[ComponentReference(typeof(PowerStorageComponent))]
public class PowerCellComponent : PowerStorageComponent
{
public override string Name => "PowerCell";

View File

@@ -3,12 +3,13 @@ using System.Text;
using Content.Server.GameObjects.EntitySystems;
using Content.Shared.GameObjects.Components.Power;
using Robust.Server.Interfaces.GameObjects;
using Robust.Shared.GameObjects;
using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Interfaces.GameObjects.Components;
using Robust.Shared.Map;
namespace Content.Server.GameObjects.Components.Power
{
[RegisterComponent]
public class PowerDebugTool : SharedPowerDebugTool, IAfterAttack
{
void IAfterAttack.AfterAttack(AfterAttackEventArgs eventArgs)

View File

@@ -1,22 +1,19 @@
using Content.Server.GameObjects.EntitySystems;
using Robust.Server.GameObjects;
using Robust.Shared.GameObjects;
using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Interfaces.GameObjects.Components;
using Robust.Shared.IoC;
using Robust.Shared.Serialization;
using Robust.Shared.Utility;
using System;
using System;
using System.Collections.Generic;
using System.Linq;
using Content.Server.GameObjects.EntitySystems;
using Robust.Shared.GameObjects;
using Robust.Shared.Interfaces.GameObjects.Components;
using Robust.Shared.Serialization;
using Robust.Shared.Utility;
using Robust.Shared.ViewVariables;
using YamlDotNet.RepresentationModel;
namespace Content.Server.GameObjects.Components.Power
{
/// <summary>
/// Component that requires power to function
/// </summary>
[RegisterComponent]
public class PowerDeviceComponent : Component, EntitySystems.IExamine
{
public override string Name => "PowerDevice";

View File

@@ -1,18 +1,13 @@
using Robust.Shared.GameObjects;
using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Log;
using Robust.Shared.Serialization;
using Robust.Shared.Utility;
using System;
using Robust.Shared.ViewVariables;
using YamlDotNet.RepresentationModel;
namespace Content.Server.GameObjects.Components.Power
{
/// <summary>
/// Component that creates power and supplies it to the powernet
/// </summary>
[RegisterComponent]
public class PowerGeneratorComponent : Component
{
public override string Name => "PowerGenerator";

View File

@@ -1,10 +1,9 @@
using Robust.Server.GameObjects;
using System;
using System.Linq;
using Robust.Server.Interfaces.GameObjects;
using Robust.Shared.GameObjects;
using Robust.Shared.Interfaces.GameObjects.Components;
using Robust.Shared.IoC;
using System;
using System.Linq;
using Robust.Shared.ViewVariables;
namespace Content.Server.GameObjects.Components.Power
@@ -12,6 +11,7 @@ namespace Content.Server.GameObjects.Components.Power
/// <summary>
/// Component that connects to the powernet
/// </summary>
[RegisterComponent]
public class PowerNodeComponent : Component
{
public override string Name => "PowerNode";

View File

@@ -1,22 +1,20 @@
using Robust.Server.GameObjects;
using System.Collections.Generic;
using System.Linq;
using Robust.Server.Interfaces.GameObjects;
using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.GameObjects;
using Robust.Shared.Interfaces.GameObjects.Components;
using Robust.Shared.IoC;
using Robust.Shared.Log;
using Robust.Shared.Serialization;
using Robust.Shared.Utility;
using System;
using System.Collections.Generic;
using System.Linq;
using Robust.Shared.ViewVariables;
using YamlDotNet.RepresentationModel;
namespace Content.Server.GameObjects.Components.Power
{
/// <summary>
/// Component that wirelessly connects and powers devices, connects to powernet via node and can be combined with internal storage component
/// </summary>
[RegisterComponent]
[ComponentReference(typeof(PowerDeviceComponent))]
public class PowerProviderComponent : PowerDeviceComponent
{
public override string Name => "PowerProvider";

View File

@@ -1,3 +1,4 @@
using Robust.Shared.GameObjects;
using Robust.Shared.Serialization;
using Robust.Shared.ViewVariables;
@@ -6,6 +7,8 @@ namespace Content.Server.GameObjects.Components.Power
/// <summary>
/// Feeds energy from the powernet and may have the ability to supply back into it
/// </summary>
[RegisterComponent]
[ComponentReference(typeof(PowerStorageComponent))]
public class PowerStorageNetComponent : PowerStorageComponent
{
public override string Name => "PowerStorage";

View File

@@ -1,20 +1,18 @@
using Content.Server.GameObjects.EntitySystems;
using Robust.Server.GameObjects;
using System.Linq;
using Content.Server.GameObjects.Components.Interactable.Tools;
using Content.Server.GameObjects.EntitySystems;
using Robust.Server.Interfaces.GameObjects;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using System.Linq;
using Robust.Shared.Interfaces.GameObjects;
using Content.Server.GameObjects.Components.Interactable.Tools;
using Robust.Shared.Interfaces.GameObjects.Components;
using Robust.Shared.IoC;
using Robust.Shared.ViewVariables;
using System;
namespace Content.Server.GameObjects.Components.Power
{
/// <summary>
/// Component to transfer power to nearby components, can create powernets and connect to nodes
/// </summary>
[RegisterComponent]
public class PowerTransferComponent : Component, IAttackBy
{
public override string Name => "PowerTransfer";

View File

@@ -17,6 +17,7 @@ namespace Content.Server.GameObjects.Components.Power
/// <summary>
/// Component that represents a wall light. It has a light bulb that can be replaced when broken.
/// </summary>
[RegisterComponent]
public class PoweredLightComponent : Component, IAttackHand, IAttackBy
{
public override string Name => "PoweredLight";

View File

@@ -1,5 +1,4 @@
using System;
using Content.Shared.GameObjects.Components.Power;
using Content.Shared.GameObjects.Components.Power;
using Content.Shared.Utility;
using Robust.Server.GameObjects;
using Robust.Shared.GameObjects;
@@ -11,6 +10,7 @@ namespace Content.Server.GameObjects.Components.Power
/// This is operations that are specific to the SMES, like UI and visuals.
/// Code interfacing with the powernet is handled in <see cref="PowerStorageComponent" />.
/// </summary>
[RegisterComponent]
public class SmesComponent : Component
{
public override string Name => "Smes";

View File

@@ -1,14 +1,15 @@
using System.Collections.Generic;
using Content.Server.GameObjects.Components.Mobs;
using Content.Shared.GameObjects;
using Robust.Server.GameObjects;
using Robust.Shared.GameObjects;
using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Interfaces.Physics;
using Robust.Shared.Interfaces.GameObjects.Components;
using Content.Server.GameObjects.Components.Mobs;
using Content.Shared.GameObjects;
using Robust.Shared.Interfaces.Physics;
namespace Content.Server.GameObjects.Components.Projectiles
{
[RegisterComponent]
public class ProjectileComponent : Component, ICollideSpecial, ICollideBehavior
{
public override string Name => "Projectile";

View File

@@ -11,6 +11,7 @@ using Robust.Shared.IoC;
namespace Content.Server.GameObjects.Components
{
[RegisterComponent]
class ThrownItemComponent : ProjectileComponent, ICollideBehavior
{
#pragma warning disable 649

View File

@@ -6,15 +6,16 @@ using Content.Shared.GameObjects.Components.Research;
using Content.Shared.Research;
using Robust.Server.GameObjects.Components.UserInterface;
using Robust.Server.Interfaces.GameObjects;
using Robust.Shared.GameObjects;
using Robust.Shared.GameObjects.Components.UserInterface;
using Robust.Shared.IoC;
using Robust.Shared.Prototypes;
using Robust.Shared.Timers;
using Robust.Shared.Utility;
using Robust.Shared.ViewVariables;
namespace Content.Server.GameObjects.Components.Research
{
[RegisterComponent]
[ComponentReference(typeof(IActivate))]
public class LatheComponent : SharedLatheComponent, IAttackBy, IActivate
{
public const int VolumePerSheet = 3750;

View File

@@ -1,4 +1,3 @@
using System.Collections.Generic;
using Content.Shared.GameObjects.Components.Research;
using Content.Shared.Research;
using Robust.Shared.GameObjects;
@@ -6,6 +5,8 @@ using Robust.Shared.Serialization;
namespace Content.Server.GameObjects.Components.Research
{
[RegisterComponent]
[ComponentReference(typeof(SharedLatheDatabaseComponent))]
public class LatheDatabaseComponent : SharedLatheDatabaseComponent
{
/// <summary>

View File

@@ -1,11 +1,12 @@
using System.Collections.Generic;
using Content.Shared.GameObjects.Components.Research;
using Robust.Shared.GameObjects;
using Robust.Shared.Interfaces.Network;
using Robust.Shared.Serialization;
namespace Content.Server.GameObjects.Components.Research
{
[RegisterComponent]
[ComponentReference(typeof(SharedMaterialStorageComponent))]
public class MaterialStorageComponent : SharedMaterialStorageComponent
{
protected override Dictionary<string, int> Storage { get; set; } = new Dictionary<string, int>();

View File

@@ -1,29 +1,18 @@
using System;
using System.Collections.Generic;
using Robust.Shared.GameObjects;
using Robust.Shared.Log;
using Robust.Shared.Utility;
using YamlDotNet.RepresentationModel;
using Content.Server.Interfaces;
using Content.Shared.GameObjects;
using Robust.Shared.Serialization;
using Robust.Shared.ViewVariables;
using Content.Server.GameObjects.EntitySystems;
using Robust.Server.GameObjects.EntitySystems;
using Content.Shared.Audio;
using Robust.Shared.Prototypes;
using Robust.Shared.IoC;
using Content.Server.GameObjects.EntitySystems;
using Robust.Shared.Audio;
using Robust.Shared.GameObjects;
using Robust.Shared.Serialization;
namespace Content.Server.GameObjects.Components.Sound
{
/// <summary>
/// Simple sound emitter that emits sound on use in hand
/// </summary>
[RegisterComponent]
public class EmitSoundOnUseComponent : Component, IUse
{
/// <inheritdoc />
///
///
public override string Name => "EmitSoundOnUse";
public string _soundName;

View File

@@ -1,33 +1,25 @@
using System;
using System.Collections.Generic;
using Robust.Shared.GameObjects;
using Robust.Shared.Log;
using Robust.Shared.Utility;
using YamlDotNet.RepresentationModel;
using Content.Server.Interfaces;
using Content.Shared.GameObjects;
using Robust.Shared.Serialization;
using Robust.Shared.ViewVariables;
using Content.Server.GameObjects.EntitySystems;
using Robust.Server.GameObjects.EntitySystems;
using Content.Shared.Audio;
using Robust.Shared.Prototypes;
using Robust.Shared.Audio;
using Robust.Shared.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Maths;
using Robust.Shared.Audio;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization;
namespace Content.Server.GameObjects.Components.Sound
{
/// <summary>
/// Changes footstep sound
/// </summary>
[RegisterComponent]
public class FootstepModifierComponent : Component
{
#pragma warning disable 649
[Dependency] private readonly IPrototypeManager _prototypeManager;
#pragma warning restore 649
/// <inheritdoc />
///
///
private Random _footstepRandom;
public override string Name => "FootstepModifier";

View File

@@ -1,16 +1,11 @@
using System.Collections.Generic;
using Content.Shared.GameObjects.Components.Sound;
using Robust.Server.GameObjects.EntitySystems;
using Robust.Shared.Audio;
using Robust.Shared.GameObjects;
using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Interfaces.Network;
using Robust.Shared.Log;
using Robust.Shared.Map;
using Robust.Shared.Serialization;
namespace Content.Server.GameObjects.Components.Sound
{
[RegisterComponent]
public class SoundComponent : SharedSoundComponent
{
/// <summary>

View File

@@ -10,6 +10,7 @@ using Robust.Shared.ViewVariables;
namespace Content.Server.GameObjects.Components.Stack
{
// TODO: Naming and presentation and such could use some improvement.
[RegisterComponent]
public class StackComponent : Component, IAttackBy, IExamine
{
private const string SerializationCache = "stack";

View File

@@ -1,10 +1,8 @@
using Content.Server.Interfaces.GameObjects;
using Content.Shared.Maths;
using System;
using Robust.Shared.GameObjects;
using Robust.Shared.Utility;
using YamlDotNet.RepresentationModel;
using System;
using Content.Server.Interfaces.GameObjects;
using Content.Shared.GameObjects;
using Content.Shared.Maths;
using Robust.Shared.GameObjects;
using Robust.Shared.Serialization;
using Robust.Shared.ViewVariables;
@@ -15,6 +13,7 @@ namespace Content.Server.GameObjects
/// informing others of the current temperature,
/// and taking fire damage from high temperature.
/// </summary>
[RegisterComponent]
public class TemperatureComponent : Component, ITemperatureComponent
{
/// <inheritdoc />

View File

@@ -1,14 +1,15 @@
using System;
using Content.Server.GameObjects.EntitySystems;
using Content.Shared.GameObjects.Components.Triggers;
using Robust.Server.GameObjects;
using Robust.Shared.GameObjects;
using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.IoC;
using Robust.Shared.Serialization;
using Robust.Shared.GameObjects;
using Content.Server.GameObjects.EntitySystems;
using Content.Shared.GameObjects.Components.Triggers;
namespace Content.Server.GameObjects.Components.Triggers
{
[RegisterComponent]
public class OnUseTimerTriggerComponent : Component, IUse
{
#pragma warning disable 649
@@ -28,7 +29,7 @@ namespace Content.Server.GameObjects.Components.Triggers
public override void Initialize()
{
base.Initialize();
base.Initialize();
}
bool IUse.UseEntity(UseEntityEventArgs eventArgs)
@@ -41,4 +42,4 @@ namespace Content.Server.GameObjects.Components.Triggers
return true;
}
}
}
}

View File

@@ -1,14 +1,15 @@
using Robust.Shared.GameObjects;
using Content.Server.GameObjects.EntitySystems;
using Content.Server.GameObjects.EntitySystems;
using Content.Shared.GameObjects;
using Robust.Server.Interfaces.GameObjects;
using Robust.Shared.GameObjects;
using Robust.Shared.Interfaces.Map;
using Robust.Shared.IoC;
using Robust.Shared.Maths;
using Robust.Server.Interfaces.GameObjects;
using Robust.Shared.Serialization;
using Content.Shared.GameObjects;
using Robust.Shared.Interfaces.Map;
namespace Content.Server.GameObjects.Components.Weapon.Melee
{
[RegisterComponent]
public class MeleeWeaponComponent : Component, IAttack
{
#pragma warning disable 649

View File

@@ -1,11 +1,13 @@
using System;
using Content.Shared.GameObjects.Components.Power;
using Content.Server.GameObjects.Components.Power;
using Robust.Shared.Serialization;
using Content.Shared.GameObjects.Components.Power;
using Robust.Server.GameObjects;
using Robust.Shared.GameObjects;
using Robust.Shared.Serialization;
namespace Content.Server.GameObjects.Components.Weapon.Ranged.Hitscan
{
[RegisterComponent]
public class HitscanWeaponCapacitorComponent : PowerCellComponent
{
private AppearanceComponent _appearance;

View File

@@ -1,6 +1,13 @@
using Content.Shared.GameObjects;
using System;
using Content.Server.GameObjects.Components.Power;
using Content.Server.GameObjects.Components.Sound;
using Content.Server.GameObjects.EntitySystems;
using Content.Shared.GameObjects;
using Content.Shared.Interfaces;
using Content.Shared.Physics;
using Robust.Server.GameObjects.EntitySystems;
using Robust.Shared.Audio;
using Robust.Shared.GameObjects;
using Robust.Shared.GameObjects.EntitySystemMessages;
using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Interfaces.Physics;
@@ -10,16 +17,10 @@ using Robust.Shared.Map;
using Robust.Shared.Maths;
using Robust.Shared.Physics;
using Robust.Shared.Serialization;
using System;
using Content.Server.GameObjects.Components.Sound;
using Robust.Shared.GameObjects;
using Content.Server.GameObjects.EntitySystems;
using Content.Server.GameObjects.Components.Power;
using Content.Shared.Interfaces;
using Content.Shared.Physics;
namespace Content.Server.GameObjects.Components.Weapon.Ranged.Hitscan
{
[RegisterComponent]
public class HitscanWeaponComponent : Component, IAttackBy
{
private const float MaxLength = 20;

View File

@@ -3,6 +3,7 @@ using Robust.Shared.Serialization;
namespace Content.Server.GameObjects.Components.Weapon.Ranged.Projectile
{
[RegisterComponent]
public class BallisticBulletComponent : Component
{
public override string Name => "BallisticBullet";

View File

@@ -11,6 +11,7 @@ using Robust.Shared.ViewVariables;
namespace Content.Server.GameObjects.Components.Weapon.Ranged.Projectile
{
[RegisterComponent]
public class BallisticMagazineComponent : Component, IMapInit
{
public override string Name => "BallisticMagazine";

View File

@@ -8,6 +8,7 @@ using Robust.Server.GameObjects;
using Robust.Server.GameObjects.Components.Container;
using Robust.Server.Interfaces.GameObjects;
using Robust.Shared.Audio;
using Robust.Shared.GameObjects;
using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Maths;
using Robust.Shared.Serialization;
@@ -16,6 +17,7 @@ using Robust.Shared.ViewVariables;
namespace Content.Server.GameObjects.Components.Weapon.Ranged.Projectile
{
[RegisterComponent]
public class BallisticMagazineWeaponComponent : BallisticWeaponComponent, IUse, IAttackBy, IMapInit
{
public override string Name => "BallisticMagazineWeapon";

View File

@@ -1,18 +1,17 @@
using System;
using Robust.Shared.GameObjects;
using Content.Server.GameObjects.EntitySystems;
using Content.Shared.GameObjects.Components.Weapons.Ranged;
using Robust.Server.Interfaces.Player;
using Robust.Shared.GameObjects;
using Robust.Shared.Interfaces.GameObjects;
using Robust.Shared.Interfaces.Network;
using Robust.Shared.Interfaces.Timing;
using Robust.Shared.IoC;
using Robust.Shared.Log;
using Robust.Shared.Map;
using Robust.Shared.Timers;
namespace Content.Server.GameObjects.Components.Weapon.Ranged
{
[RegisterComponent]
public sealed class RangedWeaponComponent : SharedRangedWeaponComponent
{
private TimeSpan _lastFireTime;