Switch drone mode handling to use enums
This commit is contained in:
@@ -110,3 +110,10 @@ class GuiAttrGroup(IntEnum):
|
||||
PROPULSIONS = auto()
|
||||
FIGHTERS = auto()
|
||||
SHIP_GROUP = auto()
|
||||
|
||||
|
||||
@unique
|
||||
class GraphDpsDroneMode(IntEnum):
|
||||
auto = 1
|
||||
followAttacker = 2
|
||||
followTarget = 3
|
||||
|
||||
@@ -23,9 +23,12 @@ import urllib.request
|
||||
import urllib.error
|
||||
import urllib.parse
|
||||
|
||||
from logbook import Logger
|
||||
|
||||
import config
|
||||
import eos.config
|
||||
from logbook import Logger
|
||||
from service.const import GraphDpsDroneMode
|
||||
|
||||
|
||||
pyfalog = Logger(__name__)
|
||||
|
||||
@@ -514,7 +517,7 @@ class GraphSettings:
|
||||
|
||||
def __init__(self):
|
||||
defaults = {
|
||||
'mobileDroneMode': 'auto',
|
||||
'mobileDroneMode': GraphDpsDroneMode.auto,
|
||||
'ignoreResists': True}
|
||||
self.settings = SettingsProvider.getInstance().getSettings('graphSettings', defaults)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user