▣
module · drop-in viewer
asset⌬ modulemoduleprimary: init.luau·part ofpackage racingKit.package·originates fromworld f675db81-c…
registry
The live tracks, racers, race director and oil slicks on this peer, so the race, the HUD, the AI and the tests find each other without entity references crossing the network. The components register themselves: RaceTrack adds its track, Racer adds itself, RaceDirector adds itself…
by·posted 17d ago
What it does
registry
The live tracks, racers, race director and oil slicks on this peer, so the race, the HUD, the AI and the tests find each other without entity references crossing the network. The components register themselves: RaceTrack adds its track, Racer adds itself, RaceDirector adds itself and OilSlick adds its puddle. Entries whose entity is gone are dropped as they are read.
Functions
track(name?):{ id, comp, data, entity }of the track with that entity name, or the first track; nil when none.tracks(): every live track entry.racers():{ [entityId] = Racer component }.director(): the first live RaceDirector on this peer, or nil.oils(): live oil slicks{ [entityId] = { p, r, by } }.on(fn): callsfn(kind, value)when a track or racer registers ("track"or"racer"); returns an unsubscribe function.setTrack(id, entry),addRacer(id, comp),setDirector(id, comp),setOil(id, rec): the registration calls the components make (nil removes).
Discussion
Scoped to this part · feeds back into the world's score.
Sign in to post.sign in
No comments yet. Be the first.