GameDevTecnico / cubos

A still very barebones game engine focused on voxels and data-oriented programming
https://gamedevtecnico.github.io/cubos/
MIT License
82 stars 22 forks source link

feat(ecs): add Cubos::inject #1223

Closed RiscadoA closed 1 month ago

RiscadoA commented 1 month ago

Description

Adds a method to the Cubos class which allows the dev to inject a plugin into another plugin's place. This will be useful to make Tesseratos a standalone app, as we'll need to make a 'fake window plugin' for the game to run properly - we want the game to be shown within the existing Tesseratos window. The goal is to be able do this: game.cubos.inject(windowPlugin, fakeWindowPlugin). Then, when the game calls cubos.plugin(windowPlugin), fakeWindowPlugin will be added instead, seamlessly.

Checklist

github-actions[bot] commented 1 month ago

PR Preview Action v1.4.7 :---: :rocket: Deployed preview to https://GameDevTecnico.github.io/cubos/docs-preview/pr-1223/ on branch gh-pages at 2024-06-10 12:07 UTC

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 94.73684% with 1 line in your changes missing coverage. Please review.

Project coverage is 40.33%. Comparing base (542ec25) to head (101db1a). Report is 4 commits behind head on main.

:exclamation: Current head 101db1a differs from pull request most recent head 1f2fc61

Please upload reports for the commit 1f2fc61 to get more accurate results.

Files Patch % Lines
core/tests/ecs/cubos.cpp 90.00% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1223 +/- ## ========================================== + Coverage 40.32% 40.33% +0.01% ========================================== Files 351 351 Lines 26061 26069 +8 ========================================== + Hits 10508 10515 +7 - Misses 15553 15554 +1 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.