@@ -11,15 +11,26 @@ namespace InscryptionCommunityPatch.ResourceManagers;
1111[ HarmonyPatch ]
1212public static class EnergyDrone
1313{
14+ /// <summary>
15+ /// Class containing information on the resource energy drone. Controls whether the Energy Drone will appear in non-Act 3 acts.
16+ /// </summary>
1417 public class EnergyConfigInfo
1518 {
16- public bool ConfigEnergy => PoolHasEnergy || PatchPlugin . configEnergy . Value ;
17- public bool ConfigDrone => PoolHasEnergy || ConfigDroneMox || PatchPlugin . configDrone . Value ;
18- public bool ConfigDroneMox => PoolHasGems || PatchPlugin . configDroneMox . Value ;
19- public bool ConfigMox => PoolHasGems || PatchPlugin . configMox . Value ;
20- public bool ConfigDefaultDrone => PatchPlugin . configDefaultDrone . Value ;
19+ public bool ConfigEnergy { get ; set ; } = PoolHasEnergy || PatchPlugin . configEnergy . Value ;
20+ public bool ConfigShowDrone { get ; set ; } = PoolHasEnergy || PatchPlugin . configDrone . Value ;
21+ public bool ConfigDroneMox { get ; set ; } = PoolHasGems || PatchPlugin . configDroneMox . Value ;
22+ public bool ConfigMox { get ; set ; } = PoolHasGems || PatchPlugin . configMox . Value ;
23+ public bool ConfigDefaultDrone { get ; set ; } = PatchPlugin . configDefaultDrone . Value ;
24+
25+ /// <summary>
26+ /// Controls whether or not the Drone will appear. By default, will appear if there are obtainable Energy or Mox cards in the card pool (or the corresponding config value has been set).
27+ /// </summary>
28+ public bool ConfigDrone => ConfigShowDrone || ConfigDroneMox ;
2129 }
2230
31+ /// <summary>
32+ /// Contains the EnergyConfigInfos for each Act with default settings. If you want to directly alter an Act's drone behaviour, please modify GetEnergyConfig instead.
33+ /// </summary>
2334 public static Dictionary < CardTemple , EnergyConfigInfo > ZoneConfigs = new ( )
2435 {
2536 { CardTemple . Nature , new ( ) } ,
@@ -49,23 +60,28 @@ public static bool CurrentSceneCanHaveEnergyDrone
4960 }
5061 }
5162
52- private static EnergyConfigInfo EnergyConfig
63+ /// <summary>
64+ /// Returns the EnergyConfigInfo object corresponding to the current Act.
65+ /// </summary>
66+ public static EnergyConfigInfo GetEnergyConfig ( )
5367 {
54- get
55- {
56- if ( SaveManager . SaveFile . IsPart3 )
57- return ZoneConfigs [ CardTemple . Tech ] ;
68+ if ( SaveManager . SaveFile . IsPart3 )
69+ return ZoneConfigs [ CardTemple . Tech ] ;
5870
59- if ( SaveManager . SaveFile . IsGrimora )
60- return ZoneConfigs [ CardTemple . Undead ] ;
71+ if ( SaveManager . SaveFile . IsGrimora )
72+ return ZoneConfigs [ CardTemple . Undead ] ;
6173
62- if ( SaveManager . SaveFile . IsMagnificus )
63- return ZoneConfigs [ CardTemple . Wizard ] ;
74+ if ( SaveManager . SaveFile . IsMagnificus )
75+ return ZoneConfigs [ CardTemple . Wizard ] ;
6476
65- return ZoneConfigs [ CardTemple . Nature ] ;
66- }
77+ return ZoneConfigs [ CardTemple . Nature ] ;
6778 }
6879
80+ /// <summary>
81+ /// The EnergyConfigInfo for the current Act.
82+ /// </summary>
83+ private static EnergyConfigInfo EnergyConfig => GetEnergyConfig ( ) ;
84+
6985 public static bool PoolHasEnergy { get ; private set ; }
7086 public static bool PoolHasGems { get ; private set ; }
7187
0 commit comments