Skip to content
Permalink
Browse files

Config options for antigrav block damage and star power.

  • Loading branch information...
tterrag1098 committed Aug 18, 2014
1 parent cc410dc commit 70db1c7143e3ad8ddec98ea559c1509a08611994
@@ -21,6 +21,7 @@
public static String sectionArmor = "Gravity Armor Config";
public static String sectionMisc = "Other Settings";
public static String sectionTooltips = "Tooltip Settings";
public static String sectionStars = "Star Settings";

public static float maxGravityXZ, maxGravityY, minGravity, range, strength;
public static boolean doGravityWell;
@@ -31,7 +32,11 @@
public static int fieldRange = 7;
public static double fieldUsageBase = 3;
public static boolean fieldIgnorePlayers = false;

public static boolean doBlocks = true;

public static double starOutputMult = 1.0;
public static double starStorageMult = 1.0;

public static boolean betterAchievements = true;

public static boolean forceEnableLootFix = false;
@@ -48,8 +53,6 @@ public static void init(File file)
config = new Configuration(file);

doConfiguration();

config.getCategory(sectionGravity.toLowerCase()).setRequiresWorldRestart(false).setRequiresMcRestart(false);
}

public static void doConfiguration()
@@ -89,6 +92,7 @@ public static void doConfiguration()
fieldRange = config.get(sectionArmor, "fieldRange", fieldRange, "The range of the anti-grav field on the gravity armor.").getInt();
fieldUsageBase = config.get(sectionArmor, "fieldUsageBase", fieldUsageBase, "Base value of the power usage for the field. This is used as an exponent. The forumula is roughly \'(entity height + entity width)^fieldUsageBase\'").getDouble(fieldUsageBase);
fieldIgnorePlayers = config.get(sectionArmor, "fieldIgnorePlayers", fieldIgnorePlayers, "Whether or not the anti-grav field ignores players.").getBoolean(fieldIgnorePlayers);
doBlocks = config.get(sectionArmor, "doBlocks", doBlocks, "Whether the anti-grav affects blocks").getBoolean();

// tooltips

@@ -98,6 +102,9 @@ public static void doConfiguration()
wailaKey1 = config.get(sectionTooltips, "wailaKey1", wailaKey1, "The first key that can be pressed to show WAILA extended tooltips (this will show as the key to press on the condensed tooltip).").getString().toUpperCase();
wailaKey2 = config.get(sectionTooltips, "wailaKey2", wailaKey2, "The second key that can be pressed to show WAILA extended tooltips. This is hidden and to be used for keys that have right/left versions. Can be the same as key1.").getString().toUpperCase();

starOutputMult = config.get(sectionStars, "starOutputMult", starOutputMult, "The multiplier to apply to the output rate of stars.").getDouble();
starStorageMult = config.get(sectionStars, "starStorageMult", starStorageMult, "The multiplier to apply to the storage amount of stars.").getDouble();

config.save();
/* @formatter:on */
}
@@ -323,17 +323,20 @@ public void doField(PlayerTickEvent event)

