PlayerProductOwnershipOverrideUtils
Helpers for the replicated ownership-override map that PlayerAssetOwnershipTracker maintains.
Each ownership tracker owns one JSONAttributeValue on the player, named per asset type, holding
a map of { [assetIdString] = ownsAsset }. The server writes it (authoritative) and Roblox
replicates it read-only to clients, where every realm's tracker applies it. Storing the asset id
as the (string) map key lets non-numeric ids (subscriptions) survive the JSON round-trip.
Functions
attributeName
PlayerProductOwnershipOverrideUtils.attributeName(assetType: string) → stringThe attribute name that carries a given asset type's override map.
sanitizeState
PlayerProductOwnershipOverrideUtils.sanitizeState(value: any) → OwnershipOverrideStateCoerces an arbitrary decoded attribute value into a well-formed override map, dropping any malformed entries. Returns a fresh mutable table (so callers may edit it), and treats nil (no attribute yet) as an empty map.