Progress on Implementing Dungeon Packs

1. Integrated support for dungeon pack config options into the code
(i.e. we actually DO what the settings specify)
2. Added random transitions from one dungeon type to another. Dungeons
might also begin with a non-default pack.
3. Fixed a config reading bug that caused settings to be ignored and
some invalid settings wouldn't trigger exceptions. Also fixed other
dungeon pack bugs.
This commit is contained in:
SenseiKiwi
2013-08-21 14:26:10 -04:00
parent 99d9b5a2a1
commit 0e67596ca0
9 changed files with 263 additions and 41 deletions

View File

@@ -105,7 +105,7 @@ public class CommandExportDungeon extends DDCommandBase
try
{
int weight = Integer.parseInt(command[3]);
if (weight >= 0 && weight <= DungeonHelper.MAX_DUNGEON_WEIGHT)
if (weight >= DungeonHelper.MIN_DUNGEON_WEIGHT && weight <= DungeonHelper.MAX_DUNGEON_WEIGHT)
{
return exportDungeon(sender, join(command, "_", 0, 4));
}
@@ -114,7 +114,8 @@ public class CommandExportDungeon extends DDCommandBase
}
//If we've reached this point, then we must have an invalid weight.
return new DDCommandResult("Invalid dungeon weight. Please specify a weight between 0 and " + DungeonHelper.MAX_DUNGEON_WEIGHT + ", inclusive.");
return new DDCommandResult("Invalid dungeon weight. Please specify a weight between "
+ DungeonHelper.MIN_DUNGEON_WEIGHT + " and " + DungeonHelper.MAX_DUNGEON_WEIGHT + ", inclusive.");
}
return DDCommandResult.SUCCESS;