示例#1
0
        /// <inheritdoc />
        public override void Init()
        {
            base.Init();

            var factory = IoCManager.Resolve <IComponentFactory>();

            factory.DoAutoRegistrations();

            var registerIgnore = new[]
            {
                "ConstructionGhost",
                "IconSmooth",
                "SubFloorHide",
                "LowWall",
                "ReinforcedWall",
                "Window",
                "CharacterInfo",
                "InteractionOutline",
                "MeleeWeaponArcAnimation",
                "AnimationsTest",
                "ItemStatus",
                "Marker",
                "EmergencyLight",
                "Clickable",
            };

            foreach (var ignoreName in registerIgnore)
            {
                factory.RegisterIgnore(ignoreName);
            }

            ServerContentIoC.Register();

            if (TestingCallbacks != null)
            {
                var cast = (ServerModuleTestingCallbacks)TestingCallbacks;
                cast.ServerBeforeIoC?.Invoke();
            }

            IoCManager.BuildGraph();

            _gameTicker = IoCManager.Resolve <IGameTicker>();

            IoCManager.Resolve <IServerNotifyManager>().Initialize();
            IoCManager.Resolve <IChatManager>().Initialize();

            var playerManager = IoCManager.Resolve <IPlayerManager>();

            _statusShell = new StatusShell();

            var logManager = IoCManager.Resolve <ILogManager>();

            logManager.GetSawmill("Storage").Level = LogLevel.Info;

            IoCManager.Resolve <IServerPreferencesManager>().StartInit();
            IoCManager.Resolve <INodeGroupFactory>().Initialize();
            IoCManager.Resolve <INodeFactory>().Initialize();
        }
示例#2
0
        /// <inheritdoc />
        public override void Init()
        {
            base.Init();

            var factory = IoCManager.Resolve <IComponentFactory>();

            factory.DoAutoRegistrations();

            var registerIgnore = new[]
            {
                "ConstructionGhost",
                "IconSmooth",
                "SubFloorHide",
                "LowWall",
                "Window",
                "CharacterInfo",
            };

            foreach (var ignoreName in registerIgnore)
            {
                factory.RegisterIgnore(ignoreName);
            }

            IoCManager.Register <ISharedNotifyManager, ServerNotifyManager>();
            IoCManager.Register <IServerNotifyManager, ServerNotifyManager>();
            IoCManager.Register <IGameTicker, GameTicker>();
            IoCManager.Register <IChatManager, ChatManager>();
            IoCManager.Register <IMoMMILink, MoMMILink>();
            IoCManager.Register <ISandboxManager, SandboxManager>();
            IoCManager.Register <IAtmosphereMap, AtmosphereMap>();
            if (TestingCallbacks != null)
            {
                var cast = (ServerModuleTestingCallbacks)TestingCallbacks;
                cast.ServerBeforeIoC?.Invoke();
            }
            IoCManager.BuildGraph();

            _gameTicker = IoCManager.Resolve <IGameTicker>();

            IoCManager.Resolve <IServerNotifyManager>().Initialize();
            IoCManager.Resolve <IChatManager>().Initialize();

            var playerManager = IoCManager.Resolve <IPlayerManager>();

            _statusShell = new StatusShell();

            var logManager = IoCManager.Resolve <ILogManager>();

            logManager.GetSawmill("Storage").Level = LogLevel.Info;
        }
示例#3
0
        /// <inheritdoc />
        public override void Init()
        {
            base.Init();

            var factory = IoCManager.Resolve <IComponentFactory>();

            factory.DoAutoRegistrations();

            foreach (var ignoreName in IgnoredComponents.List)
            {
                factory.RegisterIgnore(ignoreName);
            }

            ServerContentIoC.Register();

            foreach (var callback in TestingCallbacks)
            {
                var cast = (ServerModuleTestingCallbacks)callback;
                cast.ServerBeforeIoC?.Invoke();
            }

            IoCManager.BuildGraph();

            _gameTicker  = IoCManager.Resolve <IGameTicker>();
            _euiManager  = IoCManager.Resolve <EuiManager>();
            _voteManager = IoCManager.Resolve <IVoteManager>();

            IoCManager.Resolve <IServerNotifyManager>().Initialize();
            IoCManager.Resolve <IChatManager>().Initialize();

            var playerManager = IoCManager.Resolve <IPlayerManager>();

            _statusShell = new StatusShell();

            var logManager = IoCManager.Resolve <ILogManager>();

            logManager.GetSawmill("Storage").Level = LogLevel.Info;
            logManager.GetSawmill("db.ef").Level   = LogLevel.Info;

            IoCManager.Resolve <IConnectionManager>().Initialize();
            IoCManager.Resolve <IServerDbManager>().Init();
            IoCManager.Resolve <IServerPreferencesManager>().Init();
            IoCManager.Resolve <INodeGroupFactory>().Initialize();
            IoCManager.Resolve <ISandboxManager>().Initialize();
            IoCManager.Resolve <IAccentManager>().Initialize();
            _voteManager.Initialize();
        }
