An api method to assign a unique id to a peripheral
Classified3939 opened this issue ยท 0 comments
Within CC, any new computer, turtle, or pocket computer is given a unique id via a class called IdAssigner. However, this class resides within dan200.computercraft.shared.util, not the dan200.computercraft.api package that is typically exposed to mod makers.
If a modded peripheral needs a unique id to store data, and could have multiples placed connected to a single computer (and therefore not able to just use the computer's id), this requires some recreation of code that already exists within computercraft.
Therefore, I would ask that the IdAssigner function getNextId() be exposed to the api in some fashion, probably under the peripheral subheading.
(note: the main page said to ask for functionality in the api package if this exact scenario happens, so this is me doing that)