Esempio n. 1
0
        public static RuleDef FromArtifact(ArtifactIndex artifactIndex)
        {
            var artifactDef = ArtifactCatalog.GetArtifactDef(artifactIndex);
            var ruleDef     = new RuleDef($"Artifacts.{artifactIndex}", artifactDef.nameToken);

            var ruleChoiceDef = ruleDef.AddChoice("On");

            ruleChoiceDef.spritePath       = artifactDef.smallIconSelectedPath;
            ruleChoiceDef.tooltipBodyToken = artifactDef.descriptionToken;
            ruleChoiceDef.unlockableName   = artifactDef.unlockableName;
            ruleChoiceDef.artifactIndex    = artifactIndex;
            ruleChoiceDef.tooltipNameColor = new Color32(74, 50, 149, byte.MaxValue);
            ruleChoiceDef.tooltipNameToken = $"{artifactDef.nameToken} On";

            var ruleChoiceDef2 = ruleDef.AddChoice("Off");

            ruleChoiceDef2.spritePath      = artifactDef.smallIconDeselectedPath;
            ruleChoiceDef2.materialPath    = "Materials/UI/matRuleChoiceOff";
            ruleChoiceDef.tooltipBodyToken = artifactDef.descriptionToken;
            ruleChoiceDef.tooltipNameColor = new Color32(74, 50, 149, byte.MaxValue);
            ruleChoiceDef.tooltipNameToken = $"{artifactDef.nameToken} Off";

            ruleDef.MakeNewestChoiceDefault();

            return(ruleDef);
        }
        // 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);
        }
Esempio n. 3
0
 static patch_ArtifactCatalog()
 {
     ArtifactCatalog.artifactDefs = new ArtifactDef[5];
     ArtifactCatalog.RegisterArtifact(ArtifactIndex.Command, new ArtifactDef
     {
         nameToken               = "Command",
         smallIconSelectedPath   = "Textures/ArtifactIcons/texCommandSmallSelected",
         smallIconDeselectedPath = "Textures/ArtifactIcons/texCommandSmallDeselected",
         unlockableName          = "",
         descriptionToken        = "[NON-FUNCTIONING] Items are no longer random. You can choose which items you want to purchase."
     });
     ArtifactCatalog.RegisterArtifact(ArtifactIndex.Bomb, new ArtifactDef
     {
         nameToken               = "Bomb",
         smallIconSelectedPath   = "Textures/ArtifactIcons/texSpiteSmallSelected",
         smallIconDeselectedPath = "Textures/ArtifactIcons/texSpiteSmallDeselected",
         unlockableName          = "",
         descriptionToken        = "Enemies explode on death."
     });
     ArtifactCatalog.RegisterArtifact(ArtifactIndex.Sacrifice, new ArtifactDef
     {
         nameToken               = "Sacrifice",
         smallIconSelectedPath   = "Textures/ArtifactIcons/texSacrificeSmallSelected",
         smallIconDeselectedPath = "Textures/ArtifactIcons/texSacrificeSmallDeselected",
         unlockableName          = "",
         descriptionToken        = "[SEMI-FUNCTIONING] Chests no longer spawn (NOTE: incorrect); monsters now drop items on death."
     });
     ArtifactCatalog.RegisterArtifact(ArtifactIndex.Enigma, new ArtifactDef
     {
         nameToken               = "Enigma",
         smallIconSelectedPath   = "Textures/ArtifactIcons/texEnigmaSmallSelected",
         smallIconDeselectedPath = "Textures/ArtifactIcons/texEnigmaSmallDeselected",
         unlockableName          = "",
         descriptionToken        = "Use items have a random effect."
     });
     ArtifactCatalog.RegisterArtifact(ArtifactIndex.Spirit, new ArtifactDef
     {
         nameToken               = "Spirit",
         smallIconSelectedPath   = "Textures/ArtifactIcons/texSpiritSmallSelected",
         smallIconDeselectedPath = "Textures/ArtifactIcons/texSpiritSmallDeselected",
         unlockableName          = "",
         descriptionToken        = "[SEMI-FUNCTIONING] Characters and enemies move faster at low health (BUGGED: enemies in MP fly around)"
     });
 }
Esempio n. 4
0
 // Token: 0x06000A0C RID: 2572 RVA: 0x00046848 File Offset: 0x00044A48
 static ArtifactCatalog()
 {
     ArtifactCatalog.RegisterArtifact(ArtifactIndex.Command, new ArtifactDef
     {
         nameToken               = "ARTIFACT_COMMAND_NAME",
         smallIconSelectedPath   = "Textures/ArtifactIcons/texCommandSmallSelected",
         smallIconDeselectedPath = "Textures/ArtifactIcons/texCommandSmallDeselected",
         unlockableName          = "artifact_command"
     });
     ArtifactCatalog.RegisterArtifact(ArtifactIndex.Bomb, new ArtifactDef
     {
         nameToken               = "ARTIFACT_BOMB_NAME",
         smallIconSelectedPath   = "Textures/ArtifactIcons/texSpiteSmallSelected",
         smallIconDeselectedPath = "Textures/ArtifactIcons/texSpiteSmallDeselected",
         unlockableName          = "artifact_bomb"
     });
     ArtifactCatalog.RegisterArtifact(ArtifactIndex.Sacrifice, new ArtifactDef
     {
         nameToken               = "ARTIFACT_SACRIFICE_NAME",
         smallIconSelectedPath   = "Textures/ArtifactIcons/texSacrificeSmallSelected",
         smallIconDeselectedPath = "Textures/ArtifactIcons/texSacrificeSmallDeselected",
         unlockableName          = "artifact_sacrifice"
     });
     ArtifactCatalog.RegisterArtifact(ArtifactIndex.Enigma, new ArtifactDef
     {
         nameToken               = "ARTIFACT_ENIGMA_NAME",
         smallIconSelectedPath   = "Textures/ArtifactIcons/texEnigmaSmallSelected",
         smallIconDeselectedPath = "Textures/ArtifactIcons/texEnigmaSmallDeselected",
         unlockableName          = "artifact_enigma"
     });
     ArtifactCatalog.RegisterArtifact(ArtifactIndex.Spirit, new ArtifactDef
     {
         nameToken               = "ARTIFACT_SPIRIT_NAME",
         smallIconSelectedPath   = "Textures/ArtifactIcons/texSpiritSmallSelected",
         smallIconDeselectedPath = "Textures/ArtifactIcons/texSpiritSmallDeselected",
         unlockableName          = "artifact_spirit"
     });
 }