Skip to content

Commit c21a54c

Browse files
committed
Updated to 2.6.6
1 parent f515fa9 commit c21a54c

File tree

12 files changed

+38
-23
lines changed

12 files changed

+38
-23
lines changed

source/BP-Essentials/BP-Essentials.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@
8585
<Compile Include="Chat\Commands\Admin\TpLocation.cs" />
8686
<Compile Include="Chat\Commands\Admin\TpToApartment.cs" />
8787
<Compile Include="Chat\Commands\Admin\Wipe.cs" />
88-
<Compile Include="Chat\Commands\Admin\_SetJob.cs" />
88+
<Compile Include="Chat\Commands\Admin\SetJob.cs" />
8989
<Compile Include="Chat\Commands\Admin\Slap.cs" />
9090
<Compile Include="Chat\Commands\Admin\Strip.cs" />
9191
<Compile Include="Chat\Commands\Everyone\Afk.cs" />
@@ -119,6 +119,7 @@
119119
<Compile Include="HookChat.cs" />
120120
<Compile Include="Core.cs" />
121121
<Compile Include="HookMethods.cs" />
122+
<Compile Include="Methods\FileHandler\Translations.cs" />
122123
<Compile Include="Properties\AssemblyInfo.cs" />
123124
<Compile Include="Variables.cs" />
124125
<Compile Include="ExtensionMethods.cs" />

source/BP-Essentials/Chat/Commands/Admin/Ban.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
using System;
22
using static BP_Essentials.Variables;
3-
namespace BP_Essentials.Commands {
4-
public class Ban
3+
namespace BP_Essentials.Commands
4+
{
5+
class Ban
56
{
67
public static void Run(SvPlayer player, string message)
78
{

source/BP-Essentials/Chat/Commands/Admin/Clear.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public static void Run(SvPlayer player, string message)
2323
foreach (var item in shPlayer.myItems.Values)
2424
tempList.Add(item);
2525
for (int i = 0; i < tempList.Count; i++)
26-
shPlayer.TransferItem(2, tempList[i].item.index, shPlayer.MyItemCount(tempList[i].item.index), true);
26+
shPlayer.TransferItem(DeltaInv.RemoveFromMe, tempList[i].item.index, shPlayer.MyItemCount(tempList[i].item.index), true);
2727
player.SendChatMessage($"<color={infoColor}>You cleared the inventory of</color> <color={argColor}>{shPlayer.username}</color><color={infoColor}>.</color>");
2828
shPlayer.svPlayer.SendChatMessage($"<color={warningColor}>Your inventory has been cleared by</color> <color={argColor}>{player.playerData.username}</color><color={warningColor}>.</color>");
2929
}

source/BP-Essentials/Chat/Commands/Admin/_SetJob.cs renamed to source/BP-Essentials/Chat/Commands/Admin/SetJob.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
namespace BP_Essentials.Commands
1111
{
12-
class Setjob : SvPlayer
12+
class SetJob : SvPlayer
1313
{
1414
public static void Run(SvPlayer player, string message)
1515
{
@@ -46,7 +46,7 @@ public static void Run(SvPlayer player, string message)
4646
return;
4747
}
4848
player.SendChatMessage(string.Format(msg, currPlayer.username, Jobs[arg1Parsed]));
49-
player.SvSetJob(player.player.jobs[arg1Parsed], true, false);
49+
currPlayer.svPlayer.SvSetJob(player.player.jobs[arg1Parsed], true, false);
5050
}
5151
}
5252
}

source/BP-Essentials/Chat/Commands/Admin/TpAll.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ public static void Run(SvPlayer player, string message)
1010
{
1111
var pos = player.player.GetPosition();
1212
var rot = player.player.GetRotation();
13+
var placeIndex = player.player.GetPlaceIndex();
1314
foreach (var currPlayer in SvMan.players.Values)
14-
currPlayer.svPlayer.ResetAndSavePosition(pos, rot, player.player.GetPlaceIndex());
15+
currPlayer.svPlayer.ResetAndSavePosition(pos, rot, placeIndex);
1516
player.SendChatMessage($"<color={infoColor}>Teleported</color> <color={argColor}>everyone</color> <color={infoColor}>to your location.</color>");
1617
}
1718
}

source/BP-Essentials/Chat/Commands/Admin/TpHere.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,16 @@ public static void Run(SvPlayer player, string message)
1414
player.SendChatMessage(ArgRequired);
1515
return;
1616
}
17-
var shPlayer = GetShByStr.Run(arg1);
17+
var currPlayer = GetShByStr.Run(arg1);
1818
var shPlayer1 = player.player;
19-
if (shPlayer == null)
19+
if (currPlayer == null)
2020
{
2121
player.SendChatMessage(NotFoundOnline);
2222
return;
2323
}
24-
shPlayer.svPlayer.ResetAndSavePosition(shPlayer1.GetPosition(), shPlayer1.GetRotation(), shPlayer1.GetPlaceIndex());
25-
shPlayer.svPlayer.SendChatMessage($"<color={argColor}>{shPlayer1.username}</color><color={infoColor}> Teleported you to him.</color>");
26-
player.SendChatMessage($"<color={infoColor}>Teleported</color> <color={argColor}>{shPlayer.username}</color><color={infoColor}> To you.</color>");
24+
currPlayer.svPlayer.ResetAndSavePosition(shPlayer1.GetPosition(), shPlayer1.GetRotation(), shPlayer1.GetPlaceIndex());
25+
currPlayer.svPlayer.SendChatMessage($"<color={argColor}>{shPlayer1.username}</color><color={infoColor}> Teleported you to him.</color>");
26+
player.SendChatMessage($"<color={infoColor}>Teleported</color> <color={argColor}>{currPlayer.username}</color><color={infoColor}> To you.</color>");
2727
}
2828
}
2929
}

