Exemple #1
0
        public override void PostSetupContent()
        {
            Mod calamity = ModLoader.GetMod("CalamityMod");
            Mod thor     = ModLoader.GetMod("ThoriumMod");

            SoundChanges.Init();
            // TODO: Finish adding these another day...
            #region Calamity Adds
            if (calamity != null)
            {
                TileDetection.AddTilesToList(calamity, TileDetection.snowyblocks, "AstralSnow");
                TileDetection.AddTilesToList(calamity, TileDetection.sandBlocks,
                                             "SulphurousSand",
                                             "AstralSand",
                                             "EutrophicSand",
                                             "AstralClay");

                TileDetection.AddTilesToList(calamity, TileDetection.grassTiles,
                                             "AstralDirt",
                                             "AstralGrass",
                                             "PlantyMush");

                TileDetection.AddTilesToList(calamity, TileDetection.stoneBlocks,
                                             "AstralOre",
                                             "AstralStone",
                                             "AstralMonolith",
                                             "AstralMonolith", "AbyssGravel", "Tenebris", "ChaoticOre", "SmoothCoal", "Voidstone", "Navystone",
                                             "TableCoral", "SeaPrism", "HazardChevronPanels", "NavyPlate", "LaboratoryPanels", "LaboratoryPlating", "RustedPlating",
                                             "HardenedSulphurousSandstone");
            }
            #endregion
            #region Thorium Adds
            if (thor != null)
            {
                TileDetection.AddTilesToList(thor, TileDetection.stoneBlocks,
                                             "ThoriumOre", "LifeQuartz", "MarineRock", "MarineRockMoss", "DepthsAmber", "PearlStone", "Aquaite", "DepthsOpal",
                                             "SynthPlatinum", "DepthsOnyx", "DepthsSapphire", "DepthsEmerald", "DepthsTopaz", "DepthsAmethyst", "ScarletChestPlatform");

                TileDetection.AddTilesToList(thor, TileDetection.sandBlocks, "Brack", "BrackBare");
            }
            #endregion
        }
Exemple #2
0
 public override object Call(params object[] args)
 {
     try
     {
         string message = args[0] as string;
         if (message == "AddTilesToList")
         {
             Mod      mod            = args[1] as Mod;
             string   listName       = args[2] as string; // Can be Stone, Grass, Sand, Snow, or Dirt (FOR NOW, OR EVER)
             string[] nameStringList = args[3] as string[];
             int[]    tiles          = args[4] as int[];
             if (!Main.dedServ)
             {
                 if (mod != null)
                 {
                     if (listName == "Grass")
                     {
                         TileDetection.AddTilesToList(mod, TileDetection.grassTiles, nameStringList);
                     }
                     else if (listName == "Stone")
                     {
                         TileDetection.AddTilesToList(mod, TileDetection.stoneBlocks, nameStringList);
                     }
                     else if (listName == "Sand")
                     {
                         TileDetection.AddTilesToList(mod, TileDetection.sandBlocks, nameStringList);
                     }
                     else if (listName == "Snow")
                     {
                         TileDetection.AddTilesToList(mod, TileDetection.snowyblocks, nameStringList);
                     }
                     else if (listName == "Dirt")
                     {
                         TileDetection.AddTilesToList(mod, TileDetection.dirtBlocks, nameStringList);
                     }
                 }
                 else if (mod == null)
                 {
                     if (listName == "Grass")
                     {
                         TileDetection.AddTilesToList(TileDetection.grassTiles, tiles);
                     }
                     else if (listName == "Stone")
                     {
                         TileDetection.AddTilesToList(TileDetection.stoneBlocks, tiles);
                     }
                     else if (listName == "Sand")
                     {
                         TileDetection.AddTilesToList(TileDetection.sandBlocks, tiles);
                     }
                     else if (listName == "Snow")
                     {
                         TileDetection.AddTilesToList(TileDetection.snowyblocks, tiles);
                     }
                     else if (listName == "Dirt")
                     {
                         TileDetection.AddTilesToList(TileDetection.dirtBlocks, tiles);
                     }
                 }
             }
             return("Tiles added successfully!");
         }
         else
         {
             Logger.Error("Call Error: Unknown Message: " + message);
         }
     }
     catch (Exception e)
     {
         Logger.Error("Mod.Call Error: " + e.StackTrace + e.Message);
     }
     return("Call Failed");
 }