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) {
|
public static void UpdateDunGenExtenderProperties(DunGenExtenderProperties props, EventCallbackScenario callback) {
|
||||||
props.MainPathCount = PluginConfig.Instance.mainPathCountValue;
|
if (callback.IsDevDebug) return;
|
||||||
|
|
||||||
props.DungeonSizeBase = new Vector3(PluginConfig.Instance.dunGenWidthBaseValue, props.DungeonSizeBase.y, PluginConfig.Instance.dunGenLengthBaseValue);
|
props.MainPathProperties.MainPathCount = PluginConfig.Instance.mainPathCountValue;
|
||||||
props.DungeonSizeFactor = new Vector3(PluginConfig.Instance.dunGenWidthMultiFactorValue, props.DungeonSizeFactor.y, PluginConfig.Instance.dunGenLengthMultiFactorValue);
|
|
||||||
|
|
||||||
props.UseBranchLoopBoost = PluginConfig.Instance.branchLoopBoostValue;
|
props.DungeonBoundsProperties.SizeBase = new Vector3(PluginConfig.Instance.dunGenWidthBaseValue, props.DungeonBoundsProperties.SizeBase.y, PluginConfig.Instance.dunGenLengthBaseValue);
|
||||||
props.BranchLoopBoostTileSearch = PluginConfig.Instance.branchLoopBoostTileSearchValue;
|
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;
|
var i = 0;
|
||||||
while(i < 3) {
|
while(i < 3) {
|
||||||
PluginConfig.Instance.branchPathSectionOneValue.UpdateValues(props.LineRandomizerArchetypes[i]);
|
PluginConfig.Instance.branchPathSectionOneValue.UpdateValues(props.LineRandomizerProperties.Archetypes[i]);
|
||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
|
|
||||||
while(i < 7) {
|
while(i < 7) {
|
||||||
PluginConfig.Instance.branchPathSectionTwoValue.UpdateValues(props.LineRandomizerArchetypes[i]);
|
PluginConfig.Instance.branchPathSectionTwoValue.UpdateValues(props.LineRandomizerProperties.Archetypes[i]);
|
||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
|
|
||||||
while(i < 10) {
|
while(i < 10) {
|
||||||
PluginConfig.Instance.branchPathSectionThreeValue.UpdateValues(props.LineRandomizerArchetypes[i]);
|
PluginConfig.Instance.branchPathSectionThreeValue.UpdateValues(props.LineRandomizerProperties.Archetypes[i]);
|
||||||
++i;
|
++i;
|
||||||
}
|
}
|
||||||
|
|
||||||
var count = PluginConfig.Instance.treasureRoomCountValue;
|
var count = PluginConfig.Instance.treasureRoomCountValue;
|
||||||
props.UseForcedTiles = count > 0;
|
props.ForcedTilesProperties.UseForcedTiles = count > 0;
|
||||||
|
|
||||||
var copyTarget = props.ForcedTileSets[0];
|
var forcedTilesProperties = props.ForcedTilesProperties;
|
||||||
props.ForcedTileSets = new List<ForcedTileSetList>();
|
var copyTarget = forcedTilesProperties.ForcedTileSets[0];
|
||||||
for(var j = 0; j < count; ++j) props.ForcedTileSets.Add(copyTarget);
|
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("imabatby.lethallevelloader", "1.2.0.3")]
|
||||||
[BepInDependency("evaisa.lethallib", "0.13.2")]
|
[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.advancedCompanyGuid, BepInDependency.DependencyFlags.SoftDependency)]
|
||||||
[BepInDependency(ModCompability.lethalConfigGuid, BepInDependency.DependencyFlags.SoftDependency)]
|
[BepInDependency(ModCompability.lethalConfigGuid, BepInDependency.DependencyFlags.SoftDependency)]
|
||||||
|
@ -34,7 +34,7 @@ namespace ScarletMansion {
|
||||||
public class Plugin : BaseUnityPlugin {
|
public class Plugin : BaseUnityPlugin {
|
||||||
public const string modGUID = "dev.ladyalice.scarletmansion";
|
public const string modGUID = "dev.ladyalice.scarletmansion";
|
||||||
private const string modName = "Scarlet Mansion";
|
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);
|
public readonly Harmony harmony = new Harmony(modGUID);
|
||||||
|
|
||||||
|
|
|
@ -182,24 +182,24 @@ namespace ScarletMansion {
|
||||||
public IntRange mainPathLengthValue = new IntRange("main path length");
|
public IntRange mainPathLengthValue = new IntRange("main path length");
|
||||||
|
|
||||||
// branching path
|
// branching path
|
||||||
public static ConfigEntryBundle<bool> branchLoopBoost = new ConfigEntryBundle<bool>(
|
public static ConfigEntryBundle<bool> branchMultiSim = new ConfigEntryBundle<bool>(
|
||||||
dungeonGenerationBPathPrefix,
|
dungeonGenerationBPathPrefix,
|
||||||
"Use Branch Loop Prioritization",
|
"Use Branch Path Multi Sim",
|
||||||
true,
|
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
|
null
|
||||||
);
|
);
|
||||||
public static ConfigEntryBundle<int> branchLoopBoostTileSearch = new ConfigEntryBundle<int>(
|
public static ConfigEntryBundle<int> branchSimCount = new ConfigEntryBundle<int>(
|
||||||
dungeonGenerationBPathPrefix,
|
dungeonGenerationBPathPrefix,
|
||||||
"Tile Search Count",
|
"Branch Path Simlation Count",
|
||||||
10,
|
5,
|
||||||
"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.",
|
"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,
|
null,
|
||||||
new AcceptableValueRange<int>(1, 20)
|
new AcceptableValueRange<int>(1, 10)
|
||||||
);
|
);
|
||||||
|
|
||||||
public bool branchLoopBoostValue;
|
public bool branchMultiSimValue;
|
||||||
public int branchLoopBoostTileSearchValue;
|
public int branchSimCountValue;
|
||||||
|
|
||||||
// branching path mini sections
|
// 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}";
|
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