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

◆ DefaultToSolution()

void Terraria.Item.DefaultToSolution ( int projectileId)
inline

This method sets a variety of Item values common to Clentaminator ammo solution items.
Specifically:

shoot = projectileId - 145; ammo = AmmoID.Solution; width = 10; height = 12; value = buyPrice(0, 0, 15); rare = 3; maxStack = F:Terraria.Item.CommonMaxStack; consumable = true;

Parameters
projectileId

Definition at line 47808 of file Item.cs.

47809 {
47810 shoot = projectileId - 145;
47812 width = 10;
47813 height = 12;
47814 value = buyPrice(0, 0, 15);
47815 rare = 3;
47817 consumable = true;
47818 }
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 int Solution
Definition AmmoID.cs:151
AmmoID entries represent ammo types. Ammo items that share the same AmmoID value assigned to F:Terrar...
Definition AmmoID.cs:11
int ammo
The Ammo ID this item belongs to. Weapons with F:Terraria.Item.useAmmo set to the same AmmoID will co...
Definition Item.cs:606
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
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 shoot
The ID of the projectile that is fired by this item on use. Either a T:Terraria.ID....
Definition Item.cs:594
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
static int CommonMaxStack
The default stack size for stackable items: 9999.
Definition Item.cs:94

References Terraria.Item.ammo, Terraria.Item.buyPrice(), Terraria.Item.CommonMaxStack, Terraria.Item.consumable, Terraria.Entity.height, Terraria.Item.maxStack, Terraria.Item.rare, Terraria.Item.shoot, Terraria.ID.AmmoID.Solution, Terraria.Item.value, and Terraria.Entity.width.

Referenced by Terraria.Item.SetDefaults5().

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