Sector layout changes

This commit is contained in:
Anuken
2025-05-21 23:07:59 -04:00
parent b64dc0badd
commit 2161dd519a
5 changed files with 95 additions and 90 deletions

View File

@@ -485,12 +485,40 @@ public class SerpuloTechTree{
new Research(cultivator),
new Research(coalCentrifuge)
), () -> {
node(atolls, Seq.with(
new SectorComplete(seaPort),
new Research(multiplicativeReconstructor),
new Research(mega)
), () -> {
node(extractionOutpost, Seq.with(
new SectorComplete(windsweptIslands),
new SectorComplete(seaPort),
new SectorComplete(facility32m),
new Research(groundFactory),
new Research(nova),
new Research(airFactory),
new Research(mono)
), () -> {
node(atolls, Seq.with(
new SectorComplete(extractionOutpost),
new Research(multiplicativeReconstructor),
new Research(mega)
), () -> {
});
//TODO: removed for now
/*node(polarAerodrome, Seq.with(
new SectorComplete(fungalPass),
new SectorComplete(desolateRift),
new SectorComplete(overgrowth),
new Research(multiplicativeReconstructor),
new Research(zenith),
new Research(swarmer),
new Research(cyclone),
new Research(blastDrill),
new Research(blastDrill),
new Research(massDriver)
), () -> {
});
*/
});
});
@@ -531,16 +559,17 @@ public class SerpuloTechTree{
new Research(steamGenerator)
), () -> {
node(facility32m, Seq.with(
new Research(plastaniumCompressor),
new Research(lancer),
new Research(salvo),
new SectorComplete(windsweptIslands)
node(saltFlats, Seq.with(
new SectorComplete(windsweptIslands),
new SectorComplete(fungalPass),
new SectorComplete(frontier),
new Research(groundFactory),
new Research(additiveReconstructor),
new Research(airFactory),
new Research(door)
), () -> {
node(tarFields, Seq.with(
new SectorComplete(facility32m),
new SectorComplete(saltFlats),
new Research(coalCentrifuge),
new Research(conduit),
new Research(wave)
@@ -605,52 +634,6 @@ public class SerpuloTechTree{
});
});
node(extractionOutpost, Seq.with(
new SectorComplete(windsweptIslands),
new SectorComplete(fungalPass),
new SectorComplete(facility32m),
new Research(groundFactory),
new Research(nova),
new Research(airFactory),
new Research(mono)
), () -> {
//TODO: removed for now
/*node(polarAerodrome, Seq.with(
new SectorComplete(fungalPass),
new SectorComplete(desolateRift),
new SectorComplete(overgrowth),
new Research(multiplicativeReconstructor),
new Research(zenith),
new Research(swarmer),
new Research(cyclone),
new Research(blastDrill),
new Research(blastDrill),
new Research(massDriver)
), () -> {
});
*/
});
});
node(saltFlats, Seq.with(
new SectorComplete(windsweptIslands),
new SectorComplete(fungalPass),
new SectorComplete(frontier),
new Research(groundFactory),
new Research(additiveReconstructor),
new Research(airFactory),
new Research(door)
), () -> {
node(testingGrounds, Seq.with(
new Research(cryofluidMixer),
new Research(Liquids.cryofluid),
new Research(waterExtractor),
new Research(ripple)
), () -> {
});
node(coastline, Seq.with(
new SectorComplete(windsweptIslands),
new SectorComplete(saltFlats),
@@ -658,6 +641,17 @@ public class SerpuloTechTree{
new Research(payloadConveyor)
), () -> {
node(testingGrounds, Seq.with(
new SectorComplete(coastline),
new Research(cryofluidMixer),
new Research(Liquids.cryofluid),
new Research(waterExtractor),
new Research(ripple)
), () -> {
});
node(navalFortress, Seq.with(
new SectorComplete(coastline),
new SectorComplete(extractionOutpost),
@@ -699,7 +693,16 @@ public class SerpuloTechTree{
new Research(siliconSmelter)
), () -> {
//TODO bad order
node(facility32m, Seq.with(
new Research(plastaniumCompressor),
new Research(lancer),
new Research(salvo),
new SectorComplete(stainedMountains),
new SectorComplete(windsweptIslands)
), () -> {
});
node(infestedCanyons, Seq.with(
new SectorComplete(fungalPass),
new SectorComplete(frontier),
@@ -708,7 +711,6 @@ public class SerpuloTechTree{
new Research(minke),
new Research(additiveReconstructor)
), () -> {
//TODO difficulty jump!
node(nuclearComplex, Seq.with(
new SectorComplete(fungalPass),
new Research(thermalGenerator),

View File

@@ -23,7 +23,7 @@ abstract class MechComp implements Posc, Hitboxc, Unitc, Mechc, ElevationMovec{
@Override
public void update(){
//trigger animation only when walking manually
if(walked || net.client()){
if(walked || net.client() || isRemote()){
float len = deltaLen();
baseRotation = Angles.moveToward(baseRotation, deltaAngle(), type().baseRotateSpeed * Mathf.clamp(len / type().speed / Time.delta) * Time.delta);
walkTime += len;

View File

@@ -1492,7 +1492,7 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
}
protected void drawRebuildSelection(int x1, int y1, int x2, int y2){
drawSelection(x1, y1, x2, y2, 0, Pal.sapBulletBack, Pal.sapBullet);
drawSelection(x1, y1, x2, y2, 0, Pal.sapBulletBack, Pal.sapBullet, false);
NormalizeDrawResult result = Placement.normalizeDrawArea(Blocks.air, x1, y1, x2, y2, false, 0, 1f);
@@ -1525,10 +1525,10 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
}
protected void drawSelection(int x1, int y1, int x2, int y2, int maxLength){
drawSelection(x1, y1, x2, y2, maxLength, Pal.accentBack, Pal.accent);
drawSelection(x1, y1, x2, y2, maxLength, Pal.accentBack, Pal.accent, true);
}
protected void drawSelection(int x1, int y1, int x2, int y2, int maxLength, Color col1, Color col2){
protected void drawSelection(int x1, int y1, int x2, int y2, int maxLength, Color col1, Color col2, boolean withText){
NormalizeDrawResult result = Placement.normalizeDrawArea(Blocks.air, x1, y1, x2, y2, false, maxLength, 1f);
Lines.stroke(2f);
@@ -1538,27 +1538,30 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
Draw.color(col2);
Lines.rect(result.x, result.y, result.x2 - result.x, result.y2 - result.y);
Font font = Fonts.outline;
font.setColor(col2);
var ints = font.usesIntegerPositions();
font.setUseIntegerPositions(false);
var z = Draw.z();
Draw.z(Layer.endPixeled);
font.getData().setScale(1 / renderer.camerascale);
var snapToCursor = Core.settings.getBool("selectionsizeoncursor");
var textOffset = Core.settings.getInt("selectionsizeoncursoroffset", 5);
int width = (int)((result.x2 - result.x) / 8);
int height = (int)((result.y2 - result.y) / 8);
int area = width * height;
// FINISHME: When not snapping to cursor, perhaps it would be best to choose the corner closest to the cursor that's at least a block away?
font.draw(width + "x" + height + " (" + area + ")",
snapToCursor ? input.mouseWorldX() + textOffset * (4 / renderer.camerascale) : result.x2,
snapToCursor ? input.mouseWorldY() - textOffset * (4 / renderer.camerascale) : result.y
);
font.setColor(Color.white);
font.getData().setScale(1);
font.setUseIntegerPositions(ints);
Draw.z(z);
if(withText){
Font font = Fonts.outline;
font.setColor(col2);
var ints = font.usesIntegerPositions();
font.setUseIntegerPositions(false);
var z = Draw.z();
Draw.z(Layer.endPixeled);
font.getData().setScale(1 / renderer.camerascale);
var snapToCursor = Core.settings.getBool("selectionsizeoncursor");
var textOffset = Core.settings.getInt("selectionsizeoncursoroffset", 5);
int width = (int)((result.x2 - result.x) / 8);
int height = (int)((result.y2 - result.y) / 8);
int area = width * height;
// FINISHME: When not snapping to cursor, perhaps it would be best to choose the corner closest to the cursor that's at least a block away?
font.draw(width + "x" + height + " (" + area + ")",
snapToCursor ? input.mouseWorldX() + textOffset * (4 / renderer.camerascale) : result.x2,
snapToCursor ? input.mouseWorldY() - textOffset * (4 / renderer.camerascale) : result.y
);
font.setColor(Color.white);
font.getData().setScale(1);
font.setUseIntegerPositions(ints);
Draw.z(z);
}
}
protected void flushSelectPlans(Seq<BuildPlan> plans){

View File

@@ -801,6 +801,8 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
head.image(Icon.warningSmall).update(i -> {
i.color.set(Pal.accent).lerp(Pal.remove, Mathf.absin(Time.globalTime, 9f, 1f));
}).padRight(4f);
}else if(sec.preset != null && sec.preset.requireUnlock){
head.image(sec.preset.uiIcon).size(iconSmall).padRight(4f);
}
String ic = sec.iconChar() == null ? "" : sec.iconChar() + " ";
@@ -830,9 +832,7 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
}
public Planet getHoverPlanet(float mouseX, float mouseY){
// do not hover over things indefinitely
Planet hoverPlanet = null;
// get nearest planet (DO NOT SELECT THROUGH selected planet)
float nearest = Float.POSITIVE_INFINITY;
for(Planet planet : content.planets()){
@@ -1163,7 +1163,7 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
title.add().growX();
title.button(Icon.pencilSmall, Styles.clearNonei, () -> {
ui.showTextInput("@sectors.rename", "@name", 20, sector.name(), v -> {
ui.showTextInput("@sectors.rename", "@name", 32, sector.name(), v -> {
sector.setName(v);
updateSelected();
rebuildList();