@@ -17,6 +17,12 @@ public static RegionData SetName(this RegionData region, string name)
1717 return region ;
1818 }
1919
20+ /// <summary>
21+ /// Adds terrain cards to this region.<br/>
22+ /// Terrain cards require the <c>Terrain</c> trait to appear.<br/>
23+ /// Every region must have at least one valid terrain card.
24+ /// </summary>
25+ /// <param name="cards">The terrain cards to add.</param>
2026 public static RegionData AddTerrainCards ( this RegionData region , params string [ ] cards )
2127 {
2228 region . terrainCards = region . terrainCards ?? new ( ) ;
@@ -31,6 +37,12 @@ public static RegionData AddTerrainCards(this RegionData region, params string[]
3137 return region ;
3238 }
3339
40+ /// <summary>
41+ /// Adds likely cards to this region.<br/>
42+ /// Likely cards require the <c>ChoiceNode</c> metacategory to appear.<br/>
43+ /// One of three normal card choices is guaranteed to contain a card from the region's likely cards.
44+ /// </summary>
45+ /// <param name="cards">The likely cards to add.</param>
3446 public static RegionData AddLikelyCards ( this RegionData region , params string [ ] cards )
3547 {
3648 region . likelyCards = region . likelyCards ?? new ( ) ;
@@ -45,6 +57,11 @@ public static RegionData AddLikelyCards(this RegionData region, params string[]
4557 return region ;
4658 }
4759
60+ /// <summary>
61+ /// Adds consumables to this region.<br/>
62+ /// This only applies to consumables that are <c>regionSpecific</c>. Adding non-region-specific consumables will increase the probability of the consumable appearing.
63+ /// </summary>
64+ /// <param name="consumables"></param>
4865 public static RegionData AddConsumableItems ( this RegionData region , params string [ ] consumables )
4966 {
5067 region . consumableItems = region . consumableItems ?? new ( ) ;
@@ -65,6 +82,12 @@ public static RegionData AddConsumableItems(this RegionData region, params Consu
6582 return region ;
6683 }
6784
85+ /// <summary>
86+ /// Adds dominant tribes to this region.<br/>
87+ /// One of three normal card choices is guaranteed to contain a card from the region's dominant tribes.<br/>
88+ /// Every region must have at least one dominant tribe.
89+ /// </summary>
90+ /// <param name="tribes">The tribes to add.</param>
6891 public static RegionData AddDominantTribes ( this RegionData region , params Tribe [ ] tribes )
6992 {
7093 region . dominantTribes = region . dominantTribes ?? new ( ) ;
@@ -87,13 +110,23 @@ public static RegionData SetCardsColor(this RegionData region, Color color)
87110 return region ;
88111 }
89112
113+ /// <summary>
114+ /// Creates a new encounter for this region and returns the builder.<br/>
115+ /// Every region with battles needs at least one encounter.
116+ /// </summary>
117+ /// <param name="name">The name for the encounter.</param>
90118 public static EncounterBuilderBlueprintData CreateEncounter ( this RegionData region , string name = null )
91119 {
92120 EncounterBuilderBlueprintData blueprint = ScriptableObject . CreateInstance < EncounterBuilderBlueprintData > ( ) ;
93121 blueprint . SetBasic ( name , region ) ;
94122 return blueprint ;
95123 }
96124
125+ /// <summary>
126+ /// Adds normal (card battle node) encounters to this region.<br/>
127+ /// Every region with battles needs at least one encounter.
128+ /// </summary>
129+ /// <param name="encounters">The encounters to add.</param>
97130 public static RegionData AddEncounters ( this RegionData region , params EncounterBlueprintData [ ] encounters )
98131 {
99132 region . encounters = region . encounters ?? new ( ) ;
@@ -107,12 +140,20 @@ public static RegionData AddEncounters(this RegionData region, params EncounterB
107140 return region ;
108141 }
109142
143+ /// <summary>
144+ /// Sets the boss prep encounter condition for this region. If this condition is not met, the 'boss prep encounter' will not appear.
145+ /// </summary>
146+ /// <param name="condition">The condition that needs to be fulfilled</param>
110147 public static RegionData SetBossPrepCondition ( this RegionData region , StoryEventCondition condition )
111148 {
112149 region . bossPrepCondition = condition ;
113150 return region ;
114151 }
115152
153+ /// <summary>
154+ /// Sets the boss prep encounter for this region. The boss prep encounter is the final battle node in the region, before the boss.
155+ /// </summary>
156+ /// <param name="encounter">The encounter to set.</param>
116157 public static RegionData SetBossPrepEncounter ( this RegionData region , EncounterBlueprintData encounter )
117158 {
118159 region . bossPrepEncounter = encounter ;
@@ -168,6 +209,10 @@ public static RegionData SetSilenceCabinAmbience(this RegionData region, bool en
168209 return region ;
169210 }
170211
212+ /// <summary>
213+ /// Sets the music loop ID for this region.
214+ /// </summary>
215+ /// <param name="id">The music ID to use.</param>
171216 public static RegionData SetAmbientLoopId ( this RegionData region , string id )
172217 {
173218 region . ambientLoopId = id ;
@@ -216,15 +261,16 @@ public static RegionData SetMapParticlesPrefabs(this RegionData region, params G
216261 return region ;
217262 }
218263
219- public static RegionData Build ( this RegionData region ) {
264+ public static RegionData Build ( this RegionData region , bool ignoreTerrainWarning = false , bool ignoreTribesWarning = false ,
265+ bool ignoreEncountersWarning = false , bool ignoreBossesWarning = false ) {
220266
221- if ( region . terrainCards == null || region . terrainCards . Count == 0 )
267+ if ( ! ignoreTerrainWarning && ( region . terrainCards == null || region . terrainCards . Count == 0 ) )
222268 InscryptionAPIPlugin . Logger . LogWarning ( $ "Region { region . name } does not have any terrain cards!") ;
223- if ( region . dominantTribes == null || region . dominantTribes . Count == 0 )
269+ if ( ! ignoreTribesWarning && ( region . dominantTribes == null || region . dominantTribes . Count == 0 ) )
224270 InscryptionAPIPlugin . Logger . LogWarning ( $ "Region { region . name } does not have any dominant tribes!") ;
225- if ( region . encounters == null || region . encounters . Count == 0 )
271+ if ( ! ignoreEncountersWarning && ( region . encounters == null || region . encounters . Count == 0 ) )
226272 InscryptionAPIPlugin . Logger . LogWarning ( $ "Region { region . name } does not have any encounters!") ;
227- if ( region . bosses == null || region . bosses . Count == 0 )
273+ if ( ! ignoreBossesWarning && ( region . bosses == null || region . bosses . Count == 0 ) )
228274 InscryptionAPIPlugin . Logger . LogWarning ( $ "Region { region . name } does not have any bosses!") ;
229275
230276 return region ;
0 commit comments