Various minor bugfixes
This commit is contained in:
@@ -1034,17 +1034,17 @@ public class Blocks implements ContentList{
|
||||
//special transport blocks
|
||||
|
||||
duct = new Duct("duct"){{
|
||||
requirements(Category.distribution, with(Items.graphite, 4, Items.metaglass, 1));
|
||||
requirements(Category.distribution, with(Items.graphite, 5, Items.metaglass, 2));
|
||||
speed = 4f;
|
||||
}};
|
||||
|
||||
ductRouter = new DuctRouter("duct-router"){{
|
||||
requirements(Category.distribution, with(Items.graphite, 8, Items.metaglass, 2));
|
||||
requirements(Category.distribution, with(Items.graphite, 10, Items.metaglass, 4));
|
||||
speed = 4f;
|
||||
}};
|
||||
|
||||
ductBridge = new DuctBridge("duct-bridge"){{
|
||||
requirements(Category.distribution, with(Items.graphite, 16, Items.metaglass, 4));
|
||||
requirements(Category.distribution, with(Items.graphite, 20, Items.metaglass, 8));
|
||||
speed = 4f;
|
||||
}};
|
||||
|
||||
|
||||
@@ -127,7 +127,7 @@ public class ModsDialog extends BaseDialog{
|
||||
try{
|
||||
return d.parse(text);
|
||||
}catch(Exception e){
|
||||
throw new RuntimeException(e);
|
||||
return new Date();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -148,7 +148,7 @@ public class ModsDialog extends BaseDialog{
|
||||
|
||||
void setup(){
|
||||
float h = 110f;
|
||||
float w = Math.min(Core.graphics.getWidth() / 1.1f, 520f); //squish ? 410f : 524f;
|
||||
float w = Math.min(Core.graphics.getWidth() / 1.1f, 520f);
|
||||
|
||||
cont.clear();
|
||||
cont.defaults().width(Math.min(Core.graphics.getWidth() / 1.2f, 520f)).pad(4);
|
||||
|
||||
@@ -34,6 +34,8 @@ public class MendProjector extends Block{
|
||||
group = BlockGroup.projectors;
|
||||
hasPower = true;
|
||||
hasItems = true;
|
||||
emitLight = true;
|
||||
lightRadius = 50f;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -129,7 +131,7 @@ public class MendProjector extends Block{
|
||||
|
||||
@Override
|
||||
public void drawLight(){
|
||||
Drawf.light(team, x, y, 50f * smoothEfficiency, baseColor, 0.7f * smoothEfficiency);
|
||||
Drawf.light(team, x, y, lightRadius * smoothEfficiency, baseColor, 0.7f * smoothEfficiency);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -39,6 +39,8 @@ public class OverdriveProjector extends Block{
|
||||
hasPower = true;
|
||||
hasItems = true;
|
||||
canOverdrive = false;
|
||||
emitLight = true;
|
||||
lightRadius = 50f;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -89,7 +91,7 @@ public class OverdriveProjector extends Block{
|
||||
|
||||
@Override
|
||||
public void drawLight(){
|
||||
Drawf.light(team, x, y, 50f * smoothEfficiency, baseColor, 0.7f * smoothEfficiency);
|
||||
Drawf.light(team, x, y, lightRadius * smoothEfficiency, baseColor, 0.7f * smoothEfficiency);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -443,12 +443,22 @@ public class PayloadMassDriver extends PayloadBlock{
|
||||
return Point2.unpack(link).sub(tile.x, tile.y);
|
||||
}
|
||||
|
||||
@Override
|
||||
public byte version(){
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void write(Writes write){
|
||||
super.write(write);
|
||||
write.i(link);
|
||||
write.f(turretRotation);
|
||||
write.b((byte)state.ordinal());
|
||||
|
||||
write.f(reload);
|
||||
write.f(charge);
|
||||
write.bool(loaded);
|
||||
write.bool(charging);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -457,6 +467,13 @@ public class PayloadMassDriver extends PayloadBlock{
|
||||
link = read.i();
|
||||
turretRotation = read.f();
|
||||
state = PayloadDriverState.all[read.b()];
|
||||
|
||||
if(revision >= 1){
|
||||
reload = read.f();
|
||||
charge = read.f();
|
||||
loaded = read.bool();
|
||||
charging = read.bool();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -18,6 +18,13 @@ public class ThermalGenerator extends PowerGenerator{
|
||||
super(name);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init(){
|
||||
super.init();
|
||||
//proper light clipping
|
||||
clipSize = Math.max(clipSize, 45f * size * 2f * 2f);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setStats(){
|
||||
super.setStats();
|
||||
@@ -52,7 +59,7 @@ public class ThermalGenerator extends PowerGenerator{
|
||||
|
||||
@Override
|
||||
public void drawLight(){
|
||||
Drawf.light(team, x, y, (40f + Mathf.absin(10f, 5f)) * productionEfficiency * size, Color.scarlet, 0.4f);
|
||||
Drawf.light(team, x, y, (40f + Mathf.absin(10f, 5f)) * Math.min(productionEfficiency, 2f) * size, Color.scarlet, 0.4f);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user