Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relation traversal and propagation #15

Merged
merged 11 commits into from
Oct 21, 2023
Merged

Relation traversal and propagation #15

merged 11 commits into from
Oct 21, 2023

Conversation

HexDecimal
Copy link
Owner

@HexDecimal HexDecimal commented Oct 17, 2023

Adds support for inheritance and prefabs, Closes #12

Hard parts are already done. I need to clean up repeatable code, integrate it, and write tests.

  • Query propagation
  • Components via traversal
  • Tags via traversal
  • Relations via traversal
  • Entity instantiation
  • Readme examples

Traversal (inheritance) currently supports cyclic inheritance and multiple inheritance.

Some features may lower performance. I'll try to note this in the changelog.

Now entities will show up on queries if their parents have that component.
Not sure how useful these are but it might be easier to remove them
later than to add them later.
@codecov
Copy link

codecov bot commented Oct 17, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (623de54) 97.70% compared to head (947372a) 99.32%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #15      +/-   ##
==========================================
+ Coverage   97.70%   99.32%   +1.61%     
==========================================
  Files           7        8       +1     
  Lines         742      887     +145     
==========================================
+ Hits          725      881     +156     
+ Misses         17        6      -11     
Files Coverage Δ
tcod/ecs/__init__.py 78.94% <100.00%> (+8.11%) ⬆️
tcod/ecs/constants.py 100.00% <100.00%> (ø)
tcod/ecs/entity.py 100.00% <100.00%> (+0.85%) ⬆️
tcod/ecs/query.py 99.57% <100.00%> (+2.57%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Should make it easier to add and remove attributes
As a more obvious syntax for entity inheritance.
Update the README, docs, and ensure code coverage
Should reduce memory and CPU usage
@HexDecimal HexDecimal marked this pull request as ready for review October 21, 2023 00:11
@HexDecimal HexDecimal merged commit 947372a into main Oct 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Inheritance
1 participant