diff --git a/History/Action.cs b/History/Action.cs index 6afa076..63265d2 100644 --- a/History/Action.cs +++ b/History/Action.cs @@ -197,8 +197,6 @@ public void Rollback() break; } - bool success = false; - if (Terraria.ObjectData.TileObjectData.CustomPlace(data, style) && data != 82) WorldGen.PlaceObject(x, y, data, false, style: style, alternate: alt, random: random, direction: direction ? 1 : -1); else diff --git a/History/Commands/RollbackCommand.cs b/History/Commands/RollbackCommand.cs index 5ff0584..febff1a 100644 --- a/History/Commands/RollbackCommand.cs +++ b/History/Commands/RollbackCommand.cs @@ -66,9 +66,7 @@ public override void Execute() account, rollbackTime, Main.worldID); } if (Main.rand == null) - Main.rand = new Random(); - if (WorldGen.genRand == null) - WorldGen.genRand = new Random(); + Main.rand = new Terraria.Utilities.UnifiedRandom(); for (int i = 0; i >= 0 && i < History.Actions.Count; i++) { diff --git a/History/History.cs b/History/History.cs index 0b94cfb..3987c8e 100644 --- a/History/History.cs +++ b/History/History.cs @@ -18,10 +18,11 @@ using TerrariaApi.Server; using TShockAPI; using TShockAPI.DB; +using Microsoft.Xna.Framework; namespace History { - [ApiVersion(1, 23)] + [ApiVersion(2, 0)] public class History : TerrariaPlugin { public static List Actions = new List(SaveCount); @@ -32,7 +33,7 @@ public class History : TerrariaPlugin private bool[] AwaitingHistory = new bool[256]; public override string Author { - get { return "Maintained by Cracker64 & Zaicon"; } + get { return "MarioE/Cracker65/Zaicon, updated by Ryozuki"; } } CancellationTokenSource Cancel = new CancellationTokenSource(); private BlockingCollection CommandQueue = new BlockingCollection(); @@ -684,7 +685,7 @@ static Vector2 furnitureDimensions(ushort type, byte style) return dim; } //This finds the 0,0 of a furniture - static Vector2 adjustDest(ref Vector2 dest, Tile tile, int which, int div, byte style) + static Vector2 adjustDest(ref Vector2 dest, OTAPI.Tile.ITile tile, int which, int div, byte style) { Vector2 relative = new Vector2(0, 0); if (dest.X < 0) @@ -780,7 +781,7 @@ static void adjustFurniture(ref int x, ref int y, ref byte style, bool origin = { int which = 10; // An invalid which, to skip cases if it never changes. int div = 1; - Tile tile = Main.tile[x, y]; + OTAPI.Tile.ITile tile = Main.tile[x, y]; getPlaceData(tile.type, ref which, ref div); switch (which) { @@ -1029,7 +1030,7 @@ void initBreaks() breakableWall[395] = true; breakableWall[440] = true; } - void logEdit(byte etype, Tile tile, int X, int Y, ushort type, string account, List done, byte style = 0, int alt = 0, int random = -1, bool direction = false) + void logEdit(byte etype, OTAPI.Tile.ITile tile, int X, int Y, ushort type, string account, List done, byte style = 0, int alt = 0, int random = -1, bool direction = false) { switch (etype) { diff --git a/History/History.csproj b/History/History.csproj index 7729112..f4339b8 100644 --- a/History/History.csproj +++ b/History/History.csproj @@ -36,20 +36,23 @@ - ..\..\..\..\Desktop\TShock 4.3.7\ServerPlugins\Mono.Data.Sqlite.dll + ..\References\Mono.Data.Sqlite.dll - ..\..\..\..\Desktop\TShock 4.3.7\ServerPlugins\MySql.Data.dll + ..\References\MySql.Data.dll + + + ..\References\OTAPI.dll False - ..\..\..\..\Desktop\TShock 4.3.11\TerrariaServer.exe + ..\References\TerrariaServer.exe False - ..\..\..\..\Desktop\TShock 4.3.11\ServerPlugins\TShockAPI.dll + ..\References\TShockAPI.dll diff --git a/History/Properties/AssemblyInfo.cs b/History/Properties/AssemblyInfo.cs index f6033ea..8bcdd50 100644 --- a/History/Properties/AssemblyInfo.cs +++ b/History/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.6.1.1")] -[assembly: AssemblyFileVersion("1.6.1.1")] \ No newline at end of file +[assembly: AssemblyVersion("1.6.1.2")] +[assembly: AssemblyFileVersion("1.6.1.2")] \ No newline at end of file diff --git a/History/bin/History.dll b/History/bin/History.dll index 066960c..d34721b 100644 Binary files a/History/bin/History.dll and b/History/bin/History.dll differ diff --git a/References/OTAPI.dll b/References/OTAPI.dll new file mode 100644 index 0000000..682915a Binary files /dev/null and b/References/OTAPI.dll differ diff --git a/References/TShockAPI.dll b/References/TShockAPI.dll index 45112b3..0f05abc 100644 Binary files a/References/TShockAPI.dll and b/References/TShockAPI.dll differ diff --git a/References/TerrariaServer.exe b/References/TerrariaServer.exe index 322964f..e3f16ac 100644 Binary files a/References/TerrariaServer.exe and b/References/TerrariaServer.exe differ