Files
RickGrymes 361cdbac52 Add scenario options and quest helpers
Introduce a new scenario settings tab with configurable starting year support and optional "start enlisted" scenario behavior, including updated scenario defs and opening text tokens. This also folds enlist settings into the main mod settings flow, adds quest and unique-character helpers for companion spawns and join quests, and includes smaller gameplay patches like NCR tent handling, Legion ear butcher drops, and quieter homing projectile logging.
2026-07-25 09:01:02 -05:00

44 lines
1.6 KiB
C#

using FCP.Core.VATS;
// ReSharper disable InconsistentNaming
namespace FCP.Core;
public class FCPSettings : ModSettings
{
public GeneralSettings General = new GeneralSettings();
public VATSSettings VATS = new VATSSettings();
public EnlistSettings Enlist = new EnlistSettings();
public TentsSettings Tents = new TentsSettings();
public ScenarioSettings Scenarios = new ScenarioSettings();
public DebugSettings Debug = new DebugSettings();
public IReadOnlyList<SettingsTab> Tabs => [General, VATS, Enlist, Scenarios, Debug];
private Dictionary<Type, SettingsTab> _tabsByType;
private Dictionary<Type, SettingsTab> TabsByType
=> _tabsByType ??= Tabs.ToDictionary(tab => tab.GetType());
public T GetTab<T>() where T : SettingsTab
=> TabsByType.TryGetValue(typeof(T), out SettingsTab tab) ? (T)tab : null;
public override void ExposeData()
{
base.ExposeData();
Scribe_Deep.Look(ref General, nameof(General));
Scribe_Deep.Look(ref VATS, nameof(VATS));
Scribe_Deep.Look(ref Enlist, nameof(Enlist));
Scribe_Deep.Look(ref Tents, nameof(Tents));
Scribe_Deep.Look(ref Scenarios, nameof(Scenarios));
Scribe_Deep.Look(ref Debug, nameof(Debug));
if (Scribe.mode == LoadSaveMode.PostLoadInit)
{
General ??= new GeneralSettings();
VATS ??= new VATSSettings();
Enlist ??= new EnlistSettings();
Tents ??= new TentsSettings();
Scenarios ??= new ScenarioSettings();
Debug ??= new DebugSettings();
}
}
}