diff --git a/Content.Client/Administration/Systems/AdminSystem.Menu.cs b/Content.Client/Administration/Systems/AdminSystem.Menu.cs index c10cadd48a..93b6770141 100644 --- a/Content.Client/Administration/Systems/AdminSystem.Menu.cs +++ b/Content.Client/Administration/Systems/AdminSystem.Menu.cs @@ -24,10 +24,6 @@ namespace Content.Client.Administration.Systems [Dependency] private readonly IGameHud _gameHud = default!; [Dependency] private readonly IClientAdminManager _clientAdminManager = default!; [Dependency] private readonly IClientConGroupController _clientConGroupController = default!; - [Dependency] private readonly IOverlayManager _overlayManager = default!; - [Dependency] private readonly IResourceCache _resourceCache = default!; - [Dependency] private readonly IEntityManager _entityManager = default!; - [Dependency] private readonly EntityLookupSystem _entityLookup = default!; [Dependency] private readonly IClientConsoleHost _clientConsoleHost = default!; [Dependency] private readonly VerbSystem _verbSystem = default!; diff --git a/Content.Client/Administration/Systems/AdminSystem.Overlay.cs b/Content.Client/Administration/Systems/AdminSystem.Overlay.cs index 85611626d5..3502faf9e8 100644 --- a/Content.Client/Administration/Systems/AdminSystem.Overlay.cs +++ b/Content.Client/Administration/Systems/AdminSystem.Overlay.cs @@ -1,12 +1,16 @@ using Content.Client.Administration.Managers; using Robust.Client.Graphics; +using Robust.Client.ResourceManagement; namespace Content.Client.Administration.Systems { public sealed partial class AdminSystem { + [Dependency] private readonly IOverlayManager _overlayManager = default!; + [Dependency] private readonly IResourceCache _resourceCache = default!; [Dependency] private readonly IClientAdminManager _adminManager = default!; [Dependency] private readonly IEyeManager _eyeManager = default!; + [Dependency] private readonly EntityLookupSystem _entityLookup = default!; private AdminNameOverlay _adminNameOverlay = default!; @@ -15,7 +19,7 @@ namespace Content.Client.Administration.Systems private void InitializeOverlay() { - _adminNameOverlay = new AdminNameOverlay(this, _entityManager, _eyeManager, _resourceCache, _entityLookup); + _adminNameOverlay = new AdminNameOverlay(this, EntityManager, _eyeManager, _resourceCache, _entityLookup); _adminManager.AdminStatusUpdated += OnAdminStatusUpdated; } diff --git a/Content.Client/Administration/Systems/BwoinkSystem.cs b/Content.Client/Administration/Systems/BwoinkSystem.cs index 351b42ae2b..be3e2c0f31 100644 --- a/Content.Client/Administration/Systems/BwoinkSystem.cs +++ b/Content.Client/Administration/Systems/BwoinkSystem.cs @@ -29,6 +29,9 @@ namespace Content.Client.Administration.Systems public bool IsOpen => (_adminWindow?.IsOpen ?? false) || (_plainWindow?.IsOpen ?? false); + public event Action? AdminReceivedAHelp; + public event Action? AdminOpenedAHelp; + protected override void OnBwoinkTextMessage(BwoinkTextMessage message, EntitySessionEventArgs eventArgs) { base.OnBwoinkTextMessage(message, eventArgs); @@ -52,8 +55,10 @@ namespace Content.Client.Administration.Systems { _adminWindow?.OnBwoink(message.UserId); - if (_adminWindow?.IsOpen != true) - _hud.SetInfoRed(true); + if (_adminWindow?.IsOpen == true) + return; + AdminReceivedAHelp?.Invoke(); + _hud.SetInfoRed(true); } } @@ -117,6 +122,7 @@ namespace Content.Client.Administration.Systems } _hud.SetInfoRed(false); + AdminOpenedAHelp?.Invoke(); if (_adminManager.HasFlag(AdminFlags.Adminhelp)) { @@ -149,4 +155,3 @@ namespace Content.Client.Administration.Systems } } } - diff --git a/Content.Client/Administration/UI/Tabs/AdminbusTab/AdminbusTab.xaml.cs b/Content.Client/Administration/UI/Tabs/AdminbusTab/AdminbusTab.xaml.cs index 01d2fa97d5..e002b4a923 100644 --- a/Content.Client/Administration/UI/Tabs/AdminbusTab/AdminbusTab.xaml.cs +++ b/Content.Client/Administration/UI/Tabs/AdminbusTab/AdminbusTab.xaml.cs @@ -1,7 +1,6 @@ using System.IO; using Content.Client.Administration.Commands; using Content.Client.Administration.Managers; -using Content.Client.Sandbox; using Content.Client.UserInterface.Systems.DecalPlacer; using Content.Shared.Administration; using Robust.Client.AutoGenerated; @@ -15,11 +14,19 @@ namespace Content.Client.Administration.UI.Tabs.AdminbusTab [GenerateTypedNameReferences] public sealed partial class AdminbusTab : Control { + private readonly EntitySpawningUIController _entitySpawningController; + private readonly TileSpawningUIController _tileSpawningController; + private readonly DecalPlacerUIController _decalPlacerController; + public AdminbusTab() { RobustXamlLoader.Load(this); IoCManager.InjectDependencies(this); + _entitySpawningController = UserInterfaceManager.GetUIController(); + _tileSpawningController = UserInterfaceManager.GetUIController(); + _decalPlacerController = UserInterfaceManager.GetUIController(); + var adminManager = IoCManager.Resolve(); // For the SpawnEntitiesButton and SpawnTilesButton we need to do the press manually @@ -39,17 +46,17 @@ namespace Content.Client.Administration.UI.Tabs.AdminbusTab private void SpawnEntitiesButtonOnPressed(BaseButton.ButtonEventArgs obj) { - IoCManager.Resolve().GetUIController().ToggleWindow(); + _entitySpawningController.ToggleWindow(); } private void SpawnTilesButtonOnOnPressed(BaseButton.ButtonEventArgs obj) { - IoCManager.Resolve().GetUIController().ToggleWindow(); + _tileSpawningController.ToggleWindow(); } private void SpawnDecalsButtonOnPressed(BaseButton.ButtonEventArgs obj) { - IoCManager.Resolve().GetUIController().ToggleWindow(); + _decalPlacerController.ToggleWindow(); } } } diff --git a/Content.Client/CharacterInfo/Components/CharacterInfoComponent.cs b/Content.Client/CharacterInfo/Components/CharacterInfoComponent.cs index bc9e7b7368..01d3918438 100644 --- a/Content.Client/CharacterInfo/Components/CharacterInfoComponent.cs +++ b/Content.Client/CharacterInfo/Components/CharacterInfoComponent.cs @@ -1,12 +1,8 @@ using Content.Client.CharacterInterface; -using Content.Client.HUD.UI; using Content.Client.Stylesheets; +using Content.Client.UserInterface.Controls; using Robust.Client.UserInterface; using Robust.Client.UserInterface.Controls; -using Robust.Shared.GameObjects; -using Robust.Shared.IoC; -using Robust.Shared.Localization; -using Robust.Shared.Maths; namespace Content.Client.CharacterInfo.Components { @@ -72,7 +68,7 @@ namespace Content.Client.CharacterInfo.Components }; AddChild(ObjectivesContainer); - AddChild(new Placeholder() + AddChild(new Placeholder { PlaceholderText = Loc.GetString("character-info-roles-antagonist-text") }); diff --git a/Content.Client/Entry/EntryPoint.cs b/Content.Client/Entry/EntryPoint.cs index cc71f8431d..6517eee3b0 100644 --- a/Content.Client/Entry/EntryPoint.cs +++ b/Content.Client/Entry/EntryPoint.cs @@ -1,6 +1,5 @@ using Content.Client.Administration.Managers; using Content.Client.Changelog; -using Content.Client.CharacterInterface; using Content.Client.Chat.Managers; using Content.Client.Options; using Content.Client.Eui; @@ -31,9 +30,9 @@ using Content.Shared.Markers; using Robust.Client; using Robust.Client.Graphics; using Robust.Client.Input; -using Robust.Client.Player; using Robust.Client.State; using Robust.Client.UserInterface; +using Robust.Shared.Configuration; #if FULL_RELEASE using Robust.Shared; using Robust.Shared.Configuration; @@ -41,65 +40,43 @@ using Robust.Shared.Configuration; using Robust.Shared.ContentPack; using Robust.Shared.Map; using Robust.Shared.Prototypes; -using Robust.Shared.Timing; namespace Content.Client.Entry { public sealed class EntryPoint : GameClient { - [Dependency] private readonly IPlayerManager _playerManager = default!; [Dependency] private readonly IBaseClient _baseClient = default!; [Dependency] private readonly IGameController _gameController = default!; [Dependency] private readonly IStateManager _stateManager = default!; - [Dependency] private readonly IEntityManager _entityManager = default!; + [Dependency] private readonly IComponentFactory _componentFactory = default!; + [Dependency] private readonly IPrototypeManager _prototypeManager = default!; + [Dependency] private readonly IClientAdminManager _adminManager = default!; + [Dependency] private readonly IParallaxManager _parallaxManager = default!; + [Dependency] private readonly IConfigurationManager _configManager = default!; + [Dependency] private readonly IStylesheetManager _stylesheetManager = default!; + [Dependency] private readonly IScreenshotHook _screenshotHook = default!; + [Dependency] private readonly ChangelogManager _changelogManager = default!; + [Dependency] private readonly RulesManager _rulesManager = default!; + [Dependency] private readonly ViewportManager _viewportManager = default!; + [Dependency] private readonly IUserInterfaceManager _userInterfaceManager = default!; + [Dependency] private readonly IInputManager _inputManager = default!; + [Dependency] private readonly IMapManager _mapManager = default!; + [Dependency] private readonly IOverlayManager _overlayManager = default!; + [Dependency] private readonly IChatManager _chatManager = default!; + [Dependency] private readonly IClientPreferencesManager _clientPreferencesManager = default!; + [Dependency] private readonly EuiManager _euiManager = default!; + [Dependency] private readonly IVoteManager _voteManager = default!; + [Dependency] private readonly IGamePrototypeLoadManager _gamePrototypeLoadManager = default!; + [Dependency] private readonly NetworkResourceManager _networkResources = default!; + [Dependency] private readonly GhostKickManager _ghostKick = default!; + [Dependency] private readonly ExtendedDisconnectInformationManager _extendedDisconnectInformation = default!; + [Dependency] private readonly PlayTimeTrackingManager _playTimeTracking = default!; + [Dependency] private readonly IGameHud _gameHud = default!; public const int NetBufferSizeOverride = 2; public override void Init() { - var factory = IoCManager.Resolve(); - var prototypes = IoCManager.Resolve(); - - factory.DoAutoRegistrations(); - factory.IgnoreMissingComponents(); - - // Do not add to these, they are legacy. - factory.RegisterClass(); - factory.RegisterClass(); - factory.RegisterClass(); - factory.RegisterClass(); - factory.RegisterClass(); - // Do not add to the above, they are legacy - - prototypes.RegisterIgnore("accent"); - 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("htnCompound"); - prototypes.RegisterIgnore("htnPrimitive"); - prototypes.RegisterIgnore("gameMap"); - prototypes.RegisterIgnore("faction"); - prototypes.RegisterIgnore("lobbyBackground"); - prototypes.RegisterIgnore("advertisementsPack"); - prototypes.RegisterIgnore("metabolizerType"); - prototypes.RegisterIgnore("metabolismGroup"); - prototypes.RegisterIgnore("salvageMap"); - prototypes.RegisterIgnore("gamePreset"); - prototypes.RegisterIgnore("gameRule"); - prototypes.RegisterIgnore("worldSpell"); - prototypes.RegisterIgnore("entitySpell"); - prototypes.RegisterIgnore("instantSpell"); - prototypes.RegisterIgnore("roundAnnouncement"); - prototypes.RegisterIgnore("wireLayout"); - prototypes.RegisterIgnore("alertLevels"); - prototypes.RegisterIgnore("nukeopsRole"); - prototypes.RegisterIgnore("flavor"); - ClientContentIoC.Register(); foreach (var callback in TestingCallbacks) @@ -109,19 +86,6 @@ namespace Content.Client.Entry } IoCManager.BuildGraph(); - factory.GenerateNetIds(); - - IoCManager.Resolve().Initialize(); - IoCManager.Resolve().PlayerJoinedServer += SubscribePlayerAttachmentEvents; - IoCManager.Resolve().Initialize(); - IoCManager.Resolve().Initialize(); - IoCManager.Resolve().Initialize(); - IoCManager.Resolve().Initialize(); - IoCManager.Resolve().Initialize(); - IoCManager.Resolve().Initialize(); - IoCManager.Resolve().Initialize(); - IoCManager.Resolve().Initialize(); - IoCManager.InjectDependencies(this); #if FULL_RELEASE @@ -129,71 +93,86 @@ namespace Content.Client.Entry IoCManager.Resolve().OverrideDefault(CVars.NetBufferSize, NetBufferSizeOverride); #endif - _baseClient.PlayerJoinedServer += (_, _) => - { - IoCManager.Resolve().CreateNewMapEntity(MapId.Nullspace); - }; + _componentFactory.DoAutoRegistrations(); + _componentFactory.IgnoreMissingComponents(); - } + // Do not add to these, they are legacy. + _componentFactory.RegisterClass(); + _componentFactory.RegisterClass(); + _componentFactory.RegisterClass(); + _componentFactory.RegisterClass(); + _componentFactory.RegisterClass(); + // Do not add to the above, they are legacy - /// - /// Subscribe events to the player manager after the player manager is set up - /// - /// - /// - public void SubscribePlayerAttachmentEvents(object? sender, EventArgs args) - { - if (_playerManager.LocalPlayer != null) - { - _playerManager.LocalPlayer.EntityAttached += AttachPlayerToEntity; - _playerManager.LocalPlayer.EntityDetached += DetachPlayerFromEntity; - } - } + _prototypeManager.RegisterIgnore("accent"); + _prototypeManager.RegisterIgnore("material"); + _prototypeManager.RegisterIgnore("reaction"); //Chemical reactions only needed by server. Reactions checks are server-side. + _prototypeManager.RegisterIgnore("gasReaction"); + _prototypeManager.RegisterIgnore("seed"); // Seeds prototypes are server-only. + _prototypeManager.RegisterIgnore("barSign"); + _prototypeManager.RegisterIgnore("objective"); + _prototypeManager.RegisterIgnore("holiday"); + _prototypeManager.RegisterIgnore("aiFaction"); + _prototypeManager.RegisterIgnore("htnCompound"); + _prototypeManager.RegisterIgnore("htnPrimitive"); + _prototypeManager.RegisterIgnore("gameMap"); + _prototypeManager.RegisterIgnore("faction"); + _prototypeManager.RegisterIgnore("lobbyBackground"); + _prototypeManager.RegisterIgnore("advertisementsPack"); + _prototypeManager.RegisterIgnore("metabolizerType"); + _prototypeManager.RegisterIgnore("metabolismGroup"); + _prototypeManager.RegisterIgnore("salvageMap"); + _prototypeManager.RegisterIgnore("gamePreset"); + _prototypeManager.RegisterIgnore("gameRule"); + _prototypeManager.RegisterIgnore("worldSpell"); + _prototypeManager.RegisterIgnore("entitySpell"); + _prototypeManager.RegisterIgnore("instantSpell"); + _prototypeManager.RegisterIgnore("roundAnnouncement"); + _prototypeManager.RegisterIgnore("wireLayout"); + _prototypeManager.RegisterIgnore("alertLevels"); + _prototypeManager.RegisterIgnore("nukeopsRole"); + _prototypeManager.RegisterIgnore("flavor"); - /// - /// Add the character interface master which combines all character interfaces into one window - /// - public void AttachPlayerToEntity(EntityAttachedEventArgs eventArgs) - { - // TODO This is shitcode. Move this to an entity system, FOR FUCK'S SAKE - _entityManager.AddComponent(eventArgs.NewEntity); - } + _componentFactory.GenerateNetIds(); + _adminManager.Initialize(); + _stylesheetManager.Initialize(); + _screenshotHook.Initialize(); + _changelogManager.Initialize(); + _rulesManager.Initialize(); + _viewportManager.Initialize(); + _ghostKick.Initialize(); + _extendedDisconnectInformation.Initialize(); + _playTimeTracking.Initialize(); + _baseClient.PlayerJoinedServer += (_, _) => { _mapManager.CreateNewMapEntity(MapId.Nullspace);}; - /// - /// Remove the character interface master from this entity now that we have detached ourselves from it - /// - public void DetachPlayerFromEntity(EntityDetachedEventArgs eventArgs) - { - // TODO This is shitcode. Move this to an entity system, FOR FUCK'S SAKE - if (!_entityManager.Deleted(eventArgs.OldEntity)) - { - _entityManager.RemoveComponent(eventArgs.OldEntity); - } + //AUTOSCALING default Setup! + _configManager.SetCVar("interface.resolutionAutoScaleUpperCutoffX", 1080); + _configManager.SetCVar("interface.resolutionAutoScaleUpperCutoffY", 720); + _configManager.SetCVar("interface.resolutionAutoScaleLowerCutoffX", 520); + _configManager.SetCVar("interface.resolutionAutoScaleLowerCutoffY", 240); + _configManager.SetCVar("interface.resolutionAutoScaleMinimum", 0.5f); } public override void PostInit() { base.PostInit(); - // Setup key contexts - var inputMan = IoCManager.Resolve(); - ContentContexts.SetupContexts(inputMan.Contexts); + ContentContexts.SetupContexts(_inputManager.Contexts); - IoCManager.Resolve().Initialize(); - IoCManager.Resolve().LoadDefaultParallax(); // Have to do this later because prototypes are needed. + _parallaxManager.LoadDefaultParallax(); - var overlayMgr = IoCManager.Resolve(); + _overlayManager.AddOverlay(new SingularityOverlay()); + _overlayManager.AddOverlay(new FlashOverlay()); + _overlayManager.AddOverlay(new RadiationPulseOverlay()); - overlayMgr.AddOverlay(new SingularityOverlay()); - overlayMgr.AddOverlay(new FlashOverlay()); - overlayMgr.AddOverlay(new RadiationPulseOverlay()); - - IoCManager.Resolve().Initialize(); - IoCManager.Resolve().Initialize(); - IoCManager.Resolve().Initialize(); - IoCManager.Resolve().Initialize(); - IoCManager.Resolve().Initialize(); - IoCManager.Resolve().Initialize(); + _gameHud.Initialize(); + _chatManager.Initialize(); + _clientPreferencesManager.Initialize(); + _euiManager.Initialize(); + _voteManager.Initialize(); + _gamePrototypeLoadManager.Initialize(); + _networkResources.Initialize(); + _userInterfaceManager.SetDefaultTheme("SS14DefaultTheme"); _baseClient.RunLevelChanged += (_, args) => { @@ -205,7 +184,7 @@ namespace Content.Client.Entry }; // Disable engine-default viewport since we use our own custom viewport control. - IoCManager.Resolve().MainViewport.Visible = false; + _userInterfaceManager.MainViewport.Visible = false; SwitchToDefaultState(); } @@ -229,18 +208,5 @@ namespace Content.Client.Entry _stateManager.RequestStateChange(); } } - - public override void Update(ModUpdateLevel level, FrameEventArgs frameEventArgs) - { - base.Update(level, frameEventArgs); - - switch (level) - { - case ModUpdateLevel.FramePreEngine: - // TODO: Turn IChatManager into an EntitySystem and remove the line below. - IoCManager.Resolve().FrameUpdate(frameEventArgs); - break; - } - } } } diff --git a/Content.Client/Options/UI/Tabs/KeyRebindTab.xaml.cs b/Content.Client/Options/UI/Tabs/KeyRebindTab.xaml.cs index 6073877f58..e3a7ed37f9 100644 --- a/Content.Client/Options/UI/Tabs/KeyRebindTab.xaml.cs +++ b/Content.Client/Options/UI/Tabs/KeyRebindTab.xaml.cs @@ -1,6 +1,3 @@ -using System; -using System.Linq; -using System.Collections.Generic; using Content.Client.Stylesheets; using Content.Shared.Input; using Robust.Client.AutoGenerated; @@ -11,13 +8,9 @@ using Robust.Client.UserInterface.XAML; using Robust.Shared; using Robust.Shared.Configuration; using Robust.Shared.Input; -using Robust.Shared.IoC; -using Robust.Shared.Localization; using Robust.Shared.Timing; using Robust.Shared.Utility; -using Robust.Shared.Log; using static Robust.Client.UserInterface.Controls.BoxContainer; -using Robust.Client.UserInterface.CustomControls; namespace Content.Client.Options.UI.Tabs { @@ -157,25 +150,14 @@ namespace Content.Client.Options.UI.Tabs AddButton(ContentKeyFunctions.TakeScreenshotNoUI); AddHeader("ui-options-header-hotbar"); - AddButton(ContentKeyFunctions.Hotbar1); - AddButton(ContentKeyFunctions.Hotbar2); - AddButton(ContentKeyFunctions.Hotbar3); - AddButton(ContentKeyFunctions.Hotbar4); - AddButton(ContentKeyFunctions.Hotbar5); - AddButton(ContentKeyFunctions.Hotbar6); - AddButton(ContentKeyFunctions.Hotbar7); - AddButton(ContentKeyFunctions.Hotbar8); - AddButton(ContentKeyFunctions.Hotbar9); - AddButton(ContentKeyFunctions.Hotbar0); - AddButton(ContentKeyFunctions.Loadout1); - AddButton(ContentKeyFunctions.Loadout2); - AddButton(ContentKeyFunctions.Loadout3); - AddButton(ContentKeyFunctions.Loadout4); - AddButton(ContentKeyFunctions.Loadout5); - AddButton(ContentKeyFunctions.Loadout6); - AddButton(ContentKeyFunctions.Loadout7); - AddButton(ContentKeyFunctions.Loadout8); - AddButton(ContentKeyFunctions.Loadout9); + foreach (var boundKey in ContentKeyFunctions.GetHotbarBoundKeys()) + { + AddButton(boundKey); + } + foreach (var boundKey in ContentKeyFunctions.GetLoadoutBoundKeys()) + { + AddButton(boundKey); + } AddHeader("ui-options-header-shuttle"); AddButton(ContentKeyFunctions.ShuttleStrafeUp); diff --git a/Content.Client/Suspicion/SuspicionGui.xaml b/Content.Client/Suspicion/SuspicionGui.xaml index 85c0b42bc7..8f519b2195 100644 --- a/Content.Client/Suspicion/SuspicionGui.xaml +++ b/Content.Client/Suspicion/SuspicionGui.xaml @@ -1,7 +1,8 @@ - + - + diff --git a/Content.Client/Suspicion/SuspicionGui.xaml.cs b/Content.Client/Suspicion/SuspicionGui.xaml.cs index e6507d3b6c..47568a3316 100644 --- a/Content.Client/Suspicion/SuspicionGui.xaml.cs +++ b/Content.Client/Suspicion/SuspicionGui.xaml.cs @@ -6,6 +6,7 @@ using Content.Shared.Popups; using Robust.Client.AutoGenerated; using Robust.Client.Player; using Robust.Client.UserInterface; +using Robust.Client.UserInterface.Controls; using Robust.Client.UserInterface.XAML; using Robust.Shared.GameObjects; using Robust.Shared.IoC; @@ -17,7 +18,7 @@ using static Robust.Client.UserInterface.Controls.BaseButton; namespace Content.Client.Suspicion { [GenerateTypedNameReferences] - public sealed partial class SuspicionGui : Control + public sealed partial class SuspicionGui : UIWidget { [Dependency] private readonly IPlayerManager _playerManager = default!; [Dependency] private readonly IGameTiming _timing = default!; diff --git a/Content.Client/HUD/UI/Placeholder.cs b/Content.Client/UserInterface/Controls/Placeholder.cs similarity index 93% rename from Content.Client/HUD/UI/Placeholder.cs rename to Content.Client/UserInterface/Controls/Placeholder.cs index e23a131d9e..f5a4408c9f 100644 --- a/Content.Client/HUD/UI/Placeholder.cs +++ b/Content.Client/UserInterface/Controls/Placeholder.cs @@ -1,6 +1,6 @@ using Robust.Client.UserInterface.Controls; -namespace Content.Client.HUD.UI +namespace Content.Client.UserInterface.Controls { public sealed class Placeholder : PanelContainer { diff --git a/Content.Shared/Input/ContentKeyFunctions.cs b/Content.Shared/Input/ContentKeyFunctions.cs index b7f1ca5578..83432df8b2 100644 --- a/Content.Shared/Input/ContentKeyFunctions.cs +++ b/Content.Shared/Input/ContentKeyFunctions.cs @@ -57,6 +57,7 @@ namespace Content.Shared.Input public static readonly BoundKeyFunction ShuttleRotateLeft = "ShuttleRotateLeft"; public static readonly BoundKeyFunction ShuttleRotateRight = "ShuttleRotateRight"; public static readonly BoundKeyFunction ShuttleBrake = "ShuttleBrake"; + public static readonly BoundKeyFunction Hotbar0 = "Hotbar0"; public static readonly BoundKeyFunction Hotbar1 = "Hotbar1"; public static readonly BoundKeyFunction Hotbar2 = "Hotbar2"; @@ -67,6 +68,13 @@ namespace Content.Shared.Input public static readonly BoundKeyFunction Hotbar7 = "Hotbar7"; public static readonly BoundKeyFunction Hotbar8 = "Hotbar8"; public static readonly BoundKeyFunction Hotbar9 = "Hotbar9"; + + public static BoundKeyFunction[] GetHotbarBoundKeys() => + new[] + { + Hotbar0, Hotbar1, Hotbar2, Hotbar3, Hotbar4, Hotbar5, Hotbar6, Hotbar7, Hotbar8, Hotbar9 + }; + public static readonly BoundKeyFunction Loadout1 = "Loadout1"; public static readonly BoundKeyFunction Loadout2 = "Loadout2"; public static readonly BoundKeyFunction Loadout3 = "Loadout3"; @@ -76,6 +84,13 @@ namespace Content.Shared.Input public static readonly BoundKeyFunction Loadout7 = "Loadout7"; public static readonly BoundKeyFunction Loadout8 = "Loadout8"; public static readonly BoundKeyFunction Loadout9 = "Loadout9"; + + public static BoundKeyFunction[] GetLoadoutBoundKeys() => + new[] + { + Loadout1, Loadout2, Loadout3, Loadout4, Loadout5, Loadout6, Loadout7, Loadout8, Loadout9 + }; + public static readonly BoundKeyFunction Vote0 = "Vote0"; public static readonly BoundKeyFunction Vote1 = "Vote1"; public static readonly BoundKeyFunction Vote2 = "Vote2"; diff --git a/Resources/Prototypes/themes.yml b/Resources/Prototypes/themes.yml new file mode 100644 index 0000000000..30a6ec3591 --- /dev/null +++ b/Resources/Prototypes/themes.yml @@ -0,0 +1,42 @@ +- type: uiTheme + id: SS14DefaultTheme + path: /Textures/Interface/Default/ + colors: + whiteText: "#FFF5EE" + slotSelectedGold: "#e6b812" + slotColor: "#0f1215" + slotOutline: "#333850" + slotText: "#333850" + nanoGold: "#A88B5E" + goodGreenFore: "#31843E" + concerningOrangeFore: "#A5762F" + dangerousRedFore: "#BB3232" + disabledFore: "#5A5A5A" +- type: uiTheme + id: SS14ClassicTheme + path: /Textures/Interface/Classic/ + colors: + whiteText: "#FFF5EE" + slotSelectedGold: "#e6b812" + slotColor: "#0f1215" + slotOutline: "#333850" + slotText: "#333850" + nanoGold: "#A88B5E" + goodGreenFore: "#31843E" + concerningOrangeFore: "#A5762F" + dangerousRedFore: "#BB3232" + disabledFore: "#5A5A5A" +- type: uiTheme + id: SS14ModernizedTheme + path: /Textures/Interface/Modernized/ + colors: + whiteText: "#FFF5EE" + slotSelectedGold: "#e6b812" + slotColor: "#0f1215" + slotOutline: "#333850" + slotText: "#333850" + nanoGold: "#A88B5E" + goodGreenFore: "#31843E" + concerningOrangeFore: "#A5762F" + dangerousRedFore: "#BB3232" + disabledFore: "#5A5A5A"