mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
Merge remote-tracking branch 'upstream/master' into abel-abilities
@HbmMods please, every commit you make is a merge conflict
This commit is contained in:
commit
df1ee57563
16
changelog
16
changelog
@ -1,10 +1,12 @@
|
||||
## Changed
|
||||
* All compound plates can now also be made in the assembler
|
||||
* Opening crates when held is now disabled by default
|
||||
* Updated chinese localiation
|
||||
* Duds now have a radioactive AoE effect around them based on type
|
||||
* HPS is no longer tagged as radioactive and no longer requires hazardous materials tanks to store
|
||||
* Somehow, these meaningless tags triggered people exceptionally hard. Go annoy someone else.
|
||||
* Solderers and arc welders can now use overdrive upgrades
|
||||
* Do note that processing speed rises linearly, but power draw rises exponentially
|
||||
|
||||
## Fixed
|
||||
* Fixed all dud variants having the balefire explosion effect
|
||||
* Fixed demolition charges being able to explode multiple times when hitting entities
|
||||
* Condensers are no longer affected by post-impact effects, fixing an issue where HP condenser tanks would go into the negatives
|
||||
* Probably fixed particle accelerator recipe config not working
|
||||
* Fixed potential dupe bug involving many held inventories
|
||||
* Crates? Maybe?
|
||||
* Fixed conveyor placer not being usable on the conveyor sorter
|
||||
* Fixed crucible trying to autogen recipes for nonexistant nether thorium ore
|
||||
@ -1,6 +1,6 @@
|
||||
mod_version=1.0.27
|
||||
# Empty build number makes a release type
|
||||
mod_build_number=5335
|
||||
mod_build_number=5336
|
||||
|
||||
credits=HbMinecraft,\
|
||||
\ rodolphito (explosion algorithms),\
|
||||
|
||||
@ -7,6 +7,7 @@ import api.hbm.conveyor.IEnterableBlock;
|
||||
import com.hbm.blocks.IBlockMultiPass;
|
||||
import com.hbm.blocks.ITooltipProvider;
|
||||
import com.hbm.entity.item.EntityMovingItem;
|
||||
import com.hbm.items.tool.ItemConveyorWand;
|
||||
import com.hbm.lib.RefStrings;
|
||||
import com.hbm.main.MainRegistry;
|
||||
import com.hbm.module.ModulePatternMatcher;
|
||||
@ -61,7 +62,9 @@ public class CraneRouter extends BlockContainer implements IBlockMultiPass, IEnt
|
||||
|
||||
@Override
|
||||
public boolean onBlockActivated(World world, int x, int y, int z, EntityPlayer player, int side, float hitX, float hitY, float hitZ) {
|
||||
if(world.isRemote) {
|
||||
if(player.getHeldItem() != null && player.getHeldItem().getItem() instanceof ItemConveyorWand) {
|
||||
return false;
|
||||
} else if(world.isRemote) {
|
||||
return true;
|
||||
} else if(!player.isSneaking()) {
|
||||
FMLNetworkHandler.openGui(player, MainRegistry.instance, 0, world, x, y, z);
|
||||
|
||||
@ -17,7 +17,7 @@ public class ServerConfig extends RunningConfig {
|
||||
public static ConfigWrapper<Float> MINE_NUKE_DAMAGE = new ConfigWrapper(100F);
|
||||
public static ConfigWrapper<Float> MINE_NAVAL_DAMAGE = new ConfigWrapper(60F);
|
||||
public static ConfigWrapper<Boolean> TAINT_TRAILS = new ConfigWrapper(false);
|
||||
public static ConfigWrapper<Boolean> CRATE_ALLOW_OPEN_HELD = new ConfigWrapper(false);
|
||||
public static ConfigWrapper<Boolean> CRATE_OPEN_HELD = new ConfigWrapper(true);
|
||||
public static ConfigWrapper<Boolean> CRATE_KEEP_CONTENTS = new ConfigWrapper(true);
|
||||
public static ConfigWrapper<Integer> ITEM_HAZARD_DROP_TICKRATE = new ConfigWrapper(2);
|
||||
|
||||
@ -29,7 +29,7 @@ public class ServerConfig extends RunningConfig {
|
||||
configMap.put("MINE_NUKE_DAMAGE", MINE_NUKE_DAMAGE);
|
||||
configMap.put("MINE_NAVAL_DAMAGE", MINE_NAVAL_DAMAGE);
|
||||
configMap.put("TAINT_TRAILS", TAINT_TRAILS);
|
||||
configMap.put("CRATE_ALLOW_OPEN_HELD", CRATE_ALLOW_OPEN_HELD);
|
||||
configMap.put("CRATE_OPEN_HELD", CRATE_OPEN_HELD);
|
||||
configMap.put("CRATE_KEEP_CONTENTS", CRATE_KEEP_CONTENTS);
|
||||
configMap.put("ITEM_HAZARD_DROP_TICKRATE", ITEM_HAZARD_DROP_TICKRATE);
|
||||
}
|
||||
|
||||
@ -10,14 +10,11 @@ import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
public class ContainerCrateBase extends ContainerBase {
|
||||
|
||||
//just there so prev stuff doesnt break
|
||||
protected IInventory crate = tile;
|
||||
|
||||
public ContainerCrateBase(InventoryPlayer invPlayer, IInventory tedf) {
|
||||
super(invPlayer, tedf);
|
||||
tile.openInventory();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void playerInv(InventoryPlayer invPlayer, int playerInvX, int playerInvY, int playerHotbarY) {
|
||||
for(int i = 0; i < 3; i++) {
|
||||
@ -35,7 +32,7 @@ public class ContainerCrateBase extends ContainerBase {
|
||||
public ItemStack slotClick(int index, int button, int mode, EntityPlayer player) {
|
||||
// prevents the player from moving around the currently open box
|
||||
if(player.inventory.getStackInSlot(player.inventory.currentItem) != null &&
|
||||
player.inventory.getStackInSlot(player.inventory.currentItem).getItem() instanceof ItemBlockStorageCrate && !(this.crate instanceof TileEntity)) {
|
||||
player.inventory.getStackInSlot(player.inventory.currentItem).getItem() instanceof ItemBlockStorageCrate && !(this.tile instanceof TileEntity)) {
|
||||
if (mode == 2 && button == player.inventory.currentItem) {
|
||||
return null;
|
||||
}
|
||||
@ -51,7 +48,7 @@ public class ContainerCrateBase extends ContainerBase {
|
||||
super.onContainerClosed(p_75134_1_);
|
||||
tile.closeInventory();
|
||||
}
|
||||
|
||||
|
||||
public class SlotPlayerCrate extends SlotNonRetarded {
|
||||
|
||||
public SlotPlayerCrate(IInventory inventory, int id, int x, int y) {
|
||||
@ -66,7 +63,7 @@ public class ContainerCrateBase extends ContainerBase {
|
||||
public boolean canTakeStack(EntityPlayer player) {
|
||||
if(player.inventory.currentItem == this.getSlotIndex() && // If this slot is the current held slot.
|
||||
this.getStack() != null && this.getStack().getItem() instanceof ItemBlockStorageCrate && // If the slot contains a storage crate.
|
||||
player.openContainer instanceof ContainerCrateBase && !(ContainerCrateBase.this.crate instanceof TileEntity)) // If the player is currently inside a crate container.
|
||||
player.openContainer instanceof ContainerCrateBase && !(ContainerCrateBase.this.tile instanceof TileEntity)) // If the player is currently inside a crate container.
|
||||
return false;
|
||||
return super.canTakeStack(player);
|
||||
}
|
||||
|
||||
@ -39,11 +39,11 @@ public class ContainerDroneRequester extends ContainerCrateBase {
|
||||
|
||||
if(par2 < 9) return null; //ignore filters
|
||||
|
||||
if(par2 <= crate.getSizeInventory() - 1) {
|
||||
if(!this.mergeItemStack(var5, crate.getSizeInventory(), this.inventorySlots.size(), true)) {
|
||||
if(par2 <= tile.getSizeInventory() - 1) {
|
||||
if(!this.mergeItemStack(var5, tile.getSizeInventory(), this.inventorySlots.size(), true)) {
|
||||
return null;
|
||||
}
|
||||
} else if(!this.mergeItemStack(var5, 9, crate.getSizeInventory(), false)) {
|
||||
} else if(!this.mergeItemStack(var5, 9, tile.getSizeInventory(), false)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@ -75,25 +75,25 @@ public class ContainerDroneRequester extends ContainerCrateBase {
|
||||
|
||||
ItemStack ret = null;
|
||||
ItemStack held = player.inventory.getItemStack();
|
||||
TileEntityDroneRequester requester = (TileEntityDroneRequester) crate;
|
||||
|
||||
TileEntityDroneRequester requester = (TileEntityDroneRequester) tile;
|
||||
|
||||
if(slot.getHasStack())
|
||||
ret = slot.getStack().copy();
|
||||
|
||||
|
||||
if(button == 1 && mode == 0 && slot.getHasStack()) {
|
||||
requester.nextMode(index);
|
||||
return ret;
|
||||
|
||||
|
||||
} else {
|
||||
slot.putStack(held != null ? held.copy() : null);
|
||||
|
||||
|
||||
if(slot.getHasStack()) {
|
||||
slot.getStack().stackSize = 1;
|
||||
}
|
||||
|
||||
|
||||
slot.onSlotChanged();
|
||||
requester.matcher.initPatternStandard(requester.getWorldObj(), slot.getStack(), index);
|
||||
|
||||
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
@ -336,7 +336,7 @@ public class Fluids {
|
||||
BLOOD_HOT = new FluidType("BLOOD_HOT", 0xF22419, 3, 0, 0, EnumSymbol.NONE).addTraits(LIQUID, VISCOUS).setTemp(666); //it's funny because it's the satan number
|
||||
SYNGAS = new FluidType("SYNGAS", 0x131313, 1, 4, 2, EnumSymbol.NONE).addContainers(new CD_Gastank(0xFFFFFF, 0x131313)).addTraits(GASEOUS);
|
||||
OXYHYDROGEN = new FluidType("OXYHYDROGEN", 0x483FC1, 0, 4, 2, EnumSymbol.NONE).addTraits(GASEOUS);
|
||||
RADIOSOLVENT = new FluidType("RADIOSOLVENT", 0xA4D7DD, 3, 3, 0, EnumSymbol.NONE).addTraits(LIQUID, LEADCON, new FT_Corrosive(50), new FT_VentRadiation(0.01F));
|
||||
RADIOSOLVENT = new FluidType("RADIOSOLVENT", 0xA4D7DD, 3, 3, 0, EnumSymbol.NONE).addTraits(LIQUID, new FT_Corrosive(50));
|
||||
CHLORINE = new FluidType("CHLORINE", 0xBAB572, 3, 0, 0, EnumSymbol.OXIDIZER).addContainers(new CD_Gastank(0xBAB572, 0x887B34)).addTraits(GASEOUS, new FT_Corrosive(25));
|
||||
HEAVYOIL_VACUUM = new FluidType("HEAVYOIL_VACUUM", 0x131214, 2, 1, 0, EnumSymbol.NONE).addTraits(LIQUID, VISCOUS, P_OIL).addContainers(new CD_Canister(0x513F39));
|
||||
REFORMATE = new FluidType("REFORMATE", 0x835472, 2, 2, 0, EnumSymbol.NONE).addTraits(LIQUID, VISCOUS, P_FUEL).addContainers(new CD_Canister(0xD180D6));
|
||||
|
||||
@ -76,7 +76,7 @@ public class MatDistribution extends SerializableRecipe {
|
||||
registerOre(OreDictManager.COAL.ore(), MAT_CARBON, GEM.q(3), MAT_STONE, QUART.q(1));
|
||||
registerOre(OreDictManager.GOLD.ore(), MAT_GOLD, INGOT.q(2), MAT_LEAD, NUGGET.q(3), MAT_STONE, QUART.q(1));
|
||||
registerOre(OreDictManager.U.ore(), MAT_URANIUM, INGOT.q(2), MAT_LEAD, NUGGET.q(3), MAT_STONE, QUART.q(1));
|
||||
for(String ore : OreDictManager.TH232.all(MaterialShapes.ORE)) registerOre(ore, MAT_THORIUM, INGOT.q(2), MAT_URANIUM, NUGGET.q(3), MAT_STONE, QUART.q(1));
|
||||
for(String ore : OreDictManager.TH232.all(MaterialShapes.ONLY_ORE)) registerOre(ore, MAT_THORIUM, INGOT.q(2), MAT_URANIUM, NUGGET.q(3), MAT_STONE, QUART.q(1));
|
||||
registerOre(OreDictManager.CU.ore(), MAT_COPPER, INGOT.q(2), MAT_STONE, QUART.q(1));
|
||||
registerOre(OreDictManager.PB.ore(), MAT_LEAD, INGOT.q(2), MAT_GOLD, NUGGET.q(1), MAT_STONE, QUART.q(1));
|
||||
registerOre(OreDictManager.BE.ore(), MAT_BERYLLIUM, INGOT.q(2), MAT_STONE, QUART.q(1));
|
||||
|
||||
@ -28,21 +28,27 @@ public class ItemBlockStorageCrate extends ItemBlockBase implements IGUIProvider
|
||||
super(block);
|
||||
}
|
||||
|
||||
// IF WE PUT ROCKS IN THE SHAPE OF A RUNWAY GOD WILL GIVE US HIGH-FRUCTOSE CORN SYRUP
|
||||
@Override
|
||||
public int getMaxItemUseDuration(ItemStack stack) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemStack onItemRightClick(ItemStack stack, World world, EntityPlayer player) {
|
||||
if(!ServerConfig.CRATE_ALLOW_OPEN_HELD.get()) return stack;
|
||||
|
||||
if(!ServerConfig.CRATE_OPEN_HELD.get()) return stack;
|
||||
|
||||
Block block = Block.getBlockFromItem(player.getHeldItem().getItem());
|
||||
if(block == ModBlocks.mass_storage) return stack; // Genuinely can't figure out how to make this part work, so I'm just not gonna mess with it.
|
||||
|
||||
if(!world.isRemote && stack.stackSize == 1) {
|
||||
if (stack.stackTagCompound != null && stack.stackTagCompound.hasKey("lock")) {
|
||||
for (ItemStack item : player.inventory.mainInventory) {
|
||||
|
||||
if(stack.stackTagCompound != null && stack.stackTagCompound.hasKey("lock")) {
|
||||
for(ItemStack item : player.inventory.mainInventory) {
|
||||
|
||||
if(item == null) continue; // Skip if no item.
|
||||
if(!(item.getItem() instanceof ItemKey)) continue; // Skip if item isn't a key.
|
||||
if(item.stackTagCompound == null) continue; // Skip if there is no NBT (wouldn't open it anyway).
|
||||
if (item.stackTagCompound.getInteger("pins") == stack.stackTagCompound.getInteger("lock")) { // Check if pins are equal (if it can open it)
|
||||
if(item.stackTagCompound.getInteger("pins") == stack.stackTagCompound.getInteger("lock")) { // Check if pins are equal (if it can open it)
|
||||
TileEntityCrateBase.spawnSpiders(player, world, stack);
|
||||
player.openGui(MainRegistry.instance, 0, world, 0, 0, 0);
|
||||
break;
|
||||
@ -83,20 +89,16 @@ public class ItemBlockStorageCrate extends ItemBlockBase implements IGUIProvider
|
||||
}
|
||||
|
||||
public static class InventoryCrate extends ItemInventory {
|
||||
|
||||
public int heldIndex;
|
||||
|
||||
public InventoryCrate(EntityPlayer player, ItemStack crate) {
|
||||
|
||||
public InventoryCrate(EntityPlayer player, ItemStack crate) {
|
||||
this.player = player;
|
||||
this.target = crate;
|
||||
this.heldIndex = player.inventory.currentItem;
|
||||
|
||||
|
||||
this.slots = new ItemStack[this.getSizeInventory()];
|
||||
if(target.stackTagCompound == null) {
|
||||
target.stackTagCompound = new NBTTagCompound();
|
||||
}
|
||||
|
||||
|
||||
for(int i = 0; i < slots.length; i++)
|
||||
this.slots[i] = ItemStack.loadItemStackFromNBT(target.stackTagCompound.getCompoundTag("slot" + i));
|
||||
}
|
||||
@ -129,42 +131,35 @@ public class ItemBlockStorageCrate extends ItemBlockBase implements IGUIProvider
|
||||
}
|
||||
|
||||
@Override
|
||||
public void markDirty() { // I HATE THIS SO MUCH
|
||||
NBTTagCompound nbt = new NBTTagCompound();
|
||||
public void markDirty() { // You have been blessed by the unfuck
|
||||
|
||||
// Preserve existing NBT so we keep lock data and piders
|
||||
NBTTagCompound nbt = target.stackTagCompound != null ? target.stackTagCompound : new NBTTagCompound();
|
||||
int invSize = this.getSizeInventory();
|
||||
|
||||
for(int i = 0; i < invSize; i++) {
|
||||
|
||||
ItemStack stack = this.getStackInSlot(i);
|
||||
if(stack == null) continue;
|
||||
if(stack == null) {
|
||||
nbt.removeTag("slot" + i);
|
||||
continue;
|
||||
}
|
||||
|
||||
NBTTagCompound slot = new NBTTagCompound();
|
||||
stack.writeToNBT(slot);
|
||||
nbt.setTag("slot" + i, slot);
|
||||
}
|
||||
|
||||
/*if(target.stackTagCompound != null) { // yes it's a bit jank, but it wants to clear otherwise so...
|
||||
if(target.stackTagCompound.hasKey("lock")) nbt.setInteger("lock", target.stackTagCompound.getInteger("lock"));
|
||||
if(target.stackTagCompound.hasKey("lockMod")) nbt.setDouble("lockMod", target.stackTagCompound.getDouble("lockMod"));
|
||||
if(target.stackTagCompound.hasKey("spiders")) nbt.setBoolean("spiders", target.stackTagCompound.getBoolean("spiders")); // fuck you!!
|
||||
}*/
|
||||
|
||||
// i have completely given up
|
||||
if(player.getHeldItem() != null && player.getHeldItem().getItem() == this.target.getItem() && player.inventory.currentItem == this.heldIndex) {
|
||||
player.getHeldItem().setTagCompound(nbt);
|
||||
}
|
||||
target.setTagCompound(nbt);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void closeInventory() {
|
||||
player.worldObj.playSoundEffect(player.posX, player.posY, player.posZ, "hbm:block.crateClose", 1.0F, 0.8F);
|
||||
|
||||
/*
|
||||
* realistically, we only need one NBT size check (and we only *want* one because CompressedStreamTools is expensive) so we do that part only when closing
|
||||
*/
|
||||
if(player.getHeldItem() != null && player.getHeldItem().getItem() == this.target.getItem() && player.inventory.currentItem == this.heldIndex) {
|
||||
player.getHeldItem().setTagCompound(checkNBT(player.getHeldItem().getTagCompound()));
|
||||
}
|
||||
super.closeInventory();
|
||||
|
||||
// Check for 6kb item vomit
|
||||
target.setTagCompound(checkNBT(target.getTagCompound()));
|
||||
player.inventoryContainer.detectAndSendChanges();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -35,6 +35,11 @@ public class ItemToolBox extends Item implements IGUIProvider {
|
||||
this.setMaxStackSize(1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getMaxItemUseDuration(ItemStack stack) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
@ -285,9 +290,11 @@ public class ItemToolBox extends Item implements IGUIProvider {
|
||||
|
||||
@Override
|
||||
public void closeInventory() {
|
||||
this.target.getTagCompound().removeTag("isOpen");
|
||||
this.player.inventory.setInventorySlotContents(this.player.inventory.currentItem, this.target);
|
||||
super.closeInventory();
|
||||
|
||||
this.target.getTagCompound().removeTag("isOpen");
|
||||
this.target.getTagCompound().setInteger("rand", player.worldObj.rand.nextInt()); // a boolean changing isn't sufficient to detect the change
|
||||
player.inventoryContainer.detectAndSendChanges();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -3,7 +3,7 @@ package com.hbm.lib;
|
||||
public class RefStrings {
|
||||
public static final String MODID = "hbm";
|
||||
public static final String NAME = "Hbm's Nuclear Tech Mod";
|
||||
public static final String VERSION = "1.0.27 BETA (5335)";
|
||||
public static final String VERSION = "1.0.27 BETA (5336)";
|
||||
//HBM's Beta Naming Convention:
|
||||
//V T (X)
|
||||
//V -> next release version
|
||||
|
||||
@ -1,16 +1,47 @@
|
||||
package com.hbm.tileentity.bomb;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.function.BiConsumer;
|
||||
|
||||
import com.hbm.blocks.bomb.BlockCrashedBomb.EnumDudType;
|
||||
import com.hbm.util.ContaminationUtil;
|
||||
import com.hbm.util.EnumUtil;
|
||||
import com.hbm.util.ContaminationUtil.ContaminationType;
|
||||
import com.hbm.util.ContaminationUtil.HazardType;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.entity.EntityLivingBase;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.util.AxisAlignedBB;
|
||||
|
||||
public class TileEntityCrashedBomb extends TileEntity {
|
||||
|
||||
@Override
|
||||
public AxisAlignedBB getRenderBoundingBox() { return TileEntity.INFINITE_EXTENT_AABB; }
|
||||
public void updateEntity() {
|
||||
|
||||
if(!worldObj.isRemote) {
|
||||
|
||||
if(worldObj.getTotalWorldTime() % 2 == 0) {
|
||||
EnumDudType type = EnumUtil.grabEnumSafely(EnumDudType.class, this.getBlockMetadata());
|
||||
|
||||
if(type == type.BALEFIRE) affectEntities((entity, intensity) -> { ContaminationUtil.contaminate(entity, HazardType.RADIATION, ContaminationType.CREATIVE, 1F * intensity); }, 15D);
|
||||
if(type == type.NUKE) affectEntities((entity, intensity) -> { ContaminationUtil.contaminate(entity, HazardType.RADIATION, ContaminationType.CREATIVE, 0.25F * intensity); }, 10D);
|
||||
if(type == type.SALTED) affectEntities((entity, intensity) -> { ContaminationUtil.contaminate(entity, HazardType.RADIATION, ContaminationType.CREATIVE, 0.5F * intensity); }, 10D);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public double getMaxRenderDistanceSquared() { return 65536.0D; }
|
||||
public void affectEntities(BiConsumer<EntityLivingBase, Float> effect, double range) {
|
||||
List<EntityLivingBase> list = worldObj.getEntitiesWithinAABB(EntityLivingBase.class, AxisAlignedBB.getBoundingBox(xCoord + 0.5, yCoord + 0.5, zCoord + 0.5, xCoord + 0.5, yCoord + 0.5, zCoord + 0.5).expand(range, range, range));
|
||||
for(EntityLivingBase entity : list) {
|
||||
double dist = Math.sqrt(getDistanceFrom(entity.posX, entity.posY + entity.height / 2, entity.posZ));
|
||||
if(dist > range) continue;
|
||||
float intensity = (float) (1D - dist / range);
|
||||
effect.accept(entity, intensity);
|
||||
}
|
||||
}
|
||||
|
||||
@Override public AxisAlignedBB getRenderBoundingBox() { return TileEntity.INFINITE_EXTENT_AABB; }
|
||||
@Override @SideOnly(Side.CLIENT) public double getMaxRenderDistanceSquared() { return 65536.0D; }
|
||||
}
|
||||
|
||||
@ -18,6 +18,7 @@ import com.hbm.items.machine.ItemMachineUpgrade.UpgradeType;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.tileentity.*;
|
||||
import com.hbm.packet.toclient.AuxParticlePacketNT;
|
||||
import com.hbm.util.BobMathUtil;
|
||||
import com.hbm.util.I18nUtil;
|
||||
import com.hbm.util.fauxpointtwelve.BlockPos;
|
||||
import com.hbm.util.fauxpointtwelve.DirPos;
|
||||
@ -92,14 +93,16 @@ public class TileEntityMachineArcWelder extends TileEntityMachineBase implements
|
||||
upgradeManager.checkSlots(this, slots, 6, 7);
|
||||
int redLevel = upgradeManager.getLevel(UpgradeType.SPEED);
|
||||
int blueLevel = upgradeManager.getLevel(UpgradeType.POWER);
|
||||
int blackLevel = upgradeManager.getLevel(UpgradeType.OVERDRIVE);
|
||||
|
||||
if(recipe != null) {
|
||||
this.processTime = recipe.duration - (recipe.duration * redLevel / 6) + (recipe.duration * blueLevel / 3);
|
||||
this.consumption = recipe.consumption + (recipe.consumption * redLevel) - (recipe.consumption * blueLevel / 6);
|
||||
this.consumption *= Math.pow(2, blackLevel);
|
||||
intendedMaxPower = recipe.consumption * 20;
|
||||
|
||||
if(canProcess(recipe)) {
|
||||
this.progress++;
|
||||
this.progress += (1 + blackLevel);
|
||||
this.power -= this.consumption;
|
||||
|
||||
if(progress >= processTime) {
|
||||
@ -369,7 +372,7 @@ public class TileEntityMachineArcWelder extends TileEntityMachineBase implements
|
||||
|
||||
@Override
|
||||
public boolean canProvideInfo(UpgradeType type, int level, boolean extendedInfo) {
|
||||
return type == UpgradeType.SPEED || type == UpgradeType.POWER;
|
||||
return type == UpgradeType.SPEED || type == UpgradeType.POWER || type == UpgradeType.OVERDRIVE;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -383,6 +386,9 @@ public class TileEntityMachineArcWelder extends TileEntityMachineBase implements
|
||||
info.add(EnumChatFormatting.GREEN + I18nUtil.resolveKey(this.KEY_CONSUMPTION, "-" + (level * 100 / 6) + "%"));
|
||||
info.add(EnumChatFormatting.RED + I18nUtil.resolveKey(this.KEY_DELAY, "+" + (level * 100 / 3) + "%"));
|
||||
}
|
||||
if(type == UpgradeType.OVERDRIVE) {
|
||||
info.add((BobMathUtil.getBlink() ? EnumChatFormatting.RED : EnumChatFormatting.DARK_GRAY) + "YES");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -390,6 +396,7 @@ public class TileEntityMachineArcWelder extends TileEntityMachineBase implements
|
||||
HashMap<UpgradeType, Integer> upgrades = new HashMap<>();
|
||||
upgrades.put(UpgradeType.SPEED, 3);
|
||||
upgrades.put(UpgradeType.POWER, 3);
|
||||
upgrades.put(UpgradeType.OVERDRIVE, 3);
|
||||
return upgrades;
|
||||
}
|
||||
|
||||
|
||||
@ -22,6 +22,7 @@ import com.hbm.packet.toclient.AuxParticlePacketNT;
|
||||
import com.hbm.tileentity.IGUIProvider;
|
||||
import com.hbm.tileentity.IUpgradeInfoProvider;
|
||||
import com.hbm.tileentity.TileEntityMachineBase;
|
||||
import com.hbm.util.BobMathUtil;
|
||||
import com.hbm.util.I18nUtil;
|
||||
import com.hbm.util.fauxpointtwelve.DirPos;
|
||||
|
||||
@ -98,14 +99,16 @@ public class TileEntityMachineSolderingStation extends TileEntityMachineBase imp
|
||||
upgradeManager.checkSlots(this, slots, 9, 10);
|
||||
int redLevel = upgradeManager.getLevel(UpgradeType.SPEED);
|
||||
int blueLevel = upgradeManager.getLevel(UpgradeType.POWER);
|
||||
int blackLevel = upgradeManager.getLevel(UpgradeType.OVERDRIVE);
|
||||
|
||||
if(recipe != null) {
|
||||
this.processTime = recipe.duration - (recipe.duration * redLevel / 6) + (recipe.duration * blueLevel / 3);
|
||||
this.consumption = recipe.consumption + (recipe.consumption * redLevel) - (recipe.consumption * blueLevel / 6);
|
||||
this.consumption *= Math.pow(2, blackLevel);
|
||||
intendedMaxPower = recipe.consumption * 20;
|
||||
|
||||
if(canProcess(recipe)) {
|
||||
this.progress++;
|
||||
this.progress += (1 + blackLevel);
|
||||
this.power -= this.consumption;
|
||||
|
||||
if(progress >= processTime) {
|
||||
@ -360,7 +363,7 @@ public class TileEntityMachineSolderingStation extends TileEntityMachineBase imp
|
||||
|
||||
@Override
|
||||
public boolean canProvideInfo(UpgradeType type, int level, boolean extendedInfo) {
|
||||
return type == UpgradeType.SPEED || type == UpgradeType.POWER;
|
||||
return type == UpgradeType.SPEED || type == UpgradeType.POWER || type == UpgradeType.OVERDRIVE;
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -374,6 +377,9 @@ public class TileEntityMachineSolderingStation extends TileEntityMachineBase imp
|
||||
info.add(EnumChatFormatting.GREEN + I18nUtil.resolveKey(this.KEY_CONSUMPTION, "-" + (level * 100 / 6) + "%"));
|
||||
info.add(EnumChatFormatting.RED + I18nUtil.resolveKey(this.KEY_DELAY, "+" + (level * 100 / 3) + "%"));
|
||||
}
|
||||
if(type == UpgradeType.OVERDRIVE) {
|
||||
info.add((BobMathUtil.getBlink() ? EnumChatFormatting.RED : EnumChatFormatting.DARK_GRAY) + "YES");
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -381,6 +387,7 @@ public class TileEntityMachineSolderingStation extends TileEntityMachineBase imp
|
||||
HashMap<UpgradeType, Integer> upgrades = new HashMap<>();
|
||||
upgrades.put(UpgradeType.SPEED, 3);
|
||||
upgrades.put(UpgradeType.POWER, 3);
|
||||
upgrades.put(UpgradeType.OVERDRIVE, 3);
|
||||
return upgrades;
|
||||
}
|
||||
|
||||
|
||||
@ -6060,8 +6060,11 @@ item.ammo_standard.ct_mortar_charge.name=重型炸药包
|
||||
item.gun_charge_thrower.name=炸药投掷器
|
||||
tile.sandbags.name=沙袋
|
||||
tile.wood_barrier.name=木制围栏
|
||||
item.ammo_standard.nuke_balefire.name=Mini Nuke, Balefire Egg
|
||||
item.ammo_standard.nuke_balefire.name=迷你野火炸弹
|
||||
item.gun_minigun_dual.name=双联转管机枪
|
||||
tile.wood_structure.ceiling.name=木质顶棚
|
||||
tile.wood_structure.roof.name=木质顶板
|
||||
tile.wood_structure.roof.name=木质地板
|
||||
tile.wood_structure.scaffold.name=木质脚手架
|
||||
item.gun_amat.name=反器材步枪
|
||||
tile.fluid_pump.name=流量控制泵
|
||||
tile.vine_phosphor.large.name=磷藤蔓
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 3.9 KiB |
Loading…
x
Reference in New Issue
Block a user