Fixed autosave not triggering, offset player resource bars
This commit is contained in:
@@ -181,7 +181,7 @@ public class OverlayRenderer {
|
|||||||
y = (int)(y + 0.0001f);
|
y = (int)(y + 0.0001f);
|
||||||
}
|
}
|
||||||
|
|
||||||
drawEncloser(x, y - 8f, 2f);
|
drawEncloser(x, y - 9f, 2f);
|
||||||
drawBar(Palette.healthstats, x, y - 8f, unit.healthf());
|
drawBar(Palette.healthstats, x, y - 8f, unit.healthf());
|
||||||
drawBar(Palette.ammo, x, y - 9f, unit.getAmmoFraction());
|
drawBar(Palette.ammo, x, y - 9f, unit.getAmmoFraction());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,11 +49,14 @@ public class Saves {
|
|||||||
if(time > Settings.getInt("saveinterval")*60) {
|
if(time > Settings.getInt("saveinterval")*60) {
|
||||||
saving = true;
|
saving = true;
|
||||||
|
|
||||||
exec.submit(() -> {
|
Timers.run(2f, () -> {
|
||||||
SaveIO.saveToSlot(current.index);
|
try {
|
||||||
current.meta = SaveIO.getData(current.index);
|
SaveIO.saveToSlot(current.index);
|
||||||
|
current.meta = SaveIO.getData(current.index);
|
||||||
|
}catch (Exception e){
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
saving = false;
|
saving = false;
|
||||||
return true;
|
|
||||||
});
|
});
|
||||||
|
|
||||||
time = 0;
|
time = 0;
|
||||||
|
|||||||
@@ -28,7 +28,7 @@ public class Tile implements PosTrait, TargetTrait {
|
|||||||
|
|
||||||
/**Block ID data.*/
|
/**Block ID data.*/
|
||||||
private byte floor, wall;
|
private byte floor, wall;
|
||||||
/**Rotation, 0-3. Also used to store offload location.*/
|
/**Rotation, 0-3. Also used to store offload location for routers, in which case it can be any number.*/
|
||||||
private byte rotation;
|
private byte rotation;
|
||||||
/**Team ordinal.*/
|
/**Team ordinal.*/
|
||||||
private byte team;
|
private byte team;
|
||||||
|
|||||||
Reference in New Issue
Block a user