Re-enable hardcoreonly.
Added mediumcoreonly (will allow mediumcore and hardcore players)
This commit is contained in:
parent
9447ce37dc
commit
c71789275d
2 changed files with 13 additions and 7 deletions
|
|
@ -60,8 +60,9 @@ namespace TShockAPI
|
||||||
public bool RememberLeavePos;
|
public bool RememberLeavePos;
|
||||||
|
|
||||||
public bool HardcoreOnly;
|
public bool HardcoreOnly;
|
||||||
public bool KickOnHardcoreDeath;
|
public bool MediumcoreOnly;
|
||||||
public bool BanOnHardcoreDeath;
|
public bool KickOnMediumcoreDeath;
|
||||||
|
public bool BanOnMediumcoreDeath;
|
||||||
|
|
||||||
public bool AutoSave = true;
|
public bool AutoSave = true;
|
||||||
|
|
||||||
|
|
@ -91,8 +92,8 @@ namespace TShockAPI
|
||||||
public string IllogicalLiquidUseReason = "Manipulating liquid without bucket.";
|
public string IllogicalLiquidUseReason = "Manipulating liquid without bucket.";
|
||||||
public string LiquidAbuseReason = "Placing impossible to place liquid.";
|
public string LiquidAbuseReason = "Placing impossible to place liquid.";
|
||||||
public string TileKillAbuseReason = "Tile Kill abuse ({0})";
|
public string TileKillAbuseReason = "Tile Kill abuse ({0})";
|
||||||
public string HardcoreBanReason = "Death results in a ban";
|
public string MediumcoreBanReason = "Death results in a ban";
|
||||||
public string HardcoreKickReason = "Death results in a kick";
|
public string MediumcoreKickReason = "Death results in a kick";
|
||||||
public string ProjectileAbuseReason = "Projectile abuse";
|
public string ProjectileAbuseReason = "Projectile abuse";
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -147,7 +147,7 @@ namespace TShockAPI
|
||||||
byte hair = args.Data.ReadInt8();
|
byte hair = args.Data.ReadInt8();
|
||||||
byte male = args.Data.ReadInt8();
|
byte male = args.Data.ReadInt8();
|
||||||
args.Data.Position += 21;
|
args.Data.Position += 21;
|
||||||
bool difficulty = args.Data.ReadBoolean();
|
byte difficulty = args.Data.ReadInt8();
|
||||||
string name = Encoding.ASCII.GetString(args.Data.ReadBytes((int)(args.Data.Length - args.Data.Position - 1)));
|
string name = Encoding.ASCII.GetString(args.Data.ReadBytes((int)(args.Data.Length - args.Data.Position - 1)));
|
||||||
|
|
||||||
if (hair >= Main.maxHair)
|
if (hair >= Main.maxHair)
|
||||||
|
|
@ -180,11 +180,16 @@ namespace TShockAPI
|
||||||
{
|
{
|
||||||
return Tools.HandleGriefer(args.Player, "Sent client info more than once");
|
return Tools.HandleGriefer(args.Player, "Sent client info more than once");
|
||||||
}
|
}
|
||||||
/*if (TShock.Config.HardcoreOnly && !hardcore)
|
if (TShock.Config.MediumcoreOnly && difficulty < 1)
|
||||||
|
{
|
||||||
|
Tools.ForceKick(args.Player, "Server is set to mediumcore and above characters only!");
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
if (TShock.Config.HardcoreOnly && difficulty < 2)
|
||||||
{
|
{
|
||||||
Tools.ForceKick(args.Player, "Server is set to hardcore characters only!");
|
Tools.ForceKick(args.Player, "Server is set to hardcore characters only!");
|
||||||
return true;
|
return true;
|
||||||
}*/
|
}
|
||||||
|
|
||||||
args.Player.ReceivedInfo = true;
|
args.Player.ReceivedInfo = true;
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue