def get_checked
bendvy-ecs-core@0.1.0.3 · indexed_lifecycle.bend:19
import bendvy-ecs-core@0.1.0.3/indexed_lifecycle.bend as IndexedLifecycle
import Base
import bendvy-ecs-core@0.1.0.3/change_tick.bend as Tick
import lifecycle.bend as L
19def get_checked(+id:U32,added:Array<Maybe<&2,Tick.Tick>>,changed:Array<Maybe<&2,Tick.Tick>>,capacity:U32,depth:Nat,+exceptional:List<&2,L.Entry>,isnormal:Bool,fits:Bool) -> Metadata & L.Stamp:
20 match isnormal fits:
21 case False{} _: (Metadata{added,changed,capacity,depth,exceptional},L.get(exceptional,id))
22 case True{} False{}: (Metadata{added,changed,capacity,depth,exceptional},L.Stamp{None{},None{}})
23 case True{} True{}: got_added(id,changed,capacity,depth,exceptional,Array.get(Maybe<&2,Tick.Tick>,added,U32.sub(id,1)))