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
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -36,7 +36,8 @@ namespace Content.Client.GameObjects.Components.Power
|
||||
var sprite = component.Owner.GetComponent<ISpriteComponent>();
|
||||
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}");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -33,7 +33,6 @@
|
||||
"Door",
|
||||
"PoweredLight",
|
||||
"Smes",
|
||||
"Powercell",
|
||||
"LightBulb",
|
||||
"Healing",
|
||||
"Catwalk",
|
||||
@@ -42,6 +41,7 @@
|
||||
"HitscanWeaponCapacitor",
|
||||
"PowerCell",
|
||||
"PowerCellCharger",
|
||||
"PowerCellSlot",
|
||||
"WeaponCapacitorCharger",
|
||||
"AiController",
|
||||
"Computer",
|
||||
|
||||
@@ -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
|
||||
{
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
[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;
|
||||
|
||||
/// <summary>
|
||||
/// 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<PointLightComponent>();
|
||||
_cellSlot = Owner.EnsureComponent<PowerCellSlotComponent>();
|
||||
|
||||
Dirty();
|
||||
}
|
||||
|
||||
async Task<bool> IInteractUsing.InteractUsing(InteractUsingEventArgs eventArgs)
|
||||
{
|
||||
if (!eventArgs.Using.HasComponent<BatteryComponent>()) return false;
|
||||
|
||||
if (Cell != null) return false;
|
||||
|
||||
var handsComponent = eventArgs.User.GetComponent<IHandsComponent>();
|
||||
|
||||
if (!handsComponent.Drop(eventArgs.Using, _cellContainer))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
EntitySystem.Get<AudioSystem>().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<PointLightComponent>();
|
||||
_cellContainer =
|
||||
ContainerManagerComponent.Ensure<ContainerSlot>("flashlight_cell_container", Owner, out _);
|
||||
|
||||
Dirty();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Illuminates the light if it is not active, extinguishes it if it is active.
|
||||
/// </summary>
|
||||
/// <returns>True if the light's status was toggled, false otherwise.</returns>
|
||||
private bool ToggleStatus(IEntity user)
|
||||
{
|
||||
var item = Owner.GetComponent<ItemComponent>();
|
||||
// Update sprite and light states to match the activation.
|
||||
if (Activated)
|
||||
{
|
||||
TurnOff();
|
||||
item.EquippedPrefix = "off";
|
||||
}
|
||||
else
|
||||
{
|
||||
TurnOn(user);
|
||||
item.EquippedPrefix = "on";
|
||||
return Activated ? TurnOff() : TurnOn(user);
|
||||
}
|
||||
|
||||
// Toggle always succeeds.
|
||||
return true;
|
||||
}
|
||||
|
||||
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<AudioSystem>().PlayFromEntity("/Audio/Items/flashlight_toggle.ogg", Owner);
|
||||
}
|
||||
if (TurnOffSound != null) EntitySystem.Get<AudioSystem>().PlayFromEntity(TurnOffSound, Owner);
|
||||
}
|
||||
|
||||
private void TurnOn(IEntity user)
|
||||
return true;
|
||||
}
|
||||
|
||||
private bool TurnOn(IEntity user)
|
||||
{
|
||||
if (Activated)
|
||||
{
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
var cell = Cell;
|
||||
if (cell == null)
|
||||
if (Cell == null)
|
||||
{
|
||||
EntitySystem.Get<AudioSystem>().PlayFromEntity("/Audio/Machines/button.ogg", Owner);
|
||||
|
||||
if (TurnOnFailSound != null) EntitySystem.Get<AudioSystem>().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<AudioSystem>().PlayFromEntity("/Audio/Machines/button.ogg", Owner);
|
||||
if (TurnOnFailSound != null) EntitySystem.Get<AudioSystem>().PlayFromEntity(TurnOnFailSound, Owner);
|
||||
Owner.PopupMessage(user, Loc.GetString("Dead cell..."));
|
||||
return;
|
||||
return false;
|
||||
}
|
||||
|
||||
Activated = true;
|
||||
SetState(true);
|
||||
|
||||
EntitySystem.Get<AudioSystem>().PlayFromEntity("/Audio/Items/flashlight_toggle.ogg", Owner);
|
||||
if (TurnOnSound != null) EntitySystem.Get<AudioSystem>().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<AppearanceComponent>();
|
||||
|
||||
@@ -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<ItemComponent>()))
|
||||
{
|
||||
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<AudioSystem>().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<HandheldLightComponent>
|
||||
{
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,14 +11,28 @@ namespace Content.Server.GameObjects.Components.Power
|
||||
{
|
||||
public override string Name => "Battery";
|
||||
|
||||
/// <summary>
|
||||
/// Maximum charge of the battery in joules (ie. watt seconds)
|
||||
/// </summary>
|
||||
[ViewVariables(VVAccess.ReadWrite)] public int MaxCharge { get => _maxCharge; set => SetMaxCharge(value); }
|
||||
private int _maxCharge;
|
||||
|
||||
/// <summary>
|
||||
/// Current charge of the battery in joules (ie. watt seconds)
|
||||
/// </summary>
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
public float CurrentCharge { get => _currentCharge; set => SetCurrentCharge(value); }
|
||||
|
||||
private float _currentCharge;
|
||||
|
||||
/// <summary>
|
||||
/// True if the battery is fully charged.
|
||||
/// </summary>
|
||||
[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
|
||||
|
||||
@@ -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
|
||||
{
|
||||
/// <summary>
|
||||
/// Batteries that have update an <see cref="AppearanceComponent"/> based on their charge percent.
|
||||
/// Batteries that can update an <see cref="AppearanceComponent"/> based on their charge percent
|
||||
/// and fit into a <see cref="PowerCellSlotComponent"/> of the appropriate size.
|
||||
/// </summary>
|
||||
[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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
{
|
||||
/// <summary>
|
||||
/// Provides a "battery compartment" that can contain a <see cref="PowerCellComponent"/> of the matching
|
||||
/// <see cref="PowerCellSize"/>. Intended to supplement other components, not very useful by itself.
|
||||
/// </summary>
|
||||
[RegisterComponent]
|
||||
public class PowerCellSlotComponent : Component, IExamine, IMapInit
|
||||
{
|
||||
public override string Name => "PowerCellSlot";
|
||||
|
||||
/// <summary>
|
||||
/// What size of cell fits into this component.
|
||||
/// </summary>
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
public PowerCellSize SlotSize { get; set; } = PowerCellSize.Small;
|
||||
|
||||
/// <summary>
|
||||
/// Can the cell be removed ?
|
||||
/// </summary>
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
public bool CanRemoveCell { get; set; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// Should the "Remove cell" verb be displayed on this component?
|
||||
/// </summary>
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
public bool ShowVerb { get; set; } = true;
|
||||
|
||||
/// <summary>
|
||||
/// String passed to <see><cref>String.Format</cref></see> 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.
|
||||
/// </summary>
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
public string? DescFormatString { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// File path to a sound file that should be played when the cell is removed.
|
||||
/// </summary>
|
||||
/// <example>"/Audio/Items/pistol_magout.ogg"</example>
|
||||
[ViewVariables(VVAccess.ReadWrite)]
|
||||
public string? CellRemoveSound { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// File path to a sound file that should be played when a cell is inserted.
|
||||
/// </summary>
|
||||
/// <example>"/Audio/Items/pistol_magin.ogg"</example>
|
||||
[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;
|
||||
|
||||
/// <summary>
|
||||
/// True if we don't want a cell inserted during map init.
|
||||
/// </summary>
|
||||
private bool _startEmpty = false;
|
||||
|
||||
/// <summary>
|
||||
/// If not null, this cell type will be inserted at MapInit instead of the default Standard cell.
|
||||
/// </summary>
|
||||
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<ContainerSlot>("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));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 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.
|
||||
/// </summary>
|
||||
/// <param name="user">(optional) the user to give the removed cell to.</param>
|
||||
/// <param name="playSound">Should <see cref="CellRemoveSound"/> be played upon removal?</param>
|
||||
/// <returns>The cell component of the entity that was removed, or null if removal failed.</returns>
|
||||
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<ItemComponent>()))
|
||||
{
|
||||
cell.Owner.Transform.Coordinates = user.Transform.Coordinates;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
cell.Owner.Transform.Coordinates = Owner.Transform.Coordinates;
|
||||
}
|
||||
|
||||
if (playSound && CellRemoveSound != null)
|
||||
{
|
||||
EntitySystem.Get<AudioSystem>().PlayFromEntity(CellRemoveSound, Owner, AudioHelpers.WithVariation(0.125f));
|
||||
}
|
||||
SendMessage(new PowerCellChangedMessage(true));
|
||||
return cell;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Tries to insert the given cell into this component. The cell will be put into the container of this component.
|
||||
/// </summary>
|
||||
/// <param name="cell">The cell to insert.</param>
|
||||
/// <param name="playSound">Should <see cref="CellInsertSound"/> be played upon insertion?</param>
|
||||
/// <returns>True if insertion succeeded; false otherwise.</returns>
|
||||
public bool InsertCell(IEntity cell, bool playSound = true)
|
||||
{
|
||||
if (Cell != null) return false;
|
||||
if (!cell.TryGetComponent<ItemComponent>(out var _)) return false;
|
||||
if (!cell.TryGetComponent<PowerCellComponent>(out var cellComponent)) return false;
|
||||
if (cellComponent.CellSize != SlotSize) return false;
|
||||
if (!_cellContainer.Insert(cell)) return false;
|
||||
//Dirty();
|
||||
if (playSound && CellInsertSound != null)
|
||||
{
|
||||
EntitySystem.Get<AudioSystem>().PlayFromEntity(CellInsertSound, Owner, AudioHelpers.WithVariation(0.125f));
|
||||
}
|
||||
SendMessage(new PowerCellChangedMessage(false));
|
||||
return true;
|
||||
}
|
||||
|
||||
[Verb]
|
||||
public sealed class EjectCellVerb : Verb<PowerCellSlotComponent>
|
||||
{
|
||||
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
|
||||
{
|
||||
/// <summary>
|
||||
/// If true, the cell was ejected; if false, it was inserted.
|
||||
/// </summary>
|
||||
public bool Ejected { get; }
|
||||
|
||||
public PowerCellChangedMessage(bool ejected)
|
||||
{
|
||||
Ejected = ejected;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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<ContainerSlot>("stunbaton_cell_container", Owner, out var existed);
|
||||
_cellSlot = Owner.EnsureComponent<PowerCellSlotComponent>();
|
||||
}
|
||||
|
||||
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<IEntity> 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<SpriteComponent>();
|
||||
var item = Owner.GetComponent<ItemComponent>();
|
||||
var cell = Cell;
|
||||
|
||||
if (cell == null)
|
||||
if (Cell == null)
|
||||
{
|
||||
EntitySystem.Get<AudioSystem>().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<AudioSystem>().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<bool> InteractUsing(InteractUsingEventArgs eventArgs)
|
||||
{
|
||||
if (!eventArgs.Using.HasComponent<BatteryComponent>()) return false;
|
||||
|
||||
if (Cell != null) return false;
|
||||
|
||||
var handsComponent = eventArgs.User.GetComponent<IHandsComponent>();
|
||||
|
||||
if (!handsComponent.Drop(eventArgs.Using, _cellContainer))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
EntitySystem.Get<AudioSystem>().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<ItemComponent>()))
|
||||
{
|
||||
cell.Owner.Transform.Coordinates = user.Transform.Coordinates;
|
||||
}
|
||||
|
||||
EntitySystem.Get<AudioSystem>().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<StunbatonComponent>
|
||||
{
|
||||
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<AudioSystem>().PlayAtCoords("/Audio/Weapons/egloves.ogg", Owner.Transform.Coordinates, AudioHelpers.WithVariation(0.25f));
|
||||
|
||||
18
Content.Server/GameObjects/EntitySystems/BatterySystem.cs
Normal file
@@ -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<BatteryComponent>(false))
|
||||
{
|
||||
comp.OnUpdate(frameTime);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -9,7 +9,7 @@ namespace Content.Server.GameObjects.EntitySystems
|
||||
{
|
||||
public override void Update(float frameTime)
|
||||
{
|
||||
foreach (var comp in ComponentManager.EntityQuery<HandheldLightComponent>())
|
||||
foreach (var comp in ComponentManager.EntityQuery<HandheldLightComponent>(false))
|
||||
{
|
||||
comp.OnUpdate(frameTime);
|
||||
}
|
||||
|
||||
@@ -56,5 +56,53 @@ namespace Content.Shared.Utility
|
||||
return (int)Math.Floor(preround);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the segment <paramref name="actual"/> lies on on a decimal scale from 0 to <paramref name="max"/> divided into
|
||||
/// <paramref name="levels"/> sections. In less mathematical terms, same as <see cref="RoundToLevels"/>
|
||||
/// except <paramref name="actual"/> is rounded to the nearest matching level instead of 0 and the highest level being
|
||||
/// precisely 0 and max and no other value.
|
||||
/// </summary>
|
||||
/// <example>
|
||||
/// 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 <code>RoundToNearestLevels(value, max, 5)</code>
|
||||
/// </example>
|
||||
/// <param name="actual">The point to be rounded to the nearest level.</param>
|
||||
/// <param name="max">The maximum value of the scale.</param>
|
||||
/// <param name="levels">Number of segments the scale is subdivided into.</param>
|
||||
/// <returns>The segment <paramref name="actual"/> lies on.</returns>
|
||||
/// <exception cref="ArgumentException"></exception>
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
description: They light the way to freedom.
|
||||
components:
|
||||
- type: HandheldLight
|
||||
- type: PowerCellSlot
|
||||
- type: Sprite
|
||||
sprite: Objects/Tools/flashlight.rsi
|
||||
layers:
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
]
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
After Width: | Height: | Size: 946 B |
|
After Width: | Height: | Size: 381 B |
|
After Width: | Height: | Size: 237 B |
|
After Width: | Height: | Size: 174 B |
|
After Width: | Height: | Size: 186 B |
|
After Width: | Height: | Size: 188 B |
|
After Width: | Height: | Size: 187 B |
@@ -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
|
||||
]
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
After Width: | Height: | Size: 374 B |
|
After Width: | Height: | Size: 221 B |
|
After Width: | Height: | Size: 174 B |
|
After Width: | Height: | Size: 187 B |
|
After Width: | Height: | Size: 189 B |
|
After Width: | Height: | Size: 187 B |
@@ -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
|
||||
]
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
After Width: | Height: | Size: 372 B |
|
After Width: | Height: | Size: 220 B |
|
After Width: | Height: | Size: 167 B |
|
After Width: | Height: | Size: 181 B |
|
After Width: | Height: | Size: 183 B |
|
After Width: | Height: | Size: 180 B |
@@ -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
|
||||
]
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
After Width: | Height: | Size: 377 B |
|
After Width: | Height: | Size: 220 B |
|
After Width: | Height: | Size: 176 B |
|
After Width: | Height: | Size: 183 B |
|
After Width: | Height: | Size: 186 B |
|
After Width: | Height: | Size: 184 B |
@@ -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
|
||||
]
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
After Width: | Height: | Size: 360 B |
|
After Width: | Height: | Size: 219 B |
|
After Width: | Height: | Size: 163 B |
|
After Width: | Height: | Size: 155 B |
|
After Width: | Height: | Size: 155 B |
|
After Width: | Height: | Size: 171 B |
@@ -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
|
||||
]
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
After Width: | Height: | Size: 357 B |
|
After Width: | Height: | Size: 206 B |
|
After Width: | Height: | Size: 163 B |
|
After Width: | Height: | Size: 167 B |
|
After Width: | Height: | Size: 174 B |
|
After Width: | Height: | Size: 172 B |
@@ -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
|
||||
]
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
After Width: | Height: | Size: 370 B |
|
After Width: | Height: | Size: 219 B |
|
After Width: | Height: | Size: 148 B |
|
After Width: | Height: | Size: 166 B |
|
After Width: | Height: | Size: 173 B |
|
After Width: | Height: | Size: 166 B |
@@ -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
|
||||
]
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
After Width: | Height: | Size: 363 B |
|
After Width: | Height: | Size: 206 B |
|
After Width: | Height: | Size: 150 B |
|
After Width: | Height: | Size: 167 B |
|
After Width: | Height: | Size: 173 B |
|
After Width: | Height: | Size: 167 B |
@@ -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
|
||||
]
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -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
|
||||
]
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
After Width: | Height: | Size: 308 B |
|
After Width: | Height: | Size: 176 B |
|
After Width: | Height: | Size: 137 B |
|
After Width: | Height: | Size: 146 B |
|
After Width: | Height: | Size: 158 B |
|
After Width: | Height: | Size: 140 B |
|
Before Width: | Height: | Size: 259 B |
@@ -77,6 +77,7 @@
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=BYOND/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:String x:Key="/Default/FilterSettingsManager/AttributeFilterXml/@EntryValue"><data /></s:String>
|
||||
<s:String x:Key="/Default/FilterSettingsManager/CoverageFilterXml/@EntryValue"><data><IncludeFilters /><ExcludeFilters><Filter ModuleMask="Lidgren.Network" ModuleVersionMask="*" ClassMask="*" FunctionMask="*" IsEnabled="True" /></ExcludeFilters></data></s:String>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=cellslot/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Charlieson/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Clonexadone/@EntryIndexedValue">True</s:Boolean>
|
||||
<s:Boolean x:Key="/Default/UserDictionary/Words/=Collidable/@EntryIndexedValue">True</s:Boolean>
|
||||
|
||||