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

Fixed typo in ProjectileManager #2988

Closed
wants to merge 5 commits into from
Closed
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
8 changes: 8 additions & 0 deletions .idea/.idea.TShock/.idea/indexLayout.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/.idea.TShock/.idea/projectSettingsUpdater.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/.idea.TShock/.idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

142 changes: 142 additions & 0 deletions .idea/.idea.TShock/.idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions TShockAPI/Commands.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ You should have received a copy of the GNU General Public License
using Terraria;
using Terraria.ID;
using Terraria.Localization;
using TShockAPI.DB;
using TShockAPI.Database;
using TerrariaApi.Server;
using TShockAPI.Hooks;
using Terraria.GameContent.Events;
Expand Down Expand Up @@ -1038,7 +1038,7 @@ private static void RegisterUser(CommandArgs args)
return;
}

account.Group = TShock.Config.Settings.DefaultRegistrationGroupName; // FIXME -- we should get this from the DB. --Why?
account.Group = TShock.Config.Settings.DefaultRegistrationGroupName; // FIXME -- we should get this from the Database. --Why?
account.UUID = args.Player.UUID;

if (TShock.UserAccounts.GetUserAccountByName(account.Name) == null && account.Name != TSServerPlayer.AccountName) // Cheap way of checking for existance of a user
Expand Down Expand Up @@ -1458,7 +1458,7 @@ void MoreHelp(string cmd)

void DisplayBanDetails(Ban ban)
{
args.Player.SendMessage(GetString($"{"Ban Details".Color(Utils.BoldHighlight)} - Ticket Number: {ban.TicketNumber.Color(Utils.GreenHighlight)}"), Color.White);
args.Player.SendMessage(GetString($"{"Ban Details".Color(Utils.BoldHighlight)} - Ticket Number: {ban.BanId.Color(Utils.GreenHighlight)}"), Color.White);
args.Player.SendMessage(GetString($"{"Identifier:".Color(Utils.BoldHighlight)} {ban.Identifier}"), Color.White);
args.Player.SendMessage(GetString($"{"Reason:".Color(Utils.BoldHighlight)} {ban.Reason}"), Color.White);
args.Player.SendMessage(GetString($"{"Banned by:".Color(Utils.BoldHighlight)} {ban.BanningUser.Color(Utils.GreenHighlight)} on {ban.BanDateTime.ToString("yyyy/MM/dd").Color(Utils.RedHighlight)} ({ban.GetPrettyTimeSinceBanString().Color(Utils.YellowHighlight)} ago)"), Color.White);
Expand Down Expand Up @@ -1487,7 +1487,7 @@ AddBanResult DoBan(string ident, string reason, DateTime expiration)
AddBanResult banResult = TShock.Bans.InsertBan(ident, reason, args.Player.Account.Name, DateTime.UtcNow, expiration);
if (banResult.Ban != null)
{
args.Player.SendSuccessMessage(GetString($"Ban added. Ticket Number {banResult.Ban.TicketNumber.Color(Utils.GreenHighlight)} was created for identifier {ident.Color(Utils.WhiteHighlight)}."));
args.Player.SendSuccessMessage(GetString($"Ban added. Ticket Number {banResult.Ban.BanId.Color(Utils.GreenHighlight)} was created for identifier {ident.Color(Utils.WhiteHighlight)}."));
}
else
{
Expand Down Expand Up @@ -1610,7 +1610,7 @@ void AddBan()

if (banResult?.Ban != null)
{
player.Disconnect(GetString($"#{banResult.Ban.TicketNumber} - You have been banned: {banResult.Ban.Reason}."));
player.Disconnect(GetString($"#{banResult.Ban.BanId} - You have been banned: {banResult.Ban.Reason}."));
}
}

Expand Down
50 changes: 12 additions & 38 deletions TShockAPI/Configuration/TShockConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -466,6 +466,17 @@ public class TShockSettings
public bool DisableCustomDeathMessages = true;
#endregion

#region MongoDB Settings

[Description("The connection string for MongoDB")]
public string MongoConnectionString = "required";

[Description("The global database, or default. This database will be used to synchronize data between servers.")]
public string DefaultGlobalDatabase = "tsd";

[Description("The local database, essentially replacing a server's SQlite databases.")]
public string LocalDatabase = "server1";
#endregion

#region Chat Settings

Expand Down Expand Up @@ -493,7 +504,7 @@ public class TShockSettings

/// <summary>The superadmin chat prefix.</summary>
[Description("The superadmin chat prefix.")]
public string SuperAdminChatPrefix = GetString("(Super Admin) ");
public string SuperAdminChatPrefix = GetString("[Admin] ");

/// <summary>The superadmin chat suffix.</summary>
[Description("The superadmin chat suffix.")]
Expand Down Expand Up @@ -526,43 +537,6 @@ public class TShockSettings
#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>
Expand Down
Loading