source/BP-Essentials/Chat/Commands/Everyone/Afk.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
using System;
22
using static BP_Essentials.Variables;
33
using System.IO;
4-
namespace BP_Essentials.Commands {
5-
public class Afk {
4+
namespace BP_Essentials.Commands
5+
{
6+
public class Afk
7+
{
68
public static void Run(SvPlayer player, string message)
79
{
810
ReadFile.Run(AfkListFile);

source/BP-Essentials/Chat/Commands/Everyone/ClearChat.cs

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,29 @@
33
using static BP_Essentials.Variables;
44
using static BP_Essentials.HookMethods;
55

6-
namespace BP_Essentials.Commands {
7-
public class ClearChat {
6+
namespace BP_Essentials.Commands
7+
{
8+
public class ClearChat
9+
{
810
public static void Run(SvPlayer player, string message)
911
{
1012
string arg1 = GetArgument.Run(1, false, false, message);
1113
if (arg1 == "all" || arg1 == "everyone")
1214
{
1315
if (!player.player.admin)
1416
{
15-
player.Send(SvSendType.Self, Channel.Unsequenced, 10, MsgNoPerm);
17+
player.SendChatMessage(MsgNoPerm);
1618
return;
1719
}
1820
for (var i = 0; i < 6; i++)
19-
player.Send(SvSendType.All, Channel.Unsequenced, 10, " ");
20-
player.Send(SvSendType.All, Channel.Unsequenced, 10, $"<color={argColor}>{player.playerData.username}</color><color={warningColor}> Cleared the chat for everyone.</color>");
21+
player.SendChatMessage(" ");
22+
player.SendChatMessage($"<color={argColor}>{player.playerData.username}</color><color={warningColor}> Cleared the chat for everyone.</color>");
2123
}
2224
else
2325
{
2426
for (var i = 0; i < 6; i++)
25-
player.Send(SvSendType.Self, Channel.Unsequenced, 10, " ");
26-
player.Send(SvSendType.Self, Channel.Unsequenced, 10, $"<color={warningColor}>Cleared the chat for yourself.</color>");
27+
player.SendChatMessage(" ");
28+
player.SendChatMessage($"<color={warningColor}>Cleared the chat for yourself.</color>");
2729
}
2830
}
2931
}

source/BP-Essentials/Core.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
using System.Reflection;
1919
using System.Threading;
2020
using UnityEngine;
21+
using UniversalUnityHooks;
2122
using static BP_Essentials.Variables;
2223
namespace BP_Essentials
2324
{

source/BP-Essentials/HookChat.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@
77
using System.Threading;
88
using System.Threading.Tasks;
99
using UnityEngine;
10+
using UniversalUnityHooks;
1011
using static BP_Essentials.HookMethods;
1112
using static BP_Essentials.Variables;
13+
1214
namespace BP_Essentials
1315
{
1416
public class HookChat

0 commit comments

Comments
 (0)