aboutsummaryrefslogtreecommitdiff
path: root/src/Java/gtPlusPlus/api/thermal/energy/ThermalStorageAdv.java
blob: 47af7e79a6cb3ef09bbf6e058910234e51a975af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package gtPlusPlus.api.thermal.energy;

public class ThermalStorageAdv extends ThermalStorage {
	
	public ThermalStorageAdv(int arg0) {
		this(arg0, arg0, arg0);
	}

	public ThermalStorageAdv(int arg0, int arg1) {
		this(arg0, arg1, arg1);
	}

	public ThermalStorageAdv(int arg0, int arg1, int arg2) {
		super(arg0, arg1, arg2);
	}

	public int receiveEnergyNoLimit(int arg0, boolean arg1) {
		int arg2 = Math.min(super.capacity - super.thermal_energy, arg0);
		if (!arg1) {
			super.thermal_energy += arg2;
		}

		return arg2;
	}

	public int extractEnergyNoLimit(int arg0, boolean arg1) {
		int arg2 = Math.min(super.thermal_energy, arg0);
		if (!arg1) {
			super.thermal_energy -= arg2;
		}

		return arg2;
	}
}