This is just Jetbrains formatting and code syntax styling

This commit is contained in:
CWX
2025-02-05 06:56:51 +00:00
parent ce78a2231e
commit f648f42721
382 changed files with 6348 additions and 10422 deletions
+54 -55
View File
@@ -3,74 +3,73 @@ using Core.Models.Enums;
using Core.Models.Spt.Config;
using Core.Servers;
namespace ExampleMods.Mods
namespace ExampleMods.Mods;
[Injectable]
public class EditConfigs
{
[Injectable]
public class EditConfigs
private readonly AirdropConfig _airdropConfig;
private readonly BotConfig _botConfig;
private readonly ConfigServer _configServer;
private readonly HideoutConfig _hideoutConfig;
private readonly PmcChatResponse _pmcChatResponseConfig;
private readonly PmcConfig _pmcConfig;
private readonly QuestConfig _questConfig;
private readonly WeatherConfig _weatherConfig;
// We access configs via ConfigServer
public EditConfigs(
ConfigServer configServer)
{
private readonly ConfigServer _configServer;
private readonly BotConfig _botConfig;
private readonly HideoutConfig _hideoutConfig;
private readonly WeatherConfig _weatherConfig;
private readonly AirdropConfig _airdropConfig;
private readonly PmcChatResponse _pmcChatResponseConfig;
private readonly QuestConfig _questConfig;
private readonly PmcConfig _pmcConfig;
_configServer = configServer;
// We access configs via ConfigServer
public EditConfigs(
ConfigServer configServer)
{
_configServer = configServer;
// We get the bot config by calling GetConfig and passing the configs 'type' within the diamond brackets
_botConfig = _configServer.GetConfig<BotConfig>();
_hideoutConfig = _configServer.GetConfig<HideoutConfig>();
_weatherConfig = _configServer.GetConfig<WeatherConfig>();
_airdropConfig = _configServer.GetConfig<AirdropConfig>();
_pmcChatResponseConfig = _configServer.GetConfig<PmcChatResponse>();
_questConfig = _configServer.GetConfig<QuestConfig>();
_pmcConfig = _configServer.GetConfig<PmcConfig>();
// We get the bot config by calling GetConfig and passing the configs 'type' within the diamond brackets
_botConfig = _configServer.GetConfig<BotConfig>();
_hideoutConfig = _configServer.GetConfig<HideoutConfig>();
_weatherConfig = _configServer.GetConfig<WeatherConfig>();
_airdropConfig = _configServer.GetConfig<AirdropConfig>();
_pmcChatResponseConfig = _configServer.GetConfig<PmcChatResponse>();
_questConfig = _configServer.GetConfig<QuestConfig>();
_pmcConfig = _configServer.GetConfig<PmcConfig>();
Run();
}
Run();
}
public void Run()
{
// Let's edit the weather config to make the season winter
_weatherConfig.OverrideSeason = Season.WINTER;
public void Run()
{
// Let's edit the weather config to make the season winter
_weatherConfig.OverrideSeason = Season.WINTER;
// Let's edit the hideout config to Make all crafts take 60 seconds
_hideoutConfig.OverrideCraftTimeSeconds = 60;
// Let's edit the hideout config to Make all crafts take 60 seconds
_hideoutConfig.OverrideCraftTimeSeconds = 60;
// Let's edit the hideout config to Make all upgrades take 60 seconds
_hideoutConfig.OverrideBuildTimeSeconds = 60;
// Let's edit the hideout config to Make all upgrades take 60 seconds
_hideoutConfig.OverrideBuildTimeSeconds = 60;
// Let's edit the airdrop config to Make weapon/armor drops really common
_airdropConfig.AirdropTypeWeightings[SptAirdropTypeEnum.weaponArmor] = 999;
// Let's edit the airdrop config to Make weapon/armor drops really common
_airdropConfig.AirdropTypeWeightings[SptAirdropTypeEnum.weaponArmor] = 999;
// Let's edit the airdrop config to Make weapon/armor drops always have 3 sealed weapon crates
var weaponCrateMinMax = _airdropConfig.Loot["weaponArmor"].WeaponCrateCount;
weaponCrateMinMax.Min = 3;
weaponCrateMinMax.Max = 3;
// Let's edit the airdrop config to Make weapon/armor drops always have 3 sealed weapon crates
var weaponCrateMinMax = _airdropConfig.Loot["weaponArmor"].WeaponCrateCount;
weaponCrateMinMax.Min = 3;
weaponCrateMinMax.Max = 3;
// Let's make PMCs always mail you when they kill you
_pmcChatResponseConfig.Killer.ResponseChancePercent = 100;
// Let's make PMCs always mail you when they kill you
_pmcChatResponseConfig.Killer.ResponseChancePercent = 100;
// Let's make quest rewards sent to you via mail last for over a week if you have an unheard profile
_questConfig.MailRedeemTimeHours["unheard_edition"] = 168;
// Let's make quest rewards sent to you via mail last for over a week if you have an unheard profile
_questConfig.MailRedeemTimeHours["unheard_edition"] = 168;
// Let's make the interchange bot cap huge
_botConfig.MaxBotCap["interchange"] = 50;
// Let's make the interchange bot cap huge
_botConfig.MaxBotCap["interchange"] = 50;
// Let's disable loot on scavs
_botConfig.DisableLootOnBotTypes.Add("assault");
// Let's disable loot on scavs
_botConfig.DisableLootOnBotTypes.Add("assault");
// Let's make the conversion rate of scavs to pmcs 100% on factory day
var factory4DayConversionSettings = _pmcConfig.ConvertIntoPmcChance["factory4_day"];
var assaultConversionSettings = factory4DayConversionSettings["assault"];
assaultConversionSettings.Min = 100;
assaultConversionSettings.Max = 100;
}
// Let's make the conversion rate of scavs to pmcs 100% on factory day
var factory4DayConversionSettings = _pmcConfig.ConvertIntoPmcChance["factory4_day"];
var assaultConversionSettings = factory4DayConversionSettings["assault"];
assaultConversionSettings.Min = 100;
assaultConversionSettings.Max = 100;
}
}