diff --git a/Content.Client/ClientContentIoC.cs b/Content.Client/ClientContentIoC.cs index 841ed7d44a..d63ad75a32 100644 --- a/Content.Client/ClientContentIoC.cs +++ b/Content.Client/ClientContentIoC.cs @@ -13,6 +13,7 @@ using Content.Client.UserInterface.AdminMenu; using Content.Client.UserInterface.Stylesheets; using Content.Client.Utility; using Content.Shared.Interfaces; +using Content.Shared.Alert; using Robust.Shared.IoC; namespace Content.Client @@ -37,6 +38,7 @@ namespace Content.Client IoCManager.Register(); IoCManager.Register(); IoCManager.Register(); + IoCManager.Register(); IoCManager.Register(); IoCManager.Register(); } diff --git a/Content.Client/Commands/ToggleOutlineCommand.cs b/Content.Client/Commands/ToggleOutlineCommand.cs index a96c9e40a5..ca96762eac 100644 --- a/Content.Client/Commands/ToggleOutlineCommand.cs +++ b/Content.Client/Commands/ToggleOutlineCommand.cs @@ -1,3 +1,4 @@ +using Content.Shared; using Robust.Client.Interfaces.Console; using Robust.Shared.Interfaces.Configuration; using Robust.Shared.IoC; @@ -14,10 +15,13 @@ namespace Content.Client.Commands public bool Execute(IDebugConsole console, params string[] args) { - var _configurationManager = IoCManager.Resolve(); - var old = _configurationManager.GetCVar("outline.enabled"); - _configurationManager.SetCVar("outline.enabled", !old); - console.AddLine($"Draw outlines set to: {_configurationManager.GetCVar("outline.enabled")}"); + var configurationManager = IoCManager.Resolve(); + var cvar = CCVars.OutlineEnabled; + var old = configurationManager.GetCVar(cvar); + + configurationManager.SetCVar(cvar, !old); + console.AddLine($"Draw outlines set to: {configurationManager.GetCVar(cvar)}"); + return false; } } diff --git a/Content.Client/EntryPoint.cs b/Content.Client/EntryPoint.cs index d3fa1057f8..024a9a2d9f 100644 --- a/Content.Client/EntryPoint.cs +++ b/Content.Client/EntryPoint.cs @@ -24,6 +24,7 @@ using Content.Shared.GameObjects.Components.Power.AME; using Content.Shared.GameObjects.Components.Research; using Content.Shared.GameObjects.Components.VendingMachines; using Content.Shared.Kitchen; +using Content.Shared.Alert; using Robust.Client; using Robust.Client.Interfaces; using Robust.Client.Interfaces.Graphics.Overlays; @@ -104,8 +105,6 @@ namespace Content.Client { IoCManager.Resolve().CreateNewMapEntity(MapId.Nullspace); }; - - _configurationManager.RegisterCVar("outline.enabled", true); } /// @@ -156,6 +155,7 @@ namespace Content.Client IoCManager.Resolve().Initialize(); IoCManager.Resolve().Initialize(); IoCManager.Resolve().Initialize(); + IoCManager.Resolve().Initialize(); _baseClient.RunLevelChanged += (sender, args) => { diff --git a/Content.Client/GameObjects/Components/Body/Mechanism/HeartBehaviorComponent.cs b/Content.Client/GameObjects/Components/Body/Mechanism/HeartBehaviorComponent.cs deleted file mode 100644 index 0131117d81..0000000000 --- a/Content.Client/GameObjects/Components/Body/Mechanism/HeartBehaviorComponent.cs +++ /dev/null @@ -1,12 +0,0 @@ -using Content.Shared.GameObjects.Components.Body.Behavior; -using Robust.Shared.GameObjects; - -namespace Content.Client.GameObjects.Components.Body.Mechanism -{ - [RegisterComponent] - [ComponentReference(typeof(SharedHeartBehaviorComponent))] - public class HeartBehaviorComponent : SharedHeartBehaviorComponent - { - public override void Update(float frameTime) { } - } -} diff --git a/Content.Client/GameObjects/Components/Configuration/ConfigurationBoundUserInterface.cs b/Content.Client/GameObjects/Components/Configuration/ConfigurationBoundUserInterface.cs index d173f061ed..97bcdf20b6 100644 --- a/Content.Client/GameObjects/Components/Configuration/ConfigurationBoundUserInterface.cs +++ b/Content.Client/GameObjects/Components/Configuration/ConfigurationBoundUserInterface.cs @@ -49,6 +49,7 @@ namespace Content.Client.GameObjects.Components.Wires { base.Dispose(disposing); + _menu.OnClose -= Close; _menu.Close(); } } diff --git a/Content.Client/GameObjects/Components/Configuration/ConfigurationMenu.cs b/Content.Client/GameObjects/Components/Configuration/ConfigurationMenu.cs index f3a2141d60..6e0b65d9a2 100644 --- a/Content.Client/GameObjects/Components/Configuration/ConfigurationMenu.cs +++ b/Content.Client/GameObjects/Components/Configuration/ConfigurationMenu.cs @@ -1,5 +1,4 @@ using System.Collections.Generic; -using Namotion.Reflection; using Robust.Client.UserInterface; using Robust.Client.UserInterface.Controls; using Robust.Client.UserInterface.CustomControls; @@ -142,7 +141,7 @@ namespace Content.Client.GameObjects.Components.Wires private void OnConfirm(ButtonEventArgs args) { - var config = GenerateDictionary(_inputs, "Text"); + var config = GenerateDictionary(_inputs, "Text"); Owner.SendConfiguration(config); Close(); @@ -153,13 +152,13 @@ namespace Content.Client.GameObjects.Components.Wires return Owner.Validation == null || Owner.Validation.IsMatch(value); } - private Dictionary GenerateDictionary(List<(string name, TInput input)> inputs, string propertyName) where TInput : Control + private Dictionary GenerateDictionary(IEnumerable<(string name, LineEdit input)> inputs, string propertyName) { - var dictionary = new Dictionary(); + var dictionary = new Dictionary(); + foreach (var input in inputs) { - var value = input.input.TryGetPropertyValue(propertyName); - dictionary.Add(input.name, value); + dictionary.Add(input.name, input.input.Text); } return dictionary; diff --git a/Content.Client/GameObjects/Components/Mobs/AlertControl.cs b/Content.Client/GameObjects/Components/Mobs/AlertControl.cs new file mode 100644 index 0000000000..b1a60f5fc9 --- /dev/null +++ b/Content.Client/GameObjects/Components/Mobs/AlertControl.cs @@ -0,0 +1,93 @@ +#nullable enable +using System; +using Content.Client.UserInterface; +using Content.Client.Utility; +using Content.Shared.Alert; +using OpenToolkit.Mathematics; +using Robust.Client.Interfaces.ResourceManagement; +using Robust.Client.UserInterface.Controls; + +namespace Content.Client.GameObjects.Components.Mobs +{ + public class AlertControl : BaseButton + { + public AlertPrototype Alert { get; } + + /// + /// Total duration of the cooldown in seconds. Null if no duration / cooldown. + /// + public int? TotalDuration { get; set; } + + private short? _severity; + private readonly TextureRect _icon; + private CooldownGraphic _cooldownGraphic; + + private readonly IResourceCache _resourceCache; + + + /// + /// Creates an alert control reflecting the indicated alert + state + /// + /// alert to display + /// severity of alert, null if alert doesn't have severity levels + /// resourceCache to use to load alert icon textures + public AlertControl(AlertPrototype alert, short? severity, IResourceCache resourceCache) + { + _resourceCache = resourceCache; + Alert = alert; + _severity = severity; + var texture = _resourceCache.GetTexture(alert.GetIconPath(_severity)); + _icon = new TextureRect + { + TextureScale = (2, 2), + Texture = texture + }; + + Children.Add(_icon); + _cooldownGraphic = new CooldownGraphic(); + Children.Add(_cooldownGraphic); + + } + + /// + /// Change the alert severity, changing the displayed icon + /// + public void SetSeverity(short? severity) + { + if (_severity != severity) + { + _severity = severity; + _icon.Texture = _resourceCache.GetTexture(Alert.GetIconPath(_severity)); + } + } + + /// + /// Updates the displayed cooldown amount, doing nothing if alertCooldown is null + /// + /// cooldown start and end + /// current game time + public void UpdateCooldown((TimeSpan Start, TimeSpan End)? alertCooldown, in TimeSpan curTime) + { + if (!alertCooldown.HasValue) + { + _cooldownGraphic.Progress = 0; + _cooldownGraphic.Visible = false; + TotalDuration = null; + } + else + { + + var start = alertCooldown.Value.Start; + var end = alertCooldown.Value.End; + + var length = (end - start).TotalSeconds; + var progress = (curTime - start).TotalSeconds / length; + var ratio = (progress <= 1 ? (1 - progress) : (curTime - end).TotalSeconds * -5); + + TotalDuration = (int?) Math.Round(length); + _cooldownGraphic.Progress = MathHelper.Clamp((float)ratio, -1, 1); + _cooldownGraphic.Visible = ratio > -1f; + } + } + } +} diff --git a/Content.Client/GameObjects/Components/Mobs/ClientAlertsComponent.cs b/Content.Client/GameObjects/Components/Mobs/ClientAlertsComponent.cs new file mode 100644 index 0000000000..8dbbed08b5 --- /dev/null +++ b/Content.Client/GameObjects/Components/Mobs/ClientAlertsComponent.cs @@ -0,0 +1,345 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using Content.Client.UserInterface; +using Content.Client.UserInterface.Stylesheets; +using Content.Client.Utility; +using Content.Shared.Alert; +using Content.Shared.GameObjects.Components.Mobs; +using Robust.Client.GameObjects; +using Robust.Client.Interfaces.Graphics; +using Robust.Client.Interfaces.ResourceManagement; +using Robust.Client.Interfaces.UserInterface; +using Robust.Client.Player; +using Robust.Client.UserInterface; +using Robust.Client.UserInterface.Controls; +using Robust.Shared.GameObjects; +using Robust.Shared.Input; +using Robust.Shared.Interfaces.GameObjects; +using Robust.Shared.Interfaces.Timing; +using Robust.Shared.IoC; +using Robust.Shared.Log; +using Robust.Shared.Maths; +using Robust.Shared.Prototypes; +using Robust.Shared.Utility; +using Robust.Shared.ViewVariables; +using Serilog; + +namespace Content.Client.GameObjects.Components.Mobs +{ + /// + [RegisterComponent] + [ComponentReference(typeof(SharedAlertsComponent))] + public sealed class ClientAlertsComponent : SharedAlertsComponent + { + private static readonly float TooltipTextMaxWidth = 265; + + [Dependency] private readonly IPlayerManager _playerManager = default!; + [Dependency] private readonly IResourceCache _resourceCache = default!; + [Dependency] private readonly IGameTiming _gameTiming = default!; + + private AlertsUI _ui; + private PanelContainer _tooltip; + private RichTextLabel _stateName; + private RichTextLabel _stateDescription; + private RichTextLabel _stateCooldown; + private AlertOrderPrototype _alertOrder; + private bool _tooltipReady; + + [ViewVariables] + private Dictionary _alertControls + = new Dictionary(); + + /// + /// Allows calculating if we need to act due to this component being controlled by the current mob + /// TODO: should be revisited after space-wizards/RobustToolbox#1255 + /// + [ViewVariables] + private bool CurrentlyControlled => _playerManager.LocalPlayer != null && _playerManager.LocalPlayer.ControlledEntity == Owner; + + protected override void Shutdown() + { + base.Shutdown(); + PlayerDetached(); + } + + public override void HandleMessage(ComponentMessage message, IComponent component) + { + base.HandleMessage(message, component); + switch (message) + { + case PlayerAttachedMsg _: + PlayerAttached(); + break; + case PlayerDetachedMsg _: + PlayerDetached(); + break; + } + } + + public override void HandleComponentState(ComponentState curState, ComponentState nextState) + { + base.HandleComponentState(curState, nextState); + + if (!(curState is AlertsComponentState state)) + { + return; + } + + // update the dict of states based on the array we got in the message + SetAlerts(state.Alerts); + + UpdateAlertsControls(); + } + + private void PlayerAttached() + { + if (!CurrentlyControlled || _ui != null) + { + return; + } + + _alertOrder = IoCManager.Resolve().EnumeratePrototypes().FirstOrDefault(); + if (_alertOrder == null) + { + Logger.ErrorS("alert", "no alertOrder prototype found, alerts will be in random order"); + } + + _ui = new AlertsUI(IoCManager.Resolve()); + var uiManager = IoCManager.Resolve(); + uiManager.StateRoot.AddChild(_ui); + + _tooltip = new PanelContainer + { + Visible = false, + StyleClasses = { StyleNano.StyleClassTooltipPanel } + }; + var tooltipVBox = new VBoxContainer + { + RectClipContent = true + }; + _tooltip.AddChild(tooltipVBox); + _stateName = new RichTextLabel + { + MaxWidth = TooltipTextMaxWidth, + StyleClasses = { StyleNano.StyleClassTooltipAlertTitle } + }; + tooltipVBox.AddChild(_stateName); + _stateDescription = new RichTextLabel + { + MaxWidth = TooltipTextMaxWidth, + StyleClasses = { StyleNano.StyleClassTooltipAlertDescription } + }; + tooltipVBox.AddChild(_stateDescription); + _stateCooldown = new RichTextLabel + { + MaxWidth = TooltipTextMaxWidth, + StyleClasses = { StyleNano.StyleClassTooltipAlertCooldown } + }; + tooltipVBox.AddChild(_stateCooldown); + + uiManager.PopupRoot.AddChild(_tooltip); + + UpdateAlertsControls(); + } + + private void PlayerDetached() + { + _ui?.Dispose(); + _ui = null; + _alertControls.Clear(); + } + + /// + /// Updates the displayed alerts based on current state of Alerts, performing + /// a diff to ensure we only change what's changed (this avoids active tooltips disappearing any + /// time state changes) + /// + private void UpdateAlertsControls() + { + if (!CurrentlyControlled || _ui == null) + { + return; + } + + // remove any controls with keys no longer present + var toRemove = new List(); + foreach (var existingKey in _alertControls.Keys) + { + if (!IsShowingAlert(existingKey)) + { + toRemove.Add(existingKey); + } + } + + foreach (var alertKeyToRemove in toRemove) + { + // remove and dispose the control + _alertControls.Remove(alertKeyToRemove, out var control); + control?.Dispose(); + } + + // now we know that alertControls contains alerts that should still exist but + // may need to updated, + // also there may be some new alerts we need to show. + // further, we need to ensure they are ordered w.r.t their configured order + foreach (var alertStatus in EnumerateAlertStates()) + { + if (!AlertManager.TryDecode(alertStatus.AlertEncoded, out var newAlert)) + { + Logger.ErrorS("alert", "Unable to decode alert {0}", alertStatus.AlertEncoded); + continue; + } + + if (_alertControls.TryGetValue(newAlert.AlertKey, out var existingAlertControl) && + existingAlertControl.Alert.AlertType == newAlert.AlertType) + { + // id is the same, simply update the existing control severity + existingAlertControl.SetSeverity(alertStatus.Severity); + } + else + { + existingAlertControl?.Dispose(); + + // this is a new alert + alert key or just a different alert with the same + // key, create the control and add it in the appropriate order + var newAlertControl = CreateAlertControl(newAlert, alertStatus); + if (_alertOrder != null) + { + var added = false; + foreach (var alertControl in _ui.Grid.Children) + { + if (_alertOrder.Compare(newAlert, ((AlertControl) alertControl).Alert) < 0) + { + var idx = alertControl.GetPositionInParent(); + _ui.Grid.Children.Add(newAlertControl); + newAlertControl.SetPositionInParent(idx); + added = true; + break; + } + } + + if (!added) + { + _ui.Grid.Children.Add(newAlertControl); + } + } + else + { + _ui.Grid.Children.Add(newAlertControl); + } + + _alertControls[newAlert.AlertKey] = newAlertControl; + } + } + } + + private AlertControl CreateAlertControl(AlertPrototype alert, AlertState alertState) + { + + var alertControl = new AlertControl(alert, alertState.Severity, _resourceCache); + // show custom tooltip for the status control + alertControl.OnShowTooltip += AlertOnOnShowTooltip; + alertControl.OnHideTooltip += AlertOnOnHideTooltip; + + alertControl.OnPressed += AlertControlOnPressed; + + return alertControl; + } + + private void AlertControlOnPressed(BaseButton.ButtonEventArgs args) + { + AlertPressed(args, args.Button as AlertControl); + } + + private void AlertOnOnHideTooltip(object sender, EventArgs e) + { + _tooltipReady = false; + _tooltip.Visible = false; + } + + private void AlertOnOnShowTooltip(object sender, EventArgs e) + { + var alertControl = (AlertControl) sender; + _stateName.SetMessage(alertControl.Alert.Name); + _stateDescription.SetMessage(alertControl.Alert.Description); + // check for a cooldown + if (alertControl.TotalDuration != null && alertControl.TotalDuration > 0) + { + _stateCooldown.SetMessage(FormattedMessage.FromMarkup("[color=#776a6a]" + + alertControl.TotalDuration + + " sec cooldown[/color]")); + _stateCooldown.Visible = true; + } + else + { + _stateCooldown.Visible = false; + } + // TODO: Text display of cooldown + Tooltips.PositionTooltip(_tooltip); + // if we set it visible here the size of the previous tooltip will flicker for a frame, + // so instead we wait until FrameUpdate to make it visible + _tooltipReady = true; + } + + private void AlertPressed(BaseButton.ButtonEventArgs args, AlertControl alert) + { + if (args.Event.Function != EngineKeyFunctions.UIClick) + { + return; + } + + if (AlertManager.TryEncode(alert.Alert, out var encoded)) + { + SendNetworkMessage(new ClickAlertMessage(encoded)); + } + else + { + Logger.ErrorS("alert", "unable to encode alert {0}", alert.Alert.AlertType); + } + + } + + public void FrameUpdate(float frameTime) + { + if (_tooltipReady) + { + _tooltipReady = false; + _tooltip.Visible = true; + } + foreach (var (alertKey, alertControl) in _alertControls) + { + // reconcile all alert controls with their current cooldowns + if (TryGetAlertState(alertKey, out var alertState)) + { + alertControl.UpdateCooldown(alertState.Cooldown, _gameTiming.CurTime); + } + else + { + Logger.WarningS("alert", "coding error - no alert state for alert {0} " + + "even though we had an AlertControl for it, this" + + " should never happen", alertControl.Alert.AlertType); + } + + } + } + + protected override void AfterClearAlert() + { + UpdateAlertsControls(); + } + + public override void OnRemove() + { + base.OnRemove(); + + foreach (var alertControl in _alertControls.Values) + { + alertControl.OnShowTooltip -= AlertOnOnShowTooltip; + alertControl.OnHideTooltip -= AlertOnOnHideTooltip; + alertControl.OnPressed -= AlertControlOnPressed; + } + + } + } +} diff --git a/Content.Client/GameObjects/Components/Mobs/ClientStatusEffectsComponent.cs b/Content.Client/GameObjects/Components/Mobs/ClientStatusEffectsComponent.cs deleted file mode 100644 index bd292db23f..0000000000 --- a/Content.Client/GameObjects/Components/Mobs/ClientStatusEffectsComponent.cs +++ /dev/null @@ -1,200 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using Content.Client.UserInterface; -using Content.Client.Utility; -using Content.Shared.GameObjects.Components.Mobs; -using Robust.Client.GameObjects; -using Robust.Client.Interfaces.ResourceManagement; -using Robust.Client.Interfaces.UserInterface; -using Robust.Client.Player; -using Robust.Client.UserInterface.Controls; -using Robust.Shared.GameObjects; -using Robust.Shared.Input; -using Robust.Shared.Interfaces.GameObjects; -using Robust.Shared.Interfaces.Timing; -using Robust.Shared.IoC; -using Robust.Shared.Maths; -using Robust.Shared.ViewVariables; - -namespace Content.Client.GameObjects.Components.Mobs -{ - /// - [RegisterComponent] - [ComponentReference(typeof(SharedStatusEffectsComponent))] - public sealed class ClientStatusEffectsComponent : SharedStatusEffectsComponent - { - [Dependency] private readonly IPlayerManager _playerManager = default!; - [Dependency] private readonly IResourceCache _resourceCache = default!; - [Dependency] private readonly IUserInterfaceManager _userInterfaceManager = default!; - [Dependency] private readonly IGameTiming _gameTiming = default!; - - private StatusEffectsUI _ui; - [ViewVariables] - private Dictionary _status = new Dictionary(); - [ViewVariables] - private Dictionary _cooldown = new Dictionary(); - - public override IReadOnlyDictionary Statuses => _status; - - /// - /// Allows calculating if we need to act due to this component being controlled by the current mob - /// - [ViewVariables] - private bool CurrentlyControlled => _playerManager.LocalPlayer != null && _playerManager.LocalPlayer.ControlledEntity == Owner; - - protected override void Shutdown() - { - base.Shutdown(); - PlayerDetached(); - } - - public override void HandleMessage(ComponentMessage message, IComponent component) - { - base.HandleMessage(message, component); - switch (message) - { - case PlayerAttachedMsg _: - PlayerAttached(); - break; - case PlayerDetachedMsg _: - PlayerDetached(); - break; - } - } - - public override void HandleComponentState(ComponentState curState, ComponentState nextState) - { - base.HandleComponentState(curState, nextState); - - if (!(curState is StatusEffectComponentState state) || _status == state.StatusEffects) - { - return; - } - - _status = state.StatusEffects; - UpdateStatusEffects(); - } - - private void PlayerAttached() - { - if (!CurrentlyControlled || _ui != null) - { - return; - } - _ui = new StatusEffectsUI(); - _userInterfaceManager.StateRoot.AddChild(_ui); - UpdateStatusEffects(); - } - - private void PlayerDetached() - { - _ui?.Dispose(); - _ui = null; - _cooldown.Clear(); - } - - public override void ChangeStatusEffectIcon(StatusEffect effect, string icon) - { - if (_status.TryGetValue(effect, out var value) && - value.Icon == icon) - { - return; - } - - _status[effect] = new StatusEffectStatus - { - Icon = icon, - Cooldown = value.Cooldown - }; - - Dirty(); - } - - public void UpdateStatusEffects() - { - if (!CurrentlyControlled || _ui == null) - { - return; - } - _cooldown.Clear(); - _ui.VBox.DisposeAllChildren(); - - foreach (var (key, effect) in _status.OrderBy(x => (int) x.Key)) - { - var texture = _resourceCache.GetTexture(effect.Icon); - var status = new StatusControl(key, texture) - { - ToolTip = key.ToString() - }; - - if (effect.Cooldown.HasValue) - { - var cooldown = new CooldownGraphic(); - status.Children.Add(cooldown); - _cooldown[key] = cooldown; - } - - status.OnPressed += args => StatusPressed(args, status); - - _ui.VBox.AddChild(status); - } - } - - private void StatusPressed(BaseButton.ButtonEventArgs args, StatusControl status) - { - if (args.Event.Function != EngineKeyFunctions.UIClick) - { - return; - } - - SendNetworkMessage(new ClickStatusMessage(status.Effect)); - } - - public override void RemoveStatusEffect(StatusEffect effect) - { - if (!_status.Remove(effect)) - { - return; - } - - UpdateStatusEffects(); - Dirty(); - } - - public void FrameUpdate(float frameTime) - { - foreach (var (effect, cooldownGraphic) in _cooldown) - { - var status = _status[effect]; - if (!status.Cooldown.HasValue) - { - cooldownGraphic.Progress = 0; - cooldownGraphic.Visible = false; - continue; - } - - var start = status.Cooldown.Value.Item1; - var end = status.Cooldown.Value.Item2; - - var length = (end - start).TotalSeconds; - var progress = (_gameTiming.CurTime - start).TotalSeconds / length; - var ratio = (progress <= 1 ? (1 - progress) : (_gameTiming.CurTime - end).TotalSeconds * -5); - - cooldownGraphic.Progress = MathHelper.Clamp((float)ratio, -1, 1); - cooldownGraphic.Visible = ratio > -1f; - } - } - - public override void ChangeStatusEffect(StatusEffect effect, string icon, (TimeSpan, TimeSpan)? cooldown) - { - _status[effect] = new StatusEffectStatus() - { - Icon = icon, - Cooldown = cooldown - }; - - Dirty(); - } - } -} diff --git a/Content.Client/GameObjects/Components/Mobs/MeleeLungeComponent.cs b/Content.Client/GameObjects/Components/Mobs/MeleeLungeComponent.cs index 4dc93ac708..88fe6e7eb2 100644 --- a/Content.Client/GameObjects/Components/Mobs/MeleeLungeComponent.cs +++ b/Content.Client/GameObjects/Components/Mobs/MeleeLungeComponent.cs @@ -1,4 +1,4 @@ -using Robust.Client.GameObjects; +using Robust.Client.GameObjects; using Robust.Client.Interfaces.GameObjects.Components; using Robust.Shared.GameObjects; using Robust.Shared.Maths; @@ -39,15 +39,6 @@ namespace Content.Client.GameObjects.Components.Mobs offset *= (ResetTime - _time) / ResetTime; } - if (Owner.TryGetComponent(out CameraRecoilComponent recoilComponent)) - { - recoilComponent.BaseOffset = offset; - } - else if (Owner.TryGetComponent(out EyeComponent eyeComponent)) - { - eyeComponent.Offset = offset; - } - if (Owner.TryGetComponent(out ISpriteComponent spriteComponent)) { // We have to account for rotation so the offset still checks out. diff --git a/Content.Client/GameObjects/Components/Mobs/StatusControl.cs b/Content.Client/GameObjects/Components/Mobs/StatusControl.cs deleted file mode 100644 index 7df0225a90..0000000000 --- a/Content.Client/GameObjects/Components/Mobs/StatusControl.cs +++ /dev/null @@ -1,25 +0,0 @@ -#nullable enable -using Content.Shared.GameObjects.Components.Mobs; -using Robust.Client.Graphics; -using Robust.Client.UserInterface.Controls; - -namespace Content.Client.GameObjects.Components.Mobs -{ - public class StatusControl : BaseButton - { - public readonly StatusEffect Effect; - - public StatusControl(StatusEffect effect, Texture? texture) - { - Effect = effect; - - var item = new TextureRect - { - TextureScale = (2, 2), - Texture = texture - }; - - Children.Add(item); - } - } -} diff --git a/Content.Client/GameObjects/Components/Morgue/CrematoriumVisualizer.cs b/Content.Client/GameObjects/Components/Morgue/CrematoriumVisualizer.cs index b7b5b9d8c8..861cb577a0 100644 --- a/Content.Client/GameObjects/Components/Morgue/CrematoriumVisualizer.cs +++ b/Content.Client/GameObjects/Components/Morgue/CrematoriumVisualizer.cs @@ -44,12 +44,14 @@ namespace Content.Client.GameObjects.Components.Storage if (!component.Owner.TryGetComponent(out ISpriteComponent? sprite)) return; - sprite.LayerSetState( - CrematoriumVisualLayers.Base, - component.GetData(MorgueVisuals.Open) - ? _stateOpen - : _stateClosed - ); + if (component.TryGetData(MorgueVisuals.Open, out bool open)) + { + sprite.LayerSetState(CrematoriumVisualLayers.Base, open ? _stateOpen : _stateClosed); + } + else + { + sprite.LayerSetState(CrematoriumVisualLayers.Base, _stateClosed); + } var lightState = ""; if (component.TryGetData(MorgueVisuals.HasContents, out bool hasContents) && hasContents) lightState = _lightContents; diff --git a/Content.Client/GameObjects/Components/Morgue/MorgueVisualizer.cs b/Content.Client/GameObjects/Components/Morgue/MorgueVisualizer.cs index 9f0a10305e..25747c1a36 100644 --- a/Content.Client/GameObjects/Components/Morgue/MorgueVisualizer.cs +++ b/Content.Client/GameObjects/Components/Morgue/MorgueVisualizer.cs @@ -49,12 +49,14 @@ namespace Content.Client.GameObjects.Components.Storage if (!component.Owner.TryGetComponent(out ISpriteComponent? sprite)) return; - sprite.LayerSetState( - MorgueVisualLayers.Base, - component.GetData(MorgueVisuals.Open) - ? _stateOpen - : _stateClosed - ); + if (component.TryGetData(MorgueVisuals.Open, out bool open)) + { + sprite.LayerSetState(MorgueVisualLayers.Base, open ? _stateOpen : _stateClosed); + } + else + { + sprite.LayerSetState(MorgueVisualLayers.Base, _stateClosed); + } var lightState = ""; if (component.TryGetData(MorgueVisuals.HasContents, out bool hasContents) && hasContents) lightState = _lightContents; diff --git a/Content.Client/GameObjects/Components/PDA/PDABoundUserInterface.cs b/Content.Client/GameObjects/Components/PDA/PDABoundUserInterface.cs index b5ad84b435..1ba1ce1eea 100644 --- a/Content.Client/GameObjects/Components/PDA/PDABoundUserInterface.cs +++ b/Content.Client/GameObjects/Components/PDA/PDABoundUserInterface.cs @@ -23,7 +23,7 @@ namespace Content.Client.GameObjects.Components.PDA [Dependency] private readonly IUserInterfaceManager _userInterfaceManager = default!; private PDAMenu _menu; - private PDAMenuPopup failPopup; + private PDAMenuPopup _failPopup; public PDABoundUserInterface(ClientUserInterfaceComponent owner, object uiKey) : base(owner, uiKey) { @@ -47,6 +47,11 @@ namespace Content.Client.GameObjects.Components.PDA SendMessage(new PDAEjectIDMessage()); }; + _menu.EjectPenButton.OnPressed += args => + { + SendMessage(new PDAEjectPenMessage()); + }; + _menu.MasterTabContainer.OnTabChanged += i => { var tab = _menu.MasterTabContainer.GetChild(i); @@ -60,12 +65,12 @@ namespace Content.Client.GameObjects.Components.PDA { if (_menu.CurrentLoggedInAccount.DataBalance < listing.Price) { - failPopup = new PDAMenuPopup(Loc.GetString("Insufficient funds!")); - _userInterfaceManager.ModalRoot.AddChild(failPopup); - failPopup.Open(UIBox2.FromDimensions(_menu.Position.X + 150, _menu.Position.Y + 60, 156, 24)); + _failPopup = new PDAMenuPopup(Loc.GetString("Insufficient funds!")); + _userInterfaceManager.ModalRoot.AddChild(_failPopup); + _failPopup.Open(UIBox2.FromDimensions(_menu.Position.X + 150, _menu.Position.Y + 60, 156, 24)); _menu.OnClose += () => { - failPopup.Dispose(); + _failPopup.Dispose(); }; } @@ -106,6 +111,7 @@ namespace Content.Client.GameObjects.Components.PDA } _menu.EjectIDButton.Visible = msg.PDAOwnerInfo.IdOwner != null; + _menu.EjectPenButton.Visible = msg.HasPen; if (msg.Account != null) { _menu.CurrentLoggedInAccount = msg.Account; @@ -220,6 +226,7 @@ namespace Content.Client.GameObjects.Components.PDA public Button FlashLightToggleButton { get; } public Button EjectIDButton { get; } + public Button EjectPenButton { get; } public TabContainer MasterTabContainer; @@ -288,13 +295,20 @@ namespace Content.Client.GameObjects.Components.PDA SizeFlagsHorizontal = SizeFlags.ShrinkCenter, SizeFlagsVertical = SizeFlags.ShrinkCenter }; + EjectPenButton = new Button + { + Text = Loc.GetString("Eject Pen"), + SizeFlagsHorizontal = SizeFlags.ShrinkCenter, + SizeFlagsVertical = SizeFlags.ShrinkCenter + }; var innerHBoxContainer = new HBoxContainer { Children = { IDInfoLabel, - EjectIDButton + EjectIDButton, + EjectPenButton } }; diff --git a/Content.Client/GameObjects/EntitySystems/AI/ClientAiDebugSystem.cs b/Content.Client/GameObjects/EntitySystems/AI/ClientAiDebugSystem.cs index 70ab6690bb..943a057714 100644 --- a/Content.Client/GameObjects/EntitySystems/AI/ClientAiDebugSystem.cs +++ b/Content.Client/GameObjects/EntitySystems/AI/ClientAiDebugSystem.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using Content.Client.UserInterface.Stylesheets; using Content.Shared.AI; using Robust.Client.Interfaces.Graphics.ClientEye; using Robust.Client.Interfaces.UserInterface; @@ -178,7 +179,7 @@ namespace Content.Client.GameObjects.EntitySystems.AI var panel = new PanelContainer { - StyleClasses = {"tooltipBox"}, + StyleClasses = { StyleNano.StyleClassTooltipPanel }, Children = {vBox}, MouseFilter = Control.MouseFilterMode.Ignore, ModulateSelfOverride = Color.White.WithAlpha(0.75f), diff --git a/Content.Client/GameObjects/EntitySystems/StatusEffectsSystem.cs b/Content.Client/GameObjects/EntitySystems/AlertsSystem.cs similarity index 67% rename from Content.Client/GameObjects/EntitySystems/StatusEffectsSystem.cs rename to Content.Client/GameObjects/EntitySystems/AlertsSystem.cs index f7a2388368..107451f9ea 100644 --- a/Content.Client/GameObjects/EntitySystems/StatusEffectsSystem.cs +++ b/Content.Client/GameObjects/EntitySystems/AlertsSystem.cs @@ -5,7 +5,7 @@ using Robust.Shared.IoC; namespace Content.Client.GameObjects.EntitySystems { - public class StatusEffectsSystem : EntitySystem + public class AlertsSystem : EntitySystem { [Dependency] private readonly IGameTiming _gameTiming = default!; @@ -16,9 +16,9 @@ namespace Content.Client.GameObjects.EntitySystems if (!_gameTiming.IsFirstTimePredicted) return; - foreach (var clientStatusEffectsComponent in EntityManager.ComponentManager.EntityQuery()) + foreach (var clientAlertsComponent in EntityManager.ComponentManager.EntityQuery()) { - clientStatusEffectsComponent.FrameUpdate(frameTime); + clientAlertsComponent.FrameUpdate(frameTime); } } } diff --git a/Content.Client/GameObjects/EntitySystems/DoAfter/DoAfterBar.cs b/Content.Client/GameObjects/EntitySystems/DoAfter/DoAfterBar.cs index 982b5b9d12..b6a1af64da 100644 --- a/Content.Client/GameObjects/EntitySystems/DoAfter/DoAfterBar.cs +++ b/Content.Client/GameObjects/EntitySystems/DoAfter/DoAfterBar.cs @@ -56,23 +56,20 @@ namespace Content.Client.GameObjects.EntitySystems.DoAfter /// Is the cancellation bar red? /// private bool _flash = true; - + /// /// Last time we swapped the flash. /// private TimeSpan _lastFlash; - + /// /// How long each cancellation bar flash lasts in seconds. /// private const float FlashTime = 0.125f; - + private const int XPixelDiff = 20 * DoAfterBarScale; public const byte DoAfterBarScale = 2; - private static readonly Color StartColor = new Color(0.8f, 0.0f, 0.2f); // red - private static readonly Color EndColor = new Color(0.92f, 0.77f, 0.34f); // yellow - private static readonly Color CompletedColor = new Color(0.0f, 0.8f, 0.27f); // green public DoAfterBar() { @@ -108,28 +105,25 @@ namespace Content.Client.GameObjects.EntitySystems.DoAfter } color = new Color(1.0f, 0.0f, 0.0f, _flash ? 1.0f : 0.0f); - } + } else if (Ratio >= 1.0f) { - color = CompletedColor; + color = new Color(0f, 1f, 0f); } else { // lerp - color = new Color( - StartColor.R + (EndColor.R - StartColor.R) * Ratio, - StartColor.G + (EndColor.G - StartColor.G) * Ratio, - StartColor.B + (EndColor.B - StartColor.B) * Ratio, - StartColor.A); + var hue = (5f / 18f) * Ratio; + color = Color.FromHsv((hue, 1f, 0.75f, 1f)); } - + handle.UseShader(_shader); // If you want to make this less hard-coded be my guest var leftOffset = 2 * DoAfterBarScale; var box = new UIBox2i( - leftOffset, + leftOffset, -2 + 2 * DoAfterBarScale, - leftOffset + (int) (XPixelDiff * Ratio), + leftOffset + (int) (XPixelDiff * Ratio), -2); handle.DrawRect(box, color); } diff --git a/Content.Client/IgnoredComponents.cs b/Content.Client/IgnoredComponents.cs index b54be45138..38483522c7 100644 --- a/Content.Client/IgnoredComponents.cs +++ b/Content.Client/IgnoredComponents.cs @@ -58,7 +58,6 @@ "Drink", "Food", "FoodContainer", - "Stomach", "Rotatable", "MagicMirror", "FloorTile", @@ -180,10 +179,8 @@ "BreakableConstruction", "GasCanister", "GasCanisterPort", - "Lung", "Cleanable", "Configuration", - "Brain", "PlantHolder", "SeedExtractor", "Produce", diff --git a/Content.Client/Parallax/ParallaxManager.cs b/Content.Client/Parallax/ParallaxManager.cs index 441dbcaf08..a58c7710e9 100644 --- a/Content.Client/Parallax/ParallaxManager.cs +++ b/Content.Client/Parallax/ParallaxManager.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.IO; using System.Threading.Tasks; using Content.Client.Interfaces.Parallax; +using Content.Shared; using Nett; using Robust.Client.Graphics; using Robust.Client.Interfaces.ResourceManagement; @@ -34,12 +35,12 @@ namespace Content.Client.Parallax public async void LoadParallax() { - if (!_configurationManager.GetCVar("parallax.enabled")) + if (!_configurationManager.GetCVar(CCVars.ParallaxEnabled)) { return; } - var debugParallax = _configurationManager.GetCVar("parallax.debug"); + var debugParallax = _configurationManager.GetCVar(CCVars.ParallaxDebug); string contents; TomlTable table; // Load normal config into memory diff --git a/Content.Client/Sandbox/SandboxManager.cs b/Content.Client/Sandbox/SandboxManager.cs index bc36ba957c..5faff03d31 100644 --- a/Content.Client/Sandbox/SandboxManager.cs +++ b/Content.Client/Sandbox/SandboxManager.cs @@ -32,6 +32,7 @@ namespace Content.Client.Sandbox public Button ToggleSubfloorButton; public Button ShowMarkersButton; //Shows spawn points public Button ShowBbButton; //Shows bounding boxes + public Button MachineLinkingButton; // Enables/disables machine linking mode. public SandboxWindow() { @@ -77,6 +78,9 @@ namespace Content.Client.Sandbox ShowBbButton = new Button { Text = Loc.GetString("Show Bb"), ToggleMode = true }; vBox.AddChild(ShowBbButton); + + MachineLinkingButton = new Button { Text = Loc.GetString("Link machines"), ToggleMode = true }; + vBox.AddChild(MachineLinkingButton); } } @@ -186,6 +190,7 @@ namespace Content.Client.Sandbox _window.ToggleSubfloorButton.OnPressed += OnToggleSubfloorButtonClicked; _window.ShowMarkersButton.OnPressed += OnShowMarkersButtonClicked; _window.ShowBbButton.OnPressed += OnShowBbButtonClicked; + _window.MachineLinkingButton.OnPressed += OnMachineLinkingButtonClicked; _window.OpenCentered(); } @@ -241,6 +246,10 @@ namespace Content.Client.Sandbox { ShowBb(); } + private void OnMachineLinkingButtonClicked(BaseButton.ButtonEventArgs args) + { + LinkMachines(); + } private void OnGiveAdminAccessButtonClicked(BaseButton.ButtonEventArgs args) { @@ -318,5 +327,10 @@ namespace Content.Client.Sandbox { _console.ProcessCommand("showbb"); } + + private void LinkMachines() + { + _console.ProcessCommand("signallink"); + } } } diff --git a/Content.Client/State/GameScreenBase.cs b/Content.Client/State/GameScreenBase.cs index 3e0fa48f65..00e836ffd0 100644 --- a/Content.Client/State/GameScreenBase.cs +++ b/Content.Client/State/GameScreenBase.cs @@ -3,6 +3,7 @@ using System.Collections.Immutable; using System.Linq; using Content.Client.GameObjects.Components; using Content.Client.Utility; +using Content.Shared; using Robust.Client.GameObjects.EntitySystems; using Robust.Client.Interfaces.GameObjects; using Robust.Client.Interfaces.Graphics.ClientEye; @@ -71,7 +72,7 @@ namespace Content.Client.State } InteractionOutlineComponent outline; - if(!ConfigurationManager.GetCVar("outline.enabled")) + if(!ConfigurationManager.GetCVar(CCVars.OutlineEnabled)) { if(entityToClick != null && entityToClick.TryGetComponent(out outline)) { diff --git a/Content.Client/State/MainMenu.cs b/Content.Client/State/MainMenu.cs index 0d709c074d..b5f7503f49 100644 --- a/Content.Client/State/MainMenu.cs +++ b/Content.Client/State/MainMenu.cs @@ -8,6 +8,7 @@ using Robust.Client.Interfaces.UserInterface; using Robust.Client.ResourceManagement; using Robust.Client.UserInterface; using Robust.Client.UserInterface.Controls; +using Robust.Shared; using Robust.Shared.Interfaces.Configuration; using Robust.Shared.Interfaces.Network; using Robust.Shared.IoC; @@ -111,10 +112,10 @@ namespace Content.Client.State return; } - var configName = _configurationManager.GetCVar("player.name"); + var configName = _configurationManager.GetCVar(CVars.PlayerName); if (_mainMenuControl.UserNameBox.Text != configName) { - _configurationManager.SetCVar("player.name", inputName); + _configurationManager.SetCVar(CVars.PlayerName, inputName); _configurationManager.SaveToFile(); } @@ -248,7 +249,7 @@ namespace Content.Client.State vBox.AddChild(userNameHBox); userNameHBox.AddChild(new Label {Text = "Username:"}); - var currentUserName = _configurationManager.GetCVar("player.name"); + var currentUserName = _configurationManager.GetCVar(CVars.PlayerName); UserNameBox = new LineEdit { Text = currentUserName, PlaceHolder = "Username", diff --git a/Content.Client/UserInterface/AlertsUI.cs b/Content.Client/UserInterface/AlertsUI.cs new file mode 100644 index 0000000000..f4c7effac9 --- /dev/null +++ b/Content.Client/UserInterface/AlertsUI.cs @@ -0,0 +1,73 @@ +using System; +using Content.Client.UserInterface.Stylesheets; +using Robust.Client.Graphics.Drawing; +using Robust.Client.Interfaces.Graphics; +using Robust.Client.UserInterface; +using Robust.Client.UserInterface.Controls; +using Robust.Client.UserInterface.CustomControls; +using Robust.Shared.Maths; + +namespace Content.Client.UserInterface +{ + /// + /// The status effects display on the right side of the screen. + /// + public sealed class AlertsUI : Control + { + public GridContainer Grid { get; } + + private readonly IClyde _clyde; + + public AlertsUI(IClyde clyde) + { + _clyde = clyde; + var panelContainer = new PanelContainer + { + StyleClasses = {StyleNano.StyleClassTransparentBorderedWindowPanel}, + SizeFlagsVertical = SizeFlags.FillExpand, + }; + AddChild(panelContainer); + + Grid = new GridContainer + { + MaxHeight = CalcMaxHeight(clyde.ScreenSize), + ExpandBackwards = true + }; + panelContainer.AddChild(Grid); + clyde.OnWindowResized += ClydeOnOnWindowResized; + + LayoutContainer.SetGrowHorizontal(this, LayoutContainer.GrowDirection.Begin); + LayoutContainer.SetAnchorAndMarginPreset(this, LayoutContainer.LayoutPreset.TopRight, margin: 10); + LayoutContainer.SetMarginTop(this, 250); + } + + protected override void UIScaleChanged() + { + Grid.MaxHeight = CalcMaxHeight(_clyde.ScreenSize); + base.UIScaleChanged(); + } + + private void ClydeOnOnWindowResized(WindowResizedEventArgs obj) + { + // TODO: Can rework this once https://github.com/space-wizards/RobustToolbox/issues/1392 is done, + // this is here because there isn't currently a good way to allow the grid to adjust its height based + // on constraints, otherwise we would use anchors to lay it out + Grid.MaxHeight = CalcMaxHeight(obj.NewSize);; + } + + private float CalcMaxHeight(Vector2i screenSize) + { + return Math.Max(((screenSize.Y) / UIScale) - 420, 1); + } + + protected override void Dispose(bool disposing) + { + base.Dispose(disposing); + + if (disposing) + { + _clyde.OnWindowResized -= ClydeOnOnWindowResized; + } + } + } +} diff --git a/Content.Client/UserInterface/CharacterSetupGui.cs b/Content.Client/UserInterface/CharacterSetupGui.cs index 631e5ad55a..d93c8b7a59 100644 --- a/Content.Client/UserInterface/CharacterSetupGui.cs +++ b/Content.Client/UserInterface/CharacterSetupGui.cs @@ -149,7 +149,7 @@ namespace Content.Client.UserInterface PanelOverride = new StyleBoxFlat {BackgroundColor = StyleNano.NanoGold}, CustomMinimumSize = (2, 0) }); - _humanoidProfileEditor = new HumanoidProfileEditor(preferencesManager, prototypeManager); + _humanoidProfileEditor = new HumanoidProfileEditor(preferencesManager, prototypeManager, entityManager); _humanoidProfileEditor.OnProfileChanged += newProfile => { UpdateUI(); }; hBox.AddChild(_humanoidProfileEditor); @@ -158,6 +158,15 @@ namespace Content.Client.UserInterface preferencesManager.OnServerDataLoaded += UpdateUI; } + protected override void Dispose(bool disposing) + { + base.Dispose(disposing); + if (!disposing) + return; + + _preferencesManager.OnServerDataLoaded -= UpdateUI; + } + public void Save() => _humanoidProfileEditor.Save(); private void UpdateUI() @@ -283,7 +292,9 @@ namespace Content.Client.UserInterface protected override void Dispose(bool disposing) { base.Dispose(disposing); - if (!disposing) return; + if (!disposing) + return; + _previewDummy.Delete(); _previewDummy = null; } diff --git a/Content.Client/UserInterface/CooldownGraphic.cs b/Content.Client/UserInterface/CooldownGraphic.cs index a77972ab81..d281c73e99 100644 --- a/Content.Client/UserInterface/CooldownGraphic.cs +++ b/Content.Client/UserInterface/CooldownGraphic.cs @@ -27,29 +27,23 @@ namespace Content.Client.UserInterface /// Possible values range from 1 to -1, where 1 to 0 is a depleting circle animation and 0 to -1 is a blink animation. /// public float Progress { get; set; } - private static readonly Color StartColor = new Color(0.8f, 0.0f, 0.2f); // red - private static readonly Color EndColor = new Color(0.92f, 0.77f, 0.34f); // yellow - private static readonly Color CompletedColor = new Color(0.0f, 0.8f, 0.27f); // green protected override void Draw(DrawingHandleScreen handle) { - Span x = stackalloc float[10]; + Span x = new float[10]; Color color; var lerp = 1f - MathF.Abs(Progress); // for future bikeshedding purposes if (Progress >= 0f) { - color = new Color( - EndColor.R + (StartColor.R - EndColor.R) * Progress, - EndColor.G + (StartColor.G - EndColor.G) * Progress, - EndColor.B + (StartColor.B - EndColor.B) * Progress, - EndColor.A); + var hue = (5f / 18f) * lerp; + color = Color.FromHsv((hue, 0.75f, 0.75f, 0.50f)); } else { var alpha = MathHelper.Clamp(0.5f * lerp, 0f, 0.5f); - color = CompletedColor.WithAlpha(alpha); + color = new Color(1f, 1f, 1f, alpha); } _shader.SetParameter("progress", Progress); diff --git a/Content.Client/UserInterface/HumanoidProfileEditor.cs b/Content.Client/UserInterface/HumanoidProfileEditor.cs index 8aa4d74254..b6e36d23b7 100644 --- a/Content.Client/UserInterface/HumanoidProfileEditor.cs +++ b/Content.Client/UserInterface/HumanoidProfileEditor.cs @@ -1,22 +1,25 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using Content.Client.GameObjects.Components; +using Content.Client.GameObjects.Components; +using Content.Client.GameObjects.Components.Mobs; using Content.Client.Interfaces; -using Content.Shared; using Content.Shared.GameTicking; using Content.Shared.Preferences; using Content.Shared.Roles; +using Robust.Client.GameObjects; using Robust.Client.Graphics.Drawing; using Robust.Client.UserInterface; using Robust.Client.UserInterface.Controls; using Robust.Client.Utility; +using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.Random; using Robust.Shared.IoC; using Robust.Shared.Localization; +using Robust.Shared.Map; using Robust.Shared.Maths; using Robust.Shared.Prototypes; using Robust.Shared.Utility; +using System; +using System.Collections.Generic; +using System.Linq; namespace Content.Client.UserInterface { @@ -43,17 +46,25 @@ namespace Content.Client.UserInterface private readonly OptionButton _preferenceUnavailableButton; private readonly List _antagPreferences; + private readonly IEntity _previewDummy; + private readonly SpriteView _previewSprite; + private readonly SpriteView _previewSpriteSide; + private bool _isDirty; public int CharacterSlot; public HumanoidCharacterProfile Profile; public event Action OnProfileChanged; - public HumanoidProfileEditor(IClientPreferencesManager preferencesManager, IPrototypeManager prototypeManager) + public HumanoidProfileEditor(IClientPreferencesManager preferencesManager, IPrototypeManager prototypeManager, IEntityManager entityManager) { _random = IoCManager.Resolve(); _preferencesManager = preferencesManager; + var hbox = new HBoxContainer(); + AddChild(hbox); + + #region Left var margin = new MarginContainer { MarginTopOverride = 10, @@ -61,7 +72,7 @@ namespace Content.Client.UserInterface MarginLeftOverride = 10, MarginRightOverride = 10 }; - AddChild(margin); + hbox.AddChild(margin); var vBox = new VBoxContainer(); margin.AddChild(vBox); @@ -98,7 +109,7 @@ namespace Content.Client.UserInterface { SizeFlagsVertical = SizeFlags.FillExpand }; - var nameLabel = new Label {Text = Loc.GetString("Name:")}; + var nameLabel = new Label { Text = Loc.GetString("Name:") }; _nameEdit = new LineEdit { CustomMinimumSize = (270, 0), @@ -119,7 +130,7 @@ namespace Content.Client.UserInterface #endregion Name - var tabContainer = new TabContainer {SizeFlagsVertical = SizeFlags.FillExpand}; + var tabContainer = new TabContainer { SizeFlagsVertical = SizeFlags.FillExpand }; vBox.AddChild(tabContainer); #region Appearance @@ -141,7 +152,7 @@ namespace Content.Client.UserInterface { var panel = HighlightedContainer(); var hBox = new HBoxContainer(); - var sexLabel = new Label {Text = Loc.GetString("Sex:")}; + var sexLabel = new Label { Text = Loc.GetString("Sex:") }; var sexButtonGroup = new ButtonGroup(); @@ -171,8 +182,8 @@ namespace Content.Client.UserInterface { var panel = HighlightedContainer(); var hBox = new HBoxContainer(); - var ageLabel = new Label {Text = Loc.GetString("Age:")}; - _ageEdit = new LineEdit {CustomMinimumSize = (40, 0)}; + var ageLabel = new Label { Text = Loc.GetString("Age:") }; + _ageEdit = new LineEdit { CustomMinimumSize = (40, 0) }; _ageEdit.OnTextChanged += args => { if (!int.TryParse(args.Text, out var newAge)) @@ -348,7 +359,7 @@ namespace Content.Client.UserInterface foreach (var antag in prototypeManager.EnumeratePrototypes().OrderBy(a => a.Name)) { - if(!antag.SetPreference) + if (!antag.SetPreference) { continue; } @@ -410,6 +421,71 @@ namespace Content.Client.UserInterface #endregion Save + #endregion + + #region Right + + margin = new MarginContainer + { + MarginTopOverride = 10, + MarginBottomOverride = 10, + MarginLeftOverride = 10, + MarginRightOverride = 10 + }; + hbox.AddChild(margin); + + vBox = new VBoxContainer() + { + SizeFlagsVertical = SizeFlags.FillExpand, + SizeFlagsHorizontal = SizeFlags.FillExpand, + }; + hbox.AddChild(vBox); + + #region Preview + + _previewDummy = entityManager.SpawnEntity("HumanMob_Dummy", MapCoordinates.Nullspace); + var sprite = _previewDummy.GetComponent(); + + // Front + var box = new Control() + { + SizeFlagsHorizontal = SizeFlags.Fill, + SizeFlagsVertical = SizeFlags.FillExpand, + SizeFlagsStretchRatio = 1f, + }; + vBox.AddChild(box); + _previewSprite = new SpriteView + { + Sprite = sprite, + Scale = (6, 6), + OverrideDirection = Direction.South, + SizeFlagsVertical = SizeFlags.ShrinkCenter, + SizeFlagsStretchRatio = 1 + }; + box.AddChild(_previewSprite); + + // Side + box = new Control() + { + SizeFlagsHorizontal = SizeFlags.Fill, + SizeFlagsVertical = SizeFlags.FillExpand, + SizeFlagsStretchRatio = 1f, + }; + vBox.AddChild(box); + _previewSpriteSide = new SpriteView + { + Sprite = sprite, + Scale = (6, 6), + OverrideDirection = Direction.East, + SizeFlagsVertical = SizeFlags.ShrinkCenter, + SizeFlagsStretchRatio = 1 + }; + box.AddChild(_previewSpriteSide); + + #endregion + + #endregion + if (preferencesManager.ServerDataLoaded) { LoadServerData(); @@ -420,6 +496,16 @@ namespace Content.Client.UserInterface IsDirty = false; } + protected override void Dispose(bool disposing) + { + base.Dispose(disposing); + if (!disposing) + return; + + _previewDummy.Delete(); + _preferencesManager.OnServerDataLoaded -= LoadServerData; + } + private void LoadServerData() { Profile = (HumanoidCharacterProfile) _preferencesManager.Preferences.SelectedCharacter; @@ -458,6 +544,7 @@ namespace Content.Client.UserInterface set { _isDirty = value; + UpdatePreview(); UpdateSaveButton(); } } @@ -503,6 +590,15 @@ namespace Content.Client.UserInterface _saveButton.Disabled = Profile is null || !IsDirty; } + private void UpdatePreview() + { + if (Profile is null) + return; + + _previewDummy.GetComponent().UpdateFromProfile(Profile); + LobbyCharacterPreviewPanel.GiveDummyJobClothes(_previewDummy, Profile); + } + public void UpdateControls() { if (Profile is null) return; @@ -514,6 +610,8 @@ namespace Content.Client.UserInterface UpdateJobPriorities(); UpdateAntagPreferences(); + UpdatePreview(); + _preferenceUnavailableButton.SelectId((int) Profile.PreferenceUnavailable); } diff --git a/Content.Client/UserInterface/OptionsMenu.Graphics.cs b/Content.Client/UserInterface/OptionsMenu.Graphics.cs index 0e9861d358..7642cd3a90 100644 --- a/Content.Client/UserInterface/OptionsMenu.Graphics.cs +++ b/Content.Client/UserInterface/OptionsMenu.Graphics.cs @@ -1,7 +1,9 @@ -using Robust.Client.Graphics; +using Content.Shared; +using Robust.Client.Graphics; using Robust.Client.Interfaces.ResourceManagement; using Robust.Client.UserInterface; using Robust.Client.UserInterface.Controls; +using Robust.Shared; using Robust.Shared.Interfaces.Configuration; using Robust.Shared.IoC; using Robust.Shared.Localization; @@ -121,7 +123,7 @@ namespace Content.Client.UserInterface }); ApplyButton.OnPressed += OnApplyButtonPressed; - VSyncCheckBox.Pressed = _cfg.GetCVar("display.vsync"); + VSyncCheckBox.Pressed = _cfg.GetCVar(CVars.DisplayVSync); FullscreenCheckBox.Pressed = ConfigIsFullscreen; LightingPresetOption.SelectId(GetConfigLightingQuality()); _uiScaleOption.SelectId(GetConfigUIScalePreset(ConfigUIScale)); @@ -137,11 +139,11 @@ namespace Content.Client.UserInterface private void OnApplyButtonPressed(BaseButton.ButtonEventArgs args) { - _cfg.SetCVar("display.vsync", VSyncCheckBox.Pressed); + _cfg.SetCVar(CVars.DisplayVSync, VSyncCheckBox.Pressed); SetConfigLightingQuality(LightingPresetOption.SelectedId); - _cfg.SetCVar("display.windowmode", + _cfg.SetCVar(CVars.DisplayWindowMode, (int) (FullscreenCheckBox.Pressed ? WindowMode.Fullscreen : WindowMode.Windowed)); - _cfg.SetCVar("display.uiScale", UIScaleOptions[_uiScaleOption.SelectedId]); + _cfg.SetCVar(CVars.DisplayUIScale, UIScaleOptions[_uiScaleOption.SelectedId]); _cfg.SaveToFile(); UpdateApplyButton(); } @@ -159,7 +161,7 @@ namespace Content.Client.UserInterface private void UpdateApplyButton() { - var isVSyncSame = VSyncCheckBox.Pressed == _cfg.GetCVar("display.vsync"); + var isVSyncSame = VSyncCheckBox.Pressed == _cfg.GetCVar(CVars.DisplayVSync); var isFullscreenSame = FullscreenCheckBox.Pressed == ConfigIsFullscreen; var isLightingQualitySame = LightingPresetOption.SelectedId == GetConfigLightingQuality(); var isUIScaleSame = MathHelper.CloseTo(UIScaleOptions[_uiScaleOption.SelectedId], ConfigUIScale); @@ -167,14 +169,14 @@ namespace Content.Client.UserInterface } private bool ConfigIsFullscreen => - _cfg.GetCVar("display.windowmode") == (int) WindowMode.Fullscreen; + _cfg.GetCVar(CVars.DisplayWindowMode) == (int) WindowMode.Fullscreen; - private float ConfigUIScale => _cfg.GetCVar("display.uiScale"); + private float ConfigUIScale => _cfg.GetCVar(CVars.DisplayUIScale); private int GetConfigLightingQuality() { - var val = _cfg.GetCVar("display.lightmapdivider"); - var soft = _cfg.GetCVar("display.softshadows"); + var val = _cfg.GetCVar(CVars.DisplayLightMapDivider); + var soft = _cfg.GetCVar(CVars.DisplaySoftShadows); if (val >= 8) { return 0; @@ -198,20 +200,20 @@ namespace Content.Client.UserInterface switch (value) { case 0: - _cfg.SetCVar("display.lightmapdivider", 8); - _cfg.SetCVar("display.softshadows", false); + _cfg.SetCVar(CVars.DisplayLightMapDivider, 8); + _cfg.SetCVar(CVars.DisplaySoftShadows, false); break; case 1: - _cfg.SetCVar("display.lightmapdivider", 2); - _cfg.SetCVar("display.softshadows", false); + _cfg.SetCVar(CVars.DisplayLightMapDivider, 2); + _cfg.SetCVar(CVars.DisplaySoftShadows, false); break; case 2: - _cfg.SetCVar("display.lightmapdivider", 2); - _cfg.SetCVar("display.softshadows", true); + _cfg.SetCVar(CVars.DisplayLightMapDivider, 2); + _cfg.SetCVar(CVars.DisplaySoftShadows, true); break; case 3: - _cfg.SetCVar("display.lightmapdivider", 1); - _cfg.SetCVar("display.softshadows", true); + _cfg.SetCVar(CVars.DisplayLightMapDivider, 1); + _cfg.SetCVar(CVars.DisplaySoftShadows, true); break; } } diff --git a/Content.Client/UserInterface/StatusEffectsUI.cs b/Content.Client/UserInterface/StatusEffectsUI.cs deleted file mode 100644 index baaade0028..0000000000 --- a/Content.Client/UserInterface/StatusEffectsUI.cs +++ /dev/null @@ -1,23 +0,0 @@ -using Robust.Client.UserInterface; -using Robust.Client.UserInterface.Controls; - -namespace Content.Client.UserInterface -{ - /// - /// The status effects display on the right side of the screen. - /// - public sealed class StatusEffectsUI : Control - { - public VBoxContainer VBox { get; } - - public StatusEffectsUI() - { - VBox = new VBoxContainer(); - AddChild(VBox); - - LayoutContainer.SetGrowHorizontal(this, LayoutContainer.GrowDirection.Begin); - LayoutContainer.SetAnchorAndMarginPreset(this, LayoutContainer.LayoutPreset.TopRight, margin: 10); - LayoutContainer.SetMarginTop(this, 250); - } - } -} diff --git a/Content.Client/UserInterface/Stylesheets/StyleNano.cs b/Content.Client/UserInterface/Stylesheets/StyleNano.cs index 092cb2c12f..a29b687b72 100644 --- a/Content.Client/UserInterface/Stylesheets/StyleNano.cs +++ b/Content.Client/UserInterface/Stylesheets/StyleNano.cs @@ -13,6 +13,13 @@ namespace Content.Client.UserInterface.Stylesheets { public sealed class StyleNano : StyleBase { + public const string StyleClassBorderedWindowPanel = "BorderedWindowPanel"; + public const string StyleClassTransparentBorderedWindowPanel = "TransparentBorderedWindowPanel"; + public const string StyleClassTooltipPanel = "tooltipBox"; + public const string StyleClassTooltipAlertTitle = "tooltipAlertTitle"; + public const string StyleClassTooltipAlertDescription = "tooltipAlertDesc"; + public const string StyleClassTooltipAlertCooldown = "tooltipAlertCooldown"; + public const string StyleClassSliderRed = "Red"; public const string StyleClassSliderGreen = "Green"; public const string StyleClassSliderBlue = "Blue"; @@ -55,6 +62,7 @@ namespace Content.Client.UserInterface.Stylesheets var notoSansDisplayBold14 = resCache.GetFont("/Fonts/NotoSansDisplay/NotoSansDisplay-Bold.ttf", 14); var notoSans16 = resCache.GetFont("/Fonts/NotoSans/NotoSans-Regular.ttf", 16); var notoSansBold16 = resCache.GetFont("/Fonts/NotoSans/NotoSans-Bold.ttf", 16); + var notoSansBold18 = resCache.GetFont("/Fonts/NotoSans/NotoSans-Bold.ttf", 18); var notoSansBold20 = resCache.GetFont("/Fonts/NotoSans/NotoSans-Bold.ttf", 20); var textureCloseButton = resCache.GetTexture("/Textures/Interface/Nano/cross.svg.png"); var windowHeaderTex = resCache.GetTexture("/Textures/Interface/Nano/window_header.png"); @@ -73,6 +81,20 @@ namespace Content.Client.UserInterface.Stylesheets windowBackground.SetPatchMargin(StyleBox.Margin.Horizontal | StyleBox.Margin.Bottom, 2); windowBackground.SetExpandMargin(StyleBox.Margin.Horizontal | StyleBox.Margin.Bottom, 2); + var borderedWindowBackgroundTex = resCache.GetTexture("/Textures/Interface/Nano/window_background_bordered.png"); + var borderedWindowBackground = new StyleBoxTexture + { + Texture = borderedWindowBackgroundTex, + }; + borderedWindowBackground.SetPatchMargin(StyleBox.Margin.All, 2); + + var borderedTransparentWindowBackgroundTex = resCache.GetTexture("/Textures/Interface/Nano/transparent_window_background_bordered.png"); + var borderedTransparentWindowBackground = new StyleBoxTexture + { + Texture = borderedTransparentWindowBackgroundTex, + }; + borderedTransparentWindowBackground.SetPatchMargin(StyleBox.Margin.All, 2); + var textureInvertedTriangle = resCache.GetTexture("/Textures/Interface/Nano/inverted_triangle.svg.png"); var lineEditTex = resCache.GetTexture("/Textures/Interface/Nano/lineedit.png"); @@ -147,7 +169,7 @@ namespace Content.Client.UserInterface.Stylesheets Texture = tooltipTexture, }; tooltipBox.SetPatchMargin(StyleBox.Margin.All, 2); - tooltipBox.SetContentMarginOverride(StyleBox.Margin.Horizontal, 5); + tooltipBox.SetContentMarginOverride(StyleBox.Margin.Horizontal, 7); // Placeholder var placeholderTexture = resCache.GetTexture("/Textures/Interface/Nano/placeholder.png"); @@ -245,6 +267,19 @@ namespace Content.Client.UserInterface.Stylesheets { new StyleProperty(PanelContainer.StylePropertyPanel, windowBackground), }), + // bordered window background + new StyleRule( + new SelectorElement(null, new[] {StyleClassBorderedWindowPanel}, null, null), + new[] + { + new StyleProperty(PanelContainer.StylePropertyPanel, borderedWindowBackground), + }), + new StyleRule( + new SelectorElement(null, new[] {StyleClassTransparentBorderedWindowPanel}, null, null), + new[] + { + new StyleProperty(PanelContainer.StylePropertyPanel, borderedTransparentWindowBackground), + }), // Window header. new StyleRule( new SelectorElement(typeof(PanelContainer), new[] {SS14Window.StyleClassWindowHeader}, null, null), @@ -464,7 +499,7 @@ namespace Content.Client.UserInterface.Stylesheets new StyleProperty(PanelContainer.StylePropertyPanel, tooltipBox) }), - new StyleRule(new SelectorElement(typeof(PanelContainer), new[] {"tooltipBox"}, null, null), new[] + new StyleRule(new SelectorElement(typeof(PanelContainer), new [] { StyleClassTooltipPanel }, null, null), new[] { new StyleProperty(PanelContainer.StylePropertyPanel, tooltipBox) }), @@ -482,6 +517,20 @@ namespace Content.Client.UserInterface.Stylesheets new StyleProperty("font", notoSansItalic12), }), + // alert tooltip + new StyleRule(new SelectorElement(typeof(RichTextLabel), new[] {StyleClassTooltipAlertTitle}, null, null), new[] + { + new StyleProperty("font", notoSansBold18) + }), + new StyleRule(new SelectorElement(typeof(RichTextLabel), new[] {StyleClassTooltipAlertDescription}, null, null), new[] + { + new StyleProperty("font", notoSans16) + }), + new StyleRule(new SelectorElement(typeof(RichTextLabel), new[] {StyleClassTooltipAlertCooldown}, null, null), new[] + { + new StyleProperty("font", notoSans16) + }), + // Entity tooltip new StyleRule( new SelectorElement(typeof(PanelContainer), new[] {ExamineSystem.StyleClassEntityTooltip}, null, diff --git a/Content.IntegrationTests/Tests/Body/LungTest.cs b/Content.IntegrationTests/Tests/Body/LungTest.cs index 30c181e189..6722ea41a0 100644 --- a/Content.IntegrationTests/Tests/Body/LungTest.cs +++ b/Content.IntegrationTests/Tests/Body/LungTest.cs @@ -20,7 +20,7 @@ using Robust.Shared.Maths; namespace Content.IntegrationTests.Tests.Body { [TestFixture] - [TestOf(typeof(LungBehaviorComponent))] + [TestOf(typeof(LungBehavior))] public class LungTest : ContentIntegrationTest { [Test] @@ -39,7 +39,7 @@ namespace Content.IntegrationTests.Tests.Body var human = entityManager.SpawnEntity("HumanMob_Content", MapCoordinates.Nullspace); Assert.That(human.TryGetComponent(out IBody body)); - Assert.That(body.TryGetMechanismBehaviors(out List lungs)); + Assert.That(body.TryGetMechanismBehaviors(out List lungs)); Assert.That(lungs.Count, Is.EqualTo(1)); Assert.That(human.TryGetComponent(out BloodstreamComponent bloodstream)); @@ -141,7 +141,7 @@ namespace Content.IntegrationTests.Tests.Body human = entityManager.SpawnEntity("HumanMob_Content", coordinates); Assert.True(human.TryGetComponent(out IBody body)); - Assert.True(body.HasMechanismBehavior()); + Assert.True(body.HasMechanismBehavior()); Assert.True(human.TryGetComponent(out metabolism)); Assert.False(metabolism.Suffocating); }); diff --git a/Content.IntegrationTests/Tests/Body/MechanismBehaviorEventsTest.cs b/Content.IntegrationTests/Tests/Body/MechanismBehaviorEventsTest.cs index e3c571496e..08afb1ae91 100644 --- a/Content.IntegrationTests/Tests/Body/MechanismBehaviorEventsTest.cs +++ b/Content.IntegrationTests/Tests/Body/MechanismBehaviorEventsTest.cs @@ -1,12 +1,12 @@ #nullable enable using System.Linq; using System.Threading.Tasks; +using Content.Server.GameObjects.Components.Body.Behavior; using Content.Shared.GameObjects.Components.Body; using Content.Shared.GameObjects.Components.Body.Behavior; using Content.Shared.GameObjects.Components.Body.Mechanism; using Content.Shared.GameObjects.Components.Body.Part; using NUnit.Framework; -using Robust.Shared.GameObjects; using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.Map; using Robust.Shared.IoC; @@ -18,14 +18,11 @@ namespace Content.IntegrationTests.Tests.Body [TestOf(typeof(SharedBodyComponent))] [TestOf(typeof(SharedBodyPartComponent))] [TestOf(typeof(SharedMechanismComponent))] - [TestOf(typeof(MechanismBehaviorComponent))] + [TestOf(typeof(MechanismBehavior))] public class MechanismBehaviorEventsTest : ContentIntegrationTest { - [RegisterComponent] - private class TestBehaviorComponent : MechanismBehaviorComponent + private class TestMechanismBehavior : MechanismBehavior { - public override string Name => nameof(MechanismBehaviorEventsTest) + "TestBehavior"; - public bool WasAddedToBody; public bool WasAddedToPart; public bool WasAddedToPartInBody; @@ -33,8 +30,6 @@ namespace Content.IntegrationTests.Tests.Body public bool WasRemovedFromPart; public bool WasRemovedFromPartInBody; - public override void Update(float frameTime) { } - public bool NoAdded() { return !WasAddedToBody && !WasAddedToPart && !WasAddedToPartInBody; @@ -111,13 +106,7 @@ namespace Content.IntegrationTests.Tests.Body [Test] public async Task EventsTest() { - var server = StartServerDummyTicker(new ServerContentIntegrationOption - { - ContentBeforeIoC = () => - { - IoCManager.Resolve().Register(); - } - }); + var server = StartServerDummyTicker(); await server.WaitAssertion(() => { @@ -141,68 +130,68 @@ namespace Content.IntegrationTests.Tests.Body var mechanism = centerPart!.Mechanisms.First(); Assert.NotNull(mechanism); - var component = mechanism.Owner.AddComponent(); - Assert.False(component.WasAddedToBody); - Assert.False(component.WasAddedToPart); - Assert.That(component.WasAddedToPartInBody); - Assert.That(component.NoRemoved); + mechanism.EnsureBehavior(out var behavior); + Assert.False(behavior.WasAddedToBody); + Assert.False(behavior.WasAddedToPart); + Assert.That(behavior.WasAddedToPartInBody); + Assert.That(behavior.NoRemoved); - component.ResetAll(); + behavior.ResetAll(); - Assert.That(component.NoAdded); - Assert.That(component.NoRemoved); + Assert.That(behavior.NoAdded); + Assert.That(behavior.NoRemoved); centerPart.RemoveMechanism(mechanism); - Assert.That(component.NoAdded); - Assert.False(component.WasRemovedFromBody); - Assert.False(component.WasRemovedFromPart); - Assert.That(component.WasRemovedFromPartInBody); + Assert.That(behavior.NoAdded); + Assert.False(behavior.WasRemovedFromBody); + Assert.False(behavior.WasRemovedFromPart); + Assert.That(behavior.WasRemovedFromPartInBody); - component.ResetAll(); + behavior.ResetAll(); centerPart.TryAddMechanism(mechanism, true); - Assert.False(component.WasAddedToBody); - Assert.False(component.WasAddedToPart); - Assert.That(component.WasAddedToPartInBody); - Assert.That(component.NoRemoved()); + Assert.False(behavior.WasAddedToBody); + Assert.False(behavior.WasAddedToPart); + Assert.That(behavior.WasAddedToPartInBody); + Assert.That(behavior.NoRemoved()); - component.ResetAll(); + behavior.ResetAll(); body.RemovePart(centerPart); - Assert.That(component.NoAdded); - Assert.That(component.WasRemovedFromBody); - Assert.False(component.WasRemovedFromPart); - Assert.False(component.WasRemovedFromPartInBody); + Assert.That(behavior.NoAdded); + Assert.That(behavior.WasRemovedFromBody); + Assert.False(behavior.WasRemovedFromPart); + Assert.False(behavior.WasRemovedFromPartInBody); - component.ResetAll(); + behavior.ResetAll(); centerPart.RemoveMechanism(mechanism); - Assert.That(component.NoAdded); - Assert.False(component.WasRemovedFromBody); - Assert.That(component.WasRemovedFromPart); - Assert.False(component.WasRemovedFromPartInBody); + Assert.That(behavior.NoAdded); + Assert.False(behavior.WasRemovedFromBody); + Assert.That(behavior.WasRemovedFromPart); + Assert.False(behavior.WasRemovedFromPartInBody); - component.ResetAll(); + behavior.ResetAll(); centerPart.TryAddMechanism(mechanism, true); - Assert.False(component.WasAddedToBody); - Assert.That(component.WasAddedToPart); - Assert.False(component.WasAddedToPartInBody); - Assert.That(component.NoRemoved); + Assert.False(behavior.WasAddedToBody); + Assert.That(behavior.WasAddedToPart); + Assert.False(behavior.WasAddedToPartInBody); + Assert.That(behavior.NoRemoved); - component.ResetAll(); + behavior.ResetAll(); body.TryAddPart(centerSlot!, centerPart, true); - Assert.That(component.WasAddedToBody); - Assert.False(component.WasAddedToPart); - Assert.False(component.WasAddedToPartInBody); - Assert.That(component.NoRemoved); + Assert.That(behavior.WasAddedToBody); + Assert.False(behavior.WasAddedToPart); + Assert.False(behavior.WasAddedToPartInBody); + Assert.That(behavior.NoRemoved); }); } } diff --git a/Content.IntegrationTests/Tests/Buckle/BuckleTest.cs b/Content.IntegrationTests/Tests/Buckle/BuckleTest.cs index 6e781970bd..6bcf4b5872 100644 --- a/Content.IntegrationTests/Tests/Buckle/BuckleTest.cs +++ b/Content.IntegrationTests/Tests/Buckle/BuckleTest.cs @@ -302,7 +302,7 @@ namespace Content.IntegrationTests.Tests.Buckle human.Transform.LocalPosition += (100, 0); }); - await WaitUntil(server, () => !buckle.Buckled, maxTicks: 10); + await WaitUntil(server, () => !buckle.Buckled, 10); Assert.False(buckle.Buckled); diff --git a/Content.IntegrationTests/Tests/Commands/RestartRoundTest.cs b/Content.IntegrationTests/Tests/Commands/RestartRoundTest.cs index 83e4d111bb..aa9c2cdc54 100644 --- a/Content.IntegrationTests/Tests/Commands/RestartRoundTest.cs +++ b/Content.IntegrationTests/Tests/Commands/RestartRoundTest.cs @@ -1,6 +1,7 @@ using System.Threading.Tasks; using Content.Server.GameTicking; using Content.Server.Interfaces.GameTicking; +using Content.Shared; using NUnit.Framework; using Robust.Shared.Interfaces.Configuration; using Robust.Shared.Interfaces.GameObjects; @@ -31,7 +32,7 @@ namespace Content.IntegrationTests.Tests.Commands server.Assert(() => { - configManager.SetCVar("game.lobbyenabled", lobbyEnabled); + configManager.SetCVar(CCVars.GameLobbyEnabled, lobbyEnabled); Assert.That(gameTicker.RunLevel, Is.EqualTo(GameRunLevel.InRound)); diff --git a/Content.IntegrationTests/Tests/GameObjects/Components/Mobs/AlertsComponentTests.cs b/Content.IntegrationTests/Tests/GameObjects/Components/Mobs/AlertsComponentTests.cs new file mode 100644 index 0000000000..e48a18daac --- /dev/null +++ b/Content.IntegrationTests/Tests/GameObjects/Components/Mobs/AlertsComponentTests.cs @@ -0,0 +1,110 @@ +using System.Linq; +using System.Threading.Tasks; +using Content.Client.GameObjects.Components.Mobs; +using Content.Client.UserInterface; +using Content.Server.GameObjects.Components.Mobs; +using Content.Shared.Alert; +using NUnit.Framework; +using Robust.Client.Interfaces.UserInterface; +using Robust.Client.Player; +using Robust.Shared.Interfaces.Map; +using Robust.Shared.IoC; +using Robust.Shared.Map; + +namespace Content.IntegrationTests.Tests.GameObjects.Components.Mobs +{ + [TestFixture] + [TestOf(typeof(ClientAlertsComponent))] + [TestOf(typeof(ServerAlertsComponent))] + public class AlertsComponentTests : ContentIntegrationTest + { + + [Test] + public async Task AlertsTest() + { + var (client, server) = await StartConnectedServerClientPair(); + + await server.WaitIdleAsync(); + await client.WaitIdleAsync(); + + var serverPlayerManager = server.ResolveDependency(); + + await server.WaitAssertion(() => + { + var player = serverPlayerManager.GetAllPlayers().Single(); + var playerEnt = player.AttachedEntity; + Assert.NotNull(playerEnt); + var alertsComponent = playerEnt.GetComponent(); + Assert.NotNull(alertsComponent); + + // show 2 alerts + alertsComponent.ShowAlert(AlertType.Debug1); + alertsComponent.ShowAlert(AlertType.Debug2); + }); + + await server.WaitRunTicks(5); + await client.WaitRunTicks(5); + + var clientPlayerMgr = client.ResolveDependency(); + var clientUIMgr = client.ResolveDependency(); + await client.WaitAssertion(() => + { + + var local = clientPlayerMgr.LocalPlayer; + Assert.NotNull(local); + var controlled = local.ControlledEntity; + Assert.NotNull(controlled); + var alertsComponent = controlled.GetComponent(); + Assert.NotNull(alertsComponent); + + // find the alertsui + var alertsUI = + clientUIMgr.StateRoot.Children.FirstOrDefault(c => c is AlertsUI) as AlertsUI; + Assert.NotNull(alertsUI); + + // we should be seeing 3 alerts - our health, and the 2 debug alerts, in a specific order. + Assert.That(alertsUI.Grid.ChildCount, Is.EqualTo(3)); + var alertControls = alertsUI.Grid.Children.Select(c => c as AlertControl); + var alertIDs = alertControls.Select(ac => ac.Alert.AlertType).ToArray(); + var expectedIDs = new [] {AlertType.HumanHealth, AlertType.Debug1, AlertType.Debug2}; + Assert.That(alertIDs, Is.EqualTo(expectedIDs)); + }); + + await server.WaitAssertion(() => + { + var player = serverPlayerManager.GetAllPlayers().Single(); + var playerEnt = player.AttachedEntity; + Assert.NotNull(playerEnt); + var alertsComponent = playerEnt.GetComponent(); + Assert.NotNull(alertsComponent); + + alertsComponent.ClearAlert(AlertType.Debug1); + }); + await server.WaitRunTicks(5); + await client.WaitRunTicks(5); + + await client.WaitAssertion(() => + { + + var local = clientPlayerMgr.LocalPlayer; + Assert.NotNull(local); + var controlled = local.ControlledEntity; + Assert.NotNull(controlled); + var alertsComponent = controlled.GetComponent(); + Assert.NotNull(alertsComponent); + + // find the alertsui + var alertsUI = + clientUIMgr.StateRoot.Children.FirstOrDefault(c => c is AlertsUI) as AlertsUI; + Assert.NotNull(alertsUI); + + // we should be seeing only 2 alerts now because one was cleared + Assert.That(alertsUI.Grid.ChildCount, Is.EqualTo(2)); + var alertControls = alertsUI.Grid.Children.Select(c => c as AlertControl); + var alertIDs = alertControls.Select(ac => ac.Alert.AlertType).ToArray(); + var expectedIDs = new [] {AlertType.HumanHealth, AlertType.Debug2}; + Assert.That(alertIDs, Is.EqualTo(expectedIDs)); + }); + } + } +} diff --git a/Content.IntegrationTests/Tests/Gravity/WeightlessStatusTests.cs b/Content.IntegrationTests/Tests/Gravity/WeightlessStatusTests.cs index 3e128bceee..5e0574c321 100644 --- a/Content.IntegrationTests/Tests/Gravity/WeightlessStatusTests.cs +++ b/Content.IntegrationTests/Tests/Gravity/WeightlessStatusTests.cs @@ -1,6 +1,7 @@ using System.Threading.Tasks; using Content.Server.GameObjects.Components.Gravity; using Content.Server.GameObjects.EntitySystems; +using Content.Shared.Alert; using Content.Shared.GameObjects.Components.Gravity; using Content.Shared.GameObjects.Components.Mobs; using Content.Shared.GameObjects.EntitySystems; @@ -32,7 +33,7 @@ namespace Content.IntegrationTests.Tests.Gravity var tileDefinitionManager = server.ResolveDependency(); IEntity human = null; - SharedStatusEffectsComponent statusEffects = null; + SharedAlertsComponent alerts = null; await server.WaitAssertion(() => { @@ -57,7 +58,7 @@ namespace Content.IntegrationTests.Tests.Gravity human = entityManager.SpawnEntity("HumanMob_Content", coordinates); - Assert.True(human.TryGetComponent(out statusEffects)); + Assert.True(human.TryGetComponent(out alerts)); }); // Let WeightlessSystem and GravitySystem tick @@ -68,7 +69,7 @@ namespace Content.IntegrationTests.Tests.Gravity await server.WaitAssertion(() => { // No gravity without a gravity generator - Assert.True(statusEffects.Statuses.ContainsKey(StatusEffect.Weightless)); + Assert.True(alerts.IsShowingAlert(AlertType.Weightless)); gravityGenerator = human.EnsureComponent(); }); @@ -78,7 +79,7 @@ namespace Content.IntegrationTests.Tests.Gravity await server.WaitAssertion(() => { - Assert.False(statusEffects.Statuses.ContainsKey(StatusEffect.Weightless)); + Assert.False(alerts.IsShowingAlert(AlertType.Weightless)); // Disable the gravity generator var args = new BreakageEventArgs {Owner = human}; @@ -89,7 +90,7 @@ namespace Content.IntegrationTests.Tests.Gravity await server.WaitAssertion(() => { - Assert.False(statusEffects.Statuses.ContainsKey(StatusEffect.Weightless)); + Assert.False(alerts.IsShowingAlert(AlertType.Weightless)); }); } } diff --git a/Content.IntegrationTests/Tests/Lobby/CharacterCreationTest.cs b/Content.IntegrationTests/Tests/Lobby/CharacterCreationTest.cs index afc4cbd6a9..218e6a85b6 100644 --- a/Content.IntegrationTests/Tests/Lobby/CharacterCreationTest.cs +++ b/Content.IntegrationTests/Tests/Lobby/CharacterCreationTest.cs @@ -38,9 +38,7 @@ namespace Content.IntegrationTests.Tests.Lobby await server.WaitAssertion(() => { - var lobbyCvar = CCVars.GameLobbyEnabled; - serverConfig.SetCVar(lobbyCvar.Name, true); - + serverConfig.SetCVar(CCVars.GameLobbyEnabled, true); serverTicker.RestartRound(); }); diff --git a/Content.Server/Commands/CommandUtils.cs b/Content.Server/Commands/CommandUtils.cs new file mode 100644 index 0000000000..b6535dc7d3 --- /dev/null +++ b/Content.Server/Commands/CommandUtils.cs @@ -0,0 +1,66 @@ +using System; +using Robust.Server.Interfaces.Console; +using Robust.Server.Interfaces.Player; +using Robust.Shared.Interfaces.GameObjects; +using Robust.Shared.IoC; +using Robust.Shared.Network; + +namespace Content.Server.Commands +{ + /// + /// Utilities for writing commands + /// + public static class CommandUtils + { + /// + /// Gets the player session for the player with the indicated id, + /// sending a failure to the performer if unable to. + /// + public static bool TryGetSessionByUsernameOrId(IConsoleShell shell, + string usernameOrId, IPlayerSession performer, out IPlayerSession session) + { + var plyMgr = IoCManager.Resolve(); + if (plyMgr.TryGetSessionByUsername(usernameOrId, out session)) return true; + if (Guid.TryParse(usernameOrId, out var targetGuid)) + { + if (plyMgr.TryGetSessionById(new NetUserId(targetGuid), out session)) return true; + shell.SendText(performer, "Unable to find user with that name/id."); + return false; + } + + shell.SendText(performer, "Unable to find user with that name/id."); + return false; + } + + /// + /// Gets the attached entity for the player session with the indicated id, + /// sending a failure to the performer if unable to. + /// + public static bool TryGetAttachedEntityByUsernameOrId(IConsoleShell shell, + string usernameOrId, IPlayerSession performer, out IEntity attachedEntity) + { + attachedEntity = null; + if (!TryGetSessionByUsernameOrId(shell, usernameOrId, performer, out var session)) return false; + if (session.AttachedEntity == null) + { + shell.SendText(performer, "User has no attached entity."); + return false; + } + + attachedEntity = session.AttachedEntity; + return true; + } + + /// + /// Checks if attached entity is null, returning false and sending a message + /// to performer if not. + /// + public static bool ValidateAttachedEntity(IConsoleShell shell, IPlayerSession performer, IEntity attachedEntity) + { + if (attachedEntity != null) return true; + shell.SendText(performer, "User has no attached entity."); + return false; + } + + } +} diff --git a/Content.Server/Commands/Hungry.cs b/Content.Server/Commands/Hungry.cs new file mode 100644 index 0000000000..b3a56c0171 --- /dev/null +++ b/Content.Server/Commands/Hungry.cs @@ -0,0 +1,39 @@ +#nullable enable +using Content.Server.GameObjects.Components.Nutrition; +using Content.Shared.GameObjects.Components.Nutrition; +using Robust.Server.Interfaces.Console; +using Robust.Server.Interfaces.Player; + +namespace Content.Server.Commands +{ + public class Hungry : IClientCommand + { + public string Command => "hungry"; + public string Description => "Makes you hungry."; + public string Help => $"{Command}"; + + public void Execute(IConsoleShell shell, IPlayerSession? player, string[] args) + { + if (player == null) + { + shell.SendText(player, "You cannot use this command unless you are a player."); + return; + } + + if (player.AttachedEntity == null) + { + shell.SendText(player, "You cannot use this command without an entity."); + return; + } + + if (!player.AttachedEntity.TryGetComponent(out HungerComponent? hunger)) + { + shell.SendText(player, $"Your entity does not have a {nameof(HungerComponent)} component."); + return; + } + + var hungryThreshold = hunger.HungerThresholds[HungerThreshold.Starving]; + hunger.CurrentHunger = hungryThreshold; + } + } +} diff --git a/Content.Server/DeviceNetwork/DeviceNetwork.cs b/Content.Server/DeviceNetwork/DeviceNetwork.cs index 414cbe9cb8..06a9f4e054 100644 --- a/Content.Server/DeviceNetwork/DeviceNetwork.cs +++ b/Content.Server/DeviceNetwork/DeviceNetwork.cs @@ -1,4 +1,5 @@ -using Content.Server.Interfaces; +using System; +using Content.Server.Interfaces; using Robust.Shared.Interfaces.Random; using Robust.Shared.IoC; using System.Collections.Generic; @@ -11,7 +12,8 @@ namespace Content.Server.GameObjects.EntitySystems.DeviceNetwork { private const int PACKAGES_PER_TICK = 30; - private readonly IRobustRandom _random = IoCManager.Resolve(); + [Dependency] private readonly IRobustRandom _random = default!; + private readonly Dictionary> _devices = new Dictionary>(); private readonly Queue _packages = new Queue(); @@ -40,11 +42,9 @@ namespace Content.Server.GameObjects.EntitySystems.DeviceNetwork public void Update() { - var i = PACKAGES_PER_TICK; - while (_packages.Count > 0 && i > 0) + var count = Math.Min(PACKAGES_PER_TICK, _packages.Count); + for (var i = 0; i < count; i++) { - i--; - var package = _packages.Dequeue(); if (package.Broadcast) @@ -72,7 +72,7 @@ namespace Content.Server.GameObjects.EntitySystems.DeviceNetwork Sender = sender, Metadata = metadata }; - + _packages.Enqueue(package); return true; } @@ -132,7 +132,7 @@ namespace Content.Server.GameObjects.EntitySystems.DeviceNetwork { var devices = DevicesForFrequency(netId, frequency); - var device = devices.Find(device => device.Address == address); + var device = devices.Find(dvc => dvc.Address == address); return device; } @@ -192,7 +192,6 @@ namespace Content.Server.GameObjects.EntitySystems.DeviceNetwork public IReadOnlyDictionary Data { get; set; } public Metadata Metadata; public string Sender; - } } } diff --git a/Content.Server/DeviceNetwork/DeviceNetworkConnection.cs b/Content.Server/DeviceNetwork/DeviceNetworkConnection.cs index 204f00edf6..9cc17e8cb1 100644 --- a/Content.Server/DeviceNetwork/DeviceNetworkConnection.cs +++ b/Content.Server/DeviceNetwork/DeviceNetworkConnection.cs @@ -11,14 +11,14 @@ namespace Content.Server.GameObjects.EntitySystems.DeviceNetwork private readonly int _netId; [ViewVariables] - public bool Open { get; internal set; } + public bool Open { get; private set; } [ViewVariables] - public string Address { get; internal set; } + public string Address { get; private set; } [ViewVariables] - public int Frequency { get; internal set; } + public int Frequency { get; private set; } [ViewVariables] - public bool RecieveAll + public bool ReceiveAll { get => _network.GetDeviceReceiveAll(_netId, Frequency, Address); set => _network.SetDeviceReceiveAll(_netId, Frequency, Address, value); diff --git a/Content.Server/EntryPoint.cs b/Content.Server/EntryPoint.cs index 6c8e46bf6d..8afeb571d8 100644 --- a/Content.Server/EntryPoint.cs +++ b/Content.Server/EntryPoint.cs @@ -11,6 +11,7 @@ using Content.Server.Interfaces.GameTicking; using Content.Server.Interfaces.PDA; using Content.Server.Sandbox; using Content.Shared.Kitchen; +using Content.Shared.Alert; using Robust.Server.Interfaces.Player; using Robust.Shared.ContentPack; using Robust.Shared.Interfaces.GameObjects; @@ -78,6 +79,7 @@ namespace Content.Server _gameTicker.Initialize(); IoCManager.Resolve().Initialize(); + IoCManager.Resolve().Initialize(); IoCManager.Resolve().Initialize(); IoCManager.Resolve().Initialize(); IoCManager.Resolve().Initialize(); diff --git a/Content.Server/GameObjects/Components/ActionBlocking/CuffableComponent.cs b/Content.Server/GameObjects/Components/ActionBlocking/CuffableComponent.cs index 35c1263cf0..510715b1e8 100644 --- a/Content.Server/GameObjects/Components/ActionBlocking/CuffableComponent.cs +++ b/Content.Server/GameObjects/Components/ActionBlocking/CuffableComponent.cs @@ -6,6 +6,7 @@ using Content.Server.GameObjects.Components.Items.Storage; using Content.Server.GameObjects.Components.Mobs; using Content.Server.GameObjects.EntitySystems.DoAfter; using Content.Server.Interfaces.GameObjects.Components.Items; +using Content.Shared.Alert; using Content.Shared.GameObjects.Components.ActionBlocking; using Content.Shared.GameObjects.Components.Mobs; using Content.Shared.GameObjects.EntitySystems; @@ -115,7 +116,7 @@ namespace Content.Server.GameObjects.Components.ActionBlocking CanStillInteract = _hands.Hands.Count() > CuffedHandCount; OnCuffedStateChanged.Invoke(); - UpdateStatusEffect(); + UpdateAlert(); UpdateHeldItems(); Dirty(); } @@ -181,17 +182,17 @@ namespace Content.Server.GameObjects.Components.ActionBlocking /// /// Updates the status effect indicator on the HUD. /// - private void UpdateStatusEffect() + private void UpdateAlert() { - if (Owner.TryGetComponent(out ServerStatusEffectsComponent status)) + if (Owner.TryGetComponent(out ServerAlertsComponent status)) { if (CanStillInteract) { - status.RemoveStatusEffect(StatusEffect.Cuffed); + status.ClearAlert(AlertType.Handcuffed); } else { - status.ChangeStatusEffectIcon(StatusEffect.Cuffed, "/Textures/Interface/StatusEffects/Handcuffed/Handcuffed.png"); + status.ShowAlert(AlertType.Handcuffed); } } } @@ -282,7 +283,7 @@ namespace Content.Server.GameObjects.Components.ActionBlocking CanStillInteract = _hands.Hands.Count() > CuffedHandCount; OnCuffedStateChanged.Invoke(); - UpdateStatusEffect(); + UpdateAlert(); Dirty(); if (CuffedHandCount == 0) diff --git a/Content.Server/GameObjects/Components/Arcade/BlockGameArcadeComponent.cs b/Content.Server/GameObjects/Components/Arcade/BlockGameArcadeComponent.cs index 736442f95a..b60dc31c95 100644 --- a/Content.Server/GameObjects/Components/Arcade/BlockGameArcadeComponent.cs +++ b/Content.Server/GameObjects/Components/Arcade/BlockGameArcadeComponent.cs @@ -299,6 +299,7 @@ namespace Content.Server.GameObjects.Components.Arcade _component = component; _allBlockGamePieces = (BlockGamePieceType[]) Enum.GetValues(typeof(BlockGamePieceType)); _internalNextPiece = GetRandomBlockGamePiece(_component._random); + InitializeNewBlock(); } private void SendHighscoreUpdate() @@ -315,8 +316,6 @@ namespace Content.Server.GameObjects.Components.Arcade public void StartGame() { - InitializeNewBlock(); - _component.UserInterface?.SendMessage(new BlockGameMessages.BlockGameSetScreenMessage(BlockGameMessages.BlockGameScreen.Game)); FullUpdate(); @@ -569,10 +568,10 @@ namespace Content.Server.GameObjects.Components.Arcade break; case BlockGamePlayerAction.Pause: _running = false; - _component.UserInterface?.SendMessage(new BlockGameMessages.BlockGameSetScreenMessage(BlockGameMessages.BlockGameScreen.Pause)); + _component.UserInterface?.SendMessage(new BlockGameMessages.BlockGameSetScreenMessage(BlockGameMessages.BlockGameScreen.Pause, _started)); break; case BlockGamePlayerAction.Unpause: - if (!_gameOver) + if (!_gameOver && _started) { _running = true; _component.UserInterface?.SendMessage(new BlockGameMessages.BlockGameSetScreenMessage(BlockGameMessages.BlockGameScreen.Game)); @@ -583,7 +582,7 @@ namespace Content.Server.GameObjects.Components.Arcade break; case BlockGamePlayerAction.ShowHighscores: _running = false; - _component.UserInterface?.SendMessage(new BlockGameMessages.BlockGameSetScreenMessage(BlockGameMessages.BlockGameScreen.Highscores)); + _component.UserInterface?.SendMessage(new BlockGameMessages.BlockGameSetScreenMessage(BlockGameMessages.BlockGameScreen.Highscores, _started)); break; } } @@ -654,6 +653,7 @@ namespace Content.Server.GameObjects.Components.Arcade } private bool IsGameOver => _field.Any(block => block.Position.Y == 0); + private void InvokeGameover() { _running = false; diff --git a/Content.Server/GameObjects/Components/Atmos/BarotraumaComponent.cs b/Content.Server/GameObjects/Components/Atmos/BarotraumaComponent.cs index 6710298441..f595aa4b13 100644 --- a/Content.Server/GameObjects/Components/Atmos/BarotraumaComponent.cs +++ b/Content.Server/GameObjects/Components/Atmos/BarotraumaComponent.cs @@ -2,6 +2,7 @@ using System.Runtime.CompilerServices; using Content.Server.GameObjects.Components.Mobs; using Content.Server.Interfaces.GameObjects; +using Content.Shared.Alert; using Content.Shared.Atmos; using Content.Shared.Damage; using Content.Shared.GameObjects.Components.Damage; @@ -22,7 +23,7 @@ namespace Content.Server.GameObjects.Components.Atmos public void Update(float airPressure) { if (!Owner.TryGetComponent(out IDamageableComponent damageable)) return; - Owner.TryGetComponent(out ServerStatusEffectsComponent status); + Owner.TryGetComponent(out ServerAlertsComponent status); var highPressureMultiplier = 1f; var lowPressureMultiplier = 1f; @@ -50,11 +51,11 @@ namespace Content.Server.GameObjects.Components.Atmos if (pressure <= Atmospherics.HazardLowPressure) { - status.ChangeStatusEffect(StatusEffect.Pressure, "/Textures/Interface/StatusEffects/Pressure/lowpressure2.png", null); + status.ShowAlert(AlertType.LowPressure, 2); break; } - status.ChangeStatusEffect(StatusEffect.Pressure, "/Textures/Interface/StatusEffects/Pressure/lowpressure1.png", null); + status.ShowAlert(AlertType.LowPressure, 1); break; // High pressure. @@ -72,16 +73,16 @@ namespace Content.Server.GameObjects.Components.Atmos if (pressure >= Atmospherics.HazardHighPressure) { - status.ChangeStatusEffect(StatusEffect.Pressure, "/Textures/Interface/StatusEffects/Pressure/highpressure2.png", null); + status.ShowAlert(AlertType.HighPressure, 2); break; } - status.ChangeStatusEffect(StatusEffect.Pressure, "/Textures/Interface/StatusEffects/Pressure/highpressure1.png", null); + status.ShowAlert(AlertType.HighPressure, 1); break; // Normal pressure. default: - status?.RemoveStatusEffect(StatusEffect.Pressure); + status?.ClearAlertCategory(AlertCategory.Pressure); break; } diff --git a/Content.Server/GameObjects/Components/Atmos/FirelockComponent.cs b/Content.Server/GameObjects/Components/Atmos/FirelockComponent.cs index 4584bec9c4..5724e64a4c 100644 --- a/Content.Server/GameObjects/Components/Atmos/FirelockComponent.cs +++ b/Content.Server/GameObjects/Components/Atmos/FirelockComponent.cs @@ -44,11 +44,6 @@ namespace Content.Server.GameObjects.Components.Atmos AutoClose = false; Safety = false; - if (Occludes && Owner.TryGetComponent(out OccluderComponent occluder)) - { - occluder.Enabled = false; - } - State = DoorState.Open; SetAppearance(DoorVisualState.Open); } diff --git a/Content.Server/GameObjects/Components/Atmos/FlammableComponent.cs b/Content.Server/GameObjects/Components/Atmos/FlammableComponent.cs index 6ca1388d84..137725f25d 100644 --- a/Content.Server/GameObjects/Components/Atmos/FlammableComponent.cs +++ b/Content.Server/GameObjects/Components/Atmos/FlammableComponent.cs @@ -4,6 +4,7 @@ using Content.Server.Atmos; using Content.Server.GameObjects.Components.Mobs; using Content.Server.GameObjects.Components.Temperature; using Content.Server.GameObjects.EntitySystems; +using Content.Shared.Alert; using Content.Shared.Atmos; using Content.Shared.Chemistry; using Content.Shared.Damage; @@ -93,15 +94,15 @@ namespace Content.Server.GameObjects.Components.Atmos FireStacks = MathF.Min(0, FireStacks + 1); } - Owner.TryGetComponent(out ServerStatusEffectsComponent status); + Owner.TryGetComponent(out ServerAlertsComponent status); if (!OnFire) { - status?.RemoveStatusEffect(StatusEffect.Fire); + status?.ClearAlert(AlertType.Fire); return; } - status?.ChangeStatusEffect(StatusEffect.Fire, "/Textures/Interface/StatusEffects/Fire/fire.png", null); + status.ShowAlert(AlertType.Fire, onClickAlert: OnClickAlert); if (FireStacks > 0) { @@ -153,6 +154,14 @@ namespace Content.Server.GameObjects.Components.Atmos } } + private void OnClickAlert(ClickAlertEventArgs args) + { + if (args.Player.TryGetComponent(out FlammableComponent flammable)) + { + flammable.Resist(); + } + } + public void CollideWith(IEntity collidedWith) { if (!collidedWith.TryGetComponent(out FlammableComponent otherFlammable)) diff --git a/Content.Server/GameObjects/Components/Body/Behavior/BrainBehaviorComponent.cs b/Content.Server/GameObjects/Components/Body/Behavior/BrainBehavior.cs similarity index 80% rename from Content.Server/GameObjects/Components/Body/Behavior/BrainBehaviorComponent.cs rename to Content.Server/GameObjects/Components/Body/Behavior/BrainBehavior.cs index 0dff9e5a98..d5533a961d 100644 --- a/Content.Server/GameObjects/Components/Body/Behavior/BrainBehaviorComponent.cs +++ b/Content.Server/GameObjects/Components/Body/Behavior/BrainBehavior.cs @@ -1,22 +1,14 @@ #nullable enable using Content.Server.GameObjects.Components.Mobs; -using Content.Server.Mobs; using Content.Shared.GameObjects.Components.Body; -using Content.Shared.GameObjects.Components.Body.Behavior; using Content.Shared.GameObjects.Components.Body.Part; using Robust.Shared.GameObjects; -using Robust.Shared.GameObjects.ComponentDependencies; using Robust.Shared.Interfaces.GameObjects; -using Robust.Shared.Log; -using Robust.Shared.ViewVariables; namespace Content.Server.GameObjects.Components.Body.Behavior { - [RegisterComponent] - public class BrainBehaviorComponent : MechanismBehaviorComponent + public class BrainBehavior : MechanismBehavior { - public override string Name => "Brain"; - protected override void OnAddedToBody(IBody body) { base.OnAddedToBody(body); @@ -66,9 +58,5 @@ namespace Content.Server.GameObjects.Components.Body.Behavior oldMind.Mind?.TransferTo(newEntity); } - - public override void Update(float frameTime) - { - } } } diff --git a/Content.Server/GameObjects/Components/Body/Behavior/HeartBehaviorComponent.cs b/Content.Server/GameObjects/Components/Body/Behavior/HeartBehavior.cs similarity index 71% rename from Content.Server/GameObjects/Components/Body/Behavior/HeartBehaviorComponent.cs rename to Content.Server/GameObjects/Components/Body/Behavior/HeartBehavior.cs index 9b0c9bc5fb..855c5831ef 100644 --- a/Content.Server/GameObjects/Components/Body/Behavior/HeartBehaviorComponent.cs +++ b/Content.Server/GameObjects/Components/Body/Behavior/HeartBehavior.cs @@ -1,20 +1,17 @@ using Content.Shared.GameObjects.Components.Body.Behavior; using Content.Shared.GameObjects.Components.Body.Networks; -using Robust.Shared.GameObjects; namespace Content.Server.GameObjects.Components.Body.Behavior { - [RegisterComponent] - [ComponentReference(typeof(SharedHeartBehaviorComponent))] - public class HeartBehaviorComponent : SharedHeartBehaviorComponent + public class HeartBehavior : MechanismBehavior { private float _accumulatedFrameTime; public override void Update(float frameTime) { // TODO BODY do between pre and metabolism - if (Mechanism?.Body == null || - !Mechanism.Body.Owner.HasComponent()) + if (Parent.Body == null || + !Parent.Body.Owner.HasComponent()) { return; } diff --git a/Content.Server/GameObjects/Components/Body/Behavior/LungBehaviorComponent.cs b/Content.Server/GameObjects/Components/Body/Behavior/LungBehavior.cs similarity index 91% rename from Content.Server/GameObjects/Components/Body/Behavior/LungBehaviorComponent.cs rename to Content.Server/GameObjects/Components/Body/Behavior/LungBehavior.cs index 195733fe71..6755c4d6b2 100644 --- a/Content.Server/GameObjects/Components/Body/Behavior/LungBehaviorComponent.cs +++ b/Content.Server/GameObjects/Components/Body/Behavior/LungBehavior.cs @@ -8,19 +8,15 @@ using Content.Server.GameObjects.Components.Body.Respiratory; using Content.Server.Utility; using Content.Shared.Atmos; using Content.Shared.GameObjects.Components.Body.Behavior; -using Robust.Shared.GameObjects; using Robust.Shared.Interfaces.Timing; using Robust.Shared.IoC; using Robust.Shared.Localization; -using Robust.Shared.Log; using Robust.Shared.Serialization; using Robust.Shared.ViewVariables; namespace Content.Server.GameObjects.Components.Body.Behavior { - [RegisterComponent] - [ComponentReference(typeof(SharedLungBehaviorComponent))] - public class LungBehaviorComponent : SharedLungBehaviorComponent + public class LungBehavior : MechanismBehavior { [Dependency] private readonly IGameTiming _gameTiming = default!; @@ -30,18 +26,24 @@ namespace Content.Server.GameObjects.Components.Body.Behavior [ViewVariables] public GasMixture Air { get; set; } = default!; - [ViewVariables] public override float Temperature => Air.Temperature; + [ViewVariables] public float Temperature => Air.Temperature; - [ViewVariables] public override float Volume => Air.Volume; + [ViewVariables] public float Volume => Air.Volume; [ViewVariables] public TimeSpan GaspPopupCooldown { get; private set; } + [ViewVariables] public LungStatus Status { get; set; } + + [ViewVariables] public float CycleDelay { get; set; } + public override void ExposeData(ObjectSerializer serializer) { base.ExposeData(serializer); Air = new GasMixture {Temperature = Atmospherics.NormalBodyTemperature}; + serializer.DataField(this, l => l.CycleDelay, "cycleDelay", 2); + serializer.DataReadWriteFunction( "volume", 6, @@ -61,7 +63,7 @@ namespace Content.Server.GameObjects.Components.Body.Behavior () => GaspPopupCooldown.TotalSeconds); } - public override void Gasp() + public void Gasp() { if (_gameTiming.CurTime >= _lastGaspPopupTime + GaspPopupCooldown) { @@ -148,7 +150,7 @@ namespace Content.Server.GameObjects.Components.Body.Behavior _accumulatedFrameTime = absoluteTime - delay; } - public override void Inhale(float frameTime) + public void Inhale(float frameTime) { if (Body != null && Body.Owner.TryGetComponent(out InternalsComponent? internals) && internals.BreathToolEntity != null && internals.GasTankEntity != null @@ -176,7 +178,7 @@ namespace Content.Server.GameObjects.Components.Body.Behavior ToBloodstream(Air); } - public override void Exhale(float frameTime) + public void Exhale(float frameTime) { if (!Owner.Transform.Coordinates.TryGetTileAir(out var tileAir)) { @@ -218,4 +220,11 @@ namespace Content.Server.GameObjects.Components.Body.Behavior Air.Merge(lungRemoved); } } + + public enum LungStatus + { + None = 0, + Inhaling, + Exhaling + } } diff --git a/Content.Shared/GameObjects/Components/Body/Behavior/MechanismBehaviorComponent.cs b/Content.Server/GameObjects/Components/Body/Behavior/MechanismBehavior.cs similarity index 75% rename from Content.Shared/GameObjects/Components/Body/Behavior/MechanismBehaviorComponent.cs rename to Content.Server/GameObjects/Components/Body/Behavior/MechanismBehavior.cs index f4a0683eca..ca571ab0ac 100644 --- a/Content.Shared/GameObjects/Components/Body/Behavior/MechanismBehaviorComponent.cs +++ b/Content.Server/GameObjects/Components/Body/Behavior/MechanismBehavior.cs @@ -1,23 +1,33 @@ #nullable enable +using Content.Shared.GameObjects.Components.Body; +using Content.Shared.GameObjects.Components.Body.Behavior; using Content.Shared.GameObjects.Components.Body.Mechanism; using Content.Shared.GameObjects.Components.Body.Part; -using Robust.Shared.GameObjects; +using Robust.Shared.Interfaces.GameObjects; +using Robust.Shared.Serialization; using Robust.Shared.Utility; -namespace Content.Shared.GameObjects.Components.Body.Behavior +namespace Content.Server.GameObjects.Components.Body.Behavior { - public abstract class MechanismBehaviorComponent : Component, IMechanismBehavior + public abstract class MechanismBehavior : IMechanismBehavior { public IBody? Body => Part?.Body; - public IBodyPart? Part => Mechanism?.Part; + public IBodyPart? Part => Parent.Part; - public IMechanism? Mechanism => Owner.GetComponentOrNull(); + public IMechanism Parent { get; private set; } = default!; - protected override void Startup() + public IEntity Owner => Parent.Owner; + + public virtual void ExposeData(ObjectSerializer serializer) { } + + public virtual void Initialize(IMechanism parent) { - base.Startup(); + Parent = parent; + } + public virtual void Startup() + { if (Part == null) { return; @@ -33,8 +43,6 @@ namespace Content.Shared.GameObjects.Components.Body.Behavior } } - public abstract void Update(float frameTime); - public void AddedToBody(IBody body) { DebugTools.AssertNotNull(Body); @@ -98,5 +106,7 @@ namespace Content.Shared.GameObjects.Components.Body.Behavior protected virtual void OnRemovedFromPart(IBodyPart old) { } protected virtual void OnRemovedFromPartInBody(IBody oldBody, IBodyPart oldPart) { } + + public virtual void Update(float frameTime) { } } } diff --git a/Content.Shared/GameObjects/Components/Body/Mechanism/MechanismExtensions.cs b/Content.Server/GameObjects/Components/Body/Behavior/MechanismExtensions.cs similarity index 79% rename from Content.Shared/GameObjects/Components/Body/Mechanism/MechanismExtensions.cs rename to Content.Server/GameObjects/Components/Body/Behavior/MechanismExtensions.cs index 8dfb8750de..453b089c94 100644 --- a/Content.Shared/GameObjects/Components/Body/Mechanism/MechanismExtensions.cs +++ b/Content.Server/GameObjects/Components/Body/Behavior/MechanismExtensions.cs @@ -2,33 +2,29 @@ using System.Collections.Generic; using System.Diagnostics.CodeAnalysis; using System.Linq; +using Content.Shared.GameObjects.Components.Body; using Content.Shared.GameObjects.Components.Body.Behavior; using Content.Shared.GameObjects.Components.Body.Part; -namespace Content.Shared.GameObjects.Components.Body.Mechanism +namespace Content.Server.GameObjects.Components.Body.Behavior { public static class MechanismExtensions { - public static bool HasMechanismBehavior(this IBody body) + public static bool HasMechanismBehavior(this IBody body) where T : IMechanismBehavior { return body.Parts.Values.Any(p => p.HasMechanismBehavior()); } - public static bool HasMechanismBehavior(this IBodyPart part) + public static bool HasMechanismBehavior(this IBodyPart part) where T : IMechanismBehavior { - return part.Mechanisms.Any(m => m.Owner.HasComponent()); - } - - public static bool HasMechanismBehavior(this IMechanism mechanism) - { - return mechanism.Owner.HasComponent(); + return part.Mechanisms.Any(m => m.HasBehavior()); } public static IEnumerable GetMechanismBehaviors(this IBody body) { foreach (var part in body.Parts.Values) foreach (var mechanism in part.Mechanisms) - foreach (var behavior in mechanism.Owner.GetAllComponents()) + foreach (var behavior in mechanism.Behaviors.Values) { yield return behavior; } @@ -52,10 +48,11 @@ namespace Content.Shared.GameObjects.Components.Body.Mechanism { foreach (var part in body.Parts.Values) foreach (var mechanism in part.Mechanisms) + foreach (var behavior in mechanism.Behaviors.Values) { - if (mechanism.Owner.TryGetComponent(out T? behavior)) + if (behavior is T tBehavior) { - yield return behavior; + yield return tBehavior; } } } diff --git a/Content.Shared/GameObjects/Components/Body/Behavior/SharedStomachBehaviorComponent.cs b/Content.Server/GameObjects/Components/Body/Behavior/StomachBehavior.cs similarity index 88% rename from Content.Shared/GameObjects/Components/Body/Behavior/SharedStomachBehaviorComponent.cs rename to Content.Server/GameObjects/Components/Body/Behavior/StomachBehavior.cs index 2045a1f0fa..6bb18a8a89 100644 --- a/Content.Shared/GameObjects/Components/Body/Behavior/SharedStomachBehaviorComponent.cs +++ b/Content.Server/GameObjects/Components/Body/Behavior/StomachBehavior.cs @@ -1,23 +1,23 @@ -#nullable enable +#nullable enable using System.Collections.Generic; using System.Linq; +using Content.Server.GameObjects.Components.Chemistry; using Content.Shared.Chemistry; using Content.Shared.GameObjects.Components.Body.Networks; using Content.Shared.GameObjects.Components.Chemistry; using Robust.Shared.GameObjects; +using Robust.Shared.Log; using Robust.Shared.Serialization; using Robust.Shared.ViewVariables; -namespace Content.Shared.GameObjects.Components.Body.Behavior +namespace Content.Server.GameObjects.Components.Body.Behavior { /// /// Where reagents go when ingested. Tracks ingested reagents over time, and /// eventually transfers them to once digested. /// - public abstract class SharedStomachBehaviorComponent : MechanismBehaviorComponent + public class StomachBehavior : MechanismBehavior { - public override string Name => "Stomach"; - private float _accumulatedFrameTime; /// @@ -45,7 +45,7 @@ namespace Content.Shared.GameObjects.Components.Body.Behavior _accumulatedFrameTime -= 1; - if (!Body.Owner.TryGetComponent(out SharedSolutionContainerComponent? solution) || + if (!Owner.TryGetComponent(out SharedSolutionContainerComponent? solution) || !Body.Owner.TryGetComponent(out SharedBloodstreamComponent? bloodstream)) { return; @@ -58,7 +58,7 @@ namespace Content.Shared.GameObjects.Components.Body.Behavior foreach (var delta in _reagentDeltas.ToList()) { //Increment lifetime of reagents - delta.Increment(frameTime); + delta.Increment(1); if (delta.Lifetime > _digestionDelay) { solution.TryRemoveReagent(delta.ReagentId, delta.Quantity); @@ -112,6 +112,18 @@ namespace Content.Shared.GameObjects.Components.Body.Behavior serializer.DataField(ref _digestionDelay, "digestionDelay", 20); } + public override void Startup() + { + base.Startup(); + + if (!Owner.EnsureComponent(out SolutionContainerComponent solution)) + { + Logger.Warning($"Entity {Owner} at {Owner.Transform.MapPosition} didn't have a {nameof(SolutionContainerComponent)}"); + } + + solution.MaxVolume = InitialMaxVolume; + } + public bool CanTransferSolution(Solution solution) { if (!Owner.TryGetComponent(out SharedSolutionContainerComponent? solutionComponent)) diff --git a/Content.Server/GameObjects/Components/Body/Behavior/StomachBehaviorComponent.cs b/Content.Server/GameObjects/Components/Body/Behavior/StomachBehaviorComponent.cs deleted file mode 100644 index 10476d09c6..0000000000 --- a/Content.Server/GameObjects/Components/Body/Behavior/StomachBehaviorComponent.cs +++ /dev/null @@ -1,24 +0,0 @@ -using Content.Server.GameObjects.Components.Chemistry; -using Content.Shared.GameObjects.Components.Body.Behavior; -using Robust.Shared.GameObjects; -using Robust.Shared.Log; - -namespace Content.Server.GameObjects.Components.Body.Behavior -{ - [RegisterComponent] - [ComponentReference(typeof(SharedStomachBehaviorComponent))] - public class StomachBehaviorComponent : SharedStomachBehaviorComponent - { - protected override void Startup() - { - base.Startup(); - - if (!Owner.EnsureComponent(out SolutionContainerComponent solution)) - { - Logger.Warning($"Entity {Owner} at {Owner.Transform.MapPosition} didn't have a {nameof(SolutionContainerComponent)}"); - } - - solution.MaxVolume = InitialMaxVolume; - } - } -} diff --git a/Content.Server/GameObjects/Components/Buckle/BuckleComponent.cs b/Content.Server/GameObjects/Components/Buckle/BuckleComponent.cs index 94e7b0d8a4..1c4c0f55f8 100644 --- a/Content.Server/GameObjects/Components/Buckle/BuckleComponent.cs +++ b/Content.Server/GameObjects/Components/Buckle/BuckleComponent.cs @@ -7,6 +7,7 @@ using Content.Server.GameObjects.Components.Mobs.State; using Content.Server.GameObjects.Components.Pulling; using Content.Server.GameObjects.Components.Strap; using Content.Server.GameObjects.EntitySystems; +using Content.Shared.Alert; using Content.Shared.GameObjects.Components.Buckle; using Content.Shared.GameObjects.Components.Mobs; using Content.Shared.GameObjects.Components.Strap; @@ -15,21 +16,16 @@ using Content.Shared.GameObjects.Verbs; using Content.Shared.Interfaces; using Content.Shared.Interfaces.GameObjects.Components; using Content.Shared.Utility; -using NFluidsynth; using Robust.Server.GameObjects; -using Robust.Server.GameObjects.EntitySystemMessages; using Robust.Server.GameObjects.EntitySystems; using Robust.Shared.Containers; using Robust.Shared.GameObjects; using Robust.Shared.GameObjects.ComponentDependencies; -using Robust.Shared.GameObjects.Components.Transform; using Robust.Shared.GameObjects.Systems; using Robust.Shared.Interfaces.GameObjects; -using Robust.Shared.Interfaces.Map; using Robust.Shared.Interfaces.Timing; using Robust.Shared.IoC; using Robust.Shared.Localization; -using Robust.Shared.Log; using Robust.Shared.Maths; using Robust.Shared.Serialization; using Robust.Shared.ViewVariables; @@ -39,12 +35,10 @@ namespace Content.Server.GameObjects.Components.Buckle [RegisterComponent] public class BuckleComponent : SharedBuckleComponent, IInteractHand { - [Dependency] private readonly IEntityManager _entityManager = default!; - [Dependency] private readonly IEntitySystemManager _entitySystem = default!; [Dependency] private readonly IGameTiming _gameTiming = default!; [ComponentDependency] public readonly AppearanceComponent? AppearanceComponent = null; - [ComponentDependency] private readonly ServerStatusEffectsComponent? _serverStatusEffectsComponent = null; + [ComponentDependency] private readonly ServerAlertsComponent? _serverAlertsComponent = null; [ComponentDependency] private readonly StunnableComponent? _stunnableComponent = null; [ComponentDependency] private readonly MobStateManagerComponent? _mobStateManagerComponent = null; @@ -69,7 +63,10 @@ namespace Content.Server.GameObjects.Components.Buckle [ViewVariables] private TimeSpan _buckleTime; - public Vector2? BuckleOffset { get; private set; } + /// + /// The position offset that is being applied to this entity if buckled. + /// + public Vector2 BuckleOffset { get; private set; } private StrapComponent? _buckledTo; @@ -91,20 +88,6 @@ namespace Content.Server.GameObjects.Components.Buckle [ViewVariables] public override bool Buckled => BuckledTo != null; - /// - /// True if the entity was inserted or removed from a container - /// before updating, false otherwise. - /// - [ViewVariables] - private bool ContainerChanged { get; set; } - - /// - /// True if the entity was forcefully moved while buckled and should - /// unbuckle next update, false otherwise - /// - [ViewVariables] - private bool Moved { get; set; } - /// /// The amount of space that this entity occupies in a /// . @@ -116,26 +99,38 @@ namespace Content.Server.GameObjects.Components.Buckle /// Shows or hides the buckled status effect depending on if the /// entity is buckled or not. /// - private void BuckleStatus() + private void UpdateBuckleStatus() { - if (_serverStatusEffectsComponent != null) + if (_serverAlertsComponent == null) { - if (Buckled) - { - _serverStatusEffectsComponent.ChangeStatusEffectIcon(StatusEffect.Buckled, BuckledTo!.BuckledIcon); - } - else - { - _serverStatusEffectsComponent.RemoveStatusEffect(StatusEffect.Buckled); - } + return; + } + + if (Buckled) + { + _serverAlertsComponent.ShowAlert(BuckledTo != null ? BuckledTo.BuckledAlertType : AlertType.Buckled, + onClickAlert: OnClickAlert); + } + else + { + _serverAlertsComponent.ClearAlertCategory(AlertCategory.Buckled); } } + private void OnClickAlert(ClickAlertEventArgs args) + { + if (args.Player.TryGetComponent(out BuckleComponent? buckle)) + { + buckle.TryUnbuckle(args.Player); + } + } + + /// /// Reattaches this entity to the strap, modifying its position and rotation. /// /// The strap to reattach to. - private void ReAttach(StrapComponent strap) + public void ReAttach(StrapComponent strap) { var ownTransform = Owner.Transform; var strapTransform = strap.Owner.Transform; @@ -161,7 +156,7 @@ namespace Content.Server.GameObjects.Components.Buckle if (strapTransform.WorldRotation.GetCardinalDir() == Direction.North) { BuckleOffset = (0, 0.15f); - ownTransform.WorldPosition = strapTransform.WorldPosition + BuckleOffset!.Value; + ownTransform.WorldPosition = strapTransform.WorldPosition + BuckleOffset; } else { @@ -266,8 +261,7 @@ namespace Content.Server.GameObjects.Components.Buckle return false; } - _entitySystem.GetEntitySystem() - .PlayFromEntity(strap.BuckleSound, Owner); + EntitySystem.Get().PlayFromEntity(strap.BuckleSound, Owner); if (!strap.TryAdd(this)) { @@ -283,13 +277,10 @@ namespace Content.Server.GameObjects.Components.Buckle BuckledTo = strap; ReAttach(strap); - BuckleStatus(); + UpdateBuckleStatus(); SendMessage(new BuckleMessage(Owner, to)); - Owner.EntityManager.EventBus.SubscribeEvent(EventSource.Local, this, MoveEvent); - - if (Owner.TryGetComponent(out PullableComponent? pullableComponent)) { if (pullableComponent.Puller != null) @@ -315,12 +306,12 @@ namespace Content.Server.GameObjects.Components.Buckle /// public bool TryUnbuckle(IEntity user, bool force = false) { - if (!Buckled) + if (BuckledTo == null) { return false; } - StrapComponent oldBuckledTo = BuckledTo!; + var oldBuckledTo = BuckledTo; if (!force) { @@ -360,21 +351,15 @@ namespace Content.Server.GameObjects.Components.Buckle EntitySystem.Get().Standing(Owner); } - if (_mobStateManagerComponent != null) - { - _mobStateManagerComponent.CurrentMobState.EnterState(Owner); - } + _mobStateManagerComponent?.CurrentMobState.EnterState(Owner); - BuckleStatus(); + UpdateBuckleStatus(); oldBuckledTo.Remove(this); - _entitySystem.GetEntitySystem() - .PlayFromEntity(oldBuckledTo.UnbuckleSound, Owner); + EntitySystem.Get().PlayFromEntity(oldBuckledTo.UnbuckleSound, Owner); SendMessage(new UnbuckleMessage(Owner, oldBuckledTo.Owner)); - Owner.EntityManager.EventBus.UnsubscribeEvent(EventSource.Local, this); - return true; } @@ -402,90 +387,6 @@ namespace Content.Server.GameObjects.Components.Buckle return TryBuckle(user, to); } - /// - /// Checks if a buckled entity should be unbuckled from moving - /// too far from its strap. - /// - /// The move event of a buckled entity. - private void MoveEvent(MoveEvent moveEvent) - { - if (moveEvent.Sender != Owner) - { - return; - } - - if (BuckledTo == null || !BuckleOffset.HasValue) - { - return; - } - - var bucklePosition = BuckledTo.Owner.Transform.Coordinates.Offset(BuckleOffset.Value); - - if (moveEvent.NewPosition.InRange(_entityManager, bucklePosition, 0.2f)) - { - return; - } - - Moved = true; - } - - /// - /// Called when the owner is inserted or removed from a container, - /// to synchronize the state of buckling. - /// - /// The message received - private void InsertIntoContainer(ContainerModifiedMessage message) - { - if (message.Entity != Owner) - { - return; - } - - ContainerChanged = true; - } - - /// - /// Synchronizes the state of buckling depending on whether the entity - /// was inserted or removed from a container, and whether or not - /// its current strap (if there is one) has also been put into or removed - /// from the same container as well. - /// - public void Update() - { - if (BuckledTo == null) - { - return; - } - - if (Moved) - { - TryUnbuckle(Owner, true); - Moved = false; - return; - } - - if (!ContainerChanged) - { - return; - } - - var contained = ContainerHelpers.TryGetContainer(Owner, out var ownContainer); - var strapContained = ContainerHelpers.TryGetContainer(BuckledTo.Owner, out var strapContainer); - - if (contained != strapContained || ownContainer != strapContainer) - { - TryUnbuckle(Owner, true); - return; - } - - if (!contained && !strapContained) - { - ReAttach(BuckledTo); - } - - ContainerChanged = false; - } - public override void ExposeData(ObjectSerializer serializer) { base.ExposeData(serializer); @@ -499,32 +400,21 @@ namespace Content.Server.GameObjects.Components.Buckle _unbuckleDelay = TimeSpan.FromSeconds(seconds); } - public override void Initialize() - { - base.Initialize(); - - _entityManager.EventBus.SubscribeEvent(EventSource.Local, this, InsertIntoContainer); - _entityManager.EventBus.SubscribeEvent(EventSource.Local, this, InsertIntoContainer); - } - protected override void Startup() { base.Startup(); - BuckleStatus(); + UpdateBuckleStatus(); } public override void OnRemove() { base.OnRemove(); - _entityManager.EventBus.UnsubscribeEvents(this); - BuckledTo?.Remove(this); - TryUnbuckle(Owner, true); _buckleTime = default; - BuckleStatus(); + UpdateBuckleStatus(); } public override ComponentState GetComponentState() diff --git a/Content.Server/GameObjects/Components/Chemistry/PillComponent.cs b/Content.Server/GameObjects/Components/Chemistry/PillComponent.cs index a507974bea..b6b7f1ea26 100644 --- a/Content.Server/GameObjects/Components/Chemistry/PillComponent.cs +++ b/Content.Server/GameObjects/Components/Chemistry/PillComponent.cs @@ -84,7 +84,7 @@ namespace Content.Server.GameObjects.Components.Chemistry var trueTarget = target ?? user; if (!trueTarget.TryGetComponent(out IBody body) || - !body.TryGetMechanismBehaviors(out var stomachs)) + !body.TryGetMechanismBehaviors(out var stomachs)) { return false; } diff --git a/Content.Server/GameObjects/Components/ConfigurationComponent.cs b/Content.Server/GameObjects/Components/ConfigurationComponent.cs index 77049e6260..6e468e2435 100644 --- a/Content.Server/GameObjects/Components/ConfigurationComponent.cs +++ b/Content.Server/GameObjects/Components/ConfigurationComponent.cs @@ -8,9 +8,7 @@ using Robust.Server.Interfaces.GameObjects; using Robust.Shared.GameObjects; using Robust.Shared.Serialization; using Robust.Shared.ViewVariables; -using System; using System.Collections.Generic; -using System.Collections.Immutable; using System.Linq; using System.Text.RegularExpressions; using System.Threading.Tasks; @@ -28,18 +26,24 @@ namespace Content.Server.GameObjects.Components private Regex _validation; - public event Action> OnConfigUpdate; - - public override void Initialize() + public override void OnAdd() { - base.Initialize(); - + base.OnAdd(); if (UserInterface != null) { UserInterface.OnReceiveMessage += UserInterfaceOnReceiveMessage; } } + public override void OnRemove() + { + base.OnRemove(); + if (UserInterface != null) + { + UserInterface.OnReceiveMessage -= UserInterfaceOnReceiveMessage; + } + } + public override void ExposeData(ObjectSerializer serializer) { base.ExposeData(serializer); @@ -48,7 +52,7 @@ namespace Content.Server.GameObjects.Components (list) => FillConfiguration(list, _config, ""), () => _config.Keys.ToList()); - serializer.DataReadFunction("vailidation", "^[a-zA-Z0-9 ]*$", value => _validation = new Regex("^[a-zA-Z0-9 ]*$", RegexOptions.Compiled)); + serializer.DataReadFunction("validation", "^[a-zA-Z0-9 ]*$", value => _validation = new Regex("^[a-zA-Z0-9 ]*$", RegexOptions.Compiled)); } public string GetConfig(string name) @@ -90,22 +94,19 @@ namespace Content.Server.GameObjects.Components { var value = msg.Config.GetValueOrDefault(key); - if (_validation != null && !_validation.IsMatch(value) && value != "") + if (value == null || _validation != null && !_validation.IsMatch(value) && value != "") continue; _config[key] = value; } - OnConfigUpdate(_config); + SendMessage(new ConfigUpdatedComponentMessage(config)); } } private void UpdateUserInterface() { - if (UserInterface == null) - return; - - UserInterface.SetState(new ConfigurationBoundUserInterfaceState(_config)); + UserInterface?.SetState(new ConfigurationBoundUserInterfaceState(_config)); } private static void FillConfiguration(List list, Dictionary configuration, T value){ diff --git a/Content.Server/GameObjects/Components/Disposal/DisposalMailingUnitComponent.cs b/Content.Server/GameObjects/Components/Disposal/DisposalMailingUnitComponent.cs index 67cac05d66..e757fb5ace 100644 --- a/Content.Server/GameObjects/Components/Disposal/DisposalMailingUnitComponent.cs +++ b/Content.Server/GameObjects/Components/Disposal/DisposalMailingUnitComponent.cs @@ -13,6 +13,7 @@ using Content.Server.GameObjects.EntitySystems.DoAfter; using Content.Server.Interfaces; using Content.Server.Interfaces.GameObjects.Components.Items; using Content.Server.Utility; +using Content.Shared.GameObjects.Components; using Content.Shared.GameObjects.Components.Body; using Content.Shared.GameObjects.Components.Disposal; using Content.Shared.GameObjects.EntitySystems; @@ -603,12 +604,7 @@ namespace Content.Server.GameObjects.Components.Disposal UserInterface.OnReceiveMessage += OnUiReceiveMessage; } - var network = IoCManager.Resolve(); _connection = new WiredNetworkConnection(OnReceiveNetMessage, false, Owner); - - if (Owner.TryGetComponent(out var configuration)) - configuration.OnConfigUpdate += OnConfigUpdate; - UpdateInterface(); } @@ -673,6 +669,9 @@ namespace Content.Server.GameObjects.Components.Disposal switch (message) { + case SharedConfigurationComponent.ConfigUpdatedComponentMessage msg: + OnConfigUpdate(msg.Config); + break; case RelayMovementEntityMessage msg: if (!msg.Entity.TryGetComponent(out HandsComponent? hands) || hands.Count == 0 || @@ -745,7 +744,7 @@ namespace Content.Server.GameObjects.Components.Disposal return false; } - // Duplicated code here, not sure how else to get actor inside to make UserInterface happy. + // Duplicated code here, not sure how else to get actor inside to make UserInterface happy. if (IsValidInteraction(eventArgs)) { diff --git a/Content.Server/GameObjects/Components/Items/FloorTileItemComponent.cs b/Content.Server/GameObjects/Components/Items/FloorTileItemComponent.cs index 52cf806e84..a9df905b61 100644 --- a/Content.Server/GameObjects/Components/Items/FloorTileItemComponent.cs +++ b/Content.Server/GameObjects/Components/Items/FloorTileItemComponent.cs @@ -1,4 +1,5 @@ using Content.Server.GameObjects.Components.Stack; +using Content.Shared.Audio; using Content.Shared.Interfaces.GameObjects.Components; using Content.Shared.Maps; using Content.Shared.Utility; @@ -8,6 +9,7 @@ using Robust.Shared.GameObjects.Systems; using Robust.Shared.Interfaces.Map; using Robust.Shared.IoC; using Robust.Shared.Map; +using Robust.Shared.Maths; using Robust.Shared.Serialization; namespace Content.Server.GameObjects.Components.Items @@ -33,23 +35,52 @@ namespace Content.Server.GameObjects.Components.Items Owner.EnsureComponent(); } + private bool HasBaseTurf(ContentTileDefinition tileDef, string baseTurf) + { + foreach (var tileBaseTurf in tileDef.BaseTurfs) + { + if (baseTurf == tileBaseTurf) + { + return true; + } + } + + return false; + } + + private void PlaceAt(IMapGrid mapGrid, EntityCoordinates location, ushort tileId, float offset = 0) + { + mapGrid.SetTile(location.Offset(new Vector2(offset, offset)), new Tile(tileId)); + EntitySystem.Get().PlayAtCoords("/Audio/Items/genhit.ogg", location, AudioHelpers.WithVariation(0.125f)); + } + public void AfterInteract(AfterInteractEventArgs eventArgs) { if (!eventArgs.InRangeUnobstructed(ignoreInsideBlocker: true, popup: true)) return; if (!Owner.TryGetComponent(out StackComponent stack)) return; - var attacked = eventArgs.Target; - var mapGrid = _mapManager.GetGrid(eventArgs.ClickLocation.GetGridId(Owner.EntityManager)); - var tile = mapGrid.GetTileRef(eventArgs.ClickLocation); - var tileDef = (ContentTileDefinition)_tileDefinitionManager[tile.Tile.TypeId]; + var location = eventArgs.ClickLocation.AlignWithClosestGridTile(); + var locationMap = location.ToMap(Owner.EntityManager); - if (tileDef.IsSubFloor && attacked == null && stack.Use(1)) + var desiredTile = (ContentTileDefinition)_tileDefinitionManager[_outputTile]; + + if (_mapManager.TryGetGrid(location.GetGridId(Owner.EntityManager), out var mapGrid)) { - var desiredTile = _tileDefinitionManager[_outputTile]; - mapGrid.SetTile(eventArgs.ClickLocation, new Tile(desiredTile.TileId)); - EntitySystem.Get().PlayAtCoords("/Audio/Items/genhit.ogg", eventArgs.ClickLocation); - } + var tile = mapGrid.GetTileRef(location); + var baseTurf = (ContentTileDefinition)_tileDefinitionManager[tile.Tile.TypeId]; + if (HasBaseTurf(desiredTile, baseTurf.Name) && eventArgs.Target == null && stack.Use(1)) + { + PlaceAt(mapGrid, location, desiredTile.TileId); + } + } + else if(HasBaseTurf(desiredTile, "space")) + { + mapGrid = _mapManager.CreateGrid(locationMap.MapId); + mapGrid.WorldPosition = locationMap.Position; + location = new EntityCoordinates(mapGrid.GridEntityId, Vector2.Zero); + PlaceAt(mapGrid, location, desiredTile.TileId, mapGrid.TileSize/2f); + } } diff --git a/Content.Server/GameObjects/Components/Metabolism/MetabolismComponent.cs b/Content.Server/GameObjects/Components/Metabolism/MetabolismComponent.cs index a93e3dec88..05ed21f0e2 100644 --- a/Content.Server/GameObjects/Components/Metabolism/MetabolismComponent.cs +++ b/Content.Server/GameObjects/Components/Metabolism/MetabolismComponent.cs @@ -192,7 +192,7 @@ namespace Content.Server.GameObjects.Components.Metabolism return; } - var lungs = _body.GetMechanismBehaviors().ToArray(); + var lungs = _body.GetMechanismBehaviors().ToArray(); var needs = NeedsAndDeficit(frameTime); var used = 0f; diff --git a/Content.Server/GameObjects/Components/Mobs/ServerAlertsComponent.cs b/Content.Server/GameObjects/Components/Mobs/ServerAlertsComponent.cs new file mode 100644 index 0000000000..2587b491e4 --- /dev/null +++ b/Content.Server/GameObjects/Components/Mobs/ServerAlertsComponent.cs @@ -0,0 +1,166 @@ +using System; +using Content.Server.Commands; +using Content.Server.GameObjects.EntitySystems; +using Content.Shared.Alert; +using Content.Shared.GameObjects.Components.Mobs; +using Robust.Server.Interfaces.Console; +using Robust.Server.Interfaces.Player; +using Robust.Shared.GameObjects; +using Robust.Shared.GameObjects.Systems; +using Robust.Shared.Interfaces.Network; +using Robust.Shared.IoC; +using Robust.Shared.Log; +using Robust.Shared.Players; + +namespace Content.Server.GameObjects.Components.Mobs +{ + [RegisterComponent] + [ComponentReference(typeof(SharedAlertsComponent))] + public sealed class ServerAlertsComponent : SharedAlertsComponent + { + + protected override void Startup() + { + base.Startup(); + + if (EntitySystem.TryGet(out var weightlessSystem)) + { + weightlessSystem.AddAlert(this); + } + else + { + Logger.WarningS("alert", "weightlesssystem not found"); + } + } + + public override void OnRemove() + { + if (EntitySystem.TryGet(out var weightlessSystem)) + { + weightlessSystem.RemoveAlert(this); + } + else + { + Logger.WarningS("alert", "weightlesssystem not found"); + } + + base.OnRemove(); + } + + public override ComponentState GetComponentState() + { + return new AlertsComponentState(CreateAlertStatesArray()); + } + + public override void HandleNetworkMessage(ComponentMessage message, INetChannel netChannel, ICommonSession session = null) + { + base.HandleNetworkMessage(message, netChannel, session); + + if (session == null) + { + throw new ArgumentNullException(nameof(session)); + } + + switch (message) + { + case ClickAlertMessage msg: + { + var player = session.AttachedEntity; + + if (player != Owner) + { + break; + } + + // TODO: Implement clicking other status effects in the HUD + if (AlertManager.TryDecode(msg.EncodedAlert, out var alert)) + { + PerformAlertClickCallback(alert, player); + } + else + { + Logger.WarningS("alert", "unrecognized encoded alert {0}", msg.EncodedAlert); + } + + break; + } + } + } + } + + public sealed class ShowAlert : IClientCommand + { + public string Command => "showalert"; + public string Description => "Shows an alert for a player, defaulting to current player"; + public string Help => "showalert "; + public void Execute(IConsoleShell shell, IPlayerSession player, string[] args) + { + var attachedEntity = player.AttachedEntity; + if (args.Length > 2) + { + var target = args[2]; + if (!Commands.CommandUtils.TryGetAttachedEntityByUsernameOrId(shell, target, player, out attachedEntity)) return; + } + + if (!CommandUtils.ValidateAttachedEntity(shell, player, attachedEntity)) return; + + + if (!attachedEntity.TryGetComponent(out ServerAlertsComponent alertsComponent)) + { + shell.SendText(player, "user has no alerts component"); + return; + } + + var alertType = args[0]; + var severity = args[1]; + var alertMgr = IoCManager.Resolve(); + if (!alertMgr.TryGet(Enum.Parse(alertType), out var alert)) + { + shell.SendText(player, "unrecognized alertType " + alertType); + return; + } + if (!short.TryParse(severity, out var sevint)) + { + shell.SendText(player, "invalid severity " + sevint); + return; + } + alertsComponent.ShowAlert(alert.AlertType, sevint == -1 ? (short?) null : sevint); + + } + } + + public sealed class ClearAlert : IClientCommand + { + public string Command => "clearalert"; + public string Description => "Clears an alert for a player, defaulting to current player"; + public string Help => "clearalert "; + + public void Execute(IConsoleShell shell, IPlayerSession player, string[] args) + { + var attachedEntity = player.AttachedEntity; + if (args.Length > 1) + { + var target = args[1]; + if (!CommandUtils.TryGetAttachedEntityByUsernameOrId(shell, target, player, out attachedEntity)) return; + } + + if (!CommandUtils.ValidateAttachedEntity(shell, player, attachedEntity)) return; + + if (!attachedEntity.TryGetComponent(out ServerAlertsComponent alertsComponent)) + { + shell.SendText(player, "user has no alerts component"); + return; + } + + var alertType = args[0]; + var alertMgr = IoCManager.Resolve(); + if (!alertMgr.TryGet(Enum.Parse(alertType), out var alert)) + { + shell.SendText(player, "unrecognized alertType " + alertType); + return; + } + + alertsComponent.ClearAlert(alert.AlertType); + } + } +} diff --git a/Content.Server/GameObjects/Components/Mobs/ServerStatusEffectsComponent.cs b/Content.Server/GameObjects/Components/Mobs/ServerStatusEffectsComponent.cs deleted file mode 100644 index 8715fdb3d7..0000000000 --- a/Content.Server/GameObjects/Components/Mobs/ServerStatusEffectsComponent.cs +++ /dev/null @@ -1,152 +0,0 @@ -using System; -using System.Collections.Generic; -using Content.Server.GameObjects.Components.Atmos; -using Content.Server.GameObjects.Components.Buckle; -using Content.Server.GameObjects.Components.Movement; -using Content.Server.GameObjects.EntitySystems; -using Content.Shared.GameObjects.Components.Mobs; -using Content.Shared.GameObjects.Components.Pulling; -using Content.Shared.GameObjects.EntitySystems; -using Content.Shared.Interfaces; -using Robust.Shared.GameObjects; -using Robust.Shared.GameObjects.Systems; -using Robust.Shared.Interfaces.Network; -using Robust.Shared.Players; -using Robust.Shared.ViewVariables; - -namespace Content.Server.GameObjects.Components.Mobs -{ - [RegisterComponent] - [ComponentReference(typeof(SharedStatusEffectsComponent))] - public sealed class ServerStatusEffectsComponent : SharedStatusEffectsComponent - { - [ViewVariables] - private readonly Dictionary _statusEffects = new Dictionary(); - - public override IReadOnlyDictionary Statuses => _statusEffects; - - protected override void Startup() - { - base.Startup(); - - EntitySystem.Get().AddStatus(this); - } - - public override void OnRemove() - { - EntitySystem.Get().RemoveStatus(this); - - base.OnRemove(); - } - - public override ComponentState GetComponentState() - { - return new StatusEffectComponentState(_statusEffects); - } - - public override void ChangeStatusEffectIcon(StatusEffect effect, string icon) - { - if (_statusEffects.TryGetValue(effect, out var value) && value.Icon == icon) - { - return; - } - - _statusEffects[effect] = new StatusEffectStatus() - {Icon = icon, Cooldown = value.Cooldown}; - Dirty(); - } - - public void ChangeStatusEffectCooldown(StatusEffect effect, ValueTuple cooldown) - { - if (_statusEffects.TryGetValue(effect, out var value) - && value.Cooldown == cooldown) - { - return; - } - - _statusEffects[effect] = new StatusEffectStatus() - { - Icon = value.Icon, Cooldown = cooldown - }; - Dirty(); - } - - public override void ChangeStatusEffect(StatusEffect effect, string icon, ValueTuple? cooldown) - { - _statusEffects[effect] = new StatusEffectStatus() - {Icon = icon, Cooldown = cooldown}; - - Dirty(); - } - - public override void RemoveStatusEffect(StatusEffect effect) - { - if (!_statusEffects.Remove(effect)) - { - return; - } - - Dirty(); - } - - public override void HandleNetworkMessage(ComponentMessage message, INetChannel netChannel, ICommonSession session = null) - { - base.HandleNetworkMessage(message, netChannel, session); - - if (session == null) - { - throw new ArgumentNullException(nameof(session)); - } - - switch (message) - { - case ClickStatusMessage msg: - { - var player = session.AttachedEntity; - - if (player != Owner) - { - break; - } - - // TODO: Implement clicking other status effects in the HUD - switch (msg.Effect) - { - case StatusEffect.Buckled: - if (!player.TryGetComponent(out BuckleComponent buckle)) - break; - - buckle.TryUnbuckle(player); - break; - case StatusEffect.Piloting: - if (!player.TryGetComponent(out ShuttleControllerComponent controller)) - break; - - controller.RemoveController(); - break; - case StatusEffect.Pulling: - EntitySystem - .Get() - .GetPulled(player)? - .GetComponentOrNull()? - .TryStopPull(); - - break; - case StatusEffect.Fire: - if (!player.TryGetComponent(out FlammableComponent flammable)) - break; - - flammable.Resist(); - break; - default: - player.PopupMessage(msg.Effect.ToString()); - break; - } - - break; - } - } - } - } - -} diff --git a/Content.Server/GameObjects/Components/Mobs/State/CriticalState.cs b/Content.Server/GameObjects/Components/Mobs/State/CriticalState.cs index 0adea20dde..9e6d92a0e0 100644 --- a/Content.Server/GameObjects/Components/Mobs/State/CriticalState.cs +++ b/Content.Server/GameObjects/Components/Mobs/State/CriticalState.cs @@ -1,4 +1,5 @@ using Content.Server.GameObjects.EntitySystems; +using Content.Shared.Alert; using Content.Shared.GameObjects.Components.Damage; using Content.Shared.GameObjects.Components.Mobs; using Content.Shared.GameObjects.Components.Mobs.State; @@ -17,10 +18,9 @@ namespace Content.Server.GameObjects.Components.Mobs.State appearance.SetData(DamageStateVisuals.State, DamageState.Critical); } - if (entity.TryGetComponent(out ServerStatusEffectsComponent status)) + if (entity.TryGetComponent(out ServerAlertsComponent status)) { - status.ChangeStatusEffectIcon(StatusEffect.Health, - "/Textures/Interface/StatusEffects/Human/humancrit-0.png"); //Todo: combine humancrit-0 and humancrit-1 into a gif and display it + status.ShowAlert(AlertType.HumanCrit); //Todo: combine humancrit-0 and humancrit-1 into a gif and display it } if (entity.TryGetComponent(out ServerOverlayEffectsComponent overlay)) diff --git a/Content.Server/GameObjects/Components/Mobs/State/DeadState.cs b/Content.Server/GameObjects/Components/Mobs/State/DeadState.cs index 9fc2428975..cdd4673510 100644 --- a/Content.Server/GameObjects/Components/Mobs/State/DeadState.cs +++ b/Content.Server/GameObjects/Components/Mobs/State/DeadState.cs @@ -1,4 +1,5 @@ using Content.Server.GameObjects.EntitySystems; +using Content.Shared.Alert; using Content.Shared.GameObjects.Components.Damage; using Content.Shared.GameObjects.Components.Mobs; using Content.Shared.GameObjects.Components.Mobs.State; @@ -18,10 +19,9 @@ namespace Content.Server.GameObjects.Components.Mobs.State appearance.SetData(DamageStateVisuals.State, DamageState.Dead); } - if (entity.TryGetComponent(out ServerStatusEffectsComponent status)) + if (entity.TryGetComponent(out ServerAlertsComponent status)) { - status.ChangeStatusEffectIcon(StatusEffect.Health, - "/Textures/Interface/StatusEffects/Human/humandead.png"); + status.ShowAlert(AlertType.HumanDead); } if (entity.TryGetComponent(out ServerOverlayEffectsComponent overlayComponent)) diff --git a/Content.Server/GameObjects/Components/Mobs/State/MobStateManager.cs b/Content.Server/GameObjects/Components/Mobs/State/MobStateManager.cs index c0e90dd9fa..d315ed1b0e 100644 --- a/Content.Server/GameObjects/Components/Mobs/State/MobStateManager.cs +++ b/Content.Server/GameObjects/Components/Mobs/State/MobStateManager.cs @@ -1,4 +1,5 @@ using System.Collections.Generic; +using Content.Shared.Alert; using Content.Shared.GameObjects.Components.Damage; using Content.Shared.GameObjects.Components.Mobs; using Content.Shared.GameObjects.Components.Mobs.State; @@ -51,9 +52,9 @@ namespace Content.Server.GameObjects.Components.Mobs.State // TODO: Might want to add an OnRemove() to IMobState since those are where these components are being used base.OnRemove(); - if (Owner.TryGetComponent(out ServerStatusEffectsComponent status)) + if (Owner.TryGetComponent(out ServerAlertsComponent status)) { - status.RemoveStatusEffect(StatusEffect.Health); + status.ClearAlert(AlertType.HumanHealth); } if (Owner.TryGetComponent(out ServerOverlayEffectsComponent overlay)) diff --git a/Content.Server/GameObjects/Components/Mobs/State/NormalState.cs b/Content.Server/GameObjects/Components/Mobs/State/NormalState.cs index 6b8eb4aab3..5915ccebbe 100644 --- a/Content.Server/GameObjects/Components/Mobs/State/NormalState.cs +++ b/Content.Server/GameObjects/Components/Mobs/State/NormalState.cs @@ -1,5 +1,6 @@ using Content.Server.GameObjects.Components.Damage; using Content.Server.GameObjects.EntitySystems; +using Content.Shared.Alert; using Content.Shared.GameObjects.Components.Damage; using Content.Shared.GameObjects.Components.Mobs; using Content.Shared.GameObjects.Components.Mobs.State; @@ -27,15 +28,14 @@ namespace Content.Server.GameObjects.Components.Mobs.State public override void UpdateState(IEntity entity) { - if (!entity.TryGetComponent(out ServerStatusEffectsComponent status)) + if (!entity.TryGetComponent(out ServerAlertsComponent status)) { return; } if (!entity.TryGetComponent(out IDamageableComponent damageable)) { - status.ChangeStatusEffectIcon(StatusEffect.Health, - "/Textures/Interface/StatusEffects/Human/human0.png"); + status.ShowAlert(AlertType.HumanHealth, 0); return; } @@ -49,10 +49,9 @@ namespace Content.Server.GameObjects.Components.Mobs.State return; } - var modifier = (int) (ruinable.TotalDamage / (threshold / 7f)); + var modifier = (short) (ruinable.TotalDamage / (threshold / 7f)); - status.ChangeStatusEffectIcon(StatusEffect.Health, - "/Textures/Interface/StatusEffects/Human/human" + modifier + ".png"); + status.ShowAlert(AlertType.HumanHealth, modifier); break; } @@ -63,10 +62,9 @@ namespace Content.Server.GameObjects.Components.Mobs.State return; } - var modifier = (int) (damageable.TotalDamage / (threshold / 7f)); + var modifier = (short) (damageable.TotalDamage / (threshold / 7f)); - status.ChangeStatusEffectIcon(StatusEffect.Health, - "/Textures/Interface/StatusEffects/Human/human" + modifier + ".png"); + status.ShowAlert(AlertType.HumanHealth, modifier); break; } } diff --git a/Content.Server/GameObjects/Components/Mobs/StunnableComponent.cs b/Content.Server/GameObjects/Components/Mobs/StunnableComponent.cs index 1af15ecce2..9f3ec4def6 100644 --- a/Content.Server/GameObjects/Components/Mobs/StunnableComponent.cs +++ b/Content.Server/GameObjects/Components/Mobs/StunnableComponent.cs @@ -1,4 +1,5 @@ using Content.Server.GameObjects.EntitySystems; +using Content.Shared.Alert; using Content.Shared.Chemistry; using Content.Shared.GameObjects.Components.Mobs; using Content.Shared.GameObjects.Components.Movement; @@ -89,7 +90,7 @@ namespace Content.Server.GameObjects.Components.Mobs } if (!StunStart.HasValue || !StunEnd.HasValue || - !Owner.TryGetComponent(out ServerStatusEffectsComponent status)) + !Owner.TryGetComponent(out ServerAlertsComponent status)) { return; } @@ -102,7 +103,7 @@ namespace Content.Server.GameObjects.Components.Mobs if (progress >= length) { - Owner.SpawnTimer(250, () => status.RemoveStatusEffect(StatusEffect.Stun), StatusRemoveCancellation.Token); + Owner.SpawnTimer(250, () => status.ClearAlert(AlertType.Stun), StatusRemoveCancellation.Token); LastStun = null; } } diff --git a/Content.Server/GameObjects/Components/Morgue/CrematoriumEntityStorageComponent.cs b/Content.Server/GameObjects/Components/Morgue/CrematoriumEntityStorageComponent.cs index 761c64561c..7b9b6a311b 100644 --- a/Content.Server/GameObjects/Components/Morgue/CrematoriumEntityStorageComponent.cs +++ b/Content.Server/GameObjects/Components/Morgue/CrematoriumEntityStorageComponent.cs @@ -3,6 +3,7 @@ using Content.Server.GameObjects.Components.Items.Storage; using Content.Shared.GameObjects.Components.Morgue; using Content.Shared.GameObjects.EntitySystems; using Content.Shared.GameObjects.Verbs; +using Content.Shared.Interfaces; using Content.Shared.Interfaces.GameObjects.Components; using Robust.Server.GameObjects.EntitySystems; using Robust.Shared.GameObjects; @@ -52,9 +53,20 @@ namespace Content.Server.GameObjects.Components.Morgue } } + public override bool CanOpen(IEntity user, bool silent = false) + { + if (Cooking) + { + if (!silent) Owner.PopupMessage(user, Loc.GetString("Safety first, not while it's active!")); + return false; + } + return base.CanOpen(user, silent); + } + public void Cremate() { if (Cooking) return; + if (Open) return; Appearance?.SetData(CrematoriumVisuals.Burning, true); Cooking = true; @@ -64,15 +76,18 @@ namespace Content.Server.GameObjects.Components.Morgue Appearance?.SetData(CrematoriumVisuals.Burning, false); Cooking = false; - for (var i = Contents.ContainedEntities.Count - 1; i >= 0; i--) + if (Contents.ContainedEntities.Count > 0) { - var item = Contents.ContainedEntities[i]; - Contents.Remove(item); - item.Delete(); - } + for (var i = Contents.ContainedEntities.Count - 1; i >= 0; i--) + { + var item = Contents.ContainedEntities[i]; + Contents.Remove(item); + item.Delete(); + } - var ash = Owner.EntityManager.SpawnEntity("Ash", Owner.Transform.Coordinates); - Contents.Insert(ash); + var ash = Owner.EntityManager.SpawnEntity("Ash", Owner.Transform.Coordinates); + Contents.Insert(ash); + } TryOpenStorage(Owner); @@ -85,7 +100,7 @@ namespace Content.Server.GameObjects.Components.Morgue { protected override void GetData(IEntity user, CrematoriumEntityStorageComponent component, VerbData data) { - if (!ActionBlockerSystem.CanInteract(user) || component.Cooking) + if (!ActionBlockerSystem.CanInteract(user) || component.Cooking || component.Open) { data.Visibility = VerbVisibility.Invisible; return; diff --git a/Content.Server/GameObjects/Components/Movement/ClimbingComponent.cs b/Content.Server/GameObjects/Components/Movement/ClimbingComponent.cs index 93f02320ac..8c3a5e84e2 100644 --- a/Content.Server/GameObjects/Components/Movement/ClimbingComponent.cs +++ b/Content.Server/GameObjects/Components/Movement/ClimbingComponent.cs @@ -1,6 +1,9 @@ -using Content.Shared.GameObjects.Components.Movement; +#nullable enable +using Content.Shared.GameObjects.Components.Buckle; +using Content.Shared.GameObjects.Components.Movement; using Content.Shared.Physics; using Robust.Shared.GameObjects; +using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Maths; namespace Content.Server.GameObjects.Components.Movement @@ -8,8 +11,8 @@ namespace Content.Server.GameObjects.Components.Movement [RegisterComponent] public class ClimbingComponent : SharedClimbingComponent { - private bool _isClimbing = false; - private ClimbController _climbController = default; + private bool _isClimbing; + private ClimbController? _climbController; public override bool IsClimbing { @@ -29,6 +32,19 @@ namespace Content.Server.GameObjects.Components.Movement } } + public override void HandleMessage(ComponentMessage message, IComponent? component) + { + base.HandleMessage(message, component); + switch (message) + { + case BuckleMessage msg: + if (msg.Buckled) + IsClimbing = false; + + break; + } + } + /// /// Make the owner climb from one point to another /// diff --git a/Content.Server/GameObjects/Components/Movement/ShuttleControllerComponent.cs b/Content.Server/GameObjects/Components/Movement/ShuttleControllerComponent.cs index 2def6aac43..db25892f5b 100644 --- a/Content.Server/GameObjects/Components/Movement/ShuttleControllerComponent.cs +++ b/Content.Server/GameObjects/Components/Movement/ShuttleControllerComponent.cs @@ -1,6 +1,7 @@ #nullable enable using Content.Server.GameObjects.Components.Buckle; using Content.Server.GameObjects.Components.Mobs; +using Content.Shared.Alert; using Content.Shared.GameObjects.Components.Mobs; using Content.Shared.GameObjects.Components.Movement; using Content.Shared.GameObjects.Components.Strap; @@ -31,9 +32,9 @@ namespace Content.Server.GameObjects.Components.Movement private bool _movingRight; /// - /// The icon to be displayed when piloting from this chair. + /// ID of the alert to show when piloting /// - private string _pilotingIcon = default!; + private AlertType _pilotingAlertType; /// /// The entity that's currently controlling this component. @@ -137,7 +138,7 @@ namespace Content.Server.GameObjects.Components.Movement if (_controller != null || !entity.TryGetComponent(out MindComponent? mind) || mind.Mind == null || - !Owner.TryGetComponent(out ServerStatusEffectsComponent? status)) + !Owner.TryGetComponent(out ServerAlertsComponent? status)) { return; } @@ -145,7 +146,15 @@ namespace Content.Server.GameObjects.Components.Movement mind.Mind.Visit(Owner); _controller = entity; - status.ChangeStatusEffectIcon(StatusEffect.Piloting, _pilotingIcon); + status.ShowAlert(_pilotingAlertType, onClickAlert: OnClickAlert); + } + + private void OnClickAlert(ClickAlertEventArgs args) + { + if (args.Player.TryGetComponent(out ShuttleControllerComponent? controller)) + { + controller.RemoveController(); + } } /// @@ -177,9 +186,9 @@ namespace Content.Server.GameObjects.Components.Movement /// The entity to update private void UpdateRemovedEntity(IEntity entity) { - if (Owner.TryGetComponent(out ServerStatusEffectsComponent? status)) + if (Owner.TryGetComponent(out ServerAlertsComponent? status)) { - status.RemoveStatusEffect(StatusEffect.Piloting); + status.ClearAlert(_pilotingAlertType); } if (entity.TryGetComponent(out MindComponent? mind)) @@ -211,13 +220,13 @@ namespace Content.Server.GameObjects.Components.Movement { base.ExposeData(serializer); - serializer.DataField(ref _pilotingIcon, "pilotingIcon", "/Textures/Interface/StatusEffects/Buckle/buckled.png"); + serializer.DataField(ref _pilotingAlertType, "pilotingAlertType", AlertType.PilotingShuttle); } public override void Initialize() { base.Initialize(); - Owner.EnsureComponent(); + Owner.EnsureComponent(); } /// diff --git a/Content.Server/GameObjects/Components/NodeContainer/NodeContainerComponent.cs b/Content.Server/GameObjects/Components/NodeContainer/NodeContainerComponent.cs index de72f5b58e..23a2d1be45 100644 --- a/Content.Server/GameObjects/Components/NodeContainer/NodeContainerComponent.cs +++ b/Content.Server/GameObjects/Components/NodeContainer/NodeContainerComponent.cs @@ -1,9 +1,6 @@ using System.Collections.Generic; -using System.Linq; using Content.Server.GameObjects.Components.NodeContainer.Nodes; using Robust.Shared.GameObjects; -using Robust.Shared.GameObjects.Components.Transform; -using Robust.Shared.Maths; using Robust.Shared.Serialization; using Robust.Shared.ViewVariables; @@ -34,8 +31,6 @@ namespace Content.Server.GameObjects.Components.NodeContainer { node.Initialize(Owner); } - - Owner.EntityManager.EventBus.SubscribeEvent(EventSource.Local, this, RotateEvent); } protected override void Startup() @@ -55,16 +50,5 @@ namespace Content.Server.GameObjects.Components.NodeContainer } base.OnRemove(); } - - private void RotateEvent(RotateEvent ev) - { - if (ev.Sender != Owner || ev.NewRotation == ev.OldRotation) - return; - - foreach (var rotatableNode in Nodes.OfType()) - { - rotatableNode.RotateEvent(ev); - } - } } } diff --git a/Content.Server/GameObjects/Components/Nutrition/DrinkComponent.cs b/Content.Server/GameObjects/Components/Nutrition/DrinkComponent.cs index 29625d59cb..709bc3bf32 100644 --- a/Content.Server/GameObjects/Components/Nutrition/DrinkComponent.cs +++ b/Content.Server/GameObjects/Components/Nutrition/DrinkComponent.cs @@ -153,7 +153,7 @@ namespace Content.Server.GameObjects.Components.Nutrition } if (!target.TryGetComponent(out IBody body) || - !body.TryGetMechanismBehaviors(out var stomachs)) + !body.TryGetMechanismBehaviors(out var stomachs)) { return false; } diff --git a/Content.Server/GameObjects/Components/Nutrition/FoodComponent.cs b/Content.Server/GameObjects/Components/Nutrition/FoodComponent.cs index 0dbfc3f292..a71ff53d02 100644 --- a/Content.Server/GameObjects/Components/Nutrition/FoodComponent.cs +++ b/Content.Server/GameObjects/Components/Nutrition/FoodComponent.cs @@ -2,6 +2,7 @@ using System; using System.Collections.Generic; using System.Linq; +using Content.Server.GameObjects.Components.Body.Behavior; using Content.Server.GameObjects.Components.Chemistry; using Content.Server.GameObjects.Components.GUI; using Content.Server.GameObjects.Components.Items.Storage; @@ -133,7 +134,7 @@ namespace Content.Server.GameObjects.Components.Nutrition var trueTarget = target ?? user; if (!trueTarget.TryGetComponent(out IBody? body) || - !body.TryGetMechanismBehaviors(out var stomachs)) + !body.TryGetMechanismBehaviors(out var stomachs)) { return false; } diff --git a/Content.Server/GameObjects/Components/Nutrition/HungerComponent.cs b/Content.Server/GameObjects/Components/Nutrition/HungerComponent.cs index 9ea95624cc..32e13a360a 100644 --- a/Content.Server/GameObjects/Components/Nutrition/HungerComponent.cs +++ b/Content.Server/GameObjects/Components/Nutrition/HungerComponent.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using Content.Server.GameObjects.Components.Mobs; +using Content.Shared.Alert; using Content.Shared.Damage; using Content.Shared.GameObjects.Components.Damage; using Content.Shared.GameObjects.Components.Mobs; @@ -70,11 +71,11 @@ namespace Content.Server.GameObjects.Components.Nutrition } - public static readonly Dictionary HungerThresholdImages = new Dictionary + public static readonly Dictionary HungerThresholdAlertTypes = new Dictionary { - { HungerThreshold.Overfed, "/Textures/Interface/StatusEffects/Hunger/Overfed.png" }, - { HungerThreshold.Peckish, "/Textures/Interface/StatusEffects/Hunger/Peckish.png" }, - { HungerThreshold.Starving, "/Textures/Interface/StatusEffects/Hunger/Starving.png" }, + { HungerThreshold.Overfed, AlertType.Overfed }, + { HungerThreshold.Peckish, AlertType.Peckish }, + { HungerThreshold.Starving, AlertType.Starving }, }; public void HungerThresholdEffect(bool force = false) @@ -89,15 +90,15 @@ namespace Content.Server.GameObjects.Components.Nutrition } // Update UI - Owner.TryGetComponent(out ServerStatusEffectsComponent statusEffectsComponent); + Owner.TryGetComponent(out ServerAlertsComponent alertsComponent); - if (HungerThresholdImages.TryGetValue(_currentHungerThreshold, out var statusTexture)) + if (HungerThresholdAlertTypes.TryGetValue(_currentHungerThreshold, out var alertId)) { - statusEffectsComponent?.ChangeStatusEffectIcon(StatusEffect.Hunger, statusTexture); + alertsComponent?.ShowAlert(alertId); } else { - statusEffectsComponent?.RemoveStatusEffect(StatusEffect.Hunger); + alertsComponent?.ClearAlertCategory(AlertCategory.Hunger); } switch (_currentHungerThreshold) diff --git a/Content.Server/GameObjects/Components/Nutrition/ThirstComponent.cs b/Content.Server/GameObjects/Components/Nutrition/ThirstComponent.cs index 2d294e8db6..6462141610 100644 --- a/Content.Server/GameObjects/Components/Nutrition/ThirstComponent.cs +++ b/Content.Server/GameObjects/Components/Nutrition/ThirstComponent.cs @@ -1,6 +1,7 @@ using System; using System.Collections.Generic; using Content.Server.GameObjects.Components.Mobs; +using Content.Shared.Alert; using Content.Shared.Damage; using Content.Shared.GameObjects.Components.Damage; using Content.Shared.GameObjects.Components.Mobs; @@ -62,11 +63,11 @@ namespace Content.Server.GameObjects.Components.Nutrition {ThirstThreshold.Dead, 0.0f}, }; - public static readonly Dictionary ThirstThresholdImages = new Dictionary + public static readonly Dictionary ThirstThresholdAlertTypes = new Dictionary { - {ThirstThreshold.OverHydrated, "/Textures/Interface/StatusEffects/Thirst/OverHydrated.png"}, - {ThirstThreshold.Thirsty, "/Textures/Interface/StatusEffects/Thirst/Thirsty.png"}, - {ThirstThreshold.Parched, "/Textures/Interface/StatusEffects/Thirst/Parched.png"}, + {ThirstThreshold.OverHydrated, AlertType.Overhydrated}, + {ThirstThreshold.Thirsty, AlertType.Thirsty}, + {ThirstThreshold.Parched, AlertType.Parched}, }; public override void ExposeData(ObjectSerializer serializer) @@ -87,15 +88,15 @@ namespace Content.Server.GameObjects.Components.Nutrition } // Update UI - Owner.TryGetComponent(out ServerStatusEffectsComponent statusEffectsComponent); + Owner.TryGetComponent(out ServerAlertsComponent alertsComponent); - if (ThirstThresholdImages.TryGetValue(_currentThirstThreshold, out var statusTexture)) + if (ThirstThresholdAlertTypes.TryGetValue(_currentThirstThreshold, out var alertId)) { - statusEffectsComponent?.ChangeStatusEffectIcon(StatusEffect.Thirst, statusTexture); + alertsComponent?.ShowAlert(alertId); } else { - statusEffectsComponent?.RemoveStatusEffect(StatusEffect.Thirst); + alertsComponent?.ClearAlertCategory(AlertCategory.Thirst); } switch (_currentThirstThreshold) diff --git a/Content.Server/GameObjects/Components/PDA/PDAComponent.cs b/Content.Server/GameObjects/Components/PDA/PDAComponent.cs index 58bdc2a1b8..bfec94de05 100644 --- a/Content.Server/GameObjects/Components/PDA/PDAComponent.cs +++ b/Content.Server/GameObjects/Components/PDA/PDAComponent.cs @@ -7,6 +7,7 @@ using System.Threading.Tasks; using Content.Server.GameObjects.Components.Access; using Content.Server.GameObjects.Components.GUI; using Content.Server.GameObjects.Components.Items.Storage; +using Content.Server.GameObjects.Components.Paper; using Content.Server.Interfaces; using Content.Server.Interfaces.GameObjects.Components.Items; using Content.Server.Interfaces.PDA; @@ -39,13 +40,19 @@ namespace Content.Server.GameObjects.Components.PDA [Dependency] private readonly IPDAUplinkManager _uplinkManager = default!; [Dependency] private readonly IEntityManager _entityManager = default!; - [ViewVariables] private Container _idSlot = default!; + [ViewVariables] private ContainerSlot _idSlot = default!; + [ViewVariables] private ContainerSlot _penSlot = default!; + [ViewVariables] private bool _lightOn; - [ViewVariables] private string _startingIdCard = default!; - [ViewVariables] public bool IdSlotEmpty => _idSlot.ContainedEntities.Count < 1; + + [ViewVariables] private string? _startingIdCard = default!; + [ViewVariables] private string? _startingPen = default!; + [ViewVariables] public string? OwnerName { get; private set; } [ViewVariables] public IdCardComponent? ContainedID { get; private set; } + [ViewVariables] public bool IdSlotEmpty => _idSlot.ContainedEntity == null; + [ViewVariables] public bool PenSlotEmpty => _penSlot.ContainedEntity == null; [ViewVariables] private UplinkAccount? _syndicateUplinkAccount; @@ -62,22 +69,34 @@ namespace Content.Server.GameObjects.Components.PDA { base.ExposeData(serializer); serializer.DataField(ref _startingIdCard, "idCard", "AssistantIDCard"); + serializer.DataField(ref _startingPen, "pen", "Pen"); } public override void Initialize() { base.Initialize(); - _idSlot = ContainerManagerComponent.Ensure("pda_entity_container", Owner, out var existed); + _idSlot = ContainerManagerComponent.Ensure("pda_entity_container", Owner); + _penSlot = ContainerManagerComponent.Ensure("pda_pen_slot", Owner); if (UserInterface != null) { UserInterface.OnReceiveMessage += UserInterfaceOnReceiveMessage; } - var idCard = _entityManager.SpawnEntity(_startingIdCard, Owner.Transform.Coordinates); - var idCardComponent = idCard.GetComponent(); - _idSlot.Insert(idCardComponent.Owner); - ContainedID = idCardComponent; + if (!string.IsNullOrEmpty(_startingIdCard)) + { + var idCard = _entityManager.SpawnEntity(_startingIdCard, Owner.Transform.Coordinates); + var idCardComponent = idCard.GetComponent(); + _idSlot.Insert(idCardComponent.Owner); + ContainedID = idCardComponent; + } + + if (!string.IsNullOrEmpty(_startingPen)) + { + var pen = _entityManager.SpawnEntity(_startingPen, Owner.Transform.Coordinates); + _penSlot.Insert(pen); + } + UpdatePDAAppearance(); } @@ -85,23 +104,29 @@ namespace Content.Server.GameObjects.Components.PDA { switch (message.Message) { - case PDARequestUpdateInterfaceMessage msg: + case PDARequestUpdateInterfaceMessage _: { UpdatePDAUserInterface(); break; } - case PDAToggleFlashlightMessage msg: + case PDAToggleFlashlightMessage _: { ToggleLight(); break; } - case PDAEjectIDMessage msg: + case PDAEjectIDMessage _: { HandleIDEjection(message.Session.AttachedEntity!); break; } + case PDAEjectPenMessage _: + { + HandlePenEjection(message.Session.AttachedEntity!); + break; + } + case PDAUplinkBuyListingMessage buyMsg: { if (!_uplinkManager.TryPurchaseItem(_syndicateUplinkAccount, buyMsg.ItemId)) @@ -131,11 +156,11 @@ namespace Content.Server.GameObjects.Components.PDA var accData = new UplinkAccountData(_syndicateUplinkAccount.AccountHolder, _syndicateUplinkAccount.Balance); var listings = _uplinkManager.FetchListings.Values.ToArray(); - UserInterface?.SetState(new PDAUpdateState(_lightOn, ownerInfo, accData, listings)); + UserInterface?.SetState(new PDAUpdateState(_lightOn, !PenSlotEmpty, ownerInfo, accData, listings)); } else { - UserInterface?.SetState(new PDAUpdateState(_lightOn, ownerInfo)); + UserInterface?.SetState(new PDAUpdateState(_lightOn, !PenSlotEmpty, ownerInfo)); } UpdatePDAAppearance(); @@ -150,14 +175,11 @@ namespace Content.Server.GameObjects.Components.PDA } } - public async Task InteractUsing(InteractUsingEventArgs eventArgs) + private bool TryInsertIdCard(InteractUsingEventArgs eventArgs, IdCardComponent idCardComponent) { var item = eventArgs.Using; - - if (!item.TryGetComponent(out var idCardComponent) || _idSlot.Contains(item)) - { + if (_idSlot.Contains(item)) return false; - } if (!eventArgs.User.TryGetComponent(out IHandsComponent? hands)) { @@ -177,17 +199,70 @@ namespace Content.Server.GameObjects.Components.PDA return true; } - InsertIdCard(idCardComponent); - if (swap != null) { - eventArgs.User.GetComponent().PutInHand(swap.GetComponent()); + hands.PutInHand(swap.GetComponent()); } + InsertIdCard(idCardComponent); + UpdatePDAUserInterface(); return true; } + private bool TryInsertPen(InteractUsingEventArgs eventArgs) + { + var item = eventArgs.Using; + if (_penSlot.Contains(item)) + return false; + + if (!eventArgs.User.TryGetComponent(out IHandsComponent? hands)) + { + Owner.PopupMessage(eventArgs.User, Loc.GetString("You have no hands!")); + return true; + } + + IEntity? swap = null; + if (!PenSlotEmpty) + { + // Swap + swap = _penSlot.ContainedEntities[0]; + } + + if (!hands.Drop(item)) + { + return true; + } + + if (swap != null) + { + hands.PutInHand(swap.GetComponent()); + } + + // Insert Pen + _penSlot.Insert(item); + + UpdatePDAUserInterface(); + return true; + } + + public async Task InteractUsing(InteractUsingEventArgs eventArgs) + { + var item = eventArgs.Using; + + if (item.TryGetComponent(out var idCardComponent)) + { + return TryInsertIdCard(eventArgs, idCardComponent); + } + + if (item.HasComponent()) + { + return TryInsertPen(eventArgs); + } + + return false; + } + void IActivate.Activate(ActivateEventArgs eventArgs) { if (!eventArgs.User.TryGetComponent(out IActorComponent? actor)) @@ -273,6 +348,21 @@ namespace Content.Server.GameObjects.Components.PDA UpdatePDAUserInterface(); } + private void HandlePenEjection(IEntity pdaUser) + { + if (PenSlotEmpty) + return; + + var pen = _penSlot.ContainedEntities[0]; + _penSlot.Remove(pen); + + var hands = pdaUser.GetComponent(); + var itemComponent = pen.GetComponent(); + hands.PutInHandOrDrop(itemComponent); + + UpdatePDAUserInterface(); + } + [Verb] public sealed class EjectIDVerb : Verb { @@ -294,6 +384,28 @@ namespace Content.Server.GameObjects.Components.PDA } } + [Verb] + public sealed class EjectPenVerb : Verb + { + protected override void GetData(IEntity user, PDAComponent component, VerbData data) + { + if (!ActionBlockerSystem.CanInteract(user)) + { + data.Visibility = VerbVisibility.Invisible; + return; + } + + data.Text = Loc.GetString("Eject Pen"); + data.Visibility = component.PenSlotEmpty ? VerbVisibility.Invisible : VerbVisibility.Visible; + } + + protected override void Activate(IEntity user, PDAComponent component) + { + component.HandlePenEjection(user); + } + } + + [Verb] public sealed class ToggleFlashlightVerb : Verb { protected override void GetData(IEntity user, PDAComponent component, VerbData data) diff --git a/Content.Server/GameObjects/Components/Rotatable/RotatableComponent.cs b/Content.Server/GameObjects/Components/Rotatable/RotatableComponent.cs index 142cf392e2..403b7d73fd 100644 --- a/Content.Server/GameObjects/Components/Rotatable/RotatableComponent.cs +++ b/Content.Server/GameObjects/Components/Rotatable/RotatableComponent.cs @@ -6,6 +6,8 @@ using Robust.Shared.GameObjects.Components; using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Localization; using Robust.Shared.Maths; +using Robust.Shared.Serialization; +using Robust.Shared.ViewVariables; namespace Content.Server.GameObjects.Components.Rotatable { @@ -14,9 +16,21 @@ namespace Content.Server.GameObjects.Components.Rotatable { public override string Name => "Rotatable"; + /// + /// If true, this entity can be rotated even while anchored. + /// + [ViewVariables(VVAccess.ReadWrite)] + public bool RotateWhileAnchored { get; private set; } + + public override void ExposeData(ObjectSerializer serializer) + { + base.ExposeData(serializer); + serializer.DataField(this, x => x.RotateWhileAnchored, "rotateWhileAnchored", false); + } + private void TryRotate(IEntity user, Angle angle) { - if (Owner.TryGetComponent(out IPhysicsComponent physics)) + if (!RotateWhileAnchored && Owner.TryGetComponent(out IPhysicsComponent physics)) { if (physics.Anchored) { @@ -33,7 +47,7 @@ namespace Content.Server.GameObjects.Components.Rotatable { protected override void GetData(IEntity user, RotatableComponent component, VerbData data) { - if (!ActionBlockerSystem.CanInteract(user)) + if (!ActionBlockerSystem.CanInteract(user) || (!component.RotateWhileAnchored && component.Owner.TryGetComponent(out IPhysicsComponent physics) && physics.Anchored)) { data.Visibility = VerbVisibility.Invisible; return; @@ -55,7 +69,7 @@ namespace Content.Server.GameObjects.Components.Rotatable { protected override void GetData(IEntity user, RotatableComponent component, VerbData data) { - if (!ActionBlockerSystem.CanInteract(user)) + if (!ActionBlockerSystem.CanInteract(user) || (!component.RotateWhileAnchored && component.Owner.TryGetComponent(out IPhysicsComponent physics) && physics.Anchored)) { data.Visibility = VerbVisibility.Invisible; return; diff --git a/Content.Server/GameObjects/Components/Strap/StrapComponent.cs b/Content.Server/GameObjects/Components/Strap/StrapComponent.cs index 3bd7b5c4cb..a6ad9585b5 100644 --- a/Content.Server/GameObjects/Components/Strap/StrapComponent.cs +++ b/Content.Server/GameObjects/Components/Strap/StrapComponent.cs @@ -2,6 +2,7 @@ using System.Collections.Generic; using System.Linq; using Content.Server.GameObjects.Components.Buckle; +using Content.Shared.Alert; using Content.Shared.GameObjects.Components.Strap; using Content.Shared.GameObjects.EntitySystems; using Content.Shared.GameObjects.Verbs; @@ -27,7 +28,7 @@ namespace Content.Server.GameObjects.Components.Strap private StrapPosition _position; private string _buckleSound = null!; private string _unbuckleSound = null!; - private string _buckledIcon = null!; + private AlertType _buckledAlertType; /// /// The angle in degrees to rotate the player by when they get strapped @@ -65,10 +66,10 @@ namespace Content.Server.GameObjects.Components.Strap public string UnbuckleSound => _unbuckleSound; /// - /// The icon to be displayed as a status when buckled + /// ID of the alert to show when buckled /// [ViewVariables] - public string BuckledIcon => _buckledIcon; + public AlertType BuckledAlertType => _buckledAlertType; /// /// The sum of the sizes of all the buckled entities in this strap @@ -137,7 +138,7 @@ namespace Content.Server.GameObjects.Components.Strap serializer.DataField(ref _position, "position", StrapPosition.None); serializer.DataField(ref _buckleSound, "buckleSound", "/Audio/Effects/buckle.ogg"); serializer.DataField(ref _unbuckleSound, "unbuckleSound", "/Audio/Effects/unbuckle.ogg"); - serializer.DataField(ref _buckledIcon, "buckledIcon", "/Textures/Interface/StatusEffects/Buckle/buckled.png"); + serializer.DataField(ref _buckledAlertType, "buckledAlertType", AlertType.Buckled); serializer.DataField(ref _rotation, "rotation", 0); var defaultSize = 100; diff --git a/Content.Server/GameObjects/Components/Temperature/TemperatureComponent.cs b/Content.Server/GameObjects/Components/Temperature/TemperatureComponent.cs index 72c318091b..8b59293975 100644 --- a/Content.Server/GameObjects/Components/Temperature/TemperatureComponent.cs +++ b/Content.Server/GameObjects/Components/Temperature/TemperatureComponent.cs @@ -1,6 +1,7 @@ using System; using System.Diagnostics; using Content.Server.GameObjects.Components.Mobs; +using Content.Shared.Alert; using Content.Shared.Atmos; using Content.Shared.Damage; using Content.Shared.GameObjects.Components.Damage; @@ -74,43 +75,43 @@ namespace Content.Server.GameObjects.Components.Temperature damageType = DamageType.Cold; } - if (Owner.TryGetComponent(out ServerStatusEffectsComponent status)) + if (Owner.TryGetComponent(out ServerAlertsComponent status)) { switch(CurrentTemperature) { // Cold strong. case var t when t <= 260: - status.ChangeStatusEffect(StatusEffect.Temperature, "/Textures/Interface/StatusEffects/Temperature/cold3.png", null); + status.ShowAlert(AlertType.Cold, 3); break; // Cold mild. case var t when t <= 280 && t > 260: - status.ChangeStatusEffect(StatusEffect.Temperature, "/Textures/Interface/StatusEffects/Temperature/cold2.png", null); + status.ShowAlert(AlertType.Cold, 2); break; // Cold weak. case var t when t <= 292 && t > 280: - status.ChangeStatusEffect(StatusEffect.Temperature, "/Textures/Interface/StatusEffects/Temperature/cold1.png", null); + status.ShowAlert(AlertType.Cold, 1); break; // Safe. case var t when t <= 327 && t > 292: - status.RemoveStatusEffect(StatusEffect.Temperature); + status.ClearAlertCategory(AlertCategory.Temperature); break; // Heat weak. case var t when t <= 335 && t > 327: - status.ChangeStatusEffect(StatusEffect.Temperature, "/Textures/Interface/StatusEffects/Temperature/hot1.png", null); + status.ShowAlert(AlertType.Hot, 1); break; // Heat mild. case var t when t <= 345 && t > 335: - status.ChangeStatusEffect(StatusEffect.Temperature, "/Textures/Interface/StatusEffects/Temperature/hot2.png", null); + status.ShowAlert(AlertType.Hot, 2); break; // Heat strong. case var t when t > 345: - status.ChangeStatusEffect(StatusEffect.Temperature, "/Textures/Interface/StatusEffects/Temperature/hot3.png", null); + status.ShowAlert(AlertType.Hot, 3); break; } } diff --git a/Content.Server/GameObjects/Components/VendingMachines/VendingMachineComponent.cs b/Content.Server/GameObjects/Components/VendingMachines/VendingMachineComponent.cs index 138d88d667..ee233271d4 100644 --- a/Content.Server/GameObjects/Components/VendingMachines/VendingMachineComponent.cs +++ b/Content.Server/GameObjects/Components/VendingMachines/VendingMachineComponent.cs @@ -2,6 +2,7 @@ using System; using System.Collections.Generic; using System.Linq; +using Content.Server.GameObjects.Components.Access; using Content.Server.GameObjects.Components.Power.ApcNetComponents; using Content.Server.Utility; using Content.Shared.GameObjects.Components.VendingMachines; @@ -16,6 +17,7 @@ using Robust.Shared.Audio; using Robust.Shared.GameObjects; using Robust.Shared.GameObjects.Components.Timers; using Robust.Shared.GameObjects.Systems; +using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.Random; using Robust.Shared.IoC; using Robust.Shared.Prototypes; @@ -146,7 +148,7 @@ namespace Content.Server.GameObjects.Components.VendingMachines switch (message) { case VendingMachineEjectMessage msg: - TryEject(msg.ID); + TryEject(msg.ID, serverMsg.Session.AttachedEntity); break; case InventorySyncRequestMessage _: UserInterface?.SendMessage(new VendingMachineInventoryMessage(Inventory)); @@ -195,6 +197,19 @@ namespace Content.Server.GameObjects.Components.VendingMachines EntitySystem.Get().PlayFromEntity(_soundVend, Owner, AudioParams.Default.WithVolume(-2f)); } + private void TryEject(string id, IEntity? sender) + { + if (Owner.TryGetComponent(out var accessReader)) + { + if (sender == null || !accessReader.IsAllowed(sender)) + { + FlickDenyAnimation(); + return; + } + } + TryEject(id); + } + private void FlickDenyAnimation() { TrySetVisualState(VendingMachineVisualState.Deny); diff --git a/Content.Server/GameObjects/EntitySystems/AI/AiSystem.cs b/Content.Server/GameObjects/EntitySystems/AI/AiSystem.cs index abb8876ab3..1e4c995799 100644 --- a/Content.Server/GameObjects/EntitySystems/AI/AiSystem.cs +++ b/Content.Server/GameObjects/EntitySystems/AI/AiSystem.cs @@ -1,9 +1,9 @@ #nullable enable using System; using System.Collections.Generic; -using System.Linq; using Content.Server.Administration; using Content.Server.GameObjects.Components.Movement; +using Content.Shared; using Content.Shared.Administration; using Content.Shared.GameObjects.Components.Movement; using JetBrains.Annotations; @@ -44,7 +44,6 @@ namespace Content.Server.GameObjects.EntitySystems.AI public override void Initialize() { base.Initialize(); - _configurationManager.RegisterCVar("ai.maxupdates", 64); SubscribeLocalEvent(HandleAiSleep); var processors = _reflectionManager.GetAllChildren(); @@ -60,7 +59,7 @@ namespace Content.Server.GameObjects.EntitySystems.AI /// public override void Update(float frameTime) { - var cvarMaxUpdates = _configurationManager.GetCVar("ai.maxupdates"); + var cvarMaxUpdates = _configurationManager.GetCVar(CCVars.AIMaxUpdates); if (cvarMaxUpdates <= 0) return; diff --git a/Content.Server/GameObjects/EntitySystems/AI/Pathfinding/PathfindingSystem.cs b/Content.Server/GameObjects/EntitySystems/AI/Pathfinding/PathfindingSystem.cs index 5bdbbbe9d3..78d3778c8a 100644 --- a/Content.Server/GameObjects/EntitySystems/AI/Pathfinding/PathfindingSystem.cs +++ b/Content.Server/GameObjects/EntitySystems/AI/Pathfinding/PathfindingSystem.cs @@ -328,9 +328,16 @@ namespace Content.Server.GameObjects.EntitySystems.AI.Pathfinding return; } + var newGridId = moveEvent.NewPosition.GetGridId(_entityManager); + if (newGridId == GridId.Invalid) + { + HandleEntityRemove(moveEvent.Sender); + return; + } + // The pathfinding graph is tile-based so first we'll check if they're on a different tile and if we need to update. // If you get entities bigger than 1 tile wide you'll need some other system so god help you. - var newTile = _mapManager.GetGrid(moveEvent.NewPosition.GetGridId(_entityManager)).GetTileRef(moveEvent.NewPosition); + var newTile = _mapManager.GetGrid(newGridId).GetTileRef(moveEvent.NewPosition); if (oldNode == null || oldNode.TileRef == newTile) { diff --git a/Content.Server/GameObjects/EntitySystems/Atmos/AtmosDebugOverlaySystem.cs b/Content.Server/GameObjects/EntitySystems/Atmos/AtmosDebugOverlaySystem.cs index e7b0380d1a..e40ce9ce3a 100644 --- a/Content.Server/GameObjects/EntitySystems/Atmos/AtmosDebugOverlaySystem.cs +++ b/Content.Server/GameObjects/EntitySystems/Atmos/AtmosDebugOverlaySystem.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; using System.Runtime.CompilerServices; using Content.Server.GameObjects.Components.Atmos; using Content.Server.Atmos; +using Content.Shared; using Content.Shared.Atmos; using Content.Shared.GameObjects.EntitySystems.Atmos; using JetBrains.Annotations; @@ -47,7 +48,6 @@ namespace Content.Server.GameObjects.EntitySystems.Atmos _atmosphereSystem = Get(); _playerManager.PlayerStatusChanged += OnPlayerStatusChanged; - _configManager.RegisterCVar("net.atmosdbgoverlaytickrate", 3.0f); } public override void Shutdown() @@ -89,7 +89,7 @@ namespace Content.Server.GameObjects.EntitySystems.Atmos public override void Update(float frameTime) { AccumulatedFrameTime += frameTime; - _updateCooldown = 1 / _configManager.GetCVar("net.atmosdbgoverlaytickrate"); + _updateCooldown = 1 / _configManager.GetCVar(CCVars.NetAtmosDebugOverlayTickRate); if (AccumulatedFrameTime < _updateCooldown) { diff --git a/Content.Server/GameObjects/EntitySystems/Atmos/GasTileOverlaySystem.cs b/Content.Server/GameObjects/EntitySystems/Atmos/GasTileOverlaySystem.cs index 461c45cd47..c26bbc6320 100644 --- a/Content.Server/GameObjects/EntitySystems/Atmos/GasTileOverlaySystem.cs +++ b/Content.Server/GameObjects/EntitySystems/Atmos/GasTileOverlaySystem.cs @@ -4,12 +4,14 @@ using System.Collections.Generic; using System.Linq; using System.Runtime.CompilerServices; using Content.Server.GameObjects.Components.Atmos; +using Content.Shared; using Content.Shared.Atmos; using Content.Shared.GameObjects.EntitySystems.Atmos; using Content.Shared.GameTicking; using JetBrains.Annotations; using Robust.Server.Interfaces.Player; using Robust.Server.Player; +using Robust.Shared; using Robust.Shared.Enums; using Robust.Shared.Interfaces.Configuration; using Robust.Shared.Interfaces.GameObjects; @@ -65,7 +67,6 @@ namespace Content.Server.GameObjects.EntitySystems.Atmos _atmosphereSystem = Get(); _playerManager.PlayerStatusChanged += OnPlayerStatusChanged; _mapManager.OnGridRemoved += OnGridRemoved; - _configManager.RegisterCVar("net.gasoverlaytickrate", 3.0f); } public override void Shutdown() @@ -228,14 +229,14 @@ namespace Content.Server.GameObjects.EntitySystems.Atmos public override void Update(float frameTime) { AccumulatedFrameTime += frameTime; - _updateCooldown = 1 / _configManager.GetCVar("net.gasoverlaytickrate"); + _updateCooldown = 1 / _configManager.GetCVar(CCVars.NetGasOverlayTickRate); if (AccumulatedFrameTime < _updateCooldown) { return; } - _updateRange = _configManager.GetCVar("net.maxupdaterange") + RangeOffset; + _updateRange = _configManager.GetCVar(CVars.NetMaxUpdateRange) + RangeOffset; // TODO: So in the worst case scenario we still have to send a LOT of tile data per tick if there's a fire. // If we go with say 15 tile radius then we have up to 900 tiles to update per tick. diff --git a/Content.Server/GameObjects/EntitySystems/BuckleSystem.cs b/Content.Server/GameObjects/EntitySystems/BuckleSystem.cs index 9fbb049322..c6bcb65591 100644 --- a/Content.Server/GameObjects/EntitySystems/BuckleSystem.cs +++ b/Content.Server/GameObjects/EntitySystems/BuckleSystem.cs @@ -1,7 +1,12 @@ -using Content.Server.GameObjects.Components.Buckle; +#nullable enable +using Content.Server.GameObjects.Components.Buckle; +using Content.Server.GameObjects.Components.Strap; using Content.Server.GameObjects.EntitySystems.Click; using JetBrains.Annotations; +using Robust.Server.GameObjects.EntitySystemMessages; using Robust.Server.GameObjects.EntitySystems; +using Robust.Shared.Containers; +using Robust.Shared.GameObjects.Components.Transform; using Robust.Shared.GameObjects.Systems; namespace Content.Server.GameObjects.EntitySystems @@ -15,13 +20,84 @@ namespace Content.Server.GameObjects.EntitySystems UpdatesAfter.Add(typeof(InteractionSystem)); UpdatesAfter.Add(typeof(InputSystem)); + + SubscribeLocalEvent(MoveEvent); + SubscribeLocalEvent(ContainerModified); + SubscribeLocalEvent(ContainerModified); } - public override void Update(float frameTime) + public override void Shutdown() { - foreach (var buckle in ComponentManager.EntityQuery()) + base.Shutdown(); + + UnsubscribeLocalEvent(); + } + + private void MoveEvent(MoveEvent ev) + { + if (!ev.Sender.TryGetComponent(out BuckleComponent? buckle)) { - buckle.Update(); + return; + } + + var strap = buckle.BuckledTo; + + if (strap == null) + { + return; + } + + var strapPosition = strap.Owner.Transform.Coordinates.Offset(buckle.BuckleOffset); + + if (ev.NewPosition.InRange(EntityManager, strapPosition, 0.2f)) + { + return; + } + + buckle.TryUnbuckle(buckle.Owner, true); + } + + private void ContainerModified(ContainerModifiedMessage message) + { + // Not returning is necessary in case an entity has both a buckle and strap component + if (message.Entity.TryGetComponent(out BuckleComponent? buckle)) + { + ContainerModifiedReAttach(buckle, buckle.BuckledTo); + } + + if (message.Entity.TryGetComponent(out StrapComponent? strap)) + { + foreach (var buckledEntity in strap.BuckledEntities) + { + if (!buckledEntity.TryGetComponent(out BuckleComponent? buckled)) + { + continue; + } + + ContainerModifiedReAttach(buckled, strap); + } + } + } + + private void ContainerModifiedReAttach(BuckleComponent buckle, StrapComponent? strap) + { + if (strap == null) + { + return; + } + + var contained = ContainerHelpers.TryGetContainer(buckle.Owner, out var ownContainer); + var strapContained = ContainerHelpers.TryGetContainer(strap.Owner, out var strapContainer); + + if (contained != strapContained || ownContainer != strapContainer) + { + buckle.TryUnbuckle(buckle.Owner, true); + return; + } + + if (!contained) + { + buckle.ReAttach(strap); } } } diff --git a/Content.Server/GameObjects/EntitySystems/Click/InteractionSystem.cs b/Content.Server/GameObjects/EntitySystems/Click/InteractionSystem.cs index b0e611e96d..0a6d5e4765 100644 --- a/Content.Server/GameObjects/EntitySystems/Click/InteractionSystem.cs +++ b/Content.Server/GameObjects/EntitySystems/Click/InteractionSystem.cs @@ -156,7 +156,7 @@ namespace Content.Server.GameObjects.EntitySystems.Click private bool HandleWideAttack(ICommonSession session, EntityCoordinates coords, EntityUid uid) { // client sanitization - if (!_mapManager.GridExists(coords.GetGridId(_entityManager))) + if (!coords.IsValid(_entityManager)) { Logger.InfoS("system.interaction", $"Invalid Coordinates: client={session}, coords={coords}"); return true; @@ -211,7 +211,7 @@ namespace Content.Server.GameObjects.EntitySystems.Click private bool HandleClientUseItemInHand(ICommonSession session, EntityCoordinates coords, EntityUid uid) { // client sanitization - if (!_mapManager.GridExists(coords.GetGridId(_entityManager))) + if (!coords.IsValid(_entityManager)) { Logger.InfoS("system.interaction", $"Invalid Coordinates: client={session}, coords={coords}"); return true; @@ -242,7 +242,7 @@ namespace Content.Server.GameObjects.EntitySystems.Click private bool HandleTryPullObject(ICommonSession session, EntityCoordinates coords, EntityUid uid) { // client sanitization - if (!_mapManager.GridExists(coords.GetGridId(_entityManager))) + if (!coords.IsValid(_entityManager)) { Logger.InfoS("system.interaction", $"Invalid Coordinates for pulling: client={session}, coords={coords}"); return false; @@ -303,7 +303,7 @@ namespace Content.Server.GameObjects.EntitySystems.Click } // Verify player is on the same map as the entity he clicked on - if (_mapManager.GetGrid(coordinates.GetGridId(EntityManager)).ParentMapId != playerTransform.MapID) + if (coordinates.GetMapId(_entityManager) != playerTransform.MapID) { Logger.WarningS("system.interaction", $"Player named {player.Name} clicked on a map he isn't located on"); diff --git a/Content.Server/GameObjects/EntitySystems/ConstructionSystem.cs b/Content.Server/GameObjects/EntitySystems/ConstructionSystem.cs index 96520441b8..f415bf2b98 100644 --- a/Content.Server/GameObjects/EntitySystems/ConstructionSystem.cs +++ b/Content.Server/GameObjects/EntitySystems/ConstructionSystem.cs @@ -20,6 +20,7 @@ using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.Random; using Robust.Shared.IoC; using Robust.Shared.Localization; +using Robust.Shared.Log; using Robust.Shared.Maths; using Robust.Shared.Players; using Robust.Shared.Prototypes; @@ -306,8 +307,18 @@ namespace Content.Server.GameObjects.EntitySystems private async void HandleStartItemConstruction(TryStartItemConstructionMessage ev, EntitySessionEventArgs args) { - var constructionPrototype = _prototypeManager.Index(ev.PrototypeName); - var constructionGraph = _prototypeManager.Index(constructionPrototype.Graph); + if (!_prototypeManager.TryIndex(ev.PrototypeName, out ConstructionPrototype constructionPrototype)) + { + Logger.Error($"Tried to start construction of invalid recipe '{ev.PrototypeName}'!"); + return; + } + + if (!_prototypeManager.TryIndex(constructionPrototype.Graph, out ConstructionGraphPrototype constructionGraph)) + { + Logger.Error($"Invalid construction graph '{constructionPrototype.Graph}' in recipe '{ev.PrototypeName}'!"); + return; + } + var startNode = constructionGraph.Nodes[constructionPrototype.StartNode]; var targetNode = constructionGraph.Nodes[constructionPrototype.TargetNode]; var pathFind = constructionGraph.Path(startNode.Name, targetNode.Name); @@ -352,8 +363,20 @@ namespace Content.Server.GameObjects.EntitySystems private async void HandleStartStructureConstruction(TryStartStructureConstructionMessage ev, EntitySessionEventArgs args) { - var constructionPrototype = _prototypeManager.Index(ev.PrototypeName); - var constructionGraph = _prototypeManager.Index(constructionPrototype.Graph); + if (!_prototypeManager.TryIndex(ev.PrototypeName, out ConstructionPrototype constructionPrototype)) + { + Logger.Error($"Tried to start construction of invalid recipe '{ev.PrototypeName}'!"); + RaiseNetworkEvent(new AckStructureConstructionMessage(ev.Ack)); + return; + } + + if (!_prototypeManager.TryIndex(constructionPrototype.Graph, out ConstructionGraphPrototype constructionGraph)) + { + Logger.Error($"Invalid construction graph '{constructionPrototype.Graph}' in recipe '{ev.PrototypeName}'!"); + RaiseNetworkEvent(new AckStructureConstructionMessage(ev.Ack)); + return; + } + var startNode = constructionGraph.Nodes[constructionPrototype.StartNode]; var targetNode = constructionGraph.Nodes[constructionPrototype.TargetNode]; var pathFind = constructionGraph.Path(startNode.Name, targetNode.Name); diff --git a/Content.Server/GameObjects/EntitySystems/DeviceNetworkSystem.cs b/Content.Server/GameObjects/EntitySystems/DeviceNetworkSystem.cs index f5b99a5988..0708dbada4 100644 --- a/Content.Server/GameObjects/EntitySystems/DeviceNetworkSystem.cs +++ b/Content.Server/GameObjects/EntitySystems/DeviceNetworkSystem.cs @@ -1,27 +1,16 @@ -using Content.Server.Interfaces; +using Content.Server.Interfaces; using Robust.Shared.GameObjects.Systems; using Robust.Shared.IoC; namespace Content.Server.GameObjects.EntitySystems.DeviceNetwork { - public class DeviceNetworkSystem : EntitySystem + internal sealed class DeviceNetworkSystem : EntitySystem { - private IDeviceNetwork _network; - - public override void Initialize() - { - base.Initialize(); - - _network = IoCManager.Resolve(); - } + [Dependency] private readonly IDeviceNetwork _network = default!; public override void Update(float frameTime) { base.Update(frameTime); - - if (_network == null) - return; - //(ノ°Д°)ノ︵ ┻━┻ _network.Update(); } } diff --git a/Content.Server/GameObjects/EntitySystems/HeartSystem.cs b/Content.Server/GameObjects/EntitySystems/HeartSystem.cs deleted file mode 100644 index e1da130db4..0000000000 --- a/Content.Server/GameObjects/EntitySystems/HeartSystem.cs +++ /dev/null @@ -1,28 +0,0 @@ -using Content.Shared.GameObjects.Components.Body.Behavior; -using Content.Shared.GameObjects.EntitySystems; -using JetBrains.Annotations; -using Robust.Shared.GameObjects.Systems; - -namespace Content.Server.GameObjects.EntitySystems -{ - [UsedImplicitly] - public class HeartSystem : EntitySystem - { - public override void Initialize() - { - base.Initialize(); - - UpdatesBefore.Add(typeof(MetabolismSystem)); - } - - public override void Update(float frameTime) - { - base.Update(frameTime); - - foreach (var heart in ComponentManager.EntityQuery()) - { - heart.Update(frameTime); - } - } - } -} diff --git a/Content.Server/GameObjects/EntitySystems/LungSystem.cs b/Content.Server/GameObjects/EntitySystems/LungSystem.cs deleted file mode 100644 index 6b04f5f0d1..0000000000 --- a/Content.Server/GameObjects/EntitySystems/LungSystem.cs +++ /dev/null @@ -1,28 +0,0 @@ -using Content.Shared.GameObjects.Components.Body.Behavior; -using Content.Shared.GameObjects.EntitySystems; -using JetBrains.Annotations; -using Robust.Shared.GameObjects.Systems; - -namespace Content.Server.GameObjects.EntitySystems -{ - [UsedImplicitly] - public class LungSystem : EntitySystem - { - public override void Initialize() - { - base.Initialize(); - - UpdatesBefore.Add(typeof(MetabolismSystem)); - } - - public override void Update(float frameTime) - { - base.Update(frameTime); - - foreach (var lung in ComponentManager.EntityQuery()) - { - lung.Update(frameTime); - } - } - } -} diff --git a/Content.Server/GameObjects/EntitySystems/NodeContainerSystem.cs b/Content.Server/GameObjects/EntitySystems/NodeContainerSystem.cs new file mode 100644 index 0000000000..2c60a40bed --- /dev/null +++ b/Content.Server/GameObjects/EntitySystems/NodeContainerSystem.cs @@ -0,0 +1,45 @@ +using System.Linq; +using Content.Server.GameObjects.Components.NodeContainer; +using Content.Server.GameObjects.Components.NodeContainer.Nodes; +using JetBrains.Annotations; +using Robust.Shared.GameObjects.Components.Transform; +using Robust.Shared.GameObjects.Systems; + +namespace Content.Server.GameObjects.EntitySystems +{ + [UsedImplicitly] + public class NodeContainerSystem : EntitySystem + { + public override void Initialize() + { + base.Initialize(); + + SubscribeLocalEvent(RotateEvent); + } + + public override void Shutdown() + { + base.Shutdown(); + + UnsubscribeLocalEvent(); + } + + private void RotateEvent(RotateEvent ev) + { + if (!ev.Sender.TryGetComponent(out NodeContainerComponent container)) + { + return; + } + + if (ev.NewRotation == ev.OldRotation) + { + return; + } + + foreach (var rotatableNode in container.Nodes.OfType()) + { + rotatableNode.RotateEvent(ev); + } + } + } +} diff --git a/Content.Server/GameObjects/EntitySystems/PointingSystem.cs b/Content.Server/GameObjects/EntitySystems/PointingSystem.cs index 50bfd070d2..b7d1e8e8cf 100644 --- a/Content.Server/GameObjects/EntitySystems/PointingSystem.cs +++ b/Content.Server/GameObjects/EntitySystems/PointingSystem.cs @@ -6,6 +6,7 @@ using Content.Server.Players; using Content.Shared.GameObjects.EntitySystems; using Content.Shared.Input; using Content.Shared.Interfaces; +using Content.Shared.Utility; using JetBrains.Annotations; using Robust.Server.GameObjects.Components; using Robust.Server.Interfaces.Player; @@ -75,9 +76,9 @@ namespace Content.Server.GameObjects.EntitySystems } } - public bool InRange(EntityCoordinates from, EntityCoordinates to) + public bool InRange(IEntity pointer, EntityCoordinates coordinates) { - return from.InRange(EntityManager, to, 15); + return pointer.InRangeUnOccluded(coordinates, 15, e => e == pointer); } public bool TryPoint(ICommonSession? session, EntityCoordinates coords, EntityUid uid) @@ -100,7 +101,7 @@ namespace Content.Server.GameObjects.EntitySystems return false; } - if (!InRange(coords, player.Transform.Coordinates)) + if (!InRange(player, coords)) { player.PopupMessage(Loc.GetString("You can't reach there!")); return false; diff --git a/Content.Server/GameObjects/EntitySystems/SignalLinkerSystem.cs b/Content.Server/GameObjects/EntitySystems/SignalLinkerSystem.cs index 88782c51a4..e812d3dd23 100644 --- a/Content.Server/GameObjects/EntitySystems/SignalLinkerSystem.cs +++ b/Content.Server/GameObjects/EntitySystems/SignalLinkerSystem.cs @@ -1,6 +1,7 @@ using System.Collections.Generic; using Content.Server.Administration; using Content.Server.GameObjects.Components.MachineLinking; +using Content.Server.GameObjects.EntitySystems.Click; using Content.Shared.Administration; using Robust.Server.Interfaces.Console; using Robust.Server.Interfaces.Player; @@ -27,7 +28,7 @@ namespace Content.Server.GameObjects.EntitySystems _transmitters = new Dictionary(); } - public void SignalLinkerKeybind(NetUserId id, bool? enable) + public bool SignalLinkerKeybind(NetUserId id, bool? enable) { if (enable == null) { @@ -38,13 +39,13 @@ namespace Content.Server.GameObjects.EntitySystems { if (_transmitters.ContainsKey(id)) { - return; + return true; } if (_transmitters.Count == 0) { CommandBinds.Builder - .Bind(EngineKeyFunctions.Use, new PointerInputCmdHandler(HandleUse)) + .BindBefore(EngineKeyFunctions.Use, new PointerInputCmdHandler(HandleUse), typeof(InteractionSystem)) .Register(); } @@ -55,7 +56,7 @@ namespace Content.Server.GameObjects.EntitySystems { if (!_transmitters.ContainsKey(id)) { - return; + return false; } _transmitters.Remove(id); @@ -64,6 +65,7 @@ namespace Content.Server.GameObjects.EntitySystems CommandBinds.Unregister(); } } + return enable == true; } private bool HandleUse(ICommonSession session, EntityCoordinates coords, EntityUid uid) @@ -132,7 +134,8 @@ namespace Content.Server.GameObjects.EntitySystems return; } - system.SignalLinkerKeybind(player.UserId, enable); + var ret = system.SignalLinkerKeybind(player.UserId, enable); + shell.SendText(player, ret ? "Enabled" : "Disabled"); } } } diff --git a/Content.Server/GameObjects/EntitySystems/StationEvents/StationEventSystem.cs b/Content.Server/GameObjects/EntitySystems/StationEvents/StationEventSystem.cs index ac1ea379d8..6da998d840 100644 --- a/Content.Server/GameObjects/EntitySystems/StationEvents/StationEventSystem.cs +++ b/Content.Server/GameObjects/EntitySystems/StationEvents/StationEventSystem.cs @@ -4,11 +4,13 @@ using System.Text; using Content.Server.GameTicking; using Content.Server.Interfaces.GameTicking; using Content.Server.StationEvents; +using Content.Shared; using Content.Shared.GameTicking; using JetBrains.Annotations; using Robust.Server.Console; using Robust.Server.Interfaces.Player; using Robust.Shared.GameObjects.Systems; +using Robust.Shared.Interfaces.Configuration; using Robust.Shared.Interfaces.Network; using Robust.Shared.Interfaces.Random; using Robust.Shared.Interfaces.Reflection; @@ -23,6 +25,7 @@ namespace Content.Server.GameObjects.EntitySystems.StationEvents // Somewhat based off of TG's implementation of events public sealed class StationEventSystem : EntitySystem, IResettingEntitySystem { + [Dependency] private readonly IConfigurationManager _configurationManager = default!; [Dependency] private readonly IServerNetManager _netManager = default!; [Dependency] private readonly IPlayerManager _playerManager = default!; [Dependency] private readonly IGameTicker _gameTicker = default!; @@ -164,6 +167,9 @@ namespace Content.Server.GameObjects.EntitySystems.StationEvents _stationEvents.Add(stationEvent); } + // Can't just check debug / release for a default given mappers need to use release mode + // As such we'll always pause it by default. + _configurationManager.OnValueChanged(CCVars.EventsEnabled, value => Enabled = value, true); _netManager.RegisterNetMessage(nameof(MsgGetStationEvents), GetEventReceived); } diff --git a/Content.Server/GameObjects/EntitySystems/WeightlessSystem.cs b/Content.Server/GameObjects/EntitySystems/WeightlessSystem.cs index 1ceec26a0a..c18fb5c8a6 100644 --- a/Content.Server/GameObjects/EntitySystems/WeightlessSystem.cs +++ b/Content.Server/GameObjects/EntitySystems/WeightlessSystem.cs @@ -1,5 +1,6 @@ using System.Collections.Generic; using Content.Server.GameObjects.Components.Mobs; +using Content.Shared.Alert; using Content.Shared.GameObjects.Components.Mobs; using Content.Shared.GameObjects.EntitySystemMessages.Gravity; using Content.Shared.GameTicking; @@ -19,7 +20,7 @@ namespace Content.Server.GameObjects.EntitySystems { [Dependency] private readonly IMapManager _mapManager = default!; - private readonly Dictionary> _statuses = new Dictionary>(); + private readonly Dictionary> _alerts = new Dictionary>(); public override void Initialize() { @@ -31,15 +32,15 @@ namespace Content.Server.GameObjects.EntitySystems public void Reset() { - _statuses.Clear(); + _alerts.Clear(); } - public void AddStatus(ServerStatusEffectsComponent status) + public void AddAlert(ServerAlertsComponent status) { var gridId = status.Owner.Transform.GridID; - var statuses = _statuses.GetOrNew(gridId); + var alerts = _alerts.GetOrNew(gridId); - statuses.Add(status); + alerts.Add(status); if (_mapManager.TryGetGrid(status.Owner.Transform.GridID, out var grid)) { @@ -54,10 +55,10 @@ namespace Content.Server.GameObjects.EntitySystems } } - public void RemoveStatus(ServerStatusEffectsComponent status) + public void RemoveAlert(ServerAlertsComponent status) { var grid = status.Owner.Transform.GridID; - if (!_statuses.TryGetValue(grid, out var statuses)) + if (!_alerts.TryGetValue(grid, out var statuses)) { return; } @@ -67,7 +68,7 @@ namespace Content.Server.GameObjects.EntitySystems private void GravityChanged(GravityChangedMessage ev) { - if (!_statuses.TryGetValue(ev.Grid.Index, out var statuses)) + if (!_alerts.TryGetValue(ev.Grid.Index, out var statuses)) { return; } @@ -88,19 +89,19 @@ namespace Content.Server.GameObjects.EntitySystems } } - private void AddWeightless(ServerStatusEffectsComponent status) + private void AddWeightless(ServerAlertsComponent status) { - status.ChangeStatusEffect(StatusEffect.Weightless, "/Textures/Interface/StatusEffects/Weightless/weightless.png", null); + status.ShowAlert(AlertType.Weightless); } - private void RemoveWeightless(ServerStatusEffectsComponent status) + private void RemoveWeightless(ServerAlertsComponent status) { - status.RemoveStatusEffect(StatusEffect.Weightless); + status.ClearAlert(AlertType.Weightless); } private void EntParentChanged(EntParentChangedMessage ev) { - if (!ev.Entity.TryGetComponent(out ServerStatusEffectsComponent status)) + if (!ev.Entity.TryGetComponent(out ServerAlertsComponent status)) { return; } @@ -110,14 +111,14 @@ namespace Content.Server.GameObjects.EntitySystems { var oldGrid = mapGrid.GridIndex; - if (_statuses.TryGetValue(oldGrid, out var oldStatuses)) + if (_alerts.TryGetValue(oldGrid, out var oldStatuses)) { oldStatuses.Remove(status); } } var newGrid = ev.Entity.Transform.GridID; - var newStatuses = _statuses.GetOrNew(newGrid); + var newStatuses = _alerts.GetOrNew(newGrid); newStatuses.Add(status); } diff --git a/Content.Server/GameTicking/GamePresets/PresetSuspicion.cs b/Content.Server/GameTicking/GamePresets/PresetSuspicion.cs index 9021cd4fef..3b497d8938 100644 --- a/Content.Server/GameTicking/GamePresets/PresetSuspicion.cs +++ b/Content.Server/GameTicking/GamePresets/PresetSuspicion.cs @@ -9,6 +9,7 @@ using Content.Server.Interfaces.Chat; using Content.Server.Interfaces.GameTicking; using Content.Server.Mobs.Roles.Suspicion; using Content.Server.Players; +using Content.Shared; using Content.Shared.GameObjects.Components.Inventory; using Content.Shared.GameObjects.Components.PDA; using Content.Shared.Roles; @@ -44,20 +45,12 @@ namespace Content.Server.GameTicking.GamePresets private static string TraitorID = "SuspicionTraitor"; private static string InnocentID = "SuspicionInnocent"; - public static void RegisterCVars(IConfigurationManager cfg) - { - cfg.RegisterCVar("game.suspicion_min_players", 5); - cfg.RegisterCVar("game.suspicion_min_traitors", 2); - cfg.RegisterCVar("game.suspicion_players_per_traitor", 5); - cfg.RegisterCVar("game.suspicion_starting_balance", 20); - } - public override bool Start(IReadOnlyList readyPlayers, bool force = false) { - MinPlayers = _cfg.GetCVar("game.suspicion_min_players"); - MinTraitors = _cfg.GetCVar("game.suspicion_min_traitors"); - PlayersPerTraitor = _cfg.GetCVar("game.suspicion_players_per_traitor"); - TraitorStartingBalance = _cfg.GetCVar("game.suspicion_starting_balance"); + MinPlayers = _cfg.GetCVar(CCVars.GameSuspicionMinPlayers); + MinTraitors = _cfg.GetCVar(CCVars.GameSuspicionMinTraitors); + PlayersPerTraitor = _cfg.GetCVar(CCVars.GameSuspicionPlayersPerTraitor); + TraitorStartingBalance = _cfg.GetCVar(CCVars.GameSuspicionStartingBalance); if (!force && readyPlayers.Count < MinPlayers) { diff --git a/Content.Server/GameTicking/GameRules/RuleDeathMatch.cs b/Content.Server/GameTicking/GameRules/RuleDeathMatch.cs index 03874a6d99..97d0dfb0a8 100644 --- a/Content.Server/GameTicking/GameRules/RuleDeathMatch.cs +++ b/Content.Server/GameTicking/GameRules/RuleDeathMatch.cs @@ -2,6 +2,7 @@ using System.Threading; using Content.Server.Interfaces.Chat; using Content.Server.Interfaces.GameTicking; +using Content.Shared; using Content.Shared.GameObjects.Components.Damage; using Robust.Server.Interfaces.Player; using Robust.Server.Player; @@ -56,7 +57,7 @@ namespace Content.Server.GameTicking.GameRules { _checkTimerCancel = null; - if (!_cfg.GetCVar("game.enablewin")) + if (!_cfg.GetCVar(CCVars.GameLobbyEnableWin)) return; IPlayerSession winner = null; diff --git a/Content.Server/GameTicking/GameRules/RuleSuspicion.cs b/Content.Server/GameTicking/GameRules/RuleSuspicion.cs index a6c33264fc..8f77126c78 100644 --- a/Content.Server/GameTicking/GameRules/RuleSuspicion.cs +++ b/Content.Server/GameTicking/GameRules/RuleSuspicion.cs @@ -6,6 +6,7 @@ using Content.Server.Interfaces.Chat; using Content.Server.Interfaces.GameTicking; using Content.Server.Mobs.Roles.Suspicion; using Content.Server.Players; +using Content.Shared; using Content.Shared.GameObjects.Components.Damage; using Robust.Server.GameObjects.EntitySystems; using Robust.Server.Interfaces.Player; @@ -58,7 +59,7 @@ namespace Content.Server.GameTicking.GameRules private void _checkWinConditions() { - if (!_cfg.GetCVar("game.enablewin")) + if (!_cfg.GetCVar(CCVars.GameLobbyEnableWin)) return; var traitorsAlive = 0; diff --git a/Content.Server/GameTicking/GameTicker.cs b/Content.Server/GameTicking/GameTicker.cs index 6b83a46088..114ab2023d 100644 --- a/Content.Server/GameTicking/GameTicker.cs +++ b/Content.Server/GameTicking/GameTicker.cs @@ -89,7 +89,7 @@ namespace Content.Server.GameTicking [ViewVariables] private bool DisallowLateJoin { get; set; } = false; - [ViewVariables] private bool LobbyEnabled => _configurationManager.GetCVar("game.lobbyenabled"); + [ViewVariables] private bool LobbyEnabled => _configurationManager.GetCVar(CCVars.GameLobbyEnabled); [ViewVariables] private bool _updateOnRoundEnd; private CancellationTokenSource _updateShutdownCts; @@ -120,7 +120,7 @@ namespace Content.Server.GameTicking public event Action OnRuleAdded; private TimeSpan LobbyDuration => - TimeSpan.FromSeconds(_configurationManager.GetCVar("game.lobbyduration")); + TimeSpan.FromSeconds(_configurationManager.GetCVar(CCVars.GameLobbyDuration)); public override void Initialize() { @@ -128,8 +128,6 @@ namespace Content.Server.GameTicking DebugTools.Assert(!_initialized); - PresetSuspicion.RegisterCVars(_configurationManager); - _netManager.RegisterNetMessage(nameof(MsgTickerJoinLobby)); _netManager.RegisterNetMessage(nameof(MsgTickerJoinGame)); _netManager.RegisterNetMessage(nameof(MsgTickerLobbyStatus)); @@ -287,9 +285,9 @@ namespace Content.Server.GameTicking if (!preset.Start(assignedJobs.Keys.ToList(), force)) { - if (_configurationManager.GetCVar("game.fallbackenabled")) + if (_configurationManager.GetCVar(CCVars.GameLobbyFallbackEnabled)) { - SetStartPreset(_configurationManager.GetCVar("game.fallbackpreset")); + SetStartPreset(_configurationManager.GetCVar(CCVars.GameLobbyFallbackPreset)); var newPreset = MakeGamePreset(profiles); _chatManager.DispatchServerAnnouncement( $"Failed to start {preset.ModeTitle} mode! Defaulting to {newPreset.ModeTitle}..."); diff --git a/Content.Server/GlobalVerbs/PointingVerb.cs b/Content.Server/GlobalVerbs/PointingVerb.cs index c3cdef56f4..3dd52e6941 100644 --- a/Content.Server/GlobalVerbs/PointingVerb.cs +++ b/Content.Server/GlobalVerbs/PointingVerb.cs @@ -25,7 +25,7 @@ namespace Content.Server.GlobalVerbs return; } - if (!EntitySystem.Get().InRange(user.Transform.Coordinates, target.Transform.Coordinates)) + if (!EntitySystem.Get().InRange(user, target.Transform.Coordinates)) { return; } diff --git a/Content.Server/MoMMILink.cs b/Content.Server/MoMMILink.cs index 0ea3befd25..692dcd59c5 100644 --- a/Content.Server/MoMMILink.cs +++ b/Content.Server/MoMMILink.cs @@ -5,6 +5,7 @@ using System.Text; using System.Threading.Tasks; using Content.Server.Interfaces; using Content.Server.Interfaces.Chat; +using Content.Shared; using Microsoft.AspNetCore.Http; using Newtonsoft.Json; using Robust.Server.Interfaces.ServerStatus; @@ -27,9 +28,6 @@ namespace Content.Server void IPostInjectInit.PostInject() { - _configurationManager.RegisterCVar("status.mommiurl", null); - _configurationManager.RegisterCVar("status.mommipassword", null); - _statusHost.AddHandler(_handleChatPost); } @@ -46,8 +44,8 @@ namespace Content.Server private async Task _sendMessageInternal(string type, object messageObject) { - var url = _configurationManager.GetCVar("status.mommiurl"); - var password = _configurationManager.GetCVar("status.mommipassword"); + var url = _configurationManager.GetCVar(CCVars.StatusMoMMIUrl); + var password = _configurationManager.GetCVar(CCVars.StatusMoMMIPassword); if (string.IsNullOrWhiteSpace(url)) { return; @@ -83,7 +81,7 @@ namespace Content.Server return false; } - var password = _configurationManager.GetCVar("status.mommipassword"); + var password = _configurationManager.GetCVar(CCVars.StatusMoMMIPassword); OOCPostMessage message = null; try diff --git a/Content.Server/ServerContentIoC.cs b/Content.Server/ServerContentIoC.cs index 6d9d94949b..ad69775abf 100644 --- a/Content.Server/ServerContentIoC.cs +++ b/Content.Server/ServerContentIoC.cs @@ -20,6 +20,7 @@ using Content.Server.Sandbox; using Content.Server.Utility; using Content.Shared.Interfaces; using Content.Shared.Kitchen; +using Content.Shared.Alert; using Robust.Shared.IoC; namespace Content.Server @@ -39,6 +40,7 @@ namespace Content.Server IoCManager.Register(); IoCManager.Register(); IoCManager.Register(); + IoCManager.Register(); IoCManager.Register(); IoCManager.Register(); IoCManager.Register(); diff --git a/Content.Server/StationEvents/StationEventCommand.cs b/Content.Server/StationEvents/StationEventCommand.cs index 2ec3587142..2549acded0 100644 --- a/Content.Server/StationEvents/StationEventCommand.cs +++ b/Content.Server/StationEvents/StationEventCommand.cs @@ -14,88 +14,106 @@ namespace Content.Server.StationEvents { public string Command => "events"; public string Description => "Provides admin control to station events"; - public string Help => "events >\n" + - "list: return all event names that can be run\n " + - "pause: stop all random events from running\n" + - "resume: allow random events to run again\n" + - "run: start a particular event now; is case-insensitive and not localized"; + public string Help => $"events >\n{ListHelp}\n{PauseHelp}\n{ResumeHelp}\n{RunHelp}"; + + private const string ListHelp = "list: return all event names that can be run"; + + private const string PauseHelp = "pause: stop all random events from running and any one currently running"; + + private const string ResumeHelp = "resume: allow random events to run again"; + + private const string RunHelp = + "run : start a particular event now; is case-insensitive and not localized"; + public void Execute(IConsoleShell shell, IPlayerSession? player, string[] args) { if (args.Length == 0) { - shell.SendText(player, "Need more args"); + shell.SendText(player, $"Invalid amount of arguments.\n{Help}"); return; } - if (args[0] == "list") + switch (args[0]) { - var resultText = "Random\n" + EntitySystem.Get().GetEventNames(); - shell.SendText(player, resultText); - return; - } + case "list": + List(shell, player); + break; + // Didn't use a "toggle" so it's explicit + case "pause": + Pause(shell, player); + break; + case "resume": + Resume(shell, player); + break; + case "stop": + Stop(shell, player); + break; + case "run": + if (args.Length != 2) + { + shell.SendText(player, $"Need 2 arguments, there were {args.Length}.\n{RunHelp}"); + break; + } - // Didn't use a "toggle" so it's explicit - if (args[0] == "pause") + Run(shell, player, args[1]); + break; + default: + shell.SendText(player, Loc.GetString($"Invalid events command.\n{Help}")); + break; + } + } + + private void Run(IConsoleShell shell, IPlayerSession? player, string eventName) + { + var stationSystem = EntitySystem.Get(); + + var resultText = eventName == "random" + ? stationSystem.RunRandomEvent() + : stationSystem.RunEvent(eventName); + + shell.SendText(player, resultText); + } + + private void List(IConsoleShell shell, IPlayerSession? player) + { + var resultText = "Random\n" + EntitySystem.Get().GetEventNames(); + shell.SendText(player, resultText); + } + + private void Pause(IConsoleShell shell, IPlayerSession? player) + { + var stationEventSystem = EntitySystem.Get(); + + if (!stationEventSystem.Enabled) { - var stationEventSystem = EntitySystem.Get(); - - if (!stationEventSystem.Enabled) - { - shell.SendText(player, Loc.GetString("Station events are already paused")); - return; - } - else - { - stationEventSystem.Enabled = false; - shell.SendText(player, Loc.GetString("Station events paused")); - return; - } + shell.SendText(player, Loc.GetString("Station events are already paused")); } - - if (args[0] == "resume") + else { - var stationEventSystem = EntitySystem.Get(); - - if (stationEventSystem.Enabled) - { - shell.SendText(player, Loc.GetString("Station events are already running")); - return; - } - else - { - stationEventSystem.Enabled = true; - shell.SendText(player, Loc.GetString("Station events resumed")); - return; - } + stationEventSystem.Enabled = false; + shell.SendText(player, Loc.GetString("Station events paused")); } + } - if (args[0] == "stop") + private void Resume(IConsoleShell shell, IPlayerSession? player) + { + var stationEventSystem = EntitySystem.Get(); + + if (stationEventSystem.Enabled) { - var resultText = EntitySystem.Get().StopEvent(); - shell.SendText(player, resultText); - return; + shell.SendText(player, Loc.GetString("Station events are already running")); } - - if (args[0] == "run" && args.Length == 2) + else { - var eventName = args[1]; - string resultText; - - if (eventName == "random") - { - resultText = EntitySystem.Get().RunRandomEvent(); - } - else - { - resultText = EntitySystem.Get().RunEvent(eventName); - } - - shell.SendText(player, resultText); - return; + stationEventSystem.Enabled = true; + shell.SendText(player, Loc.GetString("Station events resumed")); } + } - shell.SendText(player, Loc.GetString("Invalid events command")); - return; + private void Stop(IConsoleShell shell, IPlayerSession? player) + { + var resultText = EntitySystem.Get().StopEvent(); + shell.SendText(player, resultText); } } } diff --git a/Content.Shared/Alert/AlertManager.cs b/Content.Shared/Alert/AlertManager.cs new file mode 100644 index 0000000000..392b731a83 --- /dev/null +++ b/Content.Shared/Alert/AlertManager.cs @@ -0,0 +1,124 @@ +using System.Collections.Generic; +using System.Linq; +using Content.Shared.Prototypes.Kitchen; +using Robust.Shared.IoC; +using Robust.Shared.Log; +using Robust.Shared.Prototypes; + +namespace Content.Shared.Alert +{ + /// + /// Provides access to all configured alerts. Ability to encode/decode a given state + /// to an int. + /// + public class AlertManager + { + [Dependency] + private readonly IPrototypeManager _prototypeManager = default!; + + private AlertPrototype[] _orderedAlerts; + private Dictionary _typeToIndex; + + public void Initialize() + { + // order by type value so we can map between the id and an integer index and use + // the index for compact alert change messages + _orderedAlerts = + _prototypeManager.EnumeratePrototypes() + .OrderBy(prototype => prototype.AlertType).ToArray(); + _typeToIndex = new Dictionary(); + + for (var i = 0; i < _orderedAlerts.Length; i++) + { + if (i > byte.MaxValue) + { + Logger.ErrorS("alert", "too many alerts for byte encoding ({0})! encoding will need" + + " to be changed to use a ushort rather than byte", _typeToIndex.Count); + break; + } + if (!_typeToIndex.TryAdd(_orderedAlerts[i].AlertType, (byte) i)) + { + Logger.ErrorS("alert", + "Found alert with duplicate id {0}", _orderedAlerts[i].AlertType); + } + } + + } + + /// + /// Tries to get the alert of the indicated type + /// + /// true if found + public bool TryGet(AlertType alertType, out AlertPrototype alert) + { + if (_typeToIndex.TryGetValue(alertType, out var idx)) + { + alert = _orderedAlerts[idx]; + return true; + } + + alert = null; + return false; + } + + /// + /// Tries to get the alert of the indicated type along with its encoding + /// + /// true if found + public bool TryGetWithEncoded(AlertType alertType, out AlertPrototype alert, out byte encoded) + { + if (_typeToIndex.TryGetValue(alertType, out var idx)) + { + alert = _orderedAlerts[idx]; + encoded = (byte) idx; + return true; + } + + alert = null; + encoded = 0; + return false; + } + + /// + /// Tries to get the compact encoded representation of this alert + /// + /// true if successful + public bool TryEncode(AlertPrototype alert, out byte encoded) + { + return TryEncode(alert.AlertType, out encoded); + } + + /// + /// Tries to get the compact encoded representation of the alert with + /// the indicated id + /// + /// true if successful + public bool TryEncode(AlertType alertType, out byte encoded) + { + if (_typeToIndex.TryGetValue(alertType, out var idx)) + { + encoded = idx; + return true; + } + + encoded = 0; + return false; + } + + /// + /// Tries to get the alert from the encoded representation + /// + /// true if successful + public bool TryDecode(byte encodedAlert, out AlertPrototype alert) + { + if (encodedAlert >= _orderedAlerts.Length) + { + alert = null; + return false; + } + + alert = _orderedAlerts[encodedAlert]; + return true; + } + } +} diff --git a/Content.Shared/Alert/AlertOrderPrototype.cs b/Content.Shared/Alert/AlertOrderPrototype.cs new file mode 100644 index 0000000000..0fd5ee35c3 --- /dev/null +++ b/Content.Shared/Alert/AlertOrderPrototype.cs @@ -0,0 +1,81 @@ +using System; +using System.Collections.Generic; +using Robust.Shared.Prototypes; +using Robust.Shared.Serialization; +using Robust.Shared.Utility; +using YamlDotNet.RepresentationModel; + +namespace Content.Shared.Alert +{ + /// + /// Defines the order of alerts so they show up in a consistent order. + /// + [Prototype("alertOrder")] + public class AlertOrderPrototype : IPrototype, IComparer + { + private Dictionary _typeToIdx = new Dictionary(); + private Dictionary _categoryToIdx = new Dictionary(); + + public void LoadFrom(YamlMappingNode mapping) + { + if (!mapping.TryGetNode("order", out YamlSequenceNode orderMapping)) return; + + int i = 0; + foreach (var entryYaml in orderMapping) + { + var orderEntry = (YamlMappingNode) entryYaml; + var serializer = YamlObjectSerializer.NewReader(orderEntry); + if (serializer.TryReadDataField("category", out AlertCategory alertCategory)) + { + _categoryToIdx[alertCategory] = i++; + } + else if (serializer.TryReadDataField("alertType", out AlertType alertType)) + { + _typeToIdx[alertType] = i++; + } + } + } + + private int GetOrderIndex(AlertPrototype alert) + { + if (_typeToIdx.TryGetValue(alert.AlertType, out var idx)) + { + return idx; + } + if (alert.Category != null && + _categoryToIdx.TryGetValue((AlertCategory) alert.Category, out idx)) + { + return idx; + } + + return -1; + } + + public int Compare(AlertPrototype x, AlertPrototype y) + { + if ((x == null) && (y == null)) return 0; + if (x == null) return 1; + if (y == null) return -1; + var idx = GetOrderIndex(x); + var idy = GetOrderIndex(y); + if (idx == -1 && idy == -1) + { + // break ties by type value + return x.AlertType - y.AlertType; + } + + if (idx == -1) return 1; + if (idy == -1) return -1; + var result = idx - idy; + // not strictly necessary (we don't care about ones that go at the same index) + // but it makes the sort stable + if (result == 0) + { + // break ties by type value + return x.AlertType - y.AlertType; + } + + return result; + } + } +} diff --git a/Content.Shared/Alert/AlertPrototype.cs b/Content.Shared/Alert/AlertPrototype.cs new file mode 100644 index 0000000000..431e0b6f3d --- /dev/null +++ b/Content.Shared/Alert/AlertPrototype.cs @@ -0,0 +1,189 @@ +using System; +using Robust.Shared.Log; +using Robust.Shared.Prototypes; +using Robust.Shared.Serialization; +using Robust.Shared.Utility; +using Robust.Shared.ViewVariables; +using YamlDotNet.RepresentationModel; + +namespace Content.Shared.Alert +{ + /// + /// An alert popup with associated icon, tooltip, and other data. + /// + [Prototype("alert")] + public class AlertPrototype : IPrototype + { + /// + /// Type of alert, no 2 alert prototypes should have the same one. + /// + public AlertType AlertType { get; private set; } + + /// + /// Path to the icon (png) to show in alert bar. If severity levels are supported, + /// this should be the path to the icon without the severity number + /// (i.e. hot.png if there is hot1.png and hot2.png). Use + /// to get the correct icon path for a particular severity level. + /// + [ViewVariables] + public string IconPath { get; private set; } + + /// + /// Name to show in tooltip window. Accepts formatting. + /// + public FormattedMessage Name { get; private set; } + + /// + /// Description to show in tooltip window. Accepts formatting. + /// + public FormattedMessage Description { get; private set; } + + /// + /// Category the alert belongs to. Only one alert of a given category + /// can be shown at a time. If one is shown while another is already being shown, + /// it will be replaced. This can be useful for categories of alerts which should naturally + /// replace each other and are mutually exclusive, for example lowpressure / highpressure, + /// hot / cold. If left unspecified, the alert will not replace or be replaced by any other alerts. + /// + public AlertCategory? Category { get; private set; } + + /// + /// Key which is unique w.r.t category semantics (alerts with same category have equal keys, + /// alerts with no category have different keys). + /// + public AlertKey AlertKey { get; private set; } + + /// + /// -1 (no effect) unless MaxSeverity is specified. Defaults to 1. Minimum severity level supported by this state. + /// + public short MinSeverity => MaxSeverity == -1 ? (short) -1 : _minSeverity; + private short _minSeverity; + + /// + /// Maximum severity level supported by this state. -1 (default) indicates + /// no severity levels are supported by the state. + /// + public short MaxSeverity { get; private set; } + + /// + /// Indicates whether this state support severity levels + /// + public bool SupportsSeverity => MaxSeverity != -1; + + public void LoadFrom(YamlMappingNode mapping) + { + var serializer = YamlObjectSerializer.NewReader(mapping); + + serializer.DataField(this, x => x.IconPath, "icon", string.Empty); + serializer.DataField(this, x => x.MaxSeverity, "maxSeverity", (short) -1); + serializer.DataField(ref _minSeverity, "minSeverity", (short) 1); + + serializer.DataReadFunction("name", string.Empty, + s => Name = FormattedMessage.FromMarkup(s)); + serializer.DataReadFunction("description", string.Empty, + s => Description = FormattedMessage.FromMarkup(s)); + + serializer.DataField(this, x => x.AlertType, "alertType", AlertType.Error); + if (AlertType == AlertType.Error) + { + Logger.ErrorS("alert", "missing or invalid alertType for alert with name {0}", Name); + } + + if (serializer.TryReadDataField("category", out AlertCategory alertCategory)) + { + Category = alertCategory; + } + AlertKey = new AlertKey(AlertType, Category); + } + + /// severity level, if supported by this alert + /// the icon path to the texture for the provided severity level + public string GetIconPath(short? severity = null) + { + if (!SupportsSeverity && severity != null) + { + Logger.WarningS("alert", "attempted to get icon path for severity level for alert {0}, but" + + " this alert does not support severity levels", AlertType); + } + if (!SupportsSeverity) return IconPath; + if (severity == null) + { + Logger.WarningS("alert", "attempted to get icon path without severity level for alert {0}," + + " but this alert requires a severity level. Using lowest" + + " valid severity level instead...", AlertType); + severity = MinSeverity; + } + + if (severity < MinSeverity) + { + Logger.WarningS("alert", "attempted to get icon path with severity level {0} for alert {1}," + + " but the minimum severity level for this alert is {2}. Using" + + " lowest valid severity level instead...", severity, AlertType, MinSeverity); + severity = MinSeverity; + } + if (severity > MaxSeverity) + { + Logger.WarningS("alert", "attempted to get icon path with severity level {0} for alert {1}," + + " but the max severity level for this alert is {2}. Using" + + " highest valid severity level instead...", severity, AlertType, MaxSeverity); + severity = MaxSeverity; + } + + // split and add the severity number to the path + var ext = IconPath.LastIndexOf('.'); + return IconPath.Substring(0, ext) + severity + IconPath.Substring(ext, IconPath.Length - ext); + } + } + + /// + /// Key for an alert which is unique (for equality and hashcode purposes) w.r.t category semantics. + /// I.e., entirely defined by the category, if a category was specified, otherwise + /// falls back to the id. + /// + [Serializable, NetSerializable] + public struct AlertKey + { + private readonly AlertType? _alertType; + private readonly AlertCategory? _alertCategory; + + /// NOTE: if the alert has a category you must pass the category for this to work + /// properly as a key. I.e. if the alert has a category and you pass only the ID, and you + /// compare this to another AlertKey that has both the category and the same ID, it will not consider them equal. + public AlertKey(AlertType? alertType, AlertCategory? alertCategory) + { + // if there is a category, ignore the alerttype. + if (alertCategory != null) + { + _alertCategory = alertCategory; + _alertType = null; + } + else + { + _alertCategory = null; + _alertType = alertType; + } + } + + public bool Equals(AlertKey other) + { + return _alertType == other._alertType && _alertCategory == other._alertCategory; + } + + public override bool Equals(object obj) + { + return obj is AlertKey other && Equals(other); + } + + public override int GetHashCode() + { + return HashCode.Combine(_alertType, _alertCategory); + } + + /// alert category, must not be null + /// An alert key for the provided alert category + public static AlertKey ForCategory(AlertCategory category) + { + return new AlertKey(null, category); + } + } +} diff --git a/Content.Shared/Alert/AlertType.cs b/Content.Shared/Alert/AlertType.cs new file mode 100644 index 0000000000..b4a3866e0c --- /dev/null +++ b/Content.Shared/Alert/AlertType.cs @@ -0,0 +1,52 @@ +namespace Content.Shared.Alert +{ + /// + /// Every category of alert. Corresponds to category field in alert prototypes defined in YML + /// + public enum AlertCategory + { + Pressure, + Temperature, + Buckled, + Health, + Piloting, + Hunger, + Thirst + } + + /// + /// Every kind of alert. Corresponds to alertType field in alert prototypes defined in YML + /// + public enum AlertType + { + Error, + LowPressure, + HighPressure, + Fire, + Cold, + Hot, + Weightless, + Stun, + Handcuffed, + Buckled, + HumanCrit, + HumanDead, + HumanHealth, + PilotingShuttle, + Overfed, + Peckish, + Starving, + Overhydrated, + Thirsty, + Parched, + Pulled, + Pulling, + Debug1, + Debug2, + Debug3, + Debug4, + Debug5, + Debug6 + } + +} diff --git a/Content.Shared/CCVars.cs b/Content.Shared/CCVars.cs index bd1a620bed..faf2c627d1 100644 --- a/Content.Shared/CCVars.cs +++ b/Content.Shared/CCVars.cs @@ -7,6 +7,24 @@ namespace Content.Shared [CVarDefs] public sealed class CCVars : CVars { + /* + * Status + */ + + public static readonly CVarDef StatusMoMMIUrl = + CVarDef.Create("status.mommiurl", null); + + public static readonly CVarDef StatusMoMMIPassword = + CVarDef.Create("status.mommipassword", null); + + + /* + * Game + */ + + public static readonly CVarDef + EventsEnabled = CVarDef.Create("events.enabled", false, CVar.ARCHIVE | CVar.SERVERONLY); + public static readonly CVarDef GameLobbyEnabled = CVarDef.Create("game.lobbyenabled", false, CVar.ARCHIVE); @@ -34,6 +52,25 @@ namespace Content.Shared public static readonly CVarDef GamePersistGuests = CVarDef.Create("game.persistguests", true, CVar.ARCHIVE | CVar.SERVERONLY); + public static readonly CVarDef GameSuspicionMinPlayers = + CVarDef.Create("game.suspicion_min_players", 5); + + public static readonly CVarDef GameSuspicionMinTraitors = + CVarDef.Create("game.suspicion_min_traitors", 2); + + public static readonly CVarDef GameSuspicionPlayersPerTraitor = + CVarDef.Create("game.suspicion_players_per_traitor", 5); + + public static readonly CVarDef GameSuspicionStartingBalance = + CVarDef.Create("game.suspicion_starting_balance", 20); + + public static readonly CVarDef GameDiagonalMovement = + CVarDef.Create("game.diagonalmovement", true, CVar.ARCHIVE); + + /* + * Console + */ + public static readonly CVarDef ConsoleLoginLocal = CVarDef.Create("console.loginlocal", true, CVar.ARCHIVE | CVar.SERVERONLY); @@ -63,6 +100,44 @@ namespace Content.Shared public static readonly CVarDef DatabasePgPassword = CVarDef.Create("database.pg_password", "", CVar.SERVERONLY); + + /* + * Outline + */ + + public static readonly CVarDef OutlineEnabled = + CVarDef.Create("outline.enabled", true, CVar.CLIENTONLY); + + + /* + * Parallax + */ + + public static readonly CVarDef ParallaxEnabled = + CVarDef.Create("parallax.enabled", true); + + public static readonly CVarDef ParallaxDebug = + CVarDef.Create("parallax.debug", true); + + + /* + * AI + */ + + public static readonly CVarDef AIMaxUpdates = + CVarDef.Create("ai.maxupdates", 64); + + + /* + * Net + */ + + public static readonly CVarDef NetAtmosDebugOverlayTickRate = + CVarDef.Create("net.atmosdbgoverlaytickrate", 3.0f); + + public static readonly CVarDef NetGasOverlayTickRate = + CVarDef.Create("net.gasoverlaytickrate", 3.0f); + /* * Admin stuff */ diff --git a/Content.Shared/GameObjects/Components/Body/Behavior/IMechanismBehavior.cs b/Content.Shared/GameObjects/Components/Body/Behavior/IMechanismBehavior.cs index 2e38200f58..e1ddcb17b8 100644 --- a/Content.Shared/GameObjects/Components/Body/Behavior/IMechanismBehavior.cs +++ b/Content.Shared/GameObjects/Components/Body/Behavior/IMechanismBehavior.cs @@ -2,10 +2,11 @@ using Content.Shared.GameObjects.Components.Body.Mechanism; using Content.Shared.GameObjects.Components.Body.Part; using Robust.Shared.Interfaces.GameObjects; +using Robust.Shared.Interfaces.Serialization; namespace Content.Shared.GameObjects.Components.Body.Behavior { - public interface IMechanismBehavior : IComponent + public interface IMechanismBehavior : IExposeData { IBody? Body { get; } @@ -15,7 +16,20 @@ namespace Content.Shared.GameObjects.Components.Body.Behavior /// Upward reference to the parent that this /// behavior is attached to. /// - IMechanism? Mechanism { get; } + IMechanism Parent { get; } + + /// + /// The entity that owns . + /// For the entity owning the body that this mechanism may be in, + /// see + /// + IEntity Owner { get; } + + void Initialize(IMechanism parent); + + void Startup(); + + void Update(float frameTime); /// /// Called when the containing is attached to a diff --git a/Content.Shared/GameObjects/Components/Body/Behavior/SharedHeartBehaviorComponent.cs b/Content.Shared/GameObjects/Components/Body/Behavior/SharedHeartBehaviorComponent.cs deleted file mode 100644 index 6d4f6c0f3d..0000000000 --- a/Content.Shared/GameObjects/Components/Body/Behavior/SharedHeartBehaviorComponent.cs +++ /dev/null @@ -1,8 +0,0 @@ -#nullable enable -namespace Content.Shared.GameObjects.Components.Body.Behavior -{ - public abstract class SharedHeartBehaviorComponent : MechanismBehaviorComponent - { - public override string Name => "Heart"; - } -} diff --git a/Content.Shared/GameObjects/Components/Body/Behavior/SharedLungBehaviorComponent.cs b/Content.Shared/GameObjects/Components/Body/Behavior/SharedLungBehaviorComponent.cs deleted file mode 100644 index dbbff4e9d9..0000000000 --- a/Content.Shared/GameObjects/Components/Body/Behavior/SharedLungBehaviorComponent.cs +++ /dev/null @@ -1,39 +0,0 @@ -#nullable enable -using Robust.Shared.Serialization; -using Robust.Shared.ViewVariables; - -namespace Content.Shared.GameObjects.Components.Body.Behavior -{ - public abstract class SharedLungBehaviorComponent : MechanismBehaviorComponent - { - public override string Name => "Lung"; - - [ViewVariables] public abstract float Temperature { get; } - - [ViewVariables] public abstract float Volume { get; } - - [ViewVariables] public LungStatus Status { get; set; } - - [ViewVariables] public float CycleDelay { get; set; } - - public override void ExposeData(ObjectSerializer serializer) - { - base.ExposeData(serializer); - - serializer.DataField(this, l => l.CycleDelay, "cycleDelay", 2); - } - - public abstract void Inhale(float frameTime); - - public abstract void Exhale(float frameTime); - - public abstract void Gasp(); - } - - public enum LungStatus - { - None = 0, - Inhaling, - Exhaling - } -} diff --git a/Content.Shared/GameObjects/Components/Body/Mechanism/IMechanism.cs b/Content.Shared/GameObjects/Components/Body/Mechanism/IMechanism.cs index 092b838819..f6f82627cb 100644 --- a/Content.Shared/GameObjects/Components/Body/Mechanism/IMechanism.cs +++ b/Content.Shared/GameObjects/Components/Body/Mechanism/IMechanism.cs @@ -1,4 +1,7 @@ #nullable enable +using System; +using System.Collections.Generic; +using Content.Shared.GameObjects.Components.Body.Behavior; using Content.Shared.GameObjects.Components.Body.Part; using Robust.Shared.Interfaces.GameObjects; @@ -10,6 +13,8 @@ namespace Content.Shared.GameObjects.Components.Body.Mechanism IBodyPart? Part { get; set; } + IReadOnlyDictionary Behaviors { get; } + /// /// Professional description of the . /// @@ -55,6 +60,21 @@ namespace Content.Shared.GameObjects.Components.Body.Mechanism /// BodyPartCompatibility Compatibility { get; set; } + /// + /// Adds a behavior if it does not exist already. + /// + /// The behavior type to add. + /// + /// True if the behavior already existed, false if it had to be created. + /// + bool EnsureBehavior(out T behavior) where T : IMechanismBehavior, new(); + + bool HasBehavior() where T : IMechanismBehavior; + + bool TryRemoveBehavior() where T : IMechanismBehavior; + + void Update(float frameTime); + // TODO BODY Turn these into event listeners so they dont need to be exposed /// /// Called when the containing is attached to a diff --git a/Content.Shared/GameObjects/Components/Body/Mechanism/SharedMechanismComponent.cs b/Content.Shared/GameObjects/Components/Body/Mechanism/SharedMechanismComponent.cs index cfd6d8e2f9..7ac3c76ce2 100644 --- a/Content.Shared/GameObjects/Components/Body/Mechanism/SharedMechanismComponent.cs +++ b/Content.Shared/GameObjects/Components/Body/Mechanism/SharedMechanismComponent.cs @@ -1,10 +1,14 @@ #nullable enable +using System; using System.Collections.Generic; using System.Linq; using Content.Shared.GameObjects.Components.Body.Behavior; using Content.Shared.GameObjects.Components.Body.Part; +using Content.Shared.Interfaces; 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; @@ -14,11 +18,12 @@ namespace Content.Shared.GameObjects.Components.Body.Mechanism { public override string Name => "Mechanism"; - private IBodyPart? _part; protected readonly Dictionary OptionsCache = new Dictionary(); protected IBody? BodyCache; protected int IdHash; protected IEntity? PerformerCache; + private IBodyPart? _part; + private readonly Dictionary _behaviors = new Dictionary(); public IBody? Body => Part?.Body; @@ -61,6 +66,8 @@ namespace Content.Shared.GameObjects.Components.Body.Mechanism } } + public IReadOnlyDictionary Behaviors => _behaviors; + public string Description { get; set; } = string.Empty; public string ExamineMessage { get; set; } = string.Empty; @@ -98,6 +105,91 @@ namespace Content.Shared.GameObjects.Components.Body.Mechanism serializer.DataField(this, m => m.Size, "size", 1); serializer.DataField(this, m => m.Compatibility, "compatibility", BodyPartCompatibility.Universal); + + var moduleManager = IoCManager.Resolve(); + + if (moduleManager.IsServerModule) + { + serializer.DataReadWriteFunction( + "behaviors", + null!, + behaviors => + { + if (behaviors == null) + { + return; + } + + foreach (var behavior in behaviors) + { + var type = behavior.GetType(); + + if (!_behaviors.TryAdd(type, behavior)) + { + Logger.Warning($"Duplicate behavior in {nameof(SharedMechanismComponent)} for entity {Owner.Name}: {type}."); + continue; + } + + IoCManager.InjectDependencies(behavior); + } + }, + () => _behaviors.Values.ToList()); + } + } + + public override void Initialize() + { + base.Initialize(); + + foreach (var behavior in _behaviors.Values) + { + behavior.Initialize(this); + } + } + + protected override void Startup() + { + base.Startup(); + + foreach (var behavior in _behaviors.Values) + { + behavior.Startup(); + } + } + + public bool EnsureBehavior(out T behavior) where T : IMechanismBehavior, new() + { + if (_behaviors.TryGetValue(typeof(T), out var rawBehavior)) + { + behavior = (T) rawBehavior; + return true; + } + + behavior = new T(); + IoCManager.InjectDependencies(behavior); + _behaviors.Add(typeof(T), behavior); + behavior.Initialize(this); + behavior.Startup(); + + return false; + } + + public bool HasBehavior() where T : IMechanismBehavior + { + return _behaviors.ContainsKey(typeof(T)); + } + + public bool TryRemoveBehavior() where T : IMechanismBehavior + { + return _behaviors.Remove(typeof(T)); + } + + public void Update(float frameTime) + { + foreach (var behavior in _behaviors.Values) + { + behavior.Update(frameTime); + } } public void AddedToBody(IBody body) @@ -105,9 +197,7 @@ namespace Content.Shared.GameObjects.Components.Body.Mechanism DebugTools.AssertNotNull(Body); DebugTools.AssertNotNull(body); - OnAddedToBody(body); - - foreach (var behavior in Owner.GetAllComponents()) + foreach (var behavior in _behaviors.Values) { behavior.AddedToBody(body); } @@ -119,9 +209,8 @@ namespace Content.Shared.GameObjects.Components.Body.Mechanism DebugTools.AssertNotNull(part); Owner.Transform.AttachParent(part.Owner); - OnAddedToPart(part); - foreach (var behavior in Owner.GetAllComponents().ToArray()) + foreach (var behavior in _behaviors.Values) { behavior.AddedToPart(part); } @@ -135,9 +224,8 @@ namespace Content.Shared.GameObjects.Components.Body.Mechanism DebugTools.AssertNotNull(part); Owner.Transform.AttachParent(part.Owner); - OnAddedToPartInBody(body, part); - foreach (var behavior in Owner.GetAllComponents()) + foreach (var behavior in _behaviors.Values) { behavior.AddedToPartInBody(body, part); } @@ -148,9 +236,7 @@ namespace Content.Shared.GameObjects.Components.Body.Mechanism DebugTools.AssertNull(Body); DebugTools.AssertNotNull(old); - OnRemovedFromBody(old); - - foreach (var behavior in Owner.GetAllComponents()) + foreach (var behavior in _behaviors.Values) { behavior.RemovedFromBody(old); } @@ -162,9 +248,8 @@ namespace Content.Shared.GameObjects.Components.Body.Mechanism DebugTools.AssertNotNull(old); Owner.Transform.AttachToGridOrMap(); - OnRemovedFromPart(old); - foreach (var behavior in Owner.GetAllComponents()) + foreach (var behavior in _behaviors.Values) { behavior.RemovedFromPart(old); } @@ -178,24 +263,11 @@ namespace Content.Shared.GameObjects.Components.Body.Mechanism DebugTools.AssertNotNull(oldPart); Owner.Transform.AttachToGridOrMap(); - OnRemovedFromPartInBody(oldBody, oldPart); - foreach (var behavior in Owner.GetAllComponents()) + foreach (var behavior in _behaviors.Values) { behavior.RemovedFromPartInBody(oldBody, oldPart); } } - - protected virtual void OnAddedToBody(IBody body) { } - - protected virtual void OnAddedToPart(IBodyPart part) { } - - protected virtual void OnAddedToPartInBody(IBody body, IBodyPart part) { } - - protected virtual void OnRemovedFromBody(IBody old) { } - - protected virtual void OnRemovedFromPart(IBodyPart old) { } - - protected virtual void OnRemovedFromPartInBody(IBody oldBody, IBodyPart oldPart) { } } } diff --git a/Content.Shared/GameObjects/Components/Mobs/SharedAlertsComponent.cs b/Content.Shared/GameObjects/Components/Mobs/SharedAlertsComponent.cs new file mode 100644 index 0000000000..dff93e22b7 --- /dev/null +++ b/Content.Shared/GameObjects/Components/Mobs/SharedAlertsComponent.cs @@ -0,0 +1,279 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using Content.Shared.Alert; +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 Robust.Shared.ViewVariables; + +namespace Content.Shared.GameObjects.Components.Mobs +{ + /// + /// Handles the icons on the right side of the screen. + /// Should only be used for player-controlled entities. + /// + public abstract class SharedAlertsComponent : Component + { + private static readonly AlertState[] NO_ALERTS = new AlertState[0]; + + [Dependency] + protected readonly AlertManager AlertManager = default!; + + public override string Name => "AlertsUI"; + public override uint? NetID => ContentNetIDs.ALERTS; + + [ViewVariables] + private Dictionary _alerts = new Dictionary(); + + /// true iff an alert of the indicated alert category is currently showing + public bool IsShowingAlertCategory(AlertCategory alertCategory) + { + return IsShowingAlert(AlertKey.ForCategory(alertCategory)); + } + + /// true iff an alert of the indicated id is currently showing + public bool IsShowingAlert(AlertType alertType) + { + if (AlertManager.TryGet(alertType, out var alert)) + { + return IsShowingAlert(alert.AlertKey); + } + Logger.DebugS("alert", "unknown alert type {0}", alertType); + return false; + + } + + /// true iff an alert of the indicated key is currently showing + protected bool IsShowingAlert(AlertKey alertKey) + { + return _alerts.ContainsKey(alertKey); + } + + protected IEnumerable EnumerateAlertStates() + { + return _alerts.Values.Select(alertData => alertData.AlertState); + } + + /// + /// Invokes the alert's specified callback if there is one. + /// Not intended to be used on clientside. + /// + protected void PerformAlertClickCallback(AlertPrototype alert, IEntity owner) + { + if (_alerts.TryGetValue(alert.AlertKey, out var alertStateCallback)) + { + alertStateCallback.OnClickAlert?.Invoke(new ClickAlertEventArgs(owner, alert)); + } + else + { + Logger.DebugS("alert", "player {0} attempted to invoke" + + " alert click for {1} but that alert is not currently" + + " showing", owner.Name, alert.AlertType); + } + } + + /// + /// Creates a new array containing all of the current alert states. + /// + /// + protected AlertState[] CreateAlertStatesArray() + { + if (_alerts.Count == 0) return NO_ALERTS; + var states = new AlertState[_alerts.Count]; + // because I don't trust LINQ + var idx = 0; + foreach (var alertData in _alerts.Values) + { + states[idx++] = alertData.AlertState; + } + + return states; + } + + protected bool TryGetAlertState(AlertKey key, out AlertState alertState) + { + if (_alerts.TryGetValue(key, out var alertData)) + { + alertState = alertData.AlertState; + return true; + } + + alertState = default; + return false; + } + + /// + /// Replace the current active alerts with the specified alerts. Any + /// OnClickAlert callbacks on the active alerts will be erased. + /// + protected void SetAlerts(AlertState[] alerts) + { + var newAlerts = new Dictionary(); + foreach (var alertState in alerts) + { + if (AlertManager.TryDecode(alertState.AlertEncoded, out var alert)) + { + newAlerts[alert.AlertKey] = new ClickableAlertState + { + AlertState = alertState + }; + } + else + { + Logger.ErrorS("alert", "unrecognized encoded alert {0}", alertState.AlertEncoded); + } + } + + _alerts = newAlerts; + } + + /// + /// Shows the alert. If the alert or another alert of the same category is already showing, + /// it will be updated / replaced with the specified values. + /// + /// type of the alert to set + /// callback to invoke when ClickAlertMessage is received by the server + /// after being clicked by client. Has no effect when specified on the clientside. + /// severity, if supported by the alert + /// cooldown start and end, if null there will be no cooldown (and it will + /// be erased if there is currently a cooldown for the alert) + public void ShowAlert(AlertType alertType, short? severity = null, OnClickAlert onClickAlert = null, + ValueTuple? cooldown = null) + { + if (AlertManager.TryGetWithEncoded(alertType, out var alert, out var encoded)) + { + if (_alerts.TryGetValue(alert.AlertKey, out var alertStateCallback) && + alertStateCallback.AlertState.AlertEncoded == encoded && + alertStateCallback.AlertState.Severity == severity && alertStateCallback.AlertState.Cooldown == cooldown) + { + alertStateCallback.OnClickAlert = onClickAlert; + return; + } + + _alerts[alert.AlertKey] = new ClickableAlertState + { + AlertState = new AlertState + {Cooldown = cooldown, AlertEncoded = encoded, Severity = severity}, + OnClickAlert = onClickAlert + }; + + Dirty(); + + } + else + { + Logger.ErrorS("alert", "Unable to show alert {0}, please ensure this alertType has" + + " a corresponding YML alert prototype", + alertType); + } + } + + /// + /// Clear the alert with the given category, if one is currently showing. + /// + public void ClearAlertCategory(AlertCategory category) + { + var key = AlertKey.ForCategory(category); + if (!_alerts.Remove(key)) + { + return; + } + + AfterClearAlert(); + + Dirty(); + } + + /// + /// Clear the alert of the given type if it is currently showing. + /// + public void ClearAlert(AlertType alertType) + { + if (AlertManager.TryGet(alertType, out var alert)) + { + if (!_alerts.Remove(alert.AlertKey)) + { + return; + } + + AfterClearAlert(); + + Dirty(); + } + else + { + Logger.ErrorS("alert", "unable to clear alert, unknown alertType {0}", alertType); + } + + } + + /// + /// Invoked after clearing an alert prior to dirtying the control + /// + protected virtual void AfterClearAlert() { } + } + + [Serializable, NetSerializable] + public class AlertsComponentState : ComponentState + { + public AlertState[] Alerts; + + public AlertsComponentState(AlertState[] alerts) : base(ContentNetIDs.ALERTS) + { + Alerts = alerts; + } + } + + /// + /// A message that calls the click interaction on a alert + /// + [Serializable, NetSerializable] + public class ClickAlertMessage : ComponentMessage + { + public readonly byte EncodedAlert; + + public ClickAlertMessage(byte encodedAlert) + { + Directed = true; + EncodedAlert = encodedAlert; + } + } + + [Serializable, NetSerializable] + public struct AlertState + { + public byte AlertEncoded; + public short? Severity; + public ValueTuple? Cooldown; + } + + public struct ClickableAlertState + { + public AlertState AlertState; + public OnClickAlert OnClickAlert; + } + + public delegate void OnClickAlert(ClickAlertEventArgs args); + + public class ClickAlertEventArgs : EventArgs + { + /// + /// Player clicking the alert + /// + public readonly IEntity Player; + /// + /// Alert that was clicked + /// + public readonly AlertPrototype Alert; + + public ClickAlertEventArgs(IEntity player, AlertPrototype alert) + { + Player = player; + Alert = alert; + } + } +} diff --git a/Content.Shared/GameObjects/Components/Mobs/SharedStatusEffectsComponent.cs b/Content.Shared/GameObjects/Components/Mobs/SharedStatusEffectsComponent.cs deleted file mode 100644 index 2c1cffeadd..0000000000 --- a/Content.Shared/GameObjects/Components/Mobs/SharedStatusEffectsComponent.cs +++ /dev/null @@ -1,76 +0,0 @@ -using System; -using System.Collections.Generic; -using Robust.Shared.GameObjects; -using Robust.Shared.Serialization; - -namespace Content.Shared.GameObjects.Components.Mobs -{ - /// - /// Handles the icons on the right side of the screen. - /// Should only be used for player-controlled entities - /// - public abstract class SharedStatusEffectsComponent : Component - { - public override string Name => "StatusEffectsUI"; - public override uint? NetID => ContentNetIDs.STATUSEFFECTS; - - public abstract IReadOnlyDictionary Statuses { get; } - - public abstract void ChangeStatusEffectIcon(StatusEffect effect, string icon); - - public abstract void ChangeStatusEffect(StatusEffect effect, string icon, ValueTuple? cooldown); - - public abstract void RemoveStatusEffect(StatusEffect effect); - } - - [Serializable, NetSerializable] - public class StatusEffectComponentState : ComponentState - { - public Dictionary StatusEffects; - - public StatusEffectComponentState(Dictionary statusEffects) : base(ContentNetIDs.STATUSEFFECTS) - { - StatusEffects = statusEffects; - } - } - - /// - /// A message that calls the click interaction on a status effect - /// - [Serializable, NetSerializable] - public class ClickStatusMessage : ComponentMessage - { - public readonly StatusEffect Effect; - - public ClickStatusMessage(StatusEffect effect) - { - Directed = true; - Effect = effect; - } - } - - [Serializable, NetSerializable] - public struct StatusEffectStatus - { - public string Icon; - public ValueTuple? Cooldown; - } - - // Each status effect is assumed to be unique - public enum StatusEffect - { - Health, - Hunger, - Thirst, - Pressure, - Fire, - Temperature, - Stun, - Cuffed, - Buckled, - Piloting, - Pulling, - Pulled, - Weightless - } -} diff --git a/Content.Shared/GameObjects/Components/Mobs/SharedStunnableComponent.cs b/Content.Shared/GameObjects/Components/Mobs/SharedStunnableComponent.cs index a347dbbccf..c168a9056e 100644 --- a/Content.Shared/GameObjects/Components/Mobs/SharedStunnableComponent.cs +++ b/Content.Shared/GameObjects/Components/Mobs/SharedStunnableComponent.cs @@ -1,5 +1,6 @@ using System; using System.Threading; +using Content.Shared.Alert; using Content.Shared.GameObjects.Components.Movement; using Content.Shared.GameObjects.EntitySystems; using Content.Shared.Interfaces.GameObjects.Components; @@ -41,7 +42,7 @@ namespace Content.Shared.GameObjects.Components.Mobs protected float KnockdownTimer; protected float SlowdownTimer; - private string _stunTexture; + private string _stunAlertId; protected CancellationTokenSource StatusRemoveCancellation = new CancellationTokenSource(); @@ -117,7 +118,7 @@ namespace Content.Shared.GameObjects.Components.Mobs StunnedTimer = seconds; LastStun = _gameTiming.CurTime; - SetStatusEffect(); + SetAlert(); OnStun(); Dirty(); @@ -144,7 +145,7 @@ namespace Content.Shared.GameObjects.Components.Mobs KnockdownTimer = seconds; LastStun = _gameTiming.CurTime; - SetStatusEffect(); + SetAlert(); OnKnockdown(); Dirty(); @@ -186,18 +187,18 @@ namespace Content.Shared.GameObjects.Components.Mobs if (Owner.TryGetComponent(out MovementSpeedModifierComponent movement)) movement.RefreshMovementSpeedModifiers(); - SetStatusEffect(); + SetAlert(); Dirty(); } - private void SetStatusEffect() + private void SetAlert() { - if (!Owner.TryGetComponent(out SharedStatusEffectsComponent status)) + if (!Owner.TryGetComponent(out SharedAlertsComponent status)) { return; } - status.ChangeStatusEffect(StatusEffect.Stun, _stunTexture, + status.ShowAlert(AlertType.Stun, cooldown: (StunStart == null || StunEnd == null) ? default : (StunStart.Value, StunEnd.Value)); StatusRemoveCancellation.Cancel(); StatusRemoveCancellation = new CancellationTokenSource(); @@ -212,8 +213,8 @@ namespace Content.Shared.GameObjects.Components.Mobs serializer.DataField(ref _slowdownCap, "slowdownCap", 20f); serializer.DataField(ref _helpInterval, "helpInterval", 1f); serializer.DataField(ref _helpKnockdownRemove, "helpKnockdownRemove", 1f); - serializer.DataField(ref _stunTexture, "stunTexture", - "/Textures/Objects/Weapons/Melee/stunbaton.rsi/stunbaton_off.png"); + serializer.DataField(ref _stunAlertId, "stunAlertId", + "stun"); } protected virtual void OnInteractHand() { } @@ -230,7 +231,7 @@ namespace Content.Shared.GameObjects.Components.Mobs KnockdownTimer -= _helpKnockdownRemove; - SetStatusEffect(); + SetAlert(); Dirty(); return true; diff --git a/Content.Shared/GameObjects/Components/Movement/SharedPlayerInputMoverComponent.cs b/Content.Shared/GameObjects/Components/Movement/SharedPlayerInputMoverComponent.cs index 14554be489..a1d2d659e8 100644 --- a/Content.Shared/GameObjects/Components/Movement/SharedPlayerInputMoverComponent.cs +++ b/Content.Shared/GameObjects/Components/Movement/SharedPlayerInputMoverComponent.cs @@ -139,7 +139,7 @@ namespace Content.Shared.GameObjects.Components.Movement /// Whether or not the player can move diagonally. /// [ViewVariables] - public bool DiagonalMovementEnabled => _configurationManager.GetCVar("game.diagonalmovement"); + public bool DiagonalMovementEnabled => _configurationManager.GetCVar(CCVars.GameDiagonalMovement); /// public override void OnAdd() diff --git a/Content.Shared/GameObjects/Components/Nutrition/SharedStomachComponent.cs b/Content.Shared/GameObjects/Components/Nutrition/SharedStomachComponent.cs deleted file mode 100644 index 030b1eae50..0000000000 --- a/Content.Shared/GameObjects/Components/Nutrition/SharedStomachComponent.cs +++ /dev/null @@ -1,12 +0,0 @@ -using Robust.Shared.GameObjects; - -namespace Content.Shared.GameObjects.Components.Nutrition -{ - /// - /// Shared class for stomach components - /// - public class SharedStomachComponent : Component - { - public override string Name => "Stomach"; - } -} diff --git a/Content.Shared/GameObjects/Components/PDA/SharedPDAComponent.cs b/Content.Shared/GameObjects/Components/PDA/SharedPDAComponent.cs index c34d57ca9b..ceaabec258 100644 --- a/Content.Shared/GameObjects/Components/PDA/SharedPDAComponent.cs +++ b/Content.Shared/GameObjects/Components/PDA/SharedPDAComponent.cs @@ -30,6 +30,15 @@ namespace Content.Shared.GameObjects.Components.PDA } } + [Serializable, NetSerializable] + public sealed class PDAEjectPenMessage : BoundUserInterfaceMessage + { + public PDAEjectPenMessage() + { + + } + } + [Serializable, NetSerializable] public class PDAUBoundUserInterfaceState : BoundUserInterfaceState { @@ -40,28 +49,27 @@ namespace Content.Shared.GameObjects.Components.PDA public sealed class PDAUpdateState : PDAUBoundUserInterfaceState { public bool FlashlightEnabled; + public bool HasPen; public PDAIdInfoText PDAOwnerInfo; public UplinkAccountData Account; public UplinkListingData[] Listings; - public PDAUpdateState(bool isFlashlightOn, PDAIdInfoText ownerInfo) + public PDAUpdateState(bool isFlashlightOn, bool hasPen, PDAIdInfoText ownerInfo) { FlashlightEnabled = isFlashlightOn; + HasPen = hasPen; PDAOwnerInfo = ownerInfo; } - public PDAUpdateState(bool isFlashlightOn, PDAIdInfoText ownerInfo, UplinkAccountData accountData) + public PDAUpdateState(bool isFlashlightOn, bool hasPen, PDAIdInfoText ownerInfo, UplinkAccountData accountData) + : this(isFlashlightOn, hasPen, ownerInfo) { - FlashlightEnabled = isFlashlightOn; - PDAOwnerInfo = ownerInfo; Account = accountData; } - public PDAUpdateState(bool isFlashlightOn, PDAIdInfoText ownerInfo, UplinkAccountData accountData, UplinkListingData[] listings) + public PDAUpdateState(bool isFlashlightOn, bool hasPen, PDAIdInfoText ownerInfo, UplinkAccountData accountData, UplinkListingData[] listings) + : this(isFlashlightOn, hasPen, ownerInfo, accountData) { - FlashlightEnabled = isFlashlightOn; - PDAOwnerInfo = ownerInfo; - Account = accountData; Listings = listings; } } diff --git a/Content.Shared/GameObjects/Components/Pulling/SharedPullableComponent.cs b/Content.Shared/GameObjects/Components/Pulling/SharedPullableComponent.cs index 5683665358..114a7428e9 100644 --- a/Content.Shared/GameObjects/Components/Pulling/SharedPullableComponent.cs +++ b/Content.Shared/GameObjects/Components/Pulling/SharedPullableComponent.cs @@ -1,12 +1,15 @@ #nullable enable using System; +using Content.Shared.Alert; using Content.Shared.GameObjects.Components.Mobs; +using Content.Shared.GameObjects.EntitySystems; using Content.Shared.Physics; using Content.Shared.Physics.Pull; using Robust.Shared.Containers; using Robust.Shared.GameObjects; using Robust.Shared.GameObjects.ComponentDependencies; using Robust.Shared.GameObjects.Components; +using Robust.Shared.GameObjects.Systems; using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Map; using Robust.Shared.Physics; @@ -19,7 +22,7 @@ namespace Content.Shared.GameObjects.Components.Pulling public override string Name => "Pullable"; public override uint? NetID => ContentNetIDs.PULLABLE; - [ComponentDependency] private IPhysicsComponent? _physics = default!; + [ComponentDependency] private readonly IPhysicsComponent? _physics = default!; private IEntity? _puller; @@ -36,7 +39,7 @@ namespace Content.Shared.GameObjects.Components.Pulling _puller = value; Dirty(); - if (!Owner.TryGetComponent(out IPhysicsComponent? physics)) + if (_physics == null) { return; } @@ -45,7 +48,7 @@ namespace Content.Shared.GameObjects.Components.Pulling if (value == null) { - if (physics.TryGetController(out controller)) + if (_physics.TryGetController(out controller)) { controller.StopPull(); } @@ -53,7 +56,7 @@ namespace Content.Shared.GameObjects.Components.Pulling return; } - controller = physics.EnsureController(); + controller = _physics.EnsureController(); controller.StartPull(value); } } @@ -67,12 +70,12 @@ namespace Content.Shared.GameObjects.Components.Pulling return false; } - if (!puller.TryGetComponent(out IPhysicsComponent? physics)) + if (_physics == null) { return false; } - if (physics.Anchored) + if (_physics.Anchored) { return false; } @@ -145,12 +148,12 @@ namespace Content.Shared.GameObjects.Components.Pulling return false; } - if (!Owner.TryGetComponent(out IPhysicsComponent? physics)) + if (_physics == null) { return false; } - if (!physics.TryGetController(out PullController controller)) + if (!_physics.TryGetController(out PullController controller)) { return false; } @@ -204,29 +207,36 @@ namespace Content.Shared.GameObjects.Components.Pulling private void AddPullingStatuses(IEntity puller) { - if (Owner.TryGetComponent(out SharedStatusEffectsComponent? pulledStatus)) + if (Owner.TryGetComponent(out SharedAlertsComponent? pulledStatus)) { - pulledStatus.ChangeStatusEffectIcon(StatusEffect.Pulled, - "/Textures/Interface/StatusEffects/Pull/pulled.png"); + pulledStatus.ShowAlert(AlertType.Pulled); } - if (puller.TryGetComponent(out SharedStatusEffectsComponent? ownerStatus)) + if (puller.TryGetComponent(out SharedAlertsComponent? ownerStatus)) { - ownerStatus.ChangeStatusEffectIcon(StatusEffect.Pulling, - "/Textures/Interface/StatusEffects/Pull/pulling.png"); + ownerStatus.ShowAlert(AlertType.Pulling, onClickAlert: OnClickAlert); } } + private void OnClickAlert(ClickAlertEventArgs args) + { + EntitySystem + .Get() + .GetPulled(args.Player)? + .GetComponentOrNull()? + .TryStopPull(); + } + private void RemovePullingStatuses(IEntity puller) { - if (Owner.TryGetComponent(out SharedStatusEffectsComponent? pulledStatus)) + if (Owner.TryGetComponent(out SharedAlertsComponent? pulledStatus)) { - pulledStatus.RemoveStatusEffect(StatusEffect.Pulled); + pulledStatus.ClearAlert(AlertType.Pulled); } - if (puller.TryGetComponent(out SharedStatusEffectsComponent? ownerStatus)) + if (puller.TryGetComponent(out SharedAlertsComponent? ownerStatus)) { - ownerStatus.RemoveStatusEffect(StatusEffect.Pulling); + ownerStatus.ClearAlert(AlertType.Pulling); } } diff --git a/Content.Shared/GameObjects/Components/SharedConfigurationComponent.cs b/Content.Shared/GameObjects/Components/SharedConfigurationComponent.cs index 413507d3b3..590f770b62 100644 --- a/Content.Shared/GameObjects/Components/SharedConfigurationComponent.cs +++ b/Content.Shared/GameObjects/Components/SharedConfigurationComponent.cs @@ -13,21 +13,34 @@ namespace Content.Shared.GameObjects.Components [Serializable, NetSerializable] public class ConfigurationBoundUserInterfaceState : BoundUserInterfaceState { - public readonly Dictionary Config; - + public Dictionary Config { get; } + public ConfigurationBoundUserInterfaceState(Dictionary config) { Config = config; } } + /// + /// Message sent to other components on this entity when DeviceNetwork configuration updated. + /// + public class ConfigUpdatedComponentMessage : ComponentMessage + { + public Dictionary Config { get; } + + public ConfigUpdatedComponentMessage(Dictionary config) + { + Config = config; + } + } + /// /// Message data sent from client to server when the device configuration is updated. /// [Serializable, NetSerializable] public class ConfigurationUpdatedMessage : BoundUserInterfaceMessage { - public readonly Dictionary Config; + public Dictionary Config { get; } public ConfigurationUpdatedMessage(Dictionary config) { @@ -38,7 +51,7 @@ namespace Content.Shared.GameObjects.Components [Serializable, NetSerializable] public class ValidationUpdateMessage : BoundUserInterfaceMessage { - public readonly string ValidationString; + public string ValidationString { get; } public ValidationUpdateMessage(string validationString) { diff --git a/Content.Shared/GameObjects/ContentNetIDs.cs b/Content.Shared/GameObjects/ContentNetIDs.cs index 8769dd85d4..a2d20277d0 100644 --- a/Content.Shared/GameObjects/ContentNetIDs.cs +++ b/Content.Shared/GameObjects/ContentNetIDs.cs @@ -29,7 +29,7 @@ public const uint RESEARCH_CONSOLE = 1023; public const uint WIRES = 1024; public const uint COMBATMODE = 1025; - public const uint STATUSEFFECTS = 1026; + public const uint ALERTS = 1026; public const uint OVERLAYEFFECTS = 1027; public const uint STOMACH = 1028; public const uint ITEMCOOLDOWN = 1029; diff --git a/Content.Shared/GameObjects/EntitySystems/MechanismSystem.cs b/Content.Shared/GameObjects/EntitySystems/MechanismSystem.cs new file mode 100644 index 0000000000..d3e9dd0daa --- /dev/null +++ b/Content.Shared/GameObjects/EntitySystems/MechanismSystem.cs @@ -0,0 +1,21 @@ +using Content.Shared.GameObjects.Components.Body.Behavior; +using Content.Shared.GameObjects.Components.Body.Mechanism; +using JetBrains.Annotations; +using Robust.Shared.GameObjects.Systems; + +namespace Content.Shared.GameObjects.EntitySystems +{ + [UsedImplicitly] + public class MechanismSystem : EntitySystem + { + public override void Update(float frameTime) + { + base.Update(frameTime); + + foreach (var mechanism in ComponentManager.EntityQuery()) + { + mechanism.Update(frameTime); + } + } + } +} diff --git a/Content.Shared/GameObjects/EntitySystems/SharedMoverSystem.cs b/Content.Shared/GameObjects/EntitySystems/SharedMoverSystem.cs index c534d53ef4..a1cb02fe6a 100644 --- a/Content.Shared/GameObjects/EntitySystems/SharedMoverSystem.cs +++ b/Content.Shared/GameObjects/EntitySystems/SharedMoverSystem.cs @@ -41,8 +41,6 @@ namespace Content.Shared.GameObjects.EntitySystems .Bind(EngineKeyFunctions.MoveDown, moveDownCmdHandler) .Bind(EngineKeyFunctions.Walk, new WalkInputCmdHandler()) .Register(); - - _configurationManager.RegisterCVar("game.diagonalmovement", true, CVar.ARCHIVE); } /// diff --git a/Content.Tests/Server/GameObjects/Components/Mobs/ServerAlertsComponentTests.cs b/Content.Tests/Server/GameObjects/Components/Mobs/ServerAlertsComponentTests.cs new file mode 100644 index 0000000000..48062b1e62 --- /dev/null +++ b/Content.Tests/Server/GameObjects/Components/Mobs/ServerAlertsComponentTests.cs @@ -0,0 +1,71 @@ +using System.IO; +using System.Linq; +using Content.Server.GameObjects.Components.Mobs; +using Content.Shared.Alert; +using Content.Shared.GameObjects.Components.Mobs; +using Content.Shared.Utility; +using NUnit.Framework; +using Robust.Shared.GameObjects; +using Robust.Shared.Interfaces.GameObjects; +using Robust.Shared.IoC; +using Robust.Shared.Map; +using Robust.Shared.Prototypes; + +namespace Content.Tests.Server.GameObjects.Components.Mobs +{ + [TestFixture] + [TestOf(typeof(ServerAlertsComponent))] + public class ServerAlertsComponentTests : ContentUnitTest + { + const string PROTOTYPES = @" +- type: alert + alertType: LowPressure + category: Pressure + icon: /Textures/Interface/Alerts/Pressure/lowpressure.png + +- type: alert + alertType: HighPressure + category: Pressure + icon: /Textures/Interface/Alerts/Pressure/highpressure.png +"; + + [Test] + public void ShowAlerts() + { + // this is kind of unnecessary because there's integration test coverage of Alert components + // but wanted to keep it anyway to see what's possible w.r.t. testing components + // in a unit test + + var prototypeManager = IoCManager.Resolve(); + prototypeManager.RegisterType(typeof(AlertPrototype)); + var factory = IoCManager.Resolve(); + factory.Register(); + prototypeManager.LoadFromStream(new StringReader(PROTOTYPES)); + prototypeManager.Resync(); + var alertManager = IoCManager.Resolve(); + alertManager.Initialize(); + + + var alertsComponent = new ServerAlertsComponent(); + alertsComponent = IoCManager.InjectDependencies(alertsComponent); + + Assert.That(alertManager.TryGetWithEncoded(AlertType.LowPressure, out var lowpressure, out var lpencoded)); + Assert.That(alertManager.TryGetWithEncoded(AlertType.HighPressure, out var highpressure, out var hpencoded)); + + alertsComponent.ShowAlert(AlertType.LowPressure); + var alertState = alertsComponent.GetComponentState() as AlertsComponentState; + Assert.NotNull(alertState); + Assert.That(alertState.Alerts.Length, Is.EqualTo(1)); + Assert.That(alertState.Alerts[0], Is.EqualTo(new AlertState{AlertEncoded = lpencoded})); + + alertsComponent.ShowAlert(AlertType.HighPressure); + alertState = alertsComponent.GetComponentState() as AlertsComponentState; + Assert.That(alertState.Alerts.Length, Is.EqualTo(1)); + Assert.That(alertState.Alerts[0], Is.EqualTo(new AlertState{AlertEncoded = hpencoded})); + + alertsComponent.ClearAlertCategory(AlertCategory.Pressure); + alertState = alertsComponent.GetComponentState() as AlertsComponentState; + Assert.That(alertState.Alerts.Length, Is.EqualTo(0)); + } + } +} diff --git a/Content.Tests/Shared/Alert/AlertManagerTests.cs b/Content.Tests/Shared/Alert/AlertManagerTests.cs new file mode 100644 index 0000000000..7601b04eb9 --- /dev/null +++ b/Content.Tests/Shared/Alert/AlertManagerTests.cs @@ -0,0 +1,63 @@ +using System.IO; +using Content.Shared.Alert; +using NUnit.Framework; +using Robust.Shared.Interfaces.Log; +using Robust.Shared.IoC; +using Robust.Shared.Log; +using Robust.Shared.Prototypes; +using Robust.Shared.Utility; +using Robust.UnitTesting; +using YamlDotNet.RepresentationModel; + +namespace Content.Tests.Shared.Alert +{ + [TestFixture, TestOf(typeof(AlertManager))] + public class AlertManagerTests : RobustUnitTest + { + const string PROTOTYPES = @" +- type: alert + alertType: LowPressure + icon: /Textures/Interface/Alerts/Pressure/lowpressure.png + +- type: alert + alertType: HighPressure + icon: /Textures/Interface/Alerts/Pressure/highpressure.png +"; + + [Test] + public void TestAlertManager() + { + var prototypeManager = IoCManager.Resolve(); + prototypeManager.RegisterType(typeof(AlertPrototype)); + prototypeManager.LoadFromStream(new StringReader(PROTOTYPES)); + IoCManager.RegisterInstance(new AlertManager()); + var alertManager = IoCManager.Resolve(); + alertManager.Initialize(); + + Assert.That(alertManager.TryGet(AlertType.LowPressure, out var lowPressure)); + Assert.That(lowPressure.IconPath, Is.EqualTo("/Textures/Interface/Alerts/Pressure/lowpressure.png")); + Assert.That(alertManager.TryGet(AlertType.HighPressure, out var highPressure)); + Assert.That(highPressure.IconPath, Is.EqualTo("/Textures/Interface/Alerts/Pressure/highpressure.png")); + + Assert.That(alertManager.TryGetWithEncoded(AlertType.LowPressure, out lowPressure, out var encodedLowPressure)); + Assert.That(lowPressure.IconPath, Is.EqualTo("/Textures/Interface/Alerts/Pressure/lowpressure.png")); + Assert.That(alertManager.TryGetWithEncoded(AlertType.HighPressure, out highPressure, out var encodedHighPressure)); + Assert.That(highPressure.IconPath, Is.EqualTo("/Textures/Interface/Alerts/Pressure/highpressure.png")); + + Assert.That(alertManager.TryEncode(lowPressure, out var encodedLowPressure2)); + Assert.That(encodedLowPressure2, Is.EqualTo(encodedLowPressure)); + Assert.That(alertManager.TryEncode(highPressure, out var encodedHighPressure2)); + Assert.That(encodedHighPressure2, Is.EqualTo(encodedHighPressure)); + Assert.That(encodedLowPressure, Is.Not.EqualTo(encodedHighPressure)); + + Assert.That(alertManager.TryDecode(encodedLowPressure, out var decodedLowPressure)); + Assert.That(decodedLowPressure, Is.EqualTo(lowPressure)); + Assert.That(alertManager.TryDecode(encodedHighPressure, out var decodedHighPressure)); + Assert.That(decodedHighPressure, Is.EqualTo(highPressure)); + + Assert.False(alertManager.TryEncode(AlertType.Debug1, out _)); + Assert.False(alertManager.TryGetWithEncoded(AlertType.Debug1, out _, out _)); + + } + } +} diff --git a/Content.Tests/Shared/Alert/AlertOrderPrototypeTests.cs b/Content.Tests/Shared/Alert/AlertOrderPrototypeTests.cs new file mode 100644 index 0000000000..f67914ef6b --- /dev/null +++ b/Content.Tests/Shared/Alert/AlertOrderPrototypeTests.cs @@ -0,0 +1,96 @@ +using System.Collections.Generic; +using System.IO; +using System.Linq; +using Content.Shared.Alert; +using NUnit.Framework; +using Robust.Shared.IoC; +using Robust.Shared.Prototypes; +using Robust.UnitTesting; + +namespace Content.Tests.Shared.Alert +{ + [TestFixture, TestOf(typeof(AlertOrderPrototype))] + public class AlertOrderPrototypeTests : RobustUnitTest + { + const string PROTOTYPES = @" +- type: alertOrder + order: + - alertType: Handcuffed + - category: Pressure + - category: Hunger + - alertType: Hot + - alertType: Stun + - alertType: LowPressure + - category: Temperature + +- type: alert + category: Pressure + alertType: LowPressure + +- type: alert + category: Hunger + alertType: Overfed + +- type: alert + category: Pressure + alertType: HighPressure + +- type: alert + category: Hunger + alertType: Peckish + +- type: alert + alertType: Stun + +- type: alert + alertType: Handcuffed + +- type: alert + category: Temperature + alertType: Hot + +- type: alert + category: Temperature + alertType: Cold + +- type: alert + alertType: Weightless + +- type: alert + alertType: PilotingShuttle +"; + + [Test] + public void TestAlertOrderPrototype() + { + var prototypeManager = IoCManager.Resolve(); + prototypeManager.RegisterType(typeof(AlertPrototype)); + prototypeManager.RegisterType(typeof(AlertOrderPrototype)); + prototypeManager.LoadFromStream(new StringReader(PROTOTYPES)); + + var alertOrder = prototypeManager.EnumeratePrototypes().FirstOrDefault(); + + var alerts = prototypeManager.EnumeratePrototypes(); + + // ensure they sort according to our expected criteria + var expectedOrder = new List(); + expectedOrder.Add(AlertType.Handcuffed); + expectedOrder.Add(AlertType.HighPressure); + // stuff with only category + same category ordered by enum value + expectedOrder.Add(AlertType.Overfed); + expectedOrder.Add(AlertType.Peckish); + expectedOrder.Add(AlertType.Hot); + expectedOrder.Add(AlertType.Stun); + expectedOrder.Add(AlertType.LowPressure); + expectedOrder.Add(AlertType.Cold); + // stuff at end of list ordered by enum value + expectedOrder.Add(AlertType.Weightless); + expectedOrder.Add(AlertType.PilotingShuttle); + + var actual = alerts.ToList(); + actual.Sort(alertOrder); + + Assert.That(actual.Select(a => a.AlertType).ToList(), Is.EqualTo(expectedOrder)); + } + } +} diff --git a/Content.Tests/Shared/Alert/AlertPrototypeTests.cs b/Content.Tests/Shared/Alert/AlertPrototypeTests.cs new file mode 100644 index 0000000000..d4104a568f --- /dev/null +++ b/Content.Tests/Shared/Alert/AlertPrototypeTests.cs @@ -0,0 +1,62 @@ +using System.IO; +using Content.Shared.Alert; +using NUnit.Framework; +using Robust.Shared.Interfaces.Log; +using Robust.Shared.IoC; +using Robust.Shared.Log; +using Robust.Shared.Utility; +using Robust.UnitTesting; +using YamlDotNet.RepresentationModel; + +namespace Content.Tests.Shared.Alert +{ + [TestFixture, TestOf(typeof(AlertPrototype))] + public class AlertPrototypeTests : RobustUnitTest + { + private const string PROTOTYPE = @"- type: alert + alertType: HumanHealth + category: Health + icon: /Textures/Interface/Alerts/Human/human.rsi/human.png + name: Health + description: ""[color=green]Green[/color] good. [color=red]Red[/color] bad."" + minSeverity: 0 + maxSeverity: 6"; + + + [Test] + public void TestAlertKey() + { + Assert.That(new AlertKey(AlertType.HumanHealth, null), Is.Not.EqualTo(AlertKey.ForCategory(AlertCategory.Health))); + Assert.That((new AlertKey(null, AlertCategory.Health)), Is.EqualTo(AlertKey.ForCategory(AlertCategory.Health))); + Assert.That((new AlertKey(AlertType.Buckled, AlertCategory.Health)), Is.EqualTo(AlertKey.ForCategory(AlertCategory.Health))); + } + + + [TestCase(0, "/Textures/Interface/Alerts/Human/human.rsi/human0.png")] + [TestCase(null, "/Textures/Interface/Alerts/Human/human.rsi/human0.png")] + [TestCase(1, "/Textures/Interface/Alerts/Human/human.rsi/human1.png")] + [TestCase(6, "/Textures/Interface/Alerts/Human/human.rsi/human6.png")] + [TestCase(7, "/Textures/Interface/Alerts/Human/human.rsi/human6.png")] + public void GetsIconPath(short? severity, string expected) + { + + var alert = GetTestPrototype(); + Assert.That(alert.GetIconPath(severity), Is.EqualTo(expected)); + } + + private AlertPrototype GetTestPrototype() + { + using (TextReader stream = new StringReader(PROTOTYPE)) + { + var yamlStream = new YamlStream(); + yamlStream.Load(stream); + var document = yamlStream.Documents[0]; + var rootNode = (YamlSequenceNode) document.RootNode; + var proto = (YamlMappingNode) rootNode[0]; + var newReagent = new AlertPrototype(); + newReagent.LoadFrom(proto); + return newReagent; + } + } + } +} diff --git a/Resources/Maps/saltern.yml b/Resources/Maps/saltern.yml index b4b93a9b6d..26b7021323 100644 --- a/Resources/Maps/saltern.yml +++ b/Resources/Maps/saltern.yml @@ -1325,7 +1325,7 @@ entities: - deadThreshold: 100 type: Destructible - uid: 156 - type: AirlockMaintCargo + type: AirlockMaint components: - parent: 855 pos: -24.5,-12.5 @@ -1676,8 +1676,7 @@ entities: pos: -17.5,-22.5 rot: 3.141592653589793 rad type: Transform - - entryDelay: 0 - type: DisposalUnit + - type: DisposalUnit - deadThreshold: 100 type: Destructible - containers: @@ -1775,8 +1774,7 @@ entities: pos: -29.5,11.5 rot: -1.5707963267948966 rad type: Transform - - entryDelay: 0 - type: DisposalUnit + - type: DisposalUnit - deadThreshold: 100 type: Destructible - containers: @@ -1900,8 +1898,7 @@ entities: pos: -5.5,17.5 rot: -1.5707963267948966 rad type: Transform - - entryDelay: 0 - type: DisposalUnit + - type: DisposalUnit - deadThreshold: 100 type: Destructible - containers: @@ -1967,8 +1964,7 @@ entities: pos: 6.5,11.5 rot: 3.141592653589793 rad type: Transform - - entryDelay: 0 - type: DisposalUnit + - type: DisposalUnit - deadThreshold: 100 type: Destructible - containers: @@ -2047,8 +2043,7 @@ entities: pos: 24.5,8.5 rot: -1.5707963267948966 rad type: Transform - - entryDelay: 0 - type: DisposalUnit + - type: DisposalUnit - deadThreshold: 100 type: Destructible - containers: @@ -2221,8 +2216,7 @@ entities: pos: 34.5,-4.5 rot: 3.141592653589793 rad type: Transform - - entryDelay: 0 - type: DisposalUnit + - type: DisposalUnit - deadThreshold: 100 type: Destructible - containers: @@ -2379,8 +2373,7 @@ entities: pos: 37.5,6.5 rot: -1.5707963267948966 rad type: Transform - - entryDelay: 0 - type: DisposalUnit + - type: DisposalUnit - deadThreshold: 100 type: Destructible - containers: @@ -2798,8 +2791,7 @@ entities: pos: -2.5,29.5 rot: 3.141592653589793 rad type: Transform - - entryDelay: 0 - type: DisposalUnit + - type: DisposalUnit - deadThreshold: 100 type: Destructible - containers: @@ -3111,8 +3103,7 @@ entities: pos: 11.5,-11.5 rot: 3.141592653589793 rad type: Transform - - entryDelay: 0 - type: DisposalUnit + - type: DisposalUnit - deadThreshold: 100 type: Destructible - containers: @@ -3190,8 +3181,7 @@ entities: pos: 12.5,-2.5 rot: 3.141592653589793 rad type: Transform - - entryDelay: 0 - type: DisposalUnit + - type: DisposalUnit - deadThreshold: 100 type: Destructible - containers: @@ -3608,8 +3598,7 @@ entities: pos: 0.5,1.5 rot: -1.5707963267948966 rad type: Transform - - entryDelay: 0 - type: DisposalUnit + - type: DisposalUnit - deadThreshold: 100 type: Destructible - containers: @@ -3971,8 +3960,7 @@ entities: pos: -12.5,1.5 rot: -1.5707963267948966 rad type: Transform - - entryDelay: 0 - type: DisposalUnit + - type: DisposalUnit - deadThreshold: 100 type: Destructible - containers: @@ -4103,8 +4091,7 @@ entities: pos: -22.5,6.5 rot: 3.141592653589793 rad type: Transform - - entryDelay: 0 - type: DisposalUnit + - type: DisposalUnit - deadThreshold: 100 type: Destructible - containers: @@ -4469,8 +4456,7 @@ entities: pos: -27.5,-8.5 rot: 1.5707963267948966 rad type: Transform - - entryDelay: 0 - type: DisposalUnit + - type: DisposalUnit - deadThreshold: 100 type: Destructible - containers: @@ -4523,8 +4509,7 @@ entities: pos: -10.5,-17.5 rot: -1.5707963267948966 rad type: Transform - - entryDelay: 0 - type: DisposalUnit + - type: DisposalUnit - deadThreshold: 100 type: Destructible - containers: @@ -4532,7 +4517,7 @@ entities: type: Robust.Server.GameObjects.Components.Container.Container type: ContainerContainer - uid: 407 - type: AirlockMaintCommon + type: AirlockMaint components: - parent: 855 pos: -24.5,-12.5 @@ -8298,8 +8283,7 @@ entities: pos: -5.5,-14.5 rot: -1.5707963267948966 rad type: Transform - - entryDelay: 0 - type: DisposalUnit + - type: DisposalUnit - deadThreshold: 100 type: Destructible - containers: @@ -21437,8 +21421,7 @@ entities: - parent: 855 pos: 18.5,-0.5 type: Transform - - entryDelay: 0 - type: DisposalUnit + - type: DisposalUnit - deadThreshold: 100 type: Destructible - containers: @@ -46793,7 +46776,7 @@ entities: rot: -1.5707963267948966 rad type: Transform - uid: 4088 - type: AirlockMaintCommon + type: AirlockMaint components: - parent: 855 pos: -8.5,-6.5 @@ -46947,7 +46930,7 @@ entities: rot: -1.5707963267948966 rad type: Transform - uid: 4110 - type: AirlockMaintCommon + type: AirlockMaint components: - parent: 855 pos: -31.5,-7.5 diff --git a/Resources/Prototypes/Alerts/alerts.yml b/Resources/Prototypes/Alerts/alerts.yml new file mode 100644 index 0000000000..52e0d5a655 --- /dev/null +++ b/Resources/Prototypes/Alerts/alerts.yml @@ -0,0 +1,205 @@ +- type: alertOrder + # Defines ordering in alert tab, higher up = higher in tab. + # List below can contain alert type or category, if both are present the id will take precedence. + # If item is not in list it will go at the bottom (ties broken by alert type enum value) + order: + - category: Health + - alertType: Fire + - alertType: Handcuffed + - category: Buckled + - alertType: Pulling + - category: Piloting + - alertType: Stun + - category: Pressure + - category: Temperature + - category: Hunger + - category: Thirst + + + +- type: alert + alertType: LowPressure + category: Pressure + icon: /Textures/Interface/Alerts/Pressure/lowpressure.png + maxSeverity: 2 + name: "[color=red]Low Pressure[/color]" + description: "The air around you is [color=red]hazardously thin[/color]. A [color=green]space suit[/color] would protect you." + +- type: alert + alertType: HighPressure + category: Pressure + icon: /Textures/Interface/Alerts/Pressure/highpressure.png + maxSeverity: 2 + name: "[color=red]High Pressure[/color]" + description: "The air around you is [color=red]hazardously thick[/color]. A [color=green]fire suit[/color] would protect you." + +- type: alert + alertType: Fire + icon: /Textures/Interface/Alerts/Fire/fire.png + name: "[color=red]On Fire[/color]" + description: "You're [color=red]on fire[/color]. Click the alert to stop, drop and roll to put the fire out or move to a vacuum area." + +- type: alert + alertType: Cold + category: Temperature + icon: /Textures/Interface/Alerts/Temperature/cold.png + maxSeverity: 3 + name: "[color=cyan]Too Cold[/color]" + description: "You're [color=cyan]freezing cold![/color] Get somewhere warmer and take off any insulating clothing like a space suit." + +- type: alert + alertType: Hot + category: Temperature + icon: /Textures/Interface/Alerts/Temperature/hot.png + maxSeverity: 3 + name: "[color=red]Too Hot[/color]" + description: "It's [color=red]too hot![/color] Flee to space or at least away from the flames. Standing on weeds will heal you." + +- type: alert + alertType: Weightless + icon: /Textures/Interface/Alerts/Weightless/weightless.png + name: Weightless + description: >- + Gravity has ceased affecting you, and you're floating around aimlessly. You'll need something large and heavy, like a + wall or lattice, to push yourself off if you want to move. A jetpack would enable free range of motion. A pair of + magboots would let you walk around normally on the floor. Barring those, you can throw things, use a fire extinguisher, + or shoot a gun to move around via Newton's 3rd Law of Motion. + +- type: alert + alertType: Stun + icon: /Textures/Objects/Weapons/Melee/stunbaton.rsi/stunbaton_off.png + name: "[color=yellow]Stunned[/color]" + description: "You're [color=yellow]stunned[/color]! Wait for it to wear off." + +- type: alert + alertType: Handcuffed + icon: /Textures/Interface/Alerts/Handcuffed/Handcuffed.png + name: "[color=yellow]Handcuffed[/color]" + description: "You're [color=yellow]handcuffed[/color] and can't act. If anyone drags you, you won't be able to move.." + +- type: alert + alertType: Buckled + category: Buckled + icon: /Textures/Interface/Alerts/Buckle/buckled.png + name: "[color=yellow]Buckled[/color]" + description: "You've been [color=yellow]buckled[/color] to something. Click the alert to unbuckle unless you're [color=yellow]handcuffed.[/color]" + +- type: alert + alertType: HumanCrit + category: Health + icon: /Textures/Interface/Alerts/Human/humancrit-0.png + name: "[color=red]Critical Condition[/color]" + description: "You're severely injured and unconscious." + +- type: alert + alertType: HumanDead + category: Health + icon: /Textures/Interface/Alerts/Human/humandead.png + name: Dead + description: You're dead. + +- type: alert + alertType: HumanHealth + category: Health + icon: /Textures/Interface/Alerts/Human/human.png + name: Health + description: "[color=green]Green[/color] good. [color=red]Red[/color] bad." + minSeverity: 0 + maxSeverity: 6 + +- type: alert + alertType: PilotingShuttle + category: Piloting + icon: /Textures/Interface/Alerts/Buckle/buckled.png + name: Piloting Shuttle + description: You are piloting a shuttle. Click the alert to stop. + +- type: alert + alertType: Overfed + category: Hunger + icon: /Textures/Interface/Alerts/Hunger/Overfed.png + name: "[color=yellow]Overfed[/color]" + description: You ate too much food, lardass. Run around the station and lose some weight. + +- type: alert + alertType: Peckish + category: Hunger + icon: /Textures/Interface/Alerts/Hunger/Peckish.png + name: "[color=yellow]Peckish[/color]" + description: Some food would be good right about now. + +- type: alert + alertType: Starving + category: Hunger + icon: /Textures/Interface/Alerts/Hunger/Starving.png + name: "[color=red]Starving[/color]" + description: You're severely malnourished. The hunger pains make moving around a chore. + +- type: alert + alertType: Overhydrated + category: Thirst + icon: /Textures/Interface/Alerts/Thirst/OverHydrated.png + name: "[color=yellow]Overhydrated[/color]" + description: You drank too much. + +- type: alert + alertType: Thirsty + category: Thirst + icon: /Textures/Interface/Alerts/Thirst/Thirsty.png + name: "[color=yellow]Thirsty[/color]" + description: Something to drink would be good right about now. + +- type: alert + alertType: Parched + category: Thirst + icon: /Textures/Interface/Alerts/Thirst/Parched.png + name: "[color=red]Parched[/color]" + description: You're severely thirsty. The thirst makes moving around a chore. + +- type: alert + alertType: Pulled + icon: /Textures/Interface/Alerts/Pull/pulled.png + name: Pulled + description: You're being pulled. Move to break free. + +- type: alert + alertType: Pulling + icon: /Textures/Interface/Alerts/Pull/pulling.png + name: Pulling + description: You're pulling something. Click the alert to stop. + +- type: alert + alertType: Debug1 + icon: /Textures/Interface/Alerts/Human/human1.png + name: Debug + description: Debug + +- type: alert + alertType: Debug2 + icon: /Textures/Interface/Alerts/Human/human2.png + name: Debug + description: Debug + +- type: alert + alertType: Debug3 + icon: /Textures/Interface/Alerts/Human/human3.png + name: Debug + description: Debug + +- type: alert + alertType: Debug4 + icon: /Textures/Interface/Alerts/Human/human4.png + name: Debug + description: Debug + +- type: alert + alertType: Debug5 + icon: /Textures/Interface/Alerts/Human/human5.png + name: Debug + description: Debug + +- type: alert + alertType: Debug6 + icon: /Textures/Interface/Alerts/Human/human6.png + name: Debug + description: Debug diff --git a/Resources/Prototypes/Body/Mechanisms/basic_human_organs.yml b/Resources/Prototypes/Body/Mechanisms/basic_human_organs.yml index e85f15d2f1..c4a85d1a40 100644 --- a/Resources/Prototypes/Body/Mechanisms/basic_human_organs.yml +++ b/Resources/Prototypes/Body/Mechanisms/basic_human_organs.yml @@ -11,7 +11,8 @@ durability: 10 size: 1 compatibility: Biological - - type: Brain + behaviors: + - !type:BrainBehavior {} - type: entity id: EyesHuman @@ -40,7 +41,8 @@ durability: 10 size: 1 compatibility: Biological - - type: Heart + behaviors: + - !type:HeartBehavior {} - type: entity id: LungsHuman @@ -55,7 +57,8 @@ durability: 13 size: 1 compatibility: Biological - - type: Lung + behaviors: + - !type:LungBehavior {} - type: entity id: StomachHuman @@ -70,7 +73,10 @@ durability: 13 size: 1 compatibility: Biological - - type: Stomach + behaviors: + - !type:StomachBehavior + max_volume: 250 + digestionDelay: 20 - type: entity id: LiverHuman diff --git a/Resources/Prototypes/Catalog/Fills/belt.yml b/Resources/Prototypes/Catalog/Fills/belt.yml deleted file mode 100644 index 12f5fc37db..0000000000 --- a/Resources/Prototypes/Catalog/Fills/belt.yml +++ /dev/null @@ -1,25 +0,0 @@ -- type: entity - id: UtilityBeltClothingFilled - parent: UtilityBeltClothing - suffix: Filled - components: - - type: StorageFill - contents: - - name: Crowbar - - name: Wrench - - name: Screwdriver - - name: Wirecutter - - name: Welder - - name: Multitool - - name: ApcExtensionCableStack - -- type: entity - id: UtilityBeltClothingFilledEvent - parent: UtilityBeltClothing - suffix: Filled - components: - - type: StorageFill - contents: - - name: Crowbar - - name: Screwdriver - - name: Multitool diff --git a/Resources/Prototypes/Entities/Clothing/Belt/belts.yml b/Resources/Prototypes/Entities/Clothing/Belt/belts.yml index f7f4cbd9e1..201ed2fe0e 100644 --- a/Resources/Prototypes/Entities/Clothing/Belt/belts.yml +++ b/Resources/Prototypes/Entities/Clothing/Belt/belts.yml @@ -1,30 +1,162 @@ +# BASE - type: entity parent: Clothing - id: BeltBase + id: ClothingBeltBase abstract: true components: + - type: Sprite + state: icon - type: Clothing Slots: [belt] - -- type: entity - parent: BeltBase - id: UtilityBeltClothing - name: utility belt - description: Belt for holding all your usual tools - components: - - type: Sprite - sprite: Clothing/Belt/belt_utility.rsi - state: utilitybelt - - type: Clothing size: 50 QuickEquip: false - sprite: Clothing/Belt/belt_utility.rsi + +# CONTENT +- type: entity + parent: ClothingBeltBase + id: ClothingBeltAssault + name: assault belt + description: "A tactical assault belt." + components: + - type: Sprite + sprite: Clothing/Belt/assault.rsi + - type: Clothing + sprite: Clothing/Belt/assault.rsi - type: Storage - capacity: 40 # Full tool loadout is 35, plus an extra + capacity: 40 - type: entity - parent: BeltBase - id: SuspendersClothing + parent: ClothingBeltBase + id: ClothingBeltBandolier + name: assault belt + description: "A bandolier for holding shotgun ammunition." + components: + - type: Sprite + sprite: Clothing/Belt/bandolier.rsi + - type: Clothing + sprite: Clothing/Belt/bandolier.rsi + - type: Storage + capacity: 40 + +- type: entity + parent: ClothingBeltBase + id: ClothingBeltChiefEngineer + name: the Chief Engineer's toolbelt + description: "Holds tools, looks snazzy." + components: + - type: Sprite + sprite: Clothing/Belt/ce.rsi + - type: Clothing + sprite: Clothing/Belt/ce.rsi + - type: Storage + capacity: 60 + +- type: entity + parent: ClothingBeltBase + id: ClothingBeltChampion + name: championship belt + description: "Proves to the world that you are the strongest!" + components: + - type: Sprite + sprite: Clothing/Belt/champion.rsi + - type: Clothing + sprite: Clothing/Belt/champion.rsi + +- type: entity + parent: ClothingBeltBase + id: ClothingBeltHolster + name: shoulder holster + description: "A holster to carry a handgun and ammo. WARNING: Badasses only." + components: + - type: Sprite + sprite: Clothing/Belt/holster.rsi + - type: Clothing + sprite: Clothing/Belt/holster.rsi + - type: Storage + capacity: 20 + +- type: entity + parent: ClothingBeltBase + id: ClothingBeltJanitor + name: janibelt + description: "A belt used to hold most janitorial supplies." + components: + - type: Sprite + sprite: Clothing/Belt/janitor.rsi + - type: Clothing + sprite: Clothing/Belt/janitor.rsi + - type: Storage + capacity: 40 + +- type: entity + parent: ClothingBeltBase + id: ClothingBeltMedical + name: medical belt + description: "Can hold various medical equipment." + components: + - type: Sprite + sprite: Clothing/Belt/medical.rsi + - type: Clothing + sprite: Clothing/Belt/medical.rsi + - type: Storage + capacity: 40 + +- type: entity + parent: ClothingBeltBase + id: ClothingBeltSecurity + name: security belt + description: "Can hold security gear like handcuffs and flashes." + components: + - type: Sprite + sprite: Clothing/Belt/security.rsi + - type: Clothing + sprite: Clothing/Belt/security.rsi + - type: Storage + capacity: 40 + +- type: entity + parent: ClothingBeltBase + id: ClothingBeltSecurityWebbing + name: security webbing + description: "Unique and versatile chest rig, can hold security gear." + components: + - type: Sprite + sprite: Clothing/Belt/securitywebbing.rsi + - type: Clothing + sprite: Clothing/Belt/securitywebbing.rsi + - type: Storage + capacity: 40 + +- type: entity + parent: ClothingBeltBase + id: ClothingBeltMilitaryWebbing + name: chest rig + description: "A set of tactical webbing worn by Syndicate boarding parties." + components: + - type: Sprite + sprite: Clothing/Belt/militarywebbing.rsi + - type: Clothing + sprite: Clothing/Belt/militarywebbing.rsi + - type: Storage + capacity: 40 + +- type: entity + parent: ClothingBeltBase + id: ClothingBeltSheath + name: sabre sheath + description: "An ornate sheath designed to hold an officer's blade." + components: + - type: Sprite + sprite: Clothing/Belt/sheath.rsi + state: sheath + - type: Clothing + sprite: Clothing/Belt/sheath.rsi + - type: Storage + capacity: 40 + +- type: entity + parent: ClothingBeltBase + id: ClothingBeltSuspenders name: suspenders description: For holding your pants up. components: @@ -32,6 +164,17 @@ sprite: Clothing/Belt/suspenders.rsi state: icon - type: Clothing - size: 50 - QuickEquip: false sprite: Clothing/Belt/suspenders.rsi + +- type: entity + parent: ClothingBeltBase + id: UtilityBeltClothing #Change to ClothingBeltUtility + name: utility belt + description: "Can hold various things." + components: + - type: Sprite + sprite: Clothing/Belt/utility.rsi + - type: Clothing + sprite: Clothing/Belt/utility.rsi + - type: Storage + capacity: 40 # Full tool loadout is 35, plus an extra diff --git a/Resources/Prototypes/Entities/Clothing/Belt/filled_belts.yml b/Resources/Prototypes/Entities/Clothing/Belt/filled_belts.yml new file mode 100644 index 0000000000..4959eac56f --- /dev/null +++ b/Resources/Prototypes/Entities/Clothing/Belt/filled_belts.yml @@ -0,0 +1,65 @@ +- type: entity + id: UtilityBeltClothingFilled #Change to ClothingBeltUtilityFilled + parent: UtilityBeltClothing #Change to ClothingBeltUtility + description: "Holds tools." + suffix: Filled + components: + - type: StorageFill + contents: + - name: Crowbar + - name: Wrench + - name: Screwdriver + - name: Wirecutter + - name: Welder + - name: Multitool + +- type: entity + id: UtilityBeltClothingFilledEvent + parent: UtilityBeltClothing + suffix: Filled + components: + - type: StorageFill + contents: + - name: Crowbar + - name: Screwdriver + - name: Multitool + +- type: entity + id: ClothingBeltChiefEngineerFilled + parent: ClothingBeltChiefEngineer + suffix: Filled + components: + - type: StorageFill + contents: + - name: PowerDrill + - name: JawsOfLife + - name: WelderExperimental + - name: Multitool + - name: ApcExtensionCableStack + +- type: entity + id: ClothingBeltSecurityFilled + parent: ClothingBeltSecurity + suffix: Filled + components: + - type: StorageFill + contents: + - name: SecGlasses + - name: GrenadeFlashBang + - name: GrenadeFlashBang + - name: Stunbaton + - name: Handcuffs + - name: Handcuffs + +- type: entity + id: ClothingBeltJanitorFilled + parent: ClothingBeltJanitor + suffix: Filled + components: + - type: StorageFill + contents: + - name: Soap #Make a soap group and pick between when i'm not lazy + - name: SprayBottleSpaceCleaner + - name: # GrenadeChem + - name: # GrenadeChem + - name: FlashlightLantern diff --git a/Resources/Prototypes/Entities/Clothing/Uniforms/color.yml b/Resources/Prototypes/Entities/Clothing/Uniforms/color.yml index 152f013169..d496a33015 100644 --- a/Resources/Prototypes/Entities/Clothing/Uniforms/color.yml +++ b/Resources/Prototypes/Entities/Clothing/Uniforms/color.yml @@ -460,3 +460,16 @@ ClothingPrefix: maroon_skirt femaleMask: UniformTop HeldPrefix: maroon + +# Rainbow +- type: entity + parent: UniformColorBase + id: UniformColorRainbow + name: rainbow jumpsuit + description: A multi-colored jumpsuit! + components: + - type: Sprite + sprite: Clothing/Uniforms/rainbow.rsi + state: icon + - type: Clothing + sprite: Clothing/Uniforms/rainbow.rsi diff --git a/Resources/Prototypes/Entities/Constructible/Doors/airlock_access.yml b/Resources/Prototypes/Entities/Constructible/Doors/airlock_access.yml index 471b8ae38a..d477478015 100644 --- a/Resources/Prototypes/Entities/Constructible/Doors/airlock_access.yml +++ b/Resources/Prototypes/Entities/Constructible/Doors/airlock_access.yml @@ -154,7 +154,7 @@ access: [["Maintenance"]] - type: entity - parent: AirlockMaintCargo + parent: AirlockMaint id: AirlockMaintCargoLocked suffix: Cargo, Locked components: @@ -162,7 +162,7 @@ access: [["Cargo"]] - type: entity - parent: AirlockMaintCommand + parent: AirlockMaint id: AirlockMaintCommandLocked suffix: Command, Locked components: @@ -170,7 +170,7 @@ access: [["Command"]] - type: entity - parent: AirlockMaintCommon + parent: AirlockMaint id: AirlockMaintCommonLocked suffix: Common, Locked components: @@ -178,7 +178,7 @@ access: [["Maintenance"]] - type: entity - parent: AirlockMaintEngi + parent: AirlockMaint id: AirlockMaintEngiLocked suffix: Engineering, Locked components: @@ -186,7 +186,7 @@ access: [["Engineering"]] - type: entity - parent: AirlockMaintInt + parent: AirlockMaint id: AirlockMaintIntLocked suffix: Interior, Locked components: @@ -194,7 +194,7 @@ access: [["Maintenance"]] - type: entity - parent: AirlockMaintMed + parent: AirlockMaint id: AirlockMaintMedLocked suffix: Medical, Locked components: @@ -202,7 +202,7 @@ access: [["Medical"]] - type: entity - parent: AirlockMaintRnD + parent: AirlockMaint id: AirlockMaintRnDLocked suffix: RnD, Locked components: @@ -210,7 +210,7 @@ access: [["Research"]] - type: entity - parent: AirlockMaintSec + parent: AirlockMaint id: AirlockMaintSecLocked suffix: Security, Locked components: diff --git a/Resources/Prototypes/Entities/Constructible/Doors/airlock_base.yml b/Resources/Prototypes/Entities/Constructible/Doors/airlock_base.yml index 6630242b3d..a2a5e423b2 100644 --- a/Resources/Prototypes/Entities/Constructible/Doors/airlock_base.yml +++ b/Resources/Prototypes/Entities/Constructible/Doors/airlock_base.yml @@ -74,7 +74,6 @@ - type: Sprite sprite: Constructible/Structures/Doors/airlock_glass.rsi - - type: entity parent: Airlock id: AirlockMaint diff --git a/Resources/Prototypes/Entities/Constructible/Doors/airlock_types.yml b/Resources/Prototypes/Entities/Constructible/Doors/airlock_types.yml index d82f1da00b..af5abe905c 100644 --- a/Resources/Prototypes/Entities/Constructible/Doors/airlock_types.yml +++ b/Resources/Prototypes/Entities/Constructible/Doors/airlock_types.yml @@ -118,68 +118,3 @@ components: - type: Sprite sprite: Constructible/Structures/Doors/airlock_security_glass.rsi - -# Maintenance Hatchs -- type: entity - parent: AirlockMaint - id: AirlockMaintCargo - suffix: Cargo - components: - - type: Sprite - sprite: Constructible/Structures/Doors/airlock_maint_cargo.rsi - -- type: entity - parent: AirlockMaint - id: AirlockMaintCommand - suffix: Command - components: - - type: Sprite - sprite: Constructible/Structures/Doors/airlock_maint_command.rsi - -- type: entity - parent: AirlockMaint - id: AirlockMaintCommon - suffix: Common - components: - - type: Sprite - sprite: Constructible/Structures/Doors/airlock_maint_common.rsi - -- type: entity - parent: AirlockMaint - id: AirlockMaintEngi - suffix: Engineering - components: - - type: Sprite - sprite: Constructible/Structures/Doors/airlock_maint_engi.rsi - -- type: entity - parent: AirlockMaint - id: AirlockMaintInt - suffix: Interior - components: - - type: Sprite - sprite: Constructible/Structures/Doors/airlock_maint_int.rsi - -- type: entity - parent: AirlockMaint - id: AirlockMaintMed - suffix: Medical - components: - - type: Sprite - sprite: Constructible/Structures/Doors/airlock_maint_med.rsi - -- type: entity - parent: AirlockMaint - id: AirlockMaintRnD - suffix: RnD - components: - - type: Sprite - sprite: Constructible/Structures/Doors/airlock_maint_rnd.rsi - -- type: entity - parent: AirlockMaint - id: AirlockMaintSec - suffix: Security - components: - - type: Sprite - sprite: Constructible/Structures/Doors/airlock_maint_sec.rsi diff --git a/Resources/Prototypes/Entities/Constructible/Doors/firelock.yml b/Resources/Prototypes/Entities/Constructible/Doors/firelock.yml index 58b0c499ee..3da88aa3f5 100644 --- a/Resources/Prototypes/Entities/Constructible/Doors/firelock.yml +++ b/Resources/Prototypes/Entities/Constructible/Doors/firelock.yml @@ -24,6 +24,7 @@ map: ["enum.WiresVisualLayers.MaintenancePanel"] - type: Physics + on: false shapes: - !type:PhysShapeAabb bounds: "-0.49,-0.49,0.49,0.49" # don't want this colliding with walls or they won't close @@ -54,6 +55,7 @@ - type: Airtight fixVacuum: true - type: Occluder + enabled: false - type: SnapGrid offset: Center placement: @@ -80,8 +82,6 @@ - type: Firelock occludes: false canCrush: false - - type: Occluder - enabled: false - type: Sprite sprite: Constructible/Structures/Doors/edge_door_hazard.rsi - type: Airtight diff --git a/Resources/Prototypes/Entities/Constructible/Furniture/seats.yml b/Resources/Prototypes/Entities/Constructible/Furniture/seats.yml index d66cf66bd4..5179d2cce2 100644 --- a/Resources/Prototypes/Entities/Constructible/Furniture/seats.yml +++ b/Resources/Prototypes/Entities/Constructible/Furniture/seats.yml @@ -83,6 +83,7 @@ parent: SeatBase components: - type: Rotatable + rotateWhileAnchored: true - type: Sprite state: officechair_white - type: Physics diff --git a/Resources/Prototypes/Entities/Constructible/Power/vending_machines.yml b/Resources/Prototypes/Entities/Constructible/Power/vending_machines.yml index 590f0b0923..5f4ccee31f 100644 --- a/Resources/Prototypes/Entities/Constructible/Power/vending_machines.yml +++ b/Resources/Prototypes/Entities/Constructible/Power/vending_machines.yml @@ -68,6 +68,8 @@ normalUnshaded: true broken: true - type: WiresVisualizer + - type: AccessReader + access: [["Bar"]] - type: entity parent: VendingMachine @@ -227,6 +229,8 @@ ejectUnshaded: true broken: true - type: WiresVisualizer + - type: AccessReader + access: [["Kitchen"]] - type: entity parent: VendingMachine @@ -277,6 +281,8 @@ denyUnshaded: true broken: true - type: WiresVisualizer + - type: AccessReader + access: [["Engineering"]] - type: entity parent: VendingMachine @@ -352,6 +358,8 @@ denyUnshaded: true broken: true - type: WiresVisualizer + - type: AccessReader + access: [["Medical"]] - type: entity parent: VendingMachine @@ -403,6 +411,8 @@ denyUnshaded: true broken: true - type: WiresVisualizer + - type: AccessReader + access: [["Hydroponics"]] - type: entity parent: VendingMachine @@ -428,6 +438,8 @@ denyUnshaded: true broken: true - type: WiresVisualizer + - type: AccessReader + access: [["Research"]] - type: entity parent: VendingMachine @@ -479,6 +491,8 @@ denyUnshaded: true broken: true - type: WiresVisualizer + - type: AccessReader + access: [["Security"]] - type: entity parent: VendingMachine @@ -505,6 +519,8 @@ ejectUnshaded: true broken: true - type: WiresVisualizer + - type: AccessReader + access: [["Hydroponics"]] - type: entity parent: VendingMachine @@ -749,6 +765,8 @@ denyUnshaded: true broken: true - type: WiresVisualizer + - type: AccessReader + access: [["Medical"]] - type: entity parent: VendingMachine diff --git a/Resources/Prototypes/Entities/Constructible/Walls/linking.yml b/Resources/Prototypes/Entities/Constructible/Walls/linking.yml index 3482f6d3eb..c853655bfe 100644 --- a/Resources/Prototypes/Entities/Constructible/Walls/linking.yml +++ b/Resources/Prototypes/Entities/Constructible/Walls/linking.yml @@ -6,9 +6,10 @@ - type: InteractionOutline - type: Physics - type: Sprite - sprite: Constructible/Linking/switch.rsi + sprite: Constructible/Power/switch.rsi state: on - type: SignalSwitch + - type: Rotatable - type: SignalTransmitter placement: snap: @@ -22,9 +23,10 @@ - type: InteractionOutline - type: Physics - type: Sprite - sprite: Constructible/Linking/switch.rsi + sprite: Constructible/Power/switch.rsi state: dead - type: SignalButton + - type: Rotatable - type: SignalTransmitter placement: snap: diff --git a/Resources/Prototypes/Entities/Mobs/Player/human.yml b/Resources/Prototypes/Entities/Mobs/Player/human.yml index 7a5ddd085c..f6a5733558 100644 --- a/Resources/Prototypes/Entities/Mobs/Player/human.yml +++ b/Resources/Prototypes/Entities/Mobs/Player/human.yml @@ -10,7 +10,7 @@ show_examine_info: true - type: Input context: "human" - - type: StatusEffectsUI + - type: AlertsUI - type: OverlayEffectsUI - type: Eye zoom: 0.5, 0.5 diff --git a/Resources/Prototypes/Entities/Mobs/Species/human.yml b/Resources/Prototypes/Entities/Mobs/Species/human.yml index 3fd79f3b08..c5b20bba9a 100644 --- a/Resources/Prototypes/Entities/Mobs/Species/human.yml +++ b/Resources/Prototypes/Entities/Mobs/Species/human.yml @@ -23,9 +23,6 @@ caps: AddTo, RemoveFrom, NoExamine - type: Bloodstream max_volume: 100 - - type: Stomach - max_volume: 250 - digestionDelay: 20 # StatusEffects - type: Stunnable # Other diff --git a/Resources/Prototypes/Entities/Objects/Consumable/botany.yml b/Resources/Prototypes/Entities/Objects/Consumable/botany.yml index 1ee4463f89..64905e33a4 100644 --- a/Resources/Prototypes/Entities/Objects/Consumable/botany.yml +++ b/Resources/Prototypes/Entities/Objects/Consumable/botany.yml @@ -20,8 +20,11 @@ - type: SolutionContainer caps: NoExamine contents: - chem.Nutrient: 5 - chem.Flour: 5 + reagents: + - ReagentId: chem.Nutriment + Quantity: 5 + - ReagentId: chem.Flour + Quantity: 5 - type: Produce seed: wheat @@ -36,8 +39,11 @@ - type: SolutionContainer caps: NoExamine contents: - chem.Nutrient: 5 - chem.Flour: 5 + reagents: + - ReagentId: chem.Nutriment + Quantity: 5 + - ReagentId: chem.Glucose + Quantity: 5 - type: Produce seed: sugarcane diff --git a/Resources/Prototypes/Entities/Objects/Tools/tools.yml b/Resources/Prototypes/Entities/Objects/Tools/tools.yml index 0941fe2bf0..cafa7ee90f 100644 --- a/Resources/Prototypes/Entities/Objects/Tools/tools.yml +++ b/Resources/Prototypes/Entities/Objects/Tools/tools.yml @@ -61,40 +61,6 @@ cyan: "#18a2d5" yellow: "#ffa500" -- type: entity - name: welding tool - parent: BaseItem - id: Welder - description: 'Melts anything as long as it''s fueled, don''t forget your eye protection!' - components: - - type: Sprite - sprite: Objects/Tools/welder.rsi - layers: - - state: welder - - state: welder_flame - shader: unshaded - visible: false - - type: Item - size: 10 - sprite: Objects/Tools/welder.rsi - HeldPrefix: off - - type: ItemCooldown - - type: MeleeWeapon - - type: ItemStatus - - type: SolutionContainer - maxVol: 100 - caps: AddTo, NoExamine - contents: - reagents: - - ReagentId: chem.WeldingFuel - Quantity: 100 - - type: Welder - weldSoundCollection: Welder - - type: PointLight - enabled: false - radius: 1.5 - color: orange - - type: entity name: wrench parent: BaseItem diff --git a/Resources/Prototypes/Entities/Objects/Tools/welders.yml b/Resources/Prototypes/Entities/Objects/Tools/welders.yml new file mode 100644 index 0000000000..d36404eeb6 --- /dev/null +++ b/Resources/Prototypes/Entities/Objects/Tools/welders.yml @@ -0,0 +1,77 @@ +- type: entity + name: welding tool + parent: BaseItem + id: Welder + description: "Melts anything as long as it's fueled, don't forget your eye protection!" + components: + - type: Sprite + sprite: Objects/Tools/welder.rsi + layers: + - state: icon + - state: welder_flame + shader: unshaded + visible: false + - type: Item + size: 10 + sprite: Objects/Tools/welder.rsi + HeldPrefix: off + - type: ItemCooldown + - type: MeleeWeapon + - type: ItemStatus + - type: SolutionContainer + maxVol: 100 + caps: AddTo, NoExamine + contents: + reagents: + - ReagentId: chem.WeldingFuel + Quantity: 100 + - type: Welder + weldSoundCollection: Welder + - type: PointLight + enabled: false + radius: 1.5 + color: orange + +- type: entity + name: experimental welding tool + parent: Welder + id: WelderExperimental + description: "An experimental welder capable of self-fuel generation and less harmful to the eyes." + components: + - type: Sprite + sprite: Objects/Tools/welder_experimental.rsi + - type: Item + sprite: Objects/Tools/welder_experimental.rsi + - type: SolutionContainer + maxVol: 1000 + caps: AddTo, NoExamine + contents: + reagents: + - ReagentId: chem.WeldingFuel + Quantity: 1000 + - type: PointLight + enabled: false + radius: 1.5 + color: lightblue + +- type: entity + name: emergency welding tool + parent: Welder + id: WelderMini + description: "A miniature welder used during emergencies." + components: + - type: Sprite + sprite: Objects/Tools/welder_mini.rsi + - type: Item + sprite: Objects/Tools/welder_mini.rsi + - type: SolutionContainer + maxVol: 25 + caps: AddTo, NoExamine + contents: + reagents: + - ReagentId: chem.WeldingFuel + Quantity: 25 + - type: PointLight + enabled: false + radius: 1.0 + color: orange diff --git a/Resources/Prototypes/Roles/Jobs/Civilian/janitor.yml b/Resources/Prototypes/Roles/Jobs/Civilian/janitor.yml index 6aabd73d23..e621a685ff 100644 --- a/Resources/Prototypes/Roles/Jobs/Civilian/janitor.yml +++ b/Resources/Prototypes/Roles/Jobs/Civilian/janitor.yml @@ -19,3 +19,4 @@ head: HatPurplesoft idcard: JanitorPDA ears: HeadsetService + belt: ClothingBeltJanitorFilled diff --git a/Resources/Prototypes/Roles/Jobs/Engineering/chief_engineer.yml b/Resources/Prototypes/Roles/Jobs/Engineering/chief_engineer.yml index 6ee26c2903..7a9aed6f53 100644 --- a/Resources/Prototypes/Roles/Jobs/Engineering/chief_engineer.yml +++ b/Resources/Prototypes/Roles/Jobs/Engineering/chief_engineer.yml @@ -23,5 +23,5 @@ backpack: BackpackEngineeringFilled shoes: ShoesBrown idcard: CEPDA - belt: UtilityBeltClothingFilled ears: HeadsetEngineering + belt: ClothingBeltChiefEngineerFilled diff --git a/Resources/Prototypes/Roles/Jobs/Medical/chief_medical_officer.yml b/Resources/Prototypes/Roles/Jobs/Medical/chief_medical_officer.yml index de798fc49d..24861e8d62 100644 --- a/Resources/Prototypes/Roles/Jobs/Medical/chief_medical_officer.yml +++ b/Resources/Prototypes/Roles/Jobs/Medical/chief_medical_officer.yml @@ -25,3 +25,4 @@ outerclothing: OuterclothingLabcoatcmo idcard: CMOPDA ears: HeadsetMedicalAlt + belt: ClothingBeltMedical diff --git a/Resources/Prototypes/Roles/Jobs/Medical/medical_doctor.yml b/Resources/Prototypes/Roles/Jobs/Medical/medical_doctor.yml index 376f81107e..4455b8b2a1 100644 --- a/Resources/Prototypes/Roles/Jobs/Medical/medical_doctor.yml +++ b/Resources/Prototypes/Roles/Jobs/Medical/medical_doctor.yml @@ -20,3 +20,4 @@ outerclothing: OuterclothingLabcoatmedspecopen idcard: MedicalPDA ears: HeadsetMedical + belt: ClothingBeltMedical diff --git a/Resources/Prototypes/Roles/Jobs/Security/head_of_security.yml b/Resources/Prototypes/Roles/Jobs/Security/head_of_security.yml index 47117c74f7..57fe23f4b3 100644 --- a/Resources/Prototypes/Roles/Jobs/Security/head_of_security.yml +++ b/Resources/Prototypes/Roles/Jobs/Security/head_of_security.yml @@ -28,3 +28,4 @@ head: HatBeretHoS idcard: HoSPDA ears: HeadsetSecurityAlt + belt: ClothingBeltSecurityFilled diff --git a/Resources/Prototypes/Roles/Jobs/Security/security_officer.yml b/Resources/Prototypes/Roles/Jobs/Security/security_officer.yml index 1abec1dabd..cd49ef39c9 100644 --- a/Resources/Prototypes/Roles/Jobs/Security/security_officer.yml +++ b/Resources/Prototypes/Roles/Jobs/Security/security_officer.yml @@ -22,3 +22,4 @@ outerclothing: OuterclothingArmorVest idcard: SecurityPDA ears: HeadsetSecurity + belt: ClothingBeltSecurityFilled diff --git a/Resources/Prototypes/Roles/Jobs/Security/warden.yml b/Resources/Prototypes/Roles/Jobs/Security/warden.yml index 9e223a4a9a..00b6db25c3 100644 --- a/Resources/Prototypes/Roles/Jobs/Security/warden.yml +++ b/Resources/Prototypes/Roles/Jobs/Security/warden.yml @@ -23,3 +23,4 @@ outerclothing: OuterclothingArmorVest idcard: WardenPDA ears: HeadsetSecurity + belt: ClothingBeltSecurityFilled diff --git a/Resources/Textures/Clothing/Belt/assault.rsi/equipped-BELT.png b/Resources/Textures/Clothing/Belt/assault.rsi/equipped-BELT.png new file mode 100644 index 0000000000..77a7c17193 Binary files /dev/null and b/Resources/Textures/Clothing/Belt/assault.rsi/equipped-BELT.png differ diff --git a/Resources/Textures/Clothing/Belt/assault.rsi/icon.png b/Resources/Textures/Clothing/Belt/assault.rsi/icon.png new file mode 100644 index 0000000000..18047a5740 Binary files /dev/null and b/Resources/Textures/Clothing/Belt/assault.rsi/icon.png differ diff --git a/Resources/Textures/Clothing/Belt/assault.rsi/inhand-left.png b/Resources/Textures/Clothing/Belt/assault.rsi/inhand-left.png new file mode 100644 index 0000000000..9edac4c151 Binary files /dev/null and b/Resources/Textures/Clothing/Belt/assault.rsi/inhand-left.png differ diff --git a/Resources/Textures/Clothing/Belt/assault.rsi/inhand-right.png b/Resources/Textures/Clothing/Belt/assault.rsi/inhand-right.png new file mode 100644 index 0000000000..2489dcd7ec Binary files /dev/null and b/Resources/Textures/Clothing/Belt/assault.rsi/inhand-right.png differ diff --git a/Resources/Textures/Clothing/Belt/assault.rsi/meta.json b/Resources/Textures/Clothing/Belt/assault.rsi/meta.json new file mode 100644 index 0000000000..6fd2d07a08 --- /dev/null +++ b/Resources/Textures/Clothing/Belt/assault.rsi/meta.json @@ -0,0 +1,74 @@ +{ + "version": 1, + "size": { + "x": 32, + "y": 32 + }, + "license": "CC-BY-SA-3.0", + "copyright": "Taken from tgstation at commit https://github.com/tgstation/tgstation/commit/c838ba21dae97db345e0113f99596decd1d66039", + "states": [ + { + "name": "equipped-BELT", + "directions": 4, + "delays": [ + [ + 1 + ], + [ + 1 + ], + [ + 1 + ], + [ + 1 + ] + ] + }, + { + "name": "inhand-left", + "directions": 4, + "delays": [ + [ + 1 + ], + [ + 1 + ], + [ + 1 + ], + [ + 1 + ] + ] + }, + { + "name": "inhand-right", + "directions": 4, + "delays": [ + [ + 1 + ], + [ + 1 + ], + [ + 1 + ], + [ + 1 + ] + ] + }, + { + "name": "icon", + "directions": 1, + "delays": [ + [ + 1 + ] + ] + } + ] +} diff --git a/Resources/Textures/Clothing/Belt/bandolier.rsi/equipped-BELT.png b/Resources/Textures/Clothing/Belt/bandolier.rsi/equipped-BELT.png new file mode 100644 index 0000000000..55062fea78 Binary files /dev/null and b/Resources/Textures/Clothing/Belt/bandolier.rsi/equipped-BELT.png differ diff --git a/Resources/Textures/Clothing/Belt/bandolier.rsi/icon.png b/Resources/Textures/Clothing/Belt/bandolier.rsi/icon.png new file mode 100644 index 0000000000..33dab74994 Binary files /dev/null and b/Resources/Textures/Clothing/Belt/bandolier.rsi/icon.png differ diff --git a/Resources/Textures/Clothing/Belt/bandolier.rsi/inhand-left.png b/Resources/Textures/Clothing/Belt/bandolier.rsi/inhand-left.png new file mode 100644 index 0000000000..8cbd98c839 Binary files /dev/null and b/Resources/Textures/Clothing/Belt/bandolier.rsi/inhand-left.png differ diff --git a/Resources/Textures/Clothing/Belt/bandolier.rsi/inhand-right.png b/Resources/Textures/Clothing/Belt/bandolier.rsi/inhand-right.png new file mode 100644 index 0000000000..56ae9791dc Binary files /dev/null and b/Resources/Textures/Clothing/Belt/bandolier.rsi/inhand-right.png differ diff --git a/Resources/Textures/Clothing/Belt/bandolier.rsi/meta.json b/Resources/Textures/Clothing/Belt/bandolier.rsi/meta.json new file mode 100644 index 0000000000..6fd2d07a08 --- /dev/null +++ b/Resources/Textures/Clothing/Belt/bandolier.rsi/meta.json @@ -0,0 +1,74 @@ +{ + "version": 1, + "size": { + "x": 32, + "y": 32 + }, + "license": "CC-BY-SA-3.0", + "copyright": "Taken from tgstation at commit https://github.com/tgstation/tgstation/commit/c838ba21dae97db345e0113f99596decd1d66039", + "states": [ + { + "name": "equipped-BELT", + "directions": 4, + "delays": [ + [ + 1 + ], + [ + 1 + ], + [ + 1 + ], + [ + 1 + ] + ] + }, + { + "name": "inhand-left", + "directions": 4, + "delays": [ + [ + 1 + ], + [ + 1 + ], + [ + 1 + ], + [ + 1 + ] + ] + }, + { + "name": "inhand-right", + "directions": 4, + "delays": [ + [ + 1 + ], + [ + 1 + ], + [ + 1 + ], + [ + 1 + ] + ] + }, + { + "name": "icon", + "directions": 1, + "delays": [ + [ + 1 + ] + ] + } + ] +} diff --git a/Resources/Textures/Clothing/Belt/belt_icon_overlay.rsi/crowbar.png b/Resources/Textures/Clothing/Belt/belt_icon_overlay.rsi/crowbar.png new file mode 100644 index 0000000000..f5e98598fa Binary files /dev/null and b/Resources/Textures/Clothing/Belt/belt_icon_overlay.rsi/crowbar.png differ diff --git a/Resources/Textures/Clothing/Belt/belt_icon_overlay.rsi/crowbar_brass.png b/Resources/Textures/Clothing/Belt/belt_icon_overlay.rsi/crowbar_brass.png new file mode 100644 index 0000000000..ec49455454 Binary files /dev/null and b/Resources/Textures/Clothing/Belt/belt_icon_overlay.rsi/crowbar_brass.png differ diff --git a/Resources/Textures/Clothing/Belt/belt_icon_overlay.rsi/crowbar_large.png b/Resources/Textures/Clothing/Belt/belt_icon_overlay.rsi/crowbar_large.png new file mode 100644 index 0000000000..f5e98598fa Binary files /dev/null and b/Resources/Textures/Clothing/Belt/belt_icon_overlay.rsi/crowbar_large.png differ diff --git a/Resources/Textures/Clothing/Belt/belt_icon_overlay.rsi/crowbar_red.png b/Resources/Textures/Clothing/Belt/belt_icon_overlay.rsi/crowbar_red.png new file mode 100644 index 0000000000..3b80abd142 Binary files /dev/null and b/Resources/Textures/Clothing/Belt/belt_icon_overlay.rsi/crowbar_red.png differ diff --git a/Resources/Textures/Clothing/Belt/belt_icon_overlay.rsi/cutters_brass.png b/Resources/Textures/Clothing/Belt/belt_icon_overlay.rsi/cutters_brass.png new file mode 100644 index 0000000000..f8510d2abf Binary files /dev/null and b/Resources/Textures/Clothing/Belt/belt_icon_overlay.rsi/cutters_brass.png differ diff --git a/Resources/Textures/Clothing/Belt/belt_icon_overlay.rsi/cutters_red.png b/Resources/Textures/Clothing/Belt/belt_icon_overlay.rsi/cutters_red.png new file mode 100644 index 0000000000..56babcdd5b Binary files /dev/null and b/Resources/Textures/Clothing/Belt/belt_icon_overlay.rsi/cutters_red.png differ diff --git a/Resources/Textures/Clothing/Belt/belt_icon_overlay.rsi/cutters_yellow.png b/Resources/Textures/Clothing/Belt/belt_icon_overlay.rsi/cutters_yellow.png new file mode 100644 index 0000000000..eb18cbd9a5 Binary files /dev/null and b/Resources/Textures/Clothing/Belt/belt_icon_overlay.rsi/cutters_yellow.png differ diff --git a/Resources/Textures/Clothing/Belt/belt_icon_overlay.rsi/drill_bolt.png b/Resources/Textures/Clothing/Belt/belt_icon_overlay.rsi/drill_bolt.png new file mode 100644 index 0000000000..1be285ec4f Binary files /dev/null and b/Resources/Textures/Clothing/Belt/belt_icon_overlay.rsi/drill_bolt.png differ diff --git a/Resources/Textures/Clothing/Belt/belt_icon_overlay.rsi/drill_screw.png b/Resources/Textures/Clothing/Belt/belt_icon_overlay.rsi/drill_screw.png new file mode 100644 index 0000000000..1be285ec4f Binary files /dev/null and b/Resources/Textures/Clothing/Belt/belt_icon_overlay.rsi/drill_screw.png differ diff --git a/Resources/Textures/Clothing/Belt/belt_icon_overlay.rsi/flashbang.png b/Resources/Textures/Clothing/Belt/belt_icon_overlay.rsi/flashbang.png new file mode 100644 index 0000000000..c8d2cc971d Binary files /dev/null and b/Resources/Textures/Clothing/Belt/belt_icon_overlay.rsi/flashbang.png differ diff --git a/Resources/Textures/Clothing/Belt/belt_icon_overlay.rsi/jaws_cutter.png b/Resources/Textures/Clothing/Belt/belt_icon_overlay.rsi/jaws_cutter.png new file mode 100644 index 0000000000..ba81110284 Binary files /dev/null and b/Resources/Textures/Clothing/Belt/belt_icon_overlay.rsi/jaws_cutter.png differ diff --git a/Resources/Textures/Clothing/Belt/belt_icon_overlay.rsi/jaws_pry.png b/Resources/Textures/Clothing/Belt/belt_icon_overlay.rsi/jaws_pry.png new file mode 100644 index 0000000000..ba81110284 Binary files /dev/null and b/Resources/Textures/Clothing/Belt/belt_icon_overlay.rsi/jaws_pry.png differ diff --git a/Resources/Textures/Clothing/Belt/belt_icon_overlay.rsi/meta.json b/Resources/Textures/Clothing/Belt/belt_icon_overlay.rsi/meta.json new file mode 100644 index 0000000000..5f411866b4 --- /dev/null +++ b/Resources/Textures/Clothing/Belt/belt_icon_overlay.rsi/meta.json @@ -0,0 +1,236 @@ +{ + "version": 1, + "size": { + "x": 32, + "y": 32 + }, + "license": "CC-BY-SA-3.0", + "copyright": "Taken from tgstation at commit https://github.com/tgstation/tgstation/commit/dc89ef0239830774bd3d9d7d6c8da2856da2b869", + "states": [ + { + "name": "crowbar", + "directions": 1, + "delays": [ + [ + 1 + ] + ] + }, + { + "name": "crowbar_brass", + "directions": 1, + "delays": [ + [ + 1 + ] + ] + }, + { + "name": "crowbar_large", + "directions": 1, + "delays": [ + [ + 1 + ] + ] + }, + { + "name": "crowbar_red", + "directions": 1, + "delays": [ + [ + 1 + ] + ] + }, + { + "name": "cutters_brass", + "directions": 1, + "delays": [ + [ + 1 + ] + ] + }, + { + "name": "cutters_red", + "directions": 1, + "delays": [ + [ + 1 + ] + ] + }, + { + "name": "cutters_yellow", + "directions": 1, + "delays": [ + [ + 1 + ] + ] + }, + { + "name": "drill_bolt", + "directions": 1, + "delays": [ + [ + 1 + ] + ] + }, + { + "name": "drill_screw", + "directions": 1, + "delays": [ + [ + 1 + ] + ] + }, + { + "name": "flashbang", + "directions": 1, + "delays": [ + [ + 1 + ] + ] + }, + { + "name": "jaws_cutter", + "directions": 1, + "delays": [ + [ + 1 + ] + ] + }, + { + "name": "jaws_pry", + "directions": 1, + "delays": [ + [ + 1 + ] + ] + }, + { + "name": "multitool", + "directions": 1, + "delays": [ + [ + 1 + ] + ] + }, + { + "name": "multitool_red", + "directions": 1, + "delays": [ + [ + 1 + ] + ] + }, + { + "name": "multitool_yellow", + "directions": 1, + "delays": [ + [ + 1 + ] + ] + }, + { + "name": "screwdriver", + "directions": 1, + "delays": [ + [ + 1 + ] + ] + }, + { + "name": "screwdriver_brass", + "directions": 1, + "delays": [ + [ + 1 + ] + ] + }, + { + "name": "screwdriver_head", + "directions": 1, + "delays": [ + [ + 1 + ] + ] + }, + { + "name": "screwdriver_nuke", + "directions": 1, + "delays": [ + [ + 1 + ] + ] + }, + { + "name": "stunbaton", + "directions": 1, + "delays": [ + [ + 1 + ] + ] + }, + { + "name": "stunbaton_active", + "directions": 1, + "delays": [ + [ + 1 + ] + ] + }, + { + "name": "stunbaton_nocell", + "directions": 1, + "delays": [ + [ + 1 + ] + ] + }, + { + "name": "wrench", + "directions": 1, + "delays": [ + [ + 1 + ] + ] + }, + { + "name": "wrench_brass", + "directions": 1, + "delays": [ + [ + 1 + ] + ] + }, + { + "name": "wrench_medical", + "directions": 1, + "delays": [ + [ + 1 + ] + ] + } + ] +} diff --git a/Resources/Textures/Clothing/Belt/belt_icon_overlay.rsi/multitool.png b/Resources/Textures/Clothing/Belt/belt_icon_overlay.rsi/multitool.png new file mode 100644 index 0000000000..008bd7995f Binary files /dev/null and b/Resources/Textures/Clothing/Belt/belt_icon_overlay.rsi/multitool.png differ diff --git a/Resources/Textures/Clothing/Belt/belt_icon_overlay.rsi/multitool_red.png b/Resources/Textures/Clothing/Belt/belt_icon_overlay.rsi/multitool_red.png new file mode 100644 index 0000000000..008bd7995f Binary files /dev/null and b/Resources/Textures/Clothing/Belt/belt_icon_overlay.rsi/multitool_red.png differ diff --git a/Resources/Textures/Clothing/Belt/belt_icon_overlay.rsi/multitool_yellow.png b/Resources/Textures/Clothing/Belt/belt_icon_overlay.rsi/multitool_yellow.png new file mode 100644 index 0000000000..008bd7995f Binary files /dev/null and b/Resources/Textures/Clothing/Belt/belt_icon_overlay.rsi/multitool_yellow.png differ diff --git a/Resources/Textures/Clothing/Belt/belt_icon_overlay.rsi/screwdriver.png b/Resources/Textures/Clothing/Belt/belt_icon_overlay.rsi/screwdriver.png new file mode 100644 index 0000000000..d4ba4ba421 Binary files /dev/null and b/Resources/Textures/Clothing/Belt/belt_icon_overlay.rsi/screwdriver.png differ diff --git a/Resources/Textures/Clothing/Belt/belt_icon_overlay.rsi/screwdriver_brass.png b/Resources/Textures/Clothing/Belt/belt_icon_overlay.rsi/screwdriver_brass.png new file mode 100644 index 0000000000..2fb9ef5388 Binary files /dev/null and b/Resources/Textures/Clothing/Belt/belt_icon_overlay.rsi/screwdriver_brass.png differ diff --git a/Resources/Textures/Clothing/Belt/belt_icon_overlay.rsi/screwdriver_head.png b/Resources/Textures/Clothing/Belt/belt_icon_overlay.rsi/screwdriver_head.png new file mode 100644 index 0000000000..db0208a3e9 Binary files /dev/null and b/Resources/Textures/Clothing/Belt/belt_icon_overlay.rsi/screwdriver_head.png differ diff --git a/Resources/Textures/Clothing/Belt/belt_icon_overlay.rsi/screwdriver_nuke.png b/Resources/Textures/Clothing/Belt/belt_icon_overlay.rsi/screwdriver_nuke.png new file mode 100644 index 0000000000..38b05c8d0a Binary files /dev/null and b/Resources/Textures/Clothing/Belt/belt_icon_overlay.rsi/screwdriver_nuke.png differ diff --git a/Resources/Textures/Clothing/Belt/belt_icon_overlay.rsi/stunbaton.png b/Resources/Textures/Clothing/Belt/belt_icon_overlay.rsi/stunbaton.png new file mode 100644 index 0000000000..784617bd4f Binary files /dev/null and b/Resources/Textures/Clothing/Belt/belt_icon_overlay.rsi/stunbaton.png differ diff --git a/Resources/Textures/Clothing/Belt/belt_icon_overlay.rsi/stunbaton_active.png b/Resources/Textures/Clothing/Belt/belt_icon_overlay.rsi/stunbaton_active.png new file mode 100644 index 0000000000..784617bd4f Binary files /dev/null and b/Resources/Textures/Clothing/Belt/belt_icon_overlay.rsi/stunbaton_active.png differ diff --git a/Resources/Textures/Clothing/Belt/belt_icon_overlay.rsi/stunbaton_nocell.png b/Resources/Textures/Clothing/Belt/belt_icon_overlay.rsi/stunbaton_nocell.png new file mode 100644 index 0000000000..784617bd4f Binary files /dev/null and b/Resources/Textures/Clothing/Belt/belt_icon_overlay.rsi/stunbaton_nocell.png differ diff --git a/Resources/Textures/Clothing/Belt/belt_icon_overlay.rsi/wrench.png b/Resources/Textures/Clothing/Belt/belt_icon_overlay.rsi/wrench.png new file mode 100644 index 0000000000..0a7e48c25d Binary files /dev/null and b/Resources/Textures/Clothing/Belt/belt_icon_overlay.rsi/wrench.png differ diff --git a/Resources/Textures/Clothing/Belt/belt_icon_overlay.rsi/wrench_brass.png b/Resources/Textures/Clothing/Belt/belt_icon_overlay.rsi/wrench_brass.png new file mode 100644 index 0000000000..ac6a280af3 Binary files /dev/null and b/Resources/Textures/Clothing/Belt/belt_icon_overlay.rsi/wrench_brass.png differ diff --git a/Resources/Textures/Clothing/Belt/belt_icon_overlay.rsi/wrench_medical.png b/Resources/Textures/Clothing/Belt/belt_icon_overlay.rsi/wrench_medical.png new file mode 100644 index 0000000000..0a7e48c25d Binary files /dev/null and b/Resources/Textures/Clothing/Belt/belt_icon_overlay.rsi/wrench_medical.png differ diff --git a/Resources/Textures/Clothing/Belt/belt_mob_overlay.rsi/baton.png b/Resources/Textures/Clothing/Belt/belt_mob_overlay.rsi/baton.png new file mode 100644 index 0000000000..dbd600edbb Binary files /dev/null and b/Resources/Textures/Clothing/Belt/belt_mob_overlay.rsi/baton.png differ diff --git a/Resources/Textures/Clothing/Belt/belt_mob_overlay.rsi/gun.png b/Resources/Textures/Clothing/Belt/belt_mob_overlay.rsi/gun.png new file mode 100644 index 0000000000..ed96666e88 Binary files /dev/null and b/Resources/Textures/Clothing/Belt/belt_mob_overlay.rsi/gun.png differ diff --git a/Resources/Textures/Clothing/Belt/belt_mob_overlay.rsi/handcuff.png b/Resources/Textures/Clothing/Belt/belt_mob_overlay.rsi/handcuff.png new file mode 100644 index 0000000000..f22fd5cb89 Binary files /dev/null and b/Resources/Textures/Clothing/Belt/belt_mob_overlay.rsi/handcuff.png differ diff --git a/Resources/Textures/Clothing/Belt/belt_mob_overlay.rsi/injector.png b/Resources/Textures/Clothing/Belt/belt_mob_overlay.rsi/injector.png new file mode 100644 index 0000000000..85fa72599d Binary files /dev/null and b/Resources/Textures/Clothing/Belt/belt_mob_overlay.rsi/injector.png differ diff --git a/Resources/Textures/Clothing/Belt/belt_mob_overlay.rsi/meta.json b/Resources/Textures/Clothing/Belt/belt_mob_overlay.rsi/meta.json new file mode 100644 index 0000000000..a6ea5838f7 --- /dev/null +++ b/Resources/Textures/Clothing/Belt/belt_mob_overlay.rsi/meta.json @@ -0,0 +1,101 @@ +{ + "version": 1, + "size": { + "x": 32, + "y": 32 + }, + "license": "CC-BY-SA-3.0", + "copyright": "Taken from tgstation at commit https://github.com/tgstation/tgstation/commit/dc89ef0239830774bd3d9d7d6c8da2856da2b869", + "states": [ + { + "name": "baton", + "directions": 4, + "delays": [ + [ + 1 + ], + [ + 1 + ], + [ + 1 + ], + [ + 1 + ] + ] + }, + { + "name": "gun", + "directions": 4, + "delays": [ + [ + 1 + ], + [ + 1 + ], + [ + 1 + ], + [ + 1 + ] + ] + }, + { + "name": "handcuff", + "directions": 4, + "delays": [ + [ + 1 + ], + [ + 1 + ], + [ + 1 + ], + [ + 1 + ] + ] + }, + { + "name": "injector", + "directions": 4, + "delays": [ + [ + 1 + ], + [ + 1 + ], + [ + 1 + ], + [ + 1 + ] + ] + }, + { + "name": "tank", + "directions": 4, + "delays": [ + [ + 1 + ], + [ + 1 + ], + [ + 1 + ], + [ + 1 + ] + ] + } + ] +} diff --git a/Resources/Textures/Clothing/Belt/belt_mob_overlay.rsi/tank.png b/Resources/Textures/Clothing/Belt/belt_mob_overlay.rsi/tank.png new file mode 100644 index 0000000000..36c6b88eb3 Binary files /dev/null and b/Resources/Textures/Clothing/Belt/belt_mob_overlay.rsi/tank.png differ diff --git a/Resources/Textures/Clothing/Belt/belt_utility.rsi/equipped-BELT.png b/Resources/Textures/Clothing/Belt/belt_utility.rsi/equipped-BELT.png deleted file mode 100644 index b8cad16789..0000000000 Binary files a/Resources/Textures/Clothing/Belt/belt_utility.rsi/equipped-BELT.png and /dev/null differ diff --git a/Resources/Textures/Clothing/Belt/belt_utility.rsi/meta.json b/Resources/Textures/Clothing/Belt/belt_utility.rsi/meta.json deleted file mode 100644 index c6d2b08e03..0000000000 --- a/Resources/Textures/Clothing/Belt/belt_utility.rsi/meta.json +++ /dev/null @@ -1 +0,0 @@ -{"version": 1, "size": {"x": 32, "y": 32}, "license": "CC-BY-SA-3.0", "copyright": "Taken from https://github.com/discordia-space/CEV-Eris at commit 9a3a3a180344460263e8df7ea2565128e07b86b5", "states": [{"name": "equipped-BELT", "directions": 4, "delays": [[1.0], [1.0], [1.0], [1.0]]}, {"name": "utilitybelt", "directions": 1, "delays": [[1.0]]}]} \ No newline at end of file diff --git a/Resources/Textures/Clothing/Belt/ce.rsi/equipped-BELT.png b/Resources/Textures/Clothing/Belt/ce.rsi/equipped-BELT.png new file mode 100644 index 0000000000..e5bacdb467 Binary files /dev/null and b/Resources/Textures/Clothing/Belt/ce.rsi/equipped-BELT.png differ diff --git a/Resources/Textures/Clothing/Belt/ce.rsi/icon.png b/Resources/Textures/Clothing/Belt/ce.rsi/icon.png new file mode 100644 index 0000000000..e759e11492 Binary files /dev/null and b/Resources/Textures/Clothing/Belt/ce.rsi/icon.png differ diff --git a/Resources/Textures/Clothing/Belt/ce.rsi/inhand-left.png b/Resources/Textures/Clothing/Belt/ce.rsi/inhand-left.png new file mode 100644 index 0000000000..041e6b34f9 Binary files /dev/null and b/Resources/Textures/Clothing/Belt/ce.rsi/inhand-left.png differ diff --git a/Resources/Textures/Clothing/Belt/ce.rsi/inhand-right.png b/Resources/Textures/Clothing/Belt/ce.rsi/inhand-right.png new file mode 100644 index 0000000000..512d21a2da Binary files /dev/null and b/Resources/Textures/Clothing/Belt/ce.rsi/inhand-right.png differ diff --git a/Resources/Textures/Clothing/Belt/ce.rsi/meta.json b/Resources/Textures/Clothing/Belt/ce.rsi/meta.json new file mode 100644 index 0000000000..6fd2d07a08 --- /dev/null +++ b/Resources/Textures/Clothing/Belt/ce.rsi/meta.json @@ -0,0 +1,74 @@ +{ + "version": 1, + "size": { + "x": 32, + "y": 32 + }, + "license": "CC-BY-SA-3.0", + "copyright": "Taken from tgstation at commit https://github.com/tgstation/tgstation/commit/c838ba21dae97db345e0113f99596decd1d66039", + "states": [ + { + "name": "equipped-BELT", + "directions": 4, + "delays": [ + [ + 1 + ], + [ + 1 + ], + [ + 1 + ], + [ + 1 + ] + ] + }, + { + "name": "inhand-left", + "directions": 4, + "delays": [ + [ + 1 + ], + [ + 1 + ], + [ + 1 + ], + [ + 1 + ] + ] + }, + { + "name": "inhand-right", + "directions": 4, + "delays": [ + [ + 1 + ], + [ + 1 + ], + [ + 1 + ], + [ + 1 + ] + ] + }, + { + "name": "icon", + "directions": 1, + "delays": [ + [ + 1 + ] + ] + } + ] +} diff --git a/Resources/Textures/Clothing/Belt/champion.rsi/equipped-BELT.png b/Resources/Textures/Clothing/Belt/champion.rsi/equipped-BELT.png new file mode 100644 index 0000000000..3bb41718c1 Binary files /dev/null and b/Resources/Textures/Clothing/Belt/champion.rsi/equipped-BELT.png differ diff --git a/Resources/Textures/Clothing/Belt/champion.rsi/icon.png b/Resources/Textures/Clothing/Belt/champion.rsi/icon.png new file mode 100644 index 0000000000..a84213cfcb Binary files /dev/null and b/Resources/Textures/Clothing/Belt/champion.rsi/icon.png differ diff --git a/Resources/Textures/Clothing/Belt/champion.rsi/inhand-left.png b/Resources/Textures/Clothing/Belt/champion.rsi/inhand-left.png new file mode 100644 index 0000000000..3614c7ec83 Binary files /dev/null and b/Resources/Textures/Clothing/Belt/champion.rsi/inhand-left.png differ diff --git a/Resources/Textures/Clothing/Belt/champion.rsi/inhand-right.png b/Resources/Textures/Clothing/Belt/champion.rsi/inhand-right.png new file mode 100644 index 0000000000..2137c63d34 Binary files /dev/null and b/Resources/Textures/Clothing/Belt/champion.rsi/inhand-right.png differ diff --git a/Resources/Textures/Clothing/Belt/champion.rsi/meta.json b/Resources/Textures/Clothing/Belt/champion.rsi/meta.json new file mode 100644 index 0000000000..6fd2d07a08 --- /dev/null +++ b/Resources/Textures/Clothing/Belt/champion.rsi/meta.json @@ -0,0 +1,74 @@ +{ + "version": 1, + "size": { + "x": 32, + "y": 32 + }, + "license": "CC-BY-SA-3.0", + "copyright": "Taken from tgstation at commit https://github.com/tgstation/tgstation/commit/c838ba21dae97db345e0113f99596decd1d66039", + "states": [ + { + "name": "equipped-BELT", + "directions": 4, + "delays": [ + [ + 1 + ], + [ + 1 + ], + [ + 1 + ], + [ + 1 + ] + ] + }, + { + "name": "inhand-left", + "directions": 4, + "delays": [ + [ + 1 + ], + [ + 1 + ], + [ + 1 + ], + [ + 1 + ] + ] + }, + { + "name": "inhand-right", + "directions": 4, + "delays": [ + [ + 1 + ], + [ + 1 + ], + [ + 1 + ], + [ + 1 + ] + ] + }, + { + "name": "icon", + "directions": 1, + "delays": [ + [ + 1 + ] + ] + } + ] +} diff --git a/Resources/Textures/Clothing/Belt/holster.rsi/equipped-BELT.png b/Resources/Textures/Clothing/Belt/holster.rsi/equipped-BELT.png new file mode 100644 index 0000000000..792c016510 Binary files /dev/null and b/Resources/Textures/Clothing/Belt/holster.rsi/equipped-BELT.png differ diff --git a/Resources/Textures/Clothing/Belt/holster.rsi/icon.png b/Resources/Textures/Clothing/Belt/holster.rsi/icon.png new file mode 100644 index 0000000000..d77d1088c9 Binary files /dev/null and b/Resources/Textures/Clothing/Belt/holster.rsi/icon.png differ diff --git a/Resources/Textures/Clothing/Belt/holster.rsi/inhand-left.png b/Resources/Textures/Clothing/Belt/holster.rsi/inhand-left.png new file mode 100644 index 0000000000..0a2043e7cb Binary files /dev/null and b/Resources/Textures/Clothing/Belt/holster.rsi/inhand-left.png differ diff --git a/Resources/Textures/Clothing/Belt/holster.rsi/inhand-right.png b/Resources/Textures/Clothing/Belt/holster.rsi/inhand-right.png new file mode 100644 index 0000000000..cfc97c5ba1 Binary files /dev/null and b/Resources/Textures/Clothing/Belt/holster.rsi/inhand-right.png differ diff --git a/Resources/Textures/Clothing/Belt/holster.rsi/meta.json b/Resources/Textures/Clothing/Belt/holster.rsi/meta.json new file mode 100644 index 0000000000..6fd2d07a08 --- /dev/null +++ b/Resources/Textures/Clothing/Belt/holster.rsi/meta.json @@ -0,0 +1,74 @@ +{ + "version": 1, + "size": { + "x": 32, + "y": 32 + }, + "license": "CC-BY-SA-3.0", + "copyright": "Taken from tgstation at commit https://github.com/tgstation/tgstation/commit/c838ba21dae97db345e0113f99596decd1d66039", + "states": [ + { + "name": "equipped-BELT", + "directions": 4, + "delays": [ + [ + 1 + ], + [ + 1 + ], + [ + 1 + ], + [ + 1 + ] + ] + }, + { + "name": "inhand-left", + "directions": 4, + "delays": [ + [ + 1 + ], + [ + 1 + ], + [ + 1 + ], + [ + 1 + ] + ] + }, + { + "name": "inhand-right", + "directions": 4, + "delays": [ + [ + 1 + ], + [ + 1 + ], + [ + 1 + ], + [ + 1 + ] + ] + }, + { + "name": "icon", + "directions": 1, + "delays": [ + [ + 1 + ] + ] + } + ] +} diff --git a/Resources/Textures/Clothing/Belt/janitor.rsi/equipped-BELT.png b/Resources/Textures/Clothing/Belt/janitor.rsi/equipped-BELT.png new file mode 100644 index 0000000000..7ce0f6c5db Binary files /dev/null and b/Resources/Textures/Clothing/Belt/janitor.rsi/equipped-BELT.png differ diff --git a/Resources/Textures/Clothing/Belt/janitor.rsi/icon.png b/Resources/Textures/Clothing/Belt/janitor.rsi/icon.png new file mode 100644 index 0000000000..94cb6d9532 Binary files /dev/null and b/Resources/Textures/Clothing/Belt/janitor.rsi/icon.png differ diff --git a/Resources/Textures/Clothing/Belt/janitor.rsi/inhand-left.png b/Resources/Textures/Clothing/Belt/janitor.rsi/inhand-left.png new file mode 100644 index 0000000000..dfd433aaeb Binary files /dev/null and b/Resources/Textures/Clothing/Belt/janitor.rsi/inhand-left.png differ diff --git a/Resources/Textures/Clothing/Belt/janitor.rsi/inhand-right.png b/Resources/Textures/Clothing/Belt/janitor.rsi/inhand-right.png new file mode 100644 index 0000000000..2d060d28fe Binary files /dev/null and b/Resources/Textures/Clothing/Belt/janitor.rsi/inhand-right.png differ diff --git a/Resources/Textures/Clothing/Belt/janitor.rsi/meta.json b/Resources/Textures/Clothing/Belt/janitor.rsi/meta.json new file mode 100644 index 0000000000..6fd2d07a08 --- /dev/null +++ b/Resources/Textures/Clothing/Belt/janitor.rsi/meta.json @@ -0,0 +1,74 @@ +{ + "version": 1, + "size": { + "x": 32, + "y": 32 + }, + "license": "CC-BY-SA-3.0", + "copyright": "Taken from tgstation at commit https://github.com/tgstation/tgstation/commit/c838ba21dae97db345e0113f99596decd1d66039", + "states": [ + { + "name": "equipped-BELT", + "directions": 4, + "delays": [ + [ + 1 + ], + [ + 1 + ], + [ + 1 + ], + [ + 1 + ] + ] + }, + { + "name": "inhand-left", + "directions": 4, + "delays": [ + [ + 1 + ], + [ + 1 + ], + [ + 1 + ], + [ + 1 + ] + ] + }, + { + "name": "inhand-right", + "directions": 4, + "delays": [ + [ + 1 + ], + [ + 1 + ], + [ + 1 + ], + [ + 1 + ] + ] + }, + { + "name": "icon", + "directions": 1, + "delays": [ + [ + 1 + ] + ] + } + ] +} diff --git a/Resources/Textures/Clothing/Belt/medical.rsi/equipped-BELT.png b/Resources/Textures/Clothing/Belt/medical.rsi/equipped-BELT.png new file mode 100644 index 0000000000..4da4f1e6b2 Binary files /dev/null and b/Resources/Textures/Clothing/Belt/medical.rsi/equipped-BELT.png differ diff --git a/Resources/Textures/Clothing/Belt/medical.rsi/icon.png b/Resources/Textures/Clothing/Belt/medical.rsi/icon.png new file mode 100644 index 0000000000..9b0c385509 Binary files /dev/null and b/Resources/Textures/Clothing/Belt/medical.rsi/icon.png differ diff --git a/Resources/Textures/Clothing/Belt/medical.rsi/inhand-left.png b/Resources/Textures/Clothing/Belt/medical.rsi/inhand-left.png new file mode 100644 index 0000000000..05b12bcf4e Binary files /dev/null and b/Resources/Textures/Clothing/Belt/medical.rsi/inhand-left.png differ diff --git a/Resources/Textures/Clothing/Belt/medical.rsi/inhand-right.png b/Resources/Textures/Clothing/Belt/medical.rsi/inhand-right.png new file mode 100644 index 0000000000..a3e40d34a8 Binary files /dev/null and b/Resources/Textures/Clothing/Belt/medical.rsi/inhand-right.png differ diff --git a/Resources/Textures/Clothing/Belt/medical.rsi/meta.json b/Resources/Textures/Clothing/Belt/medical.rsi/meta.json new file mode 100644 index 0000000000..6fd2d07a08 --- /dev/null +++ b/Resources/Textures/Clothing/Belt/medical.rsi/meta.json @@ -0,0 +1,74 @@ +{ + "version": 1, + "size": { + "x": 32, + "y": 32 + }, + "license": "CC-BY-SA-3.0", + "copyright": "Taken from tgstation at commit https://github.com/tgstation/tgstation/commit/c838ba21dae97db345e0113f99596decd1d66039", + "states": [ + { + "name": "equipped-BELT", + "directions": 4, + "delays": [ + [ + 1 + ], + [ + 1 + ], + [ + 1 + ], + [ + 1 + ] + ] + }, + { + "name": "inhand-left", + "directions": 4, + "delays": [ + [ + 1 + ], + [ + 1 + ], + [ + 1 + ], + [ + 1 + ] + ] + }, + { + "name": "inhand-right", + "directions": 4, + "delays": [ + [ + 1 + ], + [ + 1 + ], + [ + 1 + ], + [ + 1 + ] + ] + }, + { + "name": "icon", + "directions": 1, + "delays": [ + [ + 1 + ] + ] + } + ] +} diff --git a/Resources/Textures/Clothing/Belt/militarywebbing.rsi/equipped-BELT.png b/Resources/Textures/Clothing/Belt/militarywebbing.rsi/equipped-BELT.png new file mode 100644 index 0000000000..06cec5d458 Binary files /dev/null and b/Resources/Textures/Clothing/Belt/militarywebbing.rsi/equipped-BELT.png differ diff --git a/Resources/Textures/Clothing/Belt/militarywebbing.rsi/icon.png b/Resources/Textures/Clothing/Belt/militarywebbing.rsi/icon.png new file mode 100644 index 0000000000..5767c15704 Binary files /dev/null and b/Resources/Textures/Clothing/Belt/militarywebbing.rsi/icon.png differ diff --git a/Resources/Textures/Clothing/Belt/militarywebbing.rsi/inhand-left.png b/Resources/Textures/Clothing/Belt/militarywebbing.rsi/inhand-left.png new file mode 100644 index 0000000000..dbce144c60 Binary files /dev/null and b/Resources/Textures/Clothing/Belt/militarywebbing.rsi/inhand-left.png differ diff --git a/Resources/Textures/Clothing/Belt/militarywebbing.rsi/inhand-right.png b/Resources/Textures/Clothing/Belt/militarywebbing.rsi/inhand-right.png new file mode 100644 index 0000000000..8280138ae7 Binary files /dev/null and b/Resources/Textures/Clothing/Belt/militarywebbing.rsi/inhand-right.png differ diff --git a/Resources/Textures/Clothing/Belt/militarywebbing.rsi/meta.json b/Resources/Textures/Clothing/Belt/militarywebbing.rsi/meta.json new file mode 100644 index 0000000000..6fd2d07a08 --- /dev/null +++ b/Resources/Textures/Clothing/Belt/militarywebbing.rsi/meta.json @@ -0,0 +1,74 @@ +{ + "version": 1, + "size": { + "x": 32, + "y": 32 + }, + "license": "CC-BY-SA-3.0", + "copyright": "Taken from tgstation at commit https://github.com/tgstation/tgstation/commit/c838ba21dae97db345e0113f99596decd1d66039", + "states": [ + { + "name": "equipped-BELT", + "directions": 4, + "delays": [ + [ + 1 + ], + [ + 1 + ], + [ + 1 + ], + [ + 1 + ] + ] + }, + { + "name": "inhand-left", + "directions": 4, + "delays": [ + [ + 1 + ], + [ + 1 + ], + [ + 1 + ], + [ + 1 + ] + ] + }, + { + "name": "inhand-right", + "directions": 4, + "delays": [ + [ + 1 + ], + [ + 1 + ], + [ + 1 + ], + [ + 1 + ] + ] + }, + { + "name": "icon", + "directions": 1, + "delays": [ + [ + 1 + ] + ] + } + ] +} diff --git a/Resources/Textures/Clothing/Belt/security.rsi/equipped-BELT.png b/Resources/Textures/Clothing/Belt/security.rsi/equipped-BELT.png new file mode 100644 index 0000000000..b04e3d4b7b Binary files /dev/null and b/Resources/Textures/Clothing/Belt/security.rsi/equipped-BELT.png differ diff --git a/Resources/Textures/Clothing/Belt/security.rsi/icon.png b/Resources/Textures/Clothing/Belt/security.rsi/icon.png new file mode 100644 index 0000000000..3b17da538d Binary files /dev/null and b/Resources/Textures/Clothing/Belt/security.rsi/icon.png differ diff --git a/Resources/Textures/Clothing/Belt/security.rsi/inhand-left.png b/Resources/Textures/Clothing/Belt/security.rsi/inhand-left.png new file mode 100644 index 0000000000..9edac4c151 Binary files /dev/null and b/Resources/Textures/Clothing/Belt/security.rsi/inhand-left.png differ diff --git a/Resources/Textures/Clothing/Belt/security.rsi/inhand-right.png b/Resources/Textures/Clothing/Belt/security.rsi/inhand-right.png new file mode 100644 index 0000000000..2489dcd7ec Binary files /dev/null and b/Resources/Textures/Clothing/Belt/security.rsi/inhand-right.png differ diff --git a/Resources/Textures/Clothing/Belt/security.rsi/meta.json b/Resources/Textures/Clothing/Belt/security.rsi/meta.json new file mode 100644 index 0000000000..6fd2d07a08 --- /dev/null +++ b/Resources/Textures/Clothing/Belt/security.rsi/meta.json @@ -0,0 +1,74 @@ +{ + "version": 1, + "size": { + "x": 32, + "y": 32 + }, + "license": "CC-BY-SA-3.0", + "copyright": "Taken from tgstation at commit https://github.com/tgstation/tgstation/commit/c838ba21dae97db345e0113f99596decd1d66039", + "states": [ + { + "name": "equipped-BELT", + "directions": 4, + "delays": [ + [ + 1 + ], + [ + 1 + ], + [ + 1 + ], + [ + 1 + ] + ] + }, + { + "name": "inhand-left", + "directions": 4, + "delays": [ + [ + 1 + ], + [ + 1 + ], + [ + 1 + ], + [ + 1 + ] + ] + }, + { + "name": "inhand-right", + "directions": 4, + "delays": [ + [ + 1 + ], + [ + 1 + ], + [ + 1 + ], + [ + 1 + ] + ] + }, + { + "name": "icon", + "directions": 1, + "delays": [ + [ + 1 + ] + ] + } + ] +} diff --git a/Resources/Textures/Clothing/Belt/securitywebbing.rsi/equipped-BELT.png b/Resources/Textures/Clothing/Belt/securitywebbing.rsi/equipped-BELT.png new file mode 100644 index 0000000000..42d3c6a629 Binary files /dev/null and b/Resources/Textures/Clothing/Belt/securitywebbing.rsi/equipped-BELT.png differ diff --git a/Resources/Textures/Clothing/Belt/securitywebbing.rsi/icon.png b/Resources/Textures/Clothing/Belt/securitywebbing.rsi/icon.png new file mode 100644 index 0000000000..6a4bbd21bc Binary files /dev/null and b/Resources/Textures/Clothing/Belt/securitywebbing.rsi/icon.png differ diff --git a/Resources/Textures/Clothing/Belt/securitywebbing.rsi/inhand-left.png b/Resources/Textures/Clothing/Belt/securitywebbing.rsi/inhand-left.png new file mode 100644 index 0000000000..dbce144c60 Binary files /dev/null and b/Resources/Textures/Clothing/Belt/securitywebbing.rsi/inhand-left.png differ diff --git a/Resources/Textures/Clothing/Belt/securitywebbing.rsi/inhand-right.png b/Resources/Textures/Clothing/Belt/securitywebbing.rsi/inhand-right.png new file mode 100644 index 0000000000..8280138ae7 Binary files /dev/null and b/Resources/Textures/Clothing/Belt/securitywebbing.rsi/inhand-right.png differ diff --git a/Resources/Textures/Clothing/Belt/securitywebbing.rsi/meta.json b/Resources/Textures/Clothing/Belt/securitywebbing.rsi/meta.json new file mode 100644 index 0000000000..6fd2d07a08 --- /dev/null +++ b/Resources/Textures/Clothing/Belt/securitywebbing.rsi/meta.json @@ -0,0 +1,74 @@ +{ + "version": 1, + "size": { + "x": 32, + "y": 32 + }, + "license": "CC-BY-SA-3.0", + "copyright": "Taken from tgstation at commit https://github.com/tgstation/tgstation/commit/c838ba21dae97db345e0113f99596decd1d66039", + "states": [ + { + "name": "equipped-BELT", + "directions": 4, + "delays": [ + [ + 1 + ], + [ + 1 + ], + [ + 1 + ], + [ + 1 + ] + ] + }, + { + "name": "inhand-left", + "directions": 4, + "delays": [ + [ + 1 + ], + [ + 1 + ], + [ + 1 + ], + [ + 1 + ] + ] + }, + { + "name": "inhand-right", + "directions": 4, + "delays": [ + [ + 1 + ], + [ + 1 + ], + [ + 1 + ], + [ + 1 + ] + ] + }, + { + "name": "icon", + "directions": 1, + "delays": [ + [ + 1 + ] + ] + } + ] +} diff --git a/Resources/Textures/Clothing/Belt/sheath.rsi/meta.json b/Resources/Textures/Clothing/Belt/sheath.rsi/meta.json new file mode 100644 index 0000000000..f2beb8d38f --- /dev/null +++ b/Resources/Textures/Clothing/Belt/sheath.rsi/meta.json @@ -0,0 +1,65 @@ +{ + "version": 1, + "size": { + "x": 32, + "y": 32 + }, + "license": "CC-BY-SA-3.0", + "copyright": "Taken from tgstation at commit https://github.com/tgstation/tgstation/commit/c838ba21dae97db345e0113f99596decd1d66039", + "states": [ + { + "name": "sheath-equipped-BELT", + "directions": 4, + "delays": [ + [ + 1 + ], + [ + 1 + ], + [ + 1 + ], + [ + 1 + ] + ] + }, + { + "name": "sheath-sabre-equipped-BELT", + "directions": 4, + "delays": [ + [ + 1 + ], + [ + 1 + ], + [ + 1 + ], + [ + 1 + ] + ] + }, + { + "name": "sheath-sabre", + "directions": 1, + "delays": [ + [ + 1 + ] + ] + }, + { + "name": "sheath", + "directions": 1, + "delays": [ + [ + 1 + ] + ] + } + ] +} diff --git a/Resources/Textures/Clothing/Belt/sheath.rsi/sheath-equipped-BELT.png b/Resources/Textures/Clothing/Belt/sheath.rsi/sheath-equipped-BELT.png new file mode 100644 index 0000000000..eb54d79fd5 Binary files /dev/null and b/Resources/Textures/Clothing/Belt/sheath.rsi/sheath-equipped-BELT.png differ diff --git a/Resources/Textures/Clothing/Belt/sheath.rsi/sheath-sabre-equipped-BELT.png b/Resources/Textures/Clothing/Belt/sheath.rsi/sheath-sabre-equipped-BELT.png new file mode 100644 index 0000000000..b11ba9b56b Binary files /dev/null and b/Resources/Textures/Clothing/Belt/sheath.rsi/sheath-sabre-equipped-BELT.png differ diff --git a/Resources/Textures/Clothing/Belt/sheath.rsi/sheath-sabre.png b/Resources/Textures/Clothing/Belt/sheath.rsi/sheath-sabre.png new file mode 100644 index 0000000000..4a7ce37df2 Binary files /dev/null and b/Resources/Textures/Clothing/Belt/sheath.rsi/sheath-sabre.png differ diff --git a/Resources/Textures/Clothing/Belt/sheath.rsi/sheath.png b/Resources/Textures/Clothing/Belt/sheath.rsi/sheath.png new file mode 100644 index 0000000000..5afd4c56b9 Binary files /dev/null and b/Resources/Textures/Clothing/Belt/sheath.rsi/sheath.png differ diff --git a/Resources/Textures/Clothing/Belt/suspenders.rsi/inhand-left.png b/Resources/Textures/Clothing/Belt/suspenders.rsi/inhand-left.png new file mode 100644 index 0000000000..beef58b2e4 Binary files /dev/null and b/Resources/Textures/Clothing/Belt/suspenders.rsi/inhand-left.png differ diff --git a/Resources/Textures/Clothing/Belt/suspenders.rsi/inhand-right.png b/Resources/Textures/Clothing/Belt/suspenders.rsi/inhand-right.png new file mode 100644 index 0000000000..25c1b5429c Binary files /dev/null and b/Resources/Textures/Clothing/Belt/suspenders.rsi/inhand-right.png differ diff --git a/Resources/Textures/Clothing/Belt/suspenders.rsi/meta.json b/Resources/Textures/Clothing/Belt/suspenders.rsi/meta.json index 5618dc6a77..6fd2d07a08 100644 --- a/Resources/Textures/Clothing/Belt/suspenders.rsi/meta.json +++ b/Resources/Textures/Clothing/Belt/suspenders.rsi/meta.json @@ -5,7 +5,7 @@ "y": 32 }, "license": "CC-BY-SA-3.0", - "copyright": "Taken from https://github.com/tgstation", + "copyright": "Taken from tgstation at commit https://github.com/tgstation/tgstation/commit/c838ba21dae97db345e0113f99596decd1d66039", "states": [ { "name": "equipped-BELT", @@ -25,6 +25,42 @@ ] ] }, + { + "name": "inhand-left", + "directions": 4, + "delays": [ + [ + 1 + ], + [ + 1 + ], + [ + 1 + ], + [ + 1 + ] + ] + }, + { + "name": "inhand-right", + "directions": 4, + "delays": [ + [ + 1 + ], + [ + 1 + ], + [ + 1 + ], + [ + 1 + ] + ] + }, { "name": "icon", "directions": 1, diff --git a/Resources/Textures/Clothing/Belt/utility.rsi/equipped-BELT.png b/Resources/Textures/Clothing/Belt/utility.rsi/equipped-BELT.png new file mode 100644 index 0000000000..88351c9e8d Binary files /dev/null and b/Resources/Textures/Clothing/Belt/utility.rsi/equipped-BELT.png differ diff --git a/Resources/Textures/Clothing/Belt/belt_utility.rsi/utilitybelt.png b/Resources/Textures/Clothing/Belt/utility.rsi/icon.png similarity index 100% rename from Resources/Textures/Clothing/Belt/belt_utility.rsi/utilitybelt.png rename to Resources/Textures/Clothing/Belt/utility.rsi/icon.png diff --git a/Resources/Textures/Clothing/Belt/utility.rsi/inhand-left.png b/Resources/Textures/Clothing/Belt/utility.rsi/inhand-left.png new file mode 100644 index 0000000000..ebf6f6ca37 Binary files /dev/null and b/Resources/Textures/Clothing/Belt/utility.rsi/inhand-left.png differ diff --git a/Resources/Textures/Clothing/Belt/utility.rsi/inhand-right.png b/Resources/Textures/Clothing/Belt/utility.rsi/inhand-right.png new file mode 100644 index 0000000000..e13bfa1b5c Binary files /dev/null and b/Resources/Textures/Clothing/Belt/utility.rsi/inhand-right.png differ diff --git a/Resources/Textures/Clothing/Belt/utility.rsi/meta.json b/Resources/Textures/Clothing/Belt/utility.rsi/meta.json new file mode 100644 index 0000000000..d1facf554c --- /dev/null +++ b/Resources/Textures/Clothing/Belt/utility.rsi/meta.json @@ -0,0 +1,38 @@ +{ + "version": 1, + "size": { + "x": 32, + "y": 32 + }, + "license": "CC-BY-SA-3.0", + "copyright": "Taken from tgstation at commit https://github.com/tgstation/tgstation/commit/c838ba21dae97db345e0113f99596decd1d66039", + "states": [ + { + "name": "equipped-BELT", + "directions": 4, + "delays": [ + [ + 1 + ], + [ + 1 + ], + [ + 1 + ], + [ + 1 + ] + ] + }, + { + "name": "icon", + "directions": 1, + "delays": [ + [ + 1 + ] + ] + } + ] +} diff --git a/Resources/Textures/Clothing/Uniforms/color.rsi/meta.json b/Resources/Textures/Clothing/Uniforms/color.rsi/meta.json index 0b4f3ab7f8..b8827ee3b1 100644 --- a/Resources/Textures/Clothing/Uniforms/color.rsi/meta.json +++ b/Resources/Textures/Clothing/Uniforms/color.rsi/meta.json @@ -2,8 +2,10 @@ "version": 1, "size": { "x": 32, - "y": 32 - }, + "y": 32, + }, + "license": "CC-BY-SA-3.0", + "copyright": "Taken from tgstation at commit https://github.com/tgstation/tgstation/commit/d836946e8e85910eaa4d132f70e21bdb9888c171", "states": [ { "name": "black-equipped-INNERCLOTHING", diff --git a/Resources/Textures/Clothing/Uniforms/rainbow.rsi/equipped-INNERCLOTHING.png b/Resources/Textures/Clothing/Uniforms/rainbow.rsi/equipped-INNERCLOTHING.png new file mode 100644 index 0000000000..e89ff84ba5 Binary files /dev/null and b/Resources/Textures/Clothing/Uniforms/rainbow.rsi/equipped-INNERCLOTHING.png differ diff --git a/Resources/Textures/Clothing/Uniforms/rainbow.rsi/icon.png b/Resources/Textures/Clothing/Uniforms/rainbow.rsi/icon.png new file mode 100644 index 0000000000..ed407d3fcc Binary files /dev/null and b/Resources/Textures/Clothing/Uniforms/rainbow.rsi/icon.png differ diff --git a/Resources/Textures/Clothing/Uniforms/rainbow.rsi/inhand-left.png b/Resources/Textures/Clothing/Uniforms/rainbow.rsi/inhand-left.png new file mode 100644 index 0000000000..b587af4579 Binary files /dev/null and b/Resources/Textures/Clothing/Uniforms/rainbow.rsi/inhand-left.png differ diff --git a/Resources/Textures/Clothing/Uniforms/rainbow.rsi/inhand-right.png b/Resources/Textures/Clothing/Uniforms/rainbow.rsi/inhand-right.png new file mode 100644 index 0000000000..b587af4579 Binary files /dev/null and b/Resources/Textures/Clothing/Uniforms/rainbow.rsi/inhand-right.png differ diff --git a/Resources/Textures/Clothing/Uniforms/rainbow.rsi/meta.json b/Resources/Textures/Clothing/Uniforms/rainbow.rsi/meta.json new file mode 100644 index 0000000000..082376bd38 --- /dev/null +++ b/Resources/Textures/Clothing/Uniforms/rainbow.rsi/meta.json @@ -0,0 +1,74 @@ +{ + "version": 1, + "size": { + "x": 32, + "y": 32, + }, + "license": "CC BY-NC-SA 3.0", + "copyright": "Taken from goonstation at commit https://github.com/goonstation/goonstation/commit/4059e4be90832b02b1228b1bee3db342094e4f1e", + "states": [ + { + "name": "equipped-INNERCLOTHING", + "directions": 4, + "delays": [ + [ + 1 + ], + [ + 1 + ], + [ + 1 + ], + [ + 1 + ] + ] + }, + { + "name": "icon", + "directions": 1, + "delays": [ + [ + 1 + ] + ] + }, + { + "name": "inhand-left", + "directions": 4, + "delays": [ + [ + 1 + ], + [ + 1 + ], + [ + 1 + ], + [ + 1 + ] + ] + }, + { + "name": "inhand-right", + "directions": 4, + "delays": [ + [ + 1 + ], + [ + 1 + ], + [ + 1 + ], + [ + 1 + ] + ] + } + ] +} diff --git a/Resources/Textures/Constructible/Linking/switch.rsi/dead.png b/Resources/Textures/Constructible/Linking/switch.rsi/dead.png deleted file mode 100644 index 7b6a4689e3..0000000000 Binary files a/Resources/Textures/Constructible/Linking/switch.rsi/dead.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Linking/switch.rsi/meta.json b/Resources/Textures/Constructible/Linking/switch.rsi/meta.json deleted file mode 100644 index 52e2eb00d2..0000000000 --- a/Resources/Textures/Constructible/Linking/switch.rsi/meta.json +++ /dev/null @@ -1,44 +0,0 @@ -{ - "version": 1, - "size": { - "x": 32, - "y": 32 - }, - "license": "CC-BY-SA-3.0", - "copyright": "Taken from https://github.com/tgstation/tgstation/commit/2f127f8b95220226cdd5be356723f3b849c53acf", - "states": [ - { - "name": "on", - "select": [], - "flags": {}, - "directions": 1, - "delays": [ - [ - 1 - ] - ] - }, - { - "name": "off", - "select": [], - "flags": {}, - "directions": 1, - "delays": [ - [ - 1 - ] - ] - }, - { - "name": "dead", - "select": [], - "flags": {}, - "directions": 1, - "delays": [ - [ - 1 - ] - ] - } - ] -} diff --git a/Resources/Textures/Constructible/Linking/switch.rsi/off.png b/Resources/Textures/Constructible/Linking/switch.rsi/off.png deleted file mode 100644 index 41c50ed6c2..0000000000 Binary files a/Resources/Textures/Constructible/Linking/switch.rsi/off.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Linking/switch.rsi/on.png b/Resources/Textures/Constructible/Linking/switch.rsi/on.png deleted file mode 100644 index 54f9cab603..0000000000 Binary files a/Resources/Textures/Constructible/Linking/switch.rsi/on.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Power/ame_shielding_base.png b/Resources/Textures/Constructible/Power/ame_shielding_base.png deleted file mode 100644 index cd62067877..0000000000 Binary files a/Resources/Textures/Constructible/Power/ame_shielding_base.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Power/switch.rsi/dead.png b/Resources/Textures/Constructible/Power/switch.rsi/dead.png new file mode 100644 index 0000000000..f618c15217 Binary files /dev/null and b/Resources/Textures/Constructible/Power/switch.rsi/dead.png differ diff --git a/Resources/Textures/Constructible/Power/switch.rsi/meta.json b/Resources/Textures/Constructible/Power/switch.rsi/meta.json new file mode 100644 index 0000000000..60c494bd9e --- /dev/null +++ b/Resources/Textures/Constructible/Power/switch.rsi/meta.json @@ -0,0 +1,65 @@ +{ + "version": 1, + "size": { + "x": 32, + "y": 32 + }, + "license": "CC-BY-SA-3.0", + "copyright": "Taken from CEV-Eris at commit 15748b71a1e6d2c547588c653d7c42f18011f7c5", + "states": [ + { + "name": "on", + "directions": 4, + "delays": [ + [ + 1 + ], + [ + 1 + ], + [ + 1 + ], + [ + 1 + ] + ] + }, + { + "name": "off", + "directions": 4, + "delays": [ + [ + 1 + ], + [ + 1 + ], + [ + 1 + ], + [ + 1 + ] + ] + }, + { + "name": "dead", + "directions": 4, + "delays": [ + [ + 1 + ], + [ + 1 + ], + [ + 1 + ], + [ + 1 + ] + ] + } + ] +} diff --git a/Resources/Textures/Constructible/Power/switch.rsi/off.png b/Resources/Textures/Constructible/Power/switch.rsi/off.png new file mode 100644 index 0000000000..6538d8d612 Binary files /dev/null and b/Resources/Textures/Constructible/Power/switch.rsi/off.png differ diff --git a/Resources/Textures/Constructible/Power/switch.rsi/on.png b/Resources/Textures/Constructible/Power/switch.rsi/on.png new file mode 100644 index 0000000000..634f338592 Binary files /dev/null and b/Resources/Textures/Constructible/Power/switch.rsi/on.png differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint.rsi/closed.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint.rsi/closed.png index a69784a26e..01f19f9a01 100644 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint.rsi/closed.png and b/Resources/Textures/Constructible/Structures/Doors/airlock_maint.rsi/closed.png differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint.rsi/closing.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint.rsi/closing.png index 6f047de24b..dd3f170aac 100644 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint.rsi/closing.png and b/Resources/Textures/Constructible/Structures/Doors/airlock_maint.rsi/closing.png differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint.rsi/locked.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint.rsi/locked.png index 776327e501..f5593718e7 100644 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint.rsi/locked.png and b/Resources/Textures/Constructible/Structures/Doors/airlock_maint.rsi/locked.png differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint.rsi/meta.json b/Resources/Textures/Constructible/Structures/Doors/airlock_maint.rsi/meta.json index d1d5eee5b6..147cef6c90 100644 --- a/Resources/Textures/Constructible/Structures/Doors/airlock_maint.rsi/meta.json +++ b/Resources/Textures/Constructible/Structures/Doors/airlock_maint.rsi/meta.json @@ -5,7 +5,7 @@ "y": 32 }, "license": "CC-BY-SA-3.0", - "copyright": "Taken from https://github.com/discordia-space/CEV-Eris/blob/d86e175508b8553ca8396f39f2af7ecec4595375/icons/obj/doors/Doormaint.dmi", + "copyright": "Taken from https://github.com/discordia-space/CEV-Eris/blob/d86e175508b8553ca8396f39f2af7ecec4595375/icons/obj/doors/Doormaint.dmi - modified by rexonaje#5787 on discord", "states": [ { "name": "bolted", diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint.rsi/opening.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint.rsi/opening.png index be620a7d34..68c73a9e99 100644 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint.rsi/opening.png and b/Resources/Textures/Constructible/Structures/Doors/airlock_maint.rsi/opening.png differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint.rsi/spark.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint.rsi/spark.png index 713242fa03..4255358ec8 100644 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint.rsi/spark.png and b/Resources/Textures/Constructible/Structures/Doors/airlock_maint.rsi/spark.png differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_cargo.rsi/bolted.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_cargo.rsi/bolted.png deleted file mode 100644 index 6193905801..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_cargo.rsi/bolted.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_cargo.rsi/closed.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_cargo.rsi/closed.png deleted file mode 100644 index a8bacf8caa..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_cargo.rsi/closed.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_cargo.rsi/closed_unlit.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_cargo.rsi/closed_unlit.png deleted file mode 100644 index 6e3cb09bcf..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_cargo.rsi/closed_unlit.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_cargo.rsi/closing.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_cargo.rsi/closing.png deleted file mode 100644 index 69214c5c6b..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_cargo.rsi/closing.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_cargo.rsi/closing_unlit.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_cargo.rsi/closing_unlit.png deleted file mode 100644 index 86ec2c7391..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_cargo.rsi/closing_unlit.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_cargo.rsi/deny.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_cargo.rsi/deny.png deleted file mode 100644 index dd9042cab7..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_cargo.rsi/deny.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_cargo.rsi/locked.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_cargo.rsi/locked.png deleted file mode 100644 index 04e5e043f3..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_cargo.rsi/locked.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_cargo.rsi/meta.json b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_cargo.rsi/meta.json deleted file mode 100644 index c8a13cb4b2..0000000000 --- a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_cargo.rsi/meta.json +++ /dev/null @@ -1,226 +0,0 @@ -{ - "version": 1, - "size": { - "x": 32, - "y": 32 - }, - "license": "CC-BY-SA-3.0", - "copyright": "Taken from https://github.com/discordia-space/CEV-Eris/blob/d86e175508b8553ca8396f39f2af7ecec4595375/icons/obj/doors/Doormaint_cargo.dmi", - "states": [ - { - "name": "closed", - "directions": 1, - "delays": [ - [ - 1 - ] - ] - }, - { - "name": "locked", - "directions": 1, - "delays": [ - [ - 1 - ] - ] - }, - { - "name": "closed_unlit", - "directions": 1, - "delays": [ - [ - 1 - ] - ] - }, - { - "name": "closing", - "directions": 1, - "delays": [ - [ - 0.2, - 0.1, - 0.1, - 0.1, - 0.1, - 0.6 - ] - ] - }, - { - "name": "closing_unlit", - "directions": 1, - "delays": [ - [ - 0.2, - 0.1, - 0.1, - 0.1, - 0.1, - 0.6 - ] - ] - }, - { - "name": "deny", - "directions": 1, - "delays": [ - [ - 0.1, - 0.1, - 0.1 - ] - ] - }, - { - "name": "bolted", - "directions": 1, - "delays": [ - [ - 1 - ] - ] - }, - { - "name": "open", - "directions": 1, - "delays": [ - [ - 1 - ] - ] - }, - { - "name": "opening", - "directions": 1, - "delays": [ - [ - 0.2, - 0.1, - 0.1, - 0.1, - 0.1, - 0.6 - ] - ] - }, - { - "name": "opening_unlit", - "directions": 1, - "delays": [ - [ - 0.2, - 0.1, - 0.1, - 0.1, - 0.1, - 0.6 - ] - ] - }, - { - "name": "panel_closing", - "directions": 1, - "delays": [ - [ - 0.2, - 0.1, - 0.1, - 0.1, - 0.1, - 0.6 - ] - ] - }, - { - "name": "panel_open", - "directions": 1, - "delays": [ - [ - 1 - ] - ] - }, - { - "name": "panel_opening", - "directions": 1, - "delays": [ - [ - 0.2, - 0.1, - 0.1, - 0.1, - 0.1, - 0.6 - ] - ] - }, - { - "name": "spark", - "directions": 1, - "delays": [ - [ - 0.1, - 0.1, - 0.1, - 0.1, - 0.1, - 0.1 - ] - ] - }, - { - "name": "sparks_broken", - "directions": 1, - "delays": [ - [ - 0.1, - 0.1, - 0.1, - 0.1, - 0.1, - 0.1 - ] - ] - }, - { - "name": "sparks_damaged", - "directions": 1, - "delays": [ - [ - 0.1, - 0.1, - 0.1, - 0.1, - 0.1, - 0.1, - 1.7 - ] - ] - }, - { - "name": "sparks_open", - "directions": 1, - "delays": [ - [ - 0.1, - 0.1, - 0.1, - 0.1, - 0.1, - 0.1 - ] - ] - }, - { - "name": "welded", - "directions": 1, - "delays": [ - [ - 1 - ] - ] - } - ] -} diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_cargo.rsi/open.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_cargo.rsi/open.png deleted file mode 100644 index 353c4154ee..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_cargo.rsi/open.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_cargo.rsi/opening.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_cargo.rsi/opening.png deleted file mode 100644 index 3d072dfeb7..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_cargo.rsi/opening.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_cargo.rsi/opening_unlit.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_cargo.rsi/opening_unlit.png deleted file mode 100644 index 553066879d..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_cargo.rsi/opening_unlit.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_cargo.rsi/panel_closing.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_cargo.rsi/panel_closing.png deleted file mode 100644 index 8e330fb236..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_cargo.rsi/panel_closing.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_cargo.rsi/panel_open.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_cargo.rsi/panel_open.png deleted file mode 100644 index 6a72875dc7..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_cargo.rsi/panel_open.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_cargo.rsi/panel_opening.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_cargo.rsi/panel_opening.png deleted file mode 100644 index 8e7cf11e89..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_cargo.rsi/panel_opening.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_cargo.rsi/spark.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_cargo.rsi/spark.png deleted file mode 100644 index 4f1ad16e5f..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_cargo.rsi/spark.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_cargo.rsi/sparks_broken.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_cargo.rsi/sparks_broken.png deleted file mode 100644 index 400d23ef7a..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_cargo.rsi/sparks_broken.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_cargo.rsi/sparks_damaged.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_cargo.rsi/sparks_damaged.png deleted file mode 100644 index d8012e8498..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_cargo.rsi/sparks_damaged.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_cargo.rsi/sparks_open.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_cargo.rsi/sparks_open.png deleted file mode 100644 index c005f84951..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_cargo.rsi/sparks_open.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_cargo.rsi/welded.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_cargo.rsi/welded.png deleted file mode 100644 index 47e0354168..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_cargo.rsi/welded.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_command.rsi/bolted.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_command.rsi/bolted.png deleted file mode 100644 index 6193905801..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_command.rsi/bolted.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_command.rsi/closed.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_command.rsi/closed.png deleted file mode 100644 index a1796f9b12..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_command.rsi/closed.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_command.rsi/closed_unlit.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_command.rsi/closed_unlit.png deleted file mode 100644 index 6e3cb09bcf..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_command.rsi/closed_unlit.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_command.rsi/closing.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_command.rsi/closing.png deleted file mode 100644 index 01bb9a31bd..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_command.rsi/closing.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_command.rsi/closing_unlit.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_command.rsi/closing_unlit.png deleted file mode 100644 index 86ec2c7391..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_command.rsi/closing_unlit.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_command.rsi/deny.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_command.rsi/deny.png deleted file mode 100644 index dd9042cab7..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_command.rsi/deny.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_command.rsi/locked.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_command.rsi/locked.png deleted file mode 100644 index a38fef22ee..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_command.rsi/locked.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_command.rsi/meta.json b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_command.rsi/meta.json deleted file mode 100644 index c4992e01b6..0000000000 --- a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_command.rsi/meta.json +++ /dev/null @@ -1,226 +0,0 @@ -{ - "version": 1, - "size": { - "x": 32, - "y": 32 - }, - "license": "CC-BY-SA-3.0", - "copyright": "Taken from https://github.com/discordia-space/CEV-Eris/blob/d86e175508b8553ca8396f39f2af7ecec4595375/icons/obj/doors/Doormaint_command.dmi", - "states": [ - { - "name": "closed", - "directions": 1, - "delays": [ - [ - 1 - ] - ] - }, - { - "name": "locked", - "directions": 1, - "delays": [ - [ - 1 - ] - ] - }, - { - "name": "closed_unlit", - "directions": 1, - "delays": [ - [ - 1 - ] - ] - }, - { - "name": "closing", - "directions": 1, - "delays": [ - [ - 0.2, - 0.1, - 0.1, - 0.1, - 0.1, - 0.6 - ] - ] - }, - { - "name": "closing_unlit", - "directions": 1, - "delays": [ - [ - 0.2, - 0.1, - 0.1, - 0.1, - 0.1, - 0.6 - ] - ] - }, - { - "name": "deny", - "directions": 1, - "delays": [ - [ - 0.1, - 0.1, - 0.1 - ] - ] - }, - { - "name": "bolted", - "directions": 1, - "delays": [ - [ - 1 - ] - ] - }, - { - "name": "open", - "directions": 1, - "delays": [ - [ - 1 - ] - ] - }, - { - "name": "opening", - "directions": 1, - "delays": [ - [ - 0.2, - 0.1, - 0.1, - 0.1, - 0.1, - 0.6 - ] - ] - }, - { - "name": "opening_unlit", - "directions": 1, - "delays": [ - [ - 0.2, - 0.1, - 0.1, - 0.1, - 0.1, - 0.6 - ] - ] - }, - { - "name": "panel_closing", - "directions": 1, - "delays": [ - [ - 0.2, - 0.1, - 0.1, - 0.1, - 0.1, - 0.6 - ] - ] - }, - { - "name": "panel_open", - "directions": 1, - "delays": [ - [ - 1 - ] - ] - }, - { - "name": "panel_opening", - "directions": 1, - "delays": [ - [ - 0.2, - 0.1, - 0.1, - 0.1, - 0.1, - 0.6 - ] - ] - }, - { - "name": "spark", - "directions": 1, - "delays": [ - [ - 0.1, - 0.1, - 0.1, - 0.1, - 0.1, - 0.1 - ] - ] - }, - { - "name": "sparks_broken", - "directions": 1, - "delays": [ - [ - 0.1, - 0.1, - 0.1, - 0.1, - 0.1, - 0.1 - ] - ] - }, - { - "name": "sparks_damaged", - "directions": 1, - "delays": [ - [ - 0.1, - 0.1, - 0.1, - 0.1, - 0.1, - 0.1, - 1.7 - ] - ] - }, - { - "name": "sparks_open", - "directions": 1, - "delays": [ - [ - 0.1, - 0.1, - 0.1, - 0.1, - 0.1, - 0.1 - ] - ] - }, - { - "name": "welded", - "directions": 1, - "delays": [ - [ - 1 - ] - ] - } - ] -} diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_command.rsi/open.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_command.rsi/open.png deleted file mode 100644 index 63b5e4f141..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_command.rsi/open.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_command.rsi/opening.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_command.rsi/opening.png deleted file mode 100644 index 8b20b98271..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_command.rsi/opening.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_command.rsi/opening_unlit.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_command.rsi/opening_unlit.png deleted file mode 100644 index 553066879d..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_command.rsi/opening_unlit.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_command.rsi/panel_closing.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_command.rsi/panel_closing.png deleted file mode 100644 index d10b5345e1..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_command.rsi/panel_closing.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_command.rsi/panel_open.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_command.rsi/panel_open.png deleted file mode 100644 index 6a72875dc7..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_command.rsi/panel_open.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_command.rsi/panel_opening.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_command.rsi/panel_opening.png deleted file mode 100644 index cc2dce5941..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_command.rsi/panel_opening.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_command.rsi/spark.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_command.rsi/spark.png deleted file mode 100644 index 7ccd97b4c6..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_command.rsi/spark.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_command.rsi/sparks_broken.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_command.rsi/sparks_broken.png deleted file mode 100644 index 400d23ef7a..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_command.rsi/sparks_broken.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_command.rsi/sparks_damaged.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_command.rsi/sparks_damaged.png deleted file mode 100644 index d8012e8498..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_command.rsi/sparks_damaged.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_command.rsi/sparks_open.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_command.rsi/sparks_open.png deleted file mode 100644 index c005f84951..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_command.rsi/sparks_open.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_command.rsi/welded.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_command.rsi/welded.png deleted file mode 100644 index 47e0354168..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_command.rsi/welded.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_common.rsi/bolted.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_common.rsi/bolted.png deleted file mode 100644 index 6193905801..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_common.rsi/bolted.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_common.rsi/closed.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_common.rsi/closed.png deleted file mode 100644 index f0e4495acb..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_common.rsi/closed.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_common.rsi/closed_unlit.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_common.rsi/closed_unlit.png deleted file mode 100644 index 6e3cb09bcf..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_common.rsi/closed_unlit.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_common.rsi/closing.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_common.rsi/closing.png deleted file mode 100644 index 8e7cf85eb4..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_common.rsi/closing.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_common.rsi/closing_unlit.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_common.rsi/closing_unlit.png deleted file mode 100644 index 86ec2c7391..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_common.rsi/closing_unlit.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_common.rsi/deny.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_common.rsi/deny.png deleted file mode 100644 index dd9042cab7..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_common.rsi/deny.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_common.rsi/locked.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_common.rsi/locked.png deleted file mode 100644 index a15e3a27fb..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_common.rsi/locked.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_common.rsi/meta.json b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_common.rsi/meta.json deleted file mode 100644 index fdeaa68851..0000000000 --- a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_common.rsi/meta.json +++ /dev/null @@ -1,226 +0,0 @@ -{ - "version": 1, - "size": { - "x": 32, - "y": 32 - }, - "license": "CC-BY-SA-3.0", - "copyright": "Taken from https://github.com/discordia-space/CEV-Eris/blob/d86e175508b8553ca8396f39f2af7ecec4595375/icons/obj/doors/Doormaint_common.dmi", - "states": [ - { - "name": "closed", - "directions": 1, - "delays": [ - [ - 1 - ] - ] - }, - { - "name": "locked", - "directions": 1, - "delays": [ - [ - 1 - ] - ] - }, - { - "name": "closed_unlit", - "directions": 1, - "delays": [ - [ - 1 - ] - ] - }, - { - "name": "closing", - "directions": 1, - "delays": [ - [ - 0.2, - 0.1, - 0.1, - 0.1, - 0.1, - 0.6 - ] - ] - }, - { - "name": "closing_unlit", - "directions": 1, - "delays": [ - [ - 0.2, - 0.1, - 0.1, - 0.1, - 0.1, - 0.6 - ] - ] - }, - { - "name": "deny", - "directions": 1, - "delays": [ - [ - 0.1, - 0.1, - 0.1 - ] - ] - }, - { - "name": "bolted", - "directions": 1, - "delays": [ - [ - 1 - ] - ] - }, - { - "name": "open", - "directions": 1, - "delays": [ - [ - 1 - ] - ] - }, - { - "name": "opening", - "directions": 1, - "delays": [ - [ - 0.2, - 0.1, - 0.1, - 0.1, - 0.1, - 0.6 - ] - ] - }, - { - "name": "opening_unlit", - "directions": 1, - "delays": [ - [ - 0.2, - 0.1, - 0.1, - 0.1, - 0.1, - 0.6 - ] - ] - }, - { - "name": "panel_closing", - "directions": 1, - "delays": [ - [ - 0.2, - 0.1, - 0.1, - 0.1, - 0.1, - 0.6 - ] - ] - }, - { - "name": "panel_open", - "directions": 1, - "delays": [ - [ - 1 - ] - ] - }, - { - "name": "panel_opening", - "directions": 1, - "delays": [ - [ - 0.2, - 0.1, - 0.1, - 0.1, - 0.1, - 0.6 - ] - ] - }, - { - "name": "spark", - "directions": 1, - "delays": [ - [ - 0.1, - 0.1, - 0.1, - 0.1, - 0.1, - 0.1 - ] - ] - }, - { - "name": "sparks_broken", - "directions": 1, - "delays": [ - [ - 0.1, - 0.1, - 0.1, - 0.1, - 0.1, - 0.1 - ] - ] - }, - { - "name": "sparks_damaged", - "directions": 1, - "delays": [ - [ - 0.1, - 0.1, - 0.1, - 0.1, - 0.1, - 0.1, - 1.7 - ] - ] - }, - { - "name": "sparks_open", - "directions": 1, - "delays": [ - [ - 0.1, - 0.1, - 0.1, - 0.1, - 0.1, - 0.1 - ] - ] - }, - { - "name": "welded", - "directions": 1, - "delays": [ - [ - 1 - ] - ] - } - ] -} diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_common.rsi/open.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_common.rsi/open.png deleted file mode 100644 index 402311c080..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_common.rsi/open.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_common.rsi/opening.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_common.rsi/opening.png deleted file mode 100644 index 6de5fb5d7d..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_common.rsi/opening.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_common.rsi/opening_unlit.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_common.rsi/opening_unlit.png deleted file mode 100644 index 553066879d..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_common.rsi/opening_unlit.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_common.rsi/panel_closing.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_common.rsi/panel_closing.png deleted file mode 100644 index 8e330fb236..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_common.rsi/panel_closing.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_common.rsi/panel_open.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_common.rsi/panel_open.png deleted file mode 100644 index 6a72875dc7..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_common.rsi/panel_open.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_common.rsi/panel_opening.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_common.rsi/panel_opening.png deleted file mode 100644 index 8e7cf11e89..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_common.rsi/panel_opening.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_common.rsi/spark.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_common.rsi/spark.png deleted file mode 100644 index 27e7c64a47..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_common.rsi/spark.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_common.rsi/sparks_broken.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_common.rsi/sparks_broken.png deleted file mode 100644 index 400d23ef7a..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_common.rsi/sparks_broken.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_common.rsi/sparks_damaged.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_common.rsi/sparks_damaged.png deleted file mode 100644 index d8012e8498..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_common.rsi/sparks_damaged.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_common.rsi/sparks_open.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_common.rsi/sparks_open.png deleted file mode 100644 index c005f84951..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_common.rsi/sparks_open.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_common.rsi/welded.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_common.rsi/welded.png deleted file mode 100644 index 47e0354168..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_common.rsi/welded.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_engi.rsi/bolted.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_engi.rsi/bolted.png deleted file mode 100644 index 6193905801..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_engi.rsi/bolted.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_engi.rsi/closed.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_engi.rsi/closed.png deleted file mode 100644 index 125588f8b0..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_engi.rsi/closed.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_engi.rsi/closed_unlit.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_engi.rsi/closed_unlit.png deleted file mode 100644 index 6e3cb09bcf..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_engi.rsi/closed_unlit.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_engi.rsi/closing.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_engi.rsi/closing.png deleted file mode 100644 index 14b9e60710..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_engi.rsi/closing.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_engi.rsi/closing_unlit.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_engi.rsi/closing_unlit.png deleted file mode 100644 index 86ec2c7391..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_engi.rsi/closing_unlit.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_engi.rsi/deny.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_engi.rsi/deny.png deleted file mode 100644 index dd9042cab7..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_engi.rsi/deny.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_engi.rsi/locked.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_engi.rsi/locked.png deleted file mode 100644 index 82f5e1d4ba..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_engi.rsi/locked.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_engi.rsi/meta.json b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_engi.rsi/meta.json deleted file mode 100644 index fa227896f1..0000000000 --- a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_engi.rsi/meta.json +++ /dev/null @@ -1,226 +0,0 @@ -{ - "version": 1, - "size": { - "x": 32, - "y": 32 - }, - "license": "CC-BY-SA-3.0", - "copyright": "Taken from https://github.com/discordia-space/CEV-Eris/blob/d86e175508b8553ca8396f39f2af7ecec4595375/icons/obj/doors/Doormaint_engi.dmi", - "states": [ - { - "name": "closed", - "directions": 1, - "delays": [ - [ - 1 - ] - ] - }, - { - "name": "locked", - "directions": 1, - "delays": [ - [ - 1 - ] - ] - }, - { - "name": "closed_unlit", - "directions": 1, - "delays": [ - [ - 1 - ] - ] - }, - { - "name": "closing", - "directions": 1, - "delays": [ - [ - 0.2, - 0.1, - 0.1, - 0.1, - 0.1, - 0.6 - ] - ] - }, - { - "name": "closing_unlit", - "directions": 1, - "delays": [ - [ - 0.2, - 0.1, - 0.1, - 0.1, - 0.1, - 0.6 - ] - ] - }, - { - "name": "deny", - "directions": 1, - "delays": [ - [ - 0.1, - 0.1, - 0.1 - ] - ] - }, - { - "name": "bolted", - "directions": 1, - "delays": [ - [ - 1 - ] - ] - }, - { - "name": "open", - "directions": 1, - "delays": [ - [ - 1 - ] - ] - }, - { - "name": "opening", - "directions": 1, - "delays": [ - [ - 0.2, - 0.1, - 0.1, - 0.1, - 0.1, - 0.6 - ] - ] - }, - { - "name": "opening_unlit", - "directions": 1, - "delays": [ - [ - 0.2, - 0.1, - 0.1, - 0.1, - 0.1, - 0.6 - ] - ] - }, - { - "name": "panel_closing", - "directions": 1, - "delays": [ - [ - 0.2, - 0.1, - 0.1, - 0.1, - 0.1, - 0.6 - ] - ] - }, - { - "name": "panel_open", - "directions": 1, - "delays": [ - [ - 1 - ] - ] - }, - { - "name": "panel_opening", - "directions": 1, - "delays": [ - [ - 0.2, - 0.1, - 0.1, - 0.1, - 0.1, - 0.6 - ] - ] - }, - { - "name": "spark", - "directions": 1, - "delays": [ - [ - 0.1, - 0.1, - 0.1, - 0.1, - 0.1, - 0.1 - ] - ] - }, - { - "name": "sparks_broken", - "directions": 1, - "delays": [ - [ - 0.1, - 0.1, - 0.1, - 0.1, - 0.1, - 0.1 - ] - ] - }, - { - "name": "sparks_damaged", - "directions": 1, - "delays": [ - [ - 0.1, - 0.1, - 0.1, - 0.1, - 0.1, - 0.1, - 1.7 - ] - ] - }, - { - "name": "sparks_open", - "directions": 1, - "delays": [ - [ - 0.1, - 0.1, - 0.1, - 0.1, - 0.1, - 0.1 - ] - ] - }, - { - "name": "welded", - "directions": 1, - "delays": [ - [ - 1 - ] - ] - } - ] -} diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_engi.rsi/open.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_engi.rsi/open.png deleted file mode 100644 index 316fbd463e..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_engi.rsi/open.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_engi.rsi/opening.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_engi.rsi/opening.png deleted file mode 100644 index 76be708a39..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_engi.rsi/opening.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_engi.rsi/opening_unlit.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_engi.rsi/opening_unlit.png deleted file mode 100644 index 553066879d..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_engi.rsi/opening_unlit.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_engi.rsi/panel_closing.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_engi.rsi/panel_closing.png deleted file mode 100644 index 8e330fb236..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_engi.rsi/panel_closing.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_engi.rsi/panel_open.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_engi.rsi/panel_open.png deleted file mode 100644 index 6a72875dc7..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_engi.rsi/panel_open.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_engi.rsi/panel_opening.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_engi.rsi/panel_opening.png deleted file mode 100644 index 8e7cf11e89..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_engi.rsi/panel_opening.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_engi.rsi/spark.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_engi.rsi/spark.png deleted file mode 100644 index b9b7c7df00..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_engi.rsi/spark.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_engi.rsi/sparks_broken.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_engi.rsi/sparks_broken.png deleted file mode 100644 index 400d23ef7a..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_engi.rsi/sparks_broken.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_engi.rsi/sparks_damaged.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_engi.rsi/sparks_damaged.png deleted file mode 100644 index d8012e8498..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_engi.rsi/sparks_damaged.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_engi.rsi/sparks_open.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_engi.rsi/sparks_open.png deleted file mode 100644 index c005f84951..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_engi.rsi/sparks_open.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_engi.rsi/welded.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_engi.rsi/welded.png deleted file mode 100644 index 47e0354168..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_engi.rsi/welded.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_int.rsi/bolted.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_int.rsi/bolted.png deleted file mode 100644 index 6193905801..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_int.rsi/bolted.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_int.rsi/closed.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_int.rsi/closed.png deleted file mode 100644 index 574d917a17..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_int.rsi/closed.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_int.rsi/closed_unlit.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_int.rsi/closed_unlit.png deleted file mode 100644 index 6e3cb09bcf..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_int.rsi/closed_unlit.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_int.rsi/closing.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_int.rsi/closing.png deleted file mode 100644 index 5f01d502a4..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_int.rsi/closing.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_int.rsi/closing_unlit.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_int.rsi/closing_unlit.png deleted file mode 100644 index 86ec2c7391..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_int.rsi/closing_unlit.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_int.rsi/deny.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_int.rsi/deny.png deleted file mode 100644 index dd9042cab7..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_int.rsi/deny.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_int.rsi/locked.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_int.rsi/locked.png deleted file mode 100644 index 40507b2a70..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_int.rsi/locked.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_int.rsi/meta.json b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_int.rsi/meta.json deleted file mode 100644 index 053988e992..0000000000 --- a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_int.rsi/meta.json +++ /dev/null @@ -1,226 +0,0 @@ -{ - "version": 1, - "size": { - "x": 32, - "y": 32 - }, - "license": "CC-BY-SA-3.0", - "copyright": "Taken from https://github.com/discordia-space/CEV-Eris/blob/d86e175508b8553ca8396f39f2af7ecec4595375/icons/obj/doors/Doormaint_int.dmi", - "states": [ - { - "name": "closed", - "directions": 1, - "delays": [ - [ - 1 - ] - ] - }, - { - "name": "locked", - "directions": 1, - "delays": [ - [ - 1 - ] - ] - }, - { - "name": "closed_unlit", - "directions": 1, - "delays": [ - [ - 1 - ] - ] - }, - { - "name": "closing", - "directions": 1, - "delays": [ - [ - 0.2, - 0.1, - 0.1, - 0.1, - 0.1, - 0.6 - ] - ] - }, - { - "name": "closing_unlit", - "directions": 1, - "delays": [ - [ - 0.2, - 0.1, - 0.1, - 0.1, - 0.1, - 0.6 - ] - ] - }, - { - "name": "deny", - "directions": 1, - "delays": [ - [ - 0.1, - 0.1, - 0.1 - ] - ] - }, - { - "name": "bolted", - "directions": 1, - "delays": [ - [ - 1 - ] - ] - }, - { - "name": "open", - "directions": 1, - "delays": [ - [ - 1 - ] - ] - }, - { - "name": "opening", - "directions": 1, - "delays": [ - [ - 0.2, - 0.1, - 0.1, - 0.1, - 0.1, - 0.6 - ] - ] - }, - { - "name": "opening_unlit", - "directions": 1, - "delays": [ - [ - 0.2, - 0.1, - 0.1, - 0.1, - 0.1, - 0.6 - ] - ] - }, - { - "name": "panel_closing", - "directions": 1, - "delays": [ - [ - 0.2, - 0.1, - 0.1, - 0.1, - 0.1, - 0.6 - ] - ] - }, - { - "name": "panel_open", - "directions": 1, - "delays": [ - [ - 1 - ] - ] - }, - { - "name": "panel_opening", - "directions": 1, - "delays": [ - [ - 0.2, - 0.1, - 0.1, - 0.1, - 0.1, - 0.6 - ] - ] - }, - { - "name": "spark", - "directions": 1, - "delays": [ - [ - 0.1, - 0.1, - 0.1, - 0.1, - 0.1, - 0.1 - ] - ] - }, - { - "name": "sparks_broken", - "directions": 1, - "delays": [ - [ - 0.1, - 0.1, - 0.1, - 0.1, - 0.1, - 0.1 - ] - ] - }, - { - "name": "sparks_damaged", - "directions": 1, - "delays": [ - [ - 0.1, - 0.1, - 0.1, - 0.1, - 0.1, - 0.1, - 1.7 - ] - ] - }, - { - "name": "sparks_open", - "directions": 1, - "delays": [ - [ - 0.1, - 0.1, - 0.1, - 0.1, - 0.1, - 0.1 - ] - ] - }, - { - "name": "welded", - "directions": 1, - "delays": [ - [ - 1 - ] - ] - } - ] -} diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_int.rsi/open.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_int.rsi/open.png deleted file mode 100644 index 402311c080..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_int.rsi/open.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_int.rsi/opening.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_int.rsi/opening.png deleted file mode 100644 index 4393aace1a..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_int.rsi/opening.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_int.rsi/opening_unlit.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_int.rsi/opening_unlit.png deleted file mode 100644 index 553066879d..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_int.rsi/opening_unlit.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_int.rsi/panel_closing.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_int.rsi/panel_closing.png deleted file mode 100644 index 8e330fb236..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_int.rsi/panel_closing.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_int.rsi/panel_open.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_int.rsi/panel_open.png deleted file mode 100644 index 6a72875dc7..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_int.rsi/panel_open.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_int.rsi/panel_opening.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_int.rsi/panel_opening.png deleted file mode 100644 index 8e7cf11e89..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_int.rsi/panel_opening.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_int.rsi/spark.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_int.rsi/spark.png deleted file mode 100644 index 49d5e08d33..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_int.rsi/spark.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_int.rsi/sparks_broken.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_int.rsi/sparks_broken.png deleted file mode 100644 index 400d23ef7a..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_int.rsi/sparks_broken.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_int.rsi/sparks_damaged.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_int.rsi/sparks_damaged.png deleted file mode 100644 index d8012e8498..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_int.rsi/sparks_damaged.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_int.rsi/sparks_open.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_int.rsi/sparks_open.png deleted file mode 100644 index c005f84951..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_int.rsi/sparks_open.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_int.rsi/welded.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_int.rsi/welded.png deleted file mode 100644 index 47e0354168..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_int.rsi/welded.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_med.rsi/bolted.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_med.rsi/bolted.png deleted file mode 100644 index 6193905801..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_med.rsi/bolted.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_med.rsi/closed.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_med.rsi/closed.png deleted file mode 100644 index 5708dac8d4..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_med.rsi/closed.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_med.rsi/closed_unlit.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_med.rsi/closed_unlit.png deleted file mode 100644 index 6e3cb09bcf..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_med.rsi/closed_unlit.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_med.rsi/closing.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_med.rsi/closing.png deleted file mode 100644 index 7ba2c23244..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_med.rsi/closing.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_med.rsi/closing_unlit.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_med.rsi/closing_unlit.png deleted file mode 100644 index 86ec2c7391..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_med.rsi/closing_unlit.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_med.rsi/deny.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_med.rsi/deny.png deleted file mode 100644 index dd9042cab7..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_med.rsi/deny.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_med.rsi/locked.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_med.rsi/locked.png deleted file mode 100644 index b7b7fd59ec..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_med.rsi/locked.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_med.rsi/meta.json b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_med.rsi/meta.json deleted file mode 100644 index fdcc8fb389..0000000000 --- a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_med.rsi/meta.json +++ /dev/null @@ -1,226 +0,0 @@ -{ - "version": 1, - "size": { - "x": 32, - "y": 32 - }, - "license": "CC-BY-SA-3.0", - "copyright": "Taken from https://github.com/discordia-space/CEV-Eris/blob/d86e175508b8553ca8396f39f2af7ecec4595375/icons/obj/doors/Doormaint_med.dmi", - "states": [ - { - "name": "closed", - "directions": 1, - "delays": [ - [ - 1 - ] - ] - }, - { - "name": "locked", - "directions": 1, - "delays": [ - [ - 1 - ] - ] - }, - { - "name": "closed_unlit", - "directions": 1, - "delays": [ - [ - 1 - ] - ] - }, - { - "name": "closing", - "directions": 1, - "delays": [ - [ - 0.2, - 0.1, - 0.1, - 0.1, - 0.1, - 0.6 - ] - ] - }, - { - "name": "closing_unlit", - "directions": 1, - "delays": [ - [ - 0.2, - 0.1, - 0.1, - 0.1, - 0.1, - 0.6 - ] - ] - }, - { - "name": "deny", - "directions": 1, - "delays": [ - [ - 0.1, - 0.1, - 0.1 - ] - ] - }, - { - "name": "bolted", - "directions": 1, - "delays": [ - [ - 1 - ] - ] - }, - { - "name": "open", - "directions": 1, - "delays": [ - [ - 1 - ] - ] - }, - { - "name": "opening", - "directions": 1, - "delays": [ - [ - 0.2, - 0.1, - 0.1, - 0.1, - 0.1, - 0.6 - ] - ] - }, - { - "name": "opening_unlit", - "directions": 1, - "delays": [ - [ - 0.2, - 0.1, - 0.1, - 0.1, - 0.1, - 0.6 - ] - ] - }, - { - "name": "panel_closing", - "directions": 1, - "delays": [ - [ - 0.2, - 0.1, - 0.1, - 0.1, - 0.1, - 0.6 - ] - ] - }, - { - "name": "panel_open", - "directions": 1, - "delays": [ - [ - 1 - ] - ] - }, - { - "name": "panel_opening", - "directions": 1, - "delays": [ - [ - 0.2, - 0.1, - 0.1, - 0.1, - 0.1, - 0.6 - ] - ] - }, - { - "name": "spark", - "directions": 1, - "delays": [ - [ - 0.1, - 0.1, - 0.1, - 0.1, - 0.1, - 0.1 - ] - ] - }, - { - "name": "sparks_broken", - "directions": 1, - "delays": [ - [ - 0.1, - 0.1, - 0.1, - 0.1, - 0.1, - 0.1 - ] - ] - }, - { - "name": "sparks_damaged", - "directions": 1, - "delays": [ - [ - 0.1, - 0.1, - 0.1, - 0.1, - 0.1, - 0.1, - 1.7 - ] - ] - }, - { - "name": "sparks_open", - "directions": 1, - "delays": [ - [ - 0.1, - 0.1, - 0.1, - 0.1, - 0.1, - 0.1 - ] - ] - }, - { - "name": "welded", - "directions": 1, - "delays": [ - [ - 1 - ] - ] - } - ] -} diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_med.rsi/open.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_med.rsi/open.png deleted file mode 100644 index 4c4d73680e..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_med.rsi/open.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_med.rsi/opening.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_med.rsi/opening.png deleted file mode 100644 index c0bb042b00..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_med.rsi/opening.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_med.rsi/opening_unlit.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_med.rsi/opening_unlit.png deleted file mode 100644 index 553066879d..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_med.rsi/opening_unlit.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_med.rsi/panel_closing.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_med.rsi/panel_closing.png deleted file mode 100644 index 8e330fb236..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_med.rsi/panel_closing.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_med.rsi/panel_open.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_med.rsi/panel_open.png deleted file mode 100644 index 6a72875dc7..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_med.rsi/panel_open.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_med.rsi/panel_opening.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_med.rsi/panel_opening.png deleted file mode 100644 index 8e7cf11e89..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_med.rsi/panel_opening.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_med.rsi/spark.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_med.rsi/spark.png deleted file mode 100644 index 36ecca434a..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_med.rsi/spark.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_med.rsi/sparks_broken.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_med.rsi/sparks_broken.png deleted file mode 100644 index 400d23ef7a..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_med.rsi/sparks_broken.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_med.rsi/sparks_damaged.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_med.rsi/sparks_damaged.png deleted file mode 100644 index d8012e8498..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_med.rsi/sparks_damaged.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_med.rsi/sparks_open.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_med.rsi/sparks_open.png deleted file mode 100644 index c005f84951..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_med.rsi/sparks_open.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_med.rsi/welded.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_med.rsi/welded.png deleted file mode 100644 index 47e0354168..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_med.rsi/welded.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_rnd.rsi/bolted.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_rnd.rsi/bolted.png deleted file mode 100644 index 6193905801..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_rnd.rsi/bolted.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_rnd.rsi/closed.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_rnd.rsi/closed.png deleted file mode 100644 index 14a3299b7f..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_rnd.rsi/closed.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_rnd.rsi/closed_unlit.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_rnd.rsi/closed_unlit.png deleted file mode 100644 index 6e3cb09bcf..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_rnd.rsi/closed_unlit.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_rnd.rsi/closing.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_rnd.rsi/closing.png deleted file mode 100644 index 685cc6aeb2..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_rnd.rsi/closing.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_rnd.rsi/closing_unlit.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_rnd.rsi/closing_unlit.png deleted file mode 100644 index 86ec2c7391..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_rnd.rsi/closing_unlit.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_rnd.rsi/deny.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_rnd.rsi/deny.png deleted file mode 100644 index dd9042cab7..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_rnd.rsi/deny.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_rnd.rsi/locked.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_rnd.rsi/locked.png deleted file mode 100644 index a4aa14dc46..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_rnd.rsi/locked.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_rnd.rsi/meta.json b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_rnd.rsi/meta.json deleted file mode 100644 index 07d4fbd708..0000000000 --- a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_rnd.rsi/meta.json +++ /dev/null @@ -1,226 +0,0 @@ -{ - "version": 1, - "size": { - "x": 32, - "y": 32 - }, - "license": "CC-BY-SA-3.0", - "copyright": "Taken from https://github.com/discordia-space/CEV-Eris/blob/d86e175508b8553ca8396f39f2af7ecec4595375/icons/obj/doors/Doormaint_rnd.dmi", - "states": [ - { - "name": "closed", - "directions": 1, - "delays": [ - [ - 1 - ] - ] - }, - { - "name": "locked", - "directions": 1, - "delays": [ - [ - 1 - ] - ] - }, - { - "name": "closed_unlit", - "directions": 1, - "delays": [ - [ - 1 - ] - ] - }, - { - "name": "closing", - "directions": 1, - "delays": [ - [ - 0.2, - 0.1, - 0.1, - 0.1, - 0.1, - 0.6 - ] - ] - }, - { - "name": "closing_unlit", - "directions": 1, - "delays": [ - [ - 0.2, - 0.1, - 0.1, - 0.1, - 0.1, - 0.6 - ] - ] - }, - { - "name": "deny", - "directions": 1, - "delays": [ - [ - 0.1, - 0.1, - 0.1 - ] - ] - }, - { - "name": "bolted", - "directions": 1, - "delays": [ - [ - 1 - ] - ] - }, - { - "name": "open", - "directions": 1, - "delays": [ - [ - 1 - ] - ] - }, - { - "name": "opening", - "directions": 1, - "delays": [ - [ - 0.2, - 0.1, - 0.1, - 0.1, - 0.1, - 0.6 - ] - ] - }, - { - "name": "opening_unlit", - "directions": 1, - "delays": [ - [ - 0.2, - 0.1, - 0.1, - 0.1, - 0.1, - 0.6 - ] - ] - }, - { - "name": "panel_closing", - "directions": 1, - "delays": [ - [ - 0.2, - 0.1, - 0.1, - 0.1, - 0.1, - 0.6 - ] - ] - }, - { - "name": "panel_open", - "directions": 1, - "delays": [ - [ - 1 - ] - ] - }, - { - "name": "panel_opening", - "directions": 1, - "delays": [ - [ - 0.2, - 0.1, - 0.1, - 0.1, - 0.1, - 0.6 - ] - ] - }, - { - "name": "spark", - "directions": 1, - "delays": [ - [ - 0.1, - 0.1, - 0.1, - 0.1, - 0.1, - 0.1 - ] - ] - }, - { - "name": "sparks_broken", - "directions": 1, - "delays": [ - [ - 0.1, - 0.1, - 0.1, - 0.1, - 0.1, - 0.1 - ] - ] - }, - { - "name": "sparks_damaged", - "directions": 1, - "delays": [ - [ - 0.1, - 0.1, - 0.1, - 0.1, - 0.1, - 0.1, - 1.7 - ] - ] - }, - { - "name": "sparks_open", - "directions": 1, - "delays": [ - [ - 0.1, - 0.1, - 0.1, - 0.1, - 0.1, - 0.1 - ] - ] - }, - { - "name": "welded", - "directions": 1, - "delays": [ - [ - 1 - ] - ] - } - ] -} diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_rnd.rsi/open.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_rnd.rsi/open.png deleted file mode 100644 index 7645023c03..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_rnd.rsi/open.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_rnd.rsi/opening.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_rnd.rsi/opening.png deleted file mode 100644 index c0389325ac..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_rnd.rsi/opening.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_rnd.rsi/opening_unlit.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_rnd.rsi/opening_unlit.png deleted file mode 100644 index 553066879d..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_rnd.rsi/opening_unlit.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_rnd.rsi/panel_closing.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_rnd.rsi/panel_closing.png deleted file mode 100644 index 8e330fb236..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_rnd.rsi/panel_closing.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_rnd.rsi/panel_open.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_rnd.rsi/panel_open.png deleted file mode 100644 index 6a72875dc7..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_rnd.rsi/panel_open.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_rnd.rsi/panel_opening.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_rnd.rsi/panel_opening.png deleted file mode 100644 index 8e7cf11e89..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_rnd.rsi/panel_opening.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_rnd.rsi/spark.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_rnd.rsi/spark.png deleted file mode 100644 index 5fe7ae165d..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_rnd.rsi/spark.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_rnd.rsi/sparks_broken.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_rnd.rsi/sparks_broken.png deleted file mode 100644 index 400d23ef7a..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_rnd.rsi/sparks_broken.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_rnd.rsi/sparks_damaged.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_rnd.rsi/sparks_damaged.png deleted file mode 100644 index d8012e8498..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_rnd.rsi/sparks_damaged.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_rnd.rsi/sparks_open.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_rnd.rsi/sparks_open.png deleted file mode 100644 index c005f84951..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_rnd.rsi/sparks_open.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_rnd.rsi/welded.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_rnd.rsi/welded.png deleted file mode 100644 index 47e0354168..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_rnd.rsi/welded.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_sec.rsi/bolted.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_sec.rsi/bolted.png deleted file mode 100644 index 6193905801..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_sec.rsi/bolted.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_sec.rsi/closed.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_sec.rsi/closed.png deleted file mode 100644 index 3f9fb167f2..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_sec.rsi/closed.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_sec.rsi/closed_unlit.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_sec.rsi/closed_unlit.png deleted file mode 100644 index 6e3cb09bcf..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_sec.rsi/closed_unlit.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_sec.rsi/closing.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_sec.rsi/closing.png deleted file mode 100644 index 6badc277f2..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_sec.rsi/closing.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_sec.rsi/closing_unlit.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_sec.rsi/closing_unlit.png deleted file mode 100644 index 86ec2c7391..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_sec.rsi/closing_unlit.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_sec.rsi/deny.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_sec.rsi/deny.png deleted file mode 100644 index dd9042cab7..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_sec.rsi/deny.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_sec.rsi/locked.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_sec.rsi/locked.png deleted file mode 100644 index 19ff74725f..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_sec.rsi/locked.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_sec.rsi/meta.json b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_sec.rsi/meta.json deleted file mode 100644 index a1eca8b2a0..0000000000 --- a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_sec.rsi/meta.json +++ /dev/null @@ -1,226 +0,0 @@ -{ - "version": 1, - "size": { - "x": 32, - "y": 32 - }, - "license": "CC-BY-SA-3.0", - "copyright": "Taken from https://github.com/discordia-space/CEV-Eris/blob/d86e175508b8553ca8396f39f2af7ecec4595375/icons/obj/doors/Doormaint_sec.dmi, modified by ", - "states": [ - { - "name": "closed", - "directions": 1, - "delays": [ - [ - 1 - ] - ] - }, - { - "name": "locked", - "directions": 1, - "delays": [ - [ - 1 - ] - ] - }, - { - "name": "closed_unlit", - "directions": 1, - "delays": [ - [ - 1 - ] - ] - }, - { - "name": "closing", - "directions": 1, - "delays": [ - [ - 0.2, - 0.1, - 0.1, - 0.1, - 0.1, - 0.6 - ] - ] - }, - { - "name": "closing_unlit", - "directions": 1, - "delays": [ - [ - 0.2, - 0.1, - 0.1, - 0.1, - 0.1, - 0.6 - ] - ] - }, - { - "name": "deny", - "directions": 1, - "delays": [ - [ - 0.1, - 0.1, - 0.1 - ] - ] - }, - { - "name": "bolted", - "directions": 1, - "delays": [ - [ - 1 - ] - ] - }, - { - "name": "open", - "directions": 1, - "delays": [ - [ - 1 - ] - ] - }, - { - "name": "opening", - "directions": 1, - "delays": [ - [ - 0.2, - 0.1, - 0.1, - 0.1, - 0.1, - 0.6 - ] - ] - }, - { - "name": "opening_unlit", - "directions": 1, - "delays": [ - [ - 0.2, - 0.1, - 0.1, - 0.1, - 0.1, - 0.6 - ] - ] - }, - { - "name": "panel_closing", - "directions": 1, - "delays": [ - [ - 0.2, - 0.1, - 0.1, - 0.1, - 0.1, - 0.6 - ] - ] - }, - { - "name": "panel_open", - "directions": 1, - "delays": [ - [ - 1 - ] - ] - }, - { - "name": "panel_opening", - "directions": 1, - "delays": [ - [ - 0.2, - 0.1, - 0.1, - 0.1, - 0.1, - 0.6 - ] - ] - }, - { - "name": "spark", - "directions": 1, - "delays": [ - [ - 0.1, - 0.1, - 0.1, - 0.1, - 0.1, - 0.1 - ] - ] - }, - { - "name": "sparks_broken", - "directions": 1, - "delays": [ - [ - 0.1, - 0.1, - 0.1, - 0.1, - 0.1, - 0.1 - ] - ] - }, - { - "name": "sparks_damaged", - "directions": 1, - "delays": [ - [ - 0.1, - 0.1, - 0.1, - 0.1, - 0.1, - 0.1, - 1.7 - ] - ] - }, - { - "name": "sparks_open", - "directions": 1, - "delays": [ - [ - 0.1, - 0.1, - 0.1, - 0.1, - 0.1, - 0.1 - ] - ] - }, - { - "name": "welded", - "directions": 1, - "delays": [ - [ - 1 - ] - ] - } - ] -} diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_sec.rsi/open.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_sec.rsi/open.png deleted file mode 100644 index 689e8db2eb..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_sec.rsi/open.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_sec.rsi/opening.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_sec.rsi/opening.png deleted file mode 100644 index 485fed25cd..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_sec.rsi/opening.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_sec.rsi/opening_unlit.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_sec.rsi/opening_unlit.png deleted file mode 100644 index 553066879d..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_sec.rsi/opening_unlit.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_sec.rsi/panel_closing.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_sec.rsi/panel_closing.png deleted file mode 100644 index 8e330fb236..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_sec.rsi/panel_closing.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_sec.rsi/panel_open.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_sec.rsi/panel_open.png deleted file mode 100644 index 6a72875dc7..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_sec.rsi/panel_open.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_sec.rsi/panel_opening.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_sec.rsi/panel_opening.png deleted file mode 100644 index 8e7cf11e89..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_sec.rsi/panel_opening.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_sec.rsi/spark.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_sec.rsi/spark.png deleted file mode 100644 index 6fe7afa91a..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_sec.rsi/spark.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_sec.rsi/sparks_broken.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_sec.rsi/sparks_broken.png deleted file mode 100644 index 400d23ef7a..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_sec.rsi/sparks_broken.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_sec.rsi/sparks_damaged.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_sec.rsi/sparks_damaged.png deleted file mode 100644 index d8012e8498..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_sec.rsi/sparks_damaged.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_sec.rsi/sparks_open.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_sec.rsi/sparks_open.png deleted file mode 100644 index c005f84951..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_sec.rsi/sparks_open.png and /dev/null differ diff --git a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_sec.rsi/welded.png b/Resources/Textures/Constructible/Structures/Doors/airlock_maint_sec.rsi/welded.png deleted file mode 100644 index 47e0354168..0000000000 Binary files a/Resources/Textures/Constructible/Structures/Doors/airlock_maint_sec.rsi/welded.png and /dev/null differ diff --git a/Resources/Textures/Interface/StatusEffects/Buckle/buckled.png b/Resources/Textures/Interface/Alerts/Buckle/buckled.png similarity index 100% rename from Resources/Textures/Interface/StatusEffects/Buckle/buckled.png rename to Resources/Textures/Interface/Alerts/Buckle/buckled.png diff --git a/Resources/Textures/Interface/StatusEffects/Fire/fire.png b/Resources/Textures/Interface/Alerts/Fire/fire.png similarity index 100% rename from Resources/Textures/Interface/StatusEffects/Fire/fire.png rename to Resources/Textures/Interface/Alerts/Fire/fire.png diff --git a/Resources/Textures/Interface/StatusEffects/Handcuffed/Handcuffed.png b/Resources/Textures/Interface/Alerts/Handcuffed/Handcuffed.png similarity index 100% rename from Resources/Textures/Interface/StatusEffects/Handcuffed/Handcuffed.png rename to Resources/Textures/Interface/Alerts/Handcuffed/Handcuffed.png diff --git a/Resources/Textures/Interface/StatusEffects/Human/human0.png b/Resources/Textures/Interface/Alerts/Human/human0.png similarity index 100% rename from Resources/Textures/Interface/StatusEffects/Human/human0.png rename to Resources/Textures/Interface/Alerts/Human/human0.png diff --git a/Resources/Textures/Interface/StatusEffects/Human/human1.png b/Resources/Textures/Interface/Alerts/Human/human1.png similarity index 100% rename from Resources/Textures/Interface/StatusEffects/Human/human1.png rename to Resources/Textures/Interface/Alerts/Human/human1.png diff --git a/Resources/Textures/Interface/StatusEffects/Human/human2.png b/Resources/Textures/Interface/Alerts/Human/human2.png similarity index 100% rename from Resources/Textures/Interface/StatusEffects/Human/human2.png rename to Resources/Textures/Interface/Alerts/Human/human2.png diff --git a/Resources/Textures/Interface/StatusEffects/Human/human3.png b/Resources/Textures/Interface/Alerts/Human/human3.png similarity index 100% rename from Resources/Textures/Interface/StatusEffects/Human/human3.png rename to Resources/Textures/Interface/Alerts/Human/human3.png diff --git a/Resources/Textures/Interface/StatusEffects/Human/human4.png b/Resources/Textures/Interface/Alerts/Human/human4.png similarity index 100% rename from Resources/Textures/Interface/StatusEffects/Human/human4.png rename to Resources/Textures/Interface/Alerts/Human/human4.png diff --git a/Resources/Textures/Interface/StatusEffects/Human/human5.png b/Resources/Textures/Interface/Alerts/Human/human5.png similarity index 100% rename from Resources/Textures/Interface/StatusEffects/Human/human5.png rename to Resources/Textures/Interface/Alerts/Human/human5.png diff --git a/Resources/Textures/Interface/StatusEffects/Human/human6.png b/Resources/Textures/Interface/Alerts/Human/human6.png similarity index 100% rename from Resources/Textures/Interface/StatusEffects/Human/human6.png rename to Resources/Textures/Interface/Alerts/Human/human6.png diff --git a/Resources/Textures/Interface/StatusEffects/Human/human7.png b/Resources/Textures/Interface/Alerts/Human/human7.png similarity index 100% rename from Resources/Textures/Interface/StatusEffects/Human/human7.png rename to Resources/Textures/Interface/Alerts/Human/human7.png diff --git a/Resources/Textures/Interface/StatusEffects/Human/humancrit-0.png b/Resources/Textures/Interface/Alerts/Human/humancrit-0.png similarity index 100% rename from Resources/Textures/Interface/StatusEffects/Human/humancrit-0.png rename to Resources/Textures/Interface/Alerts/Human/humancrit-0.png diff --git a/Resources/Textures/Interface/StatusEffects/Human/humancrit-1.png b/Resources/Textures/Interface/Alerts/Human/humancrit-1.png similarity index 100% rename from Resources/Textures/Interface/StatusEffects/Human/humancrit-1.png rename to Resources/Textures/Interface/Alerts/Human/humancrit-1.png diff --git a/Resources/Textures/Interface/StatusEffects/Human/humandead.png b/Resources/Textures/Interface/Alerts/Human/humandead.png similarity index 100% rename from Resources/Textures/Interface/StatusEffects/Human/humandead.png rename to Resources/Textures/Interface/Alerts/Human/humandead.png diff --git a/Resources/Textures/Interface/StatusEffects/Hunger/Overfed.png b/Resources/Textures/Interface/Alerts/Hunger/Overfed.png similarity index 100% rename from Resources/Textures/Interface/StatusEffects/Hunger/Overfed.png rename to Resources/Textures/Interface/Alerts/Hunger/Overfed.png diff --git a/Resources/Textures/Interface/StatusEffects/Hunger/Peckish.png b/Resources/Textures/Interface/Alerts/Hunger/Peckish.png similarity index 100% rename from Resources/Textures/Interface/StatusEffects/Hunger/Peckish.png rename to Resources/Textures/Interface/Alerts/Hunger/Peckish.png diff --git a/Resources/Textures/Interface/StatusEffects/Hunger/Starving.png b/Resources/Textures/Interface/Alerts/Hunger/Starving.png similarity index 100% rename from Resources/Textures/Interface/StatusEffects/Hunger/Starving.png rename to Resources/Textures/Interface/Alerts/Hunger/Starving.png diff --git a/Resources/Textures/Interface/StatusEffects/Pressure/highpressure1.png b/Resources/Textures/Interface/Alerts/Pressure/highpressure1.png similarity index 100% rename from Resources/Textures/Interface/StatusEffects/Pressure/highpressure1.png rename to Resources/Textures/Interface/Alerts/Pressure/highpressure1.png diff --git a/Resources/Textures/Interface/StatusEffects/Pressure/highpressure2.png b/Resources/Textures/Interface/Alerts/Pressure/highpressure2.png similarity index 100% rename from Resources/Textures/Interface/StatusEffects/Pressure/highpressure2.png rename to Resources/Textures/Interface/Alerts/Pressure/highpressure2.png diff --git a/Resources/Textures/Interface/StatusEffects/Pressure/lowpressure1.png b/Resources/Textures/Interface/Alerts/Pressure/lowpressure1.png similarity index 100% rename from Resources/Textures/Interface/StatusEffects/Pressure/lowpressure1.png rename to Resources/Textures/Interface/Alerts/Pressure/lowpressure1.png diff --git a/Resources/Textures/Interface/StatusEffects/Pressure/lowpressure2.png b/Resources/Textures/Interface/Alerts/Pressure/lowpressure2.png similarity index 100% rename from Resources/Textures/Interface/StatusEffects/Pressure/lowpressure2.png rename to Resources/Textures/Interface/Alerts/Pressure/lowpressure2.png diff --git a/Resources/Textures/Interface/StatusEffects/Pressure/meta.json b/Resources/Textures/Interface/Alerts/Pressure/meta.json similarity index 100% rename from Resources/Textures/Interface/StatusEffects/Pressure/meta.json rename to Resources/Textures/Interface/Alerts/Pressure/meta.json diff --git a/Resources/Textures/Interface/StatusEffects/Pull/pulled.png b/Resources/Textures/Interface/Alerts/Pull/pulled.png similarity index 100% rename from Resources/Textures/Interface/StatusEffects/Pull/pulled.png rename to Resources/Textures/Interface/Alerts/Pull/pulled.png diff --git a/Resources/Textures/Interface/StatusEffects/Pull/pulling.png b/Resources/Textures/Interface/Alerts/Pull/pulling.png similarity index 100% rename from Resources/Textures/Interface/StatusEffects/Pull/pulling.png rename to Resources/Textures/Interface/Alerts/Pull/pulling.png diff --git a/Resources/Textures/Interface/StatusEffects/Temperature/cold1.png b/Resources/Textures/Interface/Alerts/Temperature/cold1.png similarity index 100% rename from Resources/Textures/Interface/StatusEffects/Temperature/cold1.png rename to Resources/Textures/Interface/Alerts/Temperature/cold1.png diff --git a/Resources/Textures/Interface/StatusEffects/Temperature/cold2.png b/Resources/Textures/Interface/Alerts/Temperature/cold2.png similarity index 100% rename from Resources/Textures/Interface/StatusEffects/Temperature/cold2.png rename to Resources/Textures/Interface/Alerts/Temperature/cold2.png diff --git a/Resources/Textures/Interface/StatusEffects/Temperature/cold3.png b/Resources/Textures/Interface/Alerts/Temperature/cold3.png similarity index 100% rename from Resources/Textures/Interface/StatusEffects/Temperature/cold3.png rename to Resources/Textures/Interface/Alerts/Temperature/cold3.png diff --git a/Resources/Textures/Interface/StatusEffects/Temperature/hot1.png b/Resources/Textures/Interface/Alerts/Temperature/hot1.png similarity index 100% rename from Resources/Textures/Interface/StatusEffects/Temperature/hot1.png rename to Resources/Textures/Interface/Alerts/Temperature/hot1.png diff --git a/Resources/Textures/Interface/StatusEffects/Temperature/hot2.png b/Resources/Textures/Interface/Alerts/Temperature/hot2.png similarity index 100% rename from Resources/Textures/Interface/StatusEffects/Temperature/hot2.png rename to Resources/Textures/Interface/Alerts/Temperature/hot2.png diff --git a/Resources/Textures/Interface/StatusEffects/Temperature/hot3.png b/Resources/Textures/Interface/Alerts/Temperature/hot3.png similarity index 100% rename from Resources/Textures/Interface/StatusEffects/Temperature/hot3.png rename to Resources/Textures/Interface/Alerts/Temperature/hot3.png diff --git a/Resources/Textures/Interface/StatusEffects/Thirst/OverHydrated.png b/Resources/Textures/Interface/Alerts/Thirst/OverHydrated.png similarity index 100% rename from Resources/Textures/Interface/StatusEffects/Thirst/OverHydrated.png rename to Resources/Textures/Interface/Alerts/Thirst/OverHydrated.png diff --git a/Resources/Textures/Interface/StatusEffects/Thirst/Parched.png b/Resources/Textures/Interface/Alerts/Thirst/Parched.png similarity index 100% rename from Resources/Textures/Interface/StatusEffects/Thirst/Parched.png rename to Resources/Textures/Interface/Alerts/Thirst/Parched.png diff --git a/Resources/Textures/Interface/StatusEffects/Thirst/Thirsty.png b/Resources/Textures/Interface/Alerts/Thirst/Thirsty.png similarity index 100% rename from Resources/Textures/Interface/StatusEffects/Thirst/Thirsty.png rename to Resources/Textures/Interface/Alerts/Thirst/Thirsty.png diff --git a/Resources/Textures/Interface/StatusEffects/Weightless/weightless.png b/Resources/Textures/Interface/Alerts/Weightless/weightless.png similarity index 100% rename from Resources/Textures/Interface/StatusEffects/Weightless/weightless.png rename to Resources/Textures/Interface/Alerts/Weightless/weightless.png diff --git a/Resources/Textures/Interface/Nano/tooltip.png b/Resources/Textures/Interface/Nano/tooltip.png index eadfc72e37..bd6cefaa24 100644 Binary files a/Resources/Textures/Interface/Nano/tooltip.png and b/Resources/Textures/Interface/Nano/tooltip.png differ diff --git a/Resources/Textures/Interface/Nano/transparent_window_background_bordered.png b/Resources/Textures/Interface/Nano/transparent_window_background_bordered.png new file mode 100644 index 0000000000..987ad4cba6 Binary files /dev/null and b/Resources/Textures/Interface/Nano/transparent_window_background_bordered.png differ diff --git a/Resources/Textures/Interface/Nano/window_background_bordered.png b/Resources/Textures/Interface/Nano/window_background_bordered.png new file mode 100644 index 0000000000..461fbf3114 Binary files /dev/null and b/Resources/Textures/Interface/Nano/window_background_bordered.png differ diff --git a/Resources/Textures/Objects/Tools/welder.rsi/welder.png b/Resources/Textures/Objects/Tools/welder.rsi/icon.png similarity index 100% rename from Resources/Textures/Objects/Tools/welder.rsi/welder.png rename to Resources/Textures/Objects/Tools/welder.rsi/icon.png diff --git a/Resources/Textures/Objects/Tools/welder.rsi/meta.json b/Resources/Textures/Objects/Tools/welder.rsi/meta.json index a000fa54c8..c18016dab0 100644 --- a/Resources/Textures/Objects/Tools/welder.rsi/meta.json +++ b/Resources/Textures/Objects/Tools/welder.rsi/meta.json @@ -1,112 +1,110 @@ { - "version": 1, - "size": { - "x": 32, - "y": 32 + "version": 1, + "size": { + "x": 32, + "y": 32 + }, + "license": "CC-BY-SA-3.0", + "copyright": "Taken from tgstation at commit https://github.com/tgstation/tgstation/commit/199fffd989d6f7fd6ea9c5188c875137df4f34b8", + "states": [ + { + "name": "icon", + "directions": 1, + "delays": [ + [ + 1 + ] + ] }, - "states": [ - { - "name": "welder", - "select": [], - "flags": {}, - "directions": 1, - "delays": [ - [ - 1.0 - ] - ] - }, - { - "name": "welder_flame", - "select": [], - "flags": {}, - "directions": 1, - "delays": [ - [ - 0.2, - 0.1 - ] - ] - }, - { - "name": "on-inhand-left", - "directions": 4, - "delays": [ - [ - 0.2, - 0.1 - ], - [ - 0.2, - 0.1 - ], - [ - 0.2, - 0.1 - ], - [ - 0.2, - 0.1 - ] - ] - }, - { - "name": "on-inhand-right", - "directions": 4, - "delays": [ - [ - 0.2, - 0.1 - ], - [ - 0.2, - 0.1 - ], - [ - 0.2, - 0.1 - ], - [ - 0.2, - 0.1 - ] - ] - }, - { - "name": "off-inhand-left", - "directions": 4, - "delays": [ - [ - 1 - ], - [ - 1 - ], - [ - 1 - ], - [ - 1 - ] - ] - }, - { - "name": "off-inhand-right", - "directions": 4, - "delays": [ - [ - 1 - ], - [ - 1 - ], - [ - 1 - ], - [ - 1 - ] - ] - } - ] + { + "name": "welder_flame", + "directions": 1, + "delays": [ + [ + 0.2, + 0.1 + ] + ] + }, + { + "name": "off-inhand-left", + "directions": 4, + "delays": [ + [ + 1 + ], + [ + 1 + ], + [ + 1 + ], + [ + 1 + ] + ] + }, + { + "name": "off-inhand-right", + "directions": 4, + "delays": [ + [ + 1 + ], + [ + 1 + ], + [ + 1 + ], + [ + 1 + ] + ] + }, + { + "name": "on-inhand-left", + "directions": 4, + "delays": [ + [ + 0.2, + 0.1 + ], + [ + 0.2, + 0.1 + ], + [ + 0.2, + 0.1 + ], + [ + 0.2, + 0.1 + ] + ] + }, + { + "name": "on-inhand-right", + "directions": 4, + "delays": [ + [ + 0.2, + 0.1 + ], + [ + 0.2, + 0.1 + ], + [ + 0.2, + 0.1 + ], + [ + 0.2, + 0.1 + ] + ] + } + ] } diff --git a/Resources/Textures/Objects/Tools/welder_experimental.rsi/icon.png b/Resources/Textures/Objects/Tools/welder_experimental.rsi/icon.png new file mode 100644 index 0000000000..2a36d55002 Binary files /dev/null and b/Resources/Textures/Objects/Tools/welder_experimental.rsi/icon.png differ diff --git a/Resources/Textures/Objects/Tools/welder_experimental.rsi/meta.json b/Resources/Textures/Objects/Tools/welder_experimental.rsi/meta.json new file mode 100644 index 0000000000..ed824e60cf --- /dev/null +++ b/Resources/Textures/Objects/Tools/welder_experimental.rsi/meta.json @@ -0,0 +1,121 @@ +{ + "version": 1, + "size": { + "x": 32, + "y": 32 + }, + "license": "CC-BY-SA-3.0", + "copyright": "Taken from tgstation at commit https://github.com/tgstation/tgstation/commit/199fffd989d6f7fd6ea9c5188c875137df4f34b8", + "states": [ + { + "name": "icon", + "directions": 1, + "delays": [ + [ + 0.2, + 0.2, + 0.2, + 0.2 + ] + ] + }, + { + "name": "welder_flame", + "directions": 1, + "delays": [ + [ + 0.2, + 0.1 + ] + ] + }, + { + "name": "off-inhand-left", + "directions": 4, + "delays": [ + [ + 1 + ], + [ + 1 + ], + [ + 1 + ], + [ + 1 + ] + ] + }, + { + "name": "off-inhand-right", + "directions": 4, + "delays": [ + [ + 1 + ], + [ + 1 + ], + [ + 1 + ], + [ + 1 + ] + ] + }, + { + "name": "on-inhand-left", + "directions": 4, + "delays": [ + [ + 0.2, + 0.2, + 0.2 + ], + [ + 0.2, + 0.2, + 0.2 + ], + [ + 0.2, + 0.2, + 0.2 + ], + [ + 0.2, + 0.2, + 0.2 + ] + ] + }, + { + "name": "on-inhand-right", + "directions": 4, + "delays": [ + [ + 0.2, + 0.2, + 0.2 + ], + [ + 0.2, + 0.2, + 0.2 + ], + [ + 0.2, + 0.2, + 0.2 + ], + [ + 0.2, + 0.2, + 0.2 + ] + ] + } + ] +} diff --git a/Resources/Textures/Objects/Tools/welder_experimental.rsi/off-inhand-left.png b/Resources/Textures/Objects/Tools/welder_experimental.rsi/off-inhand-left.png new file mode 100644 index 0000000000..045e42531c Binary files /dev/null and b/Resources/Textures/Objects/Tools/welder_experimental.rsi/off-inhand-left.png differ diff --git a/Resources/Textures/Objects/Tools/welder_experimental.rsi/off-inhand-right.png b/Resources/Textures/Objects/Tools/welder_experimental.rsi/off-inhand-right.png new file mode 100644 index 0000000000..45628f9983 Binary files /dev/null and b/Resources/Textures/Objects/Tools/welder_experimental.rsi/off-inhand-right.png differ diff --git a/Resources/Textures/Objects/Tools/welder_experimental.rsi/on-inhand-left.png b/Resources/Textures/Objects/Tools/welder_experimental.rsi/on-inhand-left.png new file mode 100644 index 0000000000..7af2bb027e Binary files /dev/null and b/Resources/Textures/Objects/Tools/welder_experimental.rsi/on-inhand-left.png differ diff --git a/Resources/Textures/Objects/Tools/welder_experimental.rsi/on-inhand-right.png b/Resources/Textures/Objects/Tools/welder_experimental.rsi/on-inhand-right.png new file mode 100644 index 0000000000..85c42df8b2 Binary files /dev/null and b/Resources/Textures/Objects/Tools/welder_experimental.rsi/on-inhand-right.png differ diff --git a/Resources/Textures/Objects/Tools/welder_experimental.rsi/welder_flame.png b/Resources/Textures/Objects/Tools/welder_experimental.rsi/welder_flame.png new file mode 100644 index 0000000000..5c3bdc7bbe Binary files /dev/null and b/Resources/Textures/Objects/Tools/welder_experimental.rsi/welder_flame.png differ diff --git a/Resources/Textures/Objects/Tools/welder_mini.rsi/icon.png b/Resources/Textures/Objects/Tools/welder_mini.rsi/icon.png new file mode 100644 index 0000000000..87e7882792 Binary files /dev/null and b/Resources/Textures/Objects/Tools/welder_mini.rsi/icon.png differ diff --git a/Resources/Textures/Objects/Tools/welder_mini.rsi/meta.json b/Resources/Textures/Objects/Tools/welder_mini.rsi/meta.json new file mode 100644 index 0000000000..0c308b9e1d --- /dev/null +++ b/Resources/Textures/Objects/Tools/welder_mini.rsi/meta.json @@ -0,0 +1,30 @@ +{ + "version": 1, + "size": { + "x": 32, + "y": 32 + }, + "license": "CC-BY-SA-3.0", + "copyright": "Taken from tgstation at commit https://github.com/tgstation/tgstation/commit/199fffd989d6f7fd6ea9c5188c875137df4f34b8", + "states": [ + { + "name": "icon", + "directions": 1, + "delays": [ + [ + 1 + ] + ] + }, + { + "name": "welder_flame", + "directions": 1, + "delays": [ + [ + 0.2, + 0.1 + ] + ] + } + ] +} diff --git a/Resources/Textures/Objects/Tools/welder_mini.rsi/welder_flame.png b/Resources/Textures/Objects/Tools/welder_mini.rsi/welder_flame.png new file mode 100644 index 0000000000..f080d7bcaa Binary files /dev/null and b/Resources/Textures/Objects/Tools/welder_mini.rsi/welder_flame.png differ diff --git a/RobustToolbox b/RobustToolbox index 3c428a17a8..ee381804ec 160000 --- a/RobustToolbox +++ b/RobustToolbox @@ -1 +1 @@ -Subproject commit 3c428a17a87709b9527c930f97e327c1c0e29940 +Subproject commit ee381804ec3b880ee63a610289de3fb28f4d3f60