mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-01-10 07:07:03 +07:00
Logic battery control + Slight swarmer range buff
This commit is contained in:
parent
4c2f330e51
commit
2f83ba7f5c
@ -1595,7 +1595,7 @@ public class Blocks implements ContentList{
|
||||
shots = 4;
|
||||
burstSpacing = 5;
|
||||
inaccuracy = 10f;
|
||||
range = 190f;
|
||||
range = 200f;
|
||||
xRand = 6f;
|
||||
size = 2;
|
||||
health = 300 * size * size;
|
||||
|
@ -15,7 +15,7 @@ public class MissileBulletType extends BasicBulletType{
|
||||
height = 8f;
|
||||
hitSound = Sounds.explosion;
|
||||
trailChance = 0.2f;
|
||||
lifetime = 49f;
|
||||
lifetime = 52f;
|
||||
}
|
||||
|
||||
public MissileBulletType(float speed, float damage){
|
||||
|
@ -37,6 +37,7 @@ public class Wall extends Block{
|
||||
group = BlockGroup.walls;
|
||||
buildCostMultiplier = 6f;
|
||||
canOverdrive = false;
|
||||
drawDisabled = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -35,6 +35,7 @@ public class LogicDisplay extends Block{
|
||||
update = true;
|
||||
solid = true;
|
||||
group = BlockGroup.logic;
|
||||
drawDisabled = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -13,6 +13,7 @@ public class MemoryBlock extends Block{
|
||||
destructible = true;
|
||||
solid = true;
|
||||
group = BlockGroup.logic;
|
||||
drawDisabled = false;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -29,6 +29,7 @@ public class MessageBlock extends Block{
|
||||
solid = true;
|
||||
destructible = true;
|
||||
group = BlockGroup.logic;
|
||||
drawDisabled = false;
|
||||
|
||||
config(String.class, (MessageBuild tile, String text) -> {
|
||||
if(text.length() > maxTextLength){
|
||||
|
@ -102,7 +102,7 @@ public class PowerGraph{
|
||||
float totalAccumulator = 0f;
|
||||
for(Building battery : batteries){
|
||||
Consumers consumes = battery.block.consumes;
|
||||
if(consumes.hasPower()){
|
||||
if(battery.enabled && consumes.hasPower()){
|
||||
totalAccumulator += battery.power.status * consumes.getPower().capacity;
|
||||
}
|
||||
}
|
||||
@ -112,7 +112,7 @@ public class PowerGraph{
|
||||
public float getBatteryCapacity(){
|
||||
float totalCapacity = 0f;
|
||||
for(Building battery : batteries){
|
||||
if(battery.block.consumes.hasPower()){
|
||||
if(battery.enabled && battery.block.consumes.hasPower()){
|
||||
ConsumePower power = battery.block.consumes.getPower();
|
||||
totalCapacity += (1f - battery.power.status) * power.capacity;
|
||||
}
|
||||
@ -123,7 +123,7 @@ public class PowerGraph{
|
||||
public float getTotalBatteryCapacity(){
|
||||
float totalCapacity = 0f;
|
||||
for(Building battery : batteries){
|
||||
if(battery.block.consumes.hasPower()){
|
||||
if(battery.enabled && battery.block.consumes.hasPower()){
|
||||
totalCapacity += battery.block.consumes.getPower().capacity;
|
||||
}
|
||||
}
|
||||
@ -138,7 +138,7 @@ public class PowerGraph{
|
||||
float consumedPowerPercentage = Math.min(1.0f, needed / stored);
|
||||
for(Building battery : batteries){
|
||||
Consumers consumes = battery.block.consumes;
|
||||
if(consumes.hasPower()){
|
||||
if(battery.enabled && consumes.hasPower()){
|
||||
battery.power.status *= (1f-consumedPowerPercentage);
|
||||
}
|
||||
}
|
||||
@ -153,7 +153,7 @@ public class PowerGraph{
|
||||
|
||||
for(Building battery : batteries){
|
||||
Consumers consumes = battery.block.consumes;
|
||||
if(consumes.hasPower()){
|
||||
if(battery.enabled && consumes.hasPower()){
|
||||
ConsumePower consumePower = consumes.getPower();
|
||||
if(consumePower.capacity > 0f){
|
||||
battery.power.status += (1f- battery.power.status) * chargedPercent;
|
||||
@ -216,7 +216,6 @@ public class PowerGraph{
|
||||
lastScaledPowerIn = powerProduced / Time.delta;
|
||||
lastScaledPowerOut = powerNeeded / Time.delta;
|
||||
lastCapacity = getTotalBatteryCapacity();
|
||||
|
||||
lastPowerStored = getBatteryStored();
|
||||
|
||||
powerBalance.add((lastPowerProduced - lastPowerNeeded) / Time.delta);
|
||||
|
@ -43,6 +43,7 @@ public class PowerNode extends PowerBlock{
|
||||
outputsPower = false;
|
||||
canOverdrive = false;
|
||||
swapDiagonalPlacement = true;
|
||||
drawDisabled = false;
|
||||
|
||||
config(Integer.class, (entity, value) -> {
|
||||
PowerModule power = entity.power;
|
||||
|
@ -53,6 +53,7 @@ public class CoreBlock extends StorageBlock{
|
||||
loopSound = Sounds.respawning;
|
||||
loopSoundVolume = 1f;
|
||||
group = BlockGroup.none;
|
||||
drawDisabled = false;
|
||||
}
|
||||
|
||||
@Remote(called = Loc.server)
|
||||
|
@ -1,3 +1,3 @@
|
||||
org.gradle.daemon=true
|
||||
org.gradle.jvmargs=-Xms256m -Xmx1024m
|
||||
archash=71b1c84015119f57bf4d215f594ead1ffc9e8744
|
||||
archash=b2f3d212c1a88a62f140f5cb04f4c86e61332d1c
|
||||
|
Loading…
Reference in New Issue
Block a user