Skip to content

Commit

Permalink
v0.4.3, fix #10, fix #7
Browse files Browse the repository at this point in the history
  • Loading branch information
JavidPack committed Apr 30, 2020
1 parent 6a2abb3 commit 8f1c21a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion AutoTrashGlobalItem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,14 @@ public override bool Autoload(ref string name)

public override bool OnPickup(Item item, Player player)
{
// TODO: IL edit maybe
var autoTrashPlayer = player.GetModPlayer<AutoTrashPlayer>();
//Main.NewText("ItemID: " + item.type);
//foreach (var autoItme in autoTrashPlayer.AutoTrashItems)
//{
// Main.NewText("Auto: " + autoItme.type);
//}
if (AutoTrashPlayer.IsModItem(item) && item.modItem.mod.Name == "ModLoader")
if (AutoTrashPlayer.IsModItem(item) && item.modItem.Name == "MysteryItem")
{
return true;
}
Expand Down
3 changes: 2 additions & 1 deletion AutoTrashPlayer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ internal class AutoTrashPlayer : ModPlayer
public Item LastAutoTrashItem;

public bool NoValue;
internal bool NoValueBelongs(Item item) => item.value == 0;
internal bool NoValueBelongs(Item item) => item.value == 0 && !ItemID.Sets.NebulaPickup[item.type] && !heartsAndMana.Contains(item.type);
internal static int[] heartsAndMana = new int[] { 58, 1734, 1867, 184 , 1735 , 1868 };

public override void Initialize()
{
Expand Down
2 changes: 1 addition & 1 deletion build.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
author = jopojelly
version = 0.4.2
version = 0.4.3
displayName = Auto Trash
homepage = https://forums.terraria.org/index.php?threads/auto-trash.53592/
buildIgnore = .vs\*, Properties\*, *.csproj, *.user, obj\*, bin\*, *.config, .git\*
Expand Down

0 comments on commit 8f1c21a

Please sign in to comment.