From fca556a1c1e3c46c27f144164ca34da87709d8e8 Mon Sep 17 00:00:00 2001 From: Peter Wedder Date: Thu, 29 Oct 2020 20:17:03 +0200 Subject: [PATCH] Adds sized (S, M, L) power cells and a generic component for battery powered items (#2352) * Refactor battery/powercell assets and add new ones. * committing before I fuck things up * slot component doned I think * dictionary update * Fixes * Moving flashlight to powerslotcomponent * har har i am using the message tubes * Better documentation comment * Reverting this overengineered garbage. * Off with ye I said * Examine texts. * Some minor fixes to IDE complaints * slot size from yaml * Ignored component + removing a useless typo entry * Making stunbatons use this * Handle the message and remove some unnecessary dirtiness * actionblocker checks * remove unused file * remove updatevisual * make these nullable * make these nullable too * Unrename sprite folder * check itemcomponent on insertion * Use SendMessage over Owner.SendMessage * Add support for auto-recharging batteries, an auto-recharging cell, and make flashlight status update correctly if one is inserted in it. * get rid of public fields which are Bad * add a description for the stun baton while i'm in here * one more public field * Add the blinky animation to the atomic cell * Fix the charge indicator being STUPID * better comments * this is a better function * add pause for flashlight, remove unnecessary imports from battery * potato battery copyright link * WHO DID THAT * mr clean has come * Random pitch * pausing * round to nearest levels --- .../Components/HandheldLightComponent.cs | 19 +- .../Components/Power/PowerCellVisualizer.cs | 3 +- Content.Client/IgnoredComponents.cs | 2 +- .../Interactable/HandheldLightComponent.cs | 218 +++++---------- .../Components/Power/BatteryComponent.cs | 27 +- .../Components/Power/PowerCellComponent.cs | 34 ++- .../Power/PowerCellSlotComponent.cs | 254 ++++++++++++++++++ .../Weapon/Melee/StunbatonComponent.cs | 132 +++------ .../EntitySystems/BatterySystem.cs | 18 ++ .../EntitySystems/HandHeldLightSystem.cs | 2 +- Content.Shared/Utility/ContentHelpers.cs | 48 ++++ .../Entities/Objects/Power/powercells.yml | 233 +++++++++++++++- .../Entities/Objects/Tools/flashlight.yml | 1 + .../Entities/Objects/Weapons/security.yml | 6 +- .../PowerCells/potato_battery.rsi/meta.json | 20 ++ .../potato_battery.rsi/potato_battery.png | Bin 0 -> 946 bytes .../power_cell_large_hi.rsi/l_hi.png | Bin 0 -> 381 bytes .../power_cell_large_hi.rsi/l_hi_0.png | Bin 0 -> 237 bytes .../power_cell_large_hi.rsi/l_hi_100.png | Bin 0 -> 174 bytes .../power_cell_large_hi.rsi/l_hi_25.png | Bin 0 -> 186 bytes .../power_cell_large_hi.rsi/l_hi_50.png | Bin 0 -> 188 bytes .../power_cell_large_hi.rsi/l_hi_75.png | Bin 0 -> 187 bytes .../power_cell_large_hi.rsi/meta.json | 66 +++++ .../power_cell_large_hy.rsi/l_hy.png | Bin 0 -> 374 bytes .../power_cell_large_hy.rsi/l_hy_0.png | Bin 0 -> 221 bytes .../power_cell_large_hy.rsi/l_hy_100.png | Bin 0 -> 174 bytes .../power_cell_large_hy.rsi/l_hy_25.png | Bin 0 -> 187 bytes .../power_cell_large_hy.rsi/l_hy_50.png | Bin 0 -> 189 bytes .../power_cell_large_hy.rsi/l_hy_75.png | Bin 0 -> 187 bytes .../power_cell_large_hy.rsi/meta.json | 66 +++++ .../power_cell_large_st.rsi/l_st.png | Bin 0 -> 372 bytes .../power_cell_large_st.rsi/l_st_0.png | Bin 0 -> 220 bytes .../power_cell_large_st.rsi/l_st_100.png | Bin 0 -> 167 bytes .../power_cell_large_st.rsi/l_st_25.png | Bin 0 -> 181 bytes .../power_cell_large_st.rsi/l_st_50.png | Bin 0 -> 183 bytes .../power_cell_large_st.rsi/l_st_75.png | Bin 0 -> 180 bytes .../power_cell_large_st.rsi/meta.json | 66 +++++ .../power_cell_large_sup.rsi/l_sup.png | Bin 0 -> 377 bytes .../power_cell_large_sup.rsi/l_sup_0.png | Bin 0 -> 220 bytes .../power_cell_large_sup.rsi/l_sup_100.png | Bin 0 -> 176 bytes .../power_cell_large_sup.rsi/l_sup_25.png | Bin 0 -> 183 bytes .../power_cell_large_sup.rsi/l_sup_50.png | Bin 0 -> 186 bytes .../power_cell_large_sup.rsi/l_sup_75.png | Bin 0 -> 184 bytes .../power_cell_large_sup.rsi/meta.json | 66 +++++ .../power_cell_medium_hi.rsi/m_hi.png | Bin 0 -> 360 bytes .../power_cell_medium_hi.rsi/m_hi_0.png | Bin 0 -> 219 bytes .../power_cell_medium_hi.rsi/m_hi_100.png | Bin 0 -> 163 bytes .../power_cell_medium_hi.rsi/m_hi_25.png | Bin 0 -> 155 bytes .../power_cell_medium_hi.rsi/m_hi_50.png | Bin 0 -> 155 bytes .../power_cell_medium_hi.rsi/m_hi_75.png | Bin 0 -> 171 bytes .../power_cell_medium_hi.rsi/meta.json | 66 +++++ .../power_cell_medium_hy.rsi/m_hy.png | Bin 0 -> 357 bytes .../power_cell_medium_hy.rsi/m_hy_0.png | Bin 0 -> 206 bytes .../power_cell_medium_hy.rsi/m_hy_100.png | Bin 0 -> 163 bytes .../power_cell_medium_hy.rsi/m_hy_25.png | Bin 0 -> 167 bytes .../power_cell_medium_hy.rsi/m_hy_50.png | Bin 0 -> 174 bytes .../power_cell_medium_hy.rsi/m_hy_75.png | Bin 0 -> 172 bytes .../power_cell_medium_hy.rsi/meta.json | 66 +++++ .../power_cell_medium_st.rsi/m_st.png | Bin 0 -> 370 bytes .../power_cell_medium_st.rsi/m_st_0.png | Bin 0 -> 219 bytes .../power_cell_medium_st.rsi/m_st_100.png | Bin 0 -> 148 bytes .../power_cell_medium_st.rsi/m_st_25.png | Bin 0 -> 166 bytes .../power_cell_medium_st.rsi/m_st_50.png | Bin 0 -> 173 bytes .../power_cell_medium_st.rsi/m_st_75.png | Bin 0 -> 166 bytes .../power_cell_medium_st.rsi/meta.json | 66 +++++ .../power_cell_medium_sup.rsi/m_sup.png | Bin 0 -> 363 bytes .../power_cell_medium_sup.rsi/m_sup_0.png | Bin 0 -> 206 bytes .../power_cell_medium_sup.rsi/m_sup_100.png | Bin 0 -> 150 bytes .../power_cell_medium_sup.rsi/m_sup_25.png | Bin 0 -> 167 bytes .../power_cell_medium_sup.rsi/m_sup_50.png | Bin 0 -> 173 bytes .../power_cell_medium_sup.rsi/m_sup_75.png | Bin 0 -> 167 bytes .../power_cell_medium_sup.rsi/meta.json | 66 +++++ .../meta.json | 66 +++++ .../s_ar.png | Bin 0 -> 308 bytes .../s_ar_0.png | Bin 0 -> 176 bytes .../s_ar_100.png | Bin 0 -> 137 bytes .../s_ar_25.png | Bin 0 -> 146 bytes .../s_ar_50.png | Bin 0 -> 158 bytes .../s_ar_75.png | Bin 0 -> 140 bytes .../Tools/flashlight.rsi/Flashlight.png | Bin 259 -> 0 bytes SpaceStation14.sln.DotSettings | 1 + 81 files changed, 1328 insertions(+), 284 deletions(-) create mode 100644 Content.Server/GameObjects/Components/Power/PowerCellSlotComponent.cs create mode 100644 Content.Server/GameObjects/EntitySystems/BatterySystem.cs create mode 100644 Resources/Textures/Objects/Power/PowerCells/potato_battery.rsi/meta.json create mode 100644 Resources/Textures/Objects/Power/PowerCells/potato_battery.rsi/potato_battery.png create mode 100644 Resources/Textures/Objects/Power/PowerCells/power_cell_large_hi.rsi/l_hi.png create mode 100644 Resources/Textures/Objects/Power/PowerCells/power_cell_large_hi.rsi/l_hi_0.png create mode 100644 Resources/Textures/Objects/Power/PowerCells/power_cell_large_hi.rsi/l_hi_100.png create mode 100644 Resources/Textures/Objects/Power/PowerCells/power_cell_large_hi.rsi/l_hi_25.png create mode 100644 Resources/Textures/Objects/Power/PowerCells/power_cell_large_hi.rsi/l_hi_50.png create mode 100644 Resources/Textures/Objects/Power/PowerCells/power_cell_large_hi.rsi/l_hi_75.png create mode 100644 Resources/Textures/Objects/Power/PowerCells/power_cell_large_hi.rsi/meta.json create mode 100644 Resources/Textures/Objects/Power/PowerCells/power_cell_large_hy.rsi/l_hy.png create mode 100644 Resources/Textures/Objects/Power/PowerCells/power_cell_large_hy.rsi/l_hy_0.png create mode 100644 Resources/Textures/Objects/Power/PowerCells/power_cell_large_hy.rsi/l_hy_100.png create mode 100644 Resources/Textures/Objects/Power/PowerCells/power_cell_large_hy.rsi/l_hy_25.png create mode 100644 Resources/Textures/Objects/Power/PowerCells/power_cell_large_hy.rsi/l_hy_50.png create mode 100644 Resources/Textures/Objects/Power/PowerCells/power_cell_large_hy.rsi/l_hy_75.png create mode 100644 Resources/Textures/Objects/Power/PowerCells/power_cell_large_hy.rsi/meta.json create mode 100644 Resources/Textures/Objects/Power/PowerCells/power_cell_large_st.rsi/l_st.png create mode 100644 Resources/Textures/Objects/Power/PowerCells/power_cell_large_st.rsi/l_st_0.png create mode 100644 Resources/Textures/Objects/Power/PowerCells/power_cell_large_st.rsi/l_st_100.png create mode 100644 Resources/Textures/Objects/Power/PowerCells/power_cell_large_st.rsi/l_st_25.png create mode 100644 Resources/Textures/Objects/Power/PowerCells/power_cell_large_st.rsi/l_st_50.png create mode 100644 Resources/Textures/Objects/Power/PowerCells/power_cell_large_st.rsi/l_st_75.png create mode 100644 Resources/Textures/Objects/Power/PowerCells/power_cell_large_st.rsi/meta.json create mode 100644 Resources/Textures/Objects/Power/PowerCells/power_cell_large_sup.rsi/l_sup.png create mode 100644 Resources/Textures/Objects/Power/PowerCells/power_cell_large_sup.rsi/l_sup_0.png create mode 100644 Resources/Textures/Objects/Power/PowerCells/power_cell_large_sup.rsi/l_sup_100.png create mode 100644 Resources/Textures/Objects/Power/PowerCells/power_cell_large_sup.rsi/l_sup_25.png create mode 100644 Resources/Textures/Objects/Power/PowerCells/power_cell_large_sup.rsi/l_sup_50.png create mode 100644 Resources/Textures/Objects/Power/PowerCells/power_cell_large_sup.rsi/l_sup_75.png create mode 100644 Resources/Textures/Objects/Power/PowerCells/power_cell_large_sup.rsi/meta.json create mode 100644 Resources/Textures/Objects/Power/PowerCells/power_cell_medium_hi.rsi/m_hi.png create mode 100644 Resources/Textures/Objects/Power/PowerCells/power_cell_medium_hi.rsi/m_hi_0.png create mode 100644 Resources/Textures/Objects/Power/PowerCells/power_cell_medium_hi.rsi/m_hi_100.png create mode 100644 Resources/Textures/Objects/Power/PowerCells/power_cell_medium_hi.rsi/m_hi_25.png create mode 100644 Resources/Textures/Objects/Power/PowerCells/power_cell_medium_hi.rsi/m_hi_50.png create mode 100644 Resources/Textures/Objects/Power/PowerCells/power_cell_medium_hi.rsi/m_hi_75.png create mode 100644 Resources/Textures/Objects/Power/PowerCells/power_cell_medium_hi.rsi/meta.json create mode 100644 Resources/Textures/Objects/Power/PowerCells/power_cell_medium_hy.rsi/m_hy.png create mode 100644 Resources/Textures/Objects/Power/PowerCells/power_cell_medium_hy.rsi/m_hy_0.png create mode 100644 Resources/Textures/Objects/Power/PowerCells/power_cell_medium_hy.rsi/m_hy_100.png create mode 100644 Resources/Textures/Objects/Power/PowerCells/power_cell_medium_hy.rsi/m_hy_25.png create mode 100644 Resources/Textures/Objects/Power/PowerCells/power_cell_medium_hy.rsi/m_hy_50.png create mode 100644 Resources/Textures/Objects/Power/PowerCells/power_cell_medium_hy.rsi/m_hy_75.png create mode 100644 Resources/Textures/Objects/Power/PowerCells/power_cell_medium_hy.rsi/meta.json create mode 100644 Resources/Textures/Objects/Power/PowerCells/power_cell_medium_st.rsi/m_st.png create mode 100644 Resources/Textures/Objects/Power/PowerCells/power_cell_medium_st.rsi/m_st_0.png create mode 100644 Resources/Textures/Objects/Power/PowerCells/power_cell_medium_st.rsi/m_st_100.png create mode 100644 Resources/Textures/Objects/Power/PowerCells/power_cell_medium_st.rsi/m_st_25.png create mode 100644 Resources/Textures/Objects/Power/PowerCells/power_cell_medium_st.rsi/m_st_50.png create mode 100644 Resources/Textures/Objects/Power/PowerCells/power_cell_medium_st.rsi/m_st_75.png create mode 100644 Resources/Textures/Objects/Power/PowerCells/power_cell_medium_st.rsi/meta.json create mode 100644 Resources/Textures/Objects/Power/PowerCells/power_cell_medium_sup.rsi/m_sup.png create mode 100644 Resources/Textures/Objects/Power/PowerCells/power_cell_medium_sup.rsi/m_sup_0.png create mode 100644 Resources/Textures/Objects/Power/PowerCells/power_cell_medium_sup.rsi/m_sup_100.png create mode 100644 Resources/Textures/Objects/Power/PowerCells/power_cell_medium_sup.rsi/m_sup_25.png create mode 100644 Resources/Textures/Objects/Power/PowerCells/power_cell_medium_sup.rsi/m_sup_50.png create mode 100644 Resources/Textures/Objects/Power/PowerCells/power_cell_medium_sup.rsi/m_sup_75.png create mode 100644 Resources/Textures/Objects/Power/PowerCells/power_cell_medium_sup.rsi/meta.json create mode 100644 Resources/Textures/Objects/Power/PowerCells/power_cell_small_autorecharge.rsi/meta.json create mode 100644 Resources/Textures/Objects/Power/PowerCells/power_cell_small_autorecharge.rsi/s_ar.png create mode 100644 Resources/Textures/Objects/Power/PowerCells/power_cell_small_autorecharge.rsi/s_ar_0.png create mode 100644 Resources/Textures/Objects/Power/PowerCells/power_cell_small_autorecharge.rsi/s_ar_100.png create mode 100644 Resources/Textures/Objects/Power/PowerCells/power_cell_small_autorecharge.rsi/s_ar_25.png create mode 100644 Resources/Textures/Objects/Power/PowerCells/power_cell_small_autorecharge.rsi/s_ar_50.png create mode 100644 Resources/Textures/Objects/Power/PowerCells/power_cell_small_autorecharge.rsi/s_ar_75.png delete mode 100644 Resources/Textures/Objects/Tools/flashlight.rsi/Flashlight.png 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 0000000000000000000000000000000000000000..5b0f7a5fe04b8b62f804fa629e1861933144196d GIT binary patch literal 946 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANOKm7Xq+Ar*7pPS4MfE|oZL zKYdoo&X`wQ$~R{QO9r7!3;Cf?J1dF$TRlON9REBLTm{`~u& zb^FhMK0TS`-Q)VU3mHt@YeI#pPwh=)H2e76`+cPXPYjcgceV0?i)u4sCfYDwyS;kH z`rhAHRF^3-e!Eo{CKMul+eBsB#9QaRl){9!CGOZ6n=dLCq5pH?(yzv^EpPB#*|l2t z@29dIb91{Ge&2n|bkDeGeZ~L1%Gd72HfPU^{><0Y+ZVC&b*6;$+S~tMo!$Ow(k$c6 zEc0%3SsI^iTaHMt^Yp=o{RlccGhvrs)mgh1+ypX9QwMu^Y^#63nzqLOj|FQ z6`pXsj4N{Lg}%2noY%DDYtB>{z4PMB?m4-*{r<*0VTY{jhmXqb4NPs%zP~@mb@pC1 z2gTLbj<(+t{gm1JJg$1`$CNqE$0witskb5h-)3fJmA3n;#-CR^XLN74&aD4F-A3~G zjA)lXzvcPD9N*{^ma1razQU;Q{W8z%+c@?ex4s)x zEzEHB-urhvg55_Y>?+v~2nKbp-oNz1*=U9r&vgCv{cC%ze!NuZmiYP!p*QcYEco3z zS7*tyKpw{V5xtsEd{iPI9`)Gr%4^Gu7kSU!tX^lG3ugWG?QNo>ssHRtCof#%ldD|A z-Ov@7TlnH2gJZom!^6CpU5XbT@hh;Jnd&WwG5Y!Xl8Kkfsg*}Kjl%ygN#c0nc29A0 ztIf{us{ekx6faTcf3Rh-B4a@5D`DL-+xzV*Z5MlOCP}0{`chewwDqjrMWufS+dVcl zskAZ93U2fXEOxn(F8JWL(ZO_FireC^$+xf!%uDmA~O{Z!{?J8tsI9k-XZu$EO zp*)PLLaHzFmnLzDoK|i67uLS#sQiMOpUb9SdB#tqpx+A)* zqx-4Q(HOqiU_-gu8U1=Y`jf&L*_WxczC8K<<@>h_BlI?|cM3Q#`J$bTgd3TKW5%+h!P(A^i}-Wh zCW)53?K^$CSd!t%h9e)Y3(xzU_rm}1#)Xcncl)l?-W-1X`$n1njNMWTR)1J$@5{iz Oz~JfX=d#Wzp$PzNP1ZpG literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..24319ba7b6475a7a9a1d605e475bfb6b5b383903 GIT binary patch literal 381 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANNfE}kxqAr*6y6C_v{CoExh z3liD=>&ahrx4Z9jCwG`lZxvxTFfcIinICkj;Ln}VHAU0hZt={tysI+PeG_wnSRl8+ zTLy3G-~ajZ-lxqla~E8{i+y|fm+Y2&&^rNdL$PfPIR$Qy$!i?Pu0?z+nZ0zN9Q8=}q}IB*~# zV+rT>IgO2st-iwS3EV{~@s~|l^6u|Bcj7?92V0&Cx-2@mZ#GVAD&b~~X;_!3pm&m6 zS@wc1%Y@B}Mh^UpF@dfdnI|ynh@6|h+pmygLWq!(xP!qy+h$ef!)e}ZAW+T5)~3%R zp81#|!|cy{=~>4TGM1b?aNq#L@`;YYs=eCEY;0_6G8YhwFO=W`63y`c7$BG!%~yM@JtpO?b_>mYYhh=<{=M?&v+@&?E_hB~_-$HJKpne>|945X tvo%{~XXj4ezxwReuR<&g3`2;T*3eV literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..7500ff37b675e422991b436f9feccce90be7c7b6 GIT binary patch literal 174 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}rJgR1Ar*6y6C_v{Cy4Yk z1sYspR9?!q;pmKi<{N6y95`^`K*7TeI)~S*F84H=+#19#al(8M`0UkYHWh cu#SPD=&MnF^wtJ>1_lNOPgg&ebxsLQ09_G5ZvX%Q literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..9ec9c4a60f8b5e73bfd624b324fd676dcc4ff085 GIT binary patch literal 186 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}jh-%!Ar*6y6C_v{Cy4Yk z1sYspR9?!q;pmKi<{N6y95`^`K*7TeI)~S*F84H=+!@4vK*v4(@>xc4zSBvmm(MaT zRy26x+|U}tE^)&yE#v#y^n`?jgd59hTNajc&Xomebyhv>Vo`m9vCI3=BjtPlC;r@P k7OiPk47Q8w1sB7zd1|lhwXPR2FfcH9y85}Sb4q9e0Djg++5i9m literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..e78b3016f9d6cf864584a9cab9cc69926f023b3c GIT binary patch literal 188 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}&7LlfAr*6y6C_v{Cy4Yk z1sYspR9?!q;pmKi<{N6y95`^`K*7TeI)~S*F84H=+!@4vK*v4(@>xc4zSBvmm(Maf z+p$Dwlr}WJO>Qf@U&F@6#@3d5%Uz;s`h}YyHAW#uJ}sL)Sr;oBJZN|{X~U0>@AWBl m>(7RDos|Jw$h3=zf%~@B!2^r#N-;1nFnGH9xvXxc4zSBvm!rT!W zr45a5liSMf*RZj%v9;yia+j!@e&Hra-YCS#r)9Gz>taO%DJEt<4L#28{)+$Z&%WQv nS$gA4paGZLL5&643=ICC^=9O`)oo*7U|{fc^>bP0l+XkKf_g$s literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..4f6aaee081722190d742aadd385c64c466b21db5 GIT binary patch literal 374 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANNfww^AIAr*6y6C_v{CoExh z3liD=>&ahrx4Z9jCwG`lZxvxTFfcIinICkj;Ln}VHAU0hZt={tysI+PeG_wnSRl8+ zTLy3G-~ajZ-lxqla~E8{i+y|fm+Y2&&^rNfs?gC)OAsgM8xy}Q4iy6*CTfRD=ShNv?K4jf3x zSi-q|PGciutFJJ70(VhL{AClCy!(63ojB0&!ItNOE{jg?n~l?&O1K$g8rEeh=$+(N zmc5|MGGVi#kpn+tOrYyV<_U~CBIoAs_ABI=5F(@`?ohCAlK5f98BD5dY;FAFnU5JV z%>KNWo^>oCW68+_2M#bSpXeB@+N-V1#>TcLvoXdY=;*>#>pVl4nnj})Cy4YkDKauh YOBU?RULU@ifq{X+)78&qol`;+01s}FVgLXD literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..796920366505788599dfb60f7129f336d7cad462 GIT binary patch literal 221 zcmeAS@N?(olHy`uVBq!ia0y~yU~phyU{K&-V_;xdG`FsWfq`L(r;B4q#hka-6!{K0 z2(&(AcYNew%IT>1L53mnETg~|j{+8xNzrQ@Chld-s|{>v3vq}yYWp9&IqhDGagquH z0|UeVj3;I{)=qm{WjIx3X-vt!yKm=B{Fz+d5dI@w_UPH|_6kogMY|V%zR6I|VAjB! zzbP0l+XkKX0}*> literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..97c6df65ae7491b18ff66eec2505fdd93f0c2db0 GIT binary patch literal 174 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}rJgR1Ar*6y6C_v{Cy4Yk z1sYspR9?!~lD+cJ_25T|2?+@aJ4)VjA3l{`?qM{!HHiI%=0}5+A6-TU1_lOmY*o)} z_;gEl(wE>j4c_1P8JxM%lQ5af%{jq@#mzb40OL{Bhqq_0`#=RYL3aQE literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..b4d70741792ef6aad01bbec3f29163eb8a4ee49a GIT binary patch literal 187 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}O`a}}Ar*6y6C_v{Cy4Yk z1sYspR9?!~lD+cJ_25T|2?+@aJ4)VjA3l{`?qM{!Gl>0wj(hs$vy9W<)gC;xY&Nr- zbHa&s2JWSN7lI!pp7gTe~DWM4fVxmQ+ literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..fb1540d6b30334cda758451272ffb0e88fa3c2a1 GIT binary patch literal 189 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}EuJopAr*6y6C_v{Cy4Yk z1sYspR9?!~lD+cJ_25T|2?+@aJ4)VjA3l{`?qM{!Gl>0wj(hs$vy9W<)gC;xY&LUS z4abInR}8kQa&0{EfoyDSY;BvDw@8M??RJi5kJbP0l+XkK+)_fz literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..7de1faebd2fe51525f0fb9a73a35f28e258e1de3 GIT binary patch literal 187 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}O`a}}Ar*6y6C_v{Cy4Yk z1sYspR9?!~lD+cJ_25T|2?+@aJ4)VjA3l{`?qM{!Gl>0wj(hs$vy9W<)gC;hCbl8q z6@#s+TpLe(AR8MSTifR4Es|kzyPf0NV|IOSO+1#yGCRaTifOT;!GnfJlRmulx&Hq| p&BHHuMP^%axgFGyU@c)~IG|?|nRZLUfq{X6!PC{xWt~$(69AXyL!STu literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..bbe727eea710323132e155b85ca48dd305b6bcd3 GIT binary patch literal 372 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANNf)}AhoAr*6y6C_v{CoExh z3liD=>&ahrx4Z9jCwG`lZxvxTFfcIinICkj;Ln}VHAU0hZt={tysI+PeG_wnSRl8+ zTLy3G-~ajZ-lxqla~E8{i+y|fm+Y2&&^rNe!v{U!EATN{BaE0DYE-*uM<1bkFpH$|)37d6LGL8D zvg`$2mI<2`jU4zHV**__GEZRC5ji)1w_hR0gb*PmaR-BaCd|ythZn{cn8s&3Wymo5 z^Im$^v4o5zCl4Grz_5IxW3XzkwlW(V+nUVA7>A&v3s(jar-_($l2K$S{Sw Wpyul(-op$G3=E#GelF{r5}E*)IFU2} literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..e87e32490101ec48d7063cc0e6a0d75fb297ab12 GIT binary patch literal 220 zcmeAS@N?(olHy`uVBq!ia0y~yU~phyU{K&-V_;xdG`FsWfq`MMr;B4q#hka-7IHB; z3LN|BzwyoLh;=u7${Y=3Zs^!GUd{L_`%aYQ_p;oy_@fnSi4(c2vX?6&*_FS#{~cl^w0ux5}x zz_x+$)h)N!+Zok2cD{9c%769#tewnDCT(5+Dr05J)pCZql=$4`xA(5U|NN`c7a`ixUQ_@8 literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..d5f070f7c4296a6ed92c0fac49c42d6dcdcbf395 GIT binary patch literal 167 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}d7dtgAr*6y6C_v{Cy4Yk z1sYspR9?!K@l*W&|Gc*+4uC*qiT&ZNy?aGwdkO`-x%KJ)gXZJ^`RywH>`yyA^Z$}p z=?kwg&T;>4tfH{-C7+vff(eV8b3>3r;mTIIH@bFeUvxR$4{AuTE^Y{7UHmY~quQ1MW|8A_Ju(4fc!44G{{%>OP!d+)& fz&0`MVq&n9(|OaPx{sTIfq}u()z4*}Q$iB}aF0qF literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..a10e8e912664c5b85ecd4c08a1a67d1216e956a4 GIT binary patch literal 183 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}b)GJcAr*6y6C_v{Cy4Yk z1sYspR9?!K@l*W&|Gc*+4uC*qiT&ZNy?a$=o^)BsoG@+i=9kYH&Mp4Eans9Z4T|zi zBFsnE>Hg=ptN8Q(LG$td+1uv)^j}pc<|TWevc%q*Noe-F1QQkwR*~r~FAm;&l+GDpqaS{$oZ!&NB_L eO&3HN7`XKv=3PJk!Igo5fx*+&&t;ucLK6VgX-PEz literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..b19282034ec0d4c9be685a51c10d21debe40a96c GIT binary patch literal 377 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANNf4xTQKAr*6y6C_v{CoExh z3liD=>&ahrx4Z9jCwG`lZxvxTFfcIinICkj;Ln}VHAU0hZt={tysI+PeG_wnSRl8+ zTLy3G-~ajZ-lxqla~E8{i+y|fm+Y2&&^rNi@sizRb(Z%BXu-~1m(9imta3=Af&kjpb>hX205l3i@K876__J5=Gd3deI%f;QpH8D;X#d=dfV&g3%Ee`?u%X0 z%e>&`hyD2(QXu=7nVFgAxUu<8HCfjqAtAA08EX-vr)c}CU21`xJYgBVO@RhnZ7d87 Z%^!-QUhN8+&%nUI;OXk;vd$@?2>^8lk6-`* literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..099a6cb151673acee4d7b74efc19ae3a68de062b GIT binary patch literal 220 zcmeAS@N?(olHy`uVBq!ia0y~yU~phyU{K&-V_;xdG`FsWfq`MMr;B4q#hka-6!{K0 z2(&(A&)mUq{RQI+1q+{0UiFL#GHuCMk_%GK$}LzP8O)-1a{|{3?`t3Gv#y<)o#WQS z!oa}rKz{8Vw&}^XZ_A}UgE~B~|IYZXGjo3#dqsQwwWT|Leq(Q$k@h<1PL0_C*#_PO z<{J#Av8$J5m%iJcx7+n+@z?EI4^Q;O8zp52GB|qL4ou*0WMmha-Vz>m^S}GE*DbP3Zk!1;;Bq^t eu|S)F;eLw2>(9>jzB4c|FnGH9xvX9(MD;`?J?AvP*89 j2{hnxJE*Zhn}I>FPObB%!;Yy83=9mOu6{1-oD!MQut mBxCo38WOCF8`d!}-1wpS|JKr*KNuJo7(8A5T-G@yGywp!AVFjR literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..25191ae8900526b9000e7ea2c627e25887f0cc81 GIT binary patch literal 184 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}^`0({Ar*6y6C_v{Cy4Yk z1sYspR9?#VWarC2+qWhpCnO{!SkyccKfEM1+{0*cXAt`V9ryIhXBpf5{~S7{Cbl8q z6+<+)8QW=xd^Qm9o$Jgqx$NRiMuGTz*QCog85b)WJaJAqz<5;k;ndJ?|0n*mN@UkG gD+b%d^@58*cBO7<$ow8<1_lNOPgg&ebxsLQ08suv;s5{u literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..45f00d2a644d0e20bc81afcd439d9cd16960d423 GIT binary patch literal 360 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANNf`kpS1Ar*7pPBQd9>>zUd zf79ZG_GQrvWSuyLe3(m!rbYW_E z&M(lCH`9N{fmOwde?N--IohUKRl7HDy1dEb>r>NQj2Rd<|77A6?l@$u`u_H9XPMc_ z2|K-F53!_uW|e!FSAVVX{d#`}hf~H!-oy$v-CeP8g2BQy!SfV3?gnkY>JYj_YuYEC zn&iA%LI2Ndu7-%d^`Em)n{h$*SAp0#ZML$XvjbN=SW?V)UVh5!A3rzN{Qc#e@m+HH zWyxKe-uq0AsWo`5;-m01i{0#X>f@tp*%n=Nnf33jdCA(i$6th590gns%JIxyI}>(6o3>+fct57=3$ba>?#aT9Kans0|0R(>;{_Bk%QW$ui79X|@b|9{kd59hPUY!PC{xWt~$(69775 BR8{~0 literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..5f73abd4f0254723a2ffd75ce876cb3e5447c015 GIT binary patch literal 163 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}S)MMAAr*6y6C_v{Cy4Yk z1sZU*2_?WFeq?X9>qp1;`fU=I|1X(!(xoej`Sx*(Onp^pi}`7M3s@CSGK%w^ zezZi}+`r|syPSsIqrdxqbeNyyEPxo~c2Gk?gn{8!u3G>6G(j^41_lOCS3j3^P6?WFeq?VHTXRIZRqd*eT9AnJ4ZC9t_D;zO$e3l-Al9J59%G@??HHan zufvJo@_D;=T&70f9_7d83=9kmp00i_>zopr E0Ea6vJOBUy literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..1b59115d33440d06b7c7bb6eaae70914c64efb07 GIT binary patch literal 171 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}MV>B>Ar*6y6C_v{Cy4Yk z1sZU*2_?WFeq>zQh zzA4$k^1J-}Z?g|PKW@#iPu#Hh9?N2{g{>X0Sq|O$u2eN`=SN-M4Y`|gpH&O~ z(q9~ZT{JLr#U+NzCz-EC$r`ZKt~8HOYp7FM8+A_GH*SVsPA0?4w>fiX-t^2?$auR> z@#f#=_npEW&a(^T-u&mf7Lr~1D8NUqed&MwFPzUmDF>!X1^Dh5F%#AsL1|-$I?M>X)C+OTg5lJYf=P7vJfSw>PyA;IiEp~f zObiSR4D}k9bmA{9K0hhK>UGN8>z^H8ebd`s7qIu|x__Em|GI6SqxvyzUXk(ng>Sy< z2RoNG#4oXONWYsl?QHTq=bNwN)$DTDaM_2o{{LnVGL1pMim9;O&6amt^a&8()78&q Iol`;+0H&)>C;$Ke literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..18c2cdbf0ff1a76771a556244e7ce99c99dc4631 GIT binary patch literal 163 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}S)MMAAr*6y6C_v{Cy4Yk z1sZU*32|Hx`ng~G=1+UOSs}(VJp$J(KXN!B=UB`1Wh~;E^Q73{Wy`eBwW!V6SDo>*4q}|!L5+ljgaif#rQe$Rd#^rIV_;xl N@O1TaS?83{1OPX6JlFsL literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..fbf162abc2fb2c6a1a3764835728d7a1bd065661 GIT binary patch literal 167 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}d7dtgAr*6y6C_v{Cy4Yk z1sZU%Nf=C8WD(>2bpJdd{=-YF<0USbP0l+XkK*-kzD literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..3ec152d2e4a12df06783239a7cc74423ebe446a3 GIT binary patch literal 174 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}rJgR1Ar*6y6C_v{Cy4Yk z1sZU%Nf=C8WD(>2bpJdd{=-YF<0TSGHZ8R|eCIL$!!M_@%RP)HcZwXX^0JZGvQbi) z%U4U`B;yta70U;g_UcP~={dVT@P#6~hnK;N2XB3@|36Xl@XKA1ndV$>2Q|QU@Nh6N Z^d@O|&nu36&A`CG;OXk;vd$@?2>{qkJ)Hmm literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..aec9b65dcaac5e4bcde83621f865efd4c876fa4e GIT binary patch literal 172 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFCfa(#WAE}PI7_->*55Fo~A$p zE;b2+NsBCEyr1r$C&YhvX?48BB;BWy&*bVm9M|tDYgaLz=@GbQ`4Q&jy=P}^xU__6 zl8ghl!z5Ov7#KWV{an^LB{Ts50Ma|q literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..fa74c079656bb971bb0a11b66d44eeae347d779c GIT binary patch literal 370 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANNfmYyz-Ar*7pPBQd9>>$w= zpEZ@2m?zQfYuhj~fC>jh1d-s%ZGnZQ@LqT8xO zqeQ@x-S@=PD!16b^PWDw_oVv$-rf8P98C)UthJZ%|J}FVeHc z7!oeNlU%(!H0+m!umq30g{|GMo4kAW*)TIKGH^TaPE@&u^#|X%mQ8(!B-W)b-`C2x zNiA}-Mo*xoZ*TbgD=+@8H3$)V>$_%|F5`lz)rarj4QD!&UhcNIFW!wBhtF_B?&DZW*^pxG0Kb8m&*Y{YW6XoYVFsQIHJiqwY;$=&y_`{kg z#+q-+mlrqOTab2o=6}=Za{_1PV_F|*z{SSNz;NfYQxx}wcft$|3=E#GelF{r5}E)| C^j3KQ literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..b00811e0c04a277954c44231f2cce5ef9311c0ff GIT binary patch literal 148 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}(Vi}jAr*6y6C_v{Cy4Yk z1sZU*30?T4|1W;?(=+uoCM(m7CNBE1d#iHu>OPCOS??2J_rB+ literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..57569320765c45ca95f5ec713971b67c66e22f92 GIT binary patch literal 173 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}C7v#hAr*6y6C_v{Cy4Yk z1sZU%Nf=C86mfe0kN@S_?ri54|CUTB3CL18yzA!ahhMh#?p2w2(xvOs`)hp?TUPg3 zaQSK}oMha>pkmqZ`9&R%RpM1wk*X7nlZ1GzR@^LlW^c6r=*bm@BZ{#swbtx$IvZQo$_3rrg(ESmB8 zMP1wbYkfR(+`k*EIQ)F^Wdd{0lZ;h2i`cT0vOgLsp57B^z~y#O17x}bBSS^EjxCMCu?`BYC;7T2v|6=DN?4UR z2u_j=SY**Dn(%br(@XukPy4qY z4-FUlakbv8X*~UT^Ze2Wf8UBS2(%h9eN5r_=(e=2QRGyFdty)Hd84~g%#{=OM2H;w z;qzv#|Kg%YQNfj7^^d;IU~355&0JTKBynSn{8}eX>)q`ys_*8=-ib+FA8)(*Qth>u zCDlIfcLpnm%bZaP(r{ULvvK;>O`je`G1r(}+*bdacWv47qF?<9=*nRK4CiZ4T;@zR3fToOgSigV~N+~Yf5qn>nC#GSTnVoB}S%$?aTjJ#}91C zmlR}RU|_hhusLn#o;fkoq%v>$?c2QLSkZdBqUy-2v-iJ}54tU%Ic@V5pJ#@azbiEt z{wvH{!MDM66|+gM`ONpnFQ513{Ms*^y}9&V&fMMg|CvF?83gkO*SN`L2*&>baXnrA KT-G@yGywnxl2Vrd literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..3d38694cb67dc3188fcc3a27c0c40312903e668c GIT binary patch literal 150 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}v7RoDAr*6y6C_v{Cy4Yk z1sZU*37sgu{IfoF>fibrla*;k6BpgM*3|3haFtKrH<EO%-uv2LH@ux)#=yY9;OXk;vd$@?2>`GZ BG-m(+ literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..e6172f39a7c5d1f6968f117cbd116f7840183bd7 GIT binary patch literal 167 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}d7dtgAr*6y6C_v{Cy4Yk z1sZU%Nf=C8WO3g2`Tn)6(uW@k@0Ymna*Ie}TV(M)BcEHPtt!SdJpyyG54KGf3)tHH zIrAAq6vHH$f*(ip=Y0A2HTvP7iR|mvZ2DiHI`!}W#gTe~DWM4f^KCuW literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..56b6bef020c46cb0f9ba690b9983cbb47738e70f GIT binary patch literal 173 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}C7v#hAr*6y6C_v{Cy4Yk z1sZU%Nf=C8WO3g2`Tn)6(uW@k@0Um@iRv;qyv8#B;g=<`;T}elJ4KFe6U&j<(y&UF z%U4U`B;ytaoh2G>d{q)>4{Q+al}l<^!qUvQZq26u{b#OoT6;{agcEd-a=*mzK;r>C%-H&246(yCAE5>avy08H^Dgfi*vl z=(9z0o3$NQuQN0-$T{lBZ+O6?Zy89Bn%Ue9%_%d@x!ewFfDPx-U|gTe~DWM4f4?H>1 literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..fec988a177ca7a3ea0347d9e1037c435dc4cad60 GIT binary patch literal 308 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}zdcv;QX+D4+Qm@9Zk8SN8avZ=1IC{>P;v!iwTj8K(~3 zJbo^D`NXTDYF36KYE}zh9A^Kp>)fSd|MqYB>CVQ+#@1G{f2PINvv;PPJ86NU%Dc1kB#8Ur^H!$AvvoNN1p{lAIWrt| zS-fi9&v=)Ro`+{&hg)1d@Ff5K9={?b8JI7*+!z_0W_uf~t%=>qz`(%Z>FVdQ&MBb@ E0IxEMF8}}l literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..d619413512e2da3a5cb17b954ddd56922fab9f44 GIT binary patch literal 176 zcmeAS@N?(olHy`uVBq!ia0y~yU~phyU{K&-V_;xdG`FsWfq|ji)5S5QV$RzOt9cs? zL|Pv*XE&rYS_Pfw$`H~?R2EBMt!Yl?oWZQ~aN?GbPxa4c%$`@R&B(yO@MH0j@`9YL zyInWAS*2f3*P3fryr)g~!7W>r5+{kqlqMsWR_1^fl4ZLe2$-B(&9 c&j1FEeDyDs*y@hI`~l*6y85}Sb4q9e0L)-SL;wH) literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..179172cf9603b1228623c366d8f88acf938d5e20 GIT binary patch literal 137 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}0iG_7Ar*6y6C_v{Cy4Yk z1sYspRNlz-UT4C;`gb3K*_5L**-D~RA8KBFwt!hJN%U02jz>!~-!-VKml?}g_s^As iY2$J`s3CEQfk9)E?9qro$7BWu1_n=8KbLh*2~7ZZ=_>sI literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..49e5340fbbf6b46d81b737fe7394ea6c242600c1 GIT binary patch literal 146 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}k)AG&Ar*6y6C_v{Cy4Yk z1sYspRNlxHu4??pzHDCO!BZ0&8E2k5IXNxBv%+hO<%@<+k)vU4Gq&`!YVRzY{H`JS tx#3H7^|Ih64S@z+ZU;4>#xSxolzR%ZbqPqeF)%PNc)I$ztaD0e0sx=*FdqN_ literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..4d1042d449f4d6893455cf87a9483b87d530bb50 GIT binary patch literal 158 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}sh%#5Ar*6y6C_v{Cy4Yk z1sYspRNlxHu4??pzHDCO!BZ0&AKs{BYnx+}*;d>>-$>%7m+=Y}8`WDfB?nx(lC+&! zbdw*RI&h$2!OKSt$FVdQ&MBb@ E09&Is(*OVf literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..dee613303f7a085ef31e38b6aa0173254dc1c182 GIT binary patch literal 140 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I4mJh`hT^KKFANL}!JaOTAr*6y6C_v{Cy4Yk z1sZU5u&kaW`A=NJ@X!9u4!{1dN(q@IR6NroFemlI0fpp;rw$xw@VtDK@%TAo0~^bY l(#>*koo)v;BrY*9JpLxTjkBQ4k%57M!PC{xWt~$(699tyFBt#; literal 0 HcmV?d00001 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 a7b3b4678de53ed2c9a4d24e055e8d1a0767b92d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 259 zcmeAS@N?(olHy`uVBq!ia0y~yU{C;I7G?$phQ^Te;|vT8x&b~RuKybvxD``vlJBaz ztPt0)vxz%XTwE+JF0N`fAwE7{NV{gQx~i9#S5;M&lHHV=yeE8^5)@2FL&KOM(T^;s5W-EhI!Jl_`rS^xep6ACa+Q4;YPUPcX zdL{t@0$K-xE&q1hadzBU&Y!qVX1$True <data /> <data><IncludeFilters /><ExcludeFilters><Filter ModuleMask="Lidgren.Network" ModuleVersionMask="*" ClassMask="*" FunctionMask="*" IsEnabled="True" /></ExcludeFilters></data> + True True True True