mirror of
https://github.com/Ukendio/jecs.git
synced 2025-04-24 17:10:03 +00:00
Ignore stylua
This commit is contained in:
parent
ec91a5d1e9
commit
4aca3ab192
1 changed files with 31 additions and 33 deletions
|
@ -61,8 +61,8 @@ type IdRecord = {
|
|||
hooks: {
|
||||
on_add: ((entity: i53) -> ())?,
|
||||
on_set: ((entity: i53, data: any) -> ())?,
|
||||
on_remove: ((entity: i53) -> ())?
|
||||
}
|
||||
on_remove: ((entity: i53) -> ())?,
|
||||
},
|
||||
}
|
||||
|
||||
type ComponentIndex = Map<i53, IdRecord>
|
||||
|
@ -75,7 +75,7 @@ type ArchetypeDiff = {
|
|||
}
|
||||
|
||||
local HI_COMPONENT_ID = _G.__JECS_HI_COMPONENT_ID or 256
|
||||
|
||||
-- stylua: ignore start
|
||||
local EcsOnAdd = HI_COMPONENT_ID + 1
|
||||
local EcsOnRemove = HI_COMPONENT_ID + 2
|
||||
local EcsOnSet = HI_COMPONENT_ID + 3
|
||||
|
@ -100,7 +100,7 @@ local ECS_ID_HAS_ON_ADD = 0b0000_0100
|
|||
local ECS_ID_HAS_ON_SET = 0b0000_1000
|
||||
local ECS_ID_HAS_ON_REMOVE = 0b0001_0000
|
||||
local ECS_ID_MASK = 0b0000_0000
|
||||
|
||||
-- stylua: ignore end
|
||||
local NULL_ARRAY = table.freeze({}) :: Column
|
||||
|
||||
local function FLAGS_ADD(is_pair: boolean): number
|
||||
|
@ -642,8 +642,7 @@ local function init_edge_for_add(world, archetype, edge: GraphEdge, id, to)
|
|||
end
|
||||
end
|
||||
|
||||
local function init_edge_for_remove(world: World, archetype: Archetype,
|
||||
edge: GraphEdge, id: number, to: Archetype)
|
||||
local function init_edge_for_remove(world: World, archetype: Archetype, edge: GraphEdge, id: number, to: Archetype)
|
||||
archetype_init_edge(archetype, edge, id, to)
|
||||
archetype_ensure_edge(world, archetype.node.remove, id)
|
||||
if archetype ~= to then
|
||||
|
@ -1659,7 +1658,7 @@ end
|
|||
export type Id<T = nil> = Entity<T> | Pair<Entity<T>, Entity<unknown>>
|
||||
|
||||
export type Pair<First, Second> = number & {
|
||||
__relation: First
|
||||
__relation: First,
|
||||
}
|
||||
|
||||
-- type function _Pair(first, second)
|
||||
|
@ -1672,12 +1671,11 @@ export type Pair<First, Second> = number & {
|
|||
-- end
|
||||
-- end
|
||||
|
||||
|
||||
-- type TestPair = _Pair<Entity<nil>, Entity<Vector3>>
|
||||
-- type TestPair = _Pair<Entity<number>, Entity<Vector3>>
|
||||
|
||||
type Item<T...> = (self: Query<T...>) -> (Entity, T...)
|
||||
|
||||
export type Entity<T = nil> = number & { read __T: T }
|
||||
export type Entity<T = nil> = number & { __T: T }
|
||||
|
||||
type Iter<T...> = (query: Query<T...>) -> () -> (Entity, T...)
|
||||
|
||||
|
|
Loading…
Reference in a new issue