Skip to content

Commit

Permalink
Merge branch 'master' into fold-doafter
Browse files Browse the repository at this point in the history
  • Loading branch information
DexlerXD authored Aug 5, 2024
2 parents 5b7883d + 441a94e commit 3c8bf1d
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Content.Shared/Buckle/SharedBuckleSystem.Buckle.cs
Original file line number Diff line number Diff line change
Expand Up @@ -446,10 +446,14 @@ public bool TryUnbuckle(Entity<BuckleComponent?> buckle, EntityUid? user, bool p
vehicle.Rider != user && !_mobState.IsIncapacitated(buckle))
{
//SS220-Vehicle-doafter-fix begin
var unbuckleTime = buckle.Comp.VehicleUnbuckleTime;

if (vehicle.UnbuckleTime != null)
unbuckleTime = vehicle.UnbuckleTime.Value;
//So here if the one to unbuckle isn't one riding the vehicle,
//we are raising DoAfter event, so you need some time to
//unbuckle someone from a vehicle.
var doAfterEventArgs = new DoAfterArgs(EntityManager, user.Value, buckle.Comp.VehicleUnbuckleTime, new UnbuckleDoAfterEvent(),
var doAfterEventArgs = new DoAfterArgs(EntityManager, user.Value, unbuckleTime, new UnbuckleDoAfterEvent(),
vehicle.Rider, target: vehicle.Rider)
{
BreakOnMove = true,
Expand Down
10 changes: 10 additions & 0 deletions Content.Shared/SS220/Vehicle/Components/VehicleComponent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -111,4 +111,14 @@ public sealed partial class VehicleComponent : Component
[DataField("hideRider")]
[ViewVariables(VVAccess.ReadWrite)]
public bool HideRider;


// SS220 Wheelchair fix begin
/// <summary>
/// Time needed to unbuckle an entity from a vehicle. Overrides Buckle unbuckle time if not null.
/// </summary>
[DataField("unbuckleTime")]
[ViewVariables(VVAccess.ReadWrite)]
public TimeSpan? UnbuckleTime;
// SS220 Wheelchair fix end
}
10 changes: 10 additions & 0 deletions Resources/Changelog/Changelog220.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4426,3 +4426,13 @@
id: 351
time: '2024-08-05T10:25:46.0000000+00:00'
url: https://github.com/SerbiaStrong-220/space-station-14/pull/1512
- author: Ady4
changes:
- message: "\u0423\u0432\u0435\u043B\u0438\u0447\u0435\u043D\u043E \u0432\u0440\u0435\
\u043C\u044F \u0434\u043B\u044F \u0441\u043D\u044F\u0442\u0438\u044F \u0438\u043D\
\u0432\u0430\u043B\u0438\u0434\u0430 \u0441 \u043A\u043E\u043B\u044F\u0441\u043A\
\u0438."
type: Tweak
id: 352
time: '2024-08-05T11:49:50.0000000+00:00'
url: https://github.com/SerbiaStrong-220/space-station-14/pull/1496
Original file line number Diff line number Diff line change
Expand Up @@ -419,6 +419,7 @@
hasKey: true
northOverride: 0
southOverride: 0
unbuckleTime: 2 # SS220 wheelchair fix 04.08
#SS220-fold-doafter begin
- type: Foldable
foldTime: 1
Expand Down

0 comments on commit 3c8bf1d

Please sign in to comment.