feat(cosmetics): add EXCLUSIVE tier and per-user cosmetic assignment - #57
Merged
Conversation
Add an EXCLUSIVE cosmetic tier that ranks above every user tier the gatekeeper can assign (STANDARD/REGISTERED/DONOR), so no tier ever grants it. Access to an EXCLUSIVE cosmetic comes solely from a per-user COSMETIC entitlement. - CosmeticTier.EXCLUSIVE + RANK entry (rank 3) in accessTier - migration adding the EXCLUSIVE value to cosmetic_tier_enum (seeding deferred, value cannot be used in the same transaction) - seed the Terminator EXCLUSIVE companion (animation clips/rig still TODO) - assign-cosmetic script to grant a cosmetic to a single user via a COSMETIC entitlement (idempotent, resolves cosmetic by assetRef)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Qué
Agrega un tier de cosmetic EXCLUSIVE y el mecanismo para asignar un cosmetic exclusivo a un usuario puntual.
Por qué
El control de acceso es
tierGrants(userTier, cosmetic.tier) || cosmeticIds.has(cosmetic.id), y el gatekeeper sólo asignaSTANDARD/REGISTERED/DONOR. Como el tier más bajo (STANDARD) es universal, ningún tier existente puede expresar un cosmetic verdaderamente exclusivo — cualquiera de los tres se lo regala a una clase entera de usuarios.EXCLUSIVErankea por encima deDONOR, así que ningún tier de usuario lo otorga: el único acceso es un entitlementCOSMETICper-usuario.Cambios
CosmeticTier.EXCLUSIVE+ entrada enRANK(rank 3) enaccessTierEXCLUSIVEacosmetic_tier_enum(el seed se difiere: el valor nuevo no se puede usar en la misma transacción)EXCLUSIVEassign-cosmeticpara otorgar un cosmetic a un usuario vía entitlementCOSMETIC(idempotente, resuelve el cosmetic porassetRef, todos los argumentos obligatorios)Flujo
La animación del Terminator en
standardCosmetics.tstiene placeholdersTODO_*(clips y rigFile). El seed es insert-only: si se seedea con esos valores, arreglarlos después requiere una migración de datos. Reemplazar con los nombres reales de los clips y el rig del.glbantes de correrseed:cosmetics.