def despawn_live

bendvy-ecs-core@0.1.0.3 · execution_command_publication.bend:105

import bendvy-ecs-core@0.1.0.3/execution_command_publication.bend as ExecutionCommandPublication
import Base
import bendvy-ecs-core@0.1.0.3/execution_query_identity.bend as Index
import bendvy-ecs-core@0.1.0.3/world.bend as W
import bendvy-ecs-core@0.1.0.3/entity_allocator.bend as A
import bendvy-ecs-core@0.1.0.3/change_tick.bend as Tick
import bendvy-ecs-core@0.1.0.3/execution_composer_layout.bend as Layout
import bendvy-ecs-core@0.1.0.3/execution_command_buffer.bend as Buffer
import bendvy-ecs-core@0.1.0.3/execution_command_removed.bend as Removed

105def despawn_live(~S:Data,~R:Type,~E:Data,~layout:Layout.Layout,~route:Layout.Route,store:Layout.columns(~S,layout),remainder:Remainder<S,Layout.columns(~S,layout),R,E>,+handle:W.Handle<S>,result:A.Allocator & Bool,+tick:Tick.Tick) -> W.World<S,Layout.columns(~S,layout),R,E> & Buffer.Receipt<S,Layout.payload(layout,route),Removed.Removed(layout)>:
106  match remainder result:
107    case Remainder{namespace,resource,events,pending,registrations,nextSystemId,clock,lifecycle}, (allocator,False{}):(W.World{namespace,allocator,store,resource,events,pending,registrations,nextSystemId,clock,lifecycle},Buffer.DespawnRefused{handle})
108    case remainder, (allocator,True{}):despawn_offset(~S,~R,~E,~layout,~route,store,remainder,handle,allocator,tick,Index.physical_index(W.handle_index(~S,handle)))

Uses (17)

Used by (2)