| 435 | |
| 436 | |
| 437 | class MarketPriceSettings: |
| 438 | _instance = None |
| 439 | |
| 440 | @classmethod |
| 441 | def getInstance(cls): |
| 442 | if cls._instance is None: |
| 443 | cls._instance = MarketPriceSettings() |
| 444 | |
| 445 | return cls._instance |
| 446 | |
| 447 | def __init__(self): |
| 448 | # mode |
| 449 | # 0 - Do not add to total |
| 450 | # 1 - Add to total |
| 451 | PriceMenuDefaultSettings = { |
| 452 | "drones" : 1, |
| 453 | "cargo" : 1, |
| 454 | "character" : 0, |
| 455 | "marketMGJumpMode": 0, |
| 456 | "marketMGEmptyMode": 1, |
| 457 | "marketMGSearchMode": 0, |
| 458 | "marketMGMarketSelectMode": 0 |
| 459 | } |
| 460 | |
| 461 | self.PriceMenuDefaultSettings = SettingsProvider.getInstance().getSettings("pyfaPriceMenuSettings", |
| 462 | PriceMenuDefaultSettings) |
| 463 | |
| 464 | def get(self, type): |
| 465 | return self.PriceMenuDefaultSettings[type] |
| 466 | |
| 467 | def set(self, type, value): |
| 468 | self.PriceMenuDefaultSettings[type] = value |
| 469 | |
| 470 | |
| 471 | class ContextMenuSettings: |