Stepwise/source/useable.py
Kayne Ruse f831019148 Items can be picked up and stored in the inventory
When more than one item can be picked up, and options window is shown.

Stubs for "using" an item are in place.
2025-03-29 16:30:44 +11:00

26 lines
609 B
Python

from __future__ import annotations
from typing import List, Tuple, TYPE_CHECKING
from actions import BaseAction, MeleeAction, MovementAction, WaitAction
if TYPE_CHECKING:
from entity import Entity
class BaseUseable:
"""Base type for useable items, with various utilities"""
entity: Entity
def __init__(self, entity):
self.entity = entity
def activate(self) -> BaseAction:
"""Activate this item's effect"""
raise NotImplementedError()
class Consumable(BaseUseable):
"""This disappears after use"""
def activate(self) -> BaseAction:
pass
#TODO: finish useable items, with distinct effects