Minor Changes

Cleaned up our code related to initializing dimensions. Removed
redundant instances of that code and instead created a function:
PocketManager.loadDimension() - to centralize all uses of that logic.
Added LinkTypes.REVERSE to represent links leading back out of pockets
through their entrances. That distinction might prove critical in the
future when we support resetting dungeons.
This commit is contained in:
SenseiKiwi
2013-09-05 21:03:11 -04:00
parent 3ce380ad5e
commit 03660699cf
5 changed files with 37 additions and 35 deletions

View File

@@ -285,7 +285,7 @@ public class DungeonSchematic extends Schematic {
private static void createEntranceReverseLink(NewDimData dimension, Point3D pocketCenter, DimLink entryLink)
{
DimLink reverseLink = dimension.createLink(pocketCenter.getX(), pocketCenter.getY(), pocketCenter.getZ(), LinkTypes.NORMAL);
DimLink reverseLink = dimension.createLink(pocketCenter.getX(), pocketCenter.getY(), pocketCenter.getZ(), LinkTypes.REVERSE);
Point4D destination = entryLink.source();
NewDimData prevDim = PocketManager.getDimensionData(destination.getDimension());
prevDim.setDestination(reverseLink, destination.getX(), destination.getY(), destination.getZ());