This method sets a variety of Item values common to golf ball items.
Specifically:
shoot = projid ; useStyle = F:Terraria.ID.ItemUseStyleID.Swing; shootSpeed = 12f; width = 18; height = 20; maxStack = 1; UseSound = F:Terraria.ID.SoundID.Item1; useAnimation = 15; useTime = 15; noUseGraphic = true; noMelee = true; accessory = true; SetShopValues(ItemRarityColor.Green2, buyPrice(0, 1)); hasVanityEffects = true;
- Parameters
-
Definition at line 39708 of file Item.cs.
39709 {
39725 }
int width
The width of this Entity's hitbox, in pixels.
int height
The height of this Entity's hitbox, in pixels.
static readonly SoundStyle Item1
SoundStyle? UseSound
The sound this item makes when used. Set this to an existing T:Terraria.ID.SoundID entry or assign to...
static int buyPrice(int platinum=0, int gold=0, int silver=0, int copper=0)
Converts the provided buy price into copper coins. If assigned to F:Terraria.Item....
int useAnimation
The time span of the using animation for the item in ticks. This is independent of the time it takes ...
bool noMelee
If true, the item's using animation will not deal damage. Set to true on most weapons that aren't swo...
int value
The number of copper coins this item is worth (aka, cost to buy from a merchant). Setting it to 10462...
int shoot
The ID of the projectile that is fired by this item on use. Either a T:Terraria.ID....
int maxStack
The maximum number of items that can be contained within a single stack. F:Terraria....
bool hasVanityEffects
If true, this item has vanity effects even though it doesn't use equipment slots. Unused in vanilla...
int useStyle
Assign to an T:Terraria.ID.ItemUseStyleID value to give this item a specific animation while in use....
bool noUseGraphic
If true, the item's sprite will not be visible while the item is in use. Defaults to false.
float shootSpeed
The velocity in pixels the projectile fired by this item will have. Actual velocity depends on the pr...
bool accessory
Whether the item is an accessory. Defaults to false.
void SetShopValues(ItemRarityColor rarity, int coinValue)
A helper method that sets item rarity (F:Terraria.Item.rare) and item value (F:Terraria....
int useTime
The time span of using the item in ticks. This is independent of the time it takes for the item anima...
References Terraria.Item.accessory, Terraria.Item.buyPrice(), Terraria.Item.hasVanityEffects, Terraria.Entity.height, Terraria.ID.SoundID.Item1, Terraria.Item.maxStack, Terraria.Item.noMelee, Terraria.Item.noUseGraphic, Terraria.Item.SetShopValues(), Terraria.Item.shoot, Terraria.Item.shootSpeed, Terraria.Item.useAnimation, Terraria.Item.UseSound, Terraria.Item.useStyle, Terraria.Item.useTime, Terraria.Item.value, and Terraria.Entity.width.
Referenced by Terraria.Item.SetDefaults4(), and Terraria.Item.SetDefaults5().