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