.NET Format Style Fixes

This commit is contained in:
refringe
2025-06-18 17:09:20 +00:00
committed by Format Bot
parent ca0a7d6345
commit 6e01428b2b
774 changed files with 23507 additions and 40003 deletions
@@ -44,16 +44,18 @@ public class CustomizationController(
var suits = _databaseService.GetTrader(traderId).Suits;
var matchingSuits = suits?.Where(s => clothing.ContainsKey(s.SuiteId!)).ToList();
matchingSuits = matchingSuits?.Where(s => clothing[s.SuiteId ?? string.Empty]
?.Properties?.Side?
.Contains(pmcData?.Info?.Side ?? string.Empty) ??
false
matchingSuits = matchingSuits
?.Where(s =>
clothing[s.SuiteId ?? string.Empty]
?.Properties?.Side?.Contains(pmcData?.Info?.Side ?? string.Empty) ?? false
)
.ToList();
if (matchingSuits == null)
{
throw new Exception(_localisationService.GetText("customisation-unable_to_get_trader_suits", traderId));
throw new Exception(
_localisationService.GetText("customisation-unable_to_get_trader_suits", traderId)
);
}
return matchingSuits;
@@ -70,7 +72,8 @@ public class CustomizationController(
public ItemEventRouterResponse BuyCustomisation(
PmcData pmcData,
BuyClothingRequestData buyClothingRequest,
string sessionId)
string sessionId
)
{
var output = _eventOutputHolder.GetOutput(sessionId);
@@ -78,7 +81,10 @@ public class CustomizationController(
if (traderOffer is null)
{
_logger.Error(
_localisationService.GetText("customisation-unable_to_find_suit_by_id", buyClothingRequest.Offer)
_localisationService.GetText(
"customisation-unable_to_find_suit_by_id",
buyClothingRequest.Offer
)
);
return output;
}
@@ -90,11 +96,7 @@ public class CustomizationController(
_logger.Error(
_localisationService.GetText(
"customisation-item_already_purchased",
new
{
itemId = suitDetails?.Id,
itemName = suitDetails?.Name
}
new { itemId = suitDetails?.Id, itemName = suitDetails?.Name }
)
);
@@ -111,7 +113,7 @@ public class CustomizationController(
{
Id = suitId,
Source = CustomisationSource.UNLOCKED_IN_GAME,
Type = CustomisationType.SUITE
Type = CustomisationType.SUITE,
};
profile.CustomisationUnlocks.Add(rewardToStore);
@@ -130,7 +132,9 @@ public class CustomizationController(
var fullProfile = _profileHelper.GetFullProfile(sessionId);
// Check if clothing can be found by id
return fullProfile.CustomisationUnlocks.Exists(customisation => Equals(customisation.Id, suitId));
return fullProfile.CustomisationUnlocks.Exists(customisation =>
Equals(customisation.Id, suitId)
);
}
/// <summary>
@@ -144,7 +148,9 @@ public class CustomizationController(
var foundSuit = GetAllTraderSuits(sessionId).FirstOrDefault(s => s.Id == offerId);
if (foundSuit is null)
{
_logger.Error(_localisationService.GetText("customisation-unable_to_find_suit_with_id", offerId));
_logger.Error(
_localisationService.GetText("customisation-unable_to_find_suit_with_id", offerId)
);
}
return foundSuit;
@@ -157,9 +163,12 @@ public class CustomizationController(
/// <param name="pmcData">Player profile</param>
/// <param name="itemsToPayForClothingWith">Clothing purchased</param>
/// <param name="output">Client response</param>
protected void PayForClothingItems(string sessionId, PmcData pmcData,
protected void PayForClothingItems(
string sessionId,
PmcData pmcData,
List<PaymentItemForClothing>? itemsToPayForClothingWith,
ItemEventRouterResponse output)
ItemEventRouterResponse output
)
{
if (itemsToPayForClothingWith is null || itemsToPayForClothingWith.Count == 0)
{
@@ -175,15 +184,15 @@ public class CustomizationController(
new IdWithCount
{
Count = inventoryItemToProcess.Count.Value,
Id = inventoryItemToProcess.Id
}
Id = inventoryItemToProcess.Id,
},
],
TransactionId = Traders.RAGMAN,
Action = "BuyCustomization",
Type = "",
ItemId = "",
Count = 0,
SchemeId = 0
SchemeId = 0,
};
_paymentService.PayMoney(pmcData, options, sessionId, output);
@@ -202,7 +211,10 @@ public class CustomizationController(
foreach (var trader in traders)
{
if (trader.Value.Base?.CustomizationSeller is not null && trader.Value.Base.CustomizationSeller.Value)
if (
trader.Value.Base?.CustomizationSeller is not null
&& trader.Value.Base.CustomizationSeller.Value
)
{
result.AddRange(GetTraderSuits(trader.Key, sessionId));
}
@@ -226,10 +238,11 @@ public class CustomizationController(
/// </summary>
/// <param name="sessionId">Session/Player id</param>
/// <returns></returns>
public List<CustomisationStorage> GetCustomisationStorage(
string sessionId)
public List<CustomisationStorage> GetCustomisationStorage(string sessionId)
{
var customisationResultsClone = _cloner.Clone(_databaseService.GetTemplates().CustomisationStorage);
var customisationResultsClone = _cloner.Clone(
_databaseService.GetTemplates().CustomisationStorage
);
var profile = _profileHelper.GetFullProfile(sessionId);
if (profile is null)
@@ -249,7 +262,11 @@ public class CustomizationController(
/// <param name="request"></param>
/// <param name="pmcData">Players PMC profile</param>
/// <returns></returns>
public ItemEventRouterResponse SetCustomisation(string sessionId, CustomizationSetRequest request, PmcData pmcData)
public ItemEventRouterResponse SetCustomisation(
string sessionId,
CustomizationSetRequest request,
PmcData pmcData
)
{
foreach (var customisation in request.Customizations)
{