示例#4
0
        /// <inheritdoc />
        public override void Init()
        {
            base.Init();

            var factory = IoCManager.Resolve <IComponentFactory>();

            factory.Register <HandsComponent>();
            factory.RegisterReference <HandsComponent, IHandsComponent>();

            factory.Register <InventoryComponent>();

            factory.Register <StoreableComponent>();
            factory.Register <ItemComponent>();
            factory.RegisterReference <ItemComponent, StoreableComponent>();
            factory.Register <ClothingComponent>();
            factory.RegisterReference <ClothingComponent, ItemComponent>();

            factory.Register <DamageableComponent>();
            factory.Register <DestructibleComponent>();
            factory.Register <TemperatureComponent>();
            factory.Register <ServerDoorComponent>();

            //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 <HandheldLightComponent>();

            factory.Register <ServerStorageComponent>();
            factory.RegisterReference <ServerStorageComponent, IActivate>();

            factory.Register <PowerDebugTool>();
            factory.Register <PoweredLightComponent>();
            factory.Register <SmesComponent>();
            factory.Register <ApcComponent>();
            factory.Register <MaterialComponent>();
            factory.Register <StackComponent>();

            factory.Register <ConstructionComponent>();
            factory.Register <ConstructorComponent>();
            factory.RegisterIgnore("ConstructionGhost");

            factory.Register <MindComponent>();
            factory.Register <SpeciesComponent>();

            factory.Register <SpawnPointComponent>();
            factory.RegisterReference <SpawnPointComponent, SharedSpawnPointComponent>();

            factory.Register <BallisticBulletComponent>();
            factory.Register <BallisticMagazineComponent>();

            factory.Register <CameraRecoilComponent>();
            factory.RegisterReference <CameraRecoilComponent, SharedCameraRecoilComponent>();

            IoCManager.Register <ISharedNotifyManager, ServerNotifyManager>();
            IoCManager.Register <IServerNotifyManager, ServerNotifyManager>();
            IoCManager.Register <IGameTicker, GameTicker>();
            IoCManager.BuildGraph();

            _gameTicker = IoCManager.Resolve <IGameTicker>();

            IoCManager.Resolve <IServerNotifyManager>().Initialize();

            var playerManager = IoCManager.Resolve <IPlayerManager>();

            _statusShell = new StatusShell();
        }
示例#5
0
        /// <inheritdoc />
        public override void Init()
        {
            base.Init();

            var factory = IoCManager.Resolve <IComponentFactory>();

            factory.Register <HandsComponent>();
            factory.RegisterReference <HandsComponent, IHandsComponent>();

            factory.Register <InventoryComponent>();

            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>();

            //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 <CatwalkComponent>();

            factory.Register <FootstepModifierComponent>();
            factory.Register <EmitSoundOnUseComponent>();

            IoCManager.Register <ISharedNotifyManager, ServerNotifyManager>();
            IoCManager.Register <IServerNotifyManager, ServerNotifyManager>();
            IoCManager.Register <IGameTicker, GameTicker>();
            IoCManager.Register <IChatManager, ChatManager>();
            IoCManager.Register <IMoMMILink, MoMMILink>();
            IoCManager.BuildGraph();

            _gameTicker = IoCManager.Resolve <IGameTicker>();

            IoCManager.Resolve <IServerNotifyManager>().Initialize();
            IoCManager.Resolve <IChatManager>().Initialize();

            _mommiLink = IoCManager.Resolve <IMoMMILink>();

            var playerManager = IoCManager.Resolve <IPlayerManager>();

            _statusShell = new StatusShell();

            var logManager = IoCManager.Resolve <ILogManager>();

            logManager.GetSawmill("Storage").Level = LogLevel.Info;
        }