/
CarKey.cs
35 lines (32 loc) · 867 Bytes
/
CarKey.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
using ExampleMod.Mounts;
using ExampleMod.Tiles;
using Terraria.ID;
using Terraria.ModLoader;
namespace ExampleMod.Items
{
public class CarKey : ModItem
{
public override void SetStaticDefaults() {
Tooltip.SetDefault("This is a modded mount.");
}
public override void SetDefaults() {
item.width = 20;
item.height = 30;
item.useTime = 20;
item.useAnimation = 20;
item.useStyle = ItemUseStyleID.SwingThrow;
item.value = 30000;
item.rare = ItemRarityID.Green;
item.UseSound = SoundID.Item79;
item.noMelee = true;
item.mountType = ModContent.MountType<Car>();
}
public override void AddRecipes() {
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(ModContent.ItemType<ExampleItem>(), 10);
recipe.AddTile(ModContent.TileType<ExampleWorkbench>());
recipe.SetResult(this);
recipe.AddRecipe();
}
}
}