Format Style Fixes

This commit is contained in:
sp-tarkov-bot
2025-11-10 10:55:39 +00:00
parent abbb814745
commit 4586390d68
12 changed files with 71 additions and 86 deletions
@@ -687,14 +687,12 @@ public class BotLootGenerator(
Dictionary<string, double> modChances
)
{
var chosenWeaponType = randomUtil.GetArrayValue<string>(
[
var chosenWeaponType = randomUtil.GetArrayValue<string>([
nameof(EquipmentSlots.FirstPrimaryWeapon),
nameof(EquipmentSlots.FirstPrimaryWeapon),
nameof(EquipmentSlots.FirstPrimaryWeapon),
nameof(EquipmentSlots.Holster),
]
);
]);
var randomisedWeaponCount = randomUtil.GetInt(
PMCConfig.LooseWeaponInBackpackLootMinMax.Min,
PMCConfig.LooseWeaponInBackpackLootMinMax.Max
@@ -53,16 +53,14 @@ public class LootGenerator(
{
// Choose one at random + add to results array
var chosenSealedContainer = randomUtil.GetArrayValue(sealedWeaponContainerPool);
result.Add(
[
result.Add([
new Item
{
Id = new MongoId(),
Template = chosenSealedContainer.Id,
Upd = new Upd { StackObjectsCount = 1, SpawnedInSession = true },
},
]
);
]);
}
}
@@ -349,9 +349,10 @@ public class CompletionQuestGenerator(
{
var onlyFoundInRaid = completionConfig.RequiredItemsAreFiR;
var minDurability = itemHelper.IsOfBaseclasses(itemTpl, [BaseClasses.WEAPON, BaseClasses.ARMOR])
? randomUtil.GetArrayValue(
[completionConfig.RequiredItemMinDurabilityMinMax.Min, completionConfig.RequiredItemMinDurabilityMinMax.Max]
)
? randomUtil.GetArrayValue([
completionConfig.RequiredItemMinDurabilityMinMax.Min,
completionConfig.RequiredItemMinDurabilityMinMax.Max,
])
: 0;
// Dog tags MUST NOT be FiR for them to work
@@ -34,9 +34,9 @@ public class ForceChristmasMessageHandler(
_mailSendService.SendUserMessageToPlayer(
sessionId,
sptFriendUser,
_randomUtil.GetArrayValue(
[_serverLocalisationService.GetText("chatbot-forced_event_enabled", SeasonalEventType.Christmas)]
),
_randomUtil.GetArrayValue([
_serverLocalisationService.GetText("chatbot-forced_event_enabled", SeasonalEventType.Christmas),
]),
[],
null
);
@@ -34,9 +34,9 @@ public class ForceHalloweenMessageHandler(
_mailSendService.SendUserMessageToPlayer(
sessionId,
sptFriendUser,
_randomUtil.GetArrayValue(
[_serverLocalisationService.GetText("chatbot-forced_event_enabled", SeasonalEventType.Halloween)]
),
_randomUtil.GetArrayValue([
_serverLocalisationService.GetText("chatbot-forced_event_enabled", SeasonalEventType.Halloween),
]),
[],
null
);
@@ -29,8 +29,7 @@ public class HelloMessageHandler(MailSendService mailSendService, RandomUtil ran
mailSendService.SendUserMessageToPlayer(
sessionId,
sptFriendUser,
randomUtil.GetArrayValue(
[
randomUtil.GetArrayValue([
"Howdy",
"Hi",
"Greetings",
@@ -42,8 +41,7 @@ public class HelloMessageHandler(MailSendService mailSendService, RandomUtil ran
"Hey there",
"OH its you",
$"Hello {sender?.Info?.Nickname}",
]
),
]),
[],
null
);
@@ -25,14 +25,12 @@ public class LoveYouChatMessageHandler(MailSendService _mailSendService, RandomU
_mailSendService.SendUserMessageToPlayer(
sessionId,
sptFriendUser,
_randomUtil.GetArrayValue(
[
_randomUtil.GetArrayValue([
"That's quite forward but i love you too in a purely chatbot-human way",
"I love you too buddy :3!",
"uwu",
$"love you too {sender?.Info?.Nickname}",
]
),
]),
[],
null
);
@@ -25,15 +25,13 @@ public class NikitaMessageHandler(MailSendService _mailSendService, RandomUtil _
_mailSendService.SendUserMessageToPlayer(
sessionId,
sptFriendUser,
_randomUtil.GetArrayValue(
[
_randomUtil.GetArrayValue([
"I know that guy!",
"Cool guy, he made EFT!",
"Legend",
"The mastermind of my suffering",
"Remember when he said webel-webel-webel-webel, classic Nikita moment",
]
),
]),
[],
null
);
@@ -47,15 +47,13 @@ public class SendGiftMessageHandler(
mailSendService.SendUserMessageToPlayer(
sessionId,
sptFriendUser,
randomUtil.GetArrayValue(
[
randomUtil.GetArrayValue([
"Hey! you got the right code!",
"A secret code, how exciting!",
"You found a gift code!",
"A gift code! incredible",
"A gift! what could it be!",
]
),
]),
[],
null
);
@@ -1371,16 +1371,14 @@ public class HideoutHelper(
List<List<Item>> itemsToAdd = [];
for (var index = 0; index < craftedCoinCount; index++)
{
itemsToAdd.Add(
[
itemsToAdd.Add([
new Item
{
Id = new MongoId(),
Template = ItemTpl.BARTER_PHYSICAL_BITCOIN,
Upd = new Upd { StackObjectsCount = 1 },
},
]
);
]);
}
// Create request for what we want to add to stash
@@ -65,9 +65,9 @@ public class PrestigeHelper(
}
else
{
newProfile.CharacterData!.PmcData!.Skills!.Mastering = newProfile.CharacterData.PmcData.Skills.Mastering?.Union(
[skillToCopy]
);
newProfile.CharacterData!.PmcData!.Skills!.Mastering = newProfile.CharacterData.PmcData.Skills.Mastering?.Union([
skillToCopy,
]);
}
}
}
+2 -4
View File
@@ -38,11 +38,9 @@ public class DI
var diHandler = new DependencyInjectionHandler(services);
diHandler.AddInjectableTypesFromTypeAssembly(typeof(App));
diHandler.AddInjectableTypesFromTypeList(
[
diHandler.AddInjectableTypesFromTypeList([
typeof(MockLogger<>), // TODO: this needs to be enabled but the randomizer needs to NOT be random, typeof(MockRandomUtil)
]
);
]);
diHandler.InjectAll();