def toggle_tech(self):
        enabled = [x["name"] for x in self.player.get_enabled_techs()]
        item = self.selected_tech
        if item in enabled:
            new_techs = [x for x in enabled if x != item]
            self.player.set_enabled_techs(make_tech_list(new_techs))
        else:
            enabled.append(item)
            self.player.set_enabled_techs(make_tech_list(enabled))
        self.update_lists()
        self.update_selection()
dataset/ETHPy150Open wizzomafizzo/starcheat/starcheat/gui/techs.py/Techs.toggle_tech/original