llde / xOBSE

Oblivion Script extender source
250 stars 36 forks source link

Suggestion: add new Array type: RefMap. #221

Open ir4ne opened 1 year ago

ir4ne commented 1 year ago

It's often very convenient to store some info about certain game objects. It's also good, if you can get that info in amortized O(1). As a workaround, it's possible to use StringMap with GetRawFormIDString refVar as keys. However, that would also require to update all such arrays on game load, as the keys may become invalid if load order changes (the FormID of references will change). That's why it would be very useful to have a Map with keys of Ref type.