Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update to 1.25 #12

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions History/Action.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 1 addition & 3 deletions History/Commands/RollbackCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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++)
{
Expand Down
11 changes: 6 additions & 5 deletions History/History.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Action> Actions = new List<Action>(SaveCount);
Expand All @@ -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<HCommand> CommandQueue = new BlockingCollection<HCommand>();
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
{
Expand Down Expand Up @@ -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<Vector2> 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<Vector2> done, byte style = 0, int alt = 0, int random = -1, bool direction = false)
{
switch (etype)
{
Expand Down
11 changes: 7 additions & 4 deletions History/History.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -36,20 +36,23 @@
</PropertyGroup>
<ItemGroup>
<Reference Include="Mono.Data.Sqlite">
<HintPath>..\..\..\..\Desktop\TShock 4.3.7\ServerPlugins\Mono.Data.Sqlite.dll</HintPath>
<HintPath>..\References\Mono.Data.Sqlite.dll</HintPath>
</Reference>
<Reference Include="MySql.Data">
<HintPath>..\..\..\..\Desktop\TShock 4.3.7\ServerPlugins\MySql.Data.dll</HintPath>
<HintPath>..\References\MySql.Data.dll</HintPath>
</Reference>
<Reference Include="OTAPI">
<HintPath>..\References\OTAPI.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="TerrariaServer, Version=1.3.0.6, Culture=neutral, processorArchitecture=x86">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\Desktop\TShock 4.3.11\TerrariaServer.exe</HintPath>
<HintPath>..\References\TerrariaServer.exe</HintPath>
</Reference>
<Reference Include="TShockAPI, Version=4.3.9.0, Culture=neutral, processorArchitecture=x86">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\..\..\Desktop\TShock 4.3.11\ServerPlugins\TShockAPI.dll</HintPath>
<HintPath>..\References\TShockAPI.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
Expand Down
4 changes: 2 additions & 2 deletions History/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
[assembly: AssemblyVersion("1.6.1.2")]
[assembly: AssemblyFileVersion("1.6.1.2")]
Binary file modified History/bin/History.dll
Binary file not shown.
Binary file added References/OTAPI.dll
Binary file not shown.
Binary file modified References/TShockAPI.dll
Binary file not shown.
Binary file modified References/TerrariaServer.exe
Binary file not shown.