Changed some configuration features

Added flag for disabling whether Stabilized Rift Signatures are
craftable. Autocorrected indentation in some areas. Renamed some
property keys in the config file, but the naming is inconsistent. Will
return soon to make all names consistent. Property values should be
removed from mod_pocketDim and moved to a file, e.g. DDProperties.
Configuration should either be loaded directly into the value variables
or be kept as a separate file, e.g. DDConfiguration. I favor for
integrating configuration reading into the same file as the values and
not declaring Property variables at all.
This commit is contained in:
SenseiKiwi 2013-06-12 23:30:13 -04:00
parent e96cbac35c
commit e4c8b50dae
2 changed files with 461 additions and 455 deletions

View file

@ -84,7 +84,7 @@ public class DimDoorsConfig
* Other * Other
*/ */
public static Property NonTntRatio; public static Property NonTntWeight;
public static Property RiftSpreadModifier; public static Property RiftSpreadModifier;
public static Property LimboReturnRange; public static Property LimboReturnRange;
@ -116,18 +116,18 @@ public class DimDoorsConfig
LimboReturnsInventoryEnabled = config.get(Configuration.CATEGORY_GENERAL, "bLimboReturnInventory", true); LimboReturnsInventoryEnabled = config.get(Configuration.CATEGORY_GENERAL, "bLimboReturnInventory", true);
LimboReturnsInventoryEnabled.comment="Toggles whether or not your inventory is returned upon dying and respawning in limbo"; LimboReturnsInventoryEnabled.comment="Toggles whether or not your inventory is returned upon dying and respawning in limbo";
NonTntRatio=config.get(Configuration.CATEGORY_GENERAL, "HOWMUCHTNT", 25); NonTntWeight=config.get(Configuration.CATEGORY_GENERAL, "HOWMUCHTNT", 25);
NonTntRatio.comment="Chance that a block will not be TNT. must be greater than 1. Explosions!?!?? must be set to true, and you figure out what it does. "; NonTntWeight.comment="Chance that a block will not be TNT. must be greater than or equal to 0. Explosions!?!?? must be set to true, and you figure out what it does. ";
MonolithEntityID=config.get(Configuration.CATEGORY_GENERAL, "monolithID", 125); MonolithEntityID=config.get(Configuration.CATEGORY_GENERAL, "monolithID", 125);
UnstableDoorID = config.getBlock("Chaos Door", 1978); DimensionalDoorID = config.getBlock("DimensionalDoorID", 1970);
DimensionalDoorID = config.getBlock("Dimensional Door", 1970); WarpDoorID = config.getBlock("WarpDoorID", 1975);
TransTrapdoorID = config.getBlock("Transdimensional Trapdoor", 1971); UnstableDoorID = config.getBlock("UnstableDoorID", 1978);
FabricBlockID=config.getBlock("Fabric of Reality", 1973); TransTrapdoorID = config.getBlock("TransdimensionalTrapdoorID", 1971);
WarpDoorID = config.getBlock("Warp Door", 1975); TransientDoorID = config.getBlock("TransientDoorID", 1979);
RiftBlockID = config.getBlock("Rift", 1977); FabricBlockID =config.getBlock("FabricOfRealityBlockID", 1973);
TransientDoorID = config.getBlock("transientDoorID", 1979); RiftBlockID = config.getBlock("RiftBlockID", 1977);
StabilizedRiftSignatureItemID=config.getItem("Stabilized Rift Signature", 5677); StabilizedRiftSignatureItemID=config.getItem("Stabilized Rift Signature", 5677);
RiftBladeItemID=config.getItem("Rift Blade", 5676); RiftBladeItemID=config.getItem("Rift Blade", 5676);
@ -191,8 +191,9 @@ public class DimDoorsConfig
mod_pocketDim.enableRiftBlade=CraftingRiftBladeAllowed.getBoolean(true); mod_pocketDim.enableRiftBlade=CraftingRiftBladeAllowed.getBoolean(true);
mod_pocketDim.enableRiftRemover=CraftingRiftBladeAllowed.getBoolean(true); mod_pocketDim.enableRiftRemover=CraftingRiftBladeAllowed.getBoolean(true);
mod_pocketDim.enableRiftSignature=CraftingRiftSignatureAllowed.getBoolean(true); mod_pocketDim.enableRiftSignature=CraftingRiftSignatureAllowed.getBoolean(true);
mod_pocketDim.enableUnstableDoor=CraftingRiftSignatureAllowed.getBoolean(true); mod_pocketDim.enableUnstableDoor=CraftingUnstableDoorAllowed.getBoolean(true);
mod_pocketDim.enableWoodenDimDoor=CraftingWarpDoorAllowed.getBoolean(true); mod_pocketDim.enableWoodenDimDoor=CraftingWarpDoorAllowed.getBoolean(true);
mod_pocketDim.enableStabilizedRiftSignature=CraftingStabilizedRiftSignatureAllowed.getBoolean(true);
mod_pocketDim.itemChaosDoorID=UnstableDoorItemID.getInt(); mod_pocketDim.itemChaosDoorID=UnstableDoorItemID.getInt();
mod_pocketDim.itemDimDoorID=DimensionalDoorItemID.getInt(); mod_pocketDim.itemDimDoorID=DimensionalDoorItemID.getInt();
mod_pocketDim.itemExitDoorID=WarpDoorItemID.getInt(); mod_pocketDim.itemExitDoorID=WarpDoorItemID.getInt();
@ -211,7 +212,7 @@ public class DimDoorsConfig
mod_pocketDim.riftsInWorldGen=WorldRiftGenerationEnabled.getBoolean(true); mod_pocketDim.riftsInWorldGen=WorldRiftGenerationEnabled.getBoolean(true);
mod_pocketDim.riftSpreadFactor=RiftSpreadModifier.getInt(); mod_pocketDim.riftSpreadFactor=RiftSpreadModifier.getInt();
mod_pocketDim.returnInventory=LimboReturnsInventoryEnabled.getBoolean(true); mod_pocketDim.returnInventory=LimboReturnsInventoryEnabled.getBoolean(true);
mod_pocketDim.HOW_MUCH_TNT=NonTntRatio.getInt(); mod_pocketDim.HOW_MUCH_TNT=NonTntWeight.getInt() + 1; //workaround so the generator code doesn't have to be changed
mod_pocketDim.limboDimID = LimboDimensionID.getInt(); mod_pocketDim.limboDimID = LimboDimensionID.getInt();
mod_pocketDim.isLimboActive= LimboEnabled.getBoolean(true); mod_pocketDim.isLimboActive= LimboEnabled.getBoolean(true);

View file

@ -78,11 +78,11 @@ import cpw.mods.fml.relauncher.Side;
@NetworkMod(clientSideRequired = true, serverSideRequired = false, @NetworkMod(clientSideRequired = true, serverSideRequired = false,
clientPacketHandlerSpec = clientPacketHandlerSpec =
@SidedPacketHandler(channels = {"pocketDim" }, packetHandler = ClientPacketHandler.class), @SidedPacketHandler(channels = {"pocketDim" }, packetHandler = ClientPacketHandler.class),
serverPacketHandlerSpec = serverPacketHandlerSpec =
@SidedPacketHandler(channels = {"pocketDim" }, packetHandler = ServerPacketHandler.class), @SidedPacketHandler(channels = {"pocketDim" }, packetHandler = ServerPacketHandler.class),
channels={"DimDoorPackets"}, packetHandler = PacketHandler.class, connectionHandler=ConnectionHandler.class) channels={"DimDoorPackets"}, packetHandler = PacketHandler.class, connectionHandler=ConnectionHandler.class)
public class mod_pocketDim public class mod_pocketDim
{ {
@ -156,7 +156,7 @@ public class mod_pocketDim
public static Block blockRift; public static Block blockRift;
public static Block blockLimbo; public static Block blockLimbo;
public static Block dimDoor; public static Block dimDoor;
// public static Block dimRail; // public static Block dimRail;
public static Block blockDimWall; public static Block blockDimWall;
public static Block dimHatch; public static Block dimHatch;
@ -182,7 +182,7 @@ public class mod_pocketDim
public static HashMap<String,ArrayList<EntityItem>> limboSpawnInventory=new HashMap<String,ArrayList<EntityItem>>(); public static HashMap<String,ArrayList<EntityItem>> limboSpawnInventory=new HashMap<String,ArrayList<EntityItem>>();
public static ArrayList blocksImmuneToRift= new ArrayList(); public static ArrayList<Integer> blocksImmuneToRift= new ArrayList<Integer>();
@ -210,6 +210,8 @@ public class mod_pocketDim
public static boolean enableDimTrapDoor; public static boolean enableDimTrapDoor;
public static boolean enableStabilizedRiftSignature;
public static boolean enableDoorOpenGL; public static boolean enableDoorOpenGL;
public static boolean hardcoreLimbo; public static boolean hardcoreLimbo;
@ -495,10 +497,13 @@ public class mod_pocketDim
" y ", "yxy", " y ", 'x', Item.enderPearl, 'y', this.blockLimbo " y ", "yxy", " y ", 'x', Item.enderPearl, 'y', this.blockLimbo
}); });
if (this.enableStabilizedRiftSignature)
{
GameRegistry.addRecipe(new ItemStack(this.itemStabilizedLinkSignature,1), new Object[] GameRegistry.addRecipe(new ItemStack(this.itemStabilizedLinkSignature,1), new Object[]
{ {
" y ", "yxy", " y ", 'x', this.itemLinkSignature, 'y', this.itemStableFabric " y ", "yxy", " y ", 'x', this.itemLinkSignature, 'y', this.itemStableFabric
}); });
}
this.blocksImmuneToRift.add(this.blockDimWallID); this.blocksImmuneToRift.add(this.blockDimWallID);
this.blocksImmuneToRift.add(this.blockDimWallPermID); this.blocksImmuneToRift.add(this.blockDimWallPermID);
@ -519,7 +524,7 @@ public class mod_pocketDim
dungeonHelper.registerFlipBlocks(); dungeonHelper.registerFlipBlocks();
/** /**