craft_parser_init

This commit is contained in:
2026-01-19 22:17:38 +07:00
parent 4e95139bb5
commit c083fc26ad
9 changed files with 978 additions and 0 deletions

26
craft_parser/craft.py Normal file
View File

@ -0,0 +1,26 @@
CRAFT_TYPES = []
class CraftItem:
def __init__(self, name: str, img_url: str, img_shift: tuple[int, int], is_base=False, ):
self.name = name
self.is_base = is_base
self.img_url = img_url
self.img_shift = img_shift
class CraftRecipe:
def __init__(self, output_item_name: str, output_count: int, craft_type: str):
self.output_item_name = output_item_name
self.output_count = output_count
self.craft_type = craft_type
self.recipe_id = None # будет назначен при сохранении
class CraftComponent:
def __init__(self, recipe_id: int, input_item: str, count: int):
self.recipe_id = recipe_id
self.input_item = input_item
self.count = count