* mechs * interaction relay * atmos handling * fuck around with interaction events SPAGHETTI CODE OH MY GOD * more sprites and whatever the hell * more mech shit * more shit for equipment * starting equipment (for nukie mechs and such) * equipment cycling * starting with some of the ui * a fat chunk of ui prototyping * done tinkering with ui * a bunch of ui stuff and what have yous * cleaning up grabber and state handling * make the ui actually functional + watch me port a million icons I swear i'll prune the sprites later blease * start on construction * construction yo mamma * remove some unused files * fix a silly * make the graph sane * make it actually constructible. * print the boards as well, bozo * rebalance part prices * eject action also i appease the russians by remembering to localize * Punch Shit * make mech integrity and repairs work * Make the UI more based STOMP STOMP STOMP STOMP * make equipment even more based * batteries and other such delights * make the ui look pimpin af * make the construction mega based * UI but so epic * equipment * some sweat tweaks * damage rebalancing * restructure tech * fix some shit * mechs inherit access * make icons actually use sprite specifiers * TRAILING COMMAA!!!!! * fix a mild indentation sin * undo this change because it isn't needed * actually fix this * secret webeditting shhhh * place this tech here * comments * foo
75 lines
2.0 KiB
C#
75 lines
2.0 KiB
C#
using System.Threading;
|
|
using Robust.Shared.Audio;
|
|
using Robust.Shared.Containers;
|
|
|
|
namespace Content.Server.Mech.Equipment.Components;
|
|
|
|
/// <summary>
|
|
/// A piece of mech equipment that grabs entities and stores them
|
|
/// inside of a container so large objects can be moved.
|
|
/// </summary>
|
|
[RegisterComponent]
|
|
public sealed class MechGrabberComponent : Component
|
|
{
|
|
/// <summary>
|
|
/// The change in energy after each grab.
|
|
/// </summary>
|
|
[DataField("grabEnergyDelta")]
|
|
public float GrabEnergyDelta = -30;
|
|
|
|
/// <summary>
|
|
/// How long does it take to grab something?
|
|
/// </summary>
|
|
[DataField("grabDelay")]
|
|
public float GrabDelay = 2.5f;
|
|
|
|
/// <summary>
|
|
/// The offset from the mech when an item is dropped.
|
|
/// This is here for things like lockers and vendors
|
|
/// </summary>
|
|
[DataField("depositOffset")]
|
|
public Vector2 DepositOffset = new(0, -1);
|
|
|
|
/// <summary>
|
|
/// The maximum amount of items that can be fit in this grabber
|
|
/// </summary>
|
|
[DataField("maxContents")]
|
|
public int MaxContents = 10;
|
|
|
|
/// <summary>
|
|
/// The sound played when a mech is grabbing something
|
|
/// </summary>
|
|
[DataField("grabSound")]
|
|
public SoundSpecifier GrabSound = new SoundPathSpecifier("/Audio/Mecha/sound_mecha_hydraulic.ogg");
|
|
|
|
public IPlayingAudioStream? AudioStream;
|
|
|
|
[ViewVariables(VVAccess.ReadWrite)]
|
|
public Container ItemContainer = default!;
|
|
public CancellationTokenSource? Token;
|
|
}
|
|
|
|
/// <summary>
|
|
/// Event raised on the user when the grab is complete.
|
|
/// </summary>
|
|
public sealed class MechGrabberGrabFinishedEvent : EntityEventArgs
|
|
{
|
|
/// <summary>
|
|
/// The thing that was grabbed.
|
|
/// </summary>
|
|
public EntityUid Grabbed;
|
|
|
|
public MechGrabberGrabFinishedEvent(EntityUid grabbed)
|
|
{
|
|
Grabbed = grabbed;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
/// Event raised on the user when the grab fails
|
|
/// </summary>
|
|
public sealed class MechGrabberGrabCancelledEvent : EntityEventArgs
|
|
{
|
|
|
|
}
|