# Path: stats/enums.py
# class StatsEnum(Enum):
#     Health = 'health'
#     Mana = 'mana'
#     Strength = 'strength'
#     Dexterity = 'dexterity'
#     Constitution = 'constitution'
#     Intelligence = 'intelligence'
#     Charisma = 'charisma'
#     Wisdom = 'wisdom'
#     Sharpness = 'sharpness'
#     Hardness = 'hardness'
#     Weight = 'weight'
#     Size = 'size'
#     Potency = 'potency'
#     MaxDamage = 'max_damage'
#     MinDamage = 'min_damage'
#     ArmorClass = 'armor_class'
# 
# Path: util/decorators.py
# def cached(func):
#     def wrapper(*args, **kwargs):
#         host = args[0]
#         if not hasattr(host, 'cache'):
#             setattr(host, 'cache', {})
# 
#         if func not in host.cache:
#             host.cache[func] = func(*args, **kwargs)
# 
#         return host.cache[func]
# 
#     return wrapper
# 
# def invalidate_cache(func):
#     def wrapper(*args, **kwargs):
#         host = args[0]
#         if hasattr(host, 'cache'):
#             host.cache = {}
#         return func(*args, **kwargs)
# 
#     return wrapper


from components.component import Component
from stats.enums import StatsEnum
from itertools import chain
from util.decorators import cached, invalidate_cache
        for grasp_able_body_part in grasp_able_body_parts:
            if grasp_able_body_part in self.wielded_equipment_map:
                continue

            # 10 is the normal relative_size for a hand
            relative_size_modifier = grasp_able_body_part.relative_size - 10
            relative_size_modifier = round(relative_size_modifier / 10) if relative_size_modifier else 0
            relative_size = self.host.stats.get_current_value(StatsEnum.Size) + relative_size_modifier
            item_size = int(item.stats.get_current_value(StatsEnum.Size))
            if relative_size >= item_size >= relative_size - 2:
                # Can be wielded in one "hands"
                self.wielded_equipment_map[grasp_able_body_part] = item
                return True
            elif relative_size < item_size <= relative_size + 2:
                # Can be wielded in two "hands"
                two_hands_wielders.append(grasp_able_body_part)

        if len(two_hands_wielders) >= 2:
            first_wield = two_hands_wielders[0]
            second_wield = two_hands_wielders[1]
            self.wielded_equipment_map[first_wield] = item
            self.wielded_equipment_map[second_wield] = item
            return True

        return False

    @cached
    def get_worn_items(self):
        return [item for item_list in self.worn_equipment_map.values() for item in item_list]


# Path: stats/enums.py
# class StatsEnum(Enum):
#     Health = 'health'
#     Mana = 'mana'
#     Strength = 'strength'
#     Dexterity = 'dexterity'
#     Constitution = 'constitution'
#     Intelligence = 'intelligence'
#     Charisma = 'charisma'
#     Wisdom = 'wisdom'
#     Sharpness = 'sharpness'
#     Hardness = 'hardness'
#     Weight = 'weight'
#     Size = 'size'
#     Potency = 'potency'
#     MaxDamage = 'max_damage'
#     MinDamage = 'min_damage'
#     ArmorClass = 'armor_class'
# 
# Path: util/decorators.py
# def cached(func):
#     def wrapper(*args, **kwargs):
#         host = args[0]
#         if not hasattr(host, 'cache'):
#             setattr(host, 'cache', {})
# 
#         if func not in host.cache:
#             host.cache[func] = func(*args, **kwargs)
# 
#         return host.cache[func]
# 
#     return wrapper
# 
# def invalidate_cache(func):
#     def wrapper(*args, **kwargs):
#         host = args[0]
#         if hasattr(host, 'cache'):
#             host.cache = {}
#         return func(*args, **kwargs)
# 
#     return wrapper


# Path: components/equipment.py
from components.component import Component
from stats.enums import StatsEnum
from itertools import chain
from util.decorators import cached, invalidate_cache

        for grasp_able_body_part in grasp_able_body_parts:
            if grasp_able_body_part in self.wielded_equipment_map:
                continue

            # 10 is the normal relative_size for a hand
            relative_size_modifier = grasp_able_body_part.relative_size - 10
            relative_size_modifier = round(relative_size_modifier / 10) if relative_size_modifier else 0
            relative_size = self.host.stats.get_current_value(StatsEnum.Size) + relative_size_modifier
            item_size = int(item.stats.get_current_value(StatsEnum.Size))
            if relative_size >= item_size >= relative_size - 2:
                # Can be wielded in one "hands"
                self.wielded_equipment_map[grasp_able_body_part] = item
                return True
            elif relative_size < item_size <= relative_size + 2:
                # Can be wielded in two "hands"
                two_hands_wielders.append(grasp_able_body_part)

        if len(two_hands_wielders) >= 2:
            first_wield = two_hands_wielders[0]
            second_wield = two_hands_wielders[1]
            self.wielded_equipment_map[first_wield] = item
            self.wielded_equipment_map[second_wield] = item
            return True

        return False

    @cached
    def get_worn_items(self):
        return [item for item_list in self.worn_equipment_map.values() for item in item_list]


    @cached