mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-01-24 05:21:15 -08:00
Add Firerate Stat to Lustre and sublimate
This commit is contained in:
parent
9150360f74
commit
144793592b
4 changed files with 5 additions and 8 deletions
|
|
@ -427,7 +427,7 @@ public class BulletType extends Content implements Cloneable{
|
|||
return Math.max(Mathf.zero(drag) ? speed * lifetime : speed * (1f - Mathf.pow(1f - drag, lifetime)) / drag, maxRange);
|
||||
}
|
||||
|
||||
/** @return continuous damage in damage/sec, or -1 if not continuous. */
|
||||
/** @return continuous damage interval per second, or -1 if not continuous. */
|
||||
public float continuousDamage(){
|
||||
return -1f;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ public class ContinuousBulletType extends BulletType{
|
|||
@Override
|
||||
public float continuousDamage(){
|
||||
if(!continuous) return -1f;
|
||||
return damage / damageInterval * 60f;
|
||||
return 60f / damageInterval;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ public class PointLaserBulletType extends BulletType{
|
|||
|
||||
@Override
|
||||
public float continuousDamage(){
|
||||
return damage / damageInterval * 60f;
|
||||
return 60f / damageInterval;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -640,11 +640,8 @@ public class StatValues{
|
|||
}
|
||||
|
||||
if(type.damage > 0 && (type.collides || type.splashDamage <= 0)){
|
||||
if(type.continuousDamage() > 0){
|
||||
bt.add(Core.bundle.format("bullet.damage", type.continuousDamage()) + StatUnit.perSecond.localized());
|
||||
}else{
|
||||
bt.add(Core.bundle.format("bullet.damage", type.damage));
|
||||
}
|
||||
bt.add(Core.bundle.format("bullet.damage", type.damage) + (type.continuousDamage() > 0 ?
|
||||
"[lightgray] ~ [stat]" + Strings.autoFixed(type.continuousDamage(), 0) + "[lightgray] " + StatUnit.perSecond.localized() : ""));
|
||||
}
|
||||
|
||||
if(type.buildingDamageMultiplier != 1){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue