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

1330 add active component for all kinds of disabling purposes #1357

Draft
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

RodrigoVintem
Copy link
Contributor

@RodrigoVintem RodrigoVintem commented Oct 29, 2024

Description

add active component for all kinds of disabling purposes

Checklist

  • Self-review changes.
  • Evaluate impact on the documentation.
  • Ensure test coverage.
  • Write new samples.
  • Add entry to the changelog's unreleased section.

Copy link
Contributor

PR Preview Action v1.4.8
🚀 Deployed preview to https://GameDevTecnico.github.io/cubos/preview/pr-1357/
on branch gh-pages at 2024-10-29 16:03 UTC

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Clang-Tidy found issue(s) with the introduced code (1/2)

engine/src/render/lights/plugin.cpp Outdated Show resolved Hide resolved
.call([](Commands cmds, Query<Entity> query) {
for (auto [ent] : query)
{
cmds.add(ent, Active_component{});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-naming ⚠️
invalid case style for struct Active_component

Suggested change
cmds.add(ent, Active_component{});
cmds.add(ent, ActiveComponent{});


cubos.observer("add active component on add PointLight")
.onAdd<PointLight>()
.without<Active_component>()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-naming ⚠️
invalid case style for struct Active_component

Suggested change
.without<Active_component>()
.without<ActiveComponent>()

.call([](Commands cmds, Query<Entity> query) {
for (auto [ent] : query)
{
cmds.add(ent, Active_component{});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-naming ⚠️
invalid case style for struct Active_component

Suggested change
cmds.add(ent, Active_component{});
cmds.add(ent, ActiveComponent{});


cubos.observer("add active component on add SpotLight")
.onAdd<SpotLight>()
.without<Active_component>()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-naming ⚠️
invalid case style for struct Active_component

Suggested change
.without<Active_component>()
.without<ActiveComponent>()

.call([](Commands cmds, Query<Entity> query) {
for (auto [ent] : query)
{
cmds.add(ent, Active_component{});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-naming ⚠️
invalid case style for struct Active_component

Suggested change
cmds.add(ent, Active_component{});
cmds.add(ent, ActiveComponent{});


namespace cubos::engine
{
struct Active_component
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-naming ⚠️
invalid case style for struct Active_component

Suggested change
struct Active_component
struct ActiveComponent


cubos.component<Camera>();
cubos.component<PerspectiveCamera>();
cubos.component<OrthographicCamera>();

cubos.relation<DrawsTo>();

cubos.observer("add active component on add Camera")
.onAdd<Camera>()
.without<Active_component>()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-naming ⚠️
invalid case style for struct Active_component

Suggested change
.without<Active_component>()
.without<ActiveComponent>()

.call([](Commands cmds, Query<Entity> query) {
for (auto [ent] : query)
{
cmds.add(ent, Active_component{});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-naming ⚠️
invalid case style for struct Active_component

Suggested change
cmds.add(ent, Active_component{});
cmds.add(ent, ActiveComponent{});

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Clang-Tidy found issue(s) with the introduced code (2/2)


void cubos::engine::activePlugin(Cubos& cubos)
{
cubos.component<Active_component>();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-naming ⚠️
invalid case style for struct Active_component

Suggested change
cubos.component<Active_component>();
cubos.component<ActiveComponent>();


namespace cubos::engine
{
struct Active_component
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-naming ⚠️
invalid case style for struct Active_component

Suggested change
struct Active_component
struct ActiveComponent


#include <cubos/engine/render/active_component/active_component.hpp>

CUBOS_REFLECT_IMPL(cubos::engine::Active_component)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-naming ⚠️
invalid case style for struct Active_component

Suggested change
CUBOS_REFLECT_IMPL(cubos::engine::Active_component)
CUBOS_REFLECT_IMPL(cubos::engine::ActiveComponent)

Comment on lines 8 to 9
return core::ecs::TypeBuilder<Active_component>("cubos::engine::Active_component")
.withField("active", &Active_component::active)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-naming ⚠️
invalid case style for struct Active_component

Suggested change
return core::ecs::TypeBuilder<Active_component>("cubos::engine::Active_component")
.withField("active", &Active_component::active)
return core::ecs::TypeBuilder<ActiveComponent>("cubos::engine::Active_component")
.withField("active", &ActiveComponent::active)


namespace cubos::engine
{
struct Active_component
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-naming ⚠️
invalid case style for struct Active_component

Suggested change
struct Active_component
struct ActiveComponent


namespace cubos::engine
{
struct Active_component
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ readability-identifier-naming ⚠️
invalid case style for struct Active_component

Suggested change
struct Active_component
struct ActiveComponent

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.

1 participant