Merge branch 'general-devel' into patch-18
This commit is contained in:
commit
45b6daff0f
3 changed files with 422 additions and 377 deletions
|
|
@ -4,6 +4,7 @@ This is the rolling changelog for TShock for Terraria. Use past tense when addin
|
||||||
|
|
||||||
## Upcoming changes
|
## Upcoming changes
|
||||||
* Installed new sprinklers!
|
* Installed new sprinklers!
|
||||||
|
* Organized parameters by category and relevance in the `config.json` file. (@kubedzero)
|
||||||
* Fix multiple holes in Bouncer OnTileData. (@Patrikkk, @hakusaro)
|
* Fix multiple holes in Bouncer OnTileData. (@Patrikkk, @hakusaro)
|
||||||
* Issue where players could replace tiles with banned tiles without permission.
|
* Issue where players could replace tiles with banned tiles without permission.
|
||||||
* Including replace action in TilePlace threshold incrementation, so players cannot bypass the threshold while replacing tiles/walls.
|
* Including replace action in TilePlace threshold incrementation, so players cannot bypass the threshold while replacing tiles/walls.
|
||||||
|
|
@ -16,7 +17,9 @@ This is the rolling changelog for TShock for Terraria. Use past tense when addin
|
||||||
* Adding GolfBallItemIDs list in Handlers.LandGolfBallInCupHandler.cs
|
* Adding GolfBallItemIDs list in Handlers.LandGolfBallInCupHandler.cs
|
||||||
* Fixed an issue in the SendTileSquare handler that was rejecting valid tile objects (@QuiCM)
|
* Fixed an issue in the SendTileSquare handler that was rejecting valid tile objects (@QuiCM)
|
||||||
* Fixed the issue where players were unable to place regular ropes because of the valid placement being caught in Bouncer OnTileEdit. (@Patrikkk)
|
* Fixed the issue where players were unable to place regular ropes because of the valid placement being caught in Bouncer OnTileEdit. (@Patrikkk)
|
||||||
* Added pet license usage permissions to `trustedadmin` and `owner` groups. Do note that this has a high network usage and can be easily be abused so it is not recommended to give out this permission to lower level groups.
|
* Added pet license usage permissions to `trustedadmin` and `owner` groups. Do note that this has a high network usage and can be easily be abused so it is not recommended to give out this permission to lower level groups. (@moisterrific)
|
||||||
|
* Remove checks that prevented people placing personal storage tiles in SSC as the personal storage is synced with the server.(@Patrikkk)
|
||||||
|
* Cleaned up a check in Bouner OnTileEdit where it checks for using the respective item when placing a tile to make it clearer. This change also fixed the issue in a previous commit where valid replace action was caught. Moved the check for max tile/wall types to the beginning of the method. (@Patrikkk)
|
||||||
|
|
||||||
## TShock 4.4.0 (Pre-release 11)
|
## TShock 4.4.0 (Pre-release 11)
|
||||||
* New permission `tshock.tp.pylon` to enable teleporting via Teleportation Pylons (@QuiCM)
|
* New permission `tshock.tp.pylon` to enable teleporting via Teleportation Pylons (@QuiCM)
|
||||||
|
|
|
||||||
|
|
@ -224,9 +224,11 @@ namespace TShockAPI
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
if (editData < 0)
|
if (editData < 0 ||
|
||||||
|
((action == EditAction.PlaceTile || action == EditAction.ReplaceTile) && editData >= Main.maxTileSets) ||
|
||||||
|
((action == EditAction.PlaceWall || action == EditAction.ReplaceWall) && editData >= Main.maxWallTypes))
|
||||||
{
|
{
|
||||||
TShock.Log.ConsoleDebug("Bouncer / OnTileEdit rejected from (editData check) {0} {1} {2}", args.Player.Name, action, editData);
|
TShock.Log.ConsoleDebug("Bouncer / OnTileEdit rejected from editData out of bounds {0} {1} {2}", args.Player.Name, action, editData);
|
||||||
args.Player.SendTileSquare(tileX, tileY, 4);
|
args.Player.SendTileSquare(tileX, tileY, 4);
|
||||||
args.Handled = true;
|
args.Handled = true;
|
||||||
return;
|
return;
|
||||||
|
|
@ -344,37 +346,33 @@ namespace TShockAPI
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// If they aren't selecting the item which creates the tile or wall, they're hacking.
|
/// Handle placement action if the player is using an Ice Rod but not placing the iceblock.
|
||||||
if (!(selectedItem.netID == ItemID.IceRod && editData == TileID.MagicalIceBlock) &&
|
if (selectedItem.netID == ItemID.IceRod && editData != TileID.MagicalIceBlock)
|
||||||
(editData != (action == EditAction.PlaceTile ? selectedItem.createTile : selectedItem.createWall) &&
|
|
||||||
!(ropeCoilPlacements.ContainsKey(selectedItem.netID) && editData == ropeCoilPlacements[selectedItem.netID])))
|
|
||||||
{
|
{
|
||||||
// Rather than attempting to figure out what the above if statement does, we'll just patch it
|
TShock.Log.ConsoleDebug("Bouncer / OnTileEdit rejected from using ice rod but not placing ice block {0} {1} {2}", args.Player.Name, action, editData);
|
||||||
// Adds exception to this check to allow dirt bombs to create dirt tiles
|
args.Player.SendTileSquare(tileX, tileY, 4);
|
||||||
if (!(selectedItem.netID == ItemID.DirtBomb && action == EditAction.PlaceTile && editData == TileID.Dirt))
|
args.Handled = true;
|
||||||
|
}
|
||||||
|
/// If they aren't selecting the item which creates the tile, they're hacking.
|
||||||
|
if ((action == EditAction.PlaceTile || action == EditAction.ReplaceTile) && editData != selectedItem.createTile)
|
||||||
|
{
|
||||||
|
/// These would get caught up in the below check because Terraria does not set their createTile field.
|
||||||
|
if (selectedItem.netID != ItemID.IceRod && selectedItem.netID != ItemID.DirtBomb && selectedItem.netID != ItemID.StickyBomb)
|
||||||
{
|
{
|
||||||
TShock.Log.ConsoleDebug("Bouncer / OnTileEdit rejected from (ms2) {0} {1} {2}", args.Player.Name, action, editData);
|
TShock.Log.ConsoleDebug("Bouncer / OnTileEdit rejected from tile placement not matching selected item createTile {0} {1} {2} selectedItemID:{3} createTile:{4}", args.Player.Name, action, editData, selectedItem.netID, selectedItem.createTile);
|
||||||
args.Player.SendTileSquare(tileX, tileY, 4);
|
args.Player.SendTileSquare(tileX, tileY, 4);
|
||||||
args.Handled = true;
|
args.Handled = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/// If they aren't selecting the item which creates the wall, they're hacking.
|
||||||
if (editData >= ((action == EditAction.PlaceTile || action == EditAction.ReplaceTile) ? Main.maxTileSets : Main.maxWallTypes))
|
if ((action == EditAction.PlaceWall || action == EditAction.ReplaceWall) && editData != selectedItem.createWall)
|
||||||
{
|
{
|
||||||
TShock.Log.ConsoleDebug("Bouncer / OnTileEdit rejected from (ms3) {0} {1} {2}", args.Player.Name, action, editData);
|
TShock.Log.ConsoleDebug("Bouncer / OnTileEdit rejected from wall placement not matching selected item createWall {0} {1} {2} selectedItemID:{3} createWall:{4}", args.Player.Name, action, editData, selectedItem.netID, selectedItem.createWall);
|
||||||
args.Player.SendTileSquare(tileX, tileY, 4);
|
args.Player.SendTileSquare(tileX, tileY, 4);
|
||||||
args.Handled = true;
|
args.Handled = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (action == EditAction.PlaceTile && (editData == TileID.PiggyBank || editData == TileID.Safes) && Main.ServerSideCharacter)
|
|
||||||
{
|
|
||||||
TShock.Log.ConsoleDebug("Bouncer / OnTileEdit rejected from (sscprotect) {0} {1} {2}", args.Player.Name, action, editData);
|
|
||||||
args.Player.SendErrorMessage("You cannot place this tile because server side characters are enabled.");
|
|
||||||
args.Player.SendTileSquare(tileX, tileY, 3);
|
|
||||||
args.Handled = true;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (action == EditAction.PlaceTile && (editData == TileID.Containers || editData == TileID.Containers2))
|
if (action == EditAction.PlaceTile && (editData == TileID.Containers || editData == TileID.Containers2))
|
||||||
{
|
{
|
||||||
if (TShock.Utils.HasWorldReachedMaxChests())
|
if (TShock.Utils.HasWorldReachedMaxChests())
|
||||||
|
|
|
||||||
|
|
@ -30,6 +30,87 @@ namespace TShockAPI
|
||||||
/// <summary>The config file class, which contains the configuration for a server that is serialized into JSON and deserialized on load.</summary>
|
/// <summary>The config file class, which contains the configuration for a server that is serialized into JSON and deserialized on load.</summary>
|
||||||
public class ConfigFile
|
public class ConfigFile
|
||||||
{
|
{
|
||||||
|
|
||||||
|
#region Server Settings
|
||||||
|
|
||||||
|
/// <summary>The server password required to join the server.</summary>
|
||||||
|
[Description("The server password required to join the server.")]
|
||||||
|
public string ServerPassword = "";
|
||||||
|
|
||||||
|
/// <summary>The port the server runs on.</summary>
|
||||||
|
[Description("The port the server runs on.")]
|
||||||
|
public int ServerPort = 7777;
|
||||||
|
|
||||||
|
/// <summary>Maximum number of clients connected at once. If lower than Terraria's setting, the server will kick excess connections.</summary>
|
||||||
|
[Description("Maximum number of clients connected at once.\nIf you want people to be kicked with \"Server is full\" set this to how many players you want max and then set Terraria max players to 2 higher.")]
|
||||||
|
public int MaxSlots = 8;
|
||||||
|
|
||||||
|
/// <summary>The number of reserved slots past your max server slots that can be joined by reserved players.</summary>
|
||||||
|
[Description("The number of reserved slots past your max server slots that can be joined by reserved players.")]
|
||||||
|
public int ReservedSlots = 20;
|
||||||
|
|
||||||
|
/// <summary>Replaces the world name during a session if UseServerName is true.</summary>
|
||||||
|
[Description("Replaces the world name during a session if UseServerName is true.")]
|
||||||
|
public string ServerName = "";
|
||||||
|
|
||||||
|
/// <summary>Whether or not to use ServerName in place of the world name.</summary>
|
||||||
|
[Description("Whether or not to use ServerName in place of the world name.")]
|
||||||
|
public bool UseServerName = false;
|
||||||
|
|
||||||
|
/// <summary>The path to the directory where logs should be written to.</summary>
|
||||||
|
[Description("The path to the directory where logs should be written to.")]
|
||||||
|
public string LogPath = "tshock";
|
||||||
|
|
||||||
|
/// <summary>Whether or not the server should output debug level messages related to system operation.</summary>
|
||||||
|
[Description("Whether or not the server should output debug level messages related to system operation.")]
|
||||||
|
public bool DebugLogs = true;
|
||||||
|
|
||||||
|
/// <summary>Prevents users from being able to login before they finish connecting.</summary>
|
||||||
|
[Description("Prevents users from being able to login before they finish connecting.")]
|
||||||
|
public bool DisableLoginBeforeJoin;
|
||||||
|
|
||||||
|
/// <summary>Allows stacks in chests to go beyond the stack limit during world loading.</summary>
|
||||||
|
[Description("Allows stacks in chests to go beyond the stack limit during world loading.")]
|
||||||
|
public bool IgnoreChestStacksOnLoad = false;
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
#region Backup and Save Settings
|
||||||
|
|
||||||
|
/// <summary>Enable or disable Terraria's built-in world auto save.</summary>
|
||||||
|
[Description("Enable or disable Terraria's built-in world auto save.")]
|
||||||
|
public bool AutoSave = true;
|
||||||
|
|
||||||
|
/// <summary>Enable or disable world save announcements.</summary>
|
||||||
|
[Description("Enable or disable world save announcements.")]
|
||||||
|
public bool AnnounceSave = true;
|
||||||
|
|
||||||
|
/// <summary>Whether or not to show backup auto save messages.</summary>
|
||||||
|
[Description("Whether or not to show backup auto save messages.")]
|
||||||
|
public bool ShowBackupAutosaveMessages = true;
|
||||||
|
|
||||||
|
/// <summary>The interval between backups, in minutes. Backups are stored in the tshock/backups folder.</summary>
|
||||||
|
[Description("The interval between backups, in minutes. Backups are stored in the tshock/backups folder.")]
|
||||||
|
public int BackupInterval;
|
||||||
|
|
||||||
|
/// <summary>For how long backups are kept in minutes.</summary>
|
||||||
|
[Description("For how long backups are kept in minutes.\neg. 2880 = 2 days.")]
|
||||||
|
public int BackupKeepFor = 60;
|
||||||
|
|
||||||
|
/// <summary>Whether or not to save the world if the server crashes from an unhandled exception.</summary>
|
||||||
|
[Description("Whether or not to save the world if the server crashes from an unhandled exception.")]
|
||||||
|
public bool SaveWorldOnCrash = true;
|
||||||
|
|
||||||
|
/// <summary>Whether or not to save the world when the last player disconnects.</summary>
|
||||||
|
[Description("Whether or not to save the world when the last player disconnects.")]
|
||||||
|
public bool SaveWorldOnLastPlayerExit = true;
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
#region World Settings
|
||||||
|
|
||||||
/// <summary>Determines the size of invasion events. The equation for calculating invasion size = 100 + (multiplier * (number of active players > 200 hp)).</summary>
|
/// <summary>Determines the size of invasion events. The equation for calculating invasion size = 100 + (multiplier * (number of active players > 200 hp)).</summary>
|
||||||
[Description("Determines the size of invasion events.\nThe equation for calculating invasion size is 100 + (multiplier * (number of active players with greater than 200 health)).")]
|
[Description("Determines the size of invasion events.\nThe equation for calculating invasion size is 100 + (multiplier * (number of active players with greater than 200 health)).")]
|
||||||
public int InvasionMultiplier = 1;
|
public int InvasionMultiplier = 1;
|
||||||
|
|
@ -42,14 +123,6 @@ namespace TShockAPI
|
||||||
[Description("The delay between waves. Lower values lead to more mobs.")]
|
[Description("The delay between waves. Lower values lead to more mobs.")]
|
||||||
public int DefaultSpawnRate = 600;
|
public int DefaultSpawnRate = 600;
|
||||||
|
|
||||||
/// <summary>The port the server runs on.</summary>
|
|
||||||
[Description("The port the server runs on.")]
|
|
||||||
public int ServerPort = 7777;
|
|
||||||
|
|
||||||
/// <summary>Enable or disable the whitelist based on IP addresses in the whitelist.txt file.</summary>
|
|
||||||
[Description("Enable or disable the whitelist based on IP addresses in the whitelist.txt file.")]
|
|
||||||
public bool EnableWhitelist;
|
|
||||||
|
|
||||||
/// <summary>Enables never-ending invasion events. You still need to start the event.</summary>
|
/// <summary>Enables never-ending invasion events. You still need to start the event.</summary>
|
||||||
[Description("Enables never ending invasion events. You still need to start the event, such as with the /invade command.")]
|
[Description("Enables never ending invasion events. You still need to start the event, such as with the /invade command.")]
|
||||||
public bool InfiniteInvasion;
|
public bool InfiniteInvasion;
|
||||||
|
|
@ -66,42 +139,10 @@ namespace TShockAPI
|
||||||
[Description("The tile radius around the spawn tile that is protected by the SpawnProtection setting.")]
|
[Description("The tile radius around the spawn tile that is protected by the SpawnProtection setting.")]
|
||||||
public int SpawnProtectionRadius = 10;
|
public int SpawnProtectionRadius = 10;
|
||||||
|
|
||||||
/// <summary>Maximum number of clients connected at once. If lower than Terraria's setting, the server will kick excess connections.</summary>
|
|
||||||
[Description("Maximum number of clients connected at once.\nIf you want people to be kicked with \"Server is full\" set this to how many players you want max and then set Terraria max players to 2 higher.")]
|
|
||||||
public int MaxSlots = 8;
|
|
||||||
|
|
||||||
/// <summary>Enable or disable anti-cheat range checks based on distance between the player and their block placements.</summary>
|
/// <summary>Enable or disable anti-cheat range checks based on distance between the player and their block placements.</summary>
|
||||||
[Description("Enable or disable anti-cheat range checks based on distance between the player and their block placements.")]
|
[Description("Enable or disable anti-cheat range checks based on distance between the player and their block placements.")]
|
||||||
public bool RangeChecks = true;
|
public bool RangeChecks = true;
|
||||||
|
|
||||||
/// <summary>Disables any placing, or removal of blocks.</summary>
|
|
||||||
[Description("Disables any placing, or removal of blocks.")]
|
|
||||||
public bool DisableBuild;
|
|
||||||
|
|
||||||
/// <summary>The chat color for the superadmin group.</summary>
|
|
||||||
[Description("The chat color for the superadmin group.\n#.#.# = Red/Blue/Green\nMax value: 255")]
|
|
||||||
public int[] SuperAdminChatRGB = { 255, 255, 255 };
|
|
||||||
|
|
||||||
/// <summary>The superadmin chat prefix.</summary>
|
|
||||||
[Description("The superadmin chat prefix.")]
|
|
||||||
public string SuperAdminChatPrefix = "(Super Admin) ";
|
|
||||||
|
|
||||||
/// <summary>The superadmin chat suffix.</summary>
|
|
||||||
[Description("The superadmin chat suffix.")]
|
|
||||||
public string SuperAdminChatSuffix = "";
|
|
||||||
|
|
||||||
/// <summary>The interval between backups, in minutes. Backups are stored in the tshock/backups folder.</summary>
|
|
||||||
[Description("The interval between backups, in minutes. Backups are stored in the tshock/backups folder.")]
|
|
||||||
public int BackupInterval;
|
|
||||||
|
|
||||||
/// <summary>For how long backups are kept in minutes.</summary>
|
|
||||||
[Description("For how long backups are kept in minutes.\neg. 2880 = 2 days.")]
|
|
||||||
public int BackupKeepFor = 60;
|
|
||||||
|
|
||||||
/// <summary>Remembers where a player left off, based on their IP. Does not persist through server restarts.</summary>
|
|
||||||
[Description("Remembers where a player left off, based on their IP. Does not persist through server restarts.\neg. When you try to disconnect, and reconnect to be automatically placed at spawn, you'll be at your last location.")]
|
|
||||||
public bool RememberLeavePos;
|
|
||||||
|
|
||||||
/// <summary>Prevents non-hardcore players from connecting.</summary>
|
/// <summary>Prevents non-hardcore players from connecting.</summary>
|
||||||
[Description("Prevents non-hardcore players from connecting.")]
|
[Description("Prevents non-hardcore players from connecting.")]
|
||||||
public bool HardcoreOnly;
|
public bool HardcoreOnly;
|
||||||
|
|
@ -110,136 +151,9 @@ namespace TShockAPI
|
||||||
[Description("Prevents softcore players from connecting.")]
|
[Description("Prevents softcore players from connecting.")]
|
||||||
public bool MediumcoreOnly;
|
public bool MediumcoreOnly;
|
||||||
|
|
||||||
/// <summary>Whether or not to kick mediumcore players on death.</summary>
|
/// <summary>Disables any placing, or removal of blocks.</summary>
|
||||||
[Description("Whether or not to kick mediumcore players on death.")]
|
[Description("Disables any placing, or removal of blocks.")]
|
||||||
public bool KickOnMediumcoreDeath;
|
public bool DisableBuild;
|
||||||
|
|
||||||
/// <summary>Whether or not to ban mediumcore players on death.</summary>
|
|
||||||
[Description("Whether or not to ban mediumcore players on death.")]
|
|
||||||
public bool BanOnMediumcoreDeath;
|
|
||||||
|
|
||||||
/// <summary>Enable or disable Terraria's built-in world auto save.</summary>
|
|
||||||
[Description("Enable or disable Terraria's built-in world auto save.")]
|
|
||||||
public bool AutoSave = true;
|
|
||||||
/// <summary>Enable or disable world save announcements.</summary>
|
|
||||||
[Description("Enable or disable world save announcements.")]
|
|
||||||
public bool AnnounceSave = true;
|
|
||||||
|
|
||||||
/// <summary>Number of failed login attempts before kicking the player.</summary>
|
|
||||||
[Description("Number of failed login attempts before kicking the player.")]
|
|
||||||
public int MaximumLoginAttempts = 3;
|
|
||||||
|
|
||||||
/// <summary>Replaces the world name during a session if UseServerName is true.</summary>
|
|
||||||
[Description("Replaces the world name during a session if UseServerName is true.")]
|
|
||||||
public string ServerName = "";
|
|
||||||
/// <summary>Whether or not to use ServerName in place of the world name.</summary>
|
|
||||||
[Description("Whether or not to use ServerName in place of the world name.")]
|
|
||||||
public bool UseServerName = false;
|
|
||||||
|
|
||||||
/// <summary>The type of database to use when storing data (either "sqlite" or "mysql").</summary>
|
|
||||||
[Description("The type of database to use when storing data (either \"sqlite\" or \"mysql\").")]
|
|
||||||
public string StorageType = "sqlite";
|
|
||||||
|
|
||||||
/// <summary>The path of sqlite db.</summary>
|
|
||||||
[Description("The path of sqlite db.")]
|
|
||||||
public string SqliteDBPath = "tshock.sqlite";
|
|
||||||
|
|
||||||
/// <summary>The MySQL hostname and port to direct connections to.</summary>
|
|
||||||
[Description("The MySQL hostname and port to direct connections to.")]
|
|
||||||
public string MySqlHost = "localhost:3306";
|
|
||||||
/// <summary>The database name to connect to when using MySQL as the database type.</summary>
|
|
||||||
[Description("The database name to connect to when using MySQL as the database type.")]
|
|
||||||
public string MySqlDbName = "";
|
|
||||||
/// <summary>The username used when connecting to a MySQL database.</summary>
|
|
||||||
[Description("The username used when connecting to a MySQL database.")]
|
|
||||||
public string MySqlUsername = "";
|
|
||||||
/// <summary>The password used when connecting to a MySQL database.</summary>
|
|
||||||
[Description("The password used when connecting to a MySQL database.")]
|
|
||||||
public string MySqlPassword = "";
|
|
||||||
|
|
||||||
/// <summary>The reason given if banning a mediumcore player on death.</summary>
|
|
||||||
[Description("The reason given if banning a mediumcore player on death.")]
|
|
||||||
public string MediumcoreBanReason = "Death results in a ban";
|
|
||||||
/// <summary>The reason given if kicking a mediumcore players on death.</summary>
|
|
||||||
[Description("The reason given if kicking a mediumcore players on death.")]
|
|
||||||
public string MediumcoreKickReason = "Death results in a kick";
|
|
||||||
|
|
||||||
/// <summary>Enables kicking banned users by matching their IP Address.</summary>
|
|
||||||
[Description("Enables kicking banned users by matching their IP Address.")]
|
|
||||||
public bool EnableIPBans = true;
|
|
||||||
|
|
||||||
/// <summary>Enables kicking banned users by matching their client UUID.</summary>
|
|
||||||
[Description("Enables kicking banned users by matching their client UUID.")]
|
|
||||||
public bool EnableUUIDBans = true;
|
|
||||||
|
|
||||||
/// <summary>Enables kicking banned users by matching their Character Name.</summary>
|
|
||||||
[Description("Enables kicking banned users by matching their Character Name.")]
|
|
||||||
public bool EnableBanOnUsernames;
|
|
||||||
|
|
||||||
/// <summary>The default group name to place newly registered users under.</summary>
|
|
||||||
[Description("The default group name to place newly registered users under.")]
|
|
||||||
public string DefaultRegistrationGroupName = "default";
|
|
||||||
|
|
||||||
/// <summary>The default group name to place unregistered players under.</summary>
|
|
||||||
[Description("The default group name to place unregistered players under.")]
|
|
||||||
public string DefaultGuestGroupName = "guest";
|
|
||||||
|
|
||||||
/// <summary>Disables sending logs as messages to players with the log permission.</summary>
|
|
||||||
[Description("Disables sending logs as messages to players with the log permission.")]
|
|
||||||
public bool DisableSpewLogs = true;
|
|
||||||
|
|
||||||
/// <summary>Prevents OnSecondUpdate checks from writing to the log file.</summary>
|
|
||||||
[Description("Prevents OnSecondUpdate checks from writing to the log file.")]
|
|
||||||
public bool DisableSecondUpdateLogs = false;
|
|
||||||
|
|
||||||
/// <summary>The hash algorithm used to encrypt user passwords.
|
|
||||||
/// Valid types: "sha512", "sha256" and "md5". Append with "-xp" for the xp supported algorithms.</summary>
|
|
||||||
[Description("The hash algorithm used to encrypt user passwords. Valid types: \"sha512\", \"sha256\" and \"md5\". Append with \"-xp\" for the xp supported algorithms.")]
|
|
||||||
public string HashAlgorithm = "sha512";
|
|
||||||
|
|
||||||
/// <summary>The reason given when kicking players that attempt to join while the server is full.</summary>
|
|
||||||
[Description("The reason given when kicking players that attempt to join while the server is full.")]
|
|
||||||
public string ServerFullReason = "Server is full";
|
|
||||||
|
|
||||||
/// <summary>The reason given when kicking players for not being on the whitelist.</summary>
|
|
||||||
[Description("The reason given when kicking players for not being on the whitelist.")]
|
|
||||||
public string WhitelistKickReason = "You are not on the whitelist.";
|
|
||||||
|
|
||||||
/// <summary>The reason given when kicking players that attempt to join while the server is full with no reserved slots available.</summary>
|
|
||||||
[Description("The reason given when kicking players that attempt to join while the server is full with no reserved slots available.")]
|
|
||||||
public string ServerFullNoReservedReason = "Server is full. No reserved slots open.";
|
|
||||||
|
|
||||||
/// <summary>Whether or not to save the world if the server crashes from an unhandled exception.</summary>
|
|
||||||
[Description("Whether or not to save the world if the server crashes from an unhandled exception.")]
|
|
||||||
public bool SaveWorldOnCrash = true;
|
|
||||||
|
|
||||||
/// <summary>Whether or not to announce a player's geographic location on join, based on their IP.</summary>
|
|
||||||
[Description("Whether or not to announce a player's geographic location on join, based on their IP.")]
|
|
||||||
public bool EnableGeoIP;
|
|
||||||
|
|
||||||
/// <summary>Whether or not to require token authentication to use the public REST API endpoints.</summary>
|
|
||||||
[Description("Whether or not to require token authentication to use the public REST API endpoints.")]
|
|
||||||
public bool EnableTokenEndpointAuthentication;
|
|
||||||
|
|
||||||
/// <summary>Enable or disable the REST API.</summary>
|
|
||||||
[Description("Enable or disable the REST API.")]
|
|
||||||
public bool RestApiEnabled;
|
|
||||||
|
|
||||||
/// <summary>The port used by the REST API.</summary>
|
|
||||||
[Description("The port used by the REST API.")]
|
|
||||||
public int RestApiPort = 7878;
|
|
||||||
|
|
||||||
/// <summary>Disables tombstone dropping during death for all players.</summary>
|
|
||||||
[Description("Disables tombstone dropping during death for all players.")]
|
|
||||||
public bool DisableTombstones = true;
|
|
||||||
|
|
||||||
/// <summary>Displays a player's IP on join to users with the log permission.</summary>
|
|
||||||
[Description("Displays a player's IP on join to users with the log permission.")]
|
|
||||||
public bool DisplayIPToAdmins;
|
|
||||||
|
|
||||||
/// <summary>If GeoIP is enabled, this will kick users identified as being under a proxy.</summary>
|
|
||||||
[Description("If GeoIP is enabled, this will kick users identified as being under a proxy.")]
|
|
||||||
public bool KickProxyUsers = true;
|
|
||||||
|
|
||||||
/// <summary>If enabled, hardmode will not be activated by the Wall of Flesh or the /starthardmode command.</summary>
|
/// <summary>If enabled, hardmode will not be activated by the Wall of Flesh or the /starthardmode command.</summary>
|
||||||
[Description("If enabled, hardmode will not be activated by the Wall of Flesh or the /starthardmode command.")]
|
[Description("If enabled, hardmode will not be activated by the Wall of Flesh or the /starthardmode command.")]
|
||||||
|
|
@ -257,66 +171,14 @@ namespace TShockAPI
|
||||||
[Description("Disables snow ball projectiles from spawning.")]
|
[Description("Disables snow ball projectiles from spawning.")]
|
||||||
public bool DisableSnowBalls;
|
public bool DisableSnowBalls;
|
||||||
|
|
||||||
/// <summary>Changes in-game chat format: {0} = Group Name, {1} = Group Prefix, {2} = Player Name, {3} = Group Suffix, {4} = Chat Message.</summary>
|
/// <summary>Disables tombstone dropping during death for all players.</summary>
|
||||||
[Description("Changes in-game chat format: {0} = Group Name, {1} = Group Prefix, {2} = Player Name, {3} = Group Suffix, {4} = Chat Message.")]
|
[Description("Disables tombstone dropping during death for all players.")]
|
||||||
public string ChatFormat = "{1}{2}{3}: {4}";
|
public bool DisableTombstones = true;
|
||||||
|
|
||||||
/// <summary>Changes the player name when using chat above heads. Starts with a player name wrapped in brackets, as per Terraria's formatting.\nSame formatting as ChatFormat without the message.</summary>
|
|
||||||
[Description("Changes the player name when using chat above heads. Starts with a player name wrapped in brackets, as per Terraria's formatting.\nSame formatting as ChatFormat without the message.")]
|
|
||||||
public string ChatAboveHeadsFormat = "{2}";
|
|
||||||
|
|
||||||
/// <summary>Forces the world time to be normal, day, or night.</summary>
|
/// <summary>Forces the world time to be normal, day, or night.</summary>
|
||||||
[Description("Forces the world time to be normal, day, or night.")]
|
[Description("Forces the world time to be normal, day, or night.")]
|
||||||
public string ForceTime = "normal";
|
public string ForceTime = "normal";
|
||||||
|
|
||||||
/// <summary>Disables a player and reverts their actions if this number of tile kills is exceeded within 1 second.</summary>
|
|
||||||
[Description("Disables a player and reverts their actions if this number of tile kills is exceeded within 1 second.")]
|
|
||||||
public int TileKillThreshold = 60;
|
|
||||||
|
|
||||||
/// <summary>Whether or not to kick users when they surpass the TileKill threshold.</summary>
|
|
||||||
[Description("Whether or not to kick users when they surpass the TileKill threshold.")]
|
|
||||||
public bool KickOnTileKillThresholdBroken = false;
|
|
||||||
|
|
||||||
/// <summary>Disables a player and reverts their actions if this number of tile places is exceeded within 1 second.</summary>
|
|
||||||
[Description("Disables a player and reverts their actions if this number of tile places is exceeded within 1 second.")]
|
|
||||||
public int TilePlaceThreshold = 32;
|
|
||||||
|
|
||||||
/// <summary>Whether or not to kick users when they surpass the TilePlace threshold.</summary>
|
|
||||||
[Description("Whether or not to kick users when they surpass the TilePlace threshold.")]
|
|
||||||
public bool KickOnTilePlaceThresholdBroken = false;
|
|
||||||
|
|
||||||
/// <summary>Disables a player if this number of liquid sets is exceeded within 1 second.</summary>
|
|
||||||
[Description("Disables a player if this number of liquid sets is exceeded within 1 second.")]
|
|
||||||
public int TileLiquidThreshold = 50;
|
|
||||||
|
|
||||||
/// <summary>Whether or not to kick users when they surpass the TileLiquid threshold.</summary>
|
|
||||||
[Description("Whether or not to kick users when they surpass the TileLiquid threshold.")]
|
|
||||||
public bool KickOnTileLiquidThresholdBroken = false;
|
|
||||||
|
|
||||||
/// <summary>Disable a player if this number of projectiles is created within 1 second.</summary>
|
|
||||||
[Description("Disable a player if this number of projectiles is created within 1 second.")]
|
|
||||||
public int ProjectileThreshold = 50;
|
|
||||||
|
|
||||||
/// <summary>Whether or not to kick users when they surpass the Projectile threshold.</summary>
|
|
||||||
[Description("Whether or not to kick users when they surpass the Projectile threshold.")]
|
|
||||||
public bool KickOnProjectileThresholdBroken = false;
|
|
||||||
|
|
||||||
/// <summary>Disables a player if this number of HealOtherPlayer packets is sent within 1 second.</summary>
|
|
||||||
[Description("Disables a player if this number of HealOtherPlayer packets is sent within 1 second.")]
|
|
||||||
public int HealOtherThreshold = 50;
|
|
||||||
|
|
||||||
/// <summary>Whether or not to kick users when they surpass the HealOther threshold.</summary>
|
|
||||||
[Description("Whether or not to kick users when they surpass the HealOther threshold.")]
|
|
||||||
public bool KickOnHealOtherThresholdBroken = false;
|
|
||||||
|
|
||||||
/// <summary>Whether or not to ignore shrapnel from crystal bullets for the projectile threshold count.</summary>
|
|
||||||
[Description("Whether or not to ignore shrapnel from crystal bullets for the projectile threshold count.")]
|
|
||||||
public bool ProjIgnoreShrapnel = true;
|
|
||||||
|
|
||||||
/// <summary>Require all players to register or login before being allowed to play.</summary>
|
|
||||||
[Description("Require all players to register or login before being allowed to play.")]
|
|
||||||
public bool RequireLogin;
|
|
||||||
|
|
||||||
/// <summary>Disables the effect of invisibility potions while PvP is enabled by turning the player visible to the other clients.</summary>
|
/// <summary>Disables the effect of invisibility potions while PvP is enabled by turning the player visible to the other clients.</summary>
|
||||||
[Description("Disables the effect of invisibility potions while PvP is enabled by turning the player visible to the other clients.")]
|
[Description("Disables the effect of invisibility potions while PvP is enabled by turning the player visible to the other clients.")]
|
||||||
public bool DisableInvisPvP;
|
public bool DisableInvisPvP;
|
||||||
|
|
@ -325,10 +187,6 @@ namespace TShockAPI
|
||||||
[Description("The maximum distance, in tiles, that disabled players can move from.")]
|
[Description("The maximum distance, in tiles, that disabled players can move from.")]
|
||||||
public int MaxRangeForDisabled = 10;
|
public int MaxRangeForDisabled = 10;
|
||||||
|
|
||||||
/// <summary>The server password required to join the server.</summary>
|
|
||||||
[Description("The server password required to join the server.")]
|
|
||||||
public string ServerPassword = "";
|
|
||||||
|
|
||||||
/// <summary>Whether or not region protection should apply to chests.</summary>
|
/// <summary>Whether or not region protection should apply to chests.</summary>
|
||||||
[Description("Whether or not region protection should apply to chests.")]
|
[Description("Whether or not region protection should apply to chests.")]
|
||||||
public bool RegionProtectChests;
|
public bool RegionProtectChests;
|
||||||
|
|
@ -337,38 +195,6 @@ namespace TShockAPI
|
||||||
[Description("Whether or not region protection should apply to gem locks.")]
|
[Description("Whether or not region protection should apply to gem locks.")]
|
||||||
public bool RegionProtectGemLocks = true;
|
public bool RegionProtectGemLocks = true;
|
||||||
|
|
||||||
/// <summary>Prevents users from being able to login before they finish connecting.</summary>
|
|
||||||
[Description("Prevents users from being able to login before they finish connecting.")]
|
|
||||||
public bool DisableLoginBeforeJoin;
|
|
||||||
|
|
||||||
/// <summary>Prevents users from being able to login with their client UUID.</summary>
|
|
||||||
[Description("Prevents users from being able to login with their client UUID.")]
|
|
||||||
public bool DisableUUIDLogin;
|
|
||||||
|
|
||||||
/// <summary>Kick clients that don't send their UUID to the server.</summary>
|
|
||||||
[Description("Kick clients that don't send their UUID to the server.")]
|
|
||||||
public bool KickEmptyUUID;
|
|
||||||
|
|
||||||
/// <summary>Allows users to register a username that doesn't necessarily match their character name.</summary>
|
|
||||||
[Description("Allows users to register a username that doesn't necessarily match their character name.")]
|
|
||||||
public bool AllowRegisterAnyUsername;
|
|
||||||
|
|
||||||
/// <summary>Allows users to login to any account even if the username doesn't match their character name.</summary>
|
|
||||||
[Description("Allows users to login to any account even if the username doesn't match their character name.")]
|
|
||||||
public bool AllowLoginAnyUsername = true;
|
|
||||||
|
|
||||||
/// <summary>The maximum damage a player/NPC can inflict.</summary>
|
|
||||||
[Description("The maximum damage a player/NPC can inflict.")]
|
|
||||||
public int MaxDamage = 1175;
|
|
||||||
|
|
||||||
/// <summary>The maximum damage a projectile can inflict.</summary>
|
|
||||||
[Description("The maximum damage a projectile can inflict.")]
|
|
||||||
public int MaxProjDamage = 1175;
|
|
||||||
|
|
||||||
/// <summary>Whether or not to kick users when they surpass the MaxDamage threshold.</summary>
|
|
||||||
[Description("Whether or not to kick users when they surpass the MaxDamage threshold.")]
|
|
||||||
public bool KickOnDamageThresholdBroken = false;
|
|
||||||
|
|
||||||
/// <summary>Ignores checks to see if a player 'can' update a projectile.</summary>
|
/// <summary>Ignores checks to see if a player 'can' update a projectile.</summary>
|
||||||
[Description("Ignores checks to see if a player 'can' update a projectile.")]
|
[Description("Ignores checks to see if a player 'can' update a projectile.")]
|
||||||
public bool IgnoreProjUpdate = false;
|
public bool IgnoreProjUpdate = false;
|
||||||
|
|
@ -377,6 +203,10 @@ namespace TShockAPI
|
||||||
[Description("Ignores checks to see if a player 'can' kill a projectile.")]
|
[Description("Ignores checks to see if a player 'can' kill a projectile.")]
|
||||||
public bool IgnoreProjKill = false;
|
public bool IgnoreProjKill = false;
|
||||||
|
|
||||||
|
/// <summary>Allows players to break temporary tiles (grass, pots, etc) where they cannot usually build.</summary>
|
||||||
|
[Description("Allows players to break temporary tiles (grass, pots, etc) where they cannot usually build.")]
|
||||||
|
public bool AllowCutTilesAndBreakables = false;
|
||||||
|
|
||||||
/// <summary>Allows ice placement even where a user cannot usually build.</summary>
|
/// <summary>Allows ice placement even where a user cannot usually build.</summary>
|
||||||
[Description("Allows ice placement even where a user cannot usually build.")]
|
[Description("Allows ice placement even where a user cannot usually build.")]
|
||||||
public bool AllowIce = false;
|
public bool AllowIce = false;
|
||||||
|
|
@ -413,54 +243,22 @@ namespace TShockAPI
|
||||||
[Description("Prevent players from interacting with the world while they are dead.")]
|
[Description("Prevent players from interacting with the world while they are dead.")]
|
||||||
public bool PreventDeadModification = true;
|
public bool PreventDeadModification = true;
|
||||||
|
|
||||||
/// <summary>Whether or not to display chat messages above players' heads.</summary>
|
/// <summary>Prevents players from placing tiles with an invalid style.</summary>
|
||||||
[Description("Whether or not to display chat messages above players' heads.")]
|
[Description("Prevents players from placing tiles with an invalid style.")]
|
||||||
public bool EnableChatAboveHeads = false;
|
public bool PreventInvalidPlaceStyle = true;
|
||||||
|
|
||||||
/// <summary>Forces Christmas-only events to occur all year.</summary>
|
/// <summary>Forces Christmas-only events to occur all year.</summary>
|
||||||
[Description("Forces Christmas-only events to occur all year.")]
|
[Description("Forces Christmas-only events to occur all year.")]
|
||||||
public bool ForceXmas = false;
|
public bool ForceXmas = false;
|
||||||
|
|
||||||
|
/// <summary>Forces Halloween-only events to occur all year.</summary>
|
||||||
|
[Description("Forces Halloween-only events to occur all year.")]
|
||||||
|
public bool ForceHalloween = false;
|
||||||
|
|
||||||
/// <summary>Allows groups on the banned item allowed list to spawn banned items even if PreventBannedItemSpawn is set to true.</summary>
|
/// <summary>Allows groups on the banned item allowed list to spawn banned items even if PreventBannedItemSpawn is set to true.</summary>
|
||||||
[Description("Allows groups on the banned item allowed list to spawn banned items even if PreventBannedItemSpawn is set to true.")]
|
[Description("Allows groups on the banned item allowed list to spawn banned items even if PreventBannedItemSpawn is set to true.")]
|
||||||
public bool AllowAllowedGroupsToSpawnBannedItems = false;
|
public bool AllowAllowedGroupsToSpawnBannedItems = false;
|
||||||
|
|
||||||
/// <summary>Allows stacks in chests to go beyond the stack limit during world loading.</summary>
|
|
||||||
[Description("Allows stacks in chests to go beyond the stack limit during world loading.")]
|
|
||||||
public bool IgnoreChestStacksOnLoad = false;
|
|
||||||
|
|
||||||
/// <summary>The path to the directory where logs should be written to.</summary>
|
|
||||||
[Description("The path to the directory where logs should be written to.")]
|
|
||||||
public string LogPath = "tshock";
|
|
||||||
|
|
||||||
/// <summary>Whether or not to save logs to the SQL database instead of a text file.</summary>
|
|
||||||
[Description("Whether or not to save logs to the SQL database instead of a text file.\nDefault = false.")]
|
|
||||||
public bool UseSqlLogs = false;
|
|
||||||
|
|
||||||
/// <summary>Number of times the SQL log must fail to insert logs before falling back to the text log.</summary>
|
|
||||||
[Description("Number of times the SQL log must fail to insert logs before falling back to the text log.")]
|
|
||||||
public int RevertToTextLogsOnSqlFailures = 10;
|
|
||||||
|
|
||||||
/// <summary>Prevents players from placing tiles with an invalid style.</summary>
|
|
||||||
[Description("Prevents players from placing tiles with an invalid style.")]
|
|
||||||
public bool PreventInvalidPlaceStyle = true;
|
|
||||||
|
|
||||||
/// <summary>The RGB values used for the color of broadcast messages.</summary>
|
|
||||||
[Description("The RGB values used for the color of broadcast messages.\n#.#.# = Red/Blue/Green\nMax value: 255")]
|
|
||||||
public int[] BroadcastRGB = { 127, 255, 212 };
|
|
||||||
|
|
||||||
/// <summary>A dictionary of REST tokens that external applications may use to make queries to your server.</summary>
|
|
||||||
[Description("A dictionary of REST tokens that external applications may use to make queries to your server.")]
|
|
||||||
public Dictionary<string, SecureRest.TokenData> ApplicationRestTokens = new Dictionary<string, SecureRest.TokenData>();
|
|
||||||
|
|
||||||
/// <summary>The number of reserved slots past your max server slots that can be joined by reserved players.</summary>
|
|
||||||
[Description("The number of reserved slots past your max server slots that can be joined by reserved players.")]
|
|
||||||
public int ReservedSlots = 20;
|
|
||||||
|
|
||||||
/// <summary>Whether or not to log REST API connections.</summary>
|
|
||||||
[Description("Whether or not to log REST API connections.")]
|
|
||||||
public bool LogRest = false;
|
|
||||||
|
|
||||||
/// <summary>The number of seconds a player must wait before being respawned. Cannot be longer than normal value now. Use at your own risk.</summary>
|
/// <summary>The number of seconds a player must wait before being respawned. Cannot be longer than normal value now. Use at your own risk.</summary>
|
||||||
[Description("The number of seconds a player must wait before being respawned. Cannot be longer than normal value now. Use at your own risk.")]
|
[Description("The number of seconds a player must wait before being respawned. Cannot be longer than normal value now. Use at your own risk.")]
|
||||||
public int RespawnSeconds = 5;
|
public int RespawnSeconds = 5;
|
||||||
|
|
@ -469,48 +267,6 @@ namespace TShockAPI
|
||||||
[Description("The number of seconds a player must wait before being respawned if there is a boss nearby. Cannot be longer than normal value now. Use at your own risk.")]
|
[Description("The number of seconds a player must wait before being respawned if there is a boss nearby. Cannot be longer than normal value now. Use at your own risk.")]
|
||||||
public int RespawnBossSeconds = 10;
|
public int RespawnBossSeconds = 10;
|
||||||
|
|
||||||
/// <summary>Disables a player if this number of tiles is painted within 1 second.</summary>
|
|
||||||
[Description("Disables a player if this number of tiles is painted within 1 second.")]
|
|
||||||
public int TilePaintThreshold = 15;
|
|
||||||
|
|
||||||
/// <summary>Whether or not to kick users when they surpass the TilePaint threshold.</summary>
|
|
||||||
[Description("Whether or not to kick users when they surpass the TilePaint threshold.")]
|
|
||||||
public bool KickOnTilePaintThresholdBroken = false;
|
|
||||||
|
|
||||||
/// <summary>Forces Halloween-only events to occur all year.</summary>
|
|
||||||
[Description("Forces Halloween-only events to occur all year.")]
|
|
||||||
public bool ForceHalloween = false;
|
|
||||||
|
|
||||||
/// <summary>Allows players to break temporary tiles (grass, pots, etc) where they cannot usually build.</summary>
|
|
||||||
[Description("Allows players to break temporary tiles (grass, pots, etc) where they cannot usually build.")]
|
|
||||||
public bool AllowCutTilesAndBreakables = false;
|
|
||||||
|
|
||||||
/// <summary>Specifies which string starts a command.
|
|
||||||
/// Note: Will not function properly if the string length is bigger than 1.</summary>
|
|
||||||
[Description("Specifies which string starts a command.\nNote: Will not function properly if the string length is bigger than 1.")]
|
|
||||||
public string CommandSpecifier = "/";
|
|
||||||
|
|
||||||
/// <summary>Specifies which string starts a command silently.
|
|
||||||
/// Note: Will not function properly if the string length is bigger than 1.</summary>
|
|
||||||
[Description("Specifies which string starts a command silently.\nNote: Will not function properly if the string length is bigger than 1.")]
|
|
||||||
public string CommandSilentSpecifier = ".";
|
|
||||||
|
|
||||||
/// <summary>Whether or not to kick hardcore players on death.</summary>
|
|
||||||
[Description("Whether or not to kick hardcore players on death.")]
|
|
||||||
public bool KickOnHardcoreDeath;
|
|
||||||
|
|
||||||
/// <summary>Whether or not to ban hardcore players on death.</summary>
|
|
||||||
[Description("Whether or not to ban hardcore players on death.")]
|
|
||||||
public bool BanOnHardcoreDeath;
|
|
||||||
|
|
||||||
/// <summary>The reason given when banning hardcore players on death.</summary>
|
|
||||||
[Description("The reason given when banning hardcore players on death.")]
|
|
||||||
public string HardcoreBanReason = "Death results in a ban";
|
|
||||||
|
|
||||||
/// <summary>The reason given when kicking hardcore players on death.</summary>
|
|
||||||
[Description("The reason given when kicking hardcore players on death.")]
|
|
||||||
public string HardcoreKickReason = "Death results in a kick";
|
|
||||||
|
|
||||||
/// <summary>Whether or not to announce boss spawning or invasion starts.</summary>
|
/// <summary>Whether or not to announce boss spawning or invasion starts.</summary>
|
||||||
[Description("Whether or not to announce boss spawning or invasion starts.")]
|
[Description("Whether or not to announce boss spawning or invasion starts.")]
|
||||||
public bool AnonymousBossInvasions = true;
|
public bool AnonymousBossInvasions = true;
|
||||||
|
|
@ -523,18 +279,309 @@ namespace TShockAPI
|
||||||
[Description("The maximum MP a player can have, before equipment buffs.")]
|
[Description("The maximum MP a player can have, before equipment buffs.")]
|
||||||
public int MaxMP = 200;
|
public int MaxMP = 200;
|
||||||
|
|
||||||
/// <summary>Whether or not to save the world when the last player disconnects.</summary>
|
/// <summary>Determines the range in tiles that a bomb can affect tiles from detonation point.</summary>
|
||||||
[Description("Whether or not to save the world when the last player disconnects.")]
|
[Description("Determines the range in tiles that a bomb can affect tiles from detonation point.")]
|
||||||
public bool SaveWorldOnLastPlayerExit = true;
|
public int BombExplosionRadius = 5;
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
#region Login and Ban Settings
|
||||||
|
|
||||||
|
/// <summary>The default group name to place newly registered users under.</summary>
|
||||||
|
[Description("The default group name to place newly registered users under.")]
|
||||||
|
public string DefaultRegistrationGroupName = "default";
|
||||||
|
|
||||||
|
/// <summary>The default group name to place unregistered players under.</summary>
|
||||||
|
[Description("The default group name to place unregistered players under.")]
|
||||||
|
public string DefaultGuestGroupName = "guest";
|
||||||
|
|
||||||
|
/// <summary>Remembers where a player left off, based on their IP. Does not persist through server restarts.</summary>
|
||||||
|
[Description("Remembers where a player left off, based on their IP. Does not persist through server restarts.\neg. When you try to disconnect, and reconnect to be automatically placed at spawn, you'll be at your last location.")]
|
||||||
|
public bool RememberLeavePos;
|
||||||
|
|
||||||
|
/// <summary>Number of failed login attempts before kicking the player.</summary>
|
||||||
|
[Description("Number of failed login attempts before kicking the player.")]
|
||||||
|
public int MaximumLoginAttempts = 3;
|
||||||
|
|
||||||
|
/// <summary>Whether or not to kick mediumcore players on death.</summary>
|
||||||
|
[Description("Whether or not to kick mediumcore players on death.")]
|
||||||
|
public bool KickOnMediumcoreDeath;
|
||||||
|
|
||||||
|
/// <summary>The reason given if kicking a mediumcore players on death.</summary>
|
||||||
|
[Description("The reason given if kicking a mediumcore players on death.")]
|
||||||
|
public string MediumcoreKickReason = "Death results in a kick";
|
||||||
|
|
||||||
|
/// <summary>Whether or not to ban mediumcore players on death.</summary>
|
||||||
|
[Description("Whether or not to ban mediumcore players on death.")]
|
||||||
|
public bool BanOnMediumcoreDeath;
|
||||||
|
|
||||||
|
/// <summary>The reason given if banning a mediumcore player on death.</summary>
|
||||||
|
[Description("The reason given if banning a mediumcore player on death.")]
|
||||||
|
public string MediumcoreBanReason = "Death results in a ban";
|
||||||
|
|
||||||
|
/// <summary>Enable or disable the whitelist based on IP addresses in the whitelist.txt file.</summary>
|
||||||
|
[Description("Enable or disable the whitelist based on IP addresses in the whitelist.txt file.")]
|
||||||
|
public bool EnableWhitelist;
|
||||||
|
|
||||||
|
/// <summary>The reason given when kicking players for not being on the whitelist.</summary>
|
||||||
|
[Description("The reason given when kicking players for not being on the whitelist.")]
|
||||||
|
public string WhitelistKickReason = "You are not on the whitelist.";
|
||||||
|
|
||||||
|
/// <summary>The reason given when kicking players that attempt to join while the server is full.</summary>
|
||||||
|
[Description("The reason given when kicking players that attempt to join while the server is full.")]
|
||||||
|
public string ServerFullReason = "Server is full";
|
||||||
|
|
||||||
|
/// <summary>The reason given when kicking players that attempt to join while the server is full with no reserved slots available.</summary>
|
||||||
|
[Description("The reason given when kicking players that attempt to join while the server is full with no reserved slots available.")]
|
||||||
|
public string ServerFullNoReservedReason = "Server is full. No reserved slots open.";
|
||||||
|
|
||||||
|
/// <summary>Whether or not to kick hardcore players on death.</summary>
|
||||||
|
[Description("Whether or not to kick hardcore players on death.")]
|
||||||
|
public bool KickOnHardcoreDeath;
|
||||||
|
|
||||||
|
/// <summary>The reason given when kicking hardcore players on death.</summary>
|
||||||
|
[Description("The reason given when kicking hardcore players on death.")]
|
||||||
|
public string HardcoreKickReason = "Death results in a kick";
|
||||||
|
|
||||||
|
/// <summary>Whether or not to ban hardcore players on death.</summary>
|
||||||
|
[Description("Whether or not to ban hardcore players on death.")]
|
||||||
|
public bool BanOnHardcoreDeath;
|
||||||
|
|
||||||
|
/// <summary>The reason given when banning hardcore players on death.</summary>
|
||||||
|
[Description("The reason given when banning hardcore players on death.")]
|
||||||
|
public string HardcoreBanReason = "Death results in a ban";
|
||||||
|
|
||||||
|
/// <summary>Enables kicking banned users by matching their IP Address.</summary>
|
||||||
|
[Description("Enables kicking banned users by matching their IP Address.")]
|
||||||
|
public bool EnableIPBans = true;
|
||||||
|
|
||||||
|
/// <summary>Enables kicking banned users by matching their client UUID.</summary>
|
||||||
|
[Description("Enables kicking banned users by matching their client UUID.")]
|
||||||
|
public bool EnableUUIDBans = true;
|
||||||
|
|
||||||
|
/// <summary>Enables kicking banned users by matching their Character Name.</summary>
|
||||||
|
[Description("Enables kicking banned users by matching their Character Name.")]
|
||||||
|
public bool EnableBanOnUsernames;
|
||||||
|
|
||||||
|
/// <summary>If GeoIP is enabled, this will kick users identified as being under a proxy.</summary>
|
||||||
|
[Description("If GeoIP is enabled, this will kick users identified as being under a proxy.")]
|
||||||
|
public bool KickProxyUsers = true;
|
||||||
|
|
||||||
|
/// <summary>Require all players to register or login before being allowed to play.</summary>
|
||||||
|
[Description("Require all players to register or login before being allowed to play.")]
|
||||||
|
public bool RequireLogin;
|
||||||
|
|
||||||
|
/// <summary>Allows users to login to any account even if the username doesn't match their character name.</summary>
|
||||||
|
[Description("Allows users to login to any account even if the username doesn't match their character name.")]
|
||||||
|
public bool AllowLoginAnyUsername = true;
|
||||||
|
|
||||||
|
/// <summary>Allows users to register a username that doesn't necessarily match their character name.</summary>
|
||||||
|
[Description("Allows users to register a username that doesn't necessarily match their character name.")]
|
||||||
|
public bool AllowRegisterAnyUsername;
|
||||||
|
|
||||||
|
/// <summary>The minimum password length for new user accounts. Can never be lower than 4.</summary>
|
||||||
|
[Description("The minimum password length for new user accounts. Can never be lower than 4.")]
|
||||||
|
public int MinimumPasswordLength = 4;
|
||||||
|
|
||||||
|
/// <summary>The hash algorithm used to encrypt user passwords.
|
||||||
|
/// Valid types: "sha512", "sha256" and "md5". Append with "-xp" for the xp supported algorithms.</summary>
|
||||||
|
[Description("The hash algorithm used to encrypt user passwords. Valid types: \"sha512\", \"sha256\" and \"md5\". Append with \"-xp\" for the xp supported algorithms.")]
|
||||||
|
public string HashAlgorithm = "sha512";
|
||||||
|
|
||||||
/// <summary>Determines the BCrypt work factor to use. If increased, all passwords will be upgraded to new work-factor on verify.
|
/// <summary>Determines the BCrypt work factor to use. If increased, all passwords will be upgraded to new work-factor on verify.
|
||||||
/// The number of computational rounds is 2^n. Increase with caution. Range: 5-31.</summary>
|
/// The number of computational rounds is 2^n. Increase with caution. Range: 5-31.</summary>
|
||||||
[Description("Determines the BCrypt work factor to use. If increased, all passwords will be upgraded to new work-factor on verify. The number of computational rounds is 2^n. Increase with caution. Range: 5-31.")]
|
[Description("Determines the BCrypt work factor to use. If increased, all passwords will be upgraded to new work-factor on verify. The number of computational rounds is 2^n. Increase with caution. Range: 5-31.")]
|
||||||
public int BCryptWorkFactor = 7;
|
public int BCryptWorkFactor = 7;
|
||||||
|
|
||||||
/// <summary>The minimum password length for new user accounts. Can never be lower than 4.</summary>
|
/// <summary>Prevents users from being able to login with their client UUID.</summary>
|
||||||
[Description("The minimum password length for new user accounts. Can never be lower than 4.")]
|
[Description("Prevents users from being able to login with their client UUID.")]
|
||||||
public int MinimumPasswordLength = 4;
|
public bool DisableUUIDLogin;
|
||||||
|
|
||||||
|
/// <summary>Kick clients that don't send their UUID to the server.</summary>
|
||||||
|
[Description("Kick clients that don't send their UUID to the server.")]
|
||||||
|
public bool KickEmptyUUID;
|
||||||
|
|
||||||
|
/// <summary>Disables a player if this number of tiles is painted within 1 second.</summary>
|
||||||
|
[Description("Disables a player if this number of tiles is painted within 1 second.")]
|
||||||
|
public int TilePaintThreshold = 15;
|
||||||
|
|
||||||
|
/// <summary>Whether or not to kick users when they surpass the TilePaint threshold.</summary>
|
||||||
|
[Description("Whether or not to kick users when they surpass the TilePaint threshold.")]
|
||||||
|
public bool KickOnTilePaintThresholdBroken = false;
|
||||||
|
|
||||||
|
/// <summary>The maximum damage a player/NPC can inflict.</summary>
|
||||||
|
[Description("The maximum damage a player/NPC can inflict.")]
|
||||||
|
public int MaxDamage = 1175;
|
||||||
|
|
||||||
|
/// <summary>The maximum damage a projectile can inflict.</summary>
|
||||||
|
[Description("The maximum damage a projectile can inflict.")]
|
||||||
|
public int MaxProjDamage = 1175;
|
||||||
|
|
||||||
|
/// <summary>Whether or not to kick users when they surpass the MaxDamage threshold.</summary>
|
||||||
|
[Description("Whether or not to kick users when they surpass the MaxDamage threshold.")]
|
||||||
|
public bool KickOnDamageThresholdBroken = false;
|
||||||
|
|
||||||
|
/// <summary>Disables a player and reverts their actions if this number of tile kills is exceeded within 1 second.</summary>
|
||||||
|
[Description("Disables a player and reverts their actions if this number of tile kills is exceeded within 1 second.")]
|
||||||
|
public int TileKillThreshold = 60;
|
||||||
|
|
||||||
|
/// <summary>Whether or not to kick users when they surpass the TileKill threshold.</summary>
|
||||||
|
[Description("Whether or not to kick users when they surpass the TileKill threshold.")]
|
||||||
|
public bool KickOnTileKillThresholdBroken = false;
|
||||||
|
|
||||||
|
/// <summary>Disables a player and reverts their actions if this number of tile places is exceeded within 1 second.</summary>
|
||||||
|
[Description("Disables a player and reverts their actions if this number of tile places is exceeded within 1 second.")]
|
||||||
|
public int TilePlaceThreshold = 32;
|
||||||
|
|
||||||
|
/// <summary>Whether or not to kick users when they surpass the TilePlace threshold.</summary>
|
||||||
|
[Description("Whether or not to kick users when they surpass the TilePlace threshold.")]
|
||||||
|
public bool KickOnTilePlaceThresholdBroken = false;
|
||||||
|
|
||||||
|
/// <summary>Disables a player if this number of liquid sets is exceeded within 1 second.</summary>
|
||||||
|
[Description("Disables a player if this number of liquid sets is exceeded within 1 second.")]
|
||||||
|
public int TileLiquidThreshold = 50;
|
||||||
|
|
||||||
|
/// <summary>Whether or not to kick users when they surpass the TileLiquid threshold.</summary>
|
||||||
|
[Description("Whether or not to kick users when they surpass the TileLiquid threshold.")]
|
||||||
|
public bool KickOnTileLiquidThresholdBroken = false;
|
||||||
|
|
||||||
|
/// <summary>Whether or not to ignore shrapnel from crystal bullets for the projectile threshold count.</summary>
|
||||||
|
[Description("Whether or not to ignore shrapnel from crystal bullets for the projectile threshold count.")]
|
||||||
|
public bool ProjIgnoreShrapnel = true;
|
||||||
|
|
||||||
|
/// <summary>Disable a player if this number of projectiles is created within 1 second.</summary>
|
||||||
|
[Description("Disable a player if this number of projectiles is created within 1 second.")]
|
||||||
|
public int ProjectileThreshold = 50;
|
||||||
|
|
||||||
|
/// <summary>Whether or not to kick users when they surpass the Projectile threshold.</summary>
|
||||||
|
[Description("Whether or not to kick users when they surpass the Projectile threshold.")]
|
||||||
|
public bool KickOnProjectileThresholdBroken = false;
|
||||||
|
|
||||||
|
/// <summary>Disables a player if this number of HealOtherPlayer packets is sent within 1 second.</summary>
|
||||||
|
[Description("Disables a player if this number of HealOtherPlayer packets is sent within 1 second.")]
|
||||||
|
public int HealOtherThreshold = 50;
|
||||||
|
|
||||||
|
/// <summary>Whether or not to kick users when they surpass the HealOther threshold.</summary>
|
||||||
|
[Description("Whether or not to kick users when they surpass the HealOther threshold.")]
|
||||||
|
public bool KickOnHealOtherThresholdBroken = false;
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
#region Chat Settings
|
||||||
|
|
||||||
|
/// <summary>Specifies which string starts a command.
|
||||||
|
/// Note: Will not function properly if the string length is bigger than 1.</summary>
|
||||||
|
[Description("Specifies which string starts a command.\nNote: Will not function properly if the string length is bigger than 1.")]
|
||||||
|
public string CommandSpecifier = "/";
|
||||||
|
|
||||||
|
/// <summary>Specifies which string starts a command silently.
|
||||||
|
/// Note: Will not function properly if the string length is bigger than 1.</summary>
|
||||||
|
[Description("Specifies which string starts a command silently.\nNote: Will not function properly if the string length is bigger than 1.")]
|
||||||
|
public string CommandSilentSpecifier = ".";
|
||||||
|
|
||||||
|
/// <summary>Disables sending logs as messages to players with the log permission.</summary>
|
||||||
|
[Description("Disables sending logs as messages to players with the log permission.")]
|
||||||
|
public bool DisableSpewLogs = true;
|
||||||
|
|
||||||
|
/// <summary>Prevents OnSecondUpdate checks from writing to the log file.</summary>
|
||||||
|
[Description("Prevents OnSecondUpdate checks from writing to the log file.")]
|
||||||
|
public bool DisableSecondUpdateLogs = false;
|
||||||
|
|
||||||
|
/// <summary>The chat color for the superadmin group.</summary>
|
||||||
|
[Description("The chat color for the superadmin group.\n#.#.# = Red/Blue/Green\nMax value: 255")]
|
||||||
|
public int[] SuperAdminChatRGB = { 255, 255, 255 };
|
||||||
|
|
||||||
|
/// <summary>The superadmin chat prefix.</summary>
|
||||||
|
[Description("The superadmin chat prefix.")]
|
||||||
|
public string SuperAdminChatPrefix = "(Super Admin) ";
|
||||||
|
|
||||||
|
/// <summary>The superadmin chat suffix.</summary>
|
||||||
|
[Description("The superadmin chat suffix.")]
|
||||||
|
public string SuperAdminChatSuffix = "";
|
||||||
|
|
||||||
|
/// <summary>Whether or not to announce a player's geographic location on join, based on their IP.</summary>
|
||||||
|
[Description("Whether or not to announce a player's geographic location on join, based on their IP.")]
|
||||||
|
public bool EnableGeoIP;
|
||||||
|
|
||||||
|
/// <summary>Displays a player's IP on join to users with the log permission.</summary>
|
||||||
|
[Description("Displays a player's IP on join to users with the log permission.")]
|
||||||
|
public bool DisplayIPToAdmins;
|
||||||
|
|
||||||
|
/// <summary>Changes in-game chat format: {0} = Group Name, {1} = Group Prefix, {2} = Player Name, {3} = Group Suffix, {4} = Chat Message.</summary>
|
||||||
|
[Description("Changes in-game chat format: {0} = Group Name, {1} = Group Prefix, {2} = Player Name, {3} = Group Suffix, {4} = Chat Message.")]
|
||||||
|
public string ChatFormat = "{1}{2}{3}: {4}";
|
||||||
|
|
||||||
|
/// <summary>Changes the player name when using chat above heads. Starts with a player name wrapped in brackets, as per Terraria's formatting.\nSame formatting as ChatFormat without the message.</summary>
|
||||||
|
[Description("Changes the player name when using chat above heads. Starts with a player name wrapped in brackets, as per Terraria's formatting.\nSame formatting as ChatFormat without the message.")]
|
||||||
|
public string ChatAboveHeadsFormat = "{2}";
|
||||||
|
|
||||||
|
/// <summary>Whether or not to display chat messages above players' heads.</summary>
|
||||||
|
[Description("Whether or not to display chat messages above players' heads.")]
|
||||||
|
public bool EnableChatAboveHeads = false;
|
||||||
|
|
||||||
|
/// <summary>The RGB values used for the color of broadcast messages.</summary>
|
||||||
|
[Description("The RGB values used for the color of broadcast messages.\n#.#.# = Red/Blue/Green\nMax value: 255")]
|
||||||
|
public int[] BroadcastRGB = { 127, 255, 212 };
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
#region MySQL Settings
|
||||||
|
|
||||||
|
/// <summary>The type of database to use when storing data (either "sqlite" or "mysql").</summary>
|
||||||
|
[Description("The type of database to use when storing data (either \"sqlite\" or \"mysql\").")]
|
||||||
|
public string StorageType = "sqlite";
|
||||||
|
|
||||||
|
/// <summary>The path of sqlite db.</summary>
|
||||||
|
[Description("The path of sqlite db.")]
|
||||||
|
public string SqliteDBPath = "tshock.sqlite";
|
||||||
|
|
||||||
|
/// <summary>The MySQL hostname and port to direct connections to.</summary>
|
||||||
|
[Description("The MySQL hostname and port to direct connections to.")]
|
||||||
|
public string MySqlHost = "localhost:3306";
|
||||||
|
|
||||||
|
/// <summary>The database name to connect to when using MySQL as the database type.</summary>
|
||||||
|
[Description("The database name to connect to when using MySQL as the database type.")]
|
||||||
|
public string MySqlDbName = "";
|
||||||
|
|
||||||
|
/// <summary>The username used when connecting to a MySQL database.</summary>
|
||||||
|
[Description("The username used when connecting to a MySQL database.")]
|
||||||
|
public string MySqlUsername = "";
|
||||||
|
|
||||||
|
/// <summary>The password used when connecting to a MySQL database.</summary>
|
||||||
|
[Description("The password used when connecting to a MySQL database.")]
|
||||||
|
public string MySqlPassword = "";
|
||||||
|
|
||||||
|
/// <summary>Whether or not to save logs to the SQL database instead of a text file.</summary>
|
||||||
|
[Description("Whether or not to save logs to the SQL database instead of a text file.\nDefault = false.")]
|
||||||
|
public bool UseSqlLogs = false;
|
||||||
|
|
||||||
|
/// <summary>Number of times the SQL log must fail to insert logs before falling back to the text log.</summary>
|
||||||
|
[Description("Number of times the SQL log must fail to insert logs before falling back to the text log.")]
|
||||||
|
public int RevertToTextLogsOnSqlFailures = 10;
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
#region REST API Settings
|
||||||
|
|
||||||
|
/// <summary>Enable or disable the REST API.</summary>
|
||||||
|
[Description("Enable or disable the REST API.")]
|
||||||
|
public bool RestApiEnabled;
|
||||||
|
|
||||||
|
/// <summary>The port used by the REST API.</summary>
|
||||||
|
[Description("The port used by the REST API.")]
|
||||||
|
public int RestApiPort = 7878;
|
||||||
|
|
||||||
|
/// <summary>Whether or not to log REST API connections.</summary>
|
||||||
|
[Description("Whether or not to log REST API connections.")]
|
||||||
|
public bool LogRest = false;
|
||||||
|
|
||||||
|
/// <summary>Whether or not to require token authentication to use the public REST API endpoints.</summary>
|
||||||
|
[Description("Whether or not to require token authentication to use the public REST API endpoints.")]
|
||||||
|
public bool EnableTokenEndpointAuthentication;
|
||||||
|
|
||||||
/// <summary>The maximum REST requests in the bucket before denying requests. Minimum value is 5.</summary>
|
/// <summary>The maximum REST requests in the bucket before denying requests. Minimum value is 5.</summary>
|
||||||
[Description("The maximum REST requests in the bucket before denying requests. Minimum value is 5.")]
|
[Description("The maximum REST requests in the bucket before denying requests. Minimum value is 5.")]
|
||||||
|
|
@ -544,15 +591,12 @@ namespace TShockAPI
|
||||||
[Description("How often in minutes the REST requests bucket is decreased by one. Minimum value is 1 minute.")]
|
[Description("How often in minutes the REST requests bucket is decreased by one. Minimum value is 1 minute.")]
|
||||||
public int RESTRequestBucketDecreaseIntervalMinutes = 1;
|
public int RESTRequestBucketDecreaseIntervalMinutes = 1;
|
||||||
|
|
||||||
/// <summary>Whether or not to show backup auto save messages.</summary>
|
/// <summary>A dictionary of REST tokens that external applications may use to make queries to your server.</summary>
|
||||||
[Description("Whether or not to show backup auto save messages.")]
|
[Description("A dictionary of REST tokens that external applications may use to make queries to your server.")]
|
||||||
public bool ShowBackupAutosaveMessages = true;
|
public Dictionary<string, SecureRest.TokenData> ApplicationRestTokens = new Dictionary<string, SecureRest.TokenData>();
|
||||||
|
|
||||||
[Description("Whether or not the server should output debug level messages related to system operation.")]
|
#endregion
|
||||||
public bool DebugLogs = true;
|
|
||||||
|
|
||||||
[Description("Determines the range in tiles that a bomb can affect tiles from detonation point.")]
|
|
||||||
public int BombExplosionRadius = 5;
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Reads a configuration file from a given path
|
/// Reads a configuration file from a given path
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue