Merge branch 'master' of https://github.com/Anuken/Mindustry
This commit is contained in:
@@ -3404,6 +3404,7 @@ public class Blocks{
|
||||
reload = 30f;
|
||||
inaccuracy = 10f;
|
||||
range = 240f;
|
||||
consumeAmmoOnce = false;
|
||||
size = 2;
|
||||
scaledHealth = 300;
|
||||
shootSound = Sounds.missile;
|
||||
@@ -3466,6 +3467,7 @@ public class Blocks{
|
||||
size = 2;
|
||||
range = 190f;
|
||||
reload = 31f;
|
||||
consumeAmmoOnce = false;
|
||||
ammoEjectBack = 3f;
|
||||
recoil = 3f;
|
||||
shake = 1f;
|
||||
|
||||
@@ -1746,7 +1746,8 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
|
||||
public void updateConsumption(){
|
||||
//everything is valid when cheating
|
||||
if(!block.hasConsumers || cheating()){
|
||||
potentialEfficiency = efficiency = optionalEfficiency = enabled && shouldConsume() && productionValid() ? 1f : 0f;
|
||||
potentialEfficiency = enabled && productionValid() ? 1f : 0f;
|
||||
efficiency = optionalEfficiency = shouldConsume() ? potentialEfficiency : 0f;
|
||||
updateEfficiencyMultiplier();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ public class Team implements Comparable<Team>{
|
||||
Mathf.rand.setSeed(8);
|
||||
//create the whole 256 placeholder teams
|
||||
for(int i = 6; i < all.length; i++){
|
||||
new Team(i, "team#" + i, Color.HSVtoRGB(360f * Mathf.random(), 100f * Mathf.random(0.6f, 1f), 100f * Mathf.random(0.8f, 1f), 1f));
|
||||
new Team(i, "team#" + i, Color.HSVtoRGB(360f * Mathf.random(), 100f * Mathf.random(0.4f, 1f), 100f * Mathf.random(0.6f, 1f), 1f));
|
||||
}
|
||||
Mathf.rand.setSeed(new Rand().nextLong());
|
||||
}
|
||||
|
||||
@@ -51,6 +51,19 @@ public class ItemTurret extends Turret{
|
||||
stats.add(Stat.ammo, StatValues.ammo(ammoTypes));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setBars(){
|
||||
super.setBars();
|
||||
|
||||
addBar("ammo", (ItemTurretBuild entity) ->
|
||||
new Bar(
|
||||
"stat.ammo",
|
||||
Pal.ammo,
|
||||
() -> (float)entity.totalAmmo / maxAmmo
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init(){
|
||||
consume(new ConsumeItemFilter(i -> ammoTypes.containsKey(i)){
|
||||
@@ -100,14 +113,6 @@ public class ItemTurret extends Turret{
|
||||
super.updateTile();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void displayBars(Table bars){
|
||||
super.displayBars(bars);
|
||||
|
||||
bars.add(new Bar("stat.ammo", Pal.ammo, () -> (float)totalAmmo / maxAmmo)).growX();
|
||||
bars.row();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int acceptStack(Item item, int amount, Teamc source){
|
||||
BulletType type = ammoTypes.get(item);
|
||||
|
||||
Reference in New Issue
Block a user