private void processBlocks(BlockCoord baseBlock, World world)
{
for (int bx = baseBlock.x - fieldRange; bx < baseBlock.x + fieldRange; bx++)
if (ConfigHandler.doBlocks)
{
for (int by = baseBlock.y - fieldRange; by < baseBlock.y + fieldRange; by++)
for (int bx = baseBlock.x - fieldRange; bx < baseBlock.x + fieldRange; bx++)
{
for (int bz = baseBlock.z - fieldRange; bz < baseBlock.z + fieldRange; bz++)
for (int by = baseBlock.y - fieldRange; by < baseBlock.y + fieldRange; by++)
{
BlockCoord b = new BlockCoord(bx, by, bz);
Block block = b.getBlock(world);
if (block instanceof BlockFalling)
for (int bz = baseBlock.z - fieldRange; bz < baseBlock.z + fieldRange; bz++)
{
createFallingSandChance(world, b, (BlockFalling) block);
BlockCoord b = new BlockCoord(bx, by, bz);
Block block = b.getBlock(world);
if (block instanceof BlockFalling)
{
createFallingSandChance(world, b, (BlockFalling) block);
}
}
}
}
@@ -1,6 +1,7 @@
package tterrag.supermassivetech.common.registry;

import static tterrag.supermassivetech.common.registry.Stars.StarTier.*;
import static tterrag.supermassivetech.common.config.ConfigHandler.*;

import java.util.ArrayList;
import java.util.HashMap;
@@ -292,16 +293,15 @@ public IStar getRandomStarFromType(StarTier tier)

public void registerDefaultStars()
{
// TODO balance
registerStarType(new StarType(PREFIX + "yellowDwarf", LOW, 0xd2df00, EnumChatFormatting.YELLOW, 100000000, 80, 600));
registerStarType(new StarType(PREFIX + "redDwarf", NORMAL, 0xcf3702, EnumChatFormatting.RED, 200000000, 40, 600));
registerStarType(new StarType(PREFIX + "redGiant", LOW, 0xcf0202, EnumChatFormatting.RED, 50000000, 40, 400));
registerStarType(new StarType(PREFIX + "blueGiant", NORMAL, 0x314eff, EnumChatFormatting.DARK_BLUE, 400000000, 20, 400));
registerStarType(new StarType(PREFIX + "supergiant", HIGH, 0xffea59, EnumChatFormatting.WHITE, 1000000000, 160, 1200));
registerStarType(new StarType(PREFIX + "brownDwarf", LOW, 0xb0752f, EnumChatFormatting.GRAY, 25000000, 20, 2400));
registerStarType(new StarType(PREFIX + "whiteDwarf", LOW, 0xf5f6c5, EnumChatFormatting.WHITE, 50000000, 160, 1200));
registerStarType(new StarType(PREFIX + "neutron", SPECIAL, 0x89fbff, EnumChatFormatting.AQUA, Integer.MAX_VALUE, 15, 1).setMassLevel(2));
registerStarType(new StarType(PREFIX + "pulsar", SPECIAL, 0xbd28cf, EnumChatFormatting.DARK_PURPLE, Integer.MAX_VALUE, 20, 1).setMassLevel(2));
registerStarType(new StarType(PREFIX + "yellowDwarf", LOW, 0xd2df00, EnumChatFormatting.YELLOW, (int) (100000000 * starStorageMult), (int) (80 * starOutputMult), 600));
registerStarType(new StarType(PREFIX + "redDwarf", NORMAL, 0xcf3702, EnumChatFormatting.RED, (int) (200000000 * starStorageMult), (int) (40 * starOutputMult), 600));
registerStarType(new StarType(PREFIX + "redGiant", LOW, 0xcf0202, EnumChatFormatting.RED, (int) (50000000 * starStorageMult), (int) (40 * starOutputMult), 400));
registerStarType(new StarType(PREFIX + "blueGiant", NORMAL, 0x314eff, EnumChatFormatting.DARK_BLUE, (int) (400000000 * starStorageMult), (int) (20 * starOutputMult), 400));
registerStarType(new StarType(PREFIX + "supergiant", HIGH, 0xffea59, EnumChatFormatting.WHITE, (int) (1000000000 * starStorageMult), (int) (160 * starOutputMult), 1200));
registerStarType(new StarType(PREFIX + "brownDwarf", LOW, 0xb0752f, EnumChatFormatting.GRAY, (int) (25000000 * starStorageMult), (int) (20 * starOutputMult), 2400));
registerStarType(new StarType(PREFIX + "whiteDwarf", LOW, 0xf5f6c5, EnumChatFormatting.WHITE, (int) (50000000 * starStorageMult), (int) (160 * starOutputMult), 1200));
registerStarType(new StarType(PREFIX + "neutron", SPECIAL, 0x89fbff, EnumChatFormatting.AQUA, Integer.MAX_VALUE, (int) (15 * starOutputMult), 1).setMassLevel(2));
registerStarType(new StarType(PREFIX + "pulsar", SPECIAL, 0xbd28cf, EnumChatFormatting.DARK_PURPLE, Integer.MAX_VALUE, (int) (20 * starOutputMult), 1).setMassLevel(2));

/*
* - pulsars are neutron stars, neutrons are formed INSTEAD of black

0 comments on commit 70db1c7

Please sign in to comment.
You can’t perform that action at this time.