| 397 | |
| 398 | |
| 399 | class StatViewSettings: |
| 400 | _instance = None |
| 401 | |
| 402 | @classmethod |
| 403 | def getInstance(cls): |
| 404 | if cls._instance is None: |
| 405 | cls._instance = StatViewSettings() |
| 406 | |
| 407 | return cls._instance |
| 408 | |
| 409 | def __init__(self): |
| 410 | # mode |
| 411 | # 0 - Do not show |
| 412 | # 1 - Minimal/Text Only View |
| 413 | # 2 - Full View |
| 414 | serviceStatViewDefaultSettings = { |
| 415 | "resources" : 2, |
| 416 | "resistances" : 2, |
| 417 | "recharge" : 2, |
| 418 | "firepower" : 2, |
| 419 | "capacitor" : 2, |
| 420 | "targetingMisc": 1, |
| 421 | "price" : 2, |
| 422 | "miningyield" : 2, |
| 423 | "drones" : 2, |
| 424 | "outgoing" : 2, |
| 425 | "bombing" : 0, |
| 426 | } |
| 427 | |
| 428 | self.serviceStatViewDefaultSettings = SettingsProvider.getInstance().getSettings("pyfaServiceStatViewSettings", serviceStatViewDefaultSettings) |
| 429 | |
| 430 | def get(self, type): |
| 431 | return self.serviceStatViewDefaultSettings[type] |
| 432 | |
| 433 | def set(self, type, value): |
| 434 | self.serviceStatViewDefaultSettings[type] = value |
| 435 | |
| 436 | |
| 437 | class MarketPriceSettings: |