File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ name = "scrap_engine"
77authors = [{ name = " lxgr" , email = " lxgr@protonmail.com" }]
88description = " A 2D ascii game engine for the terminal"
99keywords = [" game" , " Ascii" ]
10- version = " 1.4.9 "
10+ version = " 1.5.0 "
1111license = { text = " GPL-3.0-only" }
1212readme = " README.md"
1313requires-python = " >=3.13"
Original file line number Diff line number Diff line change 11from ..error import CoordinateError
22from ..map .map import Map
33from .addable import Addable
4+ from .area import HasArea
45from .state import DEFAULT_STATE , State
56
67
7- class Object (Addable ):
8+ class Object (HasArea , Addable ):
89 """
910 An object, containing a character, that can be added to a map.
1011 """
@@ -72,6 +73,14 @@ def redraw(self):
7273 self .map .map [self .y ][self .x ] = self .char
7374 return 0
7475
76+ @property
77+ def height (self ) -> int :
78+ return 1
79+
80+ @property
81+ def width (self ) -> int :
82+ return 1
83+
7584 def __backup_setter (self ):
7685 if (
7786 len (self .map .obmap [self .y ][self .x ])
You can’t perform that action at this time.
0 commit comments