Advertisement
Guest User

Untitled

a guest
Apr 20th, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.68 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using Terraria;
  4. using Terraria.ID;
  5. using Terraria.ModLoader;
  6.  
  7. namespace Osmium.Items.Accessories
  8. {
  9.     [AutoloadEquip(EquipType.Wings)]
  10.     public class HivePackWings : ModItem
  11.     {
  12.         public override void SetStaticDefaults()
  13.         {
  14.             DisplayName.SetDefault("HivePack+");
  15.             Tooltip.SetDefault("Hive Pack plus wings.\nBee wings are better than normal.");
  16.         }
  17.         public override void SetDefaults()
  18.         {
  19.             item.width = 34;
  20.             item.height = 32;
  21.             item.value = 0;
  22.             item.rare = 3;
  23.             item.accessory = true;
  24.         }
  25.  
  26.         public override void UpdateAccessory(Player player, bool hideVisual)
  27.         {
  28.             player.strongBees = true;
  29.             player.wingTimeMax = 150;
  30.         }
  31.  
  32.         public override void VerticalWingSpeeds(Player player, ref float ascentWhenFalling, ref float ascentWhenRising,
  33.         ref float maxCanAscendMultiplier, ref float maxAscentMultiplier, ref float constantAscend)
  34.         {
  35.             ascentWhenFalling = 0.5f;
  36.             ascentWhenRising = 0.1f;
  37.             maxCanAscendMultiplier = 0.5f;
  38.             maxAscentMultiplier = 2.27f;
  39.             constantAscend = 0.1f;
  40.         }
  41.  
  42.         public override void HorizontalWingSpeeds(Player player, ref float speed, ref float acceleration)
  43.         {
  44.             speed = 6.85f;
  45.             acceleration *= 1.45f;
  46.         }
  47.  
  48.         public override void AddRecipes()
  49.         {
  50.             ModRecipe recipe = new ModRecipe(mod);
  51.             recipe.needHoney = true;
  52.             recipe.AddIngredient(3333);
  53.             recipe.AddIngredient(ItemID.BeeWings);
  54.             recipe.AddTile(TileID.TinkerersWorkbench);
  55.             recipe.SetResult(this);
  56.             recipe.AddRecipe();
  57.         }
  58.     }
  59. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement