Skip to content
This repository has been archived by the owner on Oct 20, 2019. It is now read-only.

Commit

Permalink
Limit MJ/t input in machines.
Browse files Browse the repository at this point in the history
  • Loading branch information
EXTER7 committed Dec 23, 2013
1 parent b51b677 commit 6eb59a3
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 2 deletions.
8 changes: 7 additions & 1 deletion src/exter/foundry/tileentity/TileEntityAlloyMixer.java
Original file line number Diff line number Diff line change
Expand Up @@ -561,6 +561,12 @@ public int GetTankCount()
@Override
public int GetMaxStoredEnergy()
{
return 600;
return 1500;
}

@Override
public int GetEnergyUse()
{
return REQUIRED_ENERGY;
}
}
5 changes: 4 additions & 1 deletion src/exter/foundry/tileentity/TileEntityFoundry.java
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@ protected final void AddContainerSlot(ContainerSlot cs)

public abstract int GetMaxStoredEnergy();

public abstract int GetEnergyUse();

public TileEntityFoundry()
{
Expand All @@ -152,7 +153,9 @@ public TileEntityFoundry()
initialized = false;
power_handler = new PowerHandler(this,PowerHandler.Type.MACHINE);

power_handler.configure(1, 100, 1, 200);
float mj_tick = (float)GetEnergyUse() / EnergyManager.RATIO_MJ + 1;

power_handler.configure(1, mj_tick, 1, mj_tick * 2);
power_handler.configurePowerPerdition(0, 0);

energy_manager = new EnergyManager(GetMaxStoredEnergy());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -579,4 +579,10 @@ public int getMaxSafeInput()
return 128;
}

@Override
public int GetEnergyUse()
{
return 4000;
}

}
7 changes: 7 additions & 0 deletions src/exter/foundry/tileentity/TileEntityMetalCaster.java
Original file line number Diff line number Diff line change
Expand Up @@ -554,4 +554,11 @@ public int GetMaxStoredEnergy()
{
return 40000;
}


@Override
public int GetEnergyUse()
{
return ENERGY_REQUIRED;
}
}
6 changes: 6 additions & 0 deletions src/exter/foundry/tileentity/TileEntityMetalInfuser.java
Original file line number Diff line number Diff line change
Expand Up @@ -537,4 +537,10 @@ public int GetMaxStoredEnergy()
{
return 3000;
}

@Override
public int GetEnergyUse()
{
return INFUSE_ENERGY_NEEDED + 600;
}
}

0 comments on commit 6eb59a3

Please sign in to comment.