2018-02-06 19:34:36 -08:00
|
|
|
|
using Content.Server.GameObjects;
|
2018-10-30 01:13:10 -07:00
|
|
|
|
using Content.Server.GameObjects.Components;
|
2018-02-03 22:35:42 -06:00
|
|
|
|
using Content.Server.GameObjects.Components.Power;
|
2018-02-06 19:03:36 -06:00
|
|
|
|
using Content.Server.GameObjects.Components.Interactable.Tools;
|
2017-09-24 23:19:47 +02:00
|
|
|
|
using Content.Server.Interfaces.GameObjects;
|
2018-03-15 12:41:31 -07:00
|
|
|
|
using Content.Server.Placement;
|
2018-01-18 13:00:35 -06:00
|
|
|
|
using SS14.Server;
|
|
|
|
|
|
using SS14.Server.Interfaces;
|
|
|
|
|
|
using SS14.Server.Interfaces.Chat;
|
|
|
|
|
|
using SS14.Server.Interfaces.Maps;
|
2017-10-29 21:43:42 +01:00
|
|
|
|
using SS14.Server.Interfaces.Player;
|
2018-01-18 13:00:35 -06:00
|
|
|
|
using SS14.Server.Player;
|
|
|
|
|
|
using SS14.Shared.Console;
|
2017-09-24 23:19:47 +02:00
|
|
|
|
using SS14.Shared.ContentPack;
|
2018-01-18 13:00:35 -06:00
|
|
|
|
using SS14.Shared.Enums;
|
2017-09-24 23:19:47 +02:00
|
|
|
|
using SS14.Shared.Interfaces.GameObjects;
|
2018-01-18 13:00:35 -06:00
|
|
|
|
using SS14.Shared.Interfaces.Map;
|
|
|
|
|
|
using SS14.Shared.Interfaces.Timers;
|
2017-09-24 23:19:47 +02:00
|
|
|
|
using SS14.Shared.IoC;
|
2018-01-18 13:00:35 -06:00
|
|
|
|
using SS14.Shared.Log;
|
|
|
|
|
|
using SS14.Shared.Map;
|
|
|
|
|
|
using SS14.Shared.Timers;
|
2018-02-06 19:34:36 -08:00
|
|
|
|
using SS14.Shared.Interfaces.Timing;
|
2018-03-15 12:41:31 -07:00
|
|
|
|
using SS14.Shared.Maths;
|
2018-04-05 17:32:51 -05:00
|
|
|
|
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;
|
2018-07-27 17:11:58 +02:00
|
|
|
|
using Content.Server.GameObjects.Components.Materials;
|
2018-08-02 08:29:55 +02:00
|
|
|
|
using Content.Server.GameObjects.Components.Stack;
|
|
|
|
|
|
using Content.Server.GameObjects.Components.Construction;
|
2018-08-21 00:59:04 +02:00
|
|
|
|
using Content.Server.GameObjects.Components.Mobs;
|
2018-08-22 01:19:47 -07:00
|
|
|
|
using Content.Server.GameObjects.EntitySystems;
|
|
|
|
|
|
using Content.Server.Mobs;
|
|
|
|
|
|
using Content.Server.Players;
|
2018-08-28 08:39:20 -07:00
|
|
|
|
using Content.Server.GameObjects.Components.Interactable;
|
2019-03-17 15:52:27 +01:00
|
|
|
|
using Content.Server.GameObjects.Components.Markers;
|
2018-12-13 14:49:57 +01:00
|
|
|
|
using Content.Server.GameObjects.Components.Weapon.Ranged;
|
2018-11-22 10:37:58 +01:00
|
|
|
|
using Content.Server.GameTicking;
|
2018-11-21 21:11:30 +01:00
|
|
|
|
using Content.Server.Interfaces;
|
2018-11-22 10:37:58 +01:00
|
|
|
|
using Content.Server.Interfaces.GameTicking;
|
2018-09-19 18:54:04 +02:00
|
|
|
|
using Content.Shared.GameObjects.Components.Inventory;
|
2019-03-17 15:52:27 +01:00
|
|
|
|
using Content.Shared.GameObjects.Components.Markers;
|
2019-03-23 15:04:14 +01:00
|
|
|
|
using Content.Shared.GameObjects.Components.Mobs;
|
2018-11-21 21:11:30 +01:00
|
|
|
|
using Content.Shared.Interfaces;
|
2018-11-26 10:02:47 +01:00
|
|
|
|
using SS14.Server.Interfaces.ServerStatus;
|
2018-11-22 10:37:58 +01:00
|
|
|
|
using SS14.Shared.Timing;
|
2019-03-26 02:27:03 +05:00
|
|
|
|
using Content.Server.GameObjects.Components.Destructible;
|
2017-08-04 14:24:01 +02:00
|
|
|
|
|
|
|
|
|
|
namespace Content.Server
|
|
|
|
|
|
{
|
|
|
|
|
|
public class EntryPoint : GameServer
|
|
|
|
|
|
{
|
2018-11-22 10:37:58 +01:00
|
|
|
|
private IGameTicker _gameTicker;
|
2018-11-26 10:02:47 +01:00
|
|
|
|
private StatusShell _statusShell;
|
2018-08-21 00:59:04 +02:00
|
|
|
|
|
2018-01-18 13:00:35 -06:00
|
|
|
|
/// <inheritdoc />
|
2017-08-04 14:24:01 +02:00
|
|
|
|
public override void Init()
|
|
|
|
|
|
{
|
2018-01-18 13:00:35 -06:00
|
|
|
|
base.Init();
|
|
|
|
|
|
|
2017-09-24 23:19:47 +02:00
|
|
|
|
var factory = IoCManager.Resolve<IComponentFactory>();
|
|
|
|
|
|
|
|
|
|
|
|
factory.Register<HandsComponent>();
|
|
|
|
|
|
factory.RegisterReference<HandsComponent, IHandsComponent>();
|
|
|
|
|
|
|
|
|
|
|
|
factory.Register<InventoryComponent>();
|
|
|
|
|
|
|
2018-04-22 06:11:38 -05:00
|
|
|
|
factory.Register<StoreableComponent>();
|
2017-09-24 23:19:47 +02:00
|
|
|
|
factory.Register<ItemComponent>();
|
2018-04-22 06:11:38 -05:00
|
|
|
|
factory.RegisterReference<ItemComponent, StoreableComponent>();
|
2018-04-25 06:42:35 -05:00
|
|
|
|
factory.Register<ClothingComponent>();
|
|
|
|
|
|
factory.RegisterReference<ClothingComponent, ItemComponent>();
|
2019-03-28 11:47:45 +01:00
|
|
|
|
factory.RegisterReference<ClothingComponent, StoreableComponent>();
|
2018-04-22 06:11:38 -05:00
|
|
|
|
|
2017-10-07 15:15:29 +02:00
|
|
|
|
factory.Register<DamageableComponent>();
|
|
|
|
|
|
factory.Register<DestructibleComponent>();
|
|
|
|
|
|
factory.Register<TemperatureComponent>();
|
2017-10-22 23:48:01 +02:00
|
|
|
|
factory.Register<ServerDoorComponent>();
|
2018-02-06 19:03:36 -06:00
|
|
|
|
|
|
|
|
|
|
//Power Components
|
2018-02-03 22:35:42 -06:00
|
|
|
|
factory.Register<PowerTransferComponent>();
|
|
|
|
|
|
factory.Register<PowerProviderComponent>();
|
2018-05-27 16:44:50 +02:00
|
|
|
|
factory.RegisterReference<PowerProviderComponent, PowerDeviceComponent>();
|
2018-02-03 22:35:42 -06:00
|
|
|
|
factory.Register<PowerNodeComponent>();
|
2018-09-21 08:21:40 +02:00
|
|
|
|
factory.Register<PowerStorageNetComponent>();
|
|
|
|
|
|
factory.RegisterReference<PowerStorageNetComponent, PowerStorageComponent>();
|
|
|
|
|
|
factory.Register<PowerCellComponent>();
|
|
|
|
|
|
factory.RegisterReference<PowerCellComponent, PowerStorageComponent>();
|
2018-02-03 22:35:42 -06:00
|
|
|
|
factory.Register<PowerDeviceComponent>();
|
|
|
|
|
|
factory.Register<PowerGeneratorComponent>();
|
2019-03-22 23:59:13 +01:00
|
|
|
|
factory.Register<LightBulbComponent>();
|
2018-02-06 19:03:36 -06:00
|
|
|
|
|
|
|
|
|
|
//Tools
|
|
|
|
|
|
factory.Register<MultitoolComponent>();
|
|
|
|
|
|
factory.Register<WirecutterComponent>();
|
|
|
|
|
|
factory.Register<WrenchComponent>();
|
|
|
|
|
|
factory.Register<WelderComponent>();
|
|
|
|
|
|
factory.Register<ScrewdriverComponent>();
|
|
|
|
|
|
factory.Register<CrowbarComponent>();
|
2018-04-05 17:32:51 -05:00
|
|
|
|
|
|
|
|
|
|
factory.Register<HitscanWeaponComponent>();
|
2018-12-13 14:49:57 +01:00
|
|
|
|
factory.Register<RangedWeaponComponent>();
|
2019-03-23 15:04:14 +01:00
|
|
|
|
factory.Register<BallisticMagazineWeaponComponent>();
|
2018-04-05 17:32:51 -05:00
|
|
|
|
factory.Register<ProjectileComponent>();
|
2018-10-30 01:13:10 -07:00
|
|
|
|
factory.Register<ThrownItemComponent>();
|
2018-04-05 17:32:51 -05:00
|
|
|
|
factory.Register<MeleeWeaponComponent>();
|
2018-04-22 06:11:38 -05:00
|
|
|
|
|
2019-03-21 20:55:16 +05:00
|
|
|
|
factory.Register<HealingComponent>();
|
|
|
|
|
|
|
2018-08-28 08:39:20 -07:00
|
|
|
|
factory.Register<HandheldLightComponent>();
|
|
|
|
|
|
|
2018-04-22 06:11:38 -05:00
|
|
|
|
factory.Register<ServerStorageComponent>();
|
2018-08-22 01:19:47 -07:00
|
|
|
|
factory.RegisterReference<ServerStorageComponent, IActivate>();
|
2018-05-27 16:44:50 +02:00
|
|
|
|
|
|
|
|
|
|
factory.Register<PowerDebugTool>();
|
|
|
|
|
|
factory.Register<PoweredLightComponent>();
|
2018-07-17 11:39:55 +02:00
|
|
|
|
factory.Register<SmesComponent>();
|
|
|
|
|
|
factory.Register<ApcComponent>();
|
2018-07-27 17:11:58 +02:00
|
|
|
|
factory.Register<MaterialComponent>();
|
2018-08-02 08:29:55 +02:00
|
|
|
|
factory.Register<StackComponent>();
|
|
|
|
|
|
|
|
|
|
|
|
factory.Register<ConstructionComponent>();
|
|
|
|
|
|
factory.Register<ConstructorComponent>();
|
|
|
|
|
|
factory.RegisterIgnore("ConstructionGhost");
|
2018-08-21 00:59:04 +02:00
|
|
|
|
|
|
|
|
|
|
factory.Register<MindComponent>();
|
2018-12-13 07:47:19 -06:00
|
|
|
|
factory.Register<SpeciesComponent>();
|
2018-11-21 21:11:30 +01:00
|
|
|
|
|
2019-03-17 15:52:27 +01:00
|
|
|
|
factory.Register<SpawnPointComponent>();
|
|
|
|
|
|
factory.RegisterReference<SpawnPointComponent, SharedSpawnPointComponent>();
|
|
|
|
|
|
|
2019-03-23 15:04:14 +01:00
|
|
|
|
factory.Register<BallisticBulletComponent>();
|
|
|
|
|
|
factory.Register<BallisticMagazineComponent>();
|
|
|
|
|
|
|
|
|
|
|
|
factory.Register<CameraRecoilComponent>();
|
|
|
|
|
|
factory.RegisterReference<CameraRecoilComponent, SharedCameraRecoilComponent>();
|
|
|
|
|
|
|
2018-11-21 21:11:30 +01:00
|
|
|
|
IoCManager.Register<ISharedNotifyManager, ServerNotifyManager>();
|
|
|
|
|
|
IoCManager.Register<IServerNotifyManager, ServerNotifyManager>();
|
2018-11-22 10:37:58 +01:00
|
|
|
|
IoCManager.Register<IGameTicker, GameTicker>();
|
2018-11-21 21:11:30 +01:00
|
|
|
|
IoCManager.BuildGraph();
|
|
|
|
|
|
|
2018-11-22 10:37:58 +01:00
|
|
|
|
_gameTicker = IoCManager.Resolve<IGameTicker>();
|
|
|
|
|
|
|
2018-11-21 21:11:30 +01:00
|
|
|
|
IoCManager.Resolve<IServerNotifyManager>().Initialize();
|
2018-11-26 10:02:47 +01:00
|
|
|
|
|
|
|
|
|
|
var playerManager = IoCManager.Resolve<IPlayerManager>();
|
|
|
|
|
|
|
|
|
|
|
|
_statusShell = new StatusShell();
|
2018-01-18 13:00:35 -06:00
|
|
|
|
}
|
|
|
|
|
|
|
2018-11-21 21:21:29 +01:00
|
|
|
|
public override void PostInit()
|
|
|
|
|
|
{
|
|
|
|
|
|
base.PostInit();
|
|
|
|
|
|
|
2018-11-22 10:37:58 +01:00
|
|
|
|
_gameTicker.Initialize();
|
2018-11-21 21:21:29 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
2018-11-22 10:37:58 +01:00
|
|
|
|
public override void Update(AssemblyLoader.UpdateLevel level, float frameTime)
|
|
|
|
|
|
{
|
|
|
|
|
|
base.Update(level, frameTime);
|
|
|
|
|
|
|
|
|
|
|
|
_gameTicker.Update(new FrameEventArgs(frameTime));
|
|
|
|
|
|
}
|
2017-08-04 14:24:01 +02:00
|
|
|
|
}
|
|
|
|
|
|
}
|