Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -391,20 +391,22 @@ protected Tuple<Integer, Integer> getClickedEntryIndex(int xx, int yy, int mouse
//Iterate over all entries
for(T entry : entries)
{
//Skip non-selectable (clickable) entries
if(!display.isSelectable(entry))
continue;
//Measure element height for layout for all entries
int elementHeight = display.displayElement(entry, entryMaxWidth, fontRenderer, true);

//Check if the mouse is over the current entry
if(IIMath.isPointInRectangle(xx+(currentColumn*entryMaxWidth), yy+drawOffset,
xx+(currentColumn*entryMaxWidth)+entryMaxWidth,
yy+drawOffset+display.displayElement(entry, entryMaxWidth, fontRenderer, true),
yy+drawOffset+elementHeight,
mouseX, mouseY))
return new Tuple<>(
this.entries.indexOf(entry),
yy+drawOffset
);
{
//Only return selectable entries
if(display.isSelectable(entry))
return new Tuple<>(
this.entries.indexOf(entry),
yy+drawOffset
);
}

currentColumn++;
//There can be multiple entries in one row
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,9 @@ private void drawZoomStepsBar(int width, int height, int resMin, EntityPlayer pl
draw.drawTexRect(0, 0, 8/256f*resMin, 7/256f*resMin, 88/256f, 98/256f, 103/256f, 110/256f);
draw.finish();

//Draw magnification amount
ClientUtils.font().drawString(1/steps[curStep]+"x", (int)(resMin*1.385f), (int)(100/256f*resMin), 0xffffff);
//Draw magnification amount (rounded to nearest whole number)
int magnRounded = Math.round(1f/steps[curStep]);
ClientUtils.font().drawString(magnRounded+"x", (int)(resMin*1.385f), (int)(100/256f*resMin), 0xffffff);

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,9 @@ public void renderPage(GuiManual gui, int x, int y, int mx, int my)

GlStateManager.enableBlend();

//sets tooltip to null to ensure it's cleared if not moused over
this.tooltipWrapper.tooltip = null;

GlStateManager.pushMatrix();
GlStateManager.color(1, 1, 1, 0.25f);
PageTraits hoveredTrait = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,8 @@ public static void registerRecipes(Register<IRecipe> event)

LighterFuelHandler.addFuel(FluidRegistry.getFluid("creosote"), 100);
LighterFuelHandler.addFuel(FluidRegistry.getFluid("ethanol"), 20);
LighterFuelHandler.addFuel(FluidRegistry.getFluid("diesel"), 10);
LighterFuelHandler.addFuel(FluidRegistry.getFluid("biodiesel"), 10);

MachinegunCoolantHandler.addCoolant(FluidRegistry.WATER, 1);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ private void drawTimeInfo(int x, int y)
.finish();

//Draw time text
String timeStr = GuiScreen.isShiftKeyDown()?"1 t": recipe.getTotalProcessTime()+" t";
String timeStr = GuiScreen.isShiftKeyDown()?String.format("%.2f d", recipe.getTotalProcessTime()/24000f): recipe.getTotalProcessTime()+" t";
ClientUtils.mc().fontRenderer.drawString(timeStr, x+14, y+3, DecoColors.H1.getPackedRGB());
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -638,10 +638,10 @@ public static void addBulletPressRecipes()
new IngredientStack("plateSteel", 4),
PressMolds.NAVAL_MINE, 4800);
addMetalPressBullet(Casing.TRIPMINE,
new IngredientStack("plateBrass", 2),
new IngredientStack("plateSteel", 2),
PressMolds.TRIPMINE, 3600);
addMetalPressBullet(Casing.TELLERMINE,
new IngredientStack("plateBrass", 2),
new IngredientStack("plateSteel", 2),
PressMolds.TELLERMINE, 3600);

MetalPressRecipe.removeRecipes(new ItemStack(IEContent.itemBullet, 2, 0));
Expand Down Expand Up @@ -1177,7 +1177,7 @@ public static void addUpgradeRecipes()
.withCost(
new IngredientStack(IIContent.itemMotorGear.getStack(MotorGear.STEEL)),
new IngredientStack(new ItemStack(IEContent.itemMaterial, 1, 8)),
new IngredientStack("stickSteel", 2)
new IngredientStack("stickSteel", 1)
)
.withRequiredProgress(32000);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import javax.annotation.Nullable;
import java.util.List;
import java.util.Map;
import java.util.UUID;

/**
* @author Pabilo8 (pabilo@iiteam.net)
Expand All @@ -35,6 +36,9 @@
@IIItemProperties(category = IICategory.WARFARE)
public class ItemIILightEngineerBoots extends ItemIILightEngineerArmorBase implements IElectricEquipment
{
// Unique UUIDs for attribute modifiers to avoid access conflicts
private static final UUID RACKETS_MODIFIER_UUID = UUID.fromString("C8E5F2A1-7D9C-4F6A-8E3B-A4C7D2E8F9B1");

public ItemIILightEngineerBoots()
{
super(EntityEquipmentSlot.FEET, "LIGHT_ENGINEER_BOOTS");
Expand Down Expand Up @@ -69,10 +73,9 @@ public Multimap<String, AttributeModifier> getAttributeModifiers(@Nonnull Entity

if(equipmentSlot==this.armorType)
{
if(ItemNBTHelper.hasKey(stack, "flippers"))
multimap.put(EntityLivingBase.SWIM_SPEED.getName(), new AttributeModifier(ARMOR_MODIFIERS[equipmentSlot.getIndex()], "Flippers", 4, 2));
if(ItemNBTHelper.hasKey(stack, "rackets"))
multimap.put(SharedMonsterAttributes.MOVEMENT_SPEED.getName(), new AttributeModifier(ARMOR_MODIFIERS[equipmentSlot.getIndex()], "Rackets", 0.5, 1));
multimap.put(SharedMonsterAttributes.MOVEMENT_SPEED.getName(), new AttributeModifier(RACKETS_MODIFIER_UUID, "Rackets", 0.5, 1));
//if(getUpgrades(stack).hasKey(""))
//multimap.put(SharedMonsterAttributes.MOVEMENT_SPEED.getName(), new AttributeModifier(ARMOR_MODIFIERS[equipmentSlot.getIndex()], "Power Armor Movement Speed Debuff", -.03, 1));
//multimap.put(SharedMonsterAttributes.MOVEMENT_SPEED.getName(), new AttributeModifier(ARMOR_MODIFIERS[equipmentSlot.getIndex()], "Power Armor Movement Speed Debuff", -.03, 1));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,10 @@ public EnumActionResult onItemUseFirst(EntityPlayer player, World world, BlockPo
continue;
if(mb.createStructure(world, pos, side, player))
{
//Consume energy from the electric hammer when forming a multiblock
if(stack.hasCapability(CapabilityEnergy.ENERGY, null) && !IIItemUtils.canConstructFreeOfCharge(player))
stack.getCapability(CapabilityEnergy.ENERGY, null).extractEnergy(Tools.electricHammerEnergyPerUseConstruction, false);

if(player instanceof EntityPlayerMP)
IEAdvancements.TRIGGER_MULTIBLOCK.trigger((EntityPlayerMP)player, mb, stack);
return doAction(player, hand);
Expand Down Expand Up @@ -212,14 +216,17 @@ public EnumActionResult onItemUse(EntityPlayer player, World world, BlockPos pos
if(!(te instanceof IConstructionRequiringDevice))
return EnumActionResult.PASS;
IConstructionRequiringDevice mb = ((IConstructionRequiringDevice)te).master();
int energy = IIItemUtils.canConstructFreeOfCharge(player)?999999: cap.extractEnergy(Tools.electricHammerEnergyPerUseConstruction, false);

if(mb!=null&&!mb.isConstructionFinished()&&energy > 0)
if(mb!=null&&!mb.isConstructionFinished())
{
if(!IIItemUtils.canConstructFreeOfCharge(player))
cap.extractEnergy(Tools.electricHammerEnergyPerUseConstruction, false);
mb.progressConstruction(energy);
world.playSound(null, pos, IISounds.constructionHammer, SoundCategory.PLAYERS, 0.5f, 1);
int energy = IIItemUtils.canConstructFreeOfCharge(player)?999999: cap.extractEnergy(Tools.electricHammerEnergyPerUseConstruction, false);
if(energy > 0)
{
if(!IIItemUtils.canConstructFreeOfCharge(player))
cap.extractEnergy(Tools.electricHammerEnergyPerUseConstruction, false);
mb.progressConstruction(energy);
world.playSound(null, pos, IISounds.constructionHammer, SoundCategory.PLAYERS, 0.5f, 1);
}
}

return EnumActionResult.PASS;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,15 @@ public EnumActionResult onItemUseFirst(EntityPlayer player, World world, BlockPo
if(te==null||te.getCurrentUpgrade()==null)
return EnumActionResult.PASS;

ItemStack heldItem = player.getHeldItem(hand);
//check if the powered wrench has charge
if(!IIItemUtils.canUpgradeFreeOfCharge(player)&&!hasEnoughEnergy(heldItem))
return EnumActionResult.PASS;

if(te.addUpgradeInstallProgress(IIItemUtils.canUpgradeFreeOfCharge(player)?999999: Tools.electricWrenchUpgradeProgress))
{
world.playSound(null, pos, IISounds.constructionElectricWrench, SoundCategory.PLAYERS, 0.5f, 1);
damageWrench(player.getHeldItem(hand), player);
damageWrench(heldItem, player);
}
return EnumActionResult.SUCCESS;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import net.minecraft.world.biome.Biome;
import pl.pabilo8.immersiveintelligence.ImmersiveIntelligence;

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

Expand Down Expand Up @@ -47,6 +48,6 @@ public float getSpawningChance()
@Override
public List<SpawnListEntry> getSpawnableList(EnumCreatureType creatureType)
{
return Collections.emptyList();
return new ArrayList<>();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ Just like an [engineer follows a blueprint during work](blueprints), the **Preci
|[crafting]{source:"assembly_scheme"}| <br>
The [scheme] can be installed through the user interface by placing it in the middle slot.
# tools
Depending on the scheme the manufacturing process requires different tools, these tools ware down over time and will need replacement.
Depending on the scheme the manufacturing process requires different tools, these tools wear down over time and will need replacement.
|[crafting]{source:"precision_tools"}|
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
Logistics
Logi, bmats ASAP!
# intro
Logistics is a unique branch of engineering focused on [storing, delivering and managing] the [transfer of goods.] A good logistic system consists of a warehouse for storage and nearby production for quick manufacturing.
Logistics is a unique branch of engineering focused on [storing, delivering and managing] the [transfer of goods.] A good logistics system consists of a warehouse for storage and nearby production for quick manufacturing.
With the newest electronic technology, and some old [rotary](rotary_power.md) [powered machines](skycrate_system.md), creating a good delivery system has never been easier.
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ The Packer is a machine used to batch load items into containers, such as crates
To form it, use a [hammer](introduction#introductionHammer) on the [vertical conveyor].
# details
By default, the packer offers 54 input storage slots for items. They can be inserted through a single conveyor on the rear of the machine.
To operation the machine, it requires electricity and a container to be provided on the 3 block long conveyor.
For packing orders, the machine uses a [Task System](task_system.md). Tasks can be added, removed and tweaked through its interface, or the [data system](data_main.md).
To operate the machine, it requires electricity and a container to be provided on the 3 block long conveyor.
For packing the orders, the machine uses a [Task System](task_system.md). Tasks can be added, removed and tweaked through its interface using the [data system](data_main.md).
# details_2
The ["Pack"] task is used to load items into the provided container. By default, the packer can take any item (the * symbol) and the maximum possible amount of it.
This can be changed by selecting a different mode. You can choose between taking in a select number of inventory slots, or number of items. The amount can be specified in the interface, in the input field below.
Expand Down
Loading