Skip to content

Commit

Permalink
Do not show FSD as active when in supercruise
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewdsmith committed Oct 3, 2021
1 parent 26a34a3 commit f595cf2
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 16 deletions.
4 changes: 4 additions & 0 deletions Changes.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changes

## Version 1.11

- Do not show FSD as active when in supercruise

## Version 1.10

- Supports active state for night vision control
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ state of your ship or SRV in the game.

The app monitors the state of the following:

- Landing gear
- Cargo scoop
- External lights
- Frame shift drive (FSD)
- Silent running
- Hardpoints
- Night vision
- Landing gear deployed
- Cargo scoop open
- External lights activated
- Frame shift drive (FSD) charging
- Silent running activated
- Hardpoints deployed
- Night vision activated

Where a game control for these items is bound to a button on the joystick, the
button light will indicate the following states:
Expand Down
13 changes: 4 additions & 9 deletions src/game/ship.rs
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,8 @@ impl Ship {
// flight, specifically for blocking states like
// hardpoints deployed.
ConditionStatusLevelMapping::new(
Condition::All(SUPERCRUISE),
StatusLevel::Active,
Condition::All(SUPERCRUISE | HARDPOINTS_DEPLOYED),
StatusLevel::Inactive,
),
ConditionStatusLevelMapping::new(
Condition::Any(
Expand Down Expand Up @@ -665,16 +665,11 @@ mod tests {
}

#[test]
fn supercruise_maps_to_frame_shift_drive_active() {
assert_status(SUPERCRUISE, Attribute::FrameShiftDrive, StatusLevel::Active);
}

#[test]
fn supercruise_and_hardpoints_deployed_and_maps_to_frame_shift_drive_active() {
fn supercruise_and_hardpoints_deployed_and_maps_to_frame_shift_drive_inactive() {
assert_status(
SUPERCRUISE + HARDPOINTS_DEPLOYED,
Attribute::FrameShiftDrive,
StatusLevel::Active,
StatusLevel::Inactive,
);
}

Expand Down

0 comments on commit f595cf2

Please sign in to comment.