Core launch capacity tweaks
This commit is contained in:
@@ -880,7 +880,7 @@ public class Block extends UnlockableContent{
|
||||
public ItemStack[] researchRequirements(){
|
||||
ItemStack[] out = new ItemStack[requirements.length];
|
||||
for(int i = 0; i < out.length; i++){
|
||||
int quantity = 60 + Mathf.round(Mathf.pow(requirements[i].amount, 1.1f) * 20 * researchCostMultiplier, 10);
|
||||
int quantity = 60 + Mathf.round(Mathf.pow(requirements[i].amount, 1.11f) * 20 * researchCostMultiplier, 10);
|
||||
|
||||
out[i] = new ItemStack(requirements[i].item, UI.roundAmount(quantity));
|
||||
}
|
||||
|
||||
@@ -56,6 +56,9 @@ public class LaunchPad extends Block{
|
||||
super.setBars();
|
||||
|
||||
bars.add("items", entity -> new Bar(() -> Core.bundle.format("bar.items", entity.items.total()), () -> Pal.items, () -> (float)entity.items.total() / itemCapacity));
|
||||
|
||||
//TODO is "bar.launchcooldown" the right terminology?
|
||||
bars.add("progress", (LaunchPadBuild build) -> new Bar(() -> Core.bundle.get("bar.launchcooldown"), () -> Pal.ammo, () -> Mathf.clamp(build.launchCounter / launchTime)));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -73,8 +76,8 @@ public class LaunchPad extends Block{
|
||||
|
||||
@Override
|
||||
public boolean shouldConsume(){
|
||||
//TODO do not consume after reload / disable?
|
||||
return true;
|
||||
//TODO add launch costs, maybe legacy version
|
||||
return launchCounter < launchTime && enabled;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user