diff --git a/changelog b/changelog index 10990a0bc..e4c661a8c 100644 --- a/changelog +++ b/changelog @@ -15,6 +15,12 @@ * The PWR can now be controlled via RoR * The RoR value reader can read core and hull heat as well as fuel depletion in percent * The RoR controller can set the control rod level in percent as well as jetison all loaded fuel +* Having 528, expensive or rampant mode enabled now displays a badge in the top left corner, showing that it is enabled + * Badges can be disabled with the `BADGES_HUD` value of `/ntmclient` + * The badge only shows up if the "true" configuration is used, 528 requires default settings, expensive requires the precision assembler config to not be modified and rampant needs most of the default settings enabled + * If all three modes are enabled, the "328 mode" badge also appears # Fixed -* Fixed proxy tiles that do not use electricity at all visually connecting to cables \ No newline at end of file +* Fixed proxy tiles that do not use electricity at all visually connecting to cables +* Fixed missing texture for canned horse slime +* Fixed incorrect ore dictionary key used by enriched naquadah watz pellet recipe \ No newline at end of file diff --git a/src/main/java/com/hbm/config/ClientConfig.java b/src/main/java/com/hbm/config/ClientConfig.java index cc0c85e7c..70971785e 100644 --- a/src/main/java/com/hbm/config/ClientConfig.java +++ b/src/main/java/com/hbm/config/ClientConfig.java @@ -38,6 +38,7 @@ public class ClientConfig extends RunningConfig { public static ConfigWrapper TOOL_HUD_INDICATOR_X = new ConfigWrapper(0); public static ConfigWrapper TOOL_HUD_INDICATOR_Y = new ConfigWrapper(0); public static ConfigWrapper SHOW_BLOCK_META_OVERLAY = new ConfigWrapper(false); + public static ConfigWrapper BADGES_HUD = new ConfigWrapper(true); private static void initDefaults() { configMap.put("GEIGER_OFFSET_HORIZONTAL", GEIGER_OFFSET_HORIZONTAL); @@ -65,6 +66,7 @@ public class ClientConfig extends RunningConfig { configMap.put("TOOL_HUD_INDICATOR_X", TOOL_HUD_INDICATOR_X); configMap.put("TOOL_HUD_INDICATOR_Y", TOOL_HUD_INDICATOR_Y); configMap.put("SHOW_BLOCK_META_OVERLAY", SHOW_BLOCK_META_OVERLAY); + configMap.put("BADGES_HUD", BADGES_HUD); } /** Initializes defaults, then reads the config file if it exists, then writes the config file. */ diff --git a/src/main/java/com/hbm/config/GeneralConfig.java b/src/main/java/com/hbm/config/GeneralConfig.java index bf32acb72..7c1def295 100644 --- a/src/main/java/com/hbm/config/GeneralConfig.java +++ b/src/main/java/com/hbm/config/GeneralConfig.java @@ -1,6 +1,8 @@ package com.hbm.config; import net.minecraftforge.common.config.Configuration; + +import com.hbm.inventory.recipes.PrecAssRecipes; import com.hbm.lib.RefStrings; public class GeneralConfig { @@ -42,6 +44,10 @@ public class GeneralConfig { public static int normalSoundChannels = 200; public static boolean enableExpensiveMode = false; + + public static boolean trueExp() { + return enableExpensiveMode && !PrecAssRecipes.INSTANCE.modified; + } public static boolean enable528 = false; public static boolean enable528ReasimBoilers = true; @@ -52,6 +58,11 @@ public class GeneralConfig { public static boolean enable528PressurizedRecipes = true; public static boolean enable528ExplosiveEnergistics = true; public static int coltanRate = 2; + + public static boolean true528() { + return enable528 && enable528ReasimBoilers && !enable528ColtanSpawn && enable528BosniaSimulator && + enable528NetherBurn && enable528PressurizedRecipes && enable528ExplosiveEnergistics && coltanRate <= 2; + } public static boolean enableLBSM = false; public static boolean enableLBSMFullSchrab = true; diff --git a/src/main/java/com/hbm/config/MobConfig.java b/src/main/java/com/hbm/config/MobConfig.java index 4828ae781..6b6ac3294 100644 --- a/src/main/java/com/hbm/config/MobConfig.java +++ b/src/main/java/com/hbm/config/MobConfig.java @@ -68,6 +68,10 @@ public class MobConfig { public static double rampantSmokeStackOverride = 0.4; public static double pollutionMult = 3; + public static boolean trueRam() { + return rampantMode && rampantNaturalScoutSpawn && rampantScoutSpawnThresh <= 0.1 && rampantExtendedTargetting && rampantDig && rampantGlyphidGuidance; + } + public static void loadFromConfig(Configuration config) { final String CATEGORY = CommonConfig.CATEGORY_MOBS; diff --git a/src/main/java/com/hbm/main/ModEventHandlerClient.java b/src/main/java/com/hbm/main/ModEventHandlerClient.java index e8cce4d36..8703f8177 100644 --- a/src/main/java/com/hbm/main/ModEventHandlerClient.java +++ b/src/main/java/com/hbm/main/ModEventHandlerClient.java @@ -830,8 +830,7 @@ public class ModEventHandlerClient { //@SubscribeEvent public void onRenderStorm(RenderHandEvent event) { - if(BlockAshes.ashes == 0) - return; + if(BlockAshes.ashes <= 0) return; GL11.glPushMatrix(); @@ -905,7 +904,7 @@ public class ModEventHandlerClient { Minecraft mc = Minecraft.getMinecraft(); ArmorNo9.updateWorldHook(mc.theWorld); - boolean supportsHighRenderDistance = FMLClientHandler.instance().hasOptifine() || Loader.isModLoaded("angelica"); + boolean supportsHighRenderDistance = FMLClientHandler.instance().hasOptifine() || Loader.isModLoaded(Compat.MOD_ANG); if(mc.gameSettings.renderDistanceChunks > 16 && GeneralConfig.enableRenderDistCheck && !supportsHighRenderDistance) { mc.gameSettings.renderDistanceChunks = 16; diff --git a/src/main/java/com/hbm/main/ModEventHandlerRenderer.java b/src/main/java/com/hbm/main/ModEventHandlerRenderer.java index 01dc5fe26..2ae70f6c5 100644 --- a/src/main/java/com/hbm/main/ModEventHandlerRenderer.java +++ b/src/main/java/com/hbm/main/ModEventHandlerRenderer.java @@ -13,6 +13,7 @@ import com.hbm.items.weapon.sedna.factory.XFactoryDrill; import com.hbm.packet.PermaSyncHandler; import com.hbm.render.item.weapon.sedna.ItemRenderWeaponBase; import com.hbm.render.model.ModelMan; +import com.hbm.render.util.RenderScreenOverlay; import com.hbm.util.Clock; import com.hbm.world.biome.BiomeGenCraterBase; import cpw.mods.fml.common.eventhandler.EventPriority; @@ -569,6 +570,11 @@ public class ModEventHandlerRenderer { @SubscribeEvent(priority = EventPriority.HIGHEST) public void onRenderHUD(RenderGameOverlayEvent.Pre event) { + + //TODO: using ALL doesn't work as anticipated - still hides in F1. need a different event for this + if(event.type == ElementType.ALL) { + if(ClientConfig.BADGES_HUD.get()) RenderScreenOverlay.renderBadges(event.resolution, Minecraft.getMinecraft().ingameGUI); + } if(event.type == ElementType.HOTBAR && (ModEventHandlerClient.shakeTimestamp + ModEventHandlerClient.shakeDuration - System.currentTimeMillis()) > 0 && ClientConfig.NUKE_HUD_SHAKE.get()) { double mult = (ModEventHandlerClient.shakeTimestamp + ModEventHandlerClient.shakeDuration - System.currentTimeMillis()) / (double) ModEventHandlerClient.shakeDuration * 2; diff --git a/src/main/java/com/hbm/render/util/RenderScreenOverlay.java b/src/main/java/com/hbm/render/util/RenderScreenOverlay.java index 1dce4ce5f..9a6eaa0c9 100644 --- a/src/main/java/com/hbm/render/util/RenderScreenOverlay.java +++ b/src/main/java/com/hbm/render/util/RenderScreenOverlay.java @@ -4,6 +4,8 @@ import org.lwjgl.opengl.GL11; import org.lwjgl.opengl.GL12; import com.hbm.config.ClientConfig; +import com.hbm.config.GeneralConfig; +import com.hbm.config.MobConfig; import com.hbm.extprop.HbmPlayerProps; import com.hbm.interfaces.Spaghetti; import com.hbm.interfaces.Untested; @@ -66,24 +68,13 @@ public class RenderScreenOverlay { gui.drawTexturedModalRect(posX, posY, 0, 0, 94, 18); gui.drawTexturedModalRect(posX + 1, posY + 1, 1, 19, bar, 16); - if(radiation >= 25) { - gui.drawTexturedModalRect(posX + length + 2, posY - 18, 36, 36, 18, 18); + if(radiation >= 25) gui.drawTexturedModalRect(posX + length + 2, posY - 18, 36, 36, 18, 18); + else if(radiation >= 10) gui.drawTexturedModalRect(posX + length + 2, posY - 18, 18, 36, 18, 18); + else if(radiation >= 2.5) gui.drawTexturedModalRect(posX + length + 2, posY - 18, 0, 36, 18, 18); - } else if(radiation >= 10) { - gui.drawTexturedModalRect(posX + length + 2, posY - 18, 18, 36, 18, 18); - - } else if(radiation >= 2.5) { - gui.drawTexturedModalRect(posX + length + 2, posY - 18, 0, 36, 18, 18); - - } - - if(radiation > 1000) { - Minecraft.getMinecraft().fontRenderer.drawString(">1000 RAD/s", posX, posY - 8, 0xFF0000); - } else if(radiation >= 1) { - Minecraft.getMinecraft().fontRenderer.drawString(((int) Math.round(radiation)) + " RAD/s", posX, posY - 8, 0xFF0000); - } else if(radiation > 0) { - Minecraft.getMinecraft().fontRenderer.drawString("<1 RAD/s", posX, posY - 8, 0xFF0000); - } + if(radiation > 1000) Minecraft.getMinecraft().fontRenderer.drawString(">1000 RAD/s", posX, posY - 8, 0xFF0000); + else if(radiation >= 1) Minecraft.getMinecraft().fontRenderer.drawString(((int) Math.round(radiation)) + " RAD/s", posX, posY - 8, 0xFF0000); + else if(radiation > 0) Minecraft.getMinecraft().fontRenderer.drawString("<1 RAD/s", posX, posY - 8, 0xFF0000); GL11.glEnable(GL11.GL_DEPTH_TEST); GL11.glDepthMask(true); @@ -92,7 +83,6 @@ public class RenderScreenOverlay { } private static int getScaled(double cur, double max, double scale) { - return (int) Math.min(cur / max * scale, scale); } @@ -185,22 +175,20 @@ public class RenderScreenOverlay { @Spaghetti ("like a fella once said, aint that a kick in the head") public static void renderDashBar(ScaledResolution resolution, Gui gui, HbmPlayerProps props) { - - + GL11.glPushMatrix(); GL11.glEnable(GL11.GL_BLEND); - GL11.glDisable(GL11.GL_DEPTH_TEST); - GL11.glDepthMask(false); - OpenGlHelper.glBlendFunc(770, 771, 1, 0); - GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); - GL11.glDisable(GL11.GL_ALPHA_TEST); + GL11.glDisable(GL11.GL_DEPTH_TEST); + GL11.glDepthMask(false); + OpenGlHelper.glBlendFunc(770, 771, 1, 0); + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + GL11.glDisable(GL11.GL_ALPHA_TEST); Minecraft mc = Minecraft.getMinecraft(); int width = 30; - - int posX = 16;//(int)(resolution.getScaledWidth()/2 - ((props.getDashCount()*(width+2))/2)); + int posX = 16; int posY = resolution.getScaledHeight() - 40 - 2; mc.renderEngine.bindTexture(misc); @@ -208,12 +196,7 @@ public class RenderScreenOverlay { gui.drawTexturedModalRect(posX-10, posY, 107, 18, 7, 10); int stamina = props.getStamina(); - int dashes = props.getDashCount(); - - //int count = props.getDashCount(); - //int x3count = count / 3; - int rows = dashes / 3; int finalColumns = dashes % 3; @@ -231,9 +214,8 @@ public class RenderScreenOverlay { barStatus = 3; } else if(staminaDiv == barID) { barStatus = 2; - barSize = (int)((float)(stamina % 30) * (width/30F) ); - if(barID == 0) - barStatus = 0; + barSize = (int) ((float) (stamina % 30) * (width/30F)); + if(barID == 0) barStatus = 0; } gui.drawTexturedModalRect(posX + (width+2)*x, posY - 12*y, 76, 18+(10*barStatus), barSize, 10); @@ -243,10 +225,9 @@ public class RenderScreenOverlay { if(fadeOut > 0 && staminaDiv-1 == barID) { GL11.glColor4f(1F, 1F, 1F, fadeOut); int bar = barID; - if(stamina % 30 >= 25) - bar++; - if(bar / 3 != y) - y++; + if(stamina % 30 >= 25) bar++; + if(bar / 3 != y) y++; + bar = bar % 3; gui.drawTexturedModalRect(posX + (width + 2) * bar, posY - 12 * y, 76, 58, width, 10); fadeOut -= 0.04F; @@ -255,45 +236,10 @@ public class RenderScreenOverlay { } } - /*for(int x = 0; x < props.getDashCount(); x++) { - int status = 3; - gui.drawTexturedModalRect(posX + (24)*x, posY, 76, 48, 24, 10); - int staminaDiv = stamina / 60; - if(staminaDiv > x) { - status = 1; - } else if(staminaDiv == x) { - width = (int)( (float)(stamina % 60) * (width/60F) ); - status = 2; - if(staminaDiv == 0) - status = 0; - } - /*if(staminaDiv-1 == x && (stamina % 60 < 20 && stamina % 60 != 0)) { - status = 4; - } - /*if(((staminaDiv == x && stamina % 60 >= 55) || (staminaDiv-1 == x && stamina % 60 <= 5)) && !(stamina == props.totalDashCount * 60)) { - status = 4; - } - gui.drawTexturedModalRect(posX + (24)*x, posY, 76, 18+(10*status), width, 10); - - if(staminaDiv == x && stamina % 60 >= 57) { - fadeOut = 1F; - } - if(fadeOut > 0 && staminaDiv-1 == x) { - GL11.glColor4f(1F, 1F, 1F, fadeOut); - int bar = x; - if(stamina % 60 >= 50) - bar++; - System.out.println(bar); - gui.drawTexturedModalRect(posX + 24*bar, posY, 76, 58, width, 10); - fadeOut -= 0.04F; - GL11.glColor4f(1F, 1F, 1F, 1F); - } - }*/ - GL11.glEnable(GL11.GL_DEPTH_TEST); - GL11.glDepthMask(true); - GL11.glPopMatrix(); + GL11.glDepthMask(true); + GL11.glPopMatrix(); mc.renderEngine.bindTexture(Gui.icons); } @@ -330,8 +276,6 @@ public class RenderScreenOverlay { public static void renderScope(ScaledResolution res, ResourceLocation tex) { GL11.glEnable(GL11.GL_BLEND); - //GL11.glDisable(GL11.GL_DEPTH_TEST); - //GL11.glDepthMask(false); OpenGlHelper.glBlendFunc(770, 771, 1, 0); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); GL11.glDisable(GL11.GL_ALPHA_TEST); @@ -367,4 +311,42 @@ public class RenderScreenOverlay { GL11.glEnable(GL11.GL_ALPHA_TEST); GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); } + + public static void renderBadges(ScaledResolution res, Gui gui) { + + GL11.glPushMatrix(); + + Minecraft.getMinecraft().entityRenderer.setupOverlayRendering(); + + GL11.glEnable(GL11.GL_BLEND); + GL11.glDisable(GL11.GL_DEPTH_TEST); + GL11.glDepthMask(false); + OpenGlHelper.glBlendFunc(770, 771, 1, 0); + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + GL11.glDisable(GL11.GL_ALPHA_TEST); + + Minecraft.getMinecraft().renderEngine.bindTexture(misc); + + int offsetX = 2; + int offsetY = 2; + int width = 26; + + boolean true528 = GeneralConfig.true528(); + boolean trueExp = GeneralConfig.trueExp(); + boolean trueRam = MobConfig.trueRam(); + boolean true328 = true528 && trueExp && trueRam; + + if(true528) { gui.drawTexturedModalRect(offsetX, offsetY, 0, 218, 24, 8); offsetX += width; } + if(trueExp) { gui.drawTexturedModalRect(offsetX, offsetY, 0, 226, 24, 8); offsetX += width; } + if(trueRam) { gui.drawTexturedModalRect(offsetX, offsetY, 0, 234, 24, 8); offsetX += width; } + if(true328) { gui.drawTexturedModalRect(offsetX, offsetY, 0, 242, 24, 8); offsetX += width; } + + Minecraft.getMinecraft().renderEngine.bindTexture(Gui.icons); + + GL11.glDepthMask(true); + GL11.glEnable(GL11.GL_DEPTH_TEST); + GL11.glEnable(GL11.GL_ALPHA_TEST); + GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); + GL11.glPopMatrix(); + } } diff --git a/src/main/resources/assets/hbm/textures/misc/overlay_misc.png b/src/main/resources/assets/hbm/textures/misc/overlay_misc.png index 4162b065c..24ddf9a5e 100644 Binary files a/src/main/resources/assets/hbm/textures/misc/overlay_misc.png and b/src/main/resources/assets/hbm/textures/misc/overlay_misc.png differ