The real movement refactor (#9645)

* The real movement refactor

* ref events

* Jetpack cleanup

* a

* Vehicles partially working

* Balance tweaks

* Restore some shitcode

* AAAAAAAA

* Even more prediction

* ECS compstate trying to fix this

* yml

* vehicles kill me

* Don't lock keys

* a

* Fix problem

* Fix sounds

* shuttle inputs

* Shuttle controls

* space brakes

* Keybinds

* Fix merge

* Handle shutdown

* Fix keys

* Bump friction

* fix buckle offset

* Fix relay and friction

* Fix jetpack turning

* contexts amirite
This commit is contained in:
metalgearsloth
2022-07-16 13:51:52 +10:00
committed by GitHub
parent e0b7b48cae
commit b9e876ca92
109 changed files with 1752 additions and 1584 deletions

View File

@@ -1,6 +1,5 @@
using Content.Shared.Actions.ActionTypes;
using Content.Shared.Sound;
using Content.Shared.Containers.ItemSlots;
using Robust.Shared.Audio;
using Robust.Shared.Utility;
@@ -17,7 +16,7 @@ namespace Content.Shared.Vehicle.Components
{
/// <summary>
/// Whether someone is currently riding the vehicle
/// </summary
/// </summary>
public bool HasRider = false;
/// <summary>
@@ -27,7 +26,47 @@ namespace Content.Shared.Vehicle.Components
public EntityUid? Rider;
/// <summary>
/// Whether the vehicle should treat north as it's unique direction in its visualizer
/// The base offset for the vehicle (when facing east)
/// </summary>
public Vector2 BaseBuckleOffset = Vector2.Zero;
/// <summary>
/// The sound that the horn makes
/// </summary>
[DataField("hornSound")] public SoundSpecifier? HornSound =
new SoundPathSpecifier("/Audio/Effects/Vehicle/carhorn.ogg")
{
Params =
{
Volume = -3f,
}
};
public IPlayingAudioStream? HonkPlayingStream;
/// Use ambient sound component for the idle sound.
/// <summary>
/// The action for the horn (if any)
/// </summary>
[DataField("hornAction")]
public InstantAction HornAction = new()
{
UseDelay = TimeSpan.FromSeconds(3.4),
Icon = new SpriteSpecifier.Texture(new ResourcePath("Objects/Fun/bikehorn.rsi/icon.png")),
Name = "action-name-honk",
Description = "action-desc-honk",
Event = new HonkActionEvent(),
};
/// <summary>
/// Whether the vehicle has a key currently inside it or not.
/// </summary>
public bool HasKey = false;
// TODO: Fix this
/// <summary>
/// Whether the vehicle should treat north as its unique direction in its visualizer
/// </summary>
[DataField("northOnly")]
public bool NorthOnly = false;
@@ -43,55 +82,5 @@ namespace Content.Shared.Vehicle.Components
/// </summary>
[DataField("southOverride")]
public float SouthOverride = 0f;
/// <summary>
/// The base offset for the vehicle (when facing east)
/// </summary>
public Vector2 BaseBuckleOffset = Vector2.Zero;
/// <summary>
/// The sound that the horn makes
/// </summary>
[DataField("hornSound")]
public SoundSpecifier? HornSound = new SoundPathSpecifier("/Audio/Effects/Vehicle/carhorn.ogg");
/// <summary>
/// Whether the horn is a siren or not.
/// </summary>
[DataField("hornIsSiren")]
public bool HornIsLooping = false;
/// <summary>
/// If this vehicle has a siren currently playing.
/// </summary>
public bool LoopingHornIsPlaying = false;
public IPlayingAudioStream? SirenPlayingStream;
/// Use ambient sound component for the idle sound.
/// <summary>
/// The action for the horn (if any)
/// </summary>
[DataField("hornAction")]
public InstantAction HornAction = new()
{
UseDelay = TimeSpan.FromSeconds(3.4),
Icon = new SpriteSpecifier.Texture(new ResourcePath("Objects/Fun/bikehorn.rsi/icon.png")),
Name = "action-name-honk",
Description = "action-desc-honk",
Event = new HonkActionEvent(),
};
/// <summary>
/// The prototype ID of the key that was inserted so it can be
/// spawned when the key is removed.
/// </summary>
public ItemSlot KeySlot = new();
/// <summary>
/// Whether the vehicle has a key currently inside it or not.
/// </summary>
public bool HasKey = false;
}
}