Merge remote-tracking branch 'upstream/stable' into ed-15-10-2024-upstream
# Conflicts: # Content.Server/Station/Systems/StationSpawningSystem.cs
This commit is contained in:
@@ -244,18 +244,28 @@ public sealed partial class ShuttleSystem
|
||||
/// </summary>
|
||||
public bool CanFTL(EntityUid shuttleUid, [NotNullWhen(false)] out string? reason)
|
||||
{
|
||||
// Currently in FTL already
|
||||
if (HasComp<FTLComponent>(shuttleUid))
|
||||
{
|
||||
reason = Loc.GetString("shuttle-console-in-ftl");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (FTLMassLimit > 0 &&
|
||||
TryComp(shuttleUid, out PhysicsComponent? shuttlePhysics) &&
|
||||
shuttlePhysics.Mass > FTLMassLimit)
|
||||
if (TryComp<PhysicsComponent>(shuttleUid, out var shuttlePhysics))
|
||||
{
|
||||
reason = Loc.GetString("shuttle-console-mass");
|
||||
return false;
|
||||
// Static physics type is set when station anchor is enabled
|
||||
if (shuttlePhysics.BodyType == BodyType.Static)
|
||||
{
|
||||
reason = Loc.GetString("shuttle-console-static");
|
||||
return false;
|
||||
}
|
||||
|
||||
// Too large to FTL
|
||||
if (FTLMassLimit > 0 && shuttlePhysics.Mass > FTLMassLimit)
|
||||
{
|
||||
reason = Loc.GetString("shuttle-console-mass");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (HasComp<PreventPilotComponent>(shuttleUid))
|
||||
|
||||
Reference in New Issue
Block a user