Remove vehicles (#24681)
* Remove wheelchairs Vehicle code is dogwater and wheelchairs just keeps exposing edgecases. If someone wants it brought it back they can do vehicle refactor. * Also this one * Remove vehicles * goodbye vehicles * Remove this check * sasd * Cronch * Add sprites back * jani
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
using System.Numerics;
|
||||
using Content.Shared.Alert;
|
||||
using Content.Shared.Vehicle;
|
||||
using Content.Shared.Whitelist;
|
||||
using Robust.Shared.Audio;
|
||||
using Robust.Shared.GameStates;
|
||||
@@ -9,7 +8,7 @@ using Robust.Shared.Serialization;
|
||||
namespace Content.Shared.Buckle.Components;
|
||||
|
||||
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
|
||||
[Access(typeof(SharedBuckleSystem), typeof(SharedVehicleSystem))]
|
||||
[Access(typeof(SharedBuckleSystem))]
|
||||
public sealed partial class StrapComponent : Component
|
||||
{
|
||||
/// <summary>
|
||||
|
||||
@@ -16,7 +16,6 @@ using Content.Shared.Standing;
|
||||
using Content.Shared.Storage.Components;
|
||||
using Content.Shared.Stunnable;
|
||||
using Content.Shared.Throwing;
|
||||
using Content.Shared.Vehicle.Components;
|
||||
using Content.Shared.Verbs;
|
||||
using Robust.Shared.Physics.Components;
|
||||
using Robust.Shared.Physics.Events;
|
||||
@@ -124,16 +123,6 @@ public abstract partial class SharedBuckleSystem
|
||||
|
||||
private void OnBuckleStandAttempt(EntityUid uid, BuckleComponent component, StandAttemptEvent args)
|
||||
{
|
||||
//Let entities stand back up while on vehicles so that they can be knocked down when slept/stunned
|
||||
//This prevents an exploit that allowed people to become partially invulnerable to stuns
|
||||
//while on vehicles
|
||||
|
||||
if (component.BuckledTo != null)
|
||||
{
|
||||
var buckle = component.BuckledTo;
|
||||
if (TryComp<VehicleComponent>(buckle, out _))
|
||||
return;
|
||||
}
|
||||
if (component.Buckled)
|
||||
args.Cancel();
|
||||
}
|
||||
@@ -149,8 +138,7 @@ public abstract partial class SharedBuckleSystem
|
||||
if (component.LifeStage > ComponentLifeStage.Running)
|
||||
return;
|
||||
|
||||
if (component.Buckled &&
|
||||
!HasComp<VehicleComponent>(component.BuckledTo)) // buckle+vehicle shitcode
|
||||
if (component.Buckled) // buckle shitcode
|
||||
args.Cancel();
|
||||
}
|
||||
|
||||
@@ -436,10 +424,6 @@ public abstract partial class SharedBuckleSystem
|
||||
if (HasComp<SleepingComponent>(buckleUid) && buckleUid == userUid)
|
||||
return false;
|
||||
|
||||
// If the strap is a vehicle and the rider is not the person unbuckling, return. Unless the rider is crit or dead.
|
||||
if (TryComp<VehicleComponent>(strapUid, out var vehicle) && vehicle.Rider != userUid && !_mobState.IsIncapacitated(buckleUid))
|
||||
return false;
|
||||
|
||||
// If the person is crit or dead in any kind of strap, return. This prevents people from unbuckling themselves while incapacitated.
|
||||
if (_mobState.IsIncapacitated(buckleUid) && userUid == buckleUid)
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user