Skip to content

Commit 4885299

Browse files
committed
Also use TypeMapper with CustomRegion
1 parent 1d38a0e commit 4885299

1 file changed

Lines changed: 1 addition & 97 deletions

File tree

Plugin.cs

Lines changed: 1 addition & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -323,103 +323,7 @@ public CustomRegion(string name, int? tier = null, List<CardInfo> terrainCards =
323323

324324
public RegionData AdjustRegion(RegionData region)
325325
{
326-
region.name = this.name;
327-
if (this.terrainCards is not null)
328-
{
329-
region.terrainCards = this.terrainCards;
330-
}
331-
if (this.consumableItems is not null)
332-
{
333-
region.consumableItems = this.consumableItems;
334-
}
335-
if (this.encounters is not null)
336-
{
337-
region.encounters = this.encounters;
338-
}
339-
if (this.bosses is not null)
340-
{
341-
region.bosses = this.bosses;
342-
}
343-
if (this.likelyCards is not null)
344-
{
345-
region.likelyCards = this.likelyCards;
346-
}
347-
if (this.dominantTribes is not null)
348-
{
349-
region.dominantTribes = this.dominantTribes;
350-
}
351-
if (this.predefinedNodes is not null)
352-
{
353-
region.predefinedNodes = this.predefinedNodes;
354-
}
355-
if (this.bossPrepEncounter is not null)
356-
{
357-
region.bossPrepEncounter = this.bossPrepEncounter;
358-
}
359-
if (this.bossPrepCondition is not null)
360-
{
361-
region.bossPrepCondition = this.bossPrepCondition;
362-
}
363-
if (this.scarceScenery is not null)
364-
{
365-
region.scarceScenery = this.scarceScenery;
366-
}
367-
if (this.fillerScenery is not null)
368-
{
369-
region.fillerScenery = this.fillerScenery;
370-
}
371-
if (this.predefinedScenery is not null)
372-
{
373-
region.predefinedScenery = this.predefinedScenery;
374-
}
375-
if (!String.IsNullOrEmpty(this.ambientLoopId))
376-
{
377-
region.ambientLoopId = this.ambientLoopId;
378-
}
379-
if (this.silenceCabinAmbience is not null)
380-
{
381-
region.silenceCabinAmbience = (bool)this.silenceCabinAmbience;
382-
}
383-
if (this.boardLightColor is not null)
384-
{
385-
region.boardLightColor = (Color)this.boardLightColor;
386-
}
387-
if (this.cardsLightColor is not null)
388-
{
389-
region.cardsLightColor = (Color)this.cardsLightColor;
390-
}
391-
if (this.dustParticlesDisabled is not null)
392-
{
393-
region.dustParticlesDisabled = (bool)this.dustParticlesDisabled;
394-
}
395-
if (this.fogEnabled is not null)
396-
{
397-
region.fogEnabled = (bool)this.fogEnabled;
398-
}
399-
if (this.fogProfile is not null)
400-
{
401-
region.fogProfile = this.fogProfile;
402-
}
403-
if (this.fogAlpha is not null)
404-
{
405-
region.fogAlpha = (float)this.fogAlpha;
406-
}
407-
if (this.mapAlbedo is not null)
408-
{
409-
region.mapAlbedo = this.mapAlbedo;
410-
}
411-
if (this.mapEmission is not null)
412-
{
413-
region.mapEmission = this.mapEmission;
414-
}
415-
if (this.mapEmissionColor is not null)
416-
{
417-
region.mapEmissionColor = (Color)this.mapEmissionColor;
418-
}
419-
if (this.mapParticlesPrefabs is not null)
420-
{
421-
region.mapParticlesPrefabs = this.mapParticlesPrefabs;
422-
}
326+
TypeMapper<CustomRegion, RegionData>.Convert(this, region);
423327
Plugin.Log.LogInfo($"Adjusted default region {name}!");
424328
return region;
425329
}

0 commit comments

Comments
 (0)