aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gregtech/common/power/SteamPower.java
blob: 3e394e10c5edaeeebc39ca9f6cb99742077f4234 (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
35
36
37
38
39
40
41
42
43
44
45
46
package gregtech.common.power;

import gregtech.api.util.GT_Utility;

public class SteamPower extends Power {
    private final double euPerTickOverride;
    private final double durationOverride;
    private final String[] STEAM_TIER_NAMES = {"Bronze", "Steel"};

    public SteamPower(byte tier, double euPerTickMultiplier, double durationMultiplier) {
        super(tier);
        this.euPerTickOverride = euPerTickMultiplier;
        this.durationOverride = durationMultiplier;
    }

    @Override
    public String getTierString() {
        return STEAM_TIER_NAMES[tier - 1];
    }

    @Override
    public void computePowerUsageAndDuration(int euPerTick, int duration) {
        recipeEuPerTick = (int) (euPerTick * euPerTickOverride);
        recipeDuration = (int) (duration * durationOverride);
    }

    @Override
    public String getTotalPowerString() {
        return GT_Utility.formatNumbers((long) recipeDuration * recipeEuPerTick) + " Steam";
    }

    @Override
    public String getPowerUsageString() {
        return GT_Utility.formatNumbers(20L * recipeEuPerTick) + " L/s  Steam";
    }

    @Override
    public String getVoltageString() {
        return null;
    }

    @Override
    public String getAmperageString() {
        return null;
    }
}