Misc minor fixes

This commit is contained in:
Anuken
2022-05-28 07:48:43 -04:00
parent 0e4903910b
commit 55a219fc03
4 changed files with 11 additions and 5 deletions

View File

@@ -253,7 +253,7 @@ public class Weapon implements Cloneable{
float lastReload = mount.reload;
mount.reload = Math.max(mount.reload - Time.delta * unit.reloadMultiplier, 0);
mount.recoil = Mathf.approachDelta(mount.recoil, 0, unit.reloadMultiplier / recoilTime);
mount.warmup = Mathf.lerpDelta(mount.warmup, can && mount.shoot ? 1f : 0f, shootWarmupSpeed);
mount.warmup = Mathf.lerpDelta(mount.warmup, (can && mount.shoot) || (continuous && mount.bullet != null) ? 1f : 0f, shootWarmupSpeed);
mount.smoothReload = Mathf.lerpDelta(mount.smoothReload, mount.reload / reload, smoothReloadSpeed);
//rotate if applicable
@@ -328,6 +328,12 @@ public class Weapon implements Cloneable{
if(mount.sound == null) mount.sound = new SoundLoop(shootSound, 1f);
mount.sound.update(bulletX, bulletY, true);
}
//TODO: how do continuous flame bullets work here? a new system is needed
if(mount.bullet.type.optimalLifeFract > 0){
// mount.bullet.time = mount.bullet.lifetime * mount.bullet.type.optimalLifeFract * mount.warmup;
// mount.bullet.keepAlive = true;
}
}
}else{
//heat decreases when not firing

View File

@@ -538,7 +538,7 @@ public class Block extends UnlockableContent implements Senseable{
}
public void addLiquidBar(Liquid liq){
addBar("liquid-" + liq.name, entity -> !liq.unlocked() ? null : new Bar(
addBar("liquid-" + liq.name, entity -> !liq.unlockedNow() ? null : new Bar(
() -> liq.localizedName,
liq::barColor,
() -> entity.liquids.get(liq) / liquidCapacity