79369487

Date: 2025-01-19 18:05:28
Score: 0.5
Natty:
Report link

okay im stupid i did a rookie mistake and called load_data before _metier_map is init so it was just

class FleetManager:
    def __init__(self, json_path='component/default.json'):
        
        self.current_fleet_index = 0
        self.__metier_map = {
            "Pilote": Pilote,
            "Technicien": Technicien,
            "Armurier": Armurier,
            "Marchand": Marchand,
            "Entretien": Entretien
        }
        self.party = self.load_data(json_path)

instead of :

class FleetManager:
    def __init__(self, json_path='component/default.json'):
        self.party = self.load_data(json_path)
        self.current_fleet_index = 0
        self.__metier_map = {
            "Pilote": Pilote,
            "Technicien": Technicien,
            "Armurier": Armurier,
            "Marchand": Marchand,
            "Entretien": Entretien
        }
Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: user29268996