Skip to content

Commit

Permalink
v1.5.5
Browse files Browse the repository at this point in the history
fixed compatibility issues with alchemistnpc mod
  • Loading branch information
SadOnion committed Apr 1, 2020
1 parent 1c479e5 commit 365a218
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 1 deletion.
Binary file modified .vs/AutoReroll/v16/.suo
Binary file not shown.
Binary file modified .vs/AutoReroll/v16/Server/sqlite3/storage.ide
Binary file not shown.
Binary file removed .vs/AutoReroll/v16/Server/sqlite3/storage.ide-shm
Binary file not shown.
Binary file removed .vs/AutoReroll/v16/Server/sqlite3/storage.ide-wal
Binary file not shown.
6 changes: 6 additions & 0 deletions AutoReroll.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ public class AutoReroll : Mod

public static Mod Thorium {get;private set;}
public static Mod Calamity {get;private set;}
public static Mod AlchemistNPC {get;private set;}
public static Mod AlchemistNPC_Lite {get;private set;}
public static int ForgePerSec=10;

public bool isInReforgeMenu;
Expand All @@ -36,6 +38,8 @@ public override void Load()
userInterface = new UserInterface();
Thorium = ModLoader.GetMod("ThoriumMod");
Calamity = ModLoader.GetMod("CalamityMod");
AlchemistNPC = ModLoader.GetMod("AlchemistNPC");
AlchemistNPC_Lite = ModLoader.GetMod("AlchemistNPCLite");
}
}
public override void PostSetupContent()
Expand All @@ -48,6 +52,8 @@ public override void Unload()
Instance=null;
Thorium = null;
Calamity=null;
AlchemistNPC=null;
AlchemistNPC_Lite=null;
}
public override void UpdateUI(GameTime gameTime)
{
Expand Down
2 changes: 2 additions & 0 deletions Gadgets/ReforgeMachineUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,9 @@ private void OnItemChanged()
reforgeLabel.selected = true;
tempSelected.Add(i);
}

PrefixUtils.Prefix pref = PrefixUtils.BestPrefix(tempItem);

if(pref == PrefixUtils.Prefix.Accessory)
{
if(i == 65 || i==72 || i == 68)
Expand Down
5 changes: 5 additions & 0 deletions PrefixUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,14 @@ public enum Prefix
}
public static Prefix BestPrefix(Item item)
{
if(AutoReroll.AlchemistNPC != null || AutoReroll.AlchemistNPC_Lite != null)
{
return Prefix.None;
}
UnifiedRandom unifiedRandom = WorldGen.gen ? WorldGen.genRand : Main.rand;
int num = 0;
int modPrefix = ItemLoader.ChoosePrefix(item, unifiedRandom);
Main.NewText(modPrefix);
if (modPrefix >= 0)
{
num = modPrefix;//-1?
Expand Down
2 changes: 1 addition & 1 deletion build.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
displayName = AutoReforge
author = Sad Onion
version = 1.5.4
version = 1.5.5
homepage = https://forums.terraria.org/index.php?threads/autoreroll.85057/

0 comments on commit 365a218

Please sign in to comment.