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

◆ GetItem_FillEmptyInventorySlot_VoidBag()

bool Terraria.Player.GetItem_FillEmptyInventorySlot_VoidBag ( int plr,
Item[] inv,
Item newItem,
GetItemSettings settings,
Item returnItem,
int i )
inlineprivate

Definition at line 38308 of file Player.cs.

38309 {
38310 if (inv[i].type != 0)
38311 {
38312 return false;
38313 }
38314 if (newItem.IsACoin)
38315 {
38316 SoundEngine.PlaySound(38, (int)position.X, (int)position.Y);
38317 }
38318 else
38319 {
38320 SoundEngine.PlaySound(7, (int)position.X, (int)position.Y);
38321 }
38322 returnItem.shimmered = false;
38323 inv[i] = returnItem;
38324 if (!settings.NoText)
38325 {
38326 PopupText.NewText(PopupTextContext.ItemPickupToVoidContainer, newItem, newItem.stack, noStack: false, settings.LongText);
38327 }
38328 DoCoins(i);
38329 if (plr == Main.myPlayer)
38330 {
38331 Recipe.FindRecipes();
38332 }
38334 settings.HandlePostAction(inv[i]);
38335 return true;
38336 }
static SlotId PlaySound(in SoundStyle? style, Vector2? position=null, SoundUpdateCallback? updateCallback=null)
Attempts to play a sound style with the provided sound style (if it's not null), and returns a valid ...
Vector2 position
The position of this Entity in world coordinates.
Definition Entity.cs:28
static void NotifyItemPickup(Player player, Item item)
void DoCoins(int i)
Definition Player.cs:38062

References Terraria.Player.DoCoins(), Terraria.Recipe.FindRecipes(), Terraria.Main.myPlayer, Terraria.PopupText.NewText(), Terraria.GameContent.Achievements.AchievementsHelper.NotifyItemPickup(), Terraria.Audio.SoundEngine.PlaySound(), and Terraria.Entity.position.

Referenced by Terraria.Player.GetItem_VoidVault().

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