// Token: 0x060018D6 RID: 6358 RVA: 0x0006AE78 File Offset: 0x00069078
        public static RuleDef FromArtifact(ArtifactIndex artifactIndex)
        {
            ArtifactDef   artifactDef   = ArtifactCatalog.GetArtifactDef(artifactIndex);
            RuleDef       ruleDef       = new RuleDef("Artifacts." + artifactIndex.ToString(), artifactDef.nameToken);
            RuleChoiceDef ruleChoiceDef = ruleDef.AddChoice("On", null, false);

            ruleChoiceDef.spritePath       = artifactDef.smallIconSelectedPath;
            ruleChoiceDef.tooltipBodyToken = artifactDef.descriptionToken;
            ruleChoiceDef.unlockableName   = artifactDef.unlockableName;
            ruleChoiceDef.artifactIndex    = artifactIndex;
            RuleChoiceDef ruleChoiceDef2 = ruleDef.AddChoice("Off", null, false);

            ruleChoiceDef2.spritePath       = artifactDef.smallIconDeselectedPath;
            ruleChoiceDef2.materialPath     = "Materials/UI/matRuleChoiceOff";
            ruleChoiceDef2.tooltipBodyToken = null;
            ruleDef.MakeNewestChoiceDefault();
            return(ruleDef);
        }
Exemplo n.º 2
0
 // Token: 0x06000A0B RID: 2571 RVA: 0x000081D6 File Offset: 0x000063D6
 private static void RegisterArtifact(ArtifactIndex artifactIndex, ArtifactDef artifactDef)
 {
     ArtifactCatalog.artifactDefs[(int)artifactIndex] = artifactDef;
 }