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

@@ -1 +1 @@
{presets:{windsweptIslands:97,stainedMountains:223,weatheredChannels:166,craters:175,coastline:164,navalFortress:165,frontier:215,groundZero:15,mycelialBastion:142,facility32m:268,atolls:217,overgrowth:86,testingGrounds:99,frozenForest:219,saltFlats:98,taintedWoods:145,infestedCanyons:85,desolateRift:123,nuclearComplex:228,ruinousShores:41,planetaryTerminal:93,impact0078:270,seaPort:216,geothermalStronghold:264,cruxscape:54,fungalPass:221,tarFields:72,biomassFacility:23},attackSectors:[0,2,5,6,10,11,12,13,16,19,24,25,27,28,30,31,33,34,36,47,48,49,51,56,57,59,60,66,67,68,70,71,75,76,78,82,84,90,104,106,110,114,115,121,124,125,127,128,129,133,138,148,149,154,158,180,182,200,202,204,210,224,225,229,233,234,235,241,243,248,254,255,257,259,265]} {presets:{windsweptIslands:97,stainedMountains:223,weatheredChannels:166,craters:175,extractionOutpost:213,coastline:164,navalFortress:165,frontier:86,groundZero:15,mycelialBastion:143,facility32m:65,atolls:75,overgrowth:142,testingGrounds:169,frozenForest:219,saltFlats:98,taintedWoods:145,infestedCanyons:85,desolateRift:271,nuclearComplex:228,ruinousShores:41,planetaryTerminal:217,impact0078:266,seaPort:214,geothermalStronghold:264,cruxscape:54,fungalPass:221,tarFields:99,biomassFacility:23},attackSectors:[0,2,5,6,10,11,12,13,16,19,24,25,27,28,30,33,36,47,48,49,51,57,59,60,66,67,68,70,71,76,78,82,90,104,106,110,114,115,121,124,125,127,128,129,133,138,148,149,154,158,180,182,200,202,204,210,224,225,233,234,235,241,243,248,254,255,257,259,265]}

View File

