Updated code for DunGenPlus version 1.1.0 (fucked up the manifest file though)
This commit is contained in:
parent
a2531e246f
commit
93e249d838
|
@ -58,37 +58,40 @@ namespace ScarletMansion.DunGenPatch {
|
|||
|
||||
}
|
||||
|
||||
public static void UpdateDunGenExtenderProperties(DunGenExtenderProperties props) {
|
||||
props.MainPathCount = PluginConfig.Instance.mainPathCountValue;
|
||||
public static void UpdateDunGenExtenderProperties(DunGenExtenderProperties props, EventCallbackScenario callback) {
|
||||
if (callback.IsDevDebug) return;
|
||||
|
||||
props.DungeonSizeBase = new Vector3(PluginConfig.Instance.dunGenWidthBaseValue, props.DungeonSizeBase.y, PluginConfig.Instance.dunGenLengthBaseValue);
|
||||
props.DungeonSizeFactor = new Vector3(PluginConfig.Instance.dunGenWidthMultiFactorValue, props.DungeonSizeFactor.y, PluginConfig.Instance.dunGenLengthMultiFactorValue);
|
||||
props.MainPathProperties.MainPathCount = PluginConfig.Instance.mainPathCountValue;
|
||||
|
||||
props.UseBranchLoopBoost = PluginConfig.Instance.branchLoopBoostValue;
|
||||
props.BranchLoopBoostTileSearch = PluginConfig.Instance.branchLoopBoostTileSearchValue;
|
||||
props.DungeonBoundsProperties.SizeBase = new Vector3(PluginConfig.Instance.dunGenWidthBaseValue, props.DungeonBoundsProperties.SizeBase.y, PluginConfig.Instance.dunGenLengthBaseValue);
|
||||
props.DungeonBoundsProperties.SizeFactor = new Vector3(PluginConfig.Instance.dunGenWidthMultiFactorValue, props.DungeonBoundsProperties.SizeFactor.y, PluginConfig.Instance.dunGenLengthMultiFactorValue);
|
||||
|
||||
props.BranchPathMultiSimulationProperties.UseBranchPathMultiSim = PluginConfig.Instance.branchMultiSimValue;
|
||||
props.BranchPathMultiSimulationProperties.SimulationCount = PluginConfig.Instance.branchSimCountValue;
|
||||
|
||||
var i = 0;
|
||||
while(i < 3) {
|
||||
PluginConfig.Instance.branchPathSectionOneValue.UpdateValues(props.LineRandomizerArchetypes[i]);
|
||||
PluginConfig.Instance.branchPathSectionOneValue.UpdateValues(props.LineRandomizerProperties.Archetypes[i]);
|
||||
++i;
|
||||
}
|
||||
|
||||
while(i < 7) {
|
||||
PluginConfig.Instance.branchPathSectionTwoValue.UpdateValues(props.LineRandomizerArchetypes[i]);
|
||||
PluginConfig.Instance.branchPathSectionTwoValue.UpdateValues(props.LineRandomizerProperties.Archetypes[i]);
|
||||
++i;
|
||||
}
|
||||
|
||||
while(i < 10) {
|
||||
PluginConfig.Instance.branchPathSectionThreeValue.UpdateValues(props.LineRandomizerArchetypes[i]);
|
||||
PluginConfig.Instance.branchPathSectionThreeValue.UpdateValues(props.LineRandomizerProperties.Archetypes[i]);
|
||||
++i;
|
||||
}
|
||||
|
||||
var count = PluginConfig.Instance.treasureRoomCountValue;
|
||||
props.UseForcedTiles = count > 0;
|
||||
props.ForcedTilesProperties.UseForcedTiles = count > 0;
|
||||
|
||||
var copyTarget = props.ForcedTileSets[0];
|
||||
props.ForcedTileSets = new List<ForcedTileSetList>();
|
||||
for(var j = 0; j < count; ++j) props.ForcedTileSets.Add(copyTarget);
|
||||
var forcedTilesProperties = props.ForcedTilesProperties;
|
||||
var copyTarget = forcedTilesProperties.ForcedTileSets[0];
|
||||
forcedTilesProperties.ForcedTileSets = new List<ForcedTileSetList>();
|
||||
for(var j = 0; j < count; ++j) forcedTilesProperties.ForcedTileSets.Add(copyTarget);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -23,7 +23,7 @@ namespace ScarletMansion {
|
|||
|
||||
[BepInDependency("imabatby.lethallevelloader", "1.2.0.3")]
|
||||
[BepInDependency("evaisa.lethallib", "0.13.2")]
|
||||
[BepInDependency("dev.ladyalice.dungenplus", "1.0.5")]
|
||||
[BepInDependency("dev.ladyalice.dungenplus", "1.1.0")]
|
||||
|
||||
//[BepInDependency(ModCompability.advancedCompanyGuid, BepInDependency.DependencyFlags.SoftDependency)]
|
||||
[BepInDependency(ModCompability.lethalConfigGuid, BepInDependency.DependencyFlags.SoftDependency)]
|
||||
|
@ -34,7 +34,7 @@ namespace ScarletMansion {
|
|||
public class Plugin : BaseUnityPlugin {
|
||||
public const string modGUID = "dev.ladyalice.scarletmansion";
|
||||
private const string modName = "Scarlet Mansion";
|
||||
private const string modVersion = "1.3.25";
|
||||
private const string modVersion = "1.3.26";
|
||||
|
||||
public readonly Harmony harmony = new Harmony(modGUID);
|
||||
|
||||
|
|
|
@ -182,24 +182,24 @@ namespace ScarletMansion {
|
|||
public IntRange mainPathLengthValue = new IntRange("main path length");
|
||||
|
||||
// branching path
|
||||
public static ConfigEntryBundle<bool> branchLoopBoost = new ConfigEntryBundle<bool>(
|
||||
public static ConfigEntryBundle<bool> branchMultiSim = new ConfigEntryBundle<bool>(
|
||||
dungeonGenerationBPathPrefix,
|
||||
"Use Branch Loop Prioritization",
|
||||
"Use Branch Path Multi Sim",
|
||||
true,
|
||||
"If enabled, the dungeon generation will prioritize branch tiles that connect to already generated tiles.\nThis increases the chance of circular/looping paths. Slows dungeon generation times a bit at the end.",
|
||||
"If enabled, the dungeon generation will prioritize branch paths that connect to already generated tiles.\nThis increases the chance of circular/looping paths. Slows dungeon generation times a bit at the end.",
|
||||
null
|
||||
);
|
||||
public static ConfigEntryBundle<int> branchLoopBoostTileSearch = new ConfigEntryBundle<int>(
|
||||
public static ConfigEntryBundle<int> branchSimCount = new ConfigEntryBundle<int>(
|
||||
dungeonGenerationBPathPrefix,
|
||||
"Tile Search Count",
|
||||
10,
|
||||
"The maximum number of valid branch tiles that the dungeon generation will consider before choosing the best tile.\nIncreasing this value gives the dungeon generation a higher chance of finding a good tile but impacts dungeon generation times. Decreasing this value gives the dungeon generation a lower chance of finding a good tile but also lessens the impact to dungeon generation times.",
|
||||
"Branch Path Simlation Count",
|
||||
5,
|
||||
"The maximum number of valid branch paths that the dungeon generation will simulate before choosing the best path.\nIncreasing this value gives the dungeon generation a higher chance of finding a good path but impacts dungeon generation times and vice versa.",
|
||||
null,
|
||||
new AcceptableValueRange<int>(1, 20)
|
||||
new AcceptableValueRange<int>(1, 10)
|
||||
);
|
||||
|
||||
public bool branchLoopBoostValue;
|
||||
public int branchLoopBoostTileSearchValue;
|
||||
public bool branchMultiSimValue;
|
||||
public int branchSimCountValue;
|
||||
|
||||
// branching path mini sections
|
||||
private static string _branchPathBranchCountMessage(int section, string minmax, string middleSection) => $"The {minmax} amount of branching paths in Section {section} of the dungeon generation process.\n{middleSection}\n\n{_branchPathPostCountMessage}";
|
||||
|
|
Loading…
Reference in New Issue