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