@@ -485,12 +485,40 @@ public class SerpuloTechTree{
new Research(cultivator), new Research(cultivator),
new Research(coalCentrifuge) 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) new Research(steamGenerator)
), () -> { ), () -> {
node(saltFlats, Seq.with(
new SectorComplete(windsweptIslands),
node(facility32m, Seq.with( new SectorComplete(fungalPass),
new Research(plastaniumCompressor), new SectorComplete(frontier),
new Research(lancer), new Research(groundFactory),
new Research(salvo), new Research(additiveReconstructor),
new SectorComplete(windsweptIslands) new Research(airFactory),
new Research(door)
), () -> { ), () -> {
node(tarFields, Seq.with( node(tarFields, Seq.with(
new SectorComplete(facility32m), new SectorComplete(saltFlats),
new Research(coalCentrifuge), new Research(coalCentrifuge),
new Research(conduit), new Research(conduit),
new Research(wave) 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( node(coastline, Seq.with(
new SectorComplete(windsweptIslands), new SectorComplete(windsweptIslands),
new SectorComplete(saltFlats), new SectorComplete(saltFlats),
@@ -658,6 +641,17 @@ public class SerpuloTechTree{
new Research(payloadConveyor) 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( node(navalFortress, Seq.with(
new SectorComplete(coastline), new SectorComplete(coastline),
new SectorComplete(extractionOutpost), new SectorComplete(extractionOutpost),
@@ -699,7 +693,16 @@ public class SerpuloTechTree{
new Research(siliconSmelter) 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( node(infestedCanyons, Seq.with(
new SectorComplete(fungalPass), new SectorComplete(fungalPass),
new SectorComplete(frontier), new SectorComplete(frontier),
@@ -708,7 +711,6 @@ public class SerpuloTechTree{
new Research(minke), new Research(minke),
new Research(additiveReconstructor) new Research(additiveReconstructor)
), () -> { ), () -> {
//TODO difficulty jump!
node(nuclearComplex, Seq.with( node(nuclearComplex, Seq.with(
new SectorComplete(fungalPass), new SectorComplete(fungalPass),
new Research(thermalGenerator), new Research(thermalGenerator),

View File

@@ -23,7 +23,7 @@ abstract class MechComp implements Posc, Hitboxc, Unitc, Mechc, ElevationMovec{
@Override @Override
public void update(){ public void update(){
//trigger animation only when walking manually //trigger animation only when walking manually
if(walked || net.client()){ if(walked || net.client() || isRemote()){
float len = deltaLen(); float len = deltaLen();
baseRotation = Angles.moveToward(baseRotation, deltaAngle(), type().baseRotateSpeed * Mathf.clamp(len / type().speed / Time.delta) * Time.delta); baseRotation = Angles.moveToward(baseRotation, deltaAngle(), type().baseRotateSpeed * Mathf.clamp(len / type().speed / Time.delta) * Time.delta);
walkTime += len; 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){ 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); 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){ 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); NormalizeDrawResult result = Placement.normalizeDrawArea(Blocks.air, x1, y1, x2, y2, false, maxLength, 1f);
Lines.stroke(2f); Lines.stroke(2f);
@@ -1538,27 +1538,30 @@ public abstract class InputHandler implements InputProcessor, GestureListener{
Draw.color(col2); Draw.color(col2);
Lines.rect(result.x, result.y, result.x2 - result.x, result.y2 - result.y); Lines.rect(result.x, result.y, result.x2 - result.x, result.y2 - result.y);
Font font = Fonts.outline; if(withText){
font.setColor(col2); Font font = Fonts.outline;
var ints = font.usesIntegerPositions(); font.setColor(col2);
font.setUseIntegerPositions(false); var ints = font.usesIntegerPositions();
var z = Draw.z(); font.setUseIntegerPositions(false);
Draw.z(Layer.endPixeled); var z = Draw.z();
font.getData().setScale(1 / renderer.camerascale); Draw.z(Layer.endPixeled);
var snapToCursor = Core.settings.getBool("selectionsizeoncursor"); font.getData().setScale(1 / renderer.camerascale);
var textOffset = Core.settings.getInt("selectionsizeoncursoroffset", 5); var snapToCursor = Core.settings.getBool("selectionsizeoncursor");
int width = (int)((result.x2 - result.x) / 8); var textOffset = Core.settings.getInt("selectionsizeoncursoroffset", 5);
int height = (int)((result.y2 - result.y) / 8); int width = (int)((result.x2 - result.x) / 8);
int area = width * height; int height = (int)((result.y2 - result.y) / 8);
// 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? int area = width * height;
font.draw(width + "x" + height + " (" + area + ")",
snapToCursor ? input.mouseWorldX() + textOffset * (4 / renderer.camerascale) : result.x2, // 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?
snapToCursor ? input.mouseWorldY() - textOffset * (4 / renderer.camerascale) : result.y font.draw(width + "x" + height + " (" + area + ")",
); snapToCursor ? input.mouseWorldX() + textOffset * (4 / renderer.camerascale) : result.x2,
font.setColor(Color.white); snapToCursor ? input.mouseWorldY() - textOffset * (4 / renderer.camerascale) : result.y
font.getData().setScale(1); );
font.setUseIntegerPositions(ints); font.setColor(Color.white);
Draw.z(z); font.getData().setScale(1);
font.setUseIntegerPositions(ints);
Draw.z(z);
}
} }
protected void flushSelectPlans(Seq<BuildPlan> plans){ 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 -> { head.image(Icon.warningSmall).update(i -> {
i.color.set(Pal.accent).lerp(Pal.remove, Mathf.absin(Time.globalTime, 9f, 1f)); i.color.set(Pal.accent).lerp(Pal.remove, Mathf.absin(Time.globalTime, 9f, 1f));
}).padRight(4f); }).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() + " "; 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){ public Planet getHoverPlanet(float mouseX, float mouseY){
// do not hover over things indefinitely
Planet hoverPlanet = null; Planet hoverPlanet = null;
// get nearest planet (DO NOT SELECT THROUGH selected planet)
float nearest = Float.POSITIVE_INFINITY; float nearest = Float.POSITIVE_INFINITY;
for(Planet planet : content.planets()){ for(Planet planet : content.planets()){
@@ -1163,7 +1163,7 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
title.add().growX(); title.add().growX();
title.button(Icon.pencilSmall, Styles.clearNonei, () -> { 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); sector.setName(v);
updateSelected(); updateSelected();
rebuildList(); rebuildList();