Merge branch 'master' of https://github.com/space-wizards/space-station-14
@@ -1,15 +1,26 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Runtime.CompilerServices;
|
using System.Runtime.CompilerServices;
|
||||||
|
#if NETCOREAPP
|
||||||
|
using System.Runtime.Intrinsics;
|
||||||
|
using System.Runtime.Intrinsics.X86;
|
||||||
|
#endif
|
||||||
using BenchmarkDotNet.Attributes;
|
using BenchmarkDotNet.Attributes;
|
||||||
using Robust.Shared.Maths;
|
using Robust.Shared.Maths;
|
||||||
using SysVector4 = System.Numerics.Vector4;
|
using SysVector4 = System.Numerics.Vector4;
|
||||||
|
|
||||||
namespace Content.Benchmarks
|
namespace Content.Benchmarks
|
||||||
{
|
{
|
||||||
|
[DisassemblyDiagnoser]
|
||||||
public class ColorInterpolateBenchmark
|
public class ColorInterpolateBenchmark
|
||||||
{
|
{
|
||||||
private readonly List<(Color, Color)> _colors = new List<(Color, Color)>();
|
#if NETCOREAPP
|
||||||
|
private const MethodImplOptions AggressiveOpt = MethodImplOptions.AggressiveOptimization;
|
||||||
|
#else
|
||||||
|
private const MethodImplOptions AggressiveOpt = default;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
private (Color, Color)[] _colors;
|
||||||
|
private Color[] _output;
|
||||||
|
|
||||||
[Params(100)] public int N { get; set; }
|
[Params(100)] public int N { get; set; }
|
||||||
|
|
||||||
@@ -18,6 +29,9 @@ namespace Content.Benchmarks
|
|||||||
{
|
{
|
||||||
var random = new Random(3005);
|
var random = new Random(3005);
|
||||||
|
|
||||||
|
_colors = new (Color, Color)[N];
|
||||||
|
_output = new Color[N];
|
||||||
|
|
||||||
for (var i = 0; i < N; i++)
|
for (var i = 0; i < N; i++)
|
||||||
{
|
{
|
||||||
var r1 = random.NextFloat();
|
var r1 = random.NextFloat();
|
||||||
@@ -30,123 +44,122 @@ namespace Content.Benchmarks
|
|||||||
var b2 = random.NextFloat();
|
var b2 = random.NextFloat();
|
||||||
var a2 = random.NextFloat();
|
var a2 = random.NextFloat();
|
||||||
|
|
||||||
_colors.Add((new Color(r1, g1, b1, a1), new Color(r2, g2, b2, a2)));
|
_colors[i] = (new Color(r1, g1, b1, a1), new Color(r2, g2, b2, a2));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[Benchmark]
|
[Benchmark]
|
||||||
public void BenchSimple()
|
public void BenchSimple()
|
||||||
{
|
{
|
||||||
foreach (var (a, b) in _colors)
|
for (var i = 0; i < N; i++)
|
||||||
{
|
{
|
||||||
InterpolateSimple(a, b, 0.5f);
|
ref var tuple = ref _colors[i];
|
||||||
|
_output[i] = InterpolateSimple(tuple.Item1, tuple.Item2, 0.5f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//[Benchmark]
|
|
||||||
public void BenchSysVector4()
|
|
||||||
{
|
|
||||||
foreach (var (a, b) in _colors)
|
|
||||||
{
|
|
||||||
InterpolateSysVector4(a, b, 0.5f);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//[Benchmark]
|
[Benchmark]
|
||||||
public void BenchSysVector4Blit()
|
public void BenchSysVector4In()
|
||||||
{
|
{
|
||||||
foreach (var (a, b) in _colors)
|
for (var i = 0; i < N; i++)
|
||||||
{
|
{
|
||||||
InterpolateSysVector4Blit(a, b, 0.5f);
|
ref var tuple = ref _colors[i];
|
||||||
}
|
_output[i] = InterpolateSysVector4In(tuple.Item1, tuple.Item2, 0.5f);
|
||||||
}
|
|
||||||
|
|
||||||
//[Benchmark]
|
|
||||||
public void BenchSysVector4BlitNoException()
|
|
||||||
{
|
|
||||||
foreach (var (a, b) in _colors)
|
|
||||||
{
|
|
||||||
InterpolateSysVector4BlitNoException(a, b, 0.5f);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[Benchmark]
|
[Benchmark]
|
||||||
public void BenchSysVector4AsRefNoException()
|
public void BenchSysVector4()
|
||||||
{
|
{
|
||||||
foreach (var (a, b) in _colors)
|
for (var i = 0; i < N; i++)
|
||||||
{
|
{
|
||||||
InterpolateSysVector4BlitNoExceptionAsRef(a, b, 0.5f);
|
ref var tuple = ref _colors[i];
|
||||||
|
_output[i] = InterpolateSysVector4(tuple.Item1, tuple.Item2, 0.5f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Color InterpolateSimple(Color endPoint1, Color endPoint2, float lambda)
|
#if NETCOREAPP
|
||||||
|
[Benchmark]
|
||||||
|
public void BenchSimd()
|
||||||
|
{
|
||||||
|
for (var i = 0; i < N; i++)
|
||||||
|
{
|
||||||
|
ref var tuple = ref _colors[i];
|
||||||
|
_output[i] = InterpolateSimd(tuple.Item1, tuple.Item2, 0.5f);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[Benchmark]
|
||||||
|
public void BenchSimdIn()
|
||||||
|
{
|
||||||
|
for (var i = 0; i < N; i++)
|
||||||
|
{
|
||||||
|
ref var tuple = ref _colors[i];
|
||||||
|
_output[i] = InterpolateSimdIn(tuple.Item1, tuple.Item2, 0.5f);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
[MethodImpl(AggressiveOpt)]
|
||||||
|
public static Color InterpolateSimple(Color a, Color b, float lambda)
|
||||||
{
|
{
|
||||||
if (lambda < 0 || lambda > 1)
|
|
||||||
throw new ArgumentOutOfRangeException(nameof(lambda));
|
|
||||||
return new Color(
|
return new Color(
|
||||||
endPoint1.R * lambda + endPoint2.R * (1 - lambda),
|
a.R + (b.R - a.R) * lambda,
|
||||||
endPoint1.G * lambda + endPoint2.G * (1 - lambda),
|
a.G + (b.G - a.G) * lambda,
|
||||||
endPoint1.B * lambda + endPoint2.B * (1 - lambda),
|
a.B + (b.G - a.B) * lambda,
|
||||||
endPoint1.A * lambda + endPoint2.A * (1 - lambda)
|
a.A + (b.A - a.A) * lambda
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static Color InterpolateSysVector4(Color endPoint1, Color endPoint2, float lambda)
|
[MethodImpl(AggressiveOpt)]
|
||||||
{
|
public static Color InterpolateSysVector4(Color a, Color b,
|
||||||
if (lambda < 0 || lambda > 1)
|
|
||||||
throw new ArgumentOutOfRangeException(nameof(lambda));
|
|
||||||
|
|
||||||
var vec1 = new SysVector4(endPoint1.R, endPoint1.G, endPoint1.B, endPoint1.A);
|
|
||||||
var vec2 = new SysVector4(endPoint2.R, endPoint2.G, endPoint2.B, endPoint2.A);
|
|
||||||
|
|
||||||
var res = SysVector4.Lerp(vec1, vec2, 1 - lambda);
|
|
||||||
|
|
||||||
return new Color(
|
|
||||||
res.X, res.Y, res.Z, res.W);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static unsafe Color InterpolateSysVector4Blit(in Color endPoint1, in Color endPoint2, float lambda)
|
|
||||||
{
|
|
||||||
if (lambda < 0 || lambda > 1)
|
|
||||||
throw new ArgumentOutOfRangeException(nameof(lambda));
|
|
||||||
|
|
||||||
|
|
||||||
fixed (Color* p1 = &endPoint1)
|
|
||||||
fixed (Color* p2 = &endPoint2)
|
|
||||||
{
|
|
||||||
var vp1 = (SysVector4*) p1;
|
|
||||||
var vp2 = (SysVector4*) p2;
|
|
||||||
|
|
||||||
var res = SysVector4.Lerp(*vp1, *vp2, 1 - lambda);
|
|
||||||
|
|
||||||
return *(Color*) (&res);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static unsafe Color InterpolateSysVector4BlitNoException(in Color endPoint1, in Color endPoint2,
|
|
||||||
float lambda)
|
float lambda)
|
||||||
{
|
{
|
||||||
fixed (Color* p1 = &endPoint1)
|
ref var sva = ref Unsafe.As<Color, SysVector4>(ref a);
|
||||||
fixed (Color* p2 = &endPoint2)
|
ref var svb = ref Unsafe.As<Color, SysVector4>(ref b);
|
||||||
{
|
|
||||||
var vp1 = (SysVector4*) p1;
|
|
||||||
var vp2 = (SysVector4*) p2;
|
|
||||||
|
|
||||||
var res = SysVector4.Lerp(*vp2, *vp1, lambda);
|
var res = SysVector4.Lerp(sva, svb, lambda);
|
||||||
|
|
||||||
return *(Color*) (&res);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static unsafe Color InterpolateSysVector4BlitNoExceptionAsRef(in Color endPoint1, in Color endPoint2,
|
|
||||||
float lambda)
|
|
||||||
{
|
|
||||||
ref var sv1 = ref Unsafe.As<Color, SysVector4>(ref Unsafe.AsRef(endPoint1));
|
|
||||||
ref var sv2 = ref Unsafe.As<Color, SysVector4>(ref Unsafe.AsRef(endPoint2));
|
|
||||||
|
|
||||||
var res = SysVector4.Lerp(sv2, sv1, lambda);
|
|
||||||
|
|
||||||
return Unsafe.As<SysVector4, Color>(ref res);
|
return Unsafe.As<SysVector4, Color>(ref res);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[MethodImpl(AggressiveOpt)]
|
||||||
|
public static Color InterpolateSysVector4In(in Color endPoint1, in Color endPoint2,
|
||||||
|
float lambda)
|
||||||
|
{
|
||||||
|
ref var sva = ref Unsafe.As<Color, SysVector4>(ref Unsafe.AsRef(endPoint1));
|
||||||
|
ref var svb = ref Unsafe.As<Color, SysVector4>(ref Unsafe.AsRef(endPoint2));
|
||||||
|
|
||||||
|
var res = SysVector4.Lerp(svb, sva, lambda);
|
||||||
|
|
||||||
|
return Unsafe.As<SysVector4, Color>(ref res);
|
||||||
|
}
|
||||||
|
|
||||||
|
#if NETCOREAPP
|
||||||
|
[MethodImpl(AggressiveOpt)]
|
||||||
|
public static Color InterpolateSimd(Color a, Color b,
|
||||||
|
float lambda)
|
||||||
|
{
|
||||||
|
var vecA = Unsafe.As<Color, Vector128<float>>(ref a);
|
||||||
|
var vecB = Unsafe.As<Color, Vector128<float>>(ref b);
|
||||||
|
|
||||||
|
vecB = Fma.MultiplyAdd(Sse.Subtract(vecB, vecA), Vector128.Create(lambda), vecA);
|
||||||
|
|
||||||
|
return Unsafe.As<Vector128<float>, Color>(ref vecB);
|
||||||
|
}
|
||||||
|
|
||||||
|
[MethodImpl(AggressiveOpt)]
|
||||||
|
public static Color InterpolateSimdIn(in Color a, in Color b,
|
||||||
|
float lambda)
|
||||||
|
{
|
||||||
|
var vecA = Unsafe.As<Color, Vector128<float>>(ref Unsafe.AsRef(a));
|
||||||
|
var vecB = Unsafe.As<Color, Vector128<float>>(ref Unsafe.AsRef(b));
|
||||||
|
|
||||||
|
vecB = Fma.MultiplyAdd(Sse.Subtract(vecB, vecA), Vector128.Create(lambda), vecA);
|
||||||
|
|
||||||
|
return Unsafe.As<Vector128<float>, Color>(ref vecB);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,12 +25,12 @@ namespace Content.Client.Chat
|
|||||||
private ILocalizationManager localize = IoCManager.Resolve<ILocalizationManager>();
|
private ILocalizationManager localize = IoCManager.Resolve<ILocalizationManager>();
|
||||||
|
|
||||||
public LineEdit Input { get; private set; }
|
public LineEdit Input { get; private set; }
|
||||||
public OutputPanel contents;
|
public OutputPanel Contents { get; }
|
||||||
|
|
||||||
// Buttons for filtering
|
// Buttons for filtering
|
||||||
public Button AllButton;
|
public Button AllButton { get; }
|
||||||
public Button LocalButton;
|
public Button LocalButton { get; }
|
||||||
public Button OOCButton;
|
public Button OOCButton { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Index while cycling through the input history. -1 means not going through history.
|
/// Index while cycling through the input history. -1 means not going through history.
|
||||||
@@ -49,11 +49,9 @@ namespace Content.Client.Chat
|
|||||||
|
|
||||||
public bool ReleaseFocusOnEnter { get; set; } = true;
|
public bool ReleaseFocusOnEnter { get; set; } = true;
|
||||||
|
|
||||||
protected override void Initialize()
|
public ChatBox()
|
||||||
{
|
{
|
||||||
base.Initialize();
|
MarginLeft = -475.0f;
|
||||||
|
|
||||||
MarginLeft = -475.0f;
|
|
||||||
MarginTop = 10.0f;
|
MarginTop = 10.0f;
|
||||||
MarginRight = -10.0f;
|
MarginRight = -10.0f;
|
||||||
MarginBottom = 235.0f;
|
MarginBottom = 235.0f;
|
||||||
@@ -80,8 +78,8 @@ namespace Content.Client.Chat
|
|||||||
MarginLeftOverride = 4, MarginRightOverride = 4,
|
MarginLeftOverride = 4, MarginRightOverride = 4,
|
||||||
SizeFlagsVertical = SizeFlags.FillExpand
|
SizeFlagsVertical = SizeFlags.FillExpand
|
||||||
};
|
};
|
||||||
contents = new OutputPanel();
|
Contents = new OutputPanel();
|
||||||
contentMargin.AddChild(contents);
|
contentMargin.AddChild(Contents);
|
||||||
vBox.AddChild(contentMargin);
|
vBox.AddChild(contentMargin);
|
||||||
|
|
||||||
Input = new LineEdit();
|
Input = new LineEdit();
|
||||||
@@ -182,18 +180,6 @@ namespace Content.Client.Chat
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Dispose(bool disposing)
|
|
||||||
{
|
|
||||||
base.Dispose(disposing);
|
|
||||||
|
|
||||||
if (disposing)
|
|
||||||
{
|
|
||||||
TextSubmitted = null;
|
|
||||||
Input = null;
|
|
||||||
contents = null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public event TextSubmitHandler TextSubmitted;
|
public event TextSubmitHandler TextSubmitted;
|
||||||
|
|
||||||
public event FilterToggledHandler FilterToggled;
|
public event FilterToggledHandler FilterToggled;
|
||||||
@@ -209,7 +195,7 @@ namespace Content.Client.Chat
|
|||||||
formatted.PushColor(color);
|
formatted.PushColor(color);
|
||||||
formatted.AddText(message);
|
formatted.AddText(message);
|
||||||
formatted.Pop();
|
formatted.Pop();
|
||||||
contents.AddMessage(formatted);
|
Contents.AddMessage(formatted);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void Input_OnTextEntered(LineEdit.LineEditEventArgs args)
|
private void Input_OnTextEntered(LineEdit.LineEditEventArgs args)
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Content.Client.Interfaces.Chat;
|
using Content.Client.Interfaces.Chat;
|
||||||
using Content.Shared.Chat;
|
using Content.Shared.Chat;
|
||||||
using Robust.Client;
|
|
||||||
using Robust.Client.Console;
|
using Robust.Client.Console;
|
||||||
using Robust.Client.Interfaces.Graphics.ClientEye;
|
using Robust.Client.Interfaces.Graphics.ClientEye;
|
||||||
using Robust.Client.Interfaces.UserInterface;
|
using Robust.Client.Interfaces.UserInterface;
|
||||||
@@ -274,7 +273,7 @@ namespace Content.Client.Chat
|
|||||||
|
|
||||||
private void RepopulateChat(IEnumerable<StoredChatMessage> filteredMessages)
|
private void RepopulateChat(IEnumerable<StoredChatMessage> filteredMessages)
|
||||||
{
|
{
|
||||||
_currentChatBox.contents.Clear();
|
_currentChatBox.Contents.Clear();
|
||||||
|
|
||||||
foreach (var msg in filteredMessages)
|
foreach (var msg in filteredMessages)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
using Content.Client.Interfaces.Chat;
|
using Content.Client.Interfaces.Chat;
|
||||||
using Robust.Client;
|
|
||||||
using Robust.Client.Interfaces.Graphics.ClientEye;
|
using Robust.Client.Interfaces.Graphics.ClientEye;
|
||||||
using Robust.Client.UserInterface;
|
using Robust.Client.UserInterface;
|
||||||
using Robust.Client.UserInterface.Controls;
|
using Robust.Client.UserInterface.Controls;
|
||||||
@@ -32,14 +31,14 @@ namespace Content.Client.Chat
|
|||||||
private readonly IEntity _senderEntity;
|
private readonly IEntity _senderEntity;
|
||||||
private readonly IChatManager _chatManager;
|
private readonly IChatManager _chatManager;
|
||||||
|
|
||||||
private Control _panel;
|
private readonly Control _panel;
|
||||||
|
|
||||||
private float _timeLeft = TotalTime;
|
private float _timeLeft = TotalTime;
|
||||||
|
|
||||||
public float VerticalOffset { get; set; }
|
public float VerticalOffset { get; set; }
|
||||||
private float _verticalOffsetAchieved;
|
private float _verticalOffsetAchieved;
|
||||||
|
|
||||||
public float ContentHeight { get; }
|
public float ContentHeight { get; private set; }
|
||||||
|
|
||||||
public SpeechBubble(string text, IEntity senderEntity, IEyeManager eyeManager, IChatManager chatManager)
|
public SpeechBubble(string text, IEntity senderEntity, IEyeManager eyeManager, IChatManager chatManager)
|
||||||
{
|
{
|
||||||
@@ -68,6 +67,8 @@ namespace Content.Client.Chat
|
|||||||
|
|
||||||
AddChild(_panel);
|
AddChild(_panel);
|
||||||
|
|
||||||
|
ForceRunStyleUpdate();
|
||||||
|
|
||||||
_panel.Size = _panel.CombinedMinimumSize;
|
_panel.Size = _panel.CombinedMinimumSize;
|
||||||
ContentHeight = _panel.Height;
|
ContentHeight = _panel.Height;
|
||||||
Size = (_panel.Width, 0);
|
Size = (_panel.Width, 0);
|
||||||
|
|||||||
@@ -85,14 +85,11 @@ namespace Content.Client
|
|||||||
private float _timeLeft;
|
private float _timeLeft;
|
||||||
public Vector2 InitialPos { get; set; }
|
public Vector2 InitialPos { get; set; }
|
||||||
|
|
||||||
protected override void Initialize()
|
public PopupLabel()
|
||||||
{
|
{
|
||||||
base.Initialize();
|
|
||||||
|
|
||||||
ShadowOffsetXOverride = 1;
|
ShadowOffsetXOverride = 1;
|
||||||
ShadowOffsetYOverride = 1;
|
ShadowOffsetYOverride = 1;
|
||||||
FontColorShadowOverride = Color.Black;
|
FontColorShadowOverride = Color.Black;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Update(FrameEventArgs eventArgs)
|
public void Update(FrameEventArgs eventArgs)
|
||||||
|
|||||||
@@ -3,62 +3,50 @@ using System.Collections.Generic;
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Content.Client.GameObjects.Components.Construction;
|
using Content.Client.GameObjects.Components.Construction;
|
||||||
using Content.Shared.Construction;
|
using Content.Shared.Construction;
|
||||||
using Robust.Client.GameObjects;
|
|
||||||
using Robust.Client.Graphics;
|
using Robust.Client.Graphics;
|
||||||
using Robust.Client.Interfaces.GameObjects;
|
|
||||||
using Robust.Client.Interfaces.Graphics;
|
|
||||||
using Robust.Client.Interfaces.Placement;
|
using Robust.Client.Interfaces.Placement;
|
||||||
using Robust.Client.Interfaces.ResourceManagement;
|
using Robust.Client.Interfaces.ResourceManagement;
|
||||||
using Robust.Client.Placement;
|
using Robust.Client.Placement;
|
||||||
using Robust.Client.ResourceManagement;
|
using Robust.Client.ResourceManagement;
|
||||||
using Robust.Client.UserInterface;
|
|
||||||
using Robust.Client.UserInterface.Controls;
|
using Robust.Client.UserInterface.Controls;
|
||||||
using Robust.Client.UserInterface.CustomControls;
|
using Robust.Client.UserInterface.CustomControls;
|
||||||
using Robust.Client.Utility;
|
using Robust.Client.Utility;
|
||||||
using Robust.Shared.Enums;
|
using Robust.Shared.Enums;
|
||||||
using Robust.Shared.Interfaces.GameObjects.Components;
|
using Robust.Shared.Interfaces.GameObjects.Components;
|
||||||
using Robust.Shared.IoC;
|
using Robust.Shared.IoC;
|
||||||
using Robust.Shared.Log;
|
|
||||||
using Robust.Shared.Maths;
|
using Robust.Shared.Maths;
|
||||||
using Robust.Shared.Prototypes;
|
using Robust.Shared.Prototypes;
|
||||||
using Robust.Shared.Utility;
|
|
||||||
|
|
||||||
namespace Content.Client.Construction
|
namespace Content.Client.Construction
|
||||||
{
|
{
|
||||||
public class ConstructionMenu : SS14Window
|
public class ConstructionMenu : SS14Window
|
||||||
{
|
{
|
||||||
|
|
||||||
#pragma warning disable CS0649
|
#pragma warning disable CS0649
|
||||||
[Dependency]
|
[Dependency] readonly IPrototypeManager PrototypeManager;
|
||||||
readonly IPrototypeManager PrototypeManager;
|
[Dependency] readonly IResourceCache ResourceCache;
|
||||||
[Dependency]
|
|
||||||
readonly IResourceCache ResourceCache;
|
|
||||||
#pragma warning restore
|
#pragma warning restore
|
||||||
|
|
||||||
public ConstructorComponent Owner { get; set; }
|
public ConstructorComponent Owner { get; set; }
|
||||||
Button BuildButton;
|
private readonly Button BuildButton;
|
||||||
Button EraseButton;
|
private readonly Button EraseButton;
|
||||||
LineEdit SearchBar;
|
private readonly LineEdit SearchBar;
|
||||||
Tree RecipeList;
|
private readonly Tree RecipeList;
|
||||||
TextureRect InfoIcon;
|
private readonly TextureRect InfoIcon;
|
||||||
Label InfoLabel;
|
private readonly Label InfoLabel;
|
||||||
ItemList StepList;
|
private readonly ItemList StepList;
|
||||||
|
|
||||||
|
private CategoryNode RootCategory;
|
||||||
|
|
||||||
CategoryNode RootCategory;
|
|
||||||
// This list is flattened in such a way that the top most deepest category is first.
|
// This list is flattened in such a way that the top most deepest category is first.
|
||||||
List<CategoryNode> FlattenedCategories;
|
private List<CategoryNode> FlattenedCategories;
|
||||||
PlacementManager Placement;
|
private readonly PlacementManager Placement;
|
||||||
|
|
||||||
public ConstructionMenu()
|
public ConstructionMenu()
|
||||||
{
|
{
|
||||||
Size = new Vector2(500.0f, 350.0f);
|
Size = (500, 350);
|
||||||
}
|
|
||||||
|
|
||||||
protected override void Initialize()
|
|
||||||
{
|
|
||||||
base.Initialize();
|
|
||||||
IoCManager.InjectDependencies(this);
|
IoCManager.InjectDependencies(this);
|
||||||
Placement = (PlacementManager)IoCManager.Resolve<IPlacementManager>();
|
Placement = (PlacementManager) IoCManager.Resolve<IPlacementManager>();
|
||||||
Placement.PlacementCanceled += OnPlacementCanceled;
|
Placement.PlacementCanceled += OnPlacementCanceled;
|
||||||
|
|
||||||
Title = "Construction";
|
Title = "Construction";
|
||||||
@@ -66,18 +54,18 @@ namespace Content.Client.Construction
|
|||||||
var hSplitContainer = new HSplitContainer();
|
var hSplitContainer = new HSplitContainer();
|
||||||
|
|
||||||
// Left side
|
// Left side
|
||||||
var recipes = new VBoxContainer("Recipes") {CustomMinimumSize = new Vector2(150.0f, 0.0f)};
|
var recipes = new VBoxContainer {CustomMinimumSize = new Vector2(150.0f, 0.0f)};
|
||||||
SearchBar = new LineEdit("Search") {PlaceHolder = "Search"};
|
SearchBar = new LineEdit {PlaceHolder = "Search"};
|
||||||
RecipeList = new Tree("Tree") {SizeFlagsVertical = SizeFlags.FillExpand, HideRoot = true};
|
RecipeList = new Tree {SizeFlagsVertical = SizeFlags.FillExpand, HideRoot = true};
|
||||||
recipes.AddChild(SearchBar);
|
recipes.AddChild(SearchBar);
|
||||||
recipes.AddChild(RecipeList);
|
recipes.AddChild(RecipeList);
|
||||||
hSplitContainer.AddChild(recipes);
|
hSplitContainer.AddChild(recipes);
|
||||||
|
|
||||||
// Right side
|
// Right side
|
||||||
var guide = new VBoxContainer("Guide");
|
var guide = new VBoxContainer();
|
||||||
var info = new HBoxContainer("Info");
|
var info = new HBoxContainer();
|
||||||
InfoIcon = new TextureRect("TextureRect");
|
InfoIcon = new TextureRect();
|
||||||
InfoLabel = new Label("Label")
|
InfoLabel = new Label
|
||||||
{
|
{
|
||||||
SizeFlagsHorizontal = SizeFlags.FillExpand, SizeFlagsVertical = SizeFlags.ShrinkCenter
|
SizeFlagsHorizontal = SizeFlags.FillExpand, SizeFlagsVertical = SizeFlags.ShrinkCenter
|
||||||
};
|
};
|
||||||
@@ -85,7 +73,7 @@ namespace Content.Client.Construction
|
|||||||
info.AddChild(InfoLabel);
|
info.AddChild(InfoLabel);
|
||||||
guide.AddChild(info);
|
guide.AddChild(info);
|
||||||
|
|
||||||
var stepsLabel = new Label("Label")
|
var stepsLabel = new Label
|
||||||
{
|
{
|
||||||
SizeFlagsHorizontal = SizeFlags.ShrinkCenter,
|
SizeFlagsHorizontal = SizeFlags.ShrinkCenter,
|
||||||
SizeFlagsVertical = SizeFlags.ShrinkCenter,
|
SizeFlagsVertical = SizeFlags.ShrinkCenter,
|
||||||
@@ -93,14 +81,14 @@ namespace Content.Client.Construction
|
|||||||
};
|
};
|
||||||
guide.AddChild(stepsLabel);
|
guide.AddChild(stepsLabel);
|
||||||
|
|
||||||
StepList = new ItemList("StepsList")
|
StepList = new ItemList
|
||||||
{
|
{
|
||||||
SizeFlagsVertical = SizeFlags.FillExpand, SelectMode = ItemList.ItemListSelectMode.None
|
SizeFlagsVertical = SizeFlags.FillExpand, SelectMode = ItemList.ItemListSelectMode.None
|
||||||
};
|
};
|
||||||
guide.AddChild(StepList);
|
guide.AddChild(StepList);
|
||||||
|
|
||||||
var buttonsContainer = new HBoxContainer("Buttons");
|
var buttonsContainer = new HBoxContainer();
|
||||||
BuildButton = new Button("BuildButton")
|
BuildButton = new Button
|
||||||
{
|
{
|
||||||
SizeFlagsHorizontal = SizeFlags.FillExpand,
|
SizeFlagsHorizontal = SizeFlags.FillExpand,
|
||||||
TextAlign = Button.AlignMode.Center,
|
TextAlign = Button.AlignMode.Center,
|
||||||
@@ -108,7 +96,7 @@ namespace Content.Client.Construction
|
|||||||
Disabled = true,
|
Disabled = true,
|
||||||
ToggleMode = false
|
ToggleMode = false
|
||||||
};
|
};
|
||||||
EraseButton = new Button("EraseButton")
|
EraseButton = new Button
|
||||||
{
|
{
|
||||||
TextAlign = Button.AlignMode.Center, Text = "Clear Ghosts", ToggleMode = true
|
TextAlign = Button.AlignMode.Center, Text = "Clear Ghosts", ToggleMode = true
|
||||||
};
|
};
|
||||||
@@ -140,7 +128,7 @@ namespace Content.Client.Construction
|
|||||||
|
|
||||||
void OnItemSelected()
|
void OnItemSelected()
|
||||||
{
|
{
|
||||||
var prototype = (ConstructionPrototype)RecipeList.Selected.Metadata;
|
var prototype = (ConstructionPrototype) RecipeList.Selected.Metadata;
|
||||||
|
|
||||||
if (prototype == null)
|
if (prototype == null)
|
||||||
{
|
{
|
||||||
@@ -163,6 +151,7 @@ namespace Content.Client.Construction
|
|||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
Texture icon;
|
Texture icon;
|
||||||
string text;
|
string text;
|
||||||
switch (forward)
|
switch (forward)
|
||||||
@@ -171,20 +160,24 @@ namespace Content.Client.Construction
|
|||||||
switch (mat.Material)
|
switch (mat.Material)
|
||||||
{
|
{
|
||||||
case ConstructionStepMaterial.MaterialType.Metal:
|
case ConstructionStepMaterial.MaterialType.Metal:
|
||||||
icon = ResourceCache.GetResource<TextureResource>("/Textures/Objects/sheet_metal.png");
|
icon = ResourceCache.GetResource<TextureResource>(
|
||||||
|
"/Textures/Objects/sheet_metal.png");
|
||||||
text = $"Metal x{mat.Amount}";
|
text = $"Metal x{mat.Amount}";
|
||||||
break;
|
break;
|
||||||
case ConstructionStepMaterial.MaterialType.Glass:
|
case ConstructionStepMaterial.MaterialType.Glass:
|
||||||
icon = ResourceCache.GetResource<TextureResource>("/Textures/Objects/sheet_glass.png");
|
icon = ResourceCache.GetResource<TextureResource>(
|
||||||
|
"/Textures/Objects/sheet_glass.png");
|
||||||
text = $"Glass x{mat.Amount}";
|
text = $"Glass x{mat.Amount}";
|
||||||
break;
|
break;
|
||||||
case ConstructionStepMaterial.MaterialType.Cable:
|
case ConstructionStepMaterial.MaterialType.Cable:
|
||||||
icon = ResourceCache.GetResource<TextureResource>("/Textures/Objects/cable_coil.png");
|
icon = ResourceCache.GetResource<TextureResource>(
|
||||||
|
"/Textures/Objects/cable_coil.png");
|
||||||
text = $"Cable Coil x{mat.Amount}";
|
text = $"Cable Coil x{mat.Amount}";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case ConstructionStepTool tool:
|
case ConstructionStepTool tool:
|
||||||
switch (tool.Tool)
|
switch (tool.Tool)
|
||||||
@@ -198,20 +191,24 @@ namespace Content.Client.Construction
|
|||||||
text = "Crowbar";
|
text = "Crowbar";
|
||||||
break;
|
break;
|
||||||
case ConstructionStepTool.ToolType.Screwdriver:
|
case ConstructionStepTool.ToolType.Screwdriver:
|
||||||
icon = ResourceCache.GetResource<TextureResource>("/Textures/Objects/screwdriver.png");
|
icon = ResourceCache.GetResource<TextureResource>(
|
||||||
|
"/Textures/Objects/screwdriver.png");
|
||||||
text = "Screwdriver";
|
text = "Screwdriver";
|
||||||
break;
|
break;
|
||||||
case ConstructionStepTool.ToolType.Welder:
|
case ConstructionStepTool.ToolType.Welder:
|
||||||
icon = ResourceCache.GetResource<RSIResource>("/Textures/Objects/tools.rsi").RSI["welder"].Frame0;
|
icon = ResourceCache.GetResource<RSIResource>("/Textures/Objects/tools.rsi")
|
||||||
|
.RSI["welder"].Frame0;
|
||||||
text = $"Welding tool ({tool.Amount} fuel)";
|
text = $"Welding tool ({tool.Amount} fuel)";
|
||||||
break;
|
break;
|
||||||
case ConstructionStepTool.ToolType.Wirecutters:
|
case ConstructionStepTool.ToolType.Wirecutters:
|
||||||
icon = ResourceCache.GetResource<TextureResource>("/Textures/Objects/wirecutter.png");
|
icon = ResourceCache.GetResource<TextureResource>(
|
||||||
|
"/Textures/Objects/wirecutter.png");
|
||||||
text = "Wirecutters";
|
text = "Wirecutters";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw new NotImplementedException();
|
throw new NotImplementedException();
|
||||||
@@ -230,7 +227,7 @@ namespace Content.Client.Construction
|
|||||||
|
|
||||||
void OnBuildPressed(Button.ButtonEventArgs args)
|
void OnBuildPressed(Button.ButtonEventArgs args)
|
||||||
{
|
{
|
||||||
var prototype = (ConstructionPrototype)RecipeList.Selected.Metadata;
|
var prototype = (ConstructionPrototype) RecipeList.Selected.Metadata;
|
||||||
if (prototype == null)
|
if (prototype == null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
@@ -278,6 +275,7 @@ namespace Content.Client.Construction
|
|||||||
subNode = new CategoryNode(category, currentNode);
|
subNode = new CategoryNode(category, currentNode);
|
||||||
currentNode.ChildCategories.Add(category, subNode);
|
currentNode.ChildCategories.Add(category, subNode);
|
||||||
}
|
}
|
||||||
|
|
||||||
currentNode = subNode;
|
currentNode = subNode;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -356,6 +354,7 @@ namespace Content.Client.Construction
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
var subItem = RecipeList.CreateItem(ItemForNode(node));
|
var subItem = RecipeList.CreateItem(ItemForNode(node));
|
||||||
subItem.Text = prototype.Name;
|
subItem.Text = prototype.Name;
|
||||||
subItem.Metadata = prototype;
|
subItem.Metadata = prototype;
|
||||||
@@ -377,7 +376,10 @@ namespace Content.Client.Construction
|
|||||||
{
|
{
|
||||||
public readonly string Name;
|
public readonly string Name;
|
||||||
public readonly CategoryNode Parent;
|
public readonly CategoryNode Parent;
|
||||||
public SortedDictionary<string, CategoryNode> ChildCategories = new SortedDictionary<string, CategoryNode>();
|
|
||||||
|
public SortedDictionary<string, CategoryNode>
|
||||||
|
ChildCategories = new SortedDictionary<string, CategoryNode>();
|
||||||
|
|
||||||
public List<ConstructionPrototype> Prototypes = new List<ConstructionPrototype>();
|
public List<ConstructionPrototype> Prototypes = new List<ConstructionPrototype>();
|
||||||
public int FlattenedIndex = -1;
|
public int FlattenedIndex = -1;
|
||||||
|
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ using Content.Client.UserInterface;
|
|||||||
using Content.Shared.GameObjects.Components.Chemistry;
|
using Content.Shared.GameObjects.Components.Chemistry;
|
||||||
using Content.Shared.GameObjects.Components.Markers;
|
using Content.Shared.GameObjects.Components.Markers;
|
||||||
using Content.Shared.GameObjects.Components.Research;
|
using Content.Shared.GameObjects.Components.Research;
|
||||||
|
using Content.Shared.GameObjects.Components.VendingMachines;
|
||||||
using Content.Shared.Interfaces;
|
using Content.Shared.Interfaces;
|
||||||
using Robust.Client;
|
|
||||||
using Robust.Client.Interfaces;
|
using Robust.Client.Interfaces;
|
||||||
using Robust.Client.Interfaces.Graphics.Overlays;
|
using Robust.Client.Interfaces.Graphics.Overlays;
|
||||||
using Robust.Client.Interfaces.Input;
|
using Robust.Client.Interfaces.Input;
|
||||||
@@ -42,6 +42,7 @@ namespace Content.Client
|
|||||||
|
|
||||||
var registerIgnore = new[]
|
var registerIgnore = new[]
|
||||||
{
|
{
|
||||||
|
"Breakable",
|
||||||
"Interactable",
|
"Interactable",
|
||||||
"Destructible",
|
"Destructible",
|
||||||
"Temperature",
|
"Temperature",
|
||||||
@@ -94,6 +95,7 @@ namespace Content.Client
|
|||||||
"PowerCell",
|
"PowerCell",
|
||||||
"AiController",
|
"AiController",
|
||||||
"PlayerInputMover",
|
"PlayerInputMover",
|
||||||
|
"Computer"
|
||||||
};
|
};
|
||||||
|
|
||||||
foreach (var ignoreName in registerIgnore)
|
foreach (var ignoreName in registerIgnore)
|
||||||
@@ -105,6 +107,8 @@ namespace Content.Client
|
|||||||
factory.Register<SharedSpawnPointComponent>();
|
factory.Register<SharedSpawnPointComponent>();
|
||||||
factory.Register<SolutionComponent>();
|
factory.Register<SolutionComponent>();
|
||||||
|
|
||||||
|
factory.Register<SharedVendingMachineComponent>();
|
||||||
|
|
||||||
prototypes.RegisterIgnore("material");
|
prototypes.RegisterIgnore("material");
|
||||||
|
|
||||||
IoCManager.Register<IGameHud, GameHud>();
|
IoCManager.Register<IGameHud, GameHud>();
|
||||||
|
|||||||
@@ -0,0 +1,76 @@
|
|||||||
|
using Content.Shared.GameObjects.Components;
|
||||||
|
using Robust.Client.GameObjects;
|
||||||
|
using Robust.Client.Interfaces.GameObjects.Components;
|
||||||
|
using Robust.Shared.Interfaces.GameObjects;
|
||||||
|
using Robust.Shared.Utility;
|
||||||
|
using YamlDotNet.RepresentationModel;
|
||||||
|
|
||||||
|
namespace Content.Client.GameObjects.Components
|
||||||
|
{
|
||||||
|
public sealed class ComputerVisualizer2D : AppearanceVisualizer
|
||||||
|
{
|
||||||
|
private string KeyboardState = "generic_key";
|
||||||
|
private string ScreenState = "generic";
|
||||||
|
|
||||||
|
public override void LoadData(YamlMappingNode node)
|
||||||
|
{
|
||||||
|
base.LoadData(node);
|
||||||
|
|
||||||
|
if (node.TryGetNode("key", out var scalar))
|
||||||
|
{
|
||||||
|
KeyboardState = scalar.AsString();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (node.TryGetNode("screen", out scalar))
|
||||||
|
{
|
||||||
|
ScreenState = scalar.AsString();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void InitializeEntity(IEntity entity)
|
||||||
|
{
|
||||||
|
base.InitializeEntity(entity);
|
||||||
|
|
||||||
|
var sprite = entity.GetComponent<ISpriteComponent>();
|
||||||
|
sprite.LayerSetState(Layers.Screen, ScreenState);
|
||||||
|
sprite.LayerSetState(Layers.Keyboard, $"{KeyboardState}_off");
|
||||||
|
sprite.LayerSetState(Layers.KeyboardOn, KeyboardState);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void OnChangeData(AppearanceComponent component)
|
||||||
|
{
|
||||||
|
base.OnChangeData(component);
|
||||||
|
|
||||||
|
var sprite = component.Owner.GetComponent<ISpriteComponent>();
|
||||||
|
|
||||||
|
if (!component.TryGetData(ComputerVisuals.Powered, out bool powered))
|
||||||
|
{
|
||||||
|
powered = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
component.TryGetData(ComputerVisuals.Broken, out bool broken);
|
||||||
|
|
||||||
|
if (broken)
|
||||||
|
{
|
||||||
|
sprite.LayerSetState(Layers.Body, "broken");
|
||||||
|
sprite.LayerSetState(Layers.Screen, "computer_broken");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
sprite.LayerSetState(Layers.Body, "computer");
|
||||||
|
sprite.LayerSetState(Layers.Screen, ScreenState);
|
||||||
|
}
|
||||||
|
|
||||||
|
sprite.LayerSetVisible(Layers.Screen, powered);
|
||||||
|
sprite.LayerSetVisible(Layers.KeyboardOn, powered);
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum Layers
|
||||||
|
{
|
||||||
|
Body,
|
||||||
|
Screen,
|
||||||
|
Keyboard,
|
||||||
|
KeyboardOn
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -43,7 +43,7 @@ namespace Content.Client.GameObjects
|
|||||||
base.Initialize();
|
base.Initialize();
|
||||||
|
|
||||||
_window = new HumanInventoryWindow(_loc, _resourceCache);
|
_window = new HumanInventoryWindow(_loc, _resourceCache);
|
||||||
|
_window.OnClose += () => GameHud.InventoryButtonDown = false;
|
||||||
foreach (var (slot, button) in _window.Buttons)
|
foreach (var (slot, button) in _window.Buttons)
|
||||||
{
|
{
|
||||||
button.OnPressed = AddToInventory;
|
button.OnPressed = AddToInventory;
|
||||||
@@ -185,7 +185,7 @@ namespace Content.Client.GameObjects
|
|||||||
|
|
||||||
// Right column
|
// Right column
|
||||||
AddButton(Slots.EARS, "ears", (2 * (size + sep), 0));
|
AddButton(Slots.EARS, "ears", (2 * (size + sep), 0));
|
||||||
AddButton(Slots.IDCARD, "mask", (2 * (size + sep), size + sep));
|
AddButton(Slots.IDCARD, "id", (2 * (size + sep), size + sep));
|
||||||
AddButton(Slots.GLOVES, "gloves", (2 * (size + sep), 2 * (size + sep)));
|
AddButton(Slots.GLOVES, "gloves", (2 * (size + sep), 2 * (size + sep)));
|
||||||
|
|
||||||
// Far right column.
|
// Far right column.
|
||||||
|
|||||||
@@ -1,18 +1,13 @@
|
|||||||
using System;
|
using System;
|
||||||
using Content.Client.UserInterface;
|
using Content.Client.UserInterface;
|
||||||
using Content.Shared.GameObjects.Components.Power;
|
using Content.Shared.GameObjects.Components.Power;
|
||||||
using NJsonSchema.Validation;
|
|
||||||
using OpenTK.Graphics.OpenGL4;
|
|
||||||
using Robust.Client.GameObjects.Components.UserInterface;
|
using Robust.Client.GameObjects.Components.UserInterface;
|
||||||
using Robust.Client.Graphics.Drawing;
|
using Robust.Client.Graphics.Drawing;
|
||||||
using Robust.Client.Interfaces.Graphics;
|
|
||||||
using Robust.Client.UserInterface;
|
using Robust.Client.UserInterface;
|
||||||
using Robust.Client.UserInterface.Controls;
|
using Robust.Client.UserInterface.Controls;
|
||||||
using Robust.Client.UserInterface.CustomControls;
|
using Robust.Client.UserInterface.CustomControls;
|
||||||
using Robust.Shared.GameObjects.Components.UserInterface;
|
using Robust.Shared.GameObjects.Components.UserInterface;
|
||||||
using Robust.Shared.IoC;
|
|
||||||
using Robust.Shared.Maths;
|
using Robust.Shared.Maths;
|
||||||
using Robust.Shared.Utility;
|
|
||||||
|
|
||||||
namespace Content.Client.GameObjects.Components.Power
|
namespace Content.Client.GameObjects.Components.Power
|
||||||
{
|
{
|
||||||
@@ -72,34 +67,34 @@ namespace Content.Client.GameObjects.Components.Power
|
|||||||
|
|
||||||
_chargeBar.Value = castState.Charge;
|
_chargeBar.Value = castState.Charge;
|
||||||
UpdateChargeBarColor(castState.Charge);
|
UpdateChargeBarColor(castState.Charge);
|
||||||
float ChargePercentage = (castState.Charge / _chargeBar.MaxValue) * 100.0f;
|
var chargePercentage = (castState.Charge / _chargeBar.MaxValue) * 100.0f;
|
||||||
_window.ChargePercentage.Text = " " + ChargePercentage.ToString("0.00") + "%";
|
_window.ChargePercentage.Text = " " + chargePercentage.ToString("0.00") + "%";
|
||||||
}
|
}
|
||||||
|
|
||||||
private void UpdateChargeBarColor(float charge)
|
private void UpdateChargeBarColor(float charge)
|
||||||
{
|
{
|
||||||
float normalizedCharge = charge / _chargeBar.MaxValue;
|
var normalizedCharge = charge / _chargeBar.MaxValue;
|
||||||
|
|
||||||
float leftHue = 0.0f;// Red
|
const float leftHue = 0.0f; // Red
|
||||||
float middleHue = 0.066f;// Orange
|
const float middleHue = 0.066f; // Orange
|
||||||
float rightHue = 0.33f;// Green
|
const float rightHue = 0.33f; // Green
|
||||||
float saturation = 1.0f;// Uniform saturation
|
const float saturation = 1.0f; // Uniform saturation
|
||||||
float value = 0.8f;// Uniform value / brightness
|
const float value = 0.8f; // Uniform value / brightness
|
||||||
float alpha = 1.0f;// Uniform alpha
|
const float alpha = 1.0f; // Uniform alpha
|
||||||
|
|
||||||
// These should add up to 1.0 or your transition won't be smooth
|
// These should add up to 1.0 or your transition won't be smooth
|
||||||
float leftSideSize = 0.5f;// Fraction of _chargeBar lerped from leftHue to middleHue
|
const float leftSideSize = 0.5f; // Fraction of _chargeBar lerped from leftHue to middleHue
|
||||||
float rightSideSize = 0.5f;// Fraction of _chargeBar lerped from middleHue to rightHue
|
const float rightSideSize = 0.5f; // Fraction of _chargeBar lerped from middleHue to rightHue
|
||||||
|
|
||||||
float finalHue;
|
float finalHue;
|
||||||
if (normalizedCharge <= leftSideSize)
|
if (normalizedCharge <= leftSideSize)
|
||||||
{
|
{
|
||||||
normalizedCharge /= leftSideSize;// Adjust range to 0.0 to 1.0
|
normalizedCharge /= leftSideSize; // Adjust range to 0.0 to 1.0
|
||||||
finalHue = FloatMath.Lerp(leftHue, middleHue, normalizedCharge);
|
finalHue = FloatMath.Lerp(leftHue, middleHue, normalizedCharge);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
normalizedCharge = (normalizedCharge - leftSideSize) / rightSideSize;// Adjust range to 0.0 to 1.0.
|
normalizedCharge = (normalizedCharge - leftSideSize) / rightSideSize; // Adjust range to 0.0 to 1.0.
|
||||||
finalHue = FloatMath.Lerp(middleHue, rightHue, normalizedCharge);
|
finalHue = FloatMath.Lerp(middleHue, rightHue, normalizedCharge);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -109,7 +104,7 @@ namespace Content.Client.GameObjects.Components.Power
|
|||||||
_chargeBar.ForegroundStyleBoxOverride = new StyleBoxFlat();
|
_chargeBar.ForegroundStyleBoxOverride = new StyleBoxFlat();
|
||||||
}
|
}
|
||||||
|
|
||||||
var foregroundStyleBoxOverride = (StyleBoxFlat)_chargeBar.ForegroundStyleBoxOverride;
|
var foregroundStyleBoxOverride = (StyleBoxFlat) _chargeBar.ForegroundStyleBoxOverride;
|
||||||
foregroundStyleBoxOverride.BackgroundColor =
|
foregroundStyleBoxOverride.BackgroundColor =
|
||||||
Color.FromHsv(new Vector4(finalHue, saturation, value, alpha));
|
Color.FromHsv(new Vector4(finalHue, saturation, value, alpha));
|
||||||
}
|
}
|
||||||
@@ -134,29 +129,29 @@ namespace Content.Client.GameObjects.Components.Power
|
|||||||
public ApcWindow()
|
public ApcWindow()
|
||||||
{
|
{
|
||||||
Title = "APC";
|
Title = "APC";
|
||||||
var rows = new VBoxContainer("Rows");
|
var rows = new VBoxContainer();
|
||||||
|
|
||||||
var statusHeader = new Label("StatusHeader") { Text = "Power Status: " };
|
var statusHeader = new Label {Text = "Power Status: "};
|
||||||
rows.AddChild(statusHeader);
|
rows.AddChild(statusHeader);
|
||||||
|
|
||||||
var breaker = new HBoxContainer("Breaker");
|
var breaker = new HBoxContainer();
|
||||||
var breakerLabel = new Label("Label") { Text = "Main Breaker: " };
|
var breakerLabel = new Label {Text = "Main Breaker: "};
|
||||||
BreakerButton = new CheckButton {Name = "Breaker", Text = "Toggle"};
|
BreakerButton = new CheckButton {Text = "Toggle"};
|
||||||
breaker.AddChild(breakerLabel);
|
breaker.AddChild(breakerLabel);
|
||||||
breaker.AddChild(BreakerButton);
|
breaker.AddChild(BreakerButton);
|
||||||
rows.AddChild(breaker);
|
rows.AddChild(breaker);
|
||||||
|
|
||||||
var externalStatus = new HBoxContainer("ExternalStatus");
|
var externalStatus = new HBoxContainer();
|
||||||
var externalStatusLabel = new Label("Label") { Text = "External Power: " };
|
var externalStatusLabel = new Label {Text = "External Power: "};
|
||||||
ExternalPowerStateLabel = new Label("Status") { Text = "Good" };
|
ExternalPowerStateLabel = new Label {Text = "Good"};
|
||||||
ExternalPowerStateLabel.SetOnlyStyleClass(NanoStyle.StyleClassPowerStateGood);
|
ExternalPowerStateLabel.SetOnlyStyleClass(NanoStyle.StyleClassPowerStateGood);
|
||||||
externalStatus.AddChild(externalStatusLabel);
|
externalStatus.AddChild(externalStatusLabel);
|
||||||
externalStatus.AddChild(ExternalPowerStateLabel);
|
externalStatus.AddChild(ExternalPowerStateLabel);
|
||||||
rows.AddChild(externalStatus);
|
rows.AddChild(externalStatus);
|
||||||
|
|
||||||
var charge = new HBoxContainer("Charge");
|
var charge = new HBoxContainer();
|
||||||
var chargeLabel = new Label("Label") { Text = "Charge:" };
|
var chargeLabel = new Label {Text = "Charge:"};
|
||||||
ChargeBar = new ProgressBar("Charge")
|
ChargeBar = new ProgressBar
|
||||||
{
|
{
|
||||||
SizeFlagsHorizontal = Control.SizeFlags.FillExpand,
|
SizeFlagsHorizontal = Control.SizeFlags.FillExpand,
|
||||||
MinValue = 0.0f,
|
MinValue = 0.0f,
|
||||||
@@ -164,7 +159,7 @@ namespace Content.Client.GameObjects.Components.Power
|
|||||||
Page = 0.0f,
|
Page = 0.0f,
|
||||||
Value = 0.5f
|
Value = 0.5f
|
||||||
};
|
};
|
||||||
ChargePercentage = new Label("ChargePercentage");
|
ChargePercentage = new Label();
|
||||||
charge.AddChild(chargeLabel);
|
charge.AddChild(chargeLabel);
|
||||||
charge.AddChild(ChargeBar);
|
charge.AddChild(ChargeBar);
|
||||||
charge.AddChild(ChargePercentage);
|
charge.AddChild(ChargePercentage);
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ namespace Content.Client.GameObjects.Components.Storage
|
|||||||
base.OnAdd();
|
base.OnAdd();
|
||||||
|
|
||||||
Window = new StorageWindow()
|
Window = new StorageWindow()
|
||||||
{ StorageEntity = this};
|
{StorageEntity = this};
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void OnRemove()
|
public override void OnRemove()
|
||||||
@@ -44,7 +44,8 @@ namespace Content.Client.GameObjects.Components.Storage
|
|||||||
base.ExposeData(serializer);
|
base.ExposeData(serializer);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void HandleMessage(ComponentMessage message, INetChannel netChannel = null, IComponent component = null)
|
public override void HandleMessage(ComponentMessage message, INetChannel netChannel = null,
|
||||||
|
IComponent component = null)
|
||||||
{
|
{
|
||||||
switch (message)
|
switch (message)
|
||||||
{
|
{
|
||||||
@@ -108,32 +109,27 @@ namespace Content.Client.GameObjects.Components.Storage
|
|||||||
|
|
||||||
public StorageWindow()
|
public StorageWindow()
|
||||||
{
|
{
|
||||||
Size = new Vector2(180.0f, 320.0f);
|
Size = (180, 320);
|
||||||
}
|
|
||||||
|
|
||||||
protected override void Initialize()
|
|
||||||
{
|
|
||||||
base.Initialize();
|
|
||||||
|
|
||||||
Title = "Storage Item";
|
Title = "Storage Item";
|
||||||
RectClipContent = true;
|
RectClipContent = true;
|
||||||
|
|
||||||
VSplitContainer = new VBoxContainer("VSplitContainer");
|
VSplitContainer = new VBoxContainer();
|
||||||
Information = new Label("Information")
|
Information = new Label
|
||||||
{
|
{
|
||||||
Text = "Items: 0 Volume: 0/0 Stuff",
|
Text = "Items: 0 Volume: 0/0 Stuff",
|
||||||
SizeFlagsVertical = SizeFlags.ShrinkCenter
|
SizeFlagsVertical = SizeFlags.ShrinkCenter
|
||||||
};
|
};
|
||||||
VSplitContainer.AddChild(Information);
|
VSplitContainer.AddChild(Information);
|
||||||
|
|
||||||
var listScrollContainer = new ScrollContainer("ListScrollContainer")
|
var listScrollContainer = new ScrollContainer
|
||||||
{
|
{
|
||||||
SizeFlagsVertical = SizeFlags.FillExpand,
|
SizeFlagsVertical = SizeFlags.FillExpand,
|
||||||
SizeFlagsHorizontal = SizeFlags.FillExpand,
|
SizeFlagsHorizontal = SizeFlags.FillExpand,
|
||||||
HScrollEnabled = true,
|
HScrollEnabled = true,
|
||||||
VScrollEnabled = true
|
VScrollEnabled = true
|
||||||
};
|
};
|
||||||
EntityList = new VBoxContainer("EntityList")
|
EntityList = new VBoxContainer
|
||||||
{
|
{
|
||||||
SizeFlagsHorizontal = SizeFlags.FillExpand
|
SizeFlagsHorizontal = SizeFlags.FillExpand
|
||||||
};
|
};
|
||||||
@@ -182,7 +178,8 @@ namespace Content.Client.GameObjects.Components.Storage
|
|||||||
//Sets information about entire storage container current capacity
|
//Sets information about entire storage container current capacity
|
||||||
if (StorageEntity.StorageCapacityMax != 0)
|
if (StorageEntity.StorageCapacityMax != 0)
|
||||||
{
|
{
|
||||||
Information.Text = String.Format("Items: {0}, Stored: {1}/{2}", storagelist.Count, StorageEntity.StorageSizeUsed, StorageEntity.StorageCapacityMax);
|
Information.Text = String.Format("Items: {0}, Stored: {1}/{2}", storagelist.Count,
|
||||||
|
StorageEntity.StorageSizeUsed, StorageEntity.StorageCapacityMax);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -196,7 +193,7 @@ namespace Content.Client.GameObjects.Components.Storage
|
|||||||
/// <param name="args"></param>
|
/// <param name="args"></param>
|
||||||
private void OnItemButtonToggled(BaseButton.ButtonToggledEventArgs args)
|
private void OnItemButtonToggled(BaseButton.ButtonToggledEventArgs args)
|
||||||
{
|
{
|
||||||
var control = (EntityButton)args.Button.Parent;
|
var control = (EntityButton) args.Button.Parent;
|
||||||
args.Button.Pressed = false;
|
args.Button.Pressed = false;
|
||||||
StorageEntity.Interact(control.EntityuID);
|
StorageEntity.Interact(control.EntityuID);
|
||||||
}
|
}
|
||||||
@@ -208,17 +205,15 @@ namespace Content.Client.GameObjects.Components.Storage
|
|||||||
private class EntityButton : PanelContainer
|
private class EntityButton : PanelContainer
|
||||||
{
|
{
|
||||||
public EntityUid EntityuID { get; set; }
|
public EntityUid EntityuID { get; set; }
|
||||||
public Button ActualButton { get; private set; }
|
public Button ActualButton { get; }
|
||||||
public SpriteView EntitySpriteView { get; private set; }
|
public SpriteView EntitySpriteView { get; }
|
||||||
public Control EntityControl { get; private set; }
|
public Control EntityControl { get; }
|
||||||
public Label EntityName { get; private set; }
|
public Label EntityName { get; }
|
||||||
public Label EntitySize { get; private set; }
|
public Label EntitySize { get; }
|
||||||
|
|
||||||
protected override void Initialize()
|
public EntityButton()
|
||||||
{
|
{
|
||||||
base.Initialize();
|
ActualButton = new Button
|
||||||
|
|
||||||
ActualButton = new Button("Button")
|
|
||||||
{
|
{
|
||||||
SizeFlagsHorizontal = SizeFlags.FillExpand,
|
SizeFlagsHorizontal = SizeFlags.FillExpand,
|
||||||
SizeFlagsVertical = SizeFlags.FillExpand,
|
SizeFlagsVertical = SizeFlags.FillExpand,
|
||||||
@@ -227,12 +222,12 @@ namespace Content.Client.GameObjects.Components.Storage
|
|||||||
};
|
};
|
||||||
AddChild(ActualButton);
|
AddChild(ActualButton);
|
||||||
|
|
||||||
var hBoxContainer = new HBoxContainer("HBoxContainer") {MouseFilter = MouseFilterMode.Ignore};
|
var hBoxContainer = new HBoxContainer {MouseFilter = MouseFilterMode.Ignore};
|
||||||
EntitySpriteView = new SpriteView("SpriteView")
|
EntitySpriteView = new SpriteView
|
||||||
{
|
{
|
||||||
CustomMinimumSize = new Vector2(32.0f, 32.0f), MouseFilter = MouseFilterMode.Ignore
|
CustomMinimumSize = new Vector2(32.0f, 32.0f), MouseFilter = MouseFilterMode.Ignore
|
||||||
};
|
};
|
||||||
EntityName = new Label("Name")
|
EntityName = new Label
|
||||||
{
|
{
|
||||||
SizeFlagsVertical = SizeFlags.ShrinkCenter,
|
SizeFlagsVertical = SizeFlags.ShrinkCenter,
|
||||||
Text = "Backpack",
|
Text = "Backpack",
|
||||||
@@ -241,11 +236,11 @@ namespace Content.Client.GameObjects.Components.Storage
|
|||||||
hBoxContainer.AddChild(EntitySpriteView);
|
hBoxContainer.AddChild(EntitySpriteView);
|
||||||
hBoxContainer.AddChild(EntityName);
|
hBoxContainer.AddChild(EntityName);
|
||||||
|
|
||||||
EntityControl = new Control("Control")
|
EntityControl = new Control
|
||||||
{
|
{
|
||||||
SizeFlagsHorizontal = SizeFlags.FillExpand, MouseFilter = MouseFilterMode.Ignore
|
SizeFlagsHorizontal = SizeFlags.FillExpand, MouseFilter = MouseFilterMode.Ignore
|
||||||
};
|
};
|
||||||
EntitySize = new Label("Size")
|
EntitySize = new Label
|
||||||
{
|
{
|
||||||
SizeFlagsVertical = SizeFlags.ShrinkCenter,
|
SizeFlagsVertical = SizeFlags.ShrinkCenter,
|
||||||
Text = "Size 6",
|
Text = "Size 6",
|
||||||
|
|||||||
@@ -0,0 +1,68 @@
|
|||||||
|
using Content.Client.VendingMachines;
|
||||||
|
using Content.Shared.GameObjects.Components.VendingMachines;
|
||||||
|
using Robust.Client.GameObjects.Components.UserInterface;
|
||||||
|
using Robust.Shared.GameObjects.Components.UserInterface;
|
||||||
|
using Robust.Shared.IoC;
|
||||||
|
using Robust.Shared.Prototypes;
|
||||||
|
using Robust.Shared.ViewVariables;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace Content.Client.GameObjects.Components.VendingMachines
|
||||||
|
{
|
||||||
|
class VendingMachineBoundUserInterface : BoundUserInterface
|
||||||
|
{
|
||||||
|
[ViewVariables]
|
||||||
|
private VendingMachineMenu _menu;
|
||||||
|
|
||||||
|
public SharedVendingMachineComponent VendingMachine { get; private set; }
|
||||||
|
|
||||||
|
public VendingMachineBoundUserInterface(ClientUserInterfaceComponent owner, object uiKey) : base(owner, uiKey)
|
||||||
|
{
|
||||||
|
SendMessage(new SharedVendingMachineComponent.InventorySyncRequestMessage());
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void Open()
|
||||||
|
{
|
||||||
|
base.Open();
|
||||||
|
|
||||||
|
if(!Owner.Owner.TryGetComponent(out SharedVendingMachineComponent vendingMachine))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
VendingMachine = vendingMachine;
|
||||||
|
|
||||||
|
_menu = new VendingMachineMenu() { Owner = this, Title = Owner.Owner.Name };
|
||||||
|
_menu.Populate(VendingMachine.Inventory);
|
||||||
|
|
||||||
|
_menu.OnClose += Close;
|
||||||
|
_menu.OpenCentered();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Eject(string ID)
|
||||||
|
{
|
||||||
|
SendMessage(new SharedVendingMachineComponent.VendingMachineEjectMessage(ID));
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void ReceiveMessage(BoundUserInterfaceMessage message)
|
||||||
|
{
|
||||||
|
switch(message)
|
||||||
|
{
|
||||||
|
case SharedVendingMachineComponent.VendingMachineInventoryMessage msg:
|
||||||
|
_menu.Populate(msg.Inventory);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void Dispose(bool disposing)
|
||||||
|
{
|
||||||
|
base.Dispose(disposing);
|
||||||
|
if(!disposing) { return; }
|
||||||
|
_menu?.Dispose();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,99 @@
|
|||||||
|
using System;
|
||||||
|
using Content.Client.GameObjects.Components.Doors;
|
||||||
|
using Robust.Client.Animations;
|
||||||
|
using Robust.Client.GameObjects;
|
||||||
|
using Robust.Client.GameObjects.Components.Animations;
|
||||||
|
using Robust.Client.Interfaces.GameObjects.Components;
|
||||||
|
using Robust.Shared.Interfaces.GameObjects;
|
||||||
|
using YamlDotNet.RepresentationModel;
|
||||||
|
using static Content.Shared.GameObjects.Components.VendingMachines.SharedVendingMachineComponent;
|
||||||
|
|
||||||
|
namespace Content.Client.GameObjects.Components.VendingMachines
|
||||||
|
{
|
||||||
|
public class VendingMachineVisualizer2D : AppearanceVisualizer
|
||||||
|
{
|
||||||
|
// TODO: The length of these animations is supposed to be dictated
|
||||||
|
// by the vending machine's pack prototype's `AnimationDuration`
|
||||||
|
// but we have no good way of passing that data from the server
|
||||||
|
// to the client at the moment. Rework Visualizers?
|
||||||
|
private const string DeniedAnimationKey = "deny";
|
||||||
|
private const string EjectAnimationKey = "eject";
|
||||||
|
|
||||||
|
private Animation _deniedAnimation;
|
||||||
|
private Animation _ejectAnimation;
|
||||||
|
|
||||||
|
public override void LoadData(YamlMappingNode node)
|
||||||
|
{
|
||||||
|
base.LoadData(node);
|
||||||
|
_deniedAnimation = new Animation {Length = TimeSpan.FromSeconds(1.2f)};
|
||||||
|
{
|
||||||
|
var flick = new AnimationTrackSpriteFlick();
|
||||||
|
_deniedAnimation.AnimationTracks.Add(flick);
|
||||||
|
flick.LayerKey = VendingMachineVisualLayers.Base;
|
||||||
|
flick.KeyFrames.Add(new AnimationTrackSpriteFlick.KeyFrame("deny", 0f));
|
||||||
|
}
|
||||||
|
|
||||||
|
_ejectAnimation = new Animation {Length = TimeSpan.FromSeconds(1.2f)};
|
||||||
|
{
|
||||||
|
var flick = new AnimationTrackSpriteFlick();
|
||||||
|
_ejectAnimation.AnimationTracks.Add(flick);
|
||||||
|
flick.LayerKey = VendingMachineVisualLayers.Base;
|
||||||
|
flick.KeyFrames.Add(new AnimationTrackSpriteFlick.KeyFrame("eject", 0f));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void InitializeEntity(IEntity entity)
|
||||||
|
{
|
||||||
|
base.InitializeEntity(entity);
|
||||||
|
|
||||||
|
if (!entity.HasComponent<AnimationPlayerComponent>())
|
||||||
|
{
|
||||||
|
entity.AddComponent<AnimationPlayerComponent>();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void OnChangeData(AppearanceComponent component)
|
||||||
|
{
|
||||||
|
var sprite = component.Owner.GetComponent<ISpriteComponent>();
|
||||||
|
var animPlayer = component.Owner.GetComponent<AnimationPlayerComponent>();
|
||||||
|
if (!component.TryGetData(VendingMachineVisuals.VisualState, out VendingMachineVisualState state))
|
||||||
|
{
|
||||||
|
state = VendingMachineVisualState.Normal;
|
||||||
|
}
|
||||||
|
|
||||||
|
switch (state)
|
||||||
|
{
|
||||||
|
case VendingMachineVisualState.Normal:
|
||||||
|
sprite.LayerSetState(VendingMachineVisualLayers.Base, "normal");
|
||||||
|
break;
|
||||||
|
case VendingMachineVisualState.Off:
|
||||||
|
sprite.LayerSetState(VendingMachineVisualLayers.Base, "off");
|
||||||
|
break;
|
||||||
|
case VendingMachineVisualState.Broken:
|
||||||
|
sprite.LayerSetState(VendingMachineVisualLayers.Base, "broken");
|
||||||
|
break;
|
||||||
|
case VendingMachineVisualState.Deny:
|
||||||
|
if (!animPlayer.HasRunningAnimation(DeniedAnimationKey))
|
||||||
|
{
|
||||||
|
animPlayer.Play(_deniedAnimation, DeniedAnimationKey);
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
case VendingMachineVisualState.Eject:
|
||||||
|
if (!animPlayer.HasRunningAnimation(EjectAnimationKey))
|
||||||
|
{
|
||||||
|
animPlayer.Play(_ejectAnimation, EjectAnimationKey);
|
||||||
|
}
|
||||||
|
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
throw new ArgumentOutOfRangeException();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum VendingMachineVisualLayers
|
||||||
|
{
|
||||||
|
Base,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
|
||||||
using Content.Shared.GameObjects;
|
using Content.Shared.GameObjects;
|
||||||
using Content.Shared.GameObjects.EntitySystemMessages;
|
using Content.Shared.GameObjects.EntitySystemMessages;
|
||||||
using Content.Shared.Input;
|
using Content.Shared.Input;
|
||||||
@@ -66,7 +65,7 @@ namespace Content.Client.GameObjects.EntitySystems
|
|||||||
_currentPopup = new Popup();
|
_currentPopup = new Popup();
|
||||||
_currentPopup.UserInterfaceManager.StateRoot.AddChild(_currentPopup);
|
_currentPopup.UserInterfaceManager.StateRoot.AddChild(_currentPopup);
|
||||||
_currentPopup.OnPopupHide += _closeContextMenu;
|
_currentPopup.OnPopupHide += _closeContextMenu;
|
||||||
var vBox = new VBoxContainer("ButtonBox");
|
var vBox = new VBoxContainer();
|
||||||
_currentPopup.AddChild(vBox);
|
_currentPopup.AddChild(vBox);
|
||||||
|
|
||||||
vBox.AddChild(new Label {Text = "Waiting on Server..."});
|
vBox.AddChild(new Label {Text = "Waiting on Server..."});
|
||||||
@@ -94,7 +93,7 @@ namespace Content.Client.GameObjects.EntitySystems
|
|||||||
|
|
||||||
_currentPopup = new Popup();
|
_currentPopup = new Popup();
|
||||||
_currentPopup.OnPopupHide += _closeContextMenu;
|
_currentPopup.OnPopupHide += _closeContextMenu;
|
||||||
var vBox = new VBoxContainer("ButtonBox");
|
var vBox = new VBoxContainer();
|
||||||
_currentPopup.AddChild(vBox);
|
_currentPopup.AddChild(vBox);
|
||||||
foreach (var entity in entities)
|
foreach (var entity in entities)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -2,8 +2,6 @@ using System.Collections.Generic;
|
|||||||
using Content.Client.GameObjects.Components.Research;
|
using Content.Client.GameObjects.Components.Research;
|
||||||
using Content.Shared.Materials;
|
using Content.Shared.Materials;
|
||||||
using Content.Shared.Research;
|
using Content.Shared.Research;
|
||||||
using Robust.Client.Interfaces.Graphics;
|
|
||||||
using Robust.Client.Interfaces.ResourceManagement;
|
|
||||||
using Robust.Client.UserInterface;
|
using Robust.Client.UserInterface;
|
||||||
using Robust.Client.UserInterface.Controls;
|
using Robust.Client.UserInterface.Controls;
|
||||||
using Robust.Client.UserInterface.CustomControls;
|
using Robust.Client.UserInterface.CustomControls;
|
||||||
@@ -19,8 +17,7 @@ namespace Content.Client.Research
|
|||||||
public class LatheMenu : SS14Window
|
public class LatheMenu : SS14Window
|
||||||
{
|
{
|
||||||
#pragma warning disable CS0649
|
#pragma warning disable CS0649
|
||||||
[Dependency]
|
[Dependency] private IPrototypeManager PrototypeManager;
|
||||||
private IPrototypeManager PrototypeManager;
|
|
||||||
#pragma warning restore
|
#pragma warning restore
|
||||||
|
|
||||||
private ItemList Items;
|
private ItemList Items;
|
||||||
@@ -37,15 +34,6 @@ namespace Content.Client.Research
|
|||||||
|
|
||||||
public LatheMenu()
|
public LatheMenu()
|
||||||
{
|
{
|
||||||
}
|
|
||||||
|
|
||||||
public LatheMenu(string name) : base(name)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void Initialize()
|
|
||||||
{
|
|
||||||
base.Initialize();
|
|
||||||
IoCManager.InjectDependencies(this);
|
IoCManager.InjectDependencies(this);
|
||||||
|
|
||||||
Title = "Lathe Menu";
|
Title = "Lathe Menu";
|
||||||
@@ -62,15 +50,15 @@ namespace Content.Client.Research
|
|||||||
|
|
||||||
margin.SetAnchorAndMarginPreset(LayoutPreset.Wide);
|
margin.SetAnchorAndMarginPreset(LayoutPreset.Wide);
|
||||||
|
|
||||||
var vbox = new VBoxContainer()
|
var vBox = new VBoxContainer()
|
||||||
{
|
{
|
||||||
SizeFlagsVertical = SizeFlags.FillExpand,
|
SizeFlagsVertical = SizeFlags.FillExpand,
|
||||||
SeparationOverride = 5,
|
SeparationOverride = 5,
|
||||||
};
|
};
|
||||||
|
|
||||||
vbox.SetAnchorAndMarginPreset(LayoutPreset.Wide);
|
vBox.SetAnchorAndMarginPreset(LayoutPreset.Wide);
|
||||||
|
|
||||||
var hboxButtons = new HBoxContainer()
|
var hBoxButtons = new HBoxContainer()
|
||||||
{
|
{
|
||||||
SizeFlagsHorizontal = SizeFlags.FillExpand,
|
SizeFlagsHorizontal = SizeFlags.FillExpand,
|
||||||
SizeFlagsVertical = SizeFlags.FillExpand,
|
SizeFlagsVertical = SizeFlags.FillExpand,
|
||||||
@@ -93,7 +81,7 @@ namespace Content.Client.Research
|
|||||||
|
|
||||||
spacer.SetAnchorAndMarginPreset(LayoutPreset.Wide);
|
spacer.SetAnchorAndMarginPreset(LayoutPreset.Wide);
|
||||||
|
|
||||||
var hboxFilter = new HBoxContainer()
|
var hBoxFilter = new HBoxContainer()
|
||||||
{
|
{
|
||||||
SizeFlagsHorizontal = SizeFlags.FillExpand,
|
SizeFlagsHorizontal = SizeFlags.FillExpand,
|
||||||
SizeFlagsVertical = SizeFlags.FillExpand,
|
SizeFlagsVertical = SizeFlags.FillExpand,
|
||||||
@@ -124,8 +112,6 @@ namespace Content.Client.Research
|
|||||||
SizeFlagsVertical = SizeFlags.FillExpand,
|
SizeFlagsVertical = SizeFlags.FillExpand,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Items.OnItemSelected += ItemSelected;
|
Items.OnItemSelected += ItemSelected;
|
||||||
|
|
||||||
AmountLineEdit = new LineEdit()
|
AmountLineEdit = new LineEdit()
|
||||||
@@ -143,19 +129,19 @@ namespace Content.Client.Research
|
|||||||
SizeFlagsStretchRatio = 3
|
SizeFlagsStretchRatio = 3
|
||||||
};
|
};
|
||||||
|
|
||||||
hboxButtons.AddChild(spacer);
|
hBoxButtons.AddChild(spacer);
|
||||||
hboxButtons.AddChild(QueueButton);
|
hBoxButtons.AddChild(QueueButton);
|
||||||
|
|
||||||
hboxFilter.AddChild(SearchBar);
|
hBoxFilter.AddChild(SearchBar);
|
||||||
hboxFilter.AddChild(filterButton);
|
hBoxFilter.AddChild(filterButton);
|
||||||
|
|
||||||
vbox.AddChild(hboxButtons);
|
vBox.AddChild(hBoxButtons);
|
||||||
vbox.AddChild(hboxFilter);
|
vBox.AddChild(hBoxFilter);
|
||||||
vbox.AddChild(Items);
|
vBox.AddChild(Items);
|
||||||
vbox.AddChild(AmountLineEdit);
|
vBox.AddChild(AmountLineEdit);
|
||||||
vbox.AddChild(Materials);
|
vBox.AddChild(Materials);
|
||||||
|
|
||||||
margin.AddChild(vbox);
|
margin.AddChild(vBox);
|
||||||
|
|
||||||
Contents.AddChild(margin);
|
Contents.AddChild(margin);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,13 +1,9 @@
|
|||||||
using Content.Client.GameObjects.Components.Research;
|
using Content.Client.GameObjects.Components.Research;
|
||||||
using Content.Shared.Research;
|
using Content.Shared.Research;
|
||||||
using Robust.Client.Graphics;
|
using Robust.Client.Graphics;
|
||||||
using Robust.Client.Graphics.Drawing;
|
|
||||||
using Robust.Client.Interfaces.Graphics;
|
|
||||||
using Robust.Client.UserInterface.Controls;
|
using Robust.Client.UserInterface.Controls;
|
||||||
using Robust.Client.UserInterface.CustomControls;
|
using Robust.Client.UserInterface.CustomControls;
|
||||||
using Robust.Client.Utility;
|
using Robust.Client.Utility;
|
||||||
using Robust.Shared.IoC;
|
|
||||||
using Robust.Shared.Log;
|
|
||||||
using Robust.Shared.Maths;
|
using Robust.Shared.Maths;
|
||||||
using Robust.Shared.ViewVariables;
|
using Robust.Shared.ViewVariables;
|
||||||
|
|
||||||
@@ -25,11 +21,9 @@ namespace Content.Client.Research
|
|||||||
private Label Description;
|
private Label Description;
|
||||||
private TextureRect Icon;
|
private TextureRect Icon;
|
||||||
|
|
||||||
protected override void Initialize()
|
public LatheQueueMenu()
|
||||||
{
|
{
|
||||||
base.Initialize();
|
Title = "Lathe Queue";
|
||||||
|
|
||||||
Title = "Lathe Queue";
|
|
||||||
|
|
||||||
var margin = new MarginContainer()
|
var margin = new MarginContainer()
|
||||||
{
|
{
|
||||||
@@ -41,9 +35,9 @@ namespace Content.Client.Research
|
|||||||
|
|
||||||
margin.SetAnchorAndMarginPreset(LayoutPreset.Wide);
|
margin.SetAnchorAndMarginPreset(LayoutPreset.Wide);
|
||||||
|
|
||||||
var vbox = new VBoxContainer();
|
var vBox = new VBoxContainer();
|
||||||
|
|
||||||
vbox.SetAnchorAndMarginPreset(LayoutPreset.Wide);
|
vBox.SetAnchorAndMarginPreset(LayoutPreset.Wide);
|
||||||
|
|
||||||
var descMargin = new MarginContainer()
|
var descMargin = new MarginContainer()
|
||||||
{
|
{
|
||||||
@@ -55,7 +49,7 @@ namespace Content.Client.Research
|
|||||||
SizeFlagsStretchRatio = 2,
|
SizeFlagsStretchRatio = 2,
|
||||||
};
|
};
|
||||||
|
|
||||||
var hbox = new HBoxContainer()
|
var hBox = new HBoxContainer()
|
||||||
{
|
{
|
||||||
SizeFlagsHorizontal = SizeFlags.FillExpand,
|
SizeFlagsHorizontal = SizeFlags.FillExpand,
|
||||||
};
|
};
|
||||||
@@ -66,7 +60,7 @@ namespace Content.Client.Research
|
|||||||
SizeFlagsStretchRatio = 2,
|
SizeFlagsStretchRatio = 2,
|
||||||
};
|
};
|
||||||
|
|
||||||
var vboxInfo = new VBoxContainer()
|
var vBoxInfo = new VBoxContainer()
|
||||||
{
|
{
|
||||||
SizeFlagsVertical = SizeFlags.FillExpand,
|
SizeFlagsVertical = SizeFlags.FillExpand,
|
||||||
SizeFlagsStretchRatio = 3,
|
SizeFlagsStretchRatio = 3,
|
||||||
@@ -94,18 +88,18 @@ namespace Content.Client.Research
|
|||||||
SelectMode = ItemList.ItemListSelectMode.None
|
SelectMode = ItemList.ItemListSelectMode.None
|
||||||
};
|
};
|
||||||
|
|
||||||
vboxInfo.AddChild(NameLabel);
|
vBoxInfo.AddChild(NameLabel);
|
||||||
vboxInfo.AddChild(Description);
|
vBoxInfo.AddChild(Description);
|
||||||
|
|
||||||
hbox.AddChild(Icon);
|
hBox.AddChild(Icon);
|
||||||
hbox.AddChild(vboxInfo);
|
hBox.AddChild(vBoxInfo);
|
||||||
|
|
||||||
descMargin.AddChild(hbox);
|
descMargin.AddChild(hBox);
|
||||||
|
|
||||||
vbox.AddChild(descMargin);
|
vBox.AddChild(descMargin);
|
||||||
vbox.AddChild(QueueList);
|
vBox.AddChild(QueueList);
|
||||||
|
|
||||||
margin.AddChild(vbox);
|
margin.AddChild(vBox);
|
||||||
|
|
||||||
Contents.AddChild(margin);
|
Contents.AddChild(margin);
|
||||||
|
|
||||||
|
|||||||
@@ -39,14 +39,12 @@ namespace Content.Client.UserInterface
|
|||||||
private UIBox2i _handL;
|
private UIBox2i _handL;
|
||||||
private UIBox2i _handR;
|
private UIBox2i _handR;
|
||||||
|
|
||||||
private SpriteView LeftSpriteView;
|
private readonly SpriteView LeftSpriteView;
|
||||||
private SpriteView RightSpriteView;
|
private readonly SpriteView RightSpriteView;
|
||||||
private TextureRect ActiveHandRect;
|
private readonly TextureRect ActiveHandRect;
|
||||||
|
|
||||||
protected override void Initialize()
|
public HandsGui()
|
||||||
{
|
{
|
||||||
base.Initialize();
|
|
||||||
|
|
||||||
IoCManager.InjectDependencies(this);
|
IoCManager.InjectDependencies(this);
|
||||||
|
|
||||||
ToolTip = _loc.GetString("Your hands");
|
ToolTip = _loc.GetString("Your hands");
|
||||||
|
|||||||
65
Content.Client/VendingMachines/VendingMachineMenu.cs
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
using Content.Client.GameObjects.Components.VendingMachines;
|
||||||
|
using Robust.Client.UserInterface.Controls;
|
||||||
|
using Robust.Client.UserInterface.CustomControls;
|
||||||
|
using Robust.Shared.IoC;
|
||||||
|
using Robust.Shared.Maths;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using Robust.Client.GameObjects;
|
||||||
|
using Robust.Client.Graphics;
|
||||||
|
using Robust.Client.Interfaces.ResourceManagement;
|
||||||
|
using Robust.Shared.GameObjects;
|
||||||
|
using Robust.Shared.Prototypes;
|
||||||
|
using static Content.Shared.GameObjects.Components.VendingMachines.SharedVendingMachineComponent;
|
||||||
|
|
||||||
|
namespace Content.Client.VendingMachines
|
||||||
|
{
|
||||||
|
class VendingMachineMenu : SS14Window
|
||||||
|
{
|
||||||
|
protected override Vector2? CustomSize => (300, 450);
|
||||||
|
|
||||||
|
private readonly ItemList _items;
|
||||||
|
private List<VendingMachineInventoryEntry> _cachedInventory;
|
||||||
|
|
||||||
|
#pragma warning disable CS0649
|
||||||
|
[Dependency]
|
||||||
|
private IResourceCache _resourceCache;
|
||||||
|
[Dependency]
|
||||||
|
private readonly IPrototypeManager _prototypeManager;
|
||||||
|
#pragma warning restore
|
||||||
|
public VendingMachineBoundUserInterface Owner { get; set; }
|
||||||
|
|
||||||
|
public VendingMachineMenu()
|
||||||
|
{
|
||||||
|
IoCManager.InjectDependencies(this);
|
||||||
|
|
||||||
|
_items = new ItemList()
|
||||||
|
{
|
||||||
|
SizeFlagsStretchRatio = 8,
|
||||||
|
SizeFlagsVertical = SizeFlags.FillExpand,
|
||||||
|
};
|
||||||
|
_items.OnItemSelected += ItemSelected;
|
||||||
|
|
||||||
|
Contents.AddChild(_items);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Populate(List<VendingMachineInventoryEntry> inventory)
|
||||||
|
{
|
||||||
|
_items.Clear();
|
||||||
|
_cachedInventory = inventory;
|
||||||
|
foreach (VendingMachineInventoryEntry entry in inventory)
|
||||||
|
{
|
||||||
|
Texture icon = null;
|
||||||
|
if(_prototypeManager.TryIndex(entry.ID, out EntityPrototype prototype))
|
||||||
|
{
|
||||||
|
icon = IconComponent.GetPrototypeIcon(prototype, _resourceCache).TextureFor(Direction.South);
|
||||||
|
}
|
||||||
|
_items.AddItem($"{entry.ID} ({entry.Amount} left)", icon);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void ItemSelected(ItemList.ItemListSelectedEventArgs args)
|
||||||
|
{
|
||||||
|
Owner.Eject(_cachedInventory[args.ItemIndex].ID);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
34
Content.Server/GameObjects/Components/ComputerComponent.cs
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
using Content.Server.GameObjects.Components.Power;
|
||||||
|
using Content.Shared.GameObjects.Components;
|
||||||
|
using Robust.Server.GameObjects;
|
||||||
|
using Robust.Shared.GameObjects;
|
||||||
|
|
||||||
|
namespace Content.Server.GameObjects.Components
|
||||||
|
{
|
||||||
|
[RegisterComponent]
|
||||||
|
public sealed class ComputerComponent : SharedComputerComponent
|
||||||
|
{
|
||||||
|
public override void Initialize()
|
||||||
|
{
|
||||||
|
base.Initialize();
|
||||||
|
|
||||||
|
if (Owner.TryGetComponent(out PowerDeviceComponent powerDevice))
|
||||||
|
{
|
||||||
|
powerDevice.OnPowerStateChanged += PowerDeviceOnOnPowerStateChanged;
|
||||||
|
|
||||||
|
if (Owner.TryGetComponent(out AppearanceComponent appearance))
|
||||||
|
{
|
||||||
|
appearance.SetData(ComputerVisuals.Powered, powerDevice.Powered);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void PowerDeviceOnOnPowerStateChanged(object sender, PowerStateEventArgs e)
|
||||||
|
{
|
||||||
|
if (Owner.TryGetComponent(out AppearanceComponent appearance))
|
||||||
|
{
|
||||||
|
appearance.SetData(ComputerVisuals.Powered, e.Powered);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,79 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using Content.Server.GameObjects.EntitySystems;
|
||||||
|
using Content.Server.Interfaces;
|
||||||
|
using Content.Shared.GameObjects;
|
||||||
|
using Robust.Shared.GameObjects;
|
||||||
|
using Robust.Shared.Interfaces.GameObjects;
|
||||||
|
using Robust.Shared.IoC;
|
||||||
|
using Robust.Shared.Maths;
|
||||||
|
using Robust.Shared.Serialization;
|
||||||
|
|
||||||
|
namespace Content.Server.GameObjects.Components.Damage
|
||||||
|
{
|
||||||
|
[RegisterComponent]
|
||||||
|
public class BreakableComponent : Component, IOnDamageBehavior, IExAct
|
||||||
|
{
|
||||||
|
|
||||||
|
#pragma warning disable 649
|
||||||
|
[Dependency] private readonly IEntitySystemManager _entitySystemManager;
|
||||||
|
#pragma warning restore 649
|
||||||
|
/// <inheritdoc />
|
||||||
|
public override string Name => "Breakable";
|
||||||
|
public DamageThreshold Threshold { get; private set; }
|
||||||
|
|
||||||
|
public DamageType damageType = DamageType.Total;
|
||||||
|
public int damageValue = 0;
|
||||||
|
public bool broken = false;
|
||||||
|
|
||||||
|
private ActSystem _actSystem;
|
||||||
|
|
||||||
|
public override void ExposeData(ObjectSerializer serializer)
|
||||||
|
{
|
||||||
|
base.ExposeData(serializer);
|
||||||
|
|
||||||
|
serializer.DataField(ref damageValue, "thresholdvalue", 100);
|
||||||
|
serializer.DataField(ref damageType, "thresholdtype", DamageType.Total);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Initialize()
|
||||||
|
{
|
||||||
|
base.Initialize();
|
||||||
|
_actSystem = _entitySystemManager.GetEntitySystem<ActSystem>();
|
||||||
|
}
|
||||||
|
|
||||||
|
public List<DamageThreshold> GetAllDamageThresholds()
|
||||||
|
{
|
||||||
|
Threshold = new DamageThreshold(damageType, damageValue, ThresholdType.Breakage);
|
||||||
|
return new List<DamageThreshold>() {Threshold};
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OnDamageThresholdPassed(object obj, DamageThresholdPassedEventArgs e)
|
||||||
|
{
|
||||||
|
if (e.Passed && e.DamageThreshold == Threshold && broken == false)
|
||||||
|
{
|
||||||
|
broken = true;
|
||||||
|
_actSystem.HandleBreakage(Owner);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OnExplosion(ExplosionEventArgs eventArgs)
|
||||||
|
{
|
||||||
|
var prob = new Random();
|
||||||
|
switch (eventArgs.Severity)
|
||||||
|
{
|
||||||
|
case ExplosionSeverity.Destruction:
|
||||||
|
_actSystem.HandleBreakage(Owner);
|
||||||
|
break;
|
||||||
|
case ExplosionSeverity.Heavy:
|
||||||
|
_actSystem.HandleBreakage(Owner);
|
||||||
|
break;
|
||||||
|
case ExplosionSeverity.Light:
|
||||||
|
if(prob.Prob(40))
|
||||||
|
_actSystem.HandleBreakage(Owner);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -43,7 +43,8 @@ namespace Content.Server.GameObjects
|
|||||||
Destruction,
|
Destruction,
|
||||||
Death,
|
Death,
|
||||||
Critical,
|
Critical,
|
||||||
HUDUpdate
|
HUDUpdate,
|
||||||
|
Breakage,
|
||||||
}
|
}
|
||||||
|
|
||||||
public class DamageThresholdPassedEventArgs : EventArgs
|
public class DamageThresholdPassedEventArgs : EventArgs
|
||||||
|
|||||||
@@ -43,6 +43,8 @@ namespace Content.Server.GameObjects
|
|||||||
{
|
{
|
||||||
base.ExposeData(serializer);
|
base.ExposeData(serializer);
|
||||||
|
|
||||||
|
serializer.DataField(ref _clothingEquippedPrefix, "ClothingPrefix", null);
|
||||||
|
|
||||||
// TODO: Writing.
|
// TODO: Writing.
|
||||||
serializer.DataReadFunction("Slots", new List<string>(0), list =>
|
serializer.DataReadFunction("Slots", new List<string>(0), list =>
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ using Robust.Server.Interfaces.GameObjects;
|
|||||||
using Robust.Shared.GameObjects;
|
using Robust.Shared.GameObjects;
|
||||||
using Robust.Shared.Interfaces.GameObjects;
|
using Robust.Shared.Interfaces.GameObjects;
|
||||||
using Robust.Shared.Maths;
|
using Robust.Shared.Maths;
|
||||||
|
using Robust.Shared.Serialization;
|
||||||
|
|
||||||
namespace Content.Server.GameObjects
|
namespace Content.Server.GameObjects
|
||||||
{
|
{
|
||||||
@@ -50,6 +51,13 @@ namespace Content.Server.GameObjects
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public override void ExposeData(ObjectSerializer serializer)
|
||||||
|
{
|
||||||
|
base.ExposeData(serializer);
|
||||||
|
|
||||||
|
serializer.DataField(ref _equippedPrefix, "HeldPrefix", null);
|
||||||
|
}
|
||||||
|
|
||||||
public bool AttackHand(AttackHandEventArgs eventArgs)
|
public bool AttackHand(AttackHandEventArgs eventArgs)
|
||||||
{
|
{
|
||||||
var hands = eventArgs.User.GetComponent<IHandsComponent>();
|
var hands = eventArgs.User.GetComponent<IHandsComponent>();
|
||||||
|
|||||||
@@ -20,6 +20,8 @@ namespace Content.Server.GameObjects.Components.Projectiles
|
|||||||
|
|
||||||
public Dictionary<DamageType, int> damages = new Dictionary<DamageType, int>();
|
public Dictionary<DamageType, int> damages = new Dictionary<DamageType, int>();
|
||||||
|
|
||||||
|
public float TimeLeft { get; set; } = 10;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Function that makes the collision of this object ignore a specific entity so we don't collide with ourselves
|
/// Function that makes the collision of this object ignore a specific entity so we don't collide with ourselves
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -0,0 +1,194 @@
|
|||||||
|
using System;
|
||||||
|
using Content.Server.GameObjects.EntitySystems;
|
||||||
|
using Content.Shared.GameObjects.Components.VendingMachines;
|
||||||
|
using Content.Shared.VendingMachines;
|
||||||
|
using Robust.Server.GameObjects.Components.UserInterface;
|
||||||
|
using Robust.Server.Interfaces.GameObjects;
|
||||||
|
using Robust.Shared.GameObjects;
|
||||||
|
using Robust.Shared.GameObjects.Components.UserInterface;
|
||||||
|
using Robust.Shared.IoC;
|
||||||
|
using Robust.Shared.Prototypes;
|
||||||
|
using Robust.Shared.Serialization;
|
||||||
|
using Robust.Shared.Timers;
|
||||||
|
using Robust.Shared.Utility;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using Content.Server.GameObjects.Components.Power;
|
||||||
|
using Robust.Server.GameObjects;
|
||||||
|
using Robust.Shared.Log;
|
||||||
|
|
||||||
|
namespace Content.Server.GameObjects.Components.VendingMachines
|
||||||
|
{
|
||||||
|
[RegisterComponent]
|
||||||
|
[ComponentReference(typeof(IActivate))]
|
||||||
|
public class VendingMachineComponent : SharedVendingMachineComponent, IActivate, IExamine, IBreakAct
|
||||||
|
{
|
||||||
|
private AppearanceComponent _appearance;
|
||||||
|
private BoundUserInterface _userInterface;
|
||||||
|
private PowerDeviceComponent _powerDevice;
|
||||||
|
|
||||||
|
private bool _ejecting = false;
|
||||||
|
private TimeSpan _animationDuration = TimeSpan.Zero;
|
||||||
|
private string _packPrototypeId;
|
||||||
|
private string _description;
|
||||||
|
private string _spriteName;
|
||||||
|
|
||||||
|
private bool Powered => _powerDevice.Powered;
|
||||||
|
private bool _broken = false;
|
||||||
|
|
||||||
|
public void Activate(ActivateEventArgs eventArgs)
|
||||||
|
{
|
||||||
|
if(!eventArgs.User.TryGetComponent(out IActorComponent actor))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
_userInterface.Open(actor.playerSession);
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void ExposeData(ObjectSerializer serializer)
|
||||||
|
{
|
||||||
|
base.ExposeData(serializer);
|
||||||
|
|
||||||
|
serializer.DataField(ref _packPrototypeId, "pack", string.Empty);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void InitializeFromPrototype()
|
||||||
|
{
|
||||||
|
if (string.IsNullOrEmpty(_packPrototypeId)) { return; }
|
||||||
|
var prototypeManger = IoCManager.Resolve<IPrototypeManager>();
|
||||||
|
if (!prototypeManger.TryIndex(_packPrototypeId, out VendingMachineInventoryPrototype packPrototype))
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
Owner.Name = packPrototype.Name;
|
||||||
|
_description = packPrototype.Description;
|
||||||
|
_animationDuration = TimeSpan.FromSeconds(packPrototype.AnimationDuration);
|
||||||
|
_spriteName = packPrototype.SpriteName;
|
||||||
|
if (!string.IsNullOrEmpty(_spriteName))
|
||||||
|
{
|
||||||
|
var spriteComponent = Owner.GetComponent<SpriteComponent>();
|
||||||
|
const string vendingMachineRSIPath = "Buildings/VendingMachines/{0}.rsi";
|
||||||
|
spriteComponent.BaseRSIPath = string.Format(vendingMachineRSIPath, _spriteName);
|
||||||
|
}
|
||||||
|
|
||||||
|
var inventory = new List<VendingMachineInventoryEntry>();
|
||||||
|
foreach(var (id, amount) in packPrototype.StartingInventory)
|
||||||
|
{
|
||||||
|
inventory.Add(new VendingMachineInventoryEntry(id, amount));
|
||||||
|
}
|
||||||
|
Inventory = inventory;
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Initialize()
|
||||||
|
{
|
||||||
|
base.Initialize();
|
||||||
|
_appearance = Owner.GetComponent<AppearanceComponent>();
|
||||||
|
_userInterface = Owner.GetComponent<ServerUserInterfaceComponent>()
|
||||||
|
.GetBoundUserInterface(VendingMachineUiKey.Key);
|
||||||
|
_userInterface.OnReceiveMessage += UserInterfaceOnOnReceiveMessage;
|
||||||
|
_powerDevice = Owner.GetComponent<PowerDeviceComponent>();
|
||||||
|
_powerDevice.OnPowerStateChanged += UpdatePower;
|
||||||
|
InitializeFromPrototype();
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void OnRemove()
|
||||||
|
{
|
||||||
|
_appearance = null;
|
||||||
|
_powerDevice.OnPowerStateChanged -= UpdatePower;
|
||||||
|
_powerDevice = null;
|
||||||
|
base.OnRemove();
|
||||||
|
}
|
||||||
|
|
||||||
|
private void UpdatePower(object sender, PowerStateEventArgs args)
|
||||||
|
{
|
||||||
|
var state = args.Powered ? VendingMachineVisualState.Normal : VendingMachineVisualState.Off;
|
||||||
|
TrySetVisualState(state);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void UserInterfaceOnOnReceiveMessage(BoundUserInterfaceMessage message)
|
||||||
|
{
|
||||||
|
switch (message)
|
||||||
|
{
|
||||||
|
case VendingMachineEjectMessage msg:
|
||||||
|
TryEject(msg.ID);
|
||||||
|
break;
|
||||||
|
case InventorySyncRequestMessage msg:
|
||||||
|
_userInterface.SendMessage(new VendingMachineInventoryMessage(Inventory));
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Examine(FormattedMessage message)
|
||||||
|
{
|
||||||
|
if(_description == null) { return; }
|
||||||
|
message.AddText(_description);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void TryEject(string id)
|
||||||
|
{
|
||||||
|
if (_ejecting || _broken)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
VendingMachineInventoryEntry entry = Inventory.Find(x => x.ID == id);
|
||||||
|
if (entry == null)
|
||||||
|
{
|
||||||
|
FlickDenyAnimation();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (entry.Amount <= 0)
|
||||||
|
{
|
||||||
|
FlickDenyAnimation();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
_ejecting = true;
|
||||||
|
entry.Amount--;
|
||||||
|
_userInterface.SendMessage(new VendingMachineInventoryMessage(Inventory));
|
||||||
|
TrySetVisualState(VendingMachineVisualState.Eject);
|
||||||
|
|
||||||
|
Timer.Spawn(_animationDuration, () =>
|
||||||
|
{
|
||||||
|
TrySetVisualState(VendingMachineVisualState.Normal);
|
||||||
|
_ejecting = false;
|
||||||
|
Owner.EntityManager.SpawnEntityAt(id, Owner.Transform.GridPosition);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void FlickDenyAnimation()
|
||||||
|
{
|
||||||
|
TrySetVisualState(VendingMachineVisualState.Deny);
|
||||||
|
//TODO: This duration should be a distinct value specific to the deny animation
|
||||||
|
Timer.Spawn(_animationDuration, () =>
|
||||||
|
{
|
||||||
|
TrySetVisualState(VendingMachineVisualState.Normal);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
private void TrySetVisualState(VendingMachineVisualState state)
|
||||||
|
{
|
||||||
|
var finalState = state;
|
||||||
|
if (_broken)
|
||||||
|
{
|
||||||
|
finalState = VendingMachineVisualState.Broken;
|
||||||
|
} else if (_ejecting)
|
||||||
|
{
|
||||||
|
finalState = VendingMachineVisualState.Eject;
|
||||||
|
} else if (!Powered)
|
||||||
|
{
|
||||||
|
finalState = VendingMachineVisualState.Off;
|
||||||
|
}
|
||||||
|
_appearance.SetData(VendingMachineVisuals.VisualState, finalState);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void OnBreak(BreakageEventArgs eventArgs)
|
||||||
|
{
|
||||||
|
_broken = true;
|
||||||
|
TrySetVisualState(VendingMachineVisualState.Broken);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -24,6 +24,19 @@ namespace Content.Server.GameObjects.EntitySystems
|
|||||||
public bool IsSpawnWreck { get; set; }
|
public bool IsSpawnWreck { get; set; }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class BreakageEventArgs : EventArgs
|
||||||
|
{
|
||||||
|
public IEntity Owner { get; set; }
|
||||||
|
}
|
||||||
|
|
||||||
|
public interface IBreakAct
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Called when object is broken
|
||||||
|
/// </summary>
|
||||||
|
void OnBreak(BreakageEventArgs eventArgs);
|
||||||
|
}
|
||||||
|
|
||||||
public interface IExAct
|
public interface IExAct
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -73,6 +86,19 @@ namespace Content.Server.GameObjects.EntitySystems
|
|||||||
exAct.OnExplosion(eventArgs);
|
exAct.OnExplosion(eventArgs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void HandleBreakage(IEntity owner)
|
||||||
|
{
|
||||||
|
var eventArgs = new BreakageEventArgs
|
||||||
|
{
|
||||||
|
Owner = owner,
|
||||||
|
};
|
||||||
|
var breakActs = owner.GetAllComponents<IBreakAct>().ToList();
|
||||||
|
foreach (var breakAct in breakActs)
|
||||||
|
{
|
||||||
|
breakAct.OnBreak(eventArgs);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
public enum ExplosionSeverity
|
public enum ExplosionSeverity
|
||||||
{
|
{
|
||||||
@@ -80,4 +106,4 @@ namespace Content.Server.GameObjects.EntitySystems
|
|||||||
Heavy,
|
Heavy,
|
||||||
Light,
|
Light,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
34
Content.Server/GameObjects/EntitySystems/ProjectileSystem.cs
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
using Content.Server.GameObjects.Components.Projectiles;
|
||||||
|
using JetBrains.Annotations;
|
||||||
|
using Robust.Shared.GameObjects;
|
||||||
|
using Robust.Shared.GameObjects.Systems;
|
||||||
|
|
||||||
|
namespace Content.Server.GameObjects.EntitySystems
|
||||||
|
{
|
||||||
|
[UsedImplicitly]
|
||||||
|
internal sealed class ProjectileSystem : EntitySystem
|
||||||
|
{
|
||||||
|
public override void Initialize()
|
||||||
|
{
|
||||||
|
base.Initialize();
|
||||||
|
|
||||||
|
EntityQuery = new TypeEntityQuery(typeof(ProjectileComponent));
|
||||||
|
}
|
||||||
|
|
||||||
|
public override void Update(float frameTime)
|
||||||
|
{
|
||||||
|
base.Update(frameTime);
|
||||||
|
|
||||||
|
foreach (var entity in RelevantEntities)
|
||||||
|
{
|
||||||
|
var component = entity.GetComponent<ProjectileComponent>();
|
||||||
|
component.TimeLeft -= frameTime;
|
||||||
|
|
||||||
|
if (component.TimeLeft <= 0)
|
||||||
|
{
|
||||||
|
entity.Delete();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
using System;
|
||||||
|
using Robust.Shared.GameObjects;
|
||||||
|
using Robust.Shared.Serialization;
|
||||||
|
|
||||||
|
namespace Content.Shared.GameObjects.Components
|
||||||
|
{
|
||||||
|
public class SharedComputerComponent : Component
|
||||||
|
{
|
||||||
|
public override string Name => "Computer";
|
||||||
|
}
|
||||||
|
|
||||||
|
[Serializable, NetSerializable]
|
||||||
|
public enum ComputerVisuals
|
||||||
|
{
|
||||||
|
// Bool
|
||||||
|
Powered,
|
||||||
|
|
||||||
|
// Bool
|
||||||
|
Broken
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,78 @@
|
|||||||
|
using Robust.Shared.GameObjects;
|
||||||
|
using Robust.Shared.GameObjects.Components.UserInterface;
|
||||||
|
using Robust.Shared.IoC;
|
||||||
|
using Robust.Shared.Prototypes;
|
||||||
|
using Robust.Shared.Serialization;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Collections.Specialized;
|
||||||
|
|
||||||
|
namespace Content.Shared.GameObjects.Components.VendingMachines
|
||||||
|
{
|
||||||
|
public class SharedVendingMachineComponent : Component
|
||||||
|
{
|
||||||
|
public override string Name => "VendingMachine";
|
||||||
|
public override uint? NetID => ContentNetIDs.VENDING_MACHINE;
|
||||||
|
|
||||||
|
public List<VendingMachineInventoryEntry> Inventory = new List<VendingMachineInventoryEntry>();
|
||||||
|
|
||||||
|
[Serializable, NetSerializable]
|
||||||
|
public enum VendingMachineVisuals
|
||||||
|
{
|
||||||
|
VisualState,
|
||||||
|
}
|
||||||
|
|
||||||
|
[Serializable, NetSerializable]
|
||||||
|
public enum VendingMachineVisualState
|
||||||
|
{
|
||||||
|
Normal,
|
||||||
|
Off,
|
||||||
|
Broken,
|
||||||
|
Eject,
|
||||||
|
Deny,
|
||||||
|
}
|
||||||
|
|
||||||
|
[Serializable, NetSerializable]
|
||||||
|
public class VendingMachineEjectMessage : BoundUserInterfaceMessage
|
||||||
|
{
|
||||||
|
public readonly string ID;
|
||||||
|
public VendingMachineEjectMessage(string id)
|
||||||
|
{
|
||||||
|
ID = id;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[Serializable, NetSerializable]
|
||||||
|
public enum VendingMachineUiKey
|
||||||
|
{
|
||||||
|
Key,
|
||||||
|
}
|
||||||
|
|
||||||
|
[Serializable, NetSerializable]
|
||||||
|
public class InventorySyncRequestMessage : BoundUserInterfaceMessage
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
[Serializable, NetSerializable]
|
||||||
|
public class VendingMachineInventoryMessage : BoundUserInterfaceMessage
|
||||||
|
{
|
||||||
|
public readonly List<VendingMachineInventoryEntry> Inventory;
|
||||||
|
public VendingMachineInventoryMessage(List<VendingMachineInventoryEntry> inventory)
|
||||||
|
{
|
||||||
|
Inventory = inventory;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[Serializable, NetSerializable]
|
||||||
|
public class VendingMachineInventoryEntry
|
||||||
|
{
|
||||||
|
public string ID;
|
||||||
|
public uint Amount;
|
||||||
|
public VendingMachineInventoryEntry(string id, uint amount)
|
||||||
|
{
|
||||||
|
ID = id;
|
||||||
|
Amount = amount;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -23,5 +23,6 @@
|
|||||||
public const uint LATHE_DATABASE = 1017;
|
public const uint LATHE_DATABASE = 1017;
|
||||||
public const uint MATERIAL_STORAGE = 1018;
|
public const uint MATERIAL_STORAGE = 1018;
|
||||||
public const uint HAND_TELEPORTER = 1019;
|
public const uint HAND_TELEPORTER = 1019;
|
||||||
|
public const uint VENDING_MACHINE = 1020;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -114,7 +114,7 @@ namespace Content.Shared.GameObjects
|
|||||||
// This works for now though.
|
// This works for now though.
|
||||||
public static IEnumerable<(IComponent, Verb)> GetVerbs(IEntity entity)
|
public static IEnumerable<(IComponent, Verb)> GetVerbs(IEntity entity)
|
||||||
{
|
{
|
||||||
foreach (var component in entity.GetComponentInstances())
|
foreach (var component in entity.GetAllComponents())
|
||||||
{
|
{
|
||||||
var type = component.GetType();
|
var type = component.GetType();
|
||||||
foreach (var nestedType in type.GetNestedTypes(BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Static))
|
foreach (var nestedType in type.GetNestedTypes(BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Static))
|
||||||
|
|||||||
@@ -0,0 +1,41 @@
|
|||||||
|
using Robust.Shared.Prototypes;
|
||||||
|
using Robust.Shared.Serialization;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
using YamlDotNet.RepresentationModel;
|
||||||
|
|
||||||
|
namespace Content.Shared.VendingMachines
|
||||||
|
{
|
||||||
|
[Serializable, NetSerializable, Prototype("vendingMachineInventory")]
|
||||||
|
public class VendingMachineInventoryPrototype : IPrototype, IIndexedPrototype
|
||||||
|
{
|
||||||
|
private string _id;
|
||||||
|
private string _name;
|
||||||
|
private string _description;
|
||||||
|
private double _animationDuration;
|
||||||
|
private string _spriteName;
|
||||||
|
private Dictionary<string, uint> _startingInventory;
|
||||||
|
|
||||||
|
public string ID => _id;
|
||||||
|
public string Name => _name;
|
||||||
|
public string Description => _description;
|
||||||
|
public double AnimationDuration => _animationDuration;
|
||||||
|
public string SpriteName => _spriteName;
|
||||||
|
public Dictionary<string, uint> StartingInventory => _startingInventory;
|
||||||
|
|
||||||
|
public void LoadFrom(YamlMappingNode mapping)
|
||||||
|
{
|
||||||
|
var serializer = YamlObjectSerializer.NewReader(mapping);
|
||||||
|
|
||||||
|
serializer.DataField(ref _id, "id", string.Empty);
|
||||||
|
serializer.DataField(ref _name, "name", string.Empty);
|
||||||
|
serializer.DataField(ref _description, "description", string.Empty);
|
||||||
|
serializer.DataField<double>(ref _animationDuration, "animationDuration", 0);
|
||||||
|
serializer.DataField(ref _spriteName, "spriteName", string.Empty);
|
||||||
|
serializer.DataField(ref _startingInventory, "startingInventory", new Dictionary<string, uint>());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
117
Resources/Prototypes/Entities/buildings/computers.yml
Normal file
@@ -0,0 +1,117 @@
|
|||||||
|
- type: entity
|
||||||
|
id: computerBase
|
||||||
|
name: Computer
|
||||||
|
components:
|
||||||
|
- type: Clickable
|
||||||
|
- type: Collidable
|
||||||
|
- type: BoundingBox
|
||||||
|
- type: Icon
|
||||||
|
sprite: Buildings/computer.rsi
|
||||||
|
state: computer
|
||||||
|
|
||||||
|
- type: Computer
|
||||||
|
- type: PowerDevice
|
||||||
|
priority: High
|
||||||
|
|
||||||
|
- type: Sprite
|
||||||
|
sprite: Buildings/computer.rsi
|
||||||
|
layers:
|
||||||
|
- state: computer
|
||||||
|
map: ["enum.ComputerVisualizer2D+Layers.Body"]
|
||||||
|
- state: generic_key_off
|
||||||
|
map: ["enum.ComputerVisualizer2D+Layers.Keyboard"]
|
||||||
|
- state: generic
|
||||||
|
shader: unshaded
|
||||||
|
map: ["enum.ComputerVisualizer2D+Layers.Screen"]
|
||||||
|
- state: generic_key
|
||||||
|
shader: unshaded
|
||||||
|
map: ["enum.ComputerVisualizer2D+Layers.KeyboardOn"]
|
||||||
|
|
||||||
|
- type: Appearance
|
||||||
|
visuals:
|
||||||
|
- type: ComputerVisualizer2D
|
||||||
|
key: generic_key
|
||||||
|
screen: generic
|
||||||
|
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
id: computerAlert
|
||||||
|
parent: computerBase
|
||||||
|
name: Alerts Computer
|
||||||
|
components:
|
||||||
|
- type: Appearance
|
||||||
|
visuals:
|
||||||
|
- type: ComputerVisualizer2D
|
||||||
|
key: atmos_key
|
||||||
|
screen: "alert-2"
|
||||||
|
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
id: computerPowerMonitoring
|
||||||
|
parent: computerBase
|
||||||
|
name: Power Monitoring Computer
|
||||||
|
components:
|
||||||
|
- type: Appearance
|
||||||
|
visuals:
|
||||||
|
- type: ComputerVisualizer2D
|
||||||
|
key: power_key
|
||||||
|
screen: power_monitor
|
||||||
|
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
id: computerSupplyOrdering
|
||||||
|
parent: computerBase
|
||||||
|
name: Supply Ordering Computer
|
||||||
|
components:
|
||||||
|
- type: Appearance
|
||||||
|
visuals:
|
||||||
|
- type: ComputerVisualizer2D
|
||||||
|
key: tech_key
|
||||||
|
screen: supply
|
||||||
|
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
id: computerMedicalRecords
|
||||||
|
parent: computerBase
|
||||||
|
name: Medical Records Computer
|
||||||
|
components:
|
||||||
|
- type: Appearance
|
||||||
|
visuals:
|
||||||
|
- type: ComputerVisualizer2D
|
||||||
|
key: med_key
|
||||||
|
screen: medcomp
|
||||||
|
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
id: computerResearchAndDevelopment
|
||||||
|
parent: computerBase
|
||||||
|
name: R&D Computer
|
||||||
|
components:
|
||||||
|
- type: Appearance
|
||||||
|
visuals:
|
||||||
|
- type: ComputerVisualizer2D
|
||||||
|
key: rd_key
|
||||||
|
screen: rdcomp
|
||||||
|
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
id: computerId
|
||||||
|
parent: computerBase
|
||||||
|
name: ID Card Computer
|
||||||
|
components:
|
||||||
|
- type: Appearance
|
||||||
|
visuals:
|
||||||
|
- type: ComputerVisualizer2D
|
||||||
|
key: id_key
|
||||||
|
screen: id
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
id: computerComms
|
||||||
|
parent: computerBase
|
||||||
|
name: Communications Computer
|
||||||
|
components:
|
||||||
|
- type: Appearance
|
||||||
|
visuals:
|
||||||
|
- type: ComputerVisualizer2D
|
||||||
|
key: generic_key
|
||||||
|
screen: comm
|
||||||
53
Resources/Prototypes/Entities/buildings/furniture.yml
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
- type: entity
|
||||||
|
name: Stool
|
||||||
|
id: stool
|
||||||
|
components:
|
||||||
|
- type: Clickable
|
||||||
|
- type: BoundingBox
|
||||||
|
- type: Sprite
|
||||||
|
sprite: Buildings/furniture.rsi
|
||||||
|
state: stool_base
|
||||||
|
color: "#8e9799"
|
||||||
|
- type: Icon
|
||||||
|
sprite: Buildings/furniture.rsi
|
||||||
|
state: stool_base
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
name: White Office Chair
|
||||||
|
id: chairOfficeLight
|
||||||
|
components:
|
||||||
|
- type: Clickable
|
||||||
|
- type: BoundingBox
|
||||||
|
- type: Sprite
|
||||||
|
sprite: Buildings/furniture.rsi
|
||||||
|
state: officechair_white
|
||||||
|
- type: Icon
|
||||||
|
sprite: Buildings/furniture.rsi
|
||||||
|
state: officechair_white
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
name: Dark Office Chair
|
||||||
|
id: chairOfficeDark
|
||||||
|
components:
|
||||||
|
- type: Clickable
|
||||||
|
- type: BoundingBox
|
||||||
|
- type: Sprite
|
||||||
|
sprite: Buildings/furniture.rsi
|
||||||
|
state: officechair_dark
|
||||||
|
- type: Icon
|
||||||
|
sprite: Buildings/furniture.rsi
|
||||||
|
state: officechair_dark
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
name: Chair
|
||||||
|
id: chair
|
||||||
|
components:
|
||||||
|
- type: Clickable
|
||||||
|
- type: BoundingBox
|
||||||
|
- type: Sprite
|
||||||
|
sprite: Buildings/furniture.rsi
|
||||||
|
state: chair
|
||||||
|
color: "#8e9799"
|
||||||
|
- type: Icon
|
||||||
|
sprite: Buildings/furniture.rsi
|
||||||
|
state: chair
|
||||||
338
Resources/Prototypes/Entities/buildings/vending_machines.yml
Normal file
@@ -0,0 +1,338 @@
|
|||||||
|
- type: entity
|
||||||
|
id: VendingMachine
|
||||||
|
name: vending machine
|
||||||
|
components:
|
||||||
|
- type: Clickable
|
||||||
|
- type: Sprite
|
||||||
|
sprite: Buildings/VendingMachines/empty.rsi
|
||||||
|
layers:
|
||||||
|
- state: normal
|
||||||
|
map: ["enum.VendingMachineVisualLayers.Base"]
|
||||||
|
- type: Icon
|
||||||
|
sprite: Buildings/VendingMachines/empty.rsi
|
||||||
|
state: normal
|
||||||
|
- type: BoundingBox
|
||||||
|
- type: Collidable
|
||||||
|
- type: SnapGrid
|
||||||
|
offset: Center
|
||||||
|
- type: Damageable
|
||||||
|
- type: Breakable
|
||||||
|
- type: Appearance
|
||||||
|
visuals:
|
||||||
|
- type: VendingMachineVisualizer2D
|
||||||
|
- type: UserInterface
|
||||||
|
interfaces:
|
||||||
|
- key: enum.VendingMachineUiKey.Key
|
||||||
|
type: VendingMachineBoundUserInterface
|
||||||
|
- type: PowerDevice
|
||||||
|
priority: Low
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
parent: VendingMachine
|
||||||
|
id: vending_machine_ammo
|
||||||
|
name: AmmoVend
|
||||||
|
components:
|
||||||
|
- type: VendingMachine
|
||||||
|
pack: AmmoVend
|
||||||
|
- type: Icon
|
||||||
|
sprite: Buildings/VendingMachines/ammo.rsi
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
parent: VendingMachine
|
||||||
|
id: vending_machine_booze
|
||||||
|
name: Booze-O-Mat
|
||||||
|
components:
|
||||||
|
- type: VendingMachine
|
||||||
|
pack: Booze-O-Mat
|
||||||
|
- type: Icon
|
||||||
|
sprite: Buildings/VendingMachines/boozeomat.rsi
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
parent: VendingMachine
|
||||||
|
id: vending_machine_cart
|
||||||
|
name: PTech
|
||||||
|
components:
|
||||||
|
- type: VendingMachine
|
||||||
|
pack: PTech
|
||||||
|
- type: Icon
|
||||||
|
sprite: Buildings/VendingMachines/cart.rsi
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
parent: VendingMachine
|
||||||
|
id: vending_machine_chapel
|
||||||
|
name: PietyVend
|
||||||
|
components:
|
||||||
|
- type: VendingMachine
|
||||||
|
pack: PietyVend
|
||||||
|
- type: Icon
|
||||||
|
sprite: Buildings/VendingMachines/chapel.rsi
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
parent: VendingMachine
|
||||||
|
id: vending_machine_cigs
|
||||||
|
name: Cigarette machine
|
||||||
|
components:
|
||||||
|
- type: VendingMachine
|
||||||
|
pack: Cigarette machine
|
||||||
|
- type: Icon
|
||||||
|
sprite: Buildings/VendingMachines/cigs.rsi
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
parent: VendingMachine
|
||||||
|
id: vending_machine_coffee
|
||||||
|
name: Hot Drinks machine
|
||||||
|
components:
|
||||||
|
- type: VendingMachine
|
||||||
|
pack: Hot Drinks machine
|
||||||
|
- type: Icon
|
||||||
|
sprite: Buildings/VendingMachines/dinnerware.rsi
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
parent: VendingMachine
|
||||||
|
id: vending_machine_cola
|
||||||
|
name: Robust Softdrinks
|
||||||
|
components:
|
||||||
|
- type: VendingMachine
|
||||||
|
pack: Robust Softdrinks
|
||||||
|
- type: Icon
|
||||||
|
sprite: Buildings/VendingMachines/discount.rsi
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
parent: VendingMachine
|
||||||
|
id: vending_machine_dinnerware
|
||||||
|
name: Dinnerware
|
||||||
|
components:
|
||||||
|
- type: VendingMachine
|
||||||
|
pack: Dinnerware
|
||||||
|
- type: Icon
|
||||||
|
sprite: Buildings/VendingMachines/dinnerware.rsi
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
parent: VendingMachine
|
||||||
|
id: vending_machine_discount
|
||||||
|
name: Discount Dan's
|
||||||
|
components:
|
||||||
|
- type: VendingMachine
|
||||||
|
pack: Discount Dan's
|
||||||
|
- type: Icon
|
||||||
|
sprite: Buildings/VendingMachines/discount.rsi
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
parent: VendingMachine
|
||||||
|
id: vending_machine_engivend
|
||||||
|
name: Engi-Vend
|
||||||
|
components:
|
||||||
|
- type: VendingMachine
|
||||||
|
pack: Engi-Vend
|
||||||
|
- type: Icon
|
||||||
|
sprite: Buildings/VendingMachines/engivend.rsi
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
parent: VendingMachine
|
||||||
|
id: vending_machine_hats
|
||||||
|
name: Hatlord 9000
|
||||||
|
components:
|
||||||
|
- type: VendingMachine
|
||||||
|
pack: Hatlord 9000
|
||||||
|
- type: Icon
|
||||||
|
sprite: Buildings/VendingMachines/hats.rsi
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
parent: VendingMachine
|
||||||
|
id: vending_machine_magivend
|
||||||
|
name: MagiVend
|
||||||
|
components:
|
||||||
|
- type: VendingMachine
|
||||||
|
pack: MagiVend
|
||||||
|
- type: Icon
|
||||||
|
sprite: Buildings/VendingMachines/magivend.rsi
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
parent: VendingMachine
|
||||||
|
id: vending_machine_medical
|
||||||
|
name: NanoMed Plus
|
||||||
|
components:
|
||||||
|
- type: VendingMachine
|
||||||
|
pack: NanoMed Plus
|
||||||
|
- type: Icon
|
||||||
|
sprite: Buildings/VendingMachines/medical.rsi
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
parent: VendingMachine
|
||||||
|
id: vending_machine_mining
|
||||||
|
name: Dwarven Mining Equipment
|
||||||
|
components:
|
||||||
|
- type: VendingMachine
|
||||||
|
pack: Dwarven Mining Equipment
|
||||||
|
- type: Icon
|
||||||
|
sprite: Buildings/VendingMachines/mining.rsi
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
parent: VendingMachine
|
||||||
|
id: vending_machine_nazi
|
||||||
|
name: Nazivend
|
||||||
|
components:
|
||||||
|
- type: VendingMachine
|
||||||
|
pack: Nazivend
|
||||||
|
- type: Icon
|
||||||
|
sprite: Buildings/VendingMachines/nazi.rsi
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
parent: VendingMachine
|
||||||
|
id: vending_machine_nutri
|
||||||
|
name: NutriMax
|
||||||
|
components:
|
||||||
|
- type: VendingMachine
|
||||||
|
pack: NutriMax
|
||||||
|
- type: Icon
|
||||||
|
sprite: Buildings/VendingMachines/nutri.rsi
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
parent: VendingMachine
|
||||||
|
id: vending_machine_robotics
|
||||||
|
name: Robotech Deluxe
|
||||||
|
components:
|
||||||
|
- type: VendingMachine
|
||||||
|
pack: Robotech Deluxe
|
||||||
|
- type: Icon
|
||||||
|
sprite: Buildings/VendingMachines/robotics.rsi
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
parent: VendingMachine
|
||||||
|
id: vending_machine_sales
|
||||||
|
name: Sales
|
||||||
|
components:
|
||||||
|
- type: VendingMachine
|
||||||
|
pack: Sales
|
||||||
|
- type: Icon
|
||||||
|
sprite: Buildings/VendingMachines/sale.rsi
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
parent: VendingMachine
|
||||||
|
id: vending_machine_sec
|
||||||
|
name: SecTech
|
||||||
|
components:
|
||||||
|
- type: VendingMachine
|
||||||
|
pack: SecTech
|
||||||
|
- type: Icon
|
||||||
|
sprite: Buildings/VendingMachines/sec.rsi
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
parent: VendingMachine
|
||||||
|
id: vending_machine_seeds
|
||||||
|
name: MegaSeed Servitor
|
||||||
|
components:
|
||||||
|
- type: VendingMachine
|
||||||
|
pack: MegaSeed Servitor
|
||||||
|
- type: Icon
|
||||||
|
sprite: Buildings/VendingMachines/seeds.rsi
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
parent: VendingMachine
|
||||||
|
id: vending_machine_shoes
|
||||||
|
name: Shoelord 9000
|
||||||
|
components:
|
||||||
|
- type: VendingMachine
|
||||||
|
pack: Shoelord 9000
|
||||||
|
- type: Icon
|
||||||
|
sprite: Buildings/VendingMachines/shoes.rsi
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
parent: VendingMachine
|
||||||
|
id: vending_machine_smartfridge
|
||||||
|
name: SmartFridge
|
||||||
|
components:
|
||||||
|
- type: VendingMachine
|
||||||
|
pack: SmartFridge
|
||||||
|
- type: Icon
|
||||||
|
sprite: Buildings/VendingMachines/smartfridge.rsi
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
parent: VendingMachine
|
||||||
|
id: vending_machine_snack
|
||||||
|
name: Getmore Chocolate Corp
|
||||||
|
components:
|
||||||
|
- type: VendingMachine
|
||||||
|
pack: Getmore Chocolate Corp
|
||||||
|
- type: Icon
|
||||||
|
sprite: Buildings/VendingMachines/snack.rsi
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
parent: VendingMachine
|
||||||
|
id: vending_machine_soviet
|
||||||
|
name: KomradeVendtink
|
||||||
|
components:
|
||||||
|
- type: VendingMachine
|
||||||
|
pack: KomradeVendtink
|
||||||
|
- type: Icon
|
||||||
|
sprite: Buildings/VendingMachines/soviet.rsi
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
parent: VendingMachine
|
||||||
|
id: vending_machine_sovietsoda
|
||||||
|
name: BODA
|
||||||
|
components:
|
||||||
|
- type: VendingMachine
|
||||||
|
pack: BODA
|
||||||
|
- type: Icon
|
||||||
|
sprite: Buildings/VendingMachines/sovietsoda.rsi
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
parent: VendingMachine
|
||||||
|
id: vending_machine_suits
|
||||||
|
name: Suitlord 9000
|
||||||
|
components:
|
||||||
|
- type: VendingMachine
|
||||||
|
pack: Suitlord 9000
|
||||||
|
- type: Icon
|
||||||
|
sprite: Buildings/VendingMachines/suits.rsi
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
parent: VendingMachine
|
||||||
|
id: vending_machine_theater
|
||||||
|
name: AutoDrobe
|
||||||
|
components:
|
||||||
|
- type: VendingMachine
|
||||||
|
pack: AutoDrobe
|
||||||
|
- type: Icon
|
||||||
|
sprite: Buildings/VendingMachines/theater.rsi
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
parent: VendingMachine
|
||||||
|
id: vending_machine_vendomat
|
||||||
|
name: Vendomat
|
||||||
|
components:
|
||||||
|
- type: VendingMachine
|
||||||
|
pack: Vendomat
|
||||||
|
- type: Icon
|
||||||
|
sprite: Buildings/VendingMachines/vendomat.rsi
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
parent: VendingMachine
|
||||||
|
id: vending_machine_vox
|
||||||
|
name: Trader Supply
|
||||||
|
components:
|
||||||
|
- type: VendingMachine
|
||||||
|
pack: Trader Supply
|
||||||
|
- type: Icon
|
||||||
|
sprite: Buildings/VendingMachines/vox.rsi
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
parent: VendingMachine
|
||||||
|
id: vending_machine_wallmed
|
||||||
|
name: NanoMed
|
||||||
|
components:
|
||||||
|
- type: VendingMachine
|
||||||
|
pack: NanoMed
|
||||||
|
- type: Icon
|
||||||
|
sprite: Buildings/VendingMachines/wallmed.rsi
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
parent: VendingMachine
|
||||||
|
id: vending_machine_youtool
|
||||||
|
name: YouTool
|
||||||
|
components:
|
||||||
|
- type: VendingMachine
|
||||||
|
pack: YouTool
|
||||||
|
- type: Icon
|
||||||
|
sprite: Buildings/VendingMachines/youtool.rsi
|
||||||
@@ -5,17 +5,18 @@
|
|||||||
description: A convenient storage pack
|
description: A convenient storage pack
|
||||||
components:
|
components:
|
||||||
- type: Sprite
|
- type: Sprite
|
||||||
sprite: Clothing/backpack.rsi
|
sprite: Clothing/backpacks.rsi
|
||||||
state: backpack
|
state: backpack
|
||||||
- type: Icon
|
- type: Icon
|
||||||
sprite: Clothing/backpack.rsi
|
sprite: Clothing/backpacks.rsi
|
||||||
state: backpack
|
state: backpack
|
||||||
- type: Clothing
|
- type: Clothing
|
||||||
Size: 9999
|
Size: 9999
|
||||||
QuickEquip: false
|
QuickEquip: false
|
||||||
Slots:
|
Slots:
|
||||||
- back
|
- back
|
||||||
sprite: Clothing/backpack.rsi
|
sprite: Clothing/backpacks.rsi
|
||||||
|
HeldPrefix: backpack
|
||||||
- type: Storage
|
- type: Storage
|
||||||
Capacity: 100
|
Capacity: 100
|
||||||
|
|
||||||
@@ -26,15 +27,13 @@
|
|||||||
description: It's a backpack made by Honk! Co.
|
description: It's a backpack made by Honk! Co.
|
||||||
components:
|
components:
|
||||||
- type: Sprite
|
- type: Sprite
|
||||||
sprite: Clothing/backpack_clown.rsi
|
state: clown
|
||||||
state: icon
|
|
||||||
|
|
||||||
- type: Icon
|
- type: Icon
|
||||||
sprite: Clothing/backpack_clown.rsi
|
state: clown
|
||||||
state: icon
|
|
||||||
|
|
||||||
- type: Clothing
|
- type: Clothing
|
||||||
sprite: Clothing/backpack_clown.rsi
|
HeldPrefix: clown
|
||||||
|
|
||||||
- type: entity
|
- type: entity
|
||||||
parent: BackpackClothing
|
parent: BackpackClothing
|
||||||
@@ -43,12 +42,374 @@
|
|||||||
description: It's a very robust backpack.
|
description: It's a very robust backpack.
|
||||||
components:
|
components:
|
||||||
- type: Sprite
|
- type: Sprite
|
||||||
sprite: Clothing/backpack_sec.rsi
|
state: security
|
||||||
state: icon
|
|
||||||
|
|
||||||
- type: Icon
|
- type: Icon
|
||||||
sprite: Clothing/backpack_sec.rsi
|
state: security
|
||||||
state: icon
|
|
||||||
|
|
||||||
- type: Clothing
|
- type: Clothing
|
||||||
sprite: Clothing/backpack_sec.rsi
|
HeldPrefix: security
|
||||||
|
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
parent: BackpackClothing
|
||||||
|
id: BackpackEngineering
|
||||||
|
name: Engineering Backpack
|
||||||
|
components:
|
||||||
|
- type: Sprite
|
||||||
|
state: engineering
|
||||||
|
|
||||||
|
- type: Icon
|
||||||
|
state: engineering
|
||||||
|
|
||||||
|
- type: Clothing
|
||||||
|
HeldPrefix: engineering
|
||||||
|
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
parent: BackpackClothing
|
||||||
|
id: BackpackMedical
|
||||||
|
name: Medical Backpack
|
||||||
|
components:
|
||||||
|
- type: Sprite
|
||||||
|
state: medical
|
||||||
|
|
||||||
|
- type: Icon
|
||||||
|
state: medical
|
||||||
|
|
||||||
|
- type: Clothing
|
||||||
|
HeldPrefix: medical
|
||||||
|
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
parent: BackpackClothing
|
||||||
|
id: BackpackCaptain
|
||||||
|
name: Captain's Backpack
|
||||||
|
components:
|
||||||
|
- type: Sprite
|
||||||
|
state: captain
|
||||||
|
|
||||||
|
- type: Icon
|
||||||
|
state: captain
|
||||||
|
|
||||||
|
- type: Clothing
|
||||||
|
HeldPrefix: captain
|
||||||
|
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
parent: BackpackClothing
|
||||||
|
id: BackpackHolding
|
||||||
|
name: Bag of Holding
|
||||||
|
components:
|
||||||
|
- type: Sprite
|
||||||
|
layers:
|
||||||
|
- state: holding
|
||||||
|
- state: holding-unlit
|
||||||
|
shader: unshaded
|
||||||
|
|
||||||
|
- type: Icon
|
||||||
|
state: holding
|
||||||
|
|
||||||
|
- type: Clothing
|
||||||
|
HeldPrefix: holding
|
||||||
|
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
parent: BackpackClothing
|
||||||
|
id: Satchel
|
||||||
|
name: Satchel
|
||||||
|
components:
|
||||||
|
- type: Sprite
|
||||||
|
state: satchel
|
||||||
|
|
||||||
|
- type: Icon
|
||||||
|
state: satchel
|
||||||
|
|
||||||
|
- type: Clothing
|
||||||
|
ClothingPrefix: satchel
|
||||||
|
|
||||||
|
- type: Storage
|
||||||
|
Capacity: 300
|
||||||
|
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
parent: BackpackClothing
|
||||||
|
id: SatchelEngineering
|
||||||
|
name: Engineering Satchel
|
||||||
|
components:
|
||||||
|
- type: Sprite
|
||||||
|
state: satchel-engineering
|
||||||
|
|
||||||
|
- type: Icon
|
||||||
|
state: satchel-engineering
|
||||||
|
|
||||||
|
- type: Clothing
|
||||||
|
HeldPrefix: engineering
|
||||||
|
ClothingPrefix: satchel-engineering
|
||||||
|
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
parent: BackpackClothing
|
||||||
|
id: SatchelMedical
|
||||||
|
name: Medical Satchel
|
||||||
|
components:
|
||||||
|
- type: Sprite
|
||||||
|
state: satchel-medical
|
||||||
|
|
||||||
|
- type: Icon
|
||||||
|
state: satchel-medical
|
||||||
|
|
||||||
|
- type: Clothing
|
||||||
|
HeldPrefix: medical
|
||||||
|
ClothingPrefix: satchel-medical
|
||||||
|
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
parent: BackpackClothing
|
||||||
|
id: SatchelChemistry
|
||||||
|
name: Chemistry Satchel
|
||||||
|
components:
|
||||||
|
- type: Sprite
|
||||||
|
state: satchel-chemistry
|
||||||
|
|
||||||
|
- type: Icon
|
||||||
|
state: satchel-chemistry
|
||||||
|
|
||||||
|
- type: Clothing
|
||||||
|
HeldPrefix: medical
|
||||||
|
ClothingPrefix: satchel-chemistry
|
||||||
|
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
parent: BackpackClothing
|
||||||
|
id: SatchelGenetics
|
||||||
|
name: Genetics Satchel
|
||||||
|
components:
|
||||||
|
- type: Sprite
|
||||||
|
state: satchel-genetics
|
||||||
|
|
||||||
|
- type: Icon
|
||||||
|
state: satchel-genetics
|
||||||
|
|
||||||
|
- type: Clothing
|
||||||
|
HeldPrefix: medical
|
||||||
|
ClothingPrefix: satchel-genetics
|
||||||
|
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
parent: BackpackClothing
|
||||||
|
id: SatchelVirology
|
||||||
|
name: Virology Satchel
|
||||||
|
components:
|
||||||
|
- type: Sprite
|
||||||
|
state: satchel-virology
|
||||||
|
|
||||||
|
- type: Icon
|
||||||
|
state: satchel-virology
|
||||||
|
|
||||||
|
- type: Clothing
|
||||||
|
HeldPrefix: medical
|
||||||
|
ClothingPrefix: satchel-virology
|
||||||
|
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
parent: BackpackClothing
|
||||||
|
id: SatchelScience
|
||||||
|
name: Science Satchel
|
||||||
|
components:
|
||||||
|
- type: Sprite
|
||||||
|
state: satchel-science
|
||||||
|
|
||||||
|
- type: Icon
|
||||||
|
state: satchel-science
|
||||||
|
|
||||||
|
- type: Clothing
|
||||||
|
ClothingPrefix: satchel-science
|
||||||
|
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
parent: BackpackClothing
|
||||||
|
id: SatchelSecurity
|
||||||
|
name: Security Satchel
|
||||||
|
components:
|
||||||
|
- type: Sprite
|
||||||
|
state: satchel-security
|
||||||
|
|
||||||
|
- type: Icon
|
||||||
|
state: satchel-security
|
||||||
|
|
||||||
|
- type: Clothing
|
||||||
|
HeldPrefix: security
|
||||||
|
ClothingPrefix: satchel-security
|
||||||
|
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
parent: BackpackClothing
|
||||||
|
id: SatchelCaptain
|
||||||
|
name: Captain's Satchel
|
||||||
|
components:
|
||||||
|
- type: Sprite
|
||||||
|
state: satchel-captain
|
||||||
|
|
||||||
|
- type: Icon
|
||||||
|
state: satchel-captain
|
||||||
|
|
||||||
|
- type: Clothing
|
||||||
|
HeldPrefix: captain
|
||||||
|
ClothingPrefix: satchel-captain
|
||||||
|
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
parent: BackpackClothing
|
||||||
|
id: SatchelHydroponics
|
||||||
|
name: Hydroponics Satchel
|
||||||
|
components:
|
||||||
|
- type: Sprite
|
||||||
|
state: satchel-hydroponics
|
||||||
|
|
||||||
|
- type: Icon
|
||||||
|
state: satchel-hydroponics
|
||||||
|
|
||||||
|
- type: Clothing
|
||||||
|
ClothingPrefix: satchel-hydroponics
|
||||||
|
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
parent: BackpackClothing
|
||||||
|
id: MessengerBag
|
||||||
|
name: Messenger Bag
|
||||||
|
components:
|
||||||
|
- type: Sprite
|
||||||
|
state: courier
|
||||||
|
|
||||||
|
- type: Icon
|
||||||
|
state: courier
|
||||||
|
|
||||||
|
- type: Clothing
|
||||||
|
ClothingPrefix: courier
|
||||||
|
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
parent: BackpackClothing
|
||||||
|
id: MessengerBagChemistry
|
||||||
|
name: Chemistry Messenger Bag
|
||||||
|
components:
|
||||||
|
- type: Sprite
|
||||||
|
state: courier-chemistry
|
||||||
|
|
||||||
|
- type: Icon
|
||||||
|
state: courier-chemistry
|
||||||
|
|
||||||
|
- type: Clothing
|
||||||
|
HeldPrefix: medical
|
||||||
|
ClothingPrefix: courier-chemistry
|
||||||
|
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
parent: BackpackClothing
|
||||||
|
id: MessengerBagMedical
|
||||||
|
name: Medical Messenger Bag
|
||||||
|
components:
|
||||||
|
- type: Sprite
|
||||||
|
state: courier-medical
|
||||||
|
|
||||||
|
- type: Icon
|
||||||
|
state: courier-medical
|
||||||
|
|
||||||
|
- type: Clothing
|
||||||
|
HeldPrefix: medical
|
||||||
|
ClothingPrefix: courier-medical
|
||||||
|
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
parent: BackpackClothing
|
||||||
|
id: MessengerBagVirology
|
||||||
|
name: Virology Messenger Bag
|
||||||
|
components:
|
||||||
|
- type: Sprite
|
||||||
|
state: courier-virology
|
||||||
|
|
||||||
|
- type: Icon
|
||||||
|
state: courier-virology
|
||||||
|
|
||||||
|
- type: Clothing
|
||||||
|
HeldPrefix: medical
|
||||||
|
ClothingPrefix: courier-virology
|
||||||
|
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
parent: BackpackClothing
|
||||||
|
id: MessengerBagEngineering
|
||||||
|
name: Engineering Messenger Bag
|
||||||
|
components:
|
||||||
|
- type: Sprite
|
||||||
|
state: courier-engineering
|
||||||
|
|
||||||
|
- type: Icon
|
||||||
|
state: courier-engineering
|
||||||
|
|
||||||
|
- type: Clothing
|
||||||
|
HeldPrefix: engineering
|
||||||
|
ClothingPrefix: courier-engineering
|
||||||
|
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
parent: BackpackClothing
|
||||||
|
id: MessengerBagScience
|
||||||
|
name: Science Messenger Bag
|
||||||
|
components:
|
||||||
|
- type: Sprite
|
||||||
|
state: courier-science
|
||||||
|
|
||||||
|
- type: Icon
|
||||||
|
state: courier-science
|
||||||
|
|
||||||
|
- type: Clothing
|
||||||
|
ClothingPrefix: courier-science
|
||||||
|
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
parent: BackpackClothing
|
||||||
|
id: MessengerBagCaptain
|
||||||
|
name: Captain's Messenger Bag
|
||||||
|
components:
|
||||||
|
- type: Sprite
|
||||||
|
state: courier-captain
|
||||||
|
|
||||||
|
- type: Icon
|
||||||
|
state: courier-captain
|
||||||
|
|
||||||
|
- type: Clothing
|
||||||
|
HeldPrefix: captain
|
||||||
|
ClothingPrefix: courier-captain
|
||||||
|
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
parent: BackpackClothing
|
||||||
|
id: MessengerBagHydroponics
|
||||||
|
name: Hydroponics Messenger Bag
|
||||||
|
components:
|
||||||
|
- type: Sprite
|
||||||
|
state: courier-hydroponics
|
||||||
|
|
||||||
|
- type: Icon
|
||||||
|
state: courier-hydroponics
|
||||||
|
|
||||||
|
- type: Clothing
|
||||||
|
ClothingPrefix: courier-hydroponics
|
||||||
|
|
||||||
|
|
||||||
|
- type: entity
|
||||||
|
parent: BackpackClothing
|
||||||
|
id: MessengerBagSecurity
|
||||||
|
name: Security Messenger Bag
|
||||||
|
components:
|
||||||
|
- type: Sprite
|
||||||
|
state: courier-security
|
||||||
|
|
||||||
|
- type: Icon
|
||||||
|
state: courier-security
|
||||||
|
|
||||||
|
- type: Clothing
|
||||||
|
HeldPrefix: security
|
||||||
|
ClothingPrefix: courier-security
|
||||||
|
|||||||
@@ -24,5 +24,3 @@
|
|||||||
sprite: Clothing/belt_utility.rsi
|
sprite: Clothing/belt_utility.rsi
|
||||||
- type: Storage
|
- type: Storage
|
||||||
Capacity: 30
|
Capacity: 30
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -53,19 +53,4 @@
|
|||||||
state: leather
|
state: leather
|
||||||
- type: Clothing
|
- type: Clothing
|
||||||
sprite: Clothing/gloves_leather.rsi
|
sprite: Clothing/gloves_leather.rsi
|
||||||
HeatResistance: 1500
|
HeatResistance: 1500
|
||||||
|
|
||||||
- type: entity
|
|
||||||
parent: GlovesBase
|
|
||||||
id: WhiteGloves
|
|
||||||
name: White Gloves
|
|
||||||
description: These look pretty fancy.
|
|
||||||
components:
|
|
||||||
- type: Sprite
|
|
||||||
sprite: Clothing/gloves_white.rsi
|
|
||||||
state: white
|
|
||||||
- type: Icon
|
|
||||||
sprite: Clothing/gloves_white.rsi
|
|
||||||
state: white
|
|
||||||
- type: Clothing
|
|
||||||
sprite: Clothing/gloves_white.rsi
|
|
||||||
@@ -40,37 +40,3 @@
|
|||||||
sprite: Clothing/captain_hat.rsi
|
sprite: Clothing/captain_hat.rsi
|
||||||
Slots:
|
Slots:
|
||||||
- helmet
|
- helmet
|
||||||
|
|
||||||
- type: entity
|
|
||||||
parent: HatBase
|
|
||||||
id: HatHOP
|
|
||||||
name: Head of Personnel's Hat
|
|
||||||
description: Papers, please.
|
|
||||||
components:
|
|
||||||
- type: Sprite
|
|
||||||
sprite: Clothing/hop_hat.rsi
|
|
||||||
state: hop
|
|
||||||
- type: Icon
|
|
||||||
sprite: Clothing/hop_hat.rsi
|
|
||||||
state: hop
|
|
||||||
- type: Clothing
|
|
||||||
sprite: Clothing/hop_hat.rsi
|
|
||||||
Slots:
|
|
||||||
- helmet
|
|
||||||
|
|
||||||
- type: entity
|
|
||||||
parent: HatBase
|
|
||||||
id: HatBeret
|
|
||||||
name: Beret
|
|
||||||
description: A beret, an artists favorite headwear.
|
|
||||||
components:
|
|
||||||
- type: Sprite
|
|
||||||
sprite: Clothing/beret.rsi
|
|
||||||
state: beret
|
|
||||||
- type: Icon
|
|
||||||
sprite: Clothing/beret.rsi
|
|
||||||
state: beret
|
|
||||||
- type: Clothing
|
|
||||||
sprite: Clothing/beret.rsi
|
|
||||||
Slots:
|
|
||||||
- helmet
|
|
||||||
|
|||||||
@@ -47,19 +47,4 @@
|
|||||||
sprite: Clothing/mask_clown.rsi
|
sprite: Clothing/mask_clown.rsi
|
||||||
state: icon
|
state: icon
|
||||||
- type: Clothing
|
- type: Clothing
|
||||||
sprite: Clothing/mask_clown.rsi
|
sprite: Clothing/mask_clown.rsi
|
||||||
|
|
||||||
- type: entity
|
|
||||||
parent: MasksBase
|
|
||||||
id: MaskMime
|
|
||||||
name: Mime Mask
|
|
||||||
description: The traditional mime's mask. It has an eerie facial posture.
|
|
||||||
components:
|
|
||||||
- type: Sprite
|
|
||||||
sprite: Clothing/mask_mime.rsi
|
|
||||||
state: mime
|
|
||||||
- type: Icon
|
|
||||||
sprite: Clothing/mask_mime.rsi
|
|
||||||
state: mime
|
|
||||||
- type: Clothing
|
|
||||||
sprite: Clothing/mask_mime.rsi
|
|
||||||
@@ -100,21 +100,4 @@
|
|||||||
state: brown
|
state: brown
|
||||||
|
|
||||||
- type: Clothing
|
- type: Clothing
|
||||||
sprite: Clothing/shoes_brown.rsi
|
sprite: Clothing/shoes_brown.rsi
|
||||||
|
|
||||||
- type: entity
|
|
||||||
parent: ShoesBase
|
|
||||||
id: ShoesMime
|
|
||||||
name: Mime Shoes
|
|
||||||
description: Comfortable-looking shoes.
|
|
||||||
components:
|
|
||||||
- type: Sprite
|
|
||||||
sprite: Clothing/shoes_mime.rsi
|
|
||||||
state: mime
|
|
||||||
|
|
||||||
- type: Icon
|
|
||||||
sprite: Clothing/shoes_mime.rsi
|
|
||||||
state: mime
|
|
||||||
|
|
||||||
- type: Clothing
|
|
||||||
sprite: Clothing/shoes_mime.rsi
|
|
||||||
@@ -58,18 +58,3 @@
|
|||||||
|
|
||||||
- type: Clothing
|
- type: Clothing
|
||||||
sprite: Clothing/chef_apron.rsi
|
sprite: Clothing/chef_apron.rsi
|
||||||
|
|
||||||
- type: entity
|
|
||||||
parent: SuitBase
|
|
||||||
id: BeltSuspenders
|
|
||||||
name: Suspenders
|
|
||||||
description: They suspend the illusion of the mime's play.
|
|
||||||
components:
|
|
||||||
- type: Sprite
|
|
||||||
sprite: Clothing/suspenders.rsi
|
|
||||||
state: suspenders
|
|
||||||
- type: Icon
|
|
||||||
sprite: Clothing/suspenders.rsi
|
|
||||||
state: suspenders
|
|
||||||
- type: Clothing
|
|
||||||
sprite: Clothing/suspenders.rsi
|
|
||||||
@@ -141,38 +141,4 @@
|
|||||||
state: captain
|
state: captain
|
||||||
|
|
||||||
- type: Clothing
|
- type: Clothing
|
||||||
sprite: Clothing/captain_uniform.rsi
|
sprite: Clothing/captain_uniform.rsi
|
||||||
|
|
||||||
- type: entity
|
|
||||||
parent: UniformBase
|
|
||||||
id: UniformHOP
|
|
||||||
name: Head of Personnel's Jumpsuit
|
|
||||||
description: It's a jumpsuit worn by someone who works in the position of "Head of Personnel".
|
|
||||||
components:
|
|
||||||
- type: Sprite
|
|
||||||
sprite: Clothing/hop_jumpsuit.rsi
|
|
||||||
state: hop
|
|
||||||
|
|
||||||
- type: Icon
|
|
||||||
sprite: Clothing/hop_jumpsuit.rsi
|
|
||||||
state: hop
|
|
||||||
|
|
||||||
- type: Clothing
|
|
||||||
sprite: Clothing/hop_jumpsuit.rsi
|
|
||||||
|
|
||||||
- type: entity
|
|
||||||
parent: UniformBase
|
|
||||||
id: UniformMime
|
|
||||||
name: Mime's Outfit
|
|
||||||
description: It's not very colourful.
|
|
||||||
components:
|
|
||||||
- type: Sprite
|
|
||||||
sprite: Clothing/mime_outfit.rsi
|
|
||||||
state: mime
|
|
||||||
|
|
||||||
- type: Icon
|
|
||||||
sprite: Clothing/mime_outfit.rsi
|
|
||||||
state: mime
|
|
||||||
|
|
||||||
- type: Clothing
|
|
||||||
sprite: Clothing/mime_outfit.rsi
|
|
||||||
|
|||||||
5
Resources/Prototypes/VendingMachines/ammo.yml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
- type: vendingMachineInventory
|
||||||
|
id: AmmoVend
|
||||||
|
name: AmmoVend
|
||||||
|
description: A generic ammunition vending machine.
|
||||||
|
spriteName: ammo
|
||||||
5
Resources/Prototypes/VendingMachines/boozeomat.yml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
- type: vendingMachineInventory
|
||||||
|
id: Booze-O-Mat
|
||||||
|
name: Booze-O-Mat
|
||||||
|
description: A vending machine containing multiple drinks for bartending.
|
||||||
|
spriteName: boozeomat
|
||||||
5
Resources/Prototypes/VendingMachines/cart.yml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
- type: vendingMachineInventory
|
||||||
|
id: PTech
|
||||||
|
name: PTech
|
||||||
|
description: A vending machine containing Personal Data Assistant cartridges.
|
||||||
|
spriteName: cart
|
||||||
5
Resources/Prototypes/VendingMachines/chapel.yml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
- type: vendingMachineInventory
|
||||||
|
id: PietyVend
|
||||||
|
name: PietyVend
|
||||||
|
description: "A vending machine containing religious supplies and clothing. A label reads: \"A holy vendor for a pious man.\""
|
||||||
|
spriteName: chapel
|
||||||
6
Resources/Prototypes/VendingMachines/cigs.yml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
- type: vendingMachineInventory
|
||||||
|
id: Cigarette machine
|
||||||
|
name: Cigarette machine
|
||||||
|
description: A vending machine containing smoking supplies.
|
||||||
|
animationDuration: 2.1
|
||||||
|
spriteName: cigs
|
||||||
6
Resources/Prototypes/VendingMachines/coffee.yml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
- type: vendingMachineInventory
|
||||||
|
id: Hot Drinks machine
|
||||||
|
name: Hot Drinks machine
|
||||||
|
description: A vending machine that dispenses hot drinks.
|
||||||
|
animationDuration: 3.4
|
||||||
|
spriteName: coffee
|
||||||
6
Resources/Prototypes/VendingMachines/cola.yml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
- type: vendingMachineInventory
|
||||||
|
id: Robust Softdrinks
|
||||||
|
name: Robust Softdrinks
|
||||||
|
description: A softdrink vendor provided by Robust Industries, LLC.
|
||||||
|
animationDuration: 1.1
|
||||||
|
spriteName: cola
|
||||||
5
Resources/Prototypes/VendingMachines/dinnerware.yml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
- type: vendingMachineInventory
|
||||||
|
id: Dinnerware
|
||||||
|
name: Dinnerware
|
||||||
|
description: A vending machine containing kitchen and restaurant equipment.
|
||||||
|
spriteName: dinnerware
|
||||||
5
Resources/Prototypes/VendingMachines/discount.yml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
- type: vendingMachineInventory
|
||||||
|
id: Discount Dan's
|
||||||
|
name: Discount Dan's
|
||||||
|
description: A vending machine containing discount snacks from the infamous 'Discount Dan' franchise.
|
||||||
|
spriteName: discount
|
||||||
5
Resources/Prototypes/VendingMachines/empty.yml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
- type: vendingMachineInventory
|
||||||
|
id: empty vending machine
|
||||||
|
name: empty vending machine
|
||||||
|
description: Just add capitalism!
|
||||||
|
spriteName: empty
|
||||||
6
Resources/Prototypes/VendingMachines/engivend.yml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
- type: vendingMachineInventory
|
||||||
|
id: Engi-Vend
|
||||||
|
name: Engi-Vend
|
||||||
|
description: Spare tool vending. What? Did you expect some witty description?
|
||||||
|
animationDuration: 2.1
|
||||||
|
spriteName: engivend
|
||||||
5
Resources/Prototypes/VendingMachines/hats.yml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
- type: vendingMachineInventory
|
||||||
|
id: Hatlord 9000
|
||||||
|
name: Hatlord 9000
|
||||||
|
description: A vending machine containing hats.
|
||||||
|
spriteName: hats
|
||||||
6
Resources/Prototypes/VendingMachines/magivend.yml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
- type: vendingMachineInventory
|
||||||
|
id: MagiVend
|
||||||
|
name: MagiVend
|
||||||
|
description: A mystical vending machine containing magical garments and magic supplies.
|
||||||
|
animationDuration: 1.5
|
||||||
|
spriteName: magivend
|
||||||
6
Resources/Prototypes/VendingMachines/medical.yml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
- type: vendingMachineInventory
|
||||||
|
id: NanoMed Plus
|
||||||
|
name: NanoMed Plus
|
||||||
|
description: A vending machine containing medical supplies.
|
||||||
|
animationDuration: 1.8
|
||||||
|
spriteName: medical
|
||||||
5
Resources/Prototypes/VendingMachines/mining.yml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
- type: vendingMachineInventory
|
||||||
|
id: Dwarven Mining Equipment
|
||||||
|
name: Dwarven Mining Equipment
|
||||||
|
description: Get your mining equipment here, and above all keep digging!
|
||||||
|
spriteName: mining
|
||||||
5
Resources/Prototypes/VendingMachines/nazi.yml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
- type: vendingMachineInventory
|
||||||
|
id: Nazivend
|
||||||
|
name: Nazivend
|
||||||
|
description: "A vending machine containing Nazi German supplies. A label reads: \"Remember the gorillions lost.\""
|
||||||
|
spriteName: nazi
|
||||||
5
Resources/Prototypes/VendingMachines/nutri.yml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
- type: vendingMachineInventory
|
||||||
|
id: NutriMax
|
||||||
|
name: NutriMax
|
||||||
|
description: A vending machine containing nutritional substances for plants and botanical tools.
|
||||||
|
spriteName: nutri
|
||||||
5
Resources/Prototypes/VendingMachines/robotics.yml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
- type: vendingMachineInventory
|
||||||
|
id: Robotech Deluxe
|
||||||
|
name: Robotech Deluxe
|
||||||
|
description: A vending machine containing nutritional substances for plants and botanical tools.
|
||||||
|
spriteName: robotics
|
||||||
5
Resources/Prototypes/VendingMachines/sale.yml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
- type: vendingMachineInventory
|
||||||
|
id: Sales
|
||||||
|
name: Sales
|
||||||
|
description: Buy, sell, repeat.
|
||||||
|
spriteName: sale
|
||||||
6
Resources/Prototypes/VendingMachines/sec.yml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
- type: vendingMachineInventory
|
||||||
|
id: SecTech
|
||||||
|
name: SecTech
|
||||||
|
description: "A vending machine containing Security equipment. A label reads \"SECURITY PERSONNEL ONLY\"."
|
||||||
|
animationDuration: 1.4
|
||||||
|
spriteName: sec
|
||||||
6
Resources/Prototypes/VendingMachines/seeds.yml
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
- type: vendingMachineInventory
|
||||||
|
id: MegaSeed Servitor
|
||||||
|
name: MegaSeed Servitor
|
||||||
|
description: "A vending machine containing Security equipment. A label reads \"SECURITY PERSONNEL ONLY\"."
|
||||||
|
animationDuration: 1.3
|
||||||
|
spriteName: seeds
|
||||||
5
Resources/Prototypes/VendingMachines/shoes.yml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
- type: vendingMachineInventory
|
||||||
|
id: Shoelord 9000
|
||||||
|
name: Shoelord 9000
|
||||||
|
description: A vending machine containing footwear.
|
||||||
|
spriteName: shoes
|
||||||
5
Resources/Prototypes/VendingMachines/smartfridge.yml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
- type: vendingMachineInventory
|
||||||
|
id: SmartFridge
|
||||||
|
name: SmartFridge
|
||||||
|
description: A refrigerated storage unit for storing medicine and chemicals.
|
||||||
|
spriteName: smartfridge
|
||||||
5
Resources/Prototypes/VendingMachines/snack.yml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
- type: vendingMachineInventory
|
||||||
|
id: Getmore Chocolate Corp
|
||||||
|
name: Getmore Chocolate Corp
|
||||||
|
description: A vending machine containing snacks.
|
||||||
|
spriteName: snack
|
||||||
5
Resources/Prototypes/VendingMachines/soviet.yml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
- type: vendingMachineInventory
|
||||||
|
id: KomradeVendtink
|
||||||
|
name: KomradeVendtink
|
||||||
|
description: Rodina-mat' zovyot!
|
||||||
|
spriteName: soviet
|
||||||
5
Resources/Prototypes/VendingMachines/sovietsoda.yml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
- type: vendingMachineInventory
|
||||||
|
id: BODA
|
||||||
|
name: BODA
|
||||||
|
description: An old vending machine containing sweet water.
|
||||||
|
spriteName: sovietsoda
|
||||||
5
Resources/Prototypes/VendingMachines/suits.yml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
- type: vendingMachineInventory
|
||||||
|
id: Suitlord 9000
|
||||||
|
name: Suitlord 9000
|
||||||
|
description: A vending machine containing jumpsuits and dress garments.
|
||||||
|
spriteName: suits
|
||||||
5
Resources/Prototypes/VendingMachines/theater.yml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
- type: vendingMachineInventory
|
||||||
|
id: AutoDrobe
|
||||||
|
name: AutoDrobe
|
||||||
|
description: A vending machine containing costumes.
|
||||||
|
spriteName: theater
|
||||||
5
Resources/Prototypes/VendingMachines/vendomat.yml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
- type: vendingMachineInventory
|
||||||
|
id: Vendomat
|
||||||
|
name: Vendomat
|
||||||
|
description: A vending machine containing generic parts.
|
||||||
|
spriteName: vendomat
|
||||||
5
Resources/Prototypes/VendingMachines/vox.yml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
- type: vendingMachineInventory
|
||||||
|
id: Trader Supply
|
||||||
|
name: Trader Supply
|
||||||
|
description: Make much coin.
|
||||||
|
spriteName: vox
|
||||||
5
Resources/Prototypes/VendingMachines/wallmed.yml
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
- type: vendingMachineInventory
|
||||||
|
id: NanoMed
|
||||||
|
name: NanoMed
|
||||||
|
description: Wall-mounted medical equipment dispenser.
|
||||||
|
spriteName: wallmed
|
||||||
13
Resources/Prototypes/VendingMachines/youtool.yml
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
- type: vendingMachineInventory
|
||||||
|
id: YouTool
|
||||||
|
name: YouTool
|
||||||
|
description: "A vending machine containing standard tools. A label reads: \"Tools for tools.\""
|
||||||
|
animationDuration: 1.1
|
||||||
|
spriteName: youtool
|
||||||
|
startingInventory:
|
||||||
|
CableStack: 10
|
||||||
|
Crowbar: 5
|
||||||
|
Welder: 3
|
||||||
|
Wirecutter: 5
|
||||||
|
Wrench: 5
|
||||||
|
Screwdriver: 5
|
||||||
BIN
Resources/Textures/Buildings/VendingMachines/ammo.rsi/broken.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
@@ -0,0 +1 @@
|
|||||||
|
{"version": 1, "size": {"x": 32, "y": 32}, "states": [{"name": "broken", "directions": 1, "delays": [[1.0]]}, {"name": "normal", "directions": 1, "delays": [[1.0]]}, {"name": "off", "directions": 1, "delays": [[1.0]]}]}
|
||||||
BIN
Resources/Textures/Buildings/VendingMachines/ammo.rsi/normal.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
BIN
Resources/Textures/Buildings/VendingMachines/ammo.rsi/off.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |
|
After Width: | Height: | Size: 1.4 KiB |
|
After Width: | Height: | Size: 1.6 KiB |
@@ -0,0 +1 @@
|
|||||||
|
{"version": 1, "size": {"x": 32, "y": 32}, "states": [{"name": "broken", "directions": 1, "delays": [[1.0]]}, {"name": "deny", "directions": 1, "delays": [[0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2]]}, {"name": "normal", "directions": 1, "delays": [[0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2, 0.2]]}, {"name": "off", "directions": 1, "delays": [[1.0]]}]}
|
||||||
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 988 B |
BIN
Resources/Textures/Buildings/VendingMachines/cart.rsi/broken.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
BIN
Resources/Textures/Buildings/VendingMachines/cart.rsi/deny.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
BIN
Resources/Textures/Buildings/VendingMachines/cart.rsi/eject.png
Normal file
|
After Width: | Height: | Size: 1.8 KiB |
@@ -0,0 +1 @@
|
|||||||
|
{"version": 1, "size": {"x": 32, "y": 32}, "states": [{"name": "broken", "directions": 1, "delays": [[1.0]]}, {"name": "deny", "directions": 1, "delays": [[0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1]]}, {"name": "eject", "directions": 1, "delays": [[1.0, 0.5, 0.1, 0.1, 0.1, 1.0, 0.1, 0.1, 0.1, 0.3]]}, {"name": "normal", "directions": 1, "delays": [[1.0]]}, {"name": "off", "directions": 1, "delays": [[1.0]]}]}
|
||||||
BIN
Resources/Textures/Buildings/VendingMachines/cart.rsi/normal.png
Normal file
|
After Width: | Height: | Size: 1.0 KiB |
BIN
Resources/Textures/Buildings/VendingMachines/cart.rsi/off.png
Normal file
|
After Width: | Height: | Size: 967 B |
|
After Width: | Height: | Size: 969 B |
BIN
Resources/Textures/Buildings/VendingMachines/chapel.rsi/deny.png
Normal file
|
After Width: | Height: | Size: 3.0 KiB |
@@ -0,0 +1 @@
|
|||||||
|
{"version": 1, "size": {"x": 32, "y": 32}, "states": [{"name": "broken", "directions": 1, "delays": [[1.0]]}, {"name": "deny", "directions": 1, "delays": [[0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.1, 0.05, 0.1, 0.05, 0.1, 0.05, 0.1, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05]]}, {"name": "normal", "directions": 1, "delays": [[2.0, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 2.0, 0.05, 0.05, 2.0, 0.05, 0.05, 0.05, 2.0, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 2.0, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.5, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 1.0, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05, 0.05]]}, {"name": "off", "directions": 1, "delays": [[1.0]]}]}
|
||||||
|
After Width: | Height: | Size: 24 KiB |
BIN
Resources/Textures/Buildings/VendingMachines/chapel.rsi/off.png
Normal file
|
After Width: | Height: | Size: 651 B |
BIN
Resources/Textures/Buildings/VendingMachines/cigs.rsi/broken.png
Normal file
|
After Width: | Height: | Size: 1.5 KiB |
BIN
Resources/Textures/Buildings/VendingMachines/cigs.rsi/eject.png
Normal file
|
After Width: | Height: | Size: 1.9 KiB |
@@ -0,0 +1 @@
|
|||||||
|
{"version": 1, "size": {"x": 32, "y": 32}, "states": [{"name": "broken", "directions": 1, "delays": [[1.0]]}, {"name": "eject", "directions": 1, "delays": [[1.0, 0.2, 0.1, 0.1, 0.1, 0.1, 1.0, 0.1, 0.1, 0.1]]}, {"name": "normal", "directions": 1, "delays": [[1.0]]}, {"name": "off", "directions": 1, "delays": [[1.0]]}]}
|
||||||
BIN
Resources/Textures/Buildings/VendingMachines/cigs.rsi/normal.png
Normal file
|
After Width: | Height: | Size: 1.1 KiB |