Fixed casing eject effects

This commit is contained in:
Anuken
2020-10-31 20:19:24 -04:00
parent b5e2812d0b
commit 54ba4b31a1
7 changed files with 103 additions and 67 deletions

View File

@@ -617,7 +617,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.09f) * 20 * researchCostMultiplier, 10);
out[i] = new ItemStack(requirements[i].item, UI.roundAmount(quantity));
}

View File

@@ -316,7 +316,7 @@ public abstract class Turret extends ReloadTurret{
if(entry.amount <= 0) ammo.pop();
totalAmmo -= ammoPerShot;
totalAmmo = Math.max(totalAmmo, 0);
Time.run(reloadTime / 2f, this::ejectEffects);
ejectEffects();
return entry.type();
}
@@ -408,7 +408,10 @@ public abstract class Turret extends ReloadTurret{
protected void ejectEffects(){
if(!isValid()) return;
ammoUseEffect.at(x - Angles.trnsx(rotation, ammoEjectBack), y - Angles.trnsy(rotation, ammoEjectBack), rotation);
//alternate sides when using a double turret
float scl = (shots == 2 && alternate && shotCounter % 2 == 1 ? -1f : 1f);
ammoUseEffect.at(x - Angles.trnsx(rotation, ammoEjectBack), y - Angles.trnsy(rotation, ammoEjectBack), rotation * scl);
}
@Override