From dda5a86f3dfc134d115deba0923bbd5f08dabb62 Mon Sep 17 00:00:00 2001 From: Athanasius Date: Sat, 3 Apr 2021 11:15:38 +0100 Subject: [PATCH] Move Status.json flags into data.py These aren't used by any core code, but at least one plugin uses one. --- data.py | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ plug.py | 49 ------------------------------------------------- 2 files changed, 48 insertions(+), 49 deletions(-) diff --git a/data.py b/data.py index 710bc2fd..ef50c9a9 100644 --- a/data.py +++ b/data.py @@ -376,3 +376,51 @@ outfitting_internal_map = { ('shieldgenerator', 'strong'): 'Prismatic Shield Generator', 'unkvesselresearch': 'Research Limpet Controller', } + +# Dashboard Flags constants +FlagsDocked = 1 << 0 # on a landing pad +FlagsLanded = 1 << 1 # on planet surface +FlagsLandingGearDown = 1 << 2 +FlagsShieldsUp = 1 << 3 +FlagsSupercruise = 1 << 4 +FlagsFlightAssistOff = 1 << 5 +FlagsHardpointsDeployed = 1 << 6 +FlagsInWing = 1 << 7 +FlagsLightsOn = 1 << 8 +FlagsCargoScoopDeployed = 1 << 9 +FlagsSilentRunning = 1 << 10 +FlagsScoopingFuel = 1 << 11 +FlagsSrvHandbrake = 1 << 12 +FlagsSrvTurret = 1 << 13 # using turret view +FlagsSrvUnderShip = 1 << 14 # turret retracted +FlagsSrvDriveAssist = 1 << 15 +FlagsFsdMassLocked = 1 << 16 +FlagsFsdCharging = 1 << 17 +FlagsFsdCooldown = 1 << 18 +FlagsLowFuel = 1 << 19 # < 25% +FlagsOverHeating = 1 << 20 # > 100%, or is this 80% now ? +FlagsHasLatLong = 1 << 21 +FlagsIsInDanger = 1 << 22 +FlagsBeingInterdicted = 1 << 23 +FlagsInMainShip = 1 << 24 +FlagsInFighter = 1 << 25 +FlagsInSRV = 1 << 26 +FlagsAnalysisMode = 1 << 27 # Hud in Analysis mode +FlagsNightVision = 1 << 28 +FlagsAverageAltitude = 1 << 29 # Altitude from Average radius +FlagsFsdJump = 1 << 30 +FlagsSrvHighBeam = 1 << 31 + +# Dashboard GuiFocus constants +GuiFocusNoFocus = 0 +GuiFocusInternalPanel = 1 # right hand side +GuiFocusExternalPanel = 2 # left hand side +GuiFocusCommsPanel = 3 # top +GuiFocusRolePanel = 4 # bottom +GuiFocusStationServices = 5 +GuiFocusGalaxyMap = 6 +GuiFocusSystemMap = 7 +GuiFocusOrrery = 8 +GuiFocusFSS = 9 +GuiFocusSAA = 10 +GuiFocusCodex = 11 diff --git a/plug.py b/plug.py index e1d8a52b..1ca11072 100644 --- a/plug.py +++ b/plug.py @@ -19,55 +19,6 @@ import logging logger = get_main_logger() -# Dashboard Flags constants -FlagsDocked = 1 << 0 # on a landing pad -FlagsLanded = 1 << 1 # on planet surface -FlagsLandingGearDown = 1 << 2 -FlagsShieldsUp = 1 << 3 -FlagsSupercruise = 1 << 4 -FlagsFlightAssistOff = 1 << 5 -FlagsHardpointsDeployed = 1 << 6 -FlagsInWing = 1 << 7 -FlagsLightsOn = 1 << 8 -FlagsCargoScoopDeployed = 1 << 9 -FlagsSilentRunning = 1 << 10 -FlagsScoopingFuel = 1 << 11 -FlagsSrvHandbrake = 1 << 12 -FlagsSrvTurret = 1 << 13 # using turret view -FlagsSrvUnderShip = 1 << 14 # turret retracted -FlagsSrvDriveAssist = 1 << 15 -FlagsFsdMassLocked = 1 << 16 -FlagsFsdCharging = 1 << 17 -FlagsFsdCooldown = 1 << 18 -FlagsLowFuel = 1 << 19 # <25% -FlagsOverHeating = 1 << 20 # > 100% -FlagsHasLatLong = 1 << 21 -FlagsIsInDanger = 1 << 22 -FlagsBeingInterdicted = 1 << 23 -FlagsInMainShip = 1 << 24 -FlagsInFighter = 1 << 25 -FlagsInSRV = 1 << 26 -FlagsAnalysisMode = 1 << 27 # Hud in Analysis mode -FlagsNightVision = 1 << 28 -FlagsAverageAltitude = 1 << 29 # Altitude from Average radius -FlagsFsdJump = 1 << 30 -FlagsSrvHighBeam = 1 << 31 - -# Dashboard GuiFocus constants -GuiFocusNoFocus = 0 -GuiFocusInternalPanel = 1 # right hand side -GuiFocusExternalPanel = 2 # left hand side -GuiFocusCommsPanel = 3 # top -GuiFocusRolePanel = 4 # bottom -GuiFocusStationServices = 5 -GuiFocusGalaxyMap = 6 -GuiFocusSystemMap = 7 -GuiFocusOrrery = 8 -GuiFocusFSS = 9 -GuiFocusSAA = 10 -GuiFocusCodex = 11 - - # List of loaded Plugins PLUGINS = [] PLUGINS_not_py3 = []