tcod-ecs 5.2.2__tar.gz → 5.2.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: tcod-ecs
3
- Version: 5.2.2
3
+ Version: 5.2.3
4
4
  Summary: A type-hinted Entity Component System based on Python dictionaries and sets.
5
5
  Author-email: Kyle Benesch <4b796c65+github@gmail.com>
6
6
  Requires-Python: >=3.8
@@ -12,5 +12,5 @@ __version__: str
12
12
  __version_tuple__: VERSION_TUPLE
13
13
  version_tuple: VERSION_TUPLE
14
14
 
15
- __version__ = version = '5.2.2'
16
- __version_tuple__ = version_tuple = (5, 2, 2)
15
+ __version__ = version = '5.2.3'
16
+ __version_tuple__ = version_tuple = (5, 2, 3)
@@ -650,6 +650,12 @@ class EntityTags(MutableSet[Any]):
650
650
  raise KeyError(tag)
651
651
  self.discard(tag)
652
652
 
653
+ def clear(self) -> None:
654
+ """Remove all tags directly in this entity."""
655
+ _tags_by_entity = self.entity.registry._tags_by_entity
656
+ while _tags_by_entity[self.entity]:
657
+ self.discard(next(iter(_tags_by_entity[self.entity])))
658
+
653
659
  def __contains__(self, x: object) -> bool:
654
660
  """Return True if this entity has the given tag."""
655
661
  _tags_by_entity = self.entity.registry._tags_by_entity
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes