diff --git a/Content.Client/GameObjects/Components/HandheldLightComponent.cs b/Content.Client/GameObjects/Components/HandheldLightComponent.cs index fb5be31391..1c09818ae0 100644 --- a/Content.Client/GameObjects/Components/HandheldLightComponent.cs +++ b/Content.Client/GameObjects/Components/HandheldLightComponent.cs @@ -1,5 +1,6 @@ using System; using Content.Shared.GameObjects.Components; +using Content.Shared.Utility; using Robust.Client.Graphics.Drawing; using Robust.Client.UserInterface; using Robust.Client.UserInterface.Controls; @@ -88,23 +89,27 @@ namespace Content.Client.GameObjects.Components } else { - level = 1 + (int) MathF.Round(charge * 6); + level = ContentHelpers.RoundToNearestLevels(charge, 1.0, 6) + 1; } - if (level == 1) + if (level == 0) + { + _sections[0].PanelOverride = _styleBoxUnlit; + } + else if (level == 1) { // Flash the last light. _sections[0].PanelOverride = _timer > TimerCycle / 2 ? _styleBoxLit : _styleBoxUnlit; } else { - _sections[0].PanelOverride = level > 2 ? _styleBoxLit : _styleBoxUnlit; + _sections[0].PanelOverride = _styleBoxLit; } - _sections[1].PanelOverride = level > 3 ? _styleBoxLit : _styleBoxUnlit; - _sections[2].PanelOverride = level > 4 ? _styleBoxLit : _styleBoxUnlit; - _sections[3].PanelOverride = level > 5 ? _styleBoxLit : _styleBoxUnlit; - _sections[4].PanelOverride = level > 6 ? _styleBoxLit : _styleBoxUnlit; + _sections[1].PanelOverride = level >= 3 ? _styleBoxLit : _styleBoxUnlit; + _sections[2].PanelOverride = level >= 4 ? _styleBoxLit : _styleBoxUnlit; + _sections[3].PanelOverride = level >= 5 ? _styleBoxLit : _styleBoxUnlit; + _sections[4].PanelOverride = level >= 6 ? _styleBoxLit : _styleBoxUnlit; } } } diff --git a/Content.Client/GameObjects/Components/Power/PowerCellVisualizer.cs b/Content.Client/GameObjects/Components/Power/PowerCellVisualizer.cs index 71b4d81ff7..408c09d7d6 100644 --- a/Content.Client/GameObjects/Components/Power/PowerCellVisualizer.cs +++ b/Content.Client/GameObjects/Components/Power/PowerCellVisualizer.cs @@ -36,7 +36,8 @@ namespace Content.Client.GameObjects.Components.Power var sprite = component.Owner.GetComponent(); if (component.TryGetData(PowerCellVisuals.ChargeLevel, out float fraction)) { - sprite.LayerSetState(Layers.Charge, $"{_prefix}_{ContentHelpers.RoundToLevels(fraction, 1, 5) * 25}"); + int level = ContentHelpers.RoundToNearestLevels(fraction, 1, 4) * 25; + sprite.LayerSetState(Layers.Charge, $"{_prefix}_{level}"); } } diff --git a/Content.Client/IgnoredComponents.cs b/Content.Client/IgnoredComponents.cs index 78b885b449..cabc82c641 100644 --- a/Content.Client/IgnoredComponents.cs +++ b/Content.Client/IgnoredComponents.cs @@ -33,7 +33,6 @@ "Door", "PoweredLight", "Smes", - "Powercell", "LightBulb", "Healing", "Catwalk", @@ -42,6 +41,7 @@ "HitscanWeaponCapacitor", "PowerCell", "PowerCellCharger", + "PowerCellSlot", "WeaponCapacitorCharger", "AiController", "Computer", diff --git a/Content.Server/GameObjects/Components/Interactable/HandheldLightComponent.cs b/Content.Server/GameObjects/Components/Interactable/HandheldLightComponent.cs index e29cdd8d2d..ea1492f14a 100644 --- a/Content.Server/GameObjects/Components/Interactable/HandheldLightComponent.cs +++ b/Content.Server/GameObjects/Components/Interactable/HandheldLightComponent.cs @@ -1,52 +1,33 @@ #nullable enable using System.Threading.Tasks; -using Content.Server.GameObjects.Components.GUI; using Content.Server.GameObjects.Components.Items.Clothing; using Content.Server.GameObjects.Components.Items.Storage; using Content.Server.GameObjects.Components.Power; -using Content.Server.Interfaces.GameObjects.Components.Items; using Content.Shared.GameObjects.Components; using Content.Shared.GameObjects.EntitySystems; -using Content.Shared.GameObjects.Verbs; using Content.Shared.Interfaces; using Content.Shared.Interfaces.GameObjects.Components; using Robust.Server.GameObjects; -using Robust.Server.GameObjects.Components.Container; using Robust.Server.GameObjects.EntitySystems; -using Robust.Server.Interfaces.GameObjects; using Robust.Shared.GameObjects; using Robust.Shared.GameObjects.Systems; using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Localization; +using Robust.Shared.Serialization; using Robust.Shared.Utility; using Robust.Shared.ViewVariables; namespace Content.Server.GameObjects.Components.Interactable { /// - /// Component that represents a handheld lightsource which can be toggled on and off. + /// Component that represents a powered handheld light source which can be toggled on and off. /// [RegisterComponent] - internal sealed class HandheldLightComponent : SharedHandheldLightComponent, IUse, IExamine, IInteractUsing, - IMapInit + internal sealed class HandheldLightComponent : SharedHandheldLightComponent, IUse, IExamine, IInteractUsing { - [ViewVariables(VVAccess.ReadWrite)] public float Wattage { get; set; } = 10; - [ViewVariables] private ContainerSlot _cellContainer = default!; - - [ViewVariables] - private BatteryComponent? Cell - { - get - { - if (_cellContainer.ContainedEntity == null) return null; - if (_cellContainer.ContainedEntity.TryGetComponent(out BatteryComponent? cell)) - { - return cell; - } - - return null; - } - } + [ViewVariables(VVAccess.ReadWrite)] public float Wattage { get; set; } = 10f; + [ViewVariables] private PowerCellSlotComponent _cellSlot = default!; + private PowerCellComponent? Cell => _cellSlot.Cell; /// /// Status of light, whether or not it is emitting light. @@ -54,26 +35,36 @@ namespace Content.Server.GameObjects.Components.Interactable [ViewVariables] public bool Activated { get; private set; } - [ViewVariables] protected override bool HasCell => Cell != null; + [ViewVariables] protected override bool HasCell => _cellSlot.HasCell; + + [ViewVariables(VVAccess.ReadWrite)] public string? TurnOnSound; + [ViewVariables(VVAccess.ReadWrite)] public string? TurnOnFailSound; + [ViewVariables(VVAccess.ReadWrite)] public string? TurnOffSound; + + public override void ExposeData(ObjectSerializer serializer) + { + base.ExposeData(serializer); + serializer.DataField(this, x => x.Wattage, "wattage", 10f); + serializer.DataField(ref TurnOnSound, "turnOnSound", "/Audio/Items/flashlight_toggle.ogg"); + serializer.DataField(ref TurnOnFailSound, "turnOnFailSound", "/Audio/Machines/button.ogg"); + serializer.DataField(ref TurnOffSound, "turnOffSound", "/Audio/Items/flashlight_toggle.ogg"); + } + + public override void Initialize() + { + base.Initialize(); + + Owner.EnsureComponent(); + _cellSlot = Owner.EnsureComponent(); + + Dirty(); + } async Task IInteractUsing.InteractUsing(InteractUsingEventArgs eventArgs) { - if (!eventArgs.Using.HasComponent()) return false; - - if (Cell != null) return false; - - var handsComponent = eventArgs.User.GetComponent(); - - if (!handsComponent.Drop(eventArgs.Using, _cellContainer)) - { - return false; - } - - EntitySystem.Get().PlayFromEntity("/Audio/Items/pistol_magin.ogg", Owner); - - + if (!ActionBlockerSystem.CanInteract(eventArgs.User)) return false; + if (!_cellSlot.InsertCell(eventArgs.Using)) return false; Dirty(); - return true; } @@ -83,6 +74,10 @@ namespace Content.Server.GameObjects.Components.Interactable { message.AddMarkup(Loc.GetString("The light is currently [color=darkgreen]on[/color].")); } + else + { + message.AddMarkup(Loc.GetString("The light is currently [color=darkred]off[/color].")); + } } bool IUse.UseEntity(UseEntityEventArgs eventArgs) @@ -90,45 +85,20 @@ namespace Content.Server.GameObjects.Components.Interactable return ToggleStatus(eventArgs.User); } - public override void Initialize() - { - base.Initialize(); - - Owner.EnsureComponent(); - _cellContainer = - ContainerManagerComponent.Ensure("flashlight_cell_container", Owner, out _); - - Dirty(); - } - /// /// Illuminates the light if it is not active, extinguishes it if it is active. /// /// True if the light's status was toggled, false otherwise. private bool ToggleStatus(IEntity user) { - var item = Owner.GetComponent(); - // Update sprite and light states to match the activation. - if (Activated) - { - TurnOff(); - item.EquippedPrefix = "off"; - } - else - { - TurnOn(user); - item.EquippedPrefix = "on"; - } - - // Toggle always succeeds. - return true; + return Activated ? TurnOff() : TurnOn(user); } - private void TurnOff(bool makeNoise = true) + private bool TurnOff(bool makeNoise = true) { if (!Activated) { - return; + return false; } SetState(false); @@ -136,40 +106,41 @@ namespace Content.Server.GameObjects.Components.Interactable if (makeNoise) { - EntitySystem.Get().PlayFromEntity("/Audio/Items/flashlight_toggle.ogg", Owner); + if (TurnOffSound != null) EntitySystem.Get().PlayFromEntity(TurnOffSound, Owner); } + + return true; } - private void TurnOn(IEntity user) + private bool TurnOn(IEntity user) { if (Activated) { - return; + return false; } - var cell = Cell; - if (cell == null) + if (Cell == null) { - EntitySystem.Get().PlayFromEntity("/Audio/Machines/button.ogg", Owner); - + if (TurnOnFailSound != null) EntitySystem.Get().PlayFromEntity(TurnOnFailSound, Owner); Owner.PopupMessage(user, Loc.GetString("Cell missing...")); - return; + return false; } // To prevent having to worry about frame time in here. // Let's just say you need a whole second of charge before you can turn it on. // Simple enough. - if (Wattage > cell.CurrentCharge) + if (Wattage > Cell.CurrentCharge) { - EntitySystem.Get().PlayFromEntity("/Audio/Machines/button.ogg", Owner); + if (TurnOnFailSound != null) EntitySystem.Get().PlayFromEntity(TurnOnFailSound, Owner); Owner.PopupMessage(user, Loc.GetString("Dead cell...")); - return; + return false; } Activated = true; SetState(true); - EntitySystem.Get().PlayFromEntity("/Audio/Items/flashlight_toggle.ogg", Owner); + if (TurnOnSound != null) EntitySystem.Get().PlayFromEntity(TurnOnSound, Owner); + return true; } private void SetState(bool on) @@ -188,11 +159,20 @@ namespace Content.Server.GameObjects.Components.Interactable { clothing.ClothingEquippedPrefix = on ? "On" : "Off"; } + + if (Owner.TryGetComponent(out ItemComponent? item)) + { + item.EquippedPrefix = on ? "on" : "off"; + } } public void OnUpdate(float frameTime) { - if (!Activated || Cell == null) return; + if (Cell == null) + { + TurnOff(false); + return; + } var appearanceComponent = Owner.GetComponent(); @@ -209,43 +189,10 @@ namespace Content.Server.GameObjects.Components.Interactable appearanceComponent.SetData(HandheldLightVisuals.Power, HandheldLightPowerStates.Dying); } - if (Cell == null || !Cell.TryUseCharge(Wattage * frameTime)) TurnOff(); - + if (Activated && !Cell.TryUseCharge(Wattage * frameTime)) TurnOff(false); Dirty(); } - private void EjectCell(IEntity user) - { - if (Cell == null) - { - return; - } - - var cell = Cell; - - if (!_cellContainer.Remove(cell.Owner)) - { - return; - } - - Dirty(); - - if (!user.TryGetComponent(out HandsComponent? hands)) - { - return; - } - - if (!hands.PutInHand(cell.Owner.GetComponent())) - { - cell.Owner.Transform.Coordinates = user.Transform.Coordinates; - } - - // Assuming the battery has just been taken out of the flashlight, make sure it's getting disabled - TurnOff(false); - - EntitySystem.Get().PlayFromEntity("/Audio/Items/pistol_magout.ogg", Owner); - } - public override ComponentState GetComponentState() { if (Cell == null) @@ -262,44 +209,5 @@ namespace Content.Server.GameObjects.Components.Interactable return new HandheldLightComponentState(Cell.CurrentCharge / Cell.MaxCharge, HasCell); } - - [Verb] - public sealed class EjectCellVerb : Verb - { - protected override void GetData(IEntity user, HandheldLightComponent component, VerbData data) - { - if (!ActionBlockerSystem.CanInteract(user)) - { - data.Visibility = VerbVisibility.Invisible; - return; - } - - if (component.Cell == null) - { - data.Text = Loc.GetString("Eject cell (cell missing)"); - data.Visibility = VerbVisibility.Disabled; - } - else - { - data.Text = Loc.GetString("Eject cell"); - } - } - - protected override void Activate(IEntity user, HandheldLightComponent component) - { - component.EjectCell(user); - } - } - - void IMapInit.MapInit() - { - if (_cellContainer.ContainedEntity != null) - { - return; - } - - var cell = Owner.EntityManager.SpawnEntity("PowerCellSmallStandard", Owner.Transform.Coordinates); - _cellContainer.Insert(cell); - } } } diff --git a/Content.Server/GameObjects/Components/Power/BatteryComponent.cs b/Content.Server/GameObjects/Components/Power/BatteryComponent.cs index e6224bf4bf..887f9420f0 100644 --- a/Content.Server/GameObjects/Components/Power/BatteryComponent.cs +++ b/Content.Server/GameObjects/Components/Power/BatteryComponent.cs @@ -11,14 +11,28 @@ namespace Content.Server.GameObjects.Components.Power { public override string Name => "Battery"; + /// + /// Maximum charge of the battery in joules (ie. watt seconds) + /// [ViewVariables(VVAccess.ReadWrite)] public int MaxCharge { get => _maxCharge; set => SetMaxCharge(value); } private int _maxCharge; + /// + /// Current charge of the battery in joules (ie. watt seconds) + /// [ViewVariables(VVAccess.ReadWrite)] public float CurrentCharge { get => _currentCharge; set => SetCurrentCharge(value); } - private float _currentCharge; + /// + /// True if the battery is fully charged. + /// + [ViewVariables] public bool IsFullyCharged => MathHelper.CloseTo(CurrentCharge, MaxCharge); + + [ViewVariables(VVAccess.ReadWrite)] public bool AutoRecharge { get; set; } + + [ViewVariables(VVAccess.ReadWrite)] public float AutoRechargeRate { get; set; } + [ViewVariables] public BatteryState BatteryState { get; private set; } public override void ExposeData(ObjectSerializer serializer) @@ -26,6 +40,8 @@ namespace Content.Server.GameObjects.Components.Power base.ExposeData(serializer); serializer.DataField(ref _maxCharge, "maxCharge", 1000); serializer.DataField(ref _currentCharge, "startingCharge", 500); + serializer.DataField(this, x => x.AutoRecharge, "autoRecharge", false); + serializer.DataField(this, x => x.AutoRechargeRate, "autoRechargeRate", 0); } public override void Initialize() @@ -75,7 +91,7 @@ namespace Content.Server.GameObjects.Components.Power private void UpdateStorageState() { - if (CurrentCharge == MaxCharge) + if (IsFullyCharged) { BatteryState = BatteryState.Full; } @@ -103,6 +119,13 @@ namespace Content.Server.GameObjects.Components.Power UpdateStorageState(); OnChargeChanged(); } + + public void OnUpdate(float frameTime) + { + if (!AutoRecharge) return; + if (IsFullyCharged) return; + CurrentCharge += AutoRechargeRate * frameTime; + } } public enum BatteryState diff --git a/Content.Server/GameObjects/Components/Power/PowerCellComponent.cs b/Content.Server/GameObjects/Components/Power/PowerCellComponent.cs index 4165b82fbe..9241536250 100644 --- a/Content.Server/GameObjects/Components/Power/PowerCellComponent.cs +++ b/Content.Server/GameObjects/Components/Power/PowerCellComponent.cs @@ -1,18 +1,33 @@ using Content.Shared.GameObjects.Components.Power; +using Content.Shared.GameObjects.EntitySystems; using Robust.Server.GameObjects; using Robust.Shared.GameObjects; +using Robust.Shared.Localization; +using Robust.Shared.Serialization; +using Robust.Shared.Utility; +using Robust.Shared.ViewVariables; namespace Content.Server.GameObjects.Components.Power { /// - /// Batteries that have update an based on their charge percent. + /// Batteries that can update an based on their charge percent + /// and fit into a of the appropriate size. /// [RegisterComponent] [ComponentReference(typeof(BatteryComponent))] - public class PowerCellComponent : BatteryComponent + public class PowerCellComponent : BatteryComponent, IExamine { public override string Name => "PowerCell"; + [ViewVariables] public PowerCellSize CellSize => _cellSize; + private PowerCellSize _cellSize = PowerCellSize.Small; + + public override void ExposeData(ObjectSerializer serializer) + { + base.ExposeData(serializer); + serializer.DataField(ref _cellSize, "cellSize", PowerCellSize.Small); + } + public override void Initialize() { base.Initialize(); @@ -33,5 +48,20 @@ namespace Content.Server.GameObjects.Components.Power appearance.SetData(PowerCellVisuals.ChargeLevel, CurrentCharge / MaxCharge); } } + + void IExamine.Examine(FormattedMessage message, bool inDetailsRange) + { + if(inDetailsRange) + { + message.AddMarkup(Loc.GetString($"The charge indicator reads {CurrentCharge / MaxCharge * 100:F0} %.")); + } + } + } + + public enum PowerCellSize + { + Small, + Medium, + Large } } diff --git a/Content.Server/GameObjects/Components/Power/PowerCellSlotComponent.cs b/Content.Server/GameObjects/Components/Power/PowerCellSlotComponent.cs new file mode 100644 index 0000000000..c898b29497 --- /dev/null +++ b/Content.Server/GameObjects/Components/Power/PowerCellSlotComponent.cs @@ -0,0 +1,254 @@ +#nullable enable +using System; +using Content.Server.GameObjects.Components.GUI; +using Content.Server.GameObjects.Components.Items.Storage; +using Content.Shared.Audio; +using Content.Shared.GameObjects.EntitySystems; +using Content.Shared.GameObjects.Verbs; +using Robust.Server.GameObjects.Components.Container; +using Robust.Server.GameObjects.EntitySystems; +using Robust.Server.Interfaces.GameObjects; +using Robust.Shared.GameObjects; +using Robust.Shared.GameObjects.Systems; +using Robust.Shared.Interfaces.GameObjects; +using Robust.Shared.Localization; +using Robust.Shared.Serialization; +using Robust.Shared.Utility; +using Robust.Shared.ViewVariables; + +namespace Content.Server.GameObjects.Components.Power +{ + /// + /// Provides a "battery compartment" that can contain a of the matching + /// . Intended to supplement other components, not very useful by itself. + /// + [RegisterComponent] + public class PowerCellSlotComponent : Component, IExamine, IMapInit + { + public override string Name => "PowerCellSlot"; + + /// + /// What size of cell fits into this component. + /// + [ViewVariables(VVAccess.ReadWrite)] + public PowerCellSize SlotSize { get; set; } = PowerCellSize.Small; + + /// + /// Can the cell be removed ? + /// + [ViewVariables(VVAccess.ReadWrite)] + public bool CanRemoveCell { get; set; } = true; + + /// + /// Should the "Remove cell" verb be displayed on this component? + /// + [ViewVariables(VVAccess.ReadWrite)] + public bool ShowVerb { get; set; } = true; + + /// + /// String passed to String.Format when showing the description text for this item. + /// String.Format is given a single parameter which is the size letter (S/M/L) of the cells this component uses. + /// Use null to show no text. + /// + [ViewVariables(VVAccess.ReadWrite)] + public string? DescFormatString { get; set; } + + /// + /// File path to a sound file that should be played when the cell is removed. + /// + /// "/Audio/Items/pistol_magout.ogg" + [ViewVariables(VVAccess.ReadWrite)] + public string? CellRemoveSound { get; set; } + + /// + /// File path to a sound file that should be played when a cell is inserted. + /// + /// "/Audio/Items/pistol_magin.ogg" + [ViewVariables(VVAccess.ReadWrite)] + public string? CellInsertSound { get; set; } + + [ViewVariables] private ContainerSlot _cellContainer = default!; + + [ViewVariables] + public PowerCellComponent? Cell + { + get + { + if (_cellContainer.ContainedEntity == null) return null; + return _cellContainer.ContainedEntity.TryGetComponent(out PowerCellComponent? cell) ? cell : null; + } + } + + [ViewVariables] public bool HasCell => Cell != null; + + /// + /// True if we don't want a cell inserted during map init. + /// + private bool _startEmpty = false; + + /// + /// If not null, this cell type will be inserted at MapInit instead of the default Standard cell. + /// + private string? _startingCellType = null; + + public override void ExposeData(ObjectSerializer serializer) + { + base.ExposeData(serializer); + serializer.DataField(this, x => x.SlotSize, "slotSize", PowerCellSize.Small); + serializer.DataField(this, x => x.CanRemoveCell, "canRemoveCell", true); + serializer.DataField(this, x => x.ShowVerb, "showVerb", true); + serializer.DataField(ref _startEmpty, "startEmpty", false); + serializer.DataField(ref _startingCellType, "startingCellType", null); + serializer.DataField(this, x => x.CellRemoveSound, "cellRemoveSound", "/Audio/Items/pistol_magin.ogg"); + serializer.DataField(this, x => x.CellInsertSound, "cellInsertSound", "/Audio/Items/pistol_magout.ogg"); + serializer.DataField(this, x => x.DescFormatString, "descFormatString", "It uses size {0} power cells."); + } + + public override void Initialize() + { + base.Initialize(); + _cellContainer = ContainerManagerComponent.Ensure("cellslot_cell_container", Owner, out _); + } + + void IExamine.Examine(FormattedMessage message, bool inDetailsRange) + { + if (!inDetailsRange) return; + string sizeLetter = SlotSize switch + { + PowerCellSize.Small => Loc.GetString("S"), + PowerCellSize.Medium => Loc.GetString("M"), + PowerCellSize.Large => Loc.GetString("L"), + _ => "???" + }; + if (DescFormatString != null) message.AddMarkup(string.Format(DescFormatString, sizeLetter)); + } + + /// + /// Remove the cell from this component. If a user is specified, the cell will be put in their hands + /// or failing that, at their feet. If no user is specified the cell will be put at the location of + /// the parent of this component. + /// + /// (optional) the user to give the removed cell to. + /// Should be played upon removal? + /// The cell component of the entity that was removed, or null if removal failed. + public PowerCellComponent? EjectCell(IEntity? user, bool playSound = true) + { + var cell = Cell; + if (cell == null || !CanRemoveCell) return null; + if (!_cellContainer.Remove(cell.Owner)) return null; + //Dirty(); + if (user != null) + { + if (!user.TryGetComponent(out HandsComponent? hands) || !hands.PutInHand(cell.Owner.GetComponent())) + { + cell.Owner.Transform.Coordinates = user.Transform.Coordinates; + } + } + else + { + cell.Owner.Transform.Coordinates = Owner.Transform.Coordinates; + } + + if (playSound && CellRemoveSound != null) + { + EntitySystem.Get().PlayFromEntity(CellRemoveSound, Owner, AudioHelpers.WithVariation(0.125f)); + } + SendMessage(new PowerCellChangedMessage(true)); + return cell; + } + + /// + /// Tries to insert the given cell into this component. The cell will be put into the container of this component. + /// + /// The cell to insert. + /// Should be played upon insertion? + /// True if insertion succeeded; false otherwise. + public bool InsertCell(IEntity cell, bool playSound = true) + { + if (Cell != null) return false; + if (!cell.TryGetComponent(out var _)) return false; + if (!cell.TryGetComponent(out var cellComponent)) return false; + if (cellComponent.CellSize != SlotSize) return false; + if (!_cellContainer.Insert(cell)) return false; + //Dirty(); + if (playSound && CellInsertSound != null) + { + EntitySystem.Get().PlayFromEntity(CellInsertSound, Owner, AudioHelpers.WithVariation(0.125f)); + } + SendMessage(new PowerCellChangedMessage(false)); + return true; + } + + [Verb] + public sealed class EjectCellVerb : Verb + { + protected override void GetData(IEntity user, PowerCellSlotComponent component, VerbData data) + { + if (!component.ShowVerb || !ActionBlockerSystem.CanInteract(user)) + { + data.Visibility = VerbVisibility.Invisible; + return; + } + + if (component.Cell == null) + { + data.Text = Loc.GetString("Eject cell (cell missing)"); + } + else + { + data.Text = Loc.GetString("Eject cell"); + } + + if (component.Cell == null || !component.CanRemoveCell) + { + data.Visibility = VerbVisibility.Disabled; + } + } + + protected override void Activate(IEntity user, PowerCellSlotComponent component) + { + component.EjectCell(user); + } + } + + void IMapInit.MapInit() + { + if (_startEmpty || _cellContainer.ContainedEntity != null) + { + return; + } + + string type; + if (_startingCellType != null) + { + type = _startingCellType; + } + else + { + type = SlotSize switch + { + PowerCellSize.Small => "PowerCellSmallStandard", + PowerCellSize.Medium => "PowerCellMediumStandard", + PowerCellSize.Large => "PowerCellLargeStandard", + _ => throw new ArgumentOutOfRangeException() + }; + } + + var cell = Owner.EntityManager.SpawnEntity(type, Owner.Transform.Coordinates); + _cellContainer.Insert(cell); + } + } + + public class PowerCellChangedMessage : ComponentMessage + { + /// + /// If true, the cell was ejected; if false, it was inserted. + /// + public bool Ejected { get; } + + public PowerCellChangedMessage(bool ejected) + { + Ejected = ejected; + } + } +} diff --git a/Content.Server/GameObjects/Components/Weapon/Melee/StunbatonComponent.cs b/Content.Server/GameObjects/Components/Weapon/Melee/StunbatonComponent.cs index 377748da11..03de47d17d 100644 --- a/Content.Server/GameObjects/Components/Weapon/Melee/StunbatonComponent.cs +++ b/Content.Server/GameObjects/Components/Weapon/Melee/StunbatonComponent.cs @@ -1,4 +1,5 @@ -using System.Collections.Generic; +#nullable enable +using System.Collections.Generic; using System.Threading.Tasks; using Content.Server.GameObjects.Components.GUI; using Content.Server.GameObjects.Components.Items.Storage; @@ -28,7 +29,7 @@ using Robust.Shared.ViewVariables; namespace Content.Server.GameObjects.Components.Weapon.Melee { [RegisterComponent] - public class StunbatonComponent : MeleeWeaponComponent, IUse, IExamine, IMapInit, IInteractUsing, IThrowCollide + public class StunbatonComponent : MeleeWeaponComponent, IUse, IExamine, IInteractUsing, IThrowCollide { [Dependency] private readonly IRobustRandom _robustRandom = default!; @@ -36,7 +37,8 @@ namespace Content.Server.GameObjects.Components.Weapon.Melee private bool _activated = false; - [ViewVariables] private ContainerSlot _cellContainer; + [ViewVariables] private PowerCellSlotComponent _cellSlot = default!; + private PowerCellComponent? Cell => _cellSlot.Cell; [ViewVariables(VVAccess.ReadWrite)] private float _paralyzeChanceNoSlowdown = 0.35f; @@ -55,23 +57,10 @@ namespace Content.Server.GameObjects.Components.Weapon.Melee [ViewVariables] public bool Activated => _activated; - [ViewVariables] - private BatteryComponent Cell - { - get - { - if (_cellContainer.ContainedEntity == null) return null; - - _cellContainer.ContainedEntity.TryGetComponent(out BatteryComponent cell); - return cell; - } - } - public override void Initialize() { base.Initialize(); - _cellContainer = - ContainerManagerComponent.Ensure("stunbaton_cell_container", Owner, out var existed); + _cellSlot = Owner.EnsureComponent(); } public override void ExposeData(ObjectSerializer serializer) @@ -84,6 +73,23 @@ namespace Content.Server.GameObjects.Components.Weapon.Melee serializer.DataField(ref _slowdownTime, "slowdownTime", 5f); } + public override void HandleMessage(ComponentMessage message, IComponent? component) + { + base.HandleMessage(message, component); + switch (message) + { + case PowerCellChangedMessage m: + if (component is PowerCellSlotComponent slotComponent && slotComponent == _cellSlot) + { + if (m.Ejected) + { + TurnOff(); + } + } + break; + } + } + protected override bool OnHitEntities(IReadOnlyList entities, AttackEventArgs eventArgs) { if (!Activated || entities.Count == 0 || Cell == null) @@ -96,7 +102,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Melee foreach (var entity in entities) { - if (!entity.TryGetComponent(out StunnableComponent stunnable)) continue; + if (!entity.TryGetComponent(out StunnableComponent? stunnable)) continue; if(!stunnable.SlowedDown) if(_robustRandom.Prob(_paralyzeChanceNoSlowdown)) @@ -120,6 +126,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Melee private bool ToggleStatus(IEntity user) { + if (!ActionBlockerSystem.CanUse(user)) return false; if (Activated) { TurnOff(); @@ -158,9 +165,8 @@ namespace Content.Server.GameObjects.Components.Weapon.Melee var sprite = Owner.GetComponent(); var item = Owner.GetComponent(); - var cell = Cell; - if (cell == null) + if (Cell == null) { EntitySystem.Get().PlayAtCoords("/Audio/Machines/button.ogg", Owner.Transform.Coordinates, AudioHelpers.WithVariation(0.25f)); @@ -168,7 +174,7 @@ namespace Content.Server.GameObjects.Components.Weapon.Melee return; } - if (cell.CurrentCharge < EnergyPerUse) + if (Cell.CurrentCharge < EnergyPerUse) { EntitySystem.Get().PlayAtCoords("/Audio/Machines/button.ogg", Owner.Transform.Coordinates, AudioHelpers.WithVariation(0.25f)); Owner.PopupMessage(user, Loc.GetString("Dead cell...")); @@ -191,51 +197,12 @@ namespace Content.Server.GameObjects.Components.Weapon.Melee public async Task InteractUsing(InteractUsingEventArgs eventArgs) { - if (!eventArgs.Using.HasComponent()) return false; - - if (Cell != null) return false; - - var handsComponent = eventArgs.User.GetComponent(); - - if (!handsComponent.Drop(eventArgs.Using, _cellContainer)) - { - return false; - } - - EntitySystem.Get().PlayFromEntity("/Audio/Items/pistol_magin.ogg", Owner); - + if (!ActionBlockerSystem.CanInteract(eventArgs.User)) return false; + if (!_cellSlot.InsertCell(eventArgs.Using)) return false; Dirty(); - return true; } - private void EjectCell(IEntity user) - { - if (Cell == null) - { - return; - } - - var cell = Cell; - - if (!_cellContainer.Remove(cell.Owner)) - { - return; - } - - if (!user.TryGetComponent(out HandsComponent hands)) - { - return; - } - - if (!hands.PutInHand(cell.Owner.GetComponent())) - { - cell.Owner.Transform.Coordinates = user.Transform.Coordinates; - } - - EntitySystem.Get().PlayAtCoords("/Audio/Items/pistol_magout.ogg", Owner.Transform.Coordinates, AudioHelpers.WithVariation(0.25f)); - } - public void Examine(FormattedMessage message, bool inDetailsRange) { if (Activated) @@ -244,48 +211,9 @@ namespace Content.Server.GameObjects.Components.Weapon.Melee } } - public void MapInit() - { - if (_cellContainer.ContainedEntity != null) - { - return; - } - - var cell = Owner.EntityManager.SpawnEntity("PowerCellSmallHyper", Owner.Transform.Coordinates); - _cellContainer.Insert(cell); - } - - [Verb] - public sealed class EjectCellVerb : Verb - { - protected override void GetData(IEntity user, StunbatonComponent component, VerbData data) - { - if (!ActionBlockerSystem.CanInteract(user)) - { - data.Visibility = VerbVisibility.Invisible; - return; - } - - if (component.Cell == null) - { - data.Text = Loc.GetString("Eject cell (cell missing)"); - data.Visibility = VerbVisibility.Disabled; - } - else - { - data.Text = Loc.GetString("Eject cell"); - } - } - - protected override void Activate(IEntity user, StunbatonComponent component) - { - component.EjectCell(user); - } - } - public void DoHit(ThrowCollideEventArgs eventArgs) { - if (!Activated || Cell == null || !Cell.TryUseCharge(EnergyPerUse) || !eventArgs.Target.TryGetComponent(out StunnableComponent stunnable)) + if (!Activated || Cell == null || !Cell.TryUseCharge(EnergyPerUse) || !eventArgs.Target.TryGetComponent(out StunnableComponent? stunnable)) return; EntitySystem.Get().PlayAtCoords("/Audio/Weapons/egloves.ogg", Owner.Transform.Coordinates, AudioHelpers.WithVariation(0.25f)); diff --git a/Content.Server/GameObjects/EntitySystems/BatterySystem.cs b/Content.Server/GameObjects/EntitySystems/BatterySystem.cs new file mode 100644 index 0000000000..9a4aefbf80 --- /dev/null +++ b/Content.Server/GameObjects/EntitySystems/BatterySystem.cs @@ -0,0 +1,18 @@ +using Content.Server.GameObjects.Components.Power; +using JetBrains.Annotations; +using Robust.Shared.GameObjects.Systems; + +namespace Content.Server.GameObjects.EntitySystems +{ + [UsedImplicitly] + public class BatterySystem : EntitySystem + { + public override void Update(float frameTime) + { + foreach (var comp in ComponentManager.EntityQuery(false)) + { + comp.OnUpdate(frameTime); + } + } + } +} diff --git a/Content.Server/GameObjects/EntitySystems/HandHeldLightSystem.cs b/Content.Server/GameObjects/EntitySystems/HandHeldLightSystem.cs index abb68219e7..3947f882a7 100644 --- a/Content.Server/GameObjects/EntitySystems/HandHeldLightSystem.cs +++ b/Content.Server/GameObjects/EntitySystems/HandHeldLightSystem.cs @@ -9,7 +9,7 @@ namespace Content.Server.GameObjects.EntitySystems { public override void Update(float frameTime) { - foreach (var comp in ComponentManager.EntityQuery()) + foreach (var comp in ComponentManager.EntityQuery(false)) { comp.OnUpdate(frameTime); } diff --git a/Content.Shared/Utility/ContentHelpers.cs b/Content.Shared/Utility/ContentHelpers.cs index 58cc6a7110..69132a4082 100644 --- a/Content.Shared/Utility/ContentHelpers.cs +++ b/Content.Shared/Utility/ContentHelpers.cs @@ -56,5 +56,53 @@ namespace Content.Shared.Utility return (int)Math.Floor(preround); } } + + /// + /// Returns the segment lies on on a decimal scale from 0 to divided into + /// sections. In less mathematical terms, same as + /// except is rounded to the nearest matching level instead of 0 and the highest level being + /// precisely 0 and max and no other value. + /// + /// + /// You have a 5-segment progress bar used to display a percentile value. + /// You want the display to match the percentile value as accurately as possible, so that eg. + /// 95% is rounded up to 5, 89.99% is rounded down to 4, 15% is rounded up to 1 and 5% is rounded down + /// to 0, in terms of number of segments lit. + /// In this case you would use RoundToNearestLevels(value, max, 5) + /// + /// The point to be rounded to the nearest level. + /// The maximum value of the scale. + /// Number of segments the scale is subdivided into. + /// The segment lies on. + /// + public static int RoundToNearestLevels(double actual, double max, int levels) + { + if (levels <= 1) + { + throw new ArgumentException("Levels must be greater than 1.", nameof(levels)); + } + if (actual >= max) + { + return levels; + } + if (actual <= 0) + { + return 0; + } + double step = max / levels; + + int nearest = 0; + double nearestDiff = actual; + for (var i = 1; i <= levels; i++) + { + var diff = Math.Abs(actual - i * step); + if (diff < nearestDiff) + { + nearestDiff = diff; + nearest = i; + } + } + return nearest; + } } } diff --git a/Resources/Prototypes/Entities/Objects/Power/powercells.yml b/Resources/Prototypes/Entities/Objects/Power/powercells.yml index bf577d7475..a0c7b0e26b 100644 --- a/Resources/Prototypes/Entities/Objects/Power/powercells.yml +++ b/Resources/Prototypes/Entities/Objects/Power/powercells.yml @@ -1,5 +1,7 @@ -- type: entity - id: PowerCellSmallBase +# Power cells + +- type: entity + id: PowerCellBase abstract: true parent: BaseItem components: @@ -7,16 +9,55 @@ anchored: false shapes: - !type:PhysShapeAabb - bounds: "-0.15,-0.3,0.2,0.3" + bounds: "-0.15,-0.3,0.2,0.3" # TODO: these are placeholder values layer: - Clickable - type: PowerCell - - type: Appearance - type: Sprite netsync: false +- type: entity + id: PowerCellSmallBase + abstract: true + parent: PowerCellBase + components: + - type: PowerCell + cellSize: Small + +- type: entity + id: PowerCellMediumBase + abstract: true + parent: PowerCellBase + components: + - type: PowerCell + cellSize: Medium + +- type: entity + id: PowerCellLargeBase + abstract: true + parent: PowerCellBase + components: + - type: PowerCell + cellSize: Large + +- type: entity + name: potato battery + description: Someone's stuck two nails and some wire in a large potato. Somehow it provides a little charge. You might be able to cram it into an M-sized slot. + id: PowerCellMediumPotato + parent: PowerCellMediumBase + components: + - type: Sprite + sprite: Objects/Power/PowerCells/potato_battery.rsi + layers: + - state: potato_battery + - type: PowerCell + maxCharge: 360 + startingCharge: 360 + updateVisual: false + - type: entity name: small standard power cell + description: A rechargeable standardized power cell, size S. This is the cheapest kind you can find. id: PowerCellSmallStandard parent: PowerCellSmallBase components: @@ -25,8 +66,8 @@ layers: - state: s_st - type: PowerCell - maxCharge: 15000 - startingCharge: 15000 + maxCharge: 360 + startingCharge: 360 - type: Appearance visuals: - type: PowerCellVisualizer @@ -35,6 +76,7 @@ - type: entity name: small high-capacity power cell + description: A rechargeable standardized power cell, size S. This is the popular and reliable version. id: PowerCellSmallHigh parent: PowerCellSmallBase components: @@ -43,8 +85,8 @@ layers: - state: s_hi - type: PowerCell - maxCharge: 30000 - startingCharge: 30000 + maxCharge: 720 + startingCharge: 720 - type: Appearance visuals: - type: PowerCellVisualizer @@ -53,6 +95,7 @@ - type: entity name: small super-capacity power cell + description: A rechargeable standardized power cell, size S. This premium high-capacity brand stores up to 50% more energy than the competition. id: PowerCellSmallSuper parent: PowerCellSmallBase components: @@ -61,8 +104,8 @@ layers: - state: s_sup - type: PowerCell - maxCharge: 60000 - startingCharge: 60000 + maxCharge: 1080 + startingCharge: 1080 - type: Appearance visuals: - type: PowerCellVisualizer @@ -71,6 +114,7 @@ - type: entity name: small hyper-capacity power cell + description: A rechargeable standardized power cell, size S. This one looks like a rare and powerful prototype. id: PowerCellSmallHyper parent: PowerCellSmallBase components: @@ -79,13 +123,178 @@ layers: - state: s_hy - type: PowerCell - maxCharge: 80000 - startingCharge: 80000 + maxCharge: 1800 + startingCharge: 1800 - type: Appearance visuals: - type: PowerCellVisualizer prefix: s_hy +- type: entity + name: small microreactor cell + description: A rechargeable standardized microreactor cell, size S. Intended for low-power devices, it slowly recharges by itself. + id: PowerCellSmallAutorecharge + parent: PowerCellSmallBase + components: + - type: Sprite + sprite: Objects/Power/PowerCells/power_cell_small_autorecharge.rsi + layers: + - state: s_ar + - type: PowerCell + maxCharge: 50 + startingCharge: 50 + autoRecharge: true + autoRechargeRate: 0.16667 #takes about 5 minutes to charge itself back to full + - type: Appearance + visuals: + - type: PowerCellVisualizer + prefix: s_ar + +- type: entity + name: medium standard power cell + description: A rechargeable standardized power cell, size M. This is the cheapest kind you can find. + id: PowerCellMediumStandard + parent: PowerCellMediumBase + components: + - type: Sprite + sprite: Objects/Power/PowerCells/power_cell_medium_st.rsi + layers: + - state: m_st + - type: PowerCell + maxCharge: 2160 + startingCharge: 2160 + - type: Appearance + visuals: + - type: PowerCellVisualizer + prefix: m_st + +- type: entity + name: medium high-capacity power cell + description: A rechargeable standardized power cell, size M. This is the popular and reliable version. + id: PowerCellMediumHigh + parent: PowerCellMediumBase + components: + - type: Sprite + sprite: Objects/Power/PowerCells/power_cell_medium_hi.rsi + layers: + - state: m_hi + - type: PowerCell + maxCharge: 2880 + startingCharge: 2880 + powerCellSize: Medium + - type: Appearance + visuals: + - type: PowerCellVisualizer + prefix: m_hi + +- type: entity + name: medium super-capacity power cell + description: A rechargeable standardized power cell, size M. This premium high-capacity brand stores up to 50% more energy than the competition. + id: PowerCellMediumSuper + parent: PowerCellMediumBase + components: + - type: Sprite + sprite: Objects/Power/PowerCells/power_cell_medium_sup.rsi + layers: + - state: m_sup + - type: PowerCell + maxCharge: 3600 + startingCharge: 3600 + - type: Appearance + visuals: + - type: PowerCellVisualizer + prefix: m_sup + +- type: entity + name: medium hyper-capacity power cell + description: A rechargeable standardized power cell, size M. This one looks like a rare and powerful prototype. + id: PowerCellMediumHyper + parent: PowerCellMediumBase + components: + - type: Sprite + sprite: Objects/Power/PowerCells/power_cell_medium_hy.rsi + layers: + - state: m_hy + - type: PowerCell + maxCharge: 5400 + startingCharge: 5400 + - type: Appearance + visuals: + - type: PowerCellVisualizer + prefix: m_hy + +- type: entity + name: large standard power cell + description: A rechargeable standardized power cell, size L. This is the cheapest kind you can find. + id: PowerCellLargeStandard + parent: PowerCellLargeBase + components: + - type: Sprite + sprite: Objects/Power/PowerCells/power_cell_large_st.rsi + layers: + - state: l_st + - type: PowerCell + maxCharge: 9000 + startingCharge: 9000 + - type: Appearance + visuals: + - type: PowerCellVisualizer + prefix: l_st + +- type: entity + name: large high-capacity power cell + description: A rechargeable standardized power cell, size L. This is the popular and reliable version. + id: PowerCellLargeHigh + parent: PowerCellLargeBase + components: + - type: Sprite + sprite: Objects/Power/PowerCells/power_cell_large_hi.rsi + layers: + - state: l_hi + - type: PowerCell + maxCharge: 18000 + startingCharge: 18000 + - type: Appearance + visuals: + - type: PowerCellVisualizer + prefix: l_hi + +- type: entity + name: large super-capacity power cell + description: A rechargeable standardized power cell, size M. This premium high-capacity brand stores up to 50% more energy than the competition. + id: PowerCellLargeSuper + parent: PowerCellLargeBase + components: + - type: Sprite + sprite: Objects/Power/PowerCells/power_cell_large_sup.rsi + layers: + - state: l_sup + - type: PowerCell + maxCharge: 54000 + startingCharge: 54000 + - type: Appearance + visuals: + - type: PowerCellVisualizer + prefix: l_sup + +- type: entity + name: large hyper-capacity power cell + description: A rechargeable standardized power cell, size L. This one looks like a rare and powerful prototype. + id: PowerCellLargeHyper + parent: PowerCellLargeBase + components: + - type: Sprite + sprite: Objects/Power/PowerCells/power_cell_large_hy.rsi + layers: + - state: l_hy + - type: PowerCell + maxCharge: 72000 + startingCharge: 72000 + - type: Appearance + visuals: + - type: PowerCellVisualizer + prefix: l_hy + - type: entity name: cell recharger id: PowerCellRecharger diff --git a/Resources/Prototypes/Entities/Objects/Tools/flashlight.yml b/Resources/Prototypes/Entities/Objects/Tools/flashlight.yml index e1de7745b0..7fa4d153b3 100644 --- a/Resources/Prototypes/Entities/Objects/Tools/flashlight.yml +++ b/Resources/Prototypes/Entities/Objects/Tools/flashlight.yml @@ -5,6 +5,7 @@ description: They light the way to freedom. components: - type: HandheldLight + - type: PowerCellSlot - type: Sprite sprite: Objects/Tools/flashlight.rsi layers: diff --git a/Resources/Prototypes/Entities/Objects/Weapons/security.yml b/Resources/Prototypes/Entities/Objects/Weapons/security.yml index ea46c881b4..222a3b788b 100644 --- a/Resources/Prototypes/Entities/Objects/Weapons/security.yml +++ b/Resources/Prototypes/Entities/Objects/Weapons/security.yml @@ -1,8 +1,8 @@ - type: entity name: stun baton + description: A stun baton for incapacitating people with. parent: BaseItem id: Stunbaton - description: A melee weapon which delivers an incapacitating shock, knocking them to the ground or at least disorientating them. components: - type: Sprite sprite: Objects/Weapons/Melee/stunbaton.rsi @@ -16,6 +16,10 @@ arcwidth: 0 arc: default + - type: PowerCellSlot + slotSize: Medium + startingCellType: PowerCellMediumHigh + - type: Item size: 10 sprite: Objects/Weapons/Melee/stunbaton.rsi diff --git a/Resources/Textures/Objects/Power/PowerCells/potato_battery.rsi/meta.json b/Resources/Textures/Objects/Power/PowerCells/potato_battery.rsi/meta.json new file mode 100644 index 0000000000..273a0a949b --- /dev/null +++ b/Resources/Textures/Objects/Power/PowerCells/potato_battery.rsi/meta.json @@ -0,0 +1,20 @@ +{ + "version": 1, + "size": { + "x": 32, + "y": 32 + }, + "license": "CC-BY-SA-3.0", + "copyright": "https://github.com/tgstation/tgstation/commit/7dcdbc1468ffdc8689b984cb6b181d48ae41dbf2", + "states": [ + { + "name": "potato_battery", + "directions": 1, + "delays": [ + [ + 1.0 + ] + ] + } + ] +} diff --git a/Resources/Textures/Objects/Power/PowerCells/potato_battery.rsi/potato_battery.png b/Resources/Textures/Objects/Power/PowerCells/potato_battery.rsi/potato_battery.png new file mode 100644 index 0000000000..5b0f7a5fe0 Binary files /dev/null and b/Resources/Textures/Objects/Power/PowerCells/potato_battery.rsi/potato_battery.png differ diff --git a/Resources/Textures/Objects/Power/PowerCells/power_cell_large_hi.rsi/l_hi.png b/Resources/Textures/Objects/Power/PowerCells/power_cell_large_hi.rsi/l_hi.png new file mode 100644 index 0000000000..24319ba7b6 Binary files /dev/null and b/Resources/Textures/Objects/Power/PowerCells/power_cell_large_hi.rsi/l_hi.png differ diff --git a/Resources/Textures/Objects/Power/PowerCells/power_cell_large_hi.rsi/l_hi_0.png b/Resources/Textures/Objects/Power/PowerCells/power_cell_large_hi.rsi/l_hi_0.png new file mode 100644 index 0000000000..7f189021e5 Binary files /dev/null and b/Resources/Textures/Objects/Power/PowerCells/power_cell_large_hi.rsi/l_hi_0.png differ diff --git a/Resources/Textures/Objects/Power/PowerCells/power_cell_large_hi.rsi/l_hi_100.png b/Resources/Textures/Objects/Power/PowerCells/power_cell_large_hi.rsi/l_hi_100.png new file mode 100644 index 0000000000..7500ff37b6 Binary files /dev/null and b/Resources/Textures/Objects/Power/PowerCells/power_cell_large_hi.rsi/l_hi_100.png differ diff --git a/Resources/Textures/Objects/Power/PowerCells/power_cell_large_hi.rsi/l_hi_25.png b/Resources/Textures/Objects/Power/PowerCells/power_cell_large_hi.rsi/l_hi_25.png new file mode 100644 index 0000000000..9ec9c4a60f Binary files /dev/null and b/Resources/Textures/Objects/Power/PowerCells/power_cell_large_hi.rsi/l_hi_25.png differ diff --git a/Resources/Textures/Objects/Power/PowerCells/power_cell_large_hi.rsi/l_hi_50.png b/Resources/Textures/Objects/Power/PowerCells/power_cell_large_hi.rsi/l_hi_50.png new file mode 100644 index 0000000000..e78b3016f9 Binary files /dev/null and b/Resources/Textures/Objects/Power/PowerCells/power_cell_large_hi.rsi/l_hi_50.png differ diff --git a/Resources/Textures/Objects/Power/PowerCells/power_cell_large_hi.rsi/l_hi_75.png b/Resources/Textures/Objects/Power/PowerCells/power_cell_large_hi.rsi/l_hi_75.png new file mode 100644 index 0000000000..0e1badd891 Binary files /dev/null and b/Resources/Textures/Objects/Power/PowerCells/power_cell_large_hi.rsi/l_hi_75.png differ diff --git a/Resources/Textures/Objects/Power/PowerCells/power_cell_large_hi.rsi/meta.json b/Resources/Textures/Objects/Power/PowerCells/power_cell_large_hi.rsi/meta.json new file mode 100644 index 0000000000..42532664e4 --- /dev/null +++ b/Resources/Textures/Objects/Power/PowerCells/power_cell_large_hi.rsi/meta.json @@ -0,0 +1,66 @@ +{ + "version": 1, + "size": { + "x": 32, + "y": 32 + }, + "license": "CC-BY-SA-3.0", + "copyright": "Taken from https://github.com/discordia-space/CEV-Eris/", + "states": [ + { + "name": "l_hi", + "directions": 1, + "delays": [ + [ + 1.0 + ] + ] + }, + { + "name": "l_hi_0", + "directions": 1, + "delays": [ + [ + 0.2, + 0.2 + ] + ] + }, + { + "name": "l_hi_100", + "directions": 1, + "delays": [ + [ + 1.0 + ] + ] + }, + { + "name": "l_hi_25", + "directions": 1, + "delays": [ + [ + 1.0 + ] + ] + }, + { + "name": "l_hi_50", + "directions": 1, + "delays": [ + [ + 1.0 + ] + ] + }, + { + "name": "l_hi_75", + "directions": 1, + "delays": [ + [ + 1.0 + ] + ] + } + ] +} diff --git a/Resources/Textures/Objects/Power/PowerCells/power_cell_large_hy.rsi/l_hy.png b/Resources/Textures/Objects/Power/PowerCells/power_cell_large_hy.rsi/l_hy.png new file mode 100644 index 0000000000..4f6aaee081 Binary files /dev/null and b/Resources/Textures/Objects/Power/PowerCells/power_cell_large_hy.rsi/l_hy.png differ diff --git a/Resources/Textures/Objects/Power/PowerCells/power_cell_large_hy.rsi/l_hy_0.png b/Resources/Textures/Objects/Power/PowerCells/power_cell_large_hy.rsi/l_hy_0.png new file mode 100644 index 0000000000..7969203665 Binary files /dev/null and b/Resources/Textures/Objects/Power/PowerCells/power_cell_large_hy.rsi/l_hy_0.png differ diff --git a/Resources/Textures/Objects/Power/PowerCells/power_cell_large_hy.rsi/l_hy_100.png b/Resources/Textures/Objects/Power/PowerCells/power_cell_large_hy.rsi/l_hy_100.png new file mode 100644 index 0000000000..97c6df65ae Binary files /dev/null and b/Resources/Textures/Objects/Power/PowerCells/power_cell_large_hy.rsi/l_hy_100.png differ diff --git a/Resources/Textures/Objects/Power/PowerCells/power_cell_large_hy.rsi/l_hy_25.png b/Resources/Textures/Objects/Power/PowerCells/power_cell_large_hy.rsi/l_hy_25.png new file mode 100644 index 0000000000..b4d7074179 Binary files /dev/null and b/Resources/Textures/Objects/Power/PowerCells/power_cell_large_hy.rsi/l_hy_25.png differ diff --git a/Resources/Textures/Objects/Power/PowerCells/power_cell_large_hy.rsi/l_hy_50.png b/Resources/Textures/Objects/Power/PowerCells/power_cell_large_hy.rsi/l_hy_50.png new file mode 100644 index 0000000000..fb1540d6b3 Binary files /dev/null and b/Resources/Textures/Objects/Power/PowerCells/power_cell_large_hy.rsi/l_hy_50.png differ diff --git a/Resources/Textures/Objects/Power/PowerCells/power_cell_large_hy.rsi/l_hy_75.png b/Resources/Textures/Objects/Power/PowerCells/power_cell_large_hy.rsi/l_hy_75.png new file mode 100644 index 0000000000..7de1faebd2 Binary files /dev/null and b/Resources/Textures/Objects/Power/PowerCells/power_cell_large_hy.rsi/l_hy_75.png differ diff --git a/Resources/Textures/Objects/Power/PowerCells/power_cell_large_hy.rsi/meta.json b/Resources/Textures/Objects/Power/PowerCells/power_cell_large_hy.rsi/meta.json new file mode 100644 index 0000000000..f81f46f26b --- /dev/null +++ b/Resources/Textures/Objects/Power/PowerCells/power_cell_large_hy.rsi/meta.json @@ -0,0 +1,66 @@ +{ + "version": 1, + "size": { + "x": 32, + "y": 32 + }, + "license": "CC-BY-SA-3.0", + "copyright": "Taken from https://github.com/discordia-space/CEV-Eris/", + "states": [ + { + "name": "l_hy", + "directions": 1, + "delays": [ + [ + 1.0 + ] + ] + }, + { + "name": "l_hy_0", + "directions": 1, + "delays": [ + [ + 0.2, + 0.2 + ] + ] + }, + { + "name": "l_hy_100", + "directions": 1, + "delays": [ + [ + 1.0 + ] + ] + }, + { + "name": "l_hy_25", + "directions": 1, + "delays": [ + [ + 1.0 + ] + ] + }, + { + "name": "l_hy_50", + "directions": 1, + "delays": [ + [ + 1.0 + ] + ] + }, + { + "name": "l_hy_75", + "directions": 1, + "delays": [ + [ + 1.0 + ] + ] + } + ] +} diff --git a/Resources/Textures/Objects/Power/PowerCells/power_cell_large_st.rsi/l_st.png b/Resources/Textures/Objects/Power/PowerCells/power_cell_large_st.rsi/l_st.png new file mode 100644 index 0000000000..bbe727eea7 Binary files /dev/null and b/Resources/Textures/Objects/Power/PowerCells/power_cell_large_st.rsi/l_st.png differ diff --git a/Resources/Textures/Objects/Power/PowerCells/power_cell_large_st.rsi/l_st_0.png b/Resources/Textures/Objects/Power/PowerCells/power_cell_large_st.rsi/l_st_0.png new file mode 100644 index 0000000000..e87e324901 Binary files /dev/null and b/Resources/Textures/Objects/Power/PowerCells/power_cell_large_st.rsi/l_st_0.png differ diff --git a/Resources/Textures/Objects/Power/PowerCells/power_cell_large_st.rsi/l_st_100.png b/Resources/Textures/Objects/Power/PowerCells/power_cell_large_st.rsi/l_st_100.png new file mode 100644 index 0000000000..d5f070f7c4 Binary files /dev/null and b/Resources/Textures/Objects/Power/PowerCells/power_cell_large_st.rsi/l_st_100.png differ diff --git a/Resources/Textures/Objects/Power/PowerCells/power_cell_large_st.rsi/l_st_25.png b/Resources/Textures/Objects/Power/PowerCells/power_cell_large_st.rsi/l_st_25.png new file mode 100644 index 0000000000..a15d4eac39 Binary files /dev/null and b/Resources/Textures/Objects/Power/PowerCells/power_cell_large_st.rsi/l_st_25.png differ diff --git a/Resources/Textures/Objects/Power/PowerCells/power_cell_large_st.rsi/l_st_50.png b/Resources/Textures/Objects/Power/PowerCells/power_cell_large_st.rsi/l_st_50.png new file mode 100644 index 0000000000..a10e8e9126 Binary files /dev/null and b/Resources/Textures/Objects/Power/PowerCells/power_cell_large_st.rsi/l_st_50.png differ diff --git a/Resources/Textures/Objects/Power/PowerCells/power_cell_large_st.rsi/l_st_75.png b/Resources/Textures/Objects/Power/PowerCells/power_cell_large_st.rsi/l_st_75.png new file mode 100644 index 0000000000..5d62807d25 Binary files /dev/null and b/Resources/Textures/Objects/Power/PowerCells/power_cell_large_st.rsi/l_st_75.png differ diff --git a/Resources/Textures/Objects/Power/PowerCells/power_cell_large_st.rsi/meta.json b/Resources/Textures/Objects/Power/PowerCells/power_cell_large_st.rsi/meta.json new file mode 100644 index 0000000000..f70ce1df73 --- /dev/null +++ b/Resources/Textures/Objects/Power/PowerCells/power_cell_large_st.rsi/meta.json @@ -0,0 +1,66 @@ +{ + "version": 1, + "size": { + "x": 32, + "y": 32 + }, + "license": "CC-BY-SA-3.0", + "copyright": "Taken from https://github.com/discordia-space/CEV-Eris/", + "states": [ + { + "name": "l_st", + "directions": 1, + "delays": [ + [ + 1.0 + ] + ] + }, + { + "name": "l_st_0", + "directions": 1, + "delays": [ + [ + 0.2, + 0.2 + ] + ] + }, + { + "name": "l_st_100", + "directions": 1, + "delays": [ + [ + 1.0 + ] + ] + }, + { + "name": "l_st_25", + "directions": 1, + "delays": [ + [ + 1.0 + ] + ] + }, + { + "name": "l_st_50", + "directions": 1, + "delays": [ + [ + 1.0 + ] + ] + }, + { + "name": "l_st_75", + "directions": 1, + "delays": [ + [ + 1.0 + ] + ] + } + ] +} \ No newline at end of file diff --git a/Resources/Textures/Objects/Power/PowerCells/power_cell_large_sup.rsi/l_sup.png b/Resources/Textures/Objects/Power/PowerCells/power_cell_large_sup.rsi/l_sup.png new file mode 100644 index 0000000000..b19282034e Binary files /dev/null and b/Resources/Textures/Objects/Power/PowerCells/power_cell_large_sup.rsi/l_sup.png differ diff --git a/Resources/Textures/Objects/Power/PowerCells/power_cell_large_sup.rsi/l_sup_0.png b/Resources/Textures/Objects/Power/PowerCells/power_cell_large_sup.rsi/l_sup_0.png new file mode 100644 index 0000000000..099a6cb151 Binary files /dev/null and b/Resources/Textures/Objects/Power/PowerCells/power_cell_large_sup.rsi/l_sup_0.png differ diff --git a/Resources/Textures/Objects/Power/PowerCells/power_cell_large_sup.rsi/l_sup_100.png b/Resources/Textures/Objects/Power/PowerCells/power_cell_large_sup.rsi/l_sup_100.png new file mode 100644 index 0000000000..f21fd15b25 Binary files /dev/null and b/Resources/Textures/Objects/Power/PowerCells/power_cell_large_sup.rsi/l_sup_100.png differ diff --git a/Resources/Textures/Objects/Power/PowerCells/power_cell_large_sup.rsi/l_sup_25.png b/Resources/Textures/Objects/Power/PowerCells/power_cell_large_sup.rsi/l_sup_25.png new file mode 100644 index 0000000000..d6180813b4 Binary files /dev/null and b/Resources/Textures/Objects/Power/PowerCells/power_cell_large_sup.rsi/l_sup_25.png differ diff --git a/Resources/Textures/Objects/Power/PowerCells/power_cell_large_sup.rsi/l_sup_50.png b/Resources/Textures/Objects/Power/PowerCells/power_cell_large_sup.rsi/l_sup_50.png new file mode 100644 index 0000000000..93a0899293 Binary files /dev/null and b/Resources/Textures/Objects/Power/PowerCells/power_cell_large_sup.rsi/l_sup_50.png differ diff --git a/Resources/Textures/Objects/Power/PowerCells/power_cell_large_sup.rsi/l_sup_75.png b/Resources/Textures/Objects/Power/PowerCells/power_cell_large_sup.rsi/l_sup_75.png new file mode 100644 index 0000000000..25191ae890 Binary files /dev/null and b/Resources/Textures/Objects/Power/PowerCells/power_cell_large_sup.rsi/l_sup_75.png differ diff --git a/Resources/Textures/Objects/Power/PowerCells/power_cell_large_sup.rsi/meta.json b/Resources/Textures/Objects/Power/PowerCells/power_cell_large_sup.rsi/meta.json new file mode 100644 index 0000000000..e61dbb4cb9 --- /dev/null +++ b/Resources/Textures/Objects/Power/PowerCells/power_cell_large_sup.rsi/meta.json @@ -0,0 +1,66 @@ +{ + "version": 1, + "size": { + "x": 32, + "y": 32 + }, + "license": "CC-BY-SA-3.0", + "copyright": "Taken from https://github.com/discordia-space/CEV-Eris/", + "states": [ + { + "name": "l_sup", + "directions": 1, + "delays": [ + [ + 1.0 + ] + ] + }, + { + "name": "l_sup_0", + "directions": 1, + "delays": [ + [ + 0.2, + 0.2 + ] + ] + }, + { + "name": "l_sup_100", + "directions": 1, + "delays": [ + [ + 1.0 + ] + ] + }, + { + "name": "l_sup_25", + "directions": 1, + "delays": [ + [ + 1.0 + ] + ] + }, + { + "name": "l_sup_50", + "directions": 1, + "delays": [ + [ + 1.0 + ] + ] + }, + { + "name": "l_sup_75", + "directions": 1, + "delays": [ + [ + 1.0 + ] + ] + } + ] +} \ No newline at end of file diff --git a/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_hi.rsi/m_hi.png b/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_hi.rsi/m_hi.png new file mode 100644 index 0000000000..45f00d2a64 Binary files /dev/null and b/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_hi.rsi/m_hi.png differ diff --git a/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_hi.rsi/m_hi_0.png b/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_hi.rsi/m_hi_0.png new file mode 100644 index 0000000000..023a923808 Binary files /dev/null and b/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_hi.rsi/m_hi_0.png differ diff --git a/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_hi.rsi/m_hi_100.png b/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_hi.rsi/m_hi_100.png new file mode 100644 index 0000000000..5f73abd4f0 Binary files /dev/null and b/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_hi.rsi/m_hi_100.png differ diff --git a/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_hi.rsi/m_hi_25.png b/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_hi.rsi/m_hi_25.png new file mode 100644 index 0000000000..bccefded5d Binary files /dev/null and b/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_hi.rsi/m_hi_25.png differ diff --git a/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_hi.rsi/m_hi_50.png b/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_hi.rsi/m_hi_50.png new file mode 100644 index 0000000000..6069362b2b Binary files /dev/null and b/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_hi.rsi/m_hi_50.png differ diff --git a/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_hi.rsi/m_hi_75.png b/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_hi.rsi/m_hi_75.png new file mode 100644 index 0000000000..1b59115d33 Binary files /dev/null and b/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_hi.rsi/m_hi_75.png differ diff --git a/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_hi.rsi/meta.json b/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_hi.rsi/meta.json new file mode 100644 index 0000000000..65521cece4 --- /dev/null +++ b/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_hi.rsi/meta.json @@ -0,0 +1,66 @@ +{ + "version": 1, + "size": { + "x": 32, + "y": 32 + }, + "license": "CC-BY-SA-3.0", + "copyright": "Taken from https://github.com/discordia-space/CEV-Eris/", + "states": [ + { + "name": "m_hi", + "directions": 1, + "delays": [ + [ + 1.0 + ] + ] + }, + { + "name": "m_hi_0", + "directions": 1, + "delays": [ + [ + 0.2, + 0.2 + ] + ] + }, + { + "name": "m_hi_100", + "directions": 1, + "delays": [ + [ + 1.0 + ] + ] + }, + { + "name": "m_hi_25", + "directions": 1, + "delays": [ + [ + 1.0 + ] + ] + }, + { + "name": "m_hi_50", + "directions": 1, + "delays": [ + [ + 1.0 + ] + ] + }, + { + "name": "m_hi_75", + "directions": 1, + "delays": [ + [ + 1.0 + ] + ] + } + ] +} \ No newline at end of file diff --git a/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_hy.rsi/m_hy.png b/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_hy.rsi/m_hy.png new file mode 100644 index 0000000000..99b9d25e87 Binary files /dev/null and b/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_hy.rsi/m_hy.png differ diff --git a/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_hy.rsi/m_hy_0.png b/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_hy.rsi/m_hy_0.png new file mode 100644 index 0000000000..e87acc3dcd Binary files /dev/null and b/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_hy.rsi/m_hy_0.png differ diff --git a/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_hy.rsi/m_hy_100.png b/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_hy.rsi/m_hy_100.png new file mode 100644 index 0000000000..18c2cdbf0f Binary files /dev/null and b/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_hy.rsi/m_hy_100.png differ diff --git a/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_hy.rsi/m_hy_25.png b/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_hy.rsi/m_hy_25.png new file mode 100644 index 0000000000..fbf162abc2 Binary files /dev/null and b/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_hy.rsi/m_hy_25.png differ diff --git a/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_hy.rsi/m_hy_50.png b/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_hy.rsi/m_hy_50.png new file mode 100644 index 0000000000..3ec152d2e4 Binary files /dev/null and b/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_hy.rsi/m_hy_50.png differ diff --git a/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_hy.rsi/m_hy_75.png b/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_hy.rsi/m_hy_75.png new file mode 100644 index 0000000000..aec9b65dca Binary files /dev/null and b/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_hy.rsi/m_hy_75.png differ diff --git a/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_hy.rsi/meta.json b/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_hy.rsi/meta.json new file mode 100644 index 0000000000..9c2c5af5e3 --- /dev/null +++ b/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_hy.rsi/meta.json @@ -0,0 +1,66 @@ +{ + "version": 1, + "size": { + "x": 32, + "y": 32 + }, + "license": "CC-BY-SA-3.0", + "copyright": "Taken from https://github.com/discordia-space/CEV-Eris/", + "states": [ + { + "name": "m_hy", + "directions": 1, + "delays": [ + [ + 1.0 + ] + ] + }, + { + "name": "m_hy_0", + "directions": 1, + "delays": [ + [ + 0.2, + 0.2 + ] + ] + }, + { + "name": "m_hy_100", + "directions": 1, + "delays": [ + [ + 1.0 + ] + ] + }, + { + "name": "m_hy_25", + "directions": 1, + "delays": [ + [ + 1.0 + ] + ] + }, + { + "name": "m_hy_50", + "directions": 1, + "delays": [ + [ + 1.0 + ] + ] + }, + { + "name": "m_hy_75", + "directions": 1, + "delays": [ + [ + 1.0 + ] + ] + } + ] +} \ No newline at end of file diff --git a/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_st.rsi/m_st.png b/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_st.rsi/m_st.png new file mode 100644 index 0000000000..fa74c07965 Binary files /dev/null and b/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_st.rsi/m_st.png differ diff --git a/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_st.rsi/m_st_0.png b/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_st.rsi/m_st_0.png new file mode 100644 index 0000000000..d9df7bb487 Binary files /dev/null and b/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_st.rsi/m_st_0.png differ diff --git a/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_st.rsi/m_st_100.png b/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_st.rsi/m_st_100.png new file mode 100644 index 0000000000..b00811e0c0 Binary files /dev/null and b/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_st.rsi/m_st_100.png differ diff --git a/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_st.rsi/m_st_25.png b/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_st.rsi/m_st_25.png new file mode 100644 index 0000000000..797a8f8189 Binary files /dev/null and b/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_st.rsi/m_st_25.png differ diff --git a/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_st.rsi/m_st_50.png b/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_st.rsi/m_st_50.png new file mode 100644 index 0000000000..5756932076 Binary files /dev/null and b/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_st.rsi/m_st_50.png differ diff --git a/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_st.rsi/m_st_75.png b/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_st.rsi/m_st_75.png new file mode 100644 index 0000000000..0ac081dcaf Binary files /dev/null and b/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_st.rsi/m_st_75.png differ diff --git a/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_st.rsi/meta.json b/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_st.rsi/meta.json new file mode 100644 index 0000000000..3ada43a2e9 --- /dev/null +++ b/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_st.rsi/meta.json @@ -0,0 +1,66 @@ +{ + "version": 1, + "size": { + "x": 32, + "y": 32 + }, + "license": "CC-BY-SA-3.0", + "copyright": "Taken from https://github.com/discordia-space/CEV-Eris/", + "states": [ + { + "name": "m_st", + "directions": 1, + "delays": [ + [ + 1.0 + ] + ] + }, + { + "name": "m_st_0", + "directions": 1, + "delays": [ + [ + 0.2, + 0.2 + ] + ] + }, + { + "name": "m_st_100", + "directions": 1, + "delays": [ + [ + 1.0 + ] + ] + }, + { + "name": "m_st_25", + "directions": 1, + "delays": [ + [ + 1.0 + ] + ] + }, + { + "name": "m_st_50", + "directions": 1, + "delays": [ + [ + 1.0 + ] + ] + }, + { + "name": "m_st_75", + "directions": 1, + "delays": [ + [ + 1.0 + ] + ] + } + ] +} \ No newline at end of file diff --git a/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_sup.rsi/m_sup.png b/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_sup.rsi/m_sup.png new file mode 100644 index 0000000000..a966f9ad4a Binary files /dev/null and b/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_sup.rsi/m_sup.png differ diff --git a/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_sup.rsi/m_sup_0.png b/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_sup.rsi/m_sup_0.png new file mode 100644 index 0000000000..43a174574c Binary files /dev/null and b/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_sup.rsi/m_sup_0.png differ diff --git a/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_sup.rsi/m_sup_100.png b/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_sup.rsi/m_sup_100.png new file mode 100644 index 0000000000..3d38694cb6 Binary files /dev/null and b/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_sup.rsi/m_sup_100.png differ diff --git a/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_sup.rsi/m_sup_25.png b/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_sup.rsi/m_sup_25.png new file mode 100644 index 0000000000..e6172f39a7 Binary files /dev/null and b/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_sup.rsi/m_sup_25.png differ diff --git a/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_sup.rsi/m_sup_50.png b/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_sup.rsi/m_sup_50.png new file mode 100644 index 0000000000..56b6bef020 Binary files /dev/null and b/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_sup.rsi/m_sup_50.png differ diff --git a/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_sup.rsi/m_sup_75.png b/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_sup.rsi/m_sup_75.png new file mode 100644 index 0000000000..1f90ad41d9 Binary files /dev/null and b/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_sup.rsi/m_sup_75.png differ diff --git a/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_sup.rsi/meta.json b/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_sup.rsi/meta.json new file mode 100644 index 0000000000..ba4e9c2c2a --- /dev/null +++ b/Resources/Textures/Objects/Power/PowerCells/power_cell_medium_sup.rsi/meta.json @@ -0,0 +1,66 @@ +{ + "version": 1, + "size": { + "x": 32, + "y": 32 + }, + "license": "CC-BY-SA-3.0", + "copyright": "Taken from https://github.com/discordia-space/CEV-Eris/", + "states": [ + { + "name": "m_sup", + "directions": 1, + "delays": [ + [ + 1.0 + ] + ] + }, + { + "name": "m_sup_0", + "directions": 1, + "delays": [ + [ + 0.2, + 0.2 + ] + ] + }, + { + "name": "m_sup_100", + "directions": 1, + "delays": [ + [ + 1.0 + ] + ] + }, + { + "name": "m_sup_25", + "directions": 1, + "delays": [ + [ + 1.0 + ] + ] + }, + { + "name": "m_sup_50", + "directions": 1, + "delays": [ + [ + 1.0 + ] + ] + }, + { + "name": "m_sup_75", + "directions": 1, + "delays": [ + [ + 1.0 + ] + ] + } + ] +} \ No newline at end of file diff --git a/Resources/Textures/Objects/Power/PowerCells/power_cell_small_autorecharge.rsi/meta.json b/Resources/Textures/Objects/Power/PowerCells/power_cell_small_autorecharge.rsi/meta.json new file mode 100644 index 0000000000..711a1300f4 --- /dev/null +++ b/Resources/Textures/Objects/Power/PowerCells/power_cell_small_autorecharge.rsi/meta.json @@ -0,0 +1,66 @@ +{ + "version": 1, + "size": { + "x": 32, + "y": 32 + }, + "license": "CC-BY-SA-3.0", + "copyright": "https://github.com/discordia-space/CEV-Eris/blob/master/icons/obj/power_cells.dmi", + "states": [ + { + "name": "s_ar", + "directions": 1, + "delays": [ + [ + 1.0 + ] + ] + }, + { + "name": "s_ar_0", + "directions": 1, + "delays": [ + [ + 0.2, + 0.2 + ] + ] + }, + { + "name": "s_ar_100", + "directions": 1, + "delays": [ + [ + 1.0 + ] + ] + }, + { + "name": "s_ar_25", + "directions": 1, + "delays": [ + [ + 1.0 + ] + ] + }, + { + "name": "s_ar_50", + "directions": 1, + "delays": [ + [ + 1.0 + ] + ] + }, + { + "name": "s_ar_75", + "directions": 1, + "delays": [ + [ + 1.0 + ] + ] + } + ] +} \ No newline at end of file diff --git a/Resources/Textures/Objects/Power/PowerCells/power_cell_small_autorecharge.rsi/s_ar.png b/Resources/Textures/Objects/Power/PowerCells/power_cell_small_autorecharge.rsi/s_ar.png new file mode 100644 index 0000000000..fec988a177 Binary files /dev/null and b/Resources/Textures/Objects/Power/PowerCells/power_cell_small_autorecharge.rsi/s_ar.png differ diff --git a/Resources/Textures/Objects/Power/PowerCells/power_cell_small_autorecharge.rsi/s_ar_0.png b/Resources/Textures/Objects/Power/PowerCells/power_cell_small_autorecharge.rsi/s_ar_0.png new file mode 100644 index 0000000000..d619413512 Binary files /dev/null and b/Resources/Textures/Objects/Power/PowerCells/power_cell_small_autorecharge.rsi/s_ar_0.png differ diff --git a/Resources/Textures/Objects/Power/PowerCells/power_cell_small_autorecharge.rsi/s_ar_100.png b/Resources/Textures/Objects/Power/PowerCells/power_cell_small_autorecharge.rsi/s_ar_100.png new file mode 100644 index 0000000000..179172cf96 Binary files /dev/null and b/Resources/Textures/Objects/Power/PowerCells/power_cell_small_autorecharge.rsi/s_ar_100.png differ diff --git a/Resources/Textures/Objects/Power/PowerCells/power_cell_small_autorecharge.rsi/s_ar_25.png b/Resources/Textures/Objects/Power/PowerCells/power_cell_small_autorecharge.rsi/s_ar_25.png new file mode 100644 index 0000000000..49e5340fbb Binary files /dev/null and b/Resources/Textures/Objects/Power/PowerCells/power_cell_small_autorecharge.rsi/s_ar_25.png differ diff --git a/Resources/Textures/Objects/Power/PowerCells/power_cell_small_autorecharge.rsi/s_ar_50.png b/Resources/Textures/Objects/Power/PowerCells/power_cell_small_autorecharge.rsi/s_ar_50.png new file mode 100644 index 0000000000..4d1042d449 Binary files /dev/null and b/Resources/Textures/Objects/Power/PowerCells/power_cell_small_autorecharge.rsi/s_ar_50.png differ diff --git a/Resources/Textures/Objects/Power/PowerCells/power_cell_small_autorecharge.rsi/s_ar_75.png b/Resources/Textures/Objects/Power/PowerCells/power_cell_small_autorecharge.rsi/s_ar_75.png new file mode 100644 index 0000000000..dee613303f Binary files /dev/null and b/Resources/Textures/Objects/Power/PowerCells/power_cell_small_autorecharge.rsi/s_ar_75.png differ diff --git a/Resources/Textures/Objects/Tools/flashlight.rsi/Flashlight.png b/Resources/Textures/Objects/Tools/flashlight.rsi/Flashlight.png deleted file mode 100644 index a7b3b4678d..0000000000 Binary files a/Resources/Textures/Objects/Tools/flashlight.rsi/Flashlight.png and /dev/null differ diff --git a/SpaceStation14.sln.DotSettings b/SpaceStation14.sln.DotSettings index 1a3de30377..25fb2bd643 100644 --- a/SpaceStation14.sln.DotSettings +++ b/SpaceStation14.sln.DotSettings @@ -77,6 +77,7 @@ True <data /> <data><IncludeFilters /><ExcludeFilters><Filter ModuleMask="Lidgren.Network" ModuleVersionMask="*" ClassMask="*" FunctionMask="*" IsEnabled="True" /></ExcludeFilters></data> + True True True True