Progress on Implementing Dungeon Packs

Started implementing our support for dungeon packs. The code is not
usable yet and the mod is not functional at this stage. A few additional
changes should make it testable. A significant obstacle to implementing
dungeon packs easily is that DungeonGenerator doesn't have some
necessary information and shouldn't be modified. Even if it is modified,
old serialized instances wouldn't have the new fields initialized. I'm
having to create workarounds until we implement the new save format.

DungeonPack handles all of the logic of selecting a dungeon and
verifying whether its type is valid. It relies on DungeonChainRule and
OptimizedRule to check which dungeons should be generated next given a
list of the dungeons in a chain. DungeonType maps types in packs to ID
numbers and provides a reference to the pack that owns the type.
DungeonPackConfig will carry config information to be passed to the
DungeonPack constructor.
This commit is contained in:
SenseiKiwi
2013-08-04 19:27:34 -04:00
parent 2dfabccaa9
commit e96fc02747
9 changed files with 431 additions and 199 deletions

View File

@@ -12,16 +12,13 @@ public class DungeonGenerator implements Serializable
public int weight;
public String schematicPath;
public ArrayList<HashMap> sideRifts = new ArrayList<HashMap>();
public LinkData exitLink;
public static Random rand = new Random();
public LinkData exitLink;
public boolean isOpen;
public int sideDoorsSoFar=0;
public int exitDoorsSoFar=0;
public int deadEndsSoFar=0;
public DungeonGenerator(int weight, String schematicPath, Boolean isOpen)
{
this.weight=weight;