-
Notifications
You must be signed in to change notification settings - Fork 1
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
Flag interfaces #7
Conversation
I dont like that it is called a Flag and not a Tag. It doesnt really represent the same things. You can use Tags as flags for certain things, but can also be representative of symbolic state. |
@@ -462,7 +489,7 @@ export function parent(entity: Entity): Entity | undefined { | |||
* @returns The pair ID. | |||
* @metadata macro | |||
*/ | |||
export function pair<P>(object: Entity, predicate?: ComponentKey<P>): Pair<P, unknown> { | |||
export function pair<P>(object: Entity, predicate?: ComponentKey<P>): Pair<OmitFlag<P>, unknown> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just saw thiis but the first element is the predicate not the object.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The predicate here is a flamework generated key. pair<SomeComponent>(object)
@@ -3,8 +3,12 @@ import * as ecs from "@rbxts/jecs"; | |||
|
|||
import { createSignal, type Signal } from "./signal"; | |||
|
|||
export interface Wildcard {} | |||
export interface ChildOf {} | |||
export interface Flag { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change the name of this interface and every subsequent dependents on this interface to use "Tag"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tag is already used for Entity<.undefined>. Should I just get rid of that then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should I just get rid of that then?
Yeah, that sounds reasonable.
this pr adds support for flag interfaces not associated with any component data.