public override void Init() { var factory = IoCManager.Resolve <IComponentFactory>(); var prototypes = IoCManager.Resolve <IPrototypeManager>(); factory.DoAutoRegistrations(); foreach (var ignoreName in IgnoredComponents.List) { factory.RegisterIgnore(ignoreName); } foreach (var ignoreName in IgnoredPrototypes.List) { prototypes.RegisterIgnore(ignoreName); } ClientContentIoC.Register(); IoCManager.BuildGraph(); // DEVNOTE: This is generally where you'll be setting up the IoCManager further. IoCManager.InjectDependencies(this); }
public override void Init() { var factory = IoCManager.Resolve <IComponentFactory>(); var prototypes = IoCManager.Resolve <IPrototypeManager>(); factory.DoAutoRegistrations(); foreach (var ignoreName in IgnoredComponents.List) { factory.RegisterIgnore(ignoreName); } factory.RegisterClass <SharedResearchConsoleComponent>(); factory.RegisterClass <SharedLatheComponent>(); factory.RegisterClass <SharedSpawnPointComponent>(); factory.RegisterClass <SharedVendingMachineComponent>(); factory.RegisterClass <SharedWiresComponent>(); factory.RegisterClass <SharedCargoConsoleComponent>(); factory.RegisterClass <SharedReagentDispenserComponent>(); factory.RegisterClass <SharedChemMasterComponent>(); factory.RegisterClass <SharedMicrowaveComponent>(); factory.RegisterClass <SharedGravityGeneratorComponent>(); factory.RegisterClass <SharedAMEControllerComponent>(); prototypes.RegisterIgnore("material"); prototypes.RegisterIgnore("reaction"); //Chemical reactions only needed by server. Reactions checks are server-side. prototypes.RegisterIgnore("gasReaction"); prototypes.RegisterIgnore("seed"); // Seeds prototypes are server-only. prototypes.RegisterIgnore("barSign"); prototypes.RegisterIgnore("objective"); prototypes.RegisterIgnore("holiday"); prototypes.RegisterIgnore("aiFaction"); prototypes.RegisterIgnore("behaviorSet"); ClientContentIoC.Register(); foreach (var callback in TestingCallbacks) { var cast = (ClientModuleTestingCallbacks)callback; cast.ClientBeforeIoC?.Invoke(); } IoCManager.BuildGraph(); IoCManager.Resolve <IClientAdminManager>().Initialize(); IoCManager.Resolve <IParallaxManager>().LoadParallax(); IoCManager.Resolve <IBaseClient>().PlayerJoinedServer += SubscribePlayerAttachmentEvents; IoCManager.Resolve <IStylesheetManager>().Initialize(); IoCManager.Resolve <IScreenshotHook>().Initialize(); IoCManager.Resolve <ChangelogManager>().Initialize(); IoCManager.InjectDependencies(this); _escapeMenuOwner.Initialize(); _baseClient.PlayerJoinedServer += (sender, args) => { IoCManager.Resolve <IMapManager>().CreateNewMapEntity(MapId.Nullspace); }; }
#pragma warning restore 649 public override void Init() { var factory = IoCManager.Resolve <IComponentFactory>(); var prototypes = IoCManager.Resolve <IPrototypeManager>(); factory.DoAutoRegistrations(); foreach (var ignoreName in IgnoredComponents.List) { factory.RegisterIgnore(ignoreName); } factory.Register <SharedResearchConsoleComponent>(); factory.Register <SharedLatheComponent>(); factory.Register <SharedSpawnPointComponent>(); factory.Register <SharedSolutionComponent>(); factory.Register <SharedVendingMachineComponent>(); factory.Register <SharedWiresComponent>(); factory.Register <SharedCargoConsoleComponent>(); factory.Register <SharedReagentDispenserComponent>(); factory.Register <SharedChemMasterComponent>(); factory.Register <SharedMicrowaveComponent>(); factory.Register <SharedGravityGeneratorComponent>(); prototypes.RegisterIgnore("material"); prototypes.RegisterIgnore("reaction"); //Chemical reactions only needed by server. Reactions checks are server-side. prototypes.RegisterIgnore("barSign"); ClientContentIoC.Register(); if (TestingCallbacks != null) { var cast = (ClientModuleTestingCallbacks)TestingCallbacks; cast.ClientBeforeIoC?.Invoke(); } IoCManager.BuildGraph(); IoCManager.Resolve <IParallaxManager>().LoadParallax(); IoCManager.Resolve <IBaseClient>().PlayerJoinedServer += SubscribePlayerAttachmentEvents; IoCManager.Resolve <IStylesheetManager>().Initialize(); IoCManager.Resolve <IScreenshotHook>().Initialize(); IoCManager.InjectDependencies(this); _escapeMenuOwner.Initialize(); _baseClient.PlayerJoinedServer += (sender, args) => { IoCManager.Resolve <IMapManager>().CreateNewMapEntity(MapId.Nullspace); }; _configurationManager.RegisterCVar("outline.enabled", true); }
public override void Init() { var factory = IoCManager.Resolve <IComponentFactory>(); var prototypes = IoCManager.Resolve <IPrototypeManager>(); factory.DoAutoRegistrations(); foreach (var ignoreName in IgnoredComponents.List) { factory.RegisterIgnore(ignoreName); } foreach (var ignoreName in IgnoredPrototypes.List) { prototypes.RegisterIgnore(ignoreName); } ClientContentIoC.Register(); IoCManager.BuildGraph(); IoCManager.Resolve <StyleSheetManager>().Initialize(); IoCManager.Resolve <HudManager>().Initialize(); }
#pragma warning restore 649 public override void Init() { var factory = IoCManager.Resolve <IComponentFactory>(); var prototypes = IoCManager.Resolve <IPrototypeManager>(); factory.DoAutoRegistrations(); var registerIgnore = new[] { "Anchorable", "AmmoBox", "Breakable", "Pickaxe", "Interactable", "Destructible", "Temperature", "PowerTransfer", "PowerNode", "PowerProvider", "PowerDevice", "PowerStorage", "PowerGenerator", "Explosive", "OnUseTimerTrigger", "ToolboxElectricalFill", "ToolboxEmergencyFill", "WarpPoint", "ToolboxGoldFill", "ToolLockerFill", "EmitSoundOnUse", "FootstepModifier", "HeatResistance", "Teleportable", "ItemTeleporter", "Portal", "EntityStorage", "PlaceableSurface", "Wirecutter", "Screwdriver", "Multitool", "Wrench", "Crowbar", "Projectile", "MeleeWeapon", "Storeable", "Dice", "Construction", "Apc", "Door", "PoweredLight", "Smes", "Powercell", "LightBulb", "Healing", "Catwalk", "RangedMagazine", "Ammo", "HitscanWeaponCapacitor", "PowerCell", "WeaponCapacitorCharger", "PowerCellCharger", "AiController", "PlayerInputMover", "Computer", "AsteroidRock", "ResearchServer", "ResearchPointSource", "ResearchClient", "IdCard", "Access", "AccessReader", "IdCardConsole", "Airlock", "MedicalScanner", "WirePlacer", "Species", "Drink", "Food", "FoodContainer", "Stomach", "Hunger", "Thirst", "Rotatable", "MagicMirror", "MedkitFill", "FloorTile", "FootstepSound", "UtilityBeltClothingFill", "ShuttleController", "HumanInventoryController", "UseDelay", "Pourable", "Paper", "Write", "Bloodstream", "TransformableContainer", "Mind", "MovementSpeedModifier", "StorageFill", "Mop", "Bucket", "Puddle", "CanSpill", "SpeedLoader", "Hitscan", "BoltActionBarrel", "PumpBarrel", "RevolverBarrel", "ExplosiveProjectile", "StunnableProjectile", "RandomPottedPlant", "CommunicationsConsole", "BarSign", "DroppedBodyPart", "DroppedMechanism", "BodyManager", "Stunnable", "SolarPanel", "BodyScanner", "Stunbaton", "EmergencyClosetFill", "Tool", "TilePrying", "RandomToolColor", "ConditionalSpawner", "PottedPlantHide", "SecureEntityStorage", "PresetIdCard", "SolarControlConsole", "BatteryBarrel", "FlashExplosive", "FlashProjectile", "Utensil", }; foreach (var ignoreName in registerIgnore) { factory.RegisterIgnore(ignoreName); } factory.Register <SharedResearchConsoleComponent>(); factory.Register <SharedLatheComponent>(); factory.Register <SharedSpawnPointComponent>(); factory.Register <SharedSolutionComponent>(); factory.Register <SharedVendingMachineComponent>(); factory.Register <SharedWiresComponent>(); factory.Register <SharedCargoConsoleComponent>(); factory.Register <SharedReagentDispenserComponent>(); factory.Register <SharedMicrowaveComponent>(); factory.Register <SharedGravityGeneratorComponent>(); prototypes.RegisterIgnore("material"); prototypes.RegisterIgnore("reaction"); //Chemical reactions only needed by server. Reactions checks are server-side. prototypes.RegisterIgnore("barSign"); ClientContentIoC.Register(); if (TestingCallbacks != null) { var cast = (ClientModuleTestingCallbacks)TestingCallbacks; cast.ClientBeforeIoC?.Invoke(); } IoCManager.BuildGraph(); IoCManager.Resolve <IParallaxManager>().LoadParallax(); IoCManager.Resolve <IBaseClient>().PlayerJoinedServer += SubscribePlayerAttachmentEvents; IoCManager.Resolve <IStylesheetManager>().Initialize(); IoCManager.Resolve <IScreenshotHook>().Initialize(); IoCManager.InjectDependencies(this); _escapeMenuOwner.Initialize(); _baseClient.PlayerJoinedServer += (sender, args) => { IoCManager.Resolve <IMapManager>().CreateNewMapEntity(MapId.Nullspace); }; }
#pragma warning restore 649 public override void Init() { var factory = IoCManager.Resolve <IComponentFactory>(); var prototypes = IoCManager.Resolve <IPrototypeManager>(); factory.DoAutoRegistrations(); var registerIgnore = new[] { "Wrenchable", "AmmoBox", "Breakable", "Pickaxe", "Interactable", "Destructible", "Temperature", "PowerTransfer", "PowerNode", "PowerProvider", "PowerDevice", "PowerStorage", "PowerGenerator", "Explosive", "OnUseTimerTrigger", "ToolboxElectricalFill", "ToolLockerFill", "EmitSoundOnUse", "FootstepModifier", "HeatResistance", "Teleportable", "ItemTeleporter", "Portal", "EntityStorage", "PlaceableSurface", "Wirecutter", "Screwdriver", "Multitool", "Wrench", "Crowbar", "HitscanWeapon", "ProjectileWeapon", "Projectile", "MeleeWeapon", "Storeable", "Dice", "Construction", "Apc", "Door", "PoweredLight", "Smes", "Powercell", "LightBulb", "Healing", "Catwalk", "BallisticMagazine", "BallisticBullet", "HitscanWeaponCapacitor", "PowerCell", "WeaponCapacitorCharger", "PowerCellCharger", "AiController", "PlayerInputMover", "Computer", "AsteroidRock", "ResearchServer", "ResearchPointSource", "ResearchClient", "IdCard", "Access", "AccessReader", "IdCardConsole", "Airlock", "MedicalScanner", "WirePlacer", "Species", "Drink", "Food", "DrinkFoodContainer", "Stomach", "Hunger", "Thirst", "Rotatable", "MagicMirror", "MedkitFill", "FloorTile", "FootstepSound", "UtilityBeltClothingFill", "ShuttleController", "HumanInventoryController", "UseDelay", "Pourable" }; foreach (var ignoreName in registerIgnore) { factory.RegisterIgnore(ignoreName); } factory.Register <SharedResearchConsoleComponent>(); factory.Register <SharedLatheComponent>(); factory.Register <SharedSpawnPointComponent>(); factory.Register <SolutionComponent>(); factory.Register <SharedVendingMachineComponent>(); factory.Register <SharedWiresComponent>(); factory.Register <SharedCargoConsoleComponent>(); factory.Register <SharedReagentDispenserComponent>(); prototypes.RegisterIgnore("material"); prototypes.RegisterIgnore("reaction"); //Chemical reactions only needed by server. Reactions checks are server-side. ClientContentIoC.Register(); if (TestingCallbacks != null) { var cast = (ClientModuleTestingCallbacks)TestingCallbacks; cast.ClientBeforeIoC?.Invoke(); } IoCManager.BuildGraph(); IoCManager.Resolve <IParallaxManager>().LoadParallax(); IoCManager.Resolve <IBaseClient>().PlayerJoinedServer += SubscribePlayerAttachmentEvents; var stylesheet = new NanoStyle(); IoCManager.Resolve <IUserInterfaceManager>().Stylesheet = stylesheet.Stylesheet; IoCManager.InjectDependencies(this); _escapeMenuOwner.Initialize(); _baseClient.PlayerJoinedGame += (sender, args) => { _stateManager.RequestStateChange <GameScreen>(); }; _baseClient.PlayerJoinedServer += (sender, args) => { IoCManager.Resolve <IMapManager>().CreateNewMapEntity(MapId.Nullspace); }; }