Merge pull request #396 from Vaern/master

reacher funnies
This commit is contained in:
HbmMods 2022-01-21 08:49:06 +01:00 committed by GitHub
commit 503e5169bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 114 additions and 30 deletions

View File

@ -28,7 +28,7 @@ public class HazardRegistry {
//CS137 30a β 020.00Rad/s Spicy
//AU198 64h β 500.00Rad/s 2 much spice :(
//PB209 3h β 10,000.00Rad/s mama mia my face is melting off
//AT209 5h β+ like 2k or sth idk bruv
//AT209 5h β+ like 7.5k or sth idk bruv
//PO210 138d α 075.00Rad/s Spicy
//RA226 1,600a α 007.50Rad/s
//AC227 22a β 030.00Rad/s Spicy
@ -69,7 +69,7 @@ public class HazardRegistry {
public static final float cs137 = 20.0F;
public static final float au198 = 500.0F;
public static final float pb209 = 10000.0F;
public static final float at209 = 2000.0F;
public static final float at209 = 7500.0F;
public static final float po210 = 75.0F;
public static final float ra226 = 7.5F;
public static final float ac227 = 30.0F;
@ -314,7 +314,7 @@ public class HazardRegistry {
HazardSystem.register(billet_ra226be, makeData(RADIATION, rabe * billet));
HazardSystem.register(billet_pu238be, makeData(RADIATION, pube * billet));
registerRTGPellet(pellet_rtg, pu238 * rtg, 0, 4F);
registerRTGPellet(pellet_rtg, pu238 * rtg, 0, 3F);
registerRTGPellet(pellet_rtg_radium, ra226 * rtg, 0);
registerRTGPellet(pellet_rtg_weak, (pu238 + (u238 * 2)) * billet, 0);
registerRTGPellet(pellet_rtg_strontium, sr90 * rtg, 0);

View File

@ -3,8 +3,11 @@ package com.hbm.hazard.type;
import java.util.List;
import com.hbm.config.GeneralConfig;
import com.hbm.handler.ArmorModHandler;
import com.hbm.hazard.modifier.HazardModifier;
import com.hbm.items.ModItems;
import com.hbm.items.armor.ItemModGloves;
import com.hbm.util.ArmorUtil;
import com.hbm.util.I18nUtil;
import net.minecraft.entity.EntityLivingBase;
@ -19,12 +22,29 @@ public class HazardTypeHot extends HazardTypeBase {
public void onUpdate(EntityLivingBase target, float level, ItemStack stack) {
boolean reacher = false;
boolean gloves = false;
if(target instanceof EntityPlayer && !GeneralConfig.enable528)
reacher = ((EntityPlayer) target).inventory.hasItem(ModItems.reacher);
if(target instanceof EntityPlayer) {
ItemStack item = ((EntityPlayer) target).inventory.getCurrentItem();
if(item != null)
reacher = item.getItem() == ModItems.reacher;
ItemStack armor = target.getEquipmentInSlot(3);
if(armor != null) {
gloves = armor.getItem() instanceof ItemModGloves || ArmorUtil.checkForHazmat(target);
if(!gloves) {
ItemStack mod = ArmorModHandler.pryMods(armor)[ArmorModHandler.legs_only];
gloves = mod.getItem() instanceof ItemModGloves;
}
}
}
if(!reacher && !target.isWet() && level > 0)
target.setFire((int) Math.ceil(level));
if(!target.isWet() && level > 0) {
if(GeneralConfig.enable528 && ((!reacher || !gloves) || level > 3))
target.setFire((int) Math.ceil(level));
if(((!reacher || !gloves) && level > 2) || (!reacher && !gloves))
target.setFire((int) Math.ceil(level));
}
}
@Override

View File

@ -3,8 +3,10 @@ package com.hbm.hazard.type;
import java.util.List;
import com.hbm.config.GeneralConfig;
import com.hbm.handler.ArmorModHandler;
import com.hbm.hazard.modifier.HazardModifier;
import com.hbm.items.ModItems;
import com.hbm.items.armor.ItemModGloves;
import com.hbm.util.ContaminationUtil;
import com.hbm.util.I18nUtil;
import com.hbm.util.ContaminationUtil.ContaminationType;
@ -25,16 +27,22 @@ public class HazardTypeRadiation extends HazardTypeBase {
boolean reacher = false;
if(target instanceof EntityPlayer && !GeneralConfig.enable528)
reacher = ((EntityPlayer) target).inventory.hasItem(ModItems.reacher);
if(target instanceof EntityPlayer) {
ItemStack item = ((EntityPlayer) target).inventory.getCurrentItem();
if(item != null)
reacher = item.getItem() == ModItems.reacher;
}
level *= stack.stackSize;
if(level > 0) {
float rad = level / 20F;
if(reacher)
if(GeneralConfig.enable528 && reacher) {
rad = (float) (rad / Math.pow(7, 2)); //More realistic function for 528: x / distance^2
} else if(reacher) {
rad = (float) Math.sqrt(rad + 1F / ((rad + 2F) * (rad + 2F))) - 1F / (rad + 2F); //Reworked radiation function: sqrt(x+1/(x+2)^2)-1/(x+2)
}
ContaminationUtil.contaminate(target, HazardType.RADIATION, ContaminationType.CREATIVE, rad);
}

View File

@ -33,17 +33,17 @@ public class GUIMachineDiFurnaceRTG extends GuiInfoContainer {
public void drawScreen(int mouseX, int mouseY, float f) {
super.drawScreen(mouseX, mouseY, f);
String[] descText = I18nUtil.resolveKeyArray("desc.gui.rtgBFurnace.desc");
String[] heatText = I18nUtil.resolveKeyArray("desc.gui.rtgBFurnace.heat", bFurnace.getPower());
String[] heatText = I18nUtil.resolveKeyArray("desc.gui.rtg.heat", bFurnace.getPower());
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 15, guiTop + 36 + 16, 16, 16, guiLeft - 8, guiTop + 36 + 16, descText);
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 58, guiTop + 36, 18, 16, mouseX, mouseY, heatText);
List<ItemRTGPellet> pellets = ItemRTGPellet.pelletList;
String[] pelletText = new String[pellets.size() + 1];
pelletText[0] = I18nUtil.resolveKey("desc.gui.rtgBFurnace.pellets");
pelletText[0] = I18nUtil.resolveKey("desc.gui.rtg.pellets");
for(int i = 0; i < pellets.size(); i++) {
ItemRTGPellet pellet = pellets.get(i);
pelletText[i + 1] = I18nUtil.resolveKey("desc.gui.rtgBFurnace.pellet", I18nUtil.resolveKey(pellet.getUnlocalizedName() + ".name"), pellet.getHeat());
pelletText[i + 1] = I18nUtil.resolveKey("desc.gui.rtg.pelletHeat", I18nUtil.resolveKey(pellet.getUnlocalizedName() + ".name"), pellet.getHeat());
}
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 15, guiTop + 36, 16, 16, guiLeft - 8, guiTop + 36 + 16, pelletText);

View File

@ -1,10 +1,14 @@
package com.hbm.inventory.gui;
import java.util.List;
import org.lwjgl.opengl.GL11;
import com.hbm.inventory.container.ContainerMachineRTG;
import com.hbm.items.machine.ItemRTGPellet;
import com.hbm.lib.RefStrings;
import com.hbm.tileentity.machine.TileEntityMachineRTG;
import com.hbm.util.I18nUtil;
import net.minecraft.client.Minecraft;
import net.minecraft.client.resources.I18n;
@ -30,11 +34,19 @@ public class GUIMachineRTG extends GuiInfoContainer {
this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 152, guiTop + 69 - 52, 16, 52, rtg.power, rtg.powerMax);
String[] text = new String[] { "Accepted Pellets:",
" Regular Pellet (5 HE/t)",
" Weak Pellet (3 HE/t)",
" Polonium Pellet (25 HE/t)" };
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 36, 16, 16, guiLeft - 8, guiTop + 36 + 16, text);
String[] heatText = I18nUtil.resolveKeyArray("desc.gui.rtg.heat", rtg.heat);
this.drawCustomInfoStat(mouseX, mouseY, guiLeft + 134, guiTop + 17, 16, 52, mouseX, mouseY, heatText);
List<ItemRTGPellet> pellets = ItemRTGPellet.pelletList;
String[] pelletText = new String[pellets.size() + 1];
pelletText[0] = I18nUtil.resolveKey("desc.gui.rtg.pellets");
for(int i = 0; i < pellets.size(); i++) {
ItemRTGPellet pellet = pellets.get(i);
pelletText[i + 1] = I18nUtil.resolveKey("desc.gui.rtg.pelletPower", I18nUtil.resolveKey(pellet.getUnlocalizedName() + ".name"), pellet.getHeat() * 10);
}
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 36, 16, 16, guiLeft - 8, guiTop + 36 + 16, pelletText);
}
@Override

View File

@ -42,7 +42,7 @@ public class GUIReactorZirnox extends GuiInfoContainer {
String[] info = new String[] { "CO2 transfers heat from the core", "to the water. This will boil", "the water into steam.", "Water Consumption Rate:", "100 mB/t", "2000 mB/s" };
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 36, 16, 16, guiLeft - 8, guiTop + 36 + 16, info);
String[] info2 = new String[] { "Pressure can be reduced by", "reducing the amount of CO2", "in the reactor." };
String[] info2 = new String[] { "Pressure can be reduced by", "reducing the amount of CO2", "in the reactor. Warning:", "this will reduce cooling!" };
this.drawCustomInfoStat(mouseX, mouseY, guiLeft - 16, guiTop + 36 + 16, 16, 16, guiLeft - 8, guiTop + 36 + 16, info2);
if(zirnox.water.getFill() <= 0) {

View File

@ -2129,6 +2129,7 @@ public class ModItems {
public static Item attachment_mask;
public static Item attachment_mask_mono;
public static Item back_tesla;
public static Item rubber_gloves;
public static Item servo_set;
public static Item servo_set_desh;
public static Item pads_rubber;
@ -3073,7 +3074,7 @@ public class ModItems {
pellet_rtg = new ItemRTGPellet(10).setDecays(DepletedRTGMaterial.LEAD, (long) (RTGUtil.getLifespan(87.7F, HalfLifeType.MEDIUM, false) * 1.5)).setUnlocalizedName("pellet_rtg").setCreativeTab(MainRegistry.controlTab).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":pellet_rtg");
pellet_rtg_radium = new ItemRTGPellet(3).setDecays(DepletedRTGMaterial.LEAD, (long) (RTGUtil.getLifespan(16.0F, HalfLifeType.LONG, false) * 1.5)).setUnlocalizedName("pellet_rtg_radium").setCreativeTab(MainRegistry.controlTab).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":pellet_rtg_radium");
pellet_rtg_weak = new ItemRTGPellet(5).setDecays(DepletedRTGMaterial.LEAD, (long) (RTGUtil.getLifespan(1.0F, HalfLifeType.LONG, false) * 1.5)).setUnlocalizedName("pellet_rtg_weak").setCreativeTab(MainRegistry.controlTab).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":pellet_rtg_weak");
pellet_rtg_polonium = new ItemRTGPellet(35).setDecays(DepletedRTGMaterial.LEAD, (long) (RTGUtil.getLifespan(138.0F, HalfLifeType.SHORT, false) * 1.5)).setUnlocalizedName("pellet_rtg_polonium").setCreativeTab(MainRegistry.controlTab).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":pellet_rtg_polonium");
pellet_rtg_polonium = new ItemRTGPellet(50).setDecays(DepletedRTGMaterial.LEAD, (long) (RTGUtil.getLifespan(138.0F, HalfLifeType.SHORT, false) * 1.5)).setUnlocalizedName("pellet_rtg_polonium").setCreativeTab(MainRegistry.controlTab).setMaxStackSize(1).setTextureName(RefStrings.MODID + ":pellet_rtg_polonium");
pellet_rtg_actinium = new ItemRTGPellet(20).setDecays(DepletedRTGMaterial.LEAD, (long) (RTGUtil.getLifespan(21.7F, HalfLifeType.MEDIUM, false) * 1.5)).setUnlocalizedName("pellet_rtg_actinium").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":pellet_rtg_actinium");
pellet_rtg_strontium = new ItemRTGPellet(15).setDecays(DepletedRTGMaterial.ZIRCONIUM, (long) (RTGUtil.getLifespan(29.0F, HalfLifeType.MEDIUM, false) * 1.5)).setUnlocalizedName("pellet_rtg_strontium").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":pellet_rtg_strontium");
pellet_rtg_lead = new ItemRTGPellet(VersatileConfig.rtgDecay() ? 600 : 200).setDecays(DepletedRTGMaterial.BISMUTH, (long) (RTGUtil.getLifespan(0.3F, HalfLifeType.SHORT, false) * 1.5)).setUnlocalizedName("pellet_rtg_lead").setCreativeTab(MainRegistry.controlTab).setTextureName(RefStrings.MODID + ":pellet_rtg_lead");
@ -3308,6 +3309,7 @@ public class ModItems {
attachment_mask = new ItemModGasmask().setUnlocalizedName("attachment_mask").setTextureName(RefStrings.MODID + ":attachment_mask");
attachment_mask_mono = new ItemModGasmask().setUnlocalizedName("attachment_mask_mono").setTextureName(RefStrings.MODID + ":attachment_mask_mono");
back_tesla = new ItemModTesla().setUnlocalizedName("back_tesla").setTextureName(RefStrings.MODID + ":back_tesla");
rubber_gloves = new ItemModGloves().setUnlocalizedName("rubber_gloves").setTextureName(RefStrings.MODID + ":rubber_gloves");
servo_set = new ItemModServos().setUnlocalizedName("servo_set").setTextureName(RefStrings.MODID + ":servo_set");
servo_set_desh = new ItemModServos().setUnlocalizedName("servo_set_desh").setTextureName(RefStrings.MODID + ":servo_set_desh");
pads_rubber = new ItemModPads(0.5F).setUnlocalizedName("pads_rubber").setTextureName(RefStrings.MODID + ":pads_rubber");
@ -7462,6 +7464,7 @@ public class ModItems {
GameRegistry.registerItem(attachment_mask, attachment_mask.getUnlocalizedName());
GameRegistry.registerItem(attachment_mask_mono, attachment_mask_mono.getUnlocalizedName());
GameRegistry.registerItem(back_tesla, back_tesla.getUnlocalizedName());
GameRegistry.registerItem(rubber_gloves, rubber_gloves.getUnlocalizedName());
GameRegistry.registerItem(servo_set, servo_set.getUnlocalizedName());
GameRegistry.registerItem(servo_set_desh, servo_set_desh.getUnlocalizedName());
GameRegistry.registerItem(pads_rubber, pads_rubber.getUnlocalizedName());

View File

@ -0,0 +1,29 @@
package com.hbm.items.armor;
import java.util.List;
import com.hbm.handler.ArmorModHandler;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumChatFormatting;
public class ItemModGloves extends ItemArmorMod {
public ItemModGloves() {
super(ArmorModHandler.legs_only, false, true, false, false);
}
@Override
public void addInformation(ItemStack itemstack, EntityPlayer player, List list, boolean bool) {
list.add(EnumChatFormatting.DARK_PURPLE + "Protects against hot items; use with reacher");
list.add("");
super.addInformation(itemstack, player, list, bool);
}
@Override
public boolean isValidArmor(ItemStack stack, int armorType, Entity entity) {
return armorType == 1;
}
}

View File

@ -61,6 +61,7 @@ public class CraftingManager {
addRecipeAuto(new ItemStack(ModItems.big_sword, 1), new Object[] { "QIQ", "QIQ", "GSG", 'G', Items.gold_ingot, 'S', KEY_STICK, 'I', Items.iron_ingot, 'Q', Items.quartz});
addRecipeAuto(new ItemStack(ModItems.board_copper, 1), new Object[] { "TTT", "TTT", 'T', CU.plate() });
addRecipeAuto(new ItemStack(ModItems.rubber_gloves, 1), new Object[] { " ", "RRR", "RAR", 'R', ModItems.plate_polymer, 'A', ASBESTOS.ingot() });
addRecipeAuto(new ItemStack(ModItems.hazmat_cloth_red, 1), new Object[] { "C", "R", "C", 'C', ModItems.hazmat_cloth, 'R', REDSTONE.dust() });
addRecipeAuto(new ItemStack(ModItems.hazmat_cloth_grey, 1), new Object[] { " P ", "ICI", " L ", 'C', ModItems.hazmat_cloth_red, 'P', IRON.plate(), 'L', PB.plate(), 'I', ModItems.plate_polymer });
addRecipeAuto(new ItemStack(ModItems.asbestos_cloth, 8), new Object[] { "SCS", "CPC", "SCS", 'S', Items.string, 'P', BR.dust(), 'C', Blocks.wool });

View File

@ -0,0 +1,9 @@
package com.hbm.render.model;
public class ModelGloves {
//TODO: make the rubber gloves actually render when worn
public ModelGloves() {
}
}

View File

@ -476,10 +476,11 @@ death.attack.teleporter=%1$s was teleported into nothingness.
desc.item.rtgDecay=Decays to: %s
desc.item.rtgHeat=Power Level: %s
desc.item.wasteCooling=Cool in a Spent Fuel Pool Drum
desc.gui.rtgBFurnace.desc=Requires at least 15 heat to process$The more heat on top of that, the faster it runs$Heat going over maximum speed will have no effect$Gold-198 may decay into Mercury
desc.gui.rtgBFurnace.heat=§eCurrent heat level: %s
desc.gui.rtgBFurnace.pellets=Accepted Pellets:
desc.gui.rtgBFurnace.pellet=%s (%s heat)
desc.gui.rtgBFurnace.desc=Requires at least 15 heat to process$The more heat on top of that, the faster it runs$Heat going over maximum speed will have no effect$Short-lived pellets may decay
desc.gui.rtg.heat=§eCurrent heat level: %s
desc.gui.rtg.pellets=Accepted Pellets:
desc.gui.rtg.pelletHeat=%s (%s heat)
desc.gui.rtg.pelletPower=%s (%s HE/tick)
digamma.playerDigamma=Digamma exposure:
digamma.playerHealth=Digamma influence:
@ -2169,13 +2170,13 @@ item.pellet_rtg_americium.name=Americium-241 RTG Pellet
item.pellet_rtg_americium.desc=Rare and reliable, good old Americium!
item.pellet_rtg_berkelium.name=Berkelium RTG Pellet
item.pellet_rtg_berkelium.desc=
item.pellet_rtg_depleted.bismuth.name=Depleted Bismuth RTG Pellet
item.pellet_rtg_depleted.lead.name=Depleted Lead RTG Pellet
item.pellet_rtg_depleted.neptunium.name=Depleted Neptunium RTG Pellet
item.pellet_rtg_depleted.mercury.name=Depleted Mercury RTG Pellet
item.pellet_rtg_depleted.zirconium.name=Depleted Zirconium RTG Pellet
item.pellet_rtg_depleted.bismuth.name=Decayed Bismuth RTG Pellet
item.pellet_rtg_depleted.lead.name=Decayed Lead RTG Pellet
item.pellet_rtg_depleted.neptunium.name=Decayed Neptunium RTG Pellet
item.pellet_rtg_depleted.mercury.name=Decayed Mercury RTG Pellet
item.pellet_rtg_depleted.zirconium.name=Decayed Zirconium RTG Pellet
item.pellet_rtg_lead.name=Lead-209 RTG Pellet
item.pellet_rtg_lead.desc=Exposure will result in imminient death.
item.pellet_rtg_lead.desc=Exposure will result in immediate death.
item.pellet_rtg_gold.name=Gold-198 RTG Pellet
item.pellet_rtg_gold.desc=Made from a rare, highly unstable gold isotope.
item.pellet_rtg_polonium.name=Polonium-210 RTG Pellet
@ -2613,6 +2614,7 @@ item.rod_zirnox_u235_fuel_depleted.name= Depleted ZIRNOX Uranium-235 Fuel Rod
item.rod_zirnox_les_fuel_depleted.name= Depleted ZIRNOX LES Fuel Rod
item.rotor_steel.name=Large Steel Rotor
item.rtg_unit.name=RTG Unit
item.rubber_gloves.name=Thick Rubber Gloves
item.rune_blank.name=Blank Catalyst Matrix
item.rune_dagaz.name=Balanced Catalyst Matrix
item.rune_hagalaz.name=Rough Catalyst Matrix

Binary file not shown.

After

Width:  |  Height:  |  Size: 422 B