SetupMount() статический приватный Метод

static private SetupMount ( Mount mount ) : void
mount Terraria.Mount
Результат void
Пример #1
0
 internal void SetupContent()
 {
     foreach (ModItem item in items.Values)
     {
         ItemLoader.SetDefaults(item.item, false);
         item.AutoStaticDefaults();
         item.SetStaticDefaults();
     }
     foreach (ModPrefix prefix in prefixes.Values)
     {
         prefix.AutoDefaults();
         prefix.SetDefaults();
     }
     foreach (ModDust dust in dusts.Values)
     {
         dust.SetDefaults();
     }
     foreach (ModTile tile in tiles.Values)
     {
         Main.tileTexture[tile.Type] = ModContent.GetTexture(tile.texture);
         TileLoader.SetDefaults(tile);
         if (TileID.Sets.HasOutlines[tile.Type])
         {
             Main.highlightMaskTexture[tile.Type] = ModContent.GetTexture(tile.HighlightTexture);
         }
         if (!string.IsNullOrEmpty(tile.chest))
         {
             TileID.Sets.BasicChest[tile.Type] = true;
         }
     }
     foreach (GlobalTile globalTile in globalTiles.Values)
     {
         globalTile.SetDefaults();
     }
     foreach (ModWall wall in walls.Values)
     {
         Main.wallTexture[wall.Type] = ModContent.GetTexture(wall.texture);
         wall.SetDefaults();
     }
     foreach (GlobalWall globalWall in globalWalls.Values)
     {
         globalWall.SetDefaults();
     }
     foreach (ModProjectile projectile in projectiles.Values)
     {
         ProjectileLoader.SetDefaults(projectile.projectile, false);
         projectile.AutoStaticDefaults();
         projectile.SetStaticDefaults();
     }
     foreach (ModNPC npc in npcs.Values)
     {
         NPCLoader.SetDefaults(npc.npc, false);
         npc.AutoStaticDefaults();
         npc.SetStaticDefaults();
     }
     foreach (ModMountData modMountData in mountDatas.Values)
     {
         var mountData = modMountData.mountData;
         mountData.modMountData = modMountData;
         MountLoader.SetupMount(mountData);
         Mount.mounts[modMountData.Type] = mountData;
     }
     foreach (ModBuff buff in buffs.Values)
     {
         Main.buffTexture[buff.Type] = ModContent.GetTexture(buff.texture);
         buff.SetDefaults();
     }
     foreach (ModWaterStyle waterStyle in waterStyles.Values)
     {
         LiquidRenderer.Instance._liquidTextures[waterStyle.Type] = ModContent.GetTexture(waterStyle.texture);
         Main.liquidTexture[waterStyle.Type] = ModContent.GetTexture(waterStyle.blockTexture);
     }
     foreach (ModWaterfallStyle waterfallStyle in waterfallStyles.Values)
     {
         Main.instance.waterfallManager.waterfallTexture[waterfallStyle.Type]
             = ModContent.GetTexture(waterfallStyle.texture);
     }
 }
Пример #2
0
 public override void SetupContent()
 {
     mountData.modMountData = this;
     MountLoader.SetupMount(mountData);
     Mount.mounts[Type] = mountData;
 }
Пример #3
0
 public sealed override void SetupContent()
 {
     MountData.ModMount = this;
     MountLoader.SetupMount(MountData);
     Mount.mounts[Type] = MountData;
 }
Пример #4
0
 internal void SetupContent()
 {
     foreach (ModItem item in items.Values)
     {
         Main.itemTexture[item.item.type] = ModLoader.GetTexture(item.texture);
         Main.itemName[item.item.type]    = item.item.name;
         EquipLoader.SetSlot(item.item);
         item.SetDefaults();
         DrawAnimation animation = item.GetAnimation();
         if (animation != null)
         {
             Main.RegisterItemAnimation(item.item.type, animation);
             ItemLoader.animations.Add(item.item.type);
         }
         if (item.flameTexture.Length > 0)
         {
             Main.itemFlameTexture[item.item.type] = ModLoader.GetTexture(item.flameTexture);
         }
     }
     foreach (ModDust dust in dusts.Values)
     {
         dust.SetDefaults();
     }
     foreach (ModTile tile in tiles.Values)
     {
         Main.tileTexture[tile.Type] = ModLoader.GetTexture(tile.texture);
         TileLoader.SetDefaults(tile);
     }
     foreach (GlobalTile globalTile in globalTiles.Values)
     {
         globalTile.SetDefaults();
     }
     foreach (ModWall wall in walls.Values)
     {
         Main.wallTexture[wall.Type] = ModLoader.GetTexture(wall.texture);
         wall.SetDefaults();
     }
     foreach (GlobalWall globalWall in globalWalls.Values)
     {
         globalWall.SetDefaults();
     }
     foreach (ModProjectile projectile in projectiles.Values)
     {
         Main.projectileTexture[projectile.projectile.type] = ModLoader.GetTexture(projectile.texture);
         Main.projFrames[projectile.projectile.type]        = 1;
         projectile.SetDefaults();
         if (projectile.projectile.hostile)
         {
             Main.projHostile[projectile.projectile.type] = true;
         }
         if (projectile.projectile.aiStyle == 7)
         {
             Main.projHook[projectile.projectile.type] = true;
         }
     }
     foreach (ModNPC npc in npcs.Values)
     {
         Main.npcTexture[npc.npc.type] = ModLoader.GetTexture(npc.texture);
         Main.npcName[npc.npc.type]    = npc.npc.name;
         npc.SetDefaults();
         if (npc.npc.lifeMax > 32767 || npc.npc.boss)
         {
             Main.npcLifeBytes[npc.npc.type] = 4;
         }
         else if (npc.npc.lifeMax > 127)
         {
             Main.npcLifeBytes[npc.npc.type] = 2;
         }
         else
         {
             Main.npcLifeBytes[npc.npc.type] = 1;
         }
     }
     foreach (ModMountData modMountData in mountDatas.Values)
     {
         Mount.MountData temp = modMountData.mountData;
         temp.modMountData = modMountData;
         MountLoader.SetupMount(modMountData.mountData);
         Mount.mounts[modMountData.Type] = temp;
     }
     foreach (ModBuff buff in buffs.Values)
     {
         Main.buffTexture[buff.Type] = ModLoader.GetTexture(buff.texture);
         Main.buffName[buff.Type]    = buff.Name;
         buff.SetDefaults();
     }
 }