diff --git a/Libraries/SPTarkov.Server.Core/Controllers/BotController.cs b/Libraries/SPTarkov.Server.Core/Controllers/BotController.cs
index bee0bdba..a5806ca9 100644
--- a/Libraries/SPTarkov.Server.Core/Controllers/BotController.cs
+++ b/Libraries/SPTarkov.Server.Core/Controllers/BotController.cs
@@ -324,7 +324,7 @@ public class BotController(
/// MinMax values
protected MinMax? GetPmcLevelRangeForMap(string? location)
{
- return pmcConfig.LocationSpecificPmcLevelOverride!.GetValueOrDefault(location?.ToLowerInvariant() ?? "", null);
+ return pmcConfig.LocationSpecificPmcLevelOverride!.GetValueOrDefault(location?.ToLowerInvariant() ?? string.Empty, null);
}
///
diff --git a/Libraries/SPTarkov.Server.Core/Controllers/CustomizationController.cs b/Libraries/SPTarkov.Server.Core/Controllers/CustomizationController.cs
index a03678ec..bbf962a4 100644
--- a/Libraries/SPTarkov.Server.Core/Controllers/CustomizationController.cs
+++ b/Libraries/SPTarkov.Server.Core/Controllers/CustomizationController.cs
@@ -162,7 +162,7 @@ public class CustomizationController(
SchemeItems = [new IdWithCount { Count = inventoryItemToProcess.Count!.Value, Id = inventoryItemToProcess.Id }],
TransactionId = Traders.RAGMAN,
Action = "BuyCustomization",
- Type = "",
+ Type = string.Empty,
ItemId = MongoId.Empty(),
Count = 0,
SchemeId = 0,
diff --git a/Libraries/SPTarkov.Server.Core/Controllers/DialogueController.cs b/Libraries/SPTarkov.Server.Core/Controllers/DialogueController.cs
index cf801fe1..3d5e29b1 100644
--- a/Libraries/SPTarkov.Server.Core/Controllers/DialogueController.cs
+++ b/Libraries/SPTarkov.Server.Core/Controllers/DialogueController.cs
@@ -599,7 +599,7 @@ public class DialogueController(
return new FriendRequestSendResponse
{
Status = BackendErrorCodes.PlayerProfileNotFound,
- RequestId = "", // Unused in an error state
+ RequestId = string.Empty, // Unused in an error state
RetryAfter = 600,
};
}
diff --git a/Libraries/SPTarkov.Server.Core/Controllers/HealthController.cs b/Libraries/SPTarkov.Server.Core/Controllers/HealthController.cs
index 3721b6dd..10135df7 100644
--- a/Libraries/SPTarkov.Server.Core/Controllers/HealthController.cs
+++ b/Libraries/SPTarkov.Server.Core/Controllers/HealthController.cs
@@ -252,7 +252,7 @@ public class HealthController(
Action = healthTreatmentRequest.Action,
TransactionId = Traders.THERAPIST,
SchemeItems = healthTreatmentRequest.Items,
- Type = "",
+ Type = string.Empty,
ItemId = MongoId.Empty(),
Count = 0,
SchemeId = 0,
diff --git a/Libraries/SPTarkov.Server.Core/Controllers/InsuranceController.cs b/Libraries/SPTarkov.Server.Core/Controllers/InsuranceController.cs
index eeddb872..5152d227 100644
--- a/Libraries/SPTarkov.Server.Core/Controllers/InsuranceController.cs
+++ b/Libraries/SPTarkov.Server.Core/Controllers/InsuranceController.cs
@@ -747,8 +747,8 @@ public class InsuranceController(
SchemeItems = itemsToPay,
TransactionId = request.TransactionId,
Action = "SptInsure",
- Type = "",
- ItemId = "",
+ Type = string.Empty,
+ ItemId = MongoId.Empty(),
Count = 0,
SchemeId = 0,
};
diff --git a/Libraries/SPTarkov.Server.Core/Controllers/MatchController.cs b/Libraries/SPTarkov.Server.Core/Controllers/MatchController.cs
index a9b8bfec..d4e8a67d 100644
--- a/Libraries/SPTarkov.Server.Core/Controllers/MatchController.cs
+++ b/Libraries/SPTarkov.Server.Core/Controllers/MatchController.cs
@@ -58,8 +58,8 @@ public class MatchController(
ProfileId = "TODO",
ProfileToken = "TODO",
Status = "MatchWait",
- Sid = "",
- Ip = "",
+ Sid = string.Empty,
+ Ip = string.Empty,
Port = 0,
Version = "live",
Location = "TODO get location",
diff --git a/Libraries/SPTarkov.Server.Core/Controllers/NotifierController.cs b/Libraries/SPTarkov.Server.Core/Controllers/NotifierController.cs
index 7a66e3d3..e0babb99 100644
--- a/Libraries/SPTarkov.Server.Core/Controllers/NotifierController.cs
+++ b/Libraries/SPTarkov.Server.Core/Controllers/NotifierController.cs
@@ -58,7 +58,7 @@ public class NotifierController(HttpServerHelper httpServerHelper, NotifierHelpe
{
Server = httpServerHelper.BuildUrl(),
ChannelId = sessionId,
- Url = "",
+ Url = string.Empty,
NotifierServer = GetServer(sessionId),
WebSocket = notifierHelper.GetWebSocketServer(sessionId),
};
diff --git a/Libraries/SPTarkov.Server.Core/Controllers/ProfileController.cs b/Libraries/SPTarkov.Server.Core/Controllers/ProfileController.cs
index d8268d2c..e055a193 100644
--- a/Libraries/SPTarkov.Server.Core/Controllers/ProfileController.cs
+++ b/Libraries/SPTarkov.Server.Core/Controllers/ProfileController.cs
@@ -57,17 +57,17 @@ public class ProfileController(
{
return new MiniProfile
{
- Username = profile.ProfileInfo?.Username ?? "",
+ Username = profile.ProfileInfo?.Username ?? string.Empty,
Nickname = "unknown",
- HasPassword = profile.ProfileInfo?.Password != "",
+ HasPassword = profile.ProfileInfo?.Password != string.Empty,
Side = "unknown",
CurrentLevel = 0,
CurrentExperience = 0,
PreviousExperience = 0,
NextLevel = xpToNextLevel,
MaxLevel = maxLvl,
- Edition = profile.ProfileInfo?.Edition ?? "",
- ProfileId = profile.ProfileInfo?.ProfileId ?? "",
+ Edition = profile.ProfileInfo?.Edition ?? string.Empty,
+ ProfileId = profile.ProfileInfo?.ProfileId ?? string.Empty,
SptData = profileHelper.GetDefaultSptDataObject(),
};
}
@@ -83,8 +83,8 @@ public class ProfileController(
PreviousExperience = currentLevel == 0 ? 0 : profileHelper.GetExperience(currentLevel.Value),
NextLevel = xpToNextLevel,
MaxLevel = maxLvl,
- Edition = profile.ProfileInfo?.Edition ?? "",
- ProfileId = profile.ProfileInfo?.ProfileId ?? "",
+ Edition = profile.ProfileInfo?.Edition ?? string.Empty,
+ ProfileId = profile.ProfileInfo?.ProfileId ?? string.Empty,
SptData = profile.SptData,
};
}
diff --git a/Libraries/SPTarkov.Server.Core/Controllers/RagfairController.cs b/Libraries/SPTarkov.Server.Core/Controllers/RagfairController.cs
index d461ee92..dce4d745 100644
--- a/Libraries/SPTarkov.Server.Core/Controllers/RagfairController.cs
+++ b/Libraries/SPTarkov.Server.Core/Controllers/RagfairController.cs
@@ -1096,7 +1096,7 @@ public class RagfairController(
TransactionId = "ragfair",
Action = "TradingConfirm",
SchemeItems = [new IdWithCount { Id = currency.GetCurrencyTpl(), Count = Math.Round(value) }],
- Type = "",
+ Type = string.Empty,
ItemId = MongoId.Empty(),
Count = 0,
SchemeId = 0,
diff --git a/Libraries/SPTarkov.Server.Core/Controllers/WeatherController.cs b/Libraries/SPTarkov.Server.Core/Controllers/WeatherController.cs
index 90eb0add..8a0feaa0 100644
--- a/Libraries/SPTarkov.Server.Core/Controllers/WeatherController.cs
+++ b/Libraries/SPTarkov.Server.Core/Controllers/WeatherController.cs
@@ -29,8 +29,8 @@ public class WeatherController(
var result = new WeatherData
{
Acceleration = 0,
- Time = "",
- Date = "",
+ Time = string.Empty,
+ Date = string.Empty,
Weather = null,
Season = Season.AUTUMN,
};
diff --git a/Libraries/SPTarkov.Server.Core/Generators/BotEquipmentModGenerator.cs b/Libraries/SPTarkov.Server.Core/Generators/BotEquipmentModGenerator.cs
index cc5daa2a..bf3b7d56 100644
--- a/Libraries/SPTarkov.Server.Core/Generators/BotEquipmentModGenerator.cs
+++ b/Libraries/SPTarkov.Server.Core/Generators/BotEquipmentModGenerator.cs
@@ -1052,7 +1052,7 @@ public class BotEquipmentModGenerator(
// Get random mod to attach from items db for required slots if none found above
if (!(chosenModResult.Found ?? false) && parentSlot != null && (parentSlot.Required ?? false))
{
- chosenModResult.ChosenTemplate = GetRandomModTplFromItemDb("", parentSlot, request.ModSlot, request.Weapon);
+ chosenModResult.ChosenTemplate = GetRandomModTplFromItemDb(MongoId.Empty(), parentSlot, request.ModSlot, request.Weapon);
chosenModResult.Found = true;
}
diff --git a/Libraries/SPTarkov.Server.Core/Generators/RepeatableQuestGeneration/CompletionQuestGenerator.cs b/Libraries/SPTarkov.Server.Core/Generators/RepeatableQuestGeneration/CompletionQuestGenerator.cs
index 17975d8f..db653116 100644
--- a/Libraries/SPTarkov.Server.Core/Generators/RepeatableQuestGeneration/CompletionQuestGenerator.cs
+++ b/Libraries/SPTarkov.Server.Core/Generators/RepeatableQuestGeneration/CompletionQuestGenerator.cs
@@ -360,7 +360,7 @@ public class CompletionQuestGenerator(
{
Id = new MongoId(),
Index = 0,
- ParentId = "",
+ ParentId = string.Empty,
DynamicLocale = true,
VisibilityConditions = [],
Target = new ListOrT([itemTpl], null),
diff --git a/Libraries/SPTarkov.Server.Core/Generators/RepeatableQuestGeneration/RepeatableQuestRewardGenerator.cs b/Libraries/SPTarkov.Server.Core/Generators/RepeatableQuestGeneration/RepeatableQuestRewardGenerator.cs
index f24bba3c..57e71794 100644
--- a/Libraries/SPTarkov.Server.Core/Generators/RepeatableQuestGeneration/RepeatableQuestRewardGenerator.cs
+++ b/Libraries/SPTarkov.Server.Core/Generators/RepeatableQuestGeneration/RepeatableQuestRewardGenerator.cs
@@ -663,7 +663,7 @@ public class RepeatableQuestRewardGenerator(
.Values.Where(itemTemplate =>
{
// Base "Item" item has no parent, ignore it
- if (itemTemplate.Parent == "")
+ if (itemTemplate.Parent == MongoId.Empty())
{
return false;
}
diff --git a/Libraries/SPTarkov.Server.Core/Generators/ScavCaseRewardGenerator.cs b/Libraries/SPTarkov.Server.Core/Generators/ScavCaseRewardGenerator.cs
index bea999d8..f66045c3 100644
--- a/Libraries/SPTarkov.Server.Core/Generators/ScavCaseRewardGenerator.cs
+++ b/Libraries/SPTarkov.Server.Core/Generators/ScavCaseRewardGenerator.cs
@@ -85,7 +85,7 @@ public class ScavCaseRewardGenerator(
.Values.Where(item =>
{
// Base "Item" item has no parent, ignore it
- if (item.Parent == "")
+ if (item.Parent == MongoId.Empty())
{
return false;
}
@@ -144,7 +144,7 @@ public class ScavCaseRewardGenerator(
.Values.Where(item =>
{
// Base "Item" item has no parent, ignore it
- if (item.Parent == "")
+ if (item.Parent == MongoId.Empty())
{
return false;
}
diff --git a/Libraries/SPTarkov.Server.Core/Generators/WeatherGenerator.cs b/Libraries/SPTarkov.Server.Core/Generators/WeatherGenerator.cs
index 6bddaaae..ad811e6e 100644
--- a/Libraries/SPTarkov.Server.Core/Generators/WeatherGenerator.cs
+++ b/Libraries/SPTarkov.Server.Core/Generators/WeatherGenerator.cs
@@ -75,8 +75,8 @@ public class WeatherGenerator(
WindDirection = GetWeightedWindDirection(weatherValues),
WindSpeed = GetWeightedWindSpeed(weatherValues),
Cloud = clouds,
- Time = "",
- Date = "",
+ Time = string.Empty,
+ Date = string.Empty,
Timestamp = 0,
SptInRaidTimestamp = 0,
};
diff --git a/Libraries/SPTarkov.Server.Core/Helpers/BotGeneratorHelper.cs b/Libraries/SPTarkov.Server.Core/Helpers/BotGeneratorHelper.cs
index 7d9219e8..5574d8f4 100644
--- a/Libraries/SPTarkov.Server.Core/Helpers/BotGeneratorHelper.cs
+++ b/Libraries/SPTarkov.Server.Core/Helpers/BotGeneratorHelper.cs
@@ -249,7 +249,7 @@ public class BotGeneratorHelper(
{
Incompatible = false,
Found = false,
- Reason = "",
+ Reason = string.Empty,
};
}
@@ -409,7 +409,7 @@ public class BotGeneratorHelper(
};
}
- return new ChooseRandomCompatibleModResult { Incompatible = false, Reason = "" };
+ return new ChooseRandomCompatibleModResult { Incompatible = false, Reason = string.Empty };
}
protected bool HasBlockingProperty(TemplateItem? item, string blockingPropertyName)
diff --git a/Libraries/SPTarkov.Server.Core/Helpers/PrestigeHelper.cs b/Libraries/SPTarkov.Server.Core/Helpers/PrestigeHelper.cs
index 6bed1752..332d2233 100644
--- a/Libraries/SPTarkov.Server.Core/Helpers/PrestigeHelper.cs
+++ b/Libraries/SPTarkov.Server.Core/Helpers/PrestigeHelper.cs
@@ -117,7 +117,7 @@ public class PrestigeHelper(
{
mailSendService.SendSystemMessageToPlayer(
sessionId.Value,
- "",
+ string.Empty,
itemsToTransfer,
timeUtil.GetHoursAsSeconds(8760) // Year
);
@@ -168,7 +168,7 @@ public class PrestigeHelper(
if (itemsToSend.Count > 0)
{
- mailSendService.SendSystemMessageToPlayer(sessionId, "", itemsToSend, 31536000);
+ mailSendService.SendSystemMessageToPlayer(sessionId, string.Empty, itemsToSend, 31536000);
}
}
}
diff --git a/Libraries/SPTarkov.Server.Core/Services/PmcChatResponseService.cs b/Libraries/SPTarkov.Server.Core/Services/PmcChatResponseService.cs
index 12d87464..0afb1b31 100644
--- a/Libraries/SPTarkov.Server.Core/Services/PmcChatResponseService.cs
+++ b/Libraries/SPTarkov.Server.Core/Services/PmcChatResponseService.cs
@@ -134,7 +134,7 @@ public class PmcChatResponseService(
playerName = pmcData.Info.Nickname,
playerLevel = pmcData.Info.Level,
playerSide = pmcData.Info.Side,
- victimDeathLocation = victimData is not null ? GetLocationName(victimData.Location) : "",
+ victimDeathLocation = victimData is not null ? GetLocationName(victimData.Location) : string.Empty,
}
);
diff --git a/Libraries/SPTarkov.Server.Core/Services/RepairService.cs b/Libraries/SPTarkov.Server.Core/Services/RepairService.cs
index c8e3ac2e..c26c5767 100644
--- a/Libraries/SPTarkov.Server.Core/Services/RepairService.cs
+++ b/Libraries/SPTarkov.Server.Core/Services/RepairService.cs
@@ -126,8 +126,8 @@ public class RepairService(
SchemeItems = [new IdWithCount { Count = Math.Round(repairCost), Id = Money.ROUBLES }],
TransactionId = traderId,
Action = "SptRepair",
- Type = "",
- ItemId = "",
+ Type = string.Empty,
+ ItemId = MongoId.Empty(),
Count = 0,
SchemeId = 0,
};
diff --git a/Libraries/SPTarkov.Server.Core/Services/SeasonalEventService.cs b/Libraries/SPTarkov.Server.Core/Services/SeasonalEventService.cs
index 9aa6a991..4c325e34 100644
--- a/Libraries/SPTarkov.Server.Core/Services/SeasonalEventService.cs
+++ b/Libraries/SPTarkov.Server.Core/Services/SeasonalEventService.cs
@@ -1100,8 +1100,8 @@ public class SeasonalEventService(
ForceSpawn = true,
SpawnMode = ["regular", "pve"],
Time = -1,
- TriggerId = "",
- TriggerName = "",
+ TriggerId = string.Empty,
+ TriggerName = string.Empty,
Delay = 0,
IsRandomTimeSpawn = false,
IgnoreMaxBots = true,
diff --git a/Libraries/SPTarkov.Server.Core/Utils/HttpResponseUtil.cs b/Libraries/SPTarkov.Server.Core/Utils/HttpResponseUtil.cs
index 82798f25..4abfc6c6 100644
--- a/Libraries/SPTarkov.Server.Core/Utils/HttpResponseUtil.cs
+++ b/Libraries/SPTarkov.Server.Core/Utils/HttpResponseUtil.cs
@@ -67,7 +67,7 @@ public class HttpResponseUtil(JsonUtil jsonUtil, ServerLocalisationService serve
/// Client response
public string EmptyResponse()
{
- return GetBody("", BackendErrorCodes.None, "");
+ return GetBody(string.Empty, BackendErrorCodes.None, "");
}
public string NullResponse()