Убраны лишние элементы, приведено всё к 1-му виду.

main
none 10 months ago
parent a546cc1bbd
commit 483a1b567c

@ -51,14 +51,20 @@ class Reagent:
@property
def recipe(self):
result = [self.heat]
#result = [self.heat]
result = []
for item in self.__recipe:
result.append([item, self.__recipe[item]["amount"], self.__recipe[item]["reagent"]])
# Приводим к НОРМАЛЬНОМУ виду
# "Бикаридин": [ [0, "Углерод", 1], [1, "Инапровалин"] ]
#result.append([item, self.__recipe[item]["amount"], self.__recipe[item]["reagent"]])
result.append([ self.__recipe[item]["reagent"], item, self.__recipe[item]["amount"] ])
return result
def dict(self):
return {"name": self.name, "desc": self.description, "recipe": self.recipe}
# Нам нужен только рецепт
# return {"name": self.name, "desc": self.description, "recipe": self.recipe}
return self.recipe
def load_localisation():
data = {}

Loading…
Cancel
Save