Add arrivals (#14755)

* Arrivals

* More arrivals and shitty uhh preload

* cvar

* a

* clockin + maps

* shitter prevention

* Placement

* a

* cvar for tests and dev

* weh
This commit is contained in:
metalgearsloth
2023-03-22 20:29:55 +11:00
committed by GitHub
parent a26b284349
commit f3a06a0696
39 changed files with 9456 additions and 141 deletions

View File

@@ -264,7 +264,7 @@ namespace Content.Server.Physics.Controllers
// Reset inputs for non-piloted shuttles.
foreach (var (shuttle, _) in _shuttlePilots)
{
if (newPilots.ContainsKey(shuttle) || FTLLocked(shuttle)) continue;
if (newPilots.ContainsKey(shuttle) || CanPilot(shuttle)) continue;
_thruster.DisableLinearThrusters(shuttle);
}
@@ -275,7 +275,7 @@ namespace Content.Server.Physics.Controllers
// then do the movement input once for it.
foreach (var (shuttle, pilots) in _shuttlePilots)
{
if (Paused(shuttle.Owner) || FTLLocked(shuttle) || !TryComp(shuttle.Owner, out PhysicsComponent? body)) continue;
if (Paused(shuttle.Owner) || CanPilot(shuttle) || !TryComp(shuttle.Owner, out PhysicsComponent? body)) continue;
var shuttleNorthAngle = Transform(body.Owner).WorldRotation;
@@ -559,10 +559,11 @@ namespace Content.Server.Physics.Controllers
}
}
private bool FTLLocked(ShuttleComponent shuttle)
private bool CanPilot(ShuttleComponent shuttle)
{
return (TryComp<FTLComponent>(shuttle.Owner, out var ftl) &&
(ftl.State & (FTLState.Starting | FTLState.Travelling | FTLState.Arriving)) != 0x0);
return TryComp<FTLComponent>(shuttle.Owner, out var ftl) &&
(ftl.State & (FTLState.Starting | FTLState.Travelling | FTLState.Arriving)) != 0x0 ||
HasComp<PreventPilotComponent>(shuttle.Owner);
}
}