diff --git a/Libraries/Core/Helpers/Dialogue/AbstractDialogChatBot.cs b/Libraries/Core/Helpers/Dialogue/AbstractDialogChatBot.cs index 6b3858f7..badecb68 100644 --- a/Libraries/Core/Helpers/Dialogue/AbstractDialogChatBot.cs +++ b/Libraries/Core/Helpers/Dialogue/AbstractDialogChatBot.cs @@ -81,7 +81,7 @@ public abstract class AbstractDialogChatBot( _mailSendService.SendUserMessageToPlayer( sessionId, GetChatBot(), - $"Subcommand {subCommand}:\\n{chatCommand.GetCommandHelp(subCommand)}", + $"Subcommand {subCommand}:\n{chatCommand.GetCommandHelp(subCommand)}", [], null ); diff --git a/Libraries/Core/Helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.cs b/Libraries/Core/Helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.cs index bde97cd0..58692352 100644 --- a/Libraries/Core/Helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.cs +++ b/Libraries/Core/Helpers/Dialogue/Commando/SptCommands/GiveCommand/GiveSptCommand.cs @@ -27,7 +27,7 @@ public class GiveSptCommand( ) : ISptCommand { protected Dictionary _savedCommand = new(); - private static readonly Regex _commandRegex = new("""/^spt give(((([a - z]{ 2,5}) )?"(.+)"|\w+) )?([0 - 9]+)$/"""); + private static readonly Regex _commandRegex = new(@"^spt give (((([a-z]{2,5}) )?""(.+)""|\w+) )?([0-9]+)$"); private const double _acceptableConfidence = 0.9d; // Exception for flares diff --git a/Libraries/Core/Helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.cs b/Libraries/Core/Helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.cs index a50f668f..a59d36b7 100644 --- a/Libraries/Core/Helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.cs +++ b/Libraries/Core/Helpers/Dialogue/Commando/SptCommands/ProfileCommand/ProfileSptCommand.cs @@ -33,8 +33,8 @@ public class ProfileSptCommand( * spt profile skill metabolism 10 */ // TODO: Fix this shit as Valens doesn't know Regex. - protected Regex _commandRegex = new("""^spt profile (?level|skill)((?<=.*skill) (?[\w]+)){0,1} (?(?!0+)[0-9]+)$/"""); - protected Regex _examineRegex = new ("""/^spt profile (?examine)/"""); + protected Regex _commandRegex = new(@"^spt profile (?level|skill)((?<=.*skill) (?[\w]+))? (?(?!0+)[0-9]+)$"); + protected Regex _examineRegex = new (@"^spt profile (?examine)"); // protected SavedCommand _savedCommand = null; @@ -85,7 +85,7 @@ public class ProfileSptCommand( break; case "skill": { var enumSkill = Enum.GetValues(typeof(SkillTypes)).Cast().FirstOrDefault( - (t) => t.ToString() == skill); + (t) => t.ToString().ToLower() == skill); if (enumSkill == null) { _mailSendService.SendUserMessageToPlayer( diff --git a/Libraries/Core/Helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.cs b/Libraries/Core/Helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.cs index e25b6468..e071ee3c 100644 --- a/Libraries/Core/Helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.cs +++ b/Libraries/Core/Helpers/Dialogue/Commando/SptCommands/TraderCommand/TraderSptCommand.cs @@ -12,7 +12,8 @@ public class TraderSptCommand( ISptLogger _logger, MailSendService _mailSendService) : ISptCommand { - protected Regex _commandRegex = new("""/^spt trader(?[\w]+) (?rep|spend) (?(?!0+)[0 - 9]+)$/"""); + protected Regex _commandRegex = new(@"^spt trader (?[\w]+) (?rep|spend) (?(?!0+)[0-9]+)$" + ); public string GetCommand() { diff --git a/Libraries/Core/Services/MailSendService.cs b/Libraries/Core/Services/MailSendService.cs index daff6ff1..d79ac44f 100644 --- a/Libraries/Core/Services/MailSendService.cs +++ b/Libraries/Core/Services/MailSendService.cs @@ -415,7 +415,7 @@ public class MailSendService( { message.Items = itemsToSendToPlayer; message.HasRewards = true; - message.MaxStorageTime = maxStorageTimeSeconds; + message.MaxStorageTime = maxStorageTimeSeconds ?? 172800; message.RewardCollected = false; } }