TModLoader v1.4.4.9
TModLoader source code documentation
Loading...
Searching...
No Matches

◆ DefaultToHealingPotion()

void Terraria.Item.DefaultToHealingPotion ( int newwidth,
int newheight,
int healingAmount,
int animationTime = 17 )
inline

Definition at line 48703 of file Item.cs.

48704 {
48706 useStyle = 9;
48707 useTurn = true;
48710 consumable = true;
48711 width = newwidth;
48712 height = newheight;
48713 rare = 1;
48714 value = buyPrice(0, 0, 20);
48715 potion = true;
48717 }
int width
The width of this Entity's hitbox, in pixels.
Definition Entity.cs:46
int height
The height of this Entity's hitbox, in pixels.
Definition Entity.cs:51
static readonly SoundStyle Item3
Definition SoundID.cs:683
SoundStyle? UseSound
The sound this item makes when used. Set this to an existing T:Terraria.ID.SoundID entry or assign to...
Definition Item.cs:534
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....
Definition Item.cs:49543
bool useTurn
Whether the player can turn around while the using animation of this item is happening....
Definition Item.cs:500
int useAnimation
The time span of the using animation for the item in ticks. This is independent of the time it takes ...
Definition Item.cs:384
int value
The number of copper coins this item is worth (aka, cost to buy from a merchant). Setting it to 10462...
Definition Item.cs:655
int rare
Indicates the rarity of an item. Assign to a T:Terraria.ID.ItemRarityID value. Vanilla values range f...
Definition Item.cs:587
int maxStack
The maximum number of items that can be contained within a single stack. F:Terraria....
Definition Item.cs:402
bool consumable
Whether the item is consumed after use. If consumed, the item stack will decrease by 1....
Definition Item.cs:488
int healLife
The amount of health this item restores on use. Use M:Terraria.ModLoader.ModItem....
Definition Item.cs:469
int useStyle
Assign to an T:Terraria.ID.ItemUseStyleID value to give this item a specific animation while in use....
Definition Item.cs:366
static int CommonMaxStack
The default stack size for stackable items: 9999.
Definition Item.cs:94
int useTime
The time span of using the item in ticks. This is independent of the time it takes for the item anima...
Definition Item.cs:391
bool potion
If true, this item will inflict potion sickness on use. Also determines whether the item cannot be us...
Definition Item.cs:482

References Terraria.Item.buyPrice(), Terraria.Item.CommonMaxStack, Terraria.Item.consumable, Terraria.Item.healLife, Terraria.Entity.height, Terraria.ID.SoundID.Item3, Terraria.Item.maxStack, Terraria.Item.potion, Terraria.Item.rare, Terraria.Item.useAnimation, Terraria.Item.UseSound, Terraria.Item.useStyle, Terraria.Item.useTime, Terraria.Item.useTurn, Terraria.Item.value, and Terraria.Entity.width.

Referenced by Terraria.Item.SetFoodDefaults().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: