Merge remote-tracking branch 'origin/master'

This commit is contained in:
Anuken
2024-10-04 22:39:52 -04:00
43 changed files with 491 additions and 443 deletions

View File

@@ -1342,7 +1342,7 @@ public class Blocks{
slagIncinerator = new ItemIncinerator("slag-incinerator"){{
requirements(Category.crafting, with(Items.tungsten, 15));
size = 1;
consumeLiquid(Liquids.slag, 2f / 60f);
consumeLiquid(Liquids.slag, 0f);
}};
carbideCrucible = new HeatCrafter("carbide-crucible"){{

View File

@@ -34,6 +34,8 @@ public class ShieldRegenFieldAbility extends Ability{
t.row();
t.add(abilityStat("firingrate", Strings.autoFixed(60f / reload, 2)));
t.row();
t.add(abilityStat("pulseregen", Strings.autoFixed(amount, 2)));
t.row();
t.add(abilityStat("shield", Strings.autoFixed(max, 2)));
}

View File

@@ -37,6 +37,7 @@ public class ContinuousLaserBulletType extends ContinuousBulletType{
incendSpread = 5;
incendChance = 0.4f;
lightColor = Color.orange;
lightOpacity = 0.7f;
}
@Override
@@ -66,7 +67,7 @@ public class ContinuousLaserBulletType extends ContinuousBulletType{
Tmp.v1.trns(b.rotation(), realLength * 1.1f);
Drawf.light(b.x, b.y, b.x + Tmp.v1.x, b.y + Tmp.v1.y, lightStroke, lightColor, 0.7f);
Drawf.light(b.x, b.y, b.x + Tmp.v1.x, b.y + Tmp.v1.y, lightStroke, lightColor, lightOpacity);
Draw.reset();
}

View File

@@ -56,6 +56,8 @@ public class DesktopInput extends InputHandler{
/** Time of most recent control group selection */
public long lastCtrlGroupSelectMillis;
private final Vec2 buildPlanMouseOffsetPX = new Vec2();
boolean showHint(){
return ui.hudfrag.shown && Core.settings.getBool("hints") && selectPlans.isEmpty() && !player.dead() &&
(!isBuilding && !Core.settings.getBool("buildautopause") || player.unit().isBuilding() || !player.dead() && !player.unit().spawnedByCore());
@@ -639,11 +641,10 @@ public class DesktopInput extends InputHandler{
}
if(splan != null){
float offset = ((splan.block.size + 2) % 2) * tilesize / 2f;
float x = Core.input.mouseWorld().x + offset;
float y = Core.input.mouseWorld().y + offset;
splan.x = (int)(x / tilesize);
splan.y = (int)(y / tilesize);
float x = Core.input.mouseWorld().x + buildPlanMouseOffsetPX.x;
float y = Core.input.mouseWorld().y + buildPlanMouseOffsetPX.y;
splan.x = Math.round(x / tilesize);
splan.y = Math.round(y / tilesize);
}
if(block == null || mode != placing){
@@ -696,6 +697,8 @@ public class DesktopInput extends InputHandler{
updateLine(selectX, selectY);
}else if(plan != null && !plan.breaking && mode == none && !plan.initialized && plan.progress <= 0f){
splan = plan;
buildPlanMouseOffsetPX.x = splan.x * tilesize - Core.input.mouseWorld().x;
buildPlanMouseOffsetPX.y = splan.y * tilesize - Core.input.mouseWorld().y;
}else if(plan != null && plan.breaking){
deleting = true;
}else if(commandMode){

View File

@@ -232,7 +232,8 @@ public abstract class SaveVersion extends SaveFileReader{
Tile tile = world.rawTile(i % world.width(), i / world.width());
stream.writeShort(tile.blockID());
boolean savedata = tile.block().saveData;
boolean savedata = tile.floor().saveData || tile.overlay().saveData || tile.block().saveData;
byte packed = (byte)((tile.build != null ? 1 : 0) | (savedata ? 2 : 0));
//make note of whether there was an entity/rotation here

View File

@@ -152,7 +152,7 @@ public class StatValues{
}
}}).size(iconMed).padRight(3 + (amount != 0 && Strings.autoFixed(amount, 2).length() > 2 ? 8 : 0)).with(s -> withTooltip(s, liquid, false));
if(perSecond){
if(perSecond && amount != 0){
t.add(StatUnit.perSecond.localized()).padLeft(2).padRight(5).color(Color.lightGray).style(Styles.outlineLabel);
}