Skip to content

Commit

Permalink
Fix CanShuttle Not Preventing Recalls (#1180)
Browse files Browse the repository at this point in the history
# Description

CommunicationConsoleComponent.CanShuttle claims its supposed to prevent
a given console from Calling OR Recalling the shuttle, but instead it
only prevents CALLING the shuttle, but not RECALLING it. This fixes
that.

# Changelog

:cl:
- fix: Communications Consoles that are marked as "Can't Recall The
Shuttle" now can't recall the shuttle. Previously they were still able
to recall it.
  • Loading branch information
VMSolidus authored Nov 5, 2024
1 parent c58500a commit b1e2e73
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions Content.Server/Communications/CommunicationsConsoleSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -200,13 +200,11 @@ private bool CanUse(EntityUid user, EntityUid console)
private bool CanCallOrRecall(CommunicationsConsoleComponent comp)
{
// Defer to what the round end system thinks we should be able to do.
if (_emergency.EmergencyShuttleArrived || !_roundEndSystem.CanCallOrRecall())
if (_emergency.EmergencyShuttleArrived
|| !_roundEndSystem.CanCallOrRecall()
|| !comp.CanShuttle)
return false;

// Calling shuttle checks
if (_roundEndSystem.ExpectedCountdownEnd is null)
return comp.CanShuttle;

// Recalling shuttle checks
var recallThreshold = _cfg.GetCVar(CCVars.EmergencyRecallTurningPoint);

Expand Down

0 comments on commit b1e2e73

Please sign in to comment.