Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
280e345faf | ||
|
|
f296d23cfa | ||
|
|
3b609f698a |
@@ -138,7 +138,7 @@ public class AndroidLauncher extends AndroidApplication{
|
|||||||
if(open){
|
if(open){
|
||||||
new FileChooser(title, file -> Structs.contains(extensions, file.extension().toLowerCase()), true, cons).show();
|
new FileChooser(title, file -> Structs.contains(extensions, file.extension().toLowerCase()), true, cons).show();
|
||||||
}else{
|
}else{
|
||||||
super.showFileChooser(open, extension, cons);
|
super.showFileChooser(open, "@open", extension, cons);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -544,6 +544,7 @@ sectors.select = Select
|
|||||||
sectors.nonelaunch = [lightgray]none (sun)
|
sectors.nonelaunch = [lightgray]none (sun)
|
||||||
sectors.rename = Rename Sector
|
sectors.rename = Rename Sector
|
||||||
|
|
||||||
|
sector.curcapture = Sector Captured
|
||||||
sector.missingresources = [scarlet]Insufficient Core Resources
|
sector.missingresources = [scarlet]Insufficient Core Resources
|
||||||
sector.attacked = Sector [accent]{0}[white] under attack!
|
sector.attacked = Sector [accent]{0}[white] under attack!
|
||||||
sector.lost = Sector [accent]{0}[white] lost!
|
sector.lost = Sector [accent]{0}[white] lost!
|
||||||
|
|||||||
@@ -17,9 +17,9 @@ const float shinelen = 0.2;
|
|||||||
void main(){
|
void main(){
|
||||||
vec3 norc = u_ambientColor * (diffuse + vec3(clamp((dot(a_normal, u_lightdir) + 1.0) / 2.0, 0.0, 1.0)));
|
vec3 norc = u_ambientColor * (diffuse + vec3(clamp((dot(a_normal, u_lightdir) + 1.0) / 2.0, 0.0, 1.0)));
|
||||||
float shinedot = max((-dot(u_camdir, a_normal) - (1.0 - shinelen)) / shinelen, 0.0);
|
float shinedot = max((-dot(u_camdir, a_normal) - (1.0 - shinelen)) / shinelen, 0.0);
|
||||||
float shinyness = (1.0 - a_color.a) * pow(shinedot, shinefalloff);
|
float albedo = (1.0 - a_color.a) * pow(shinedot, shinefalloff);
|
||||||
vec4 baseCol = vec4(a_color.rgb, 1.0);
|
vec4 baseCol = vec4(a_color.rgb, 1.0);
|
||||||
|
|
||||||
v_col = mix(baseCol * vec4(norc, 1.0), vec4(1.0), shinyness * norc.r);
|
v_col = mix(baseCol * vec4(norc, 1.0), vec4(1.0), albedo * norc.r);
|
||||||
gl_Position = u_proj * u_trans * a_position;
|
gl_Position = u_proj * u_trans * a_position;
|
||||||
}
|
}
|
||||||
|
|||||||
|
Before Width: | Height: | Size: 944 KiB After Width: | Height: | Size: 960 KiB |
|
Before Width: | Height: | Size: 596 KiB After Width: | Height: | Size: 575 KiB |
|
Before Width: | Height: | Size: 186 KiB After Width: | Height: | Size: 185 KiB |
|
Before Width: | Height: | Size: 2.9 MiB After Width: | Height: | Size: 2.9 MiB |
|
Before Width: | Height: | Size: 188 KiB After Width: | Height: | Size: 186 KiB |
@@ -36,6 +36,8 @@ public class Planets implements ContentList{
|
|||||||
generator = new SerpuloPlanetGenerator();
|
generator = new SerpuloPlanetGenerator();
|
||||||
meshLoader = () -> new HexMesh(this, 6);
|
meshLoader = () -> new HexMesh(this, 6);
|
||||||
atmosphereColor = Color.valueOf("3c1b8f");
|
atmosphereColor = Color.valueOf("3c1b8f");
|
||||||
|
atmosphereRadIn = 0.02f;
|
||||||
|
atmosphereRadOut = 0.3f;
|
||||||
startSector = 15;
|
startSector = 15;
|
||||||
}};
|
}};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ public class SectorPresets implements ContentList{
|
|||||||
difficulty = 2;
|
difficulty = 2;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
ruinousShores = new SectorPreset("ruinousShores", serpulo, 19){{
|
ruinousShores = new SectorPreset("ruinousShores", serpulo, 213){{
|
||||||
captureWave = 30;
|
captureWave = 30;
|
||||||
difficulty = 3;
|
difficulty = 3;
|
||||||
}};
|
}};
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ public class Weathers implements ContentList{
|
|||||||
baseSpeed = 5.4f;
|
baseSpeed = 5.4f;
|
||||||
attrs.set(Attribute.light, -0.1f);
|
attrs.set(Attribute.light, -0.1f);
|
||||||
attrs.set(Attribute.water, -0.1f);
|
attrs.set(Attribute.water, -0.1f);
|
||||||
opacityMultiplier = 0.8f;
|
opacityMultiplier = 0.5f;
|
||||||
force = 0.1f;
|
force = 0.1f;
|
||||||
sound = Sounds.wind;
|
sound = Sounds.wind;
|
||||||
soundVol = 0.3f;
|
soundVol = 0.3f;
|
||||||
@@ -74,7 +74,7 @@ public class Weathers implements ContentList{
|
|||||||
attrs.set(Attribute.spores, 1f);
|
attrs.set(Attribute.spores, 1f);
|
||||||
attrs.set(Attribute.light, -0.15f);
|
attrs.set(Attribute.light, -0.15f);
|
||||||
status = StatusEffects.sporeSlowed;
|
status = StatusEffects.sporeSlowed;
|
||||||
opacityMultiplier = 0.85f;
|
opacityMultiplier = 0.75f;
|
||||||
force = 0.1f;
|
force = 0.1f;
|
||||||
sound = Sounds.wind;
|
sound = Sounds.wind;
|
||||||
soundVol = 0.3f;
|
soundVol = 0.3f;
|
||||||
|
|||||||
@@ -1358,6 +1358,8 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
|
|||||||
@Final
|
@Final
|
||||||
@Override
|
@Override
|
||||||
public void update(){
|
public void update(){
|
||||||
|
if(state.isEditor()) return;
|
||||||
|
|
||||||
timeScaleDuration -= Time.delta;
|
timeScaleDuration -= Time.delta;
|
||||||
if(timeScaleDuration <= 0f || !block.canOverdrive){
|
if(timeScaleDuration <= 0f || !block.canOverdrive){
|
||||||
timeScale = 1f;
|
timeScale = 1f;
|
||||||
|
|||||||
@@ -71,8 +71,8 @@ public class Shaders{
|
|||||||
setUniformf("u_rcampos", Tmp.v31.set(camera.position).sub(planet.position));
|
setUniformf("u_rcampos", Tmp.v31.set(camera.position).sub(planet.position));
|
||||||
setUniformf("u_light", planet.getLightNormal());
|
setUniformf("u_light", planet.getLightNormal());
|
||||||
setUniformf("u_color", planet.atmosphereColor.r, planet.atmosphereColor.g, planet.atmosphereColor.b);
|
setUniformf("u_color", planet.atmosphereColor.r, planet.atmosphereColor.g, planet.atmosphereColor.b);
|
||||||
setUniformf("u_innerRadius", planet.radius + 0.02f);
|
setUniformf("u_innerRadius", planet.radius + planet.atmosphereRadIn);
|
||||||
setUniformf("u_outerRadius", planet.radius * 1.3f);
|
setUniformf("u_outerRadius", planet.radius + planet.atmosphereRadOut);
|
||||||
|
|
||||||
setUniformMatrix4("u_model", planet.getTransform(mat).val);
|
setUniformMatrix4("u_model", planet.getTransform(mat).val);
|
||||||
setUniformMatrix4("u_projection", camera.combined.val);
|
setUniformMatrix4("u_projection", camera.combined.val);
|
||||||
|
|||||||
@@ -77,8 +77,6 @@ public class MeshBuilder{
|
|||||||
|
|
||||||
if(c.length > 5){
|
if(c.length > 5){
|
||||||
verts(c[0].v, c[4].v, c[5].v, nor, color);
|
verts(c[0].v, c[4].v, c[5].v, nor, color);
|
||||||
}else{
|
|
||||||
verts(c[0].v, c[3].v, c[4].v, nor, color);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -57,6 +57,7 @@ public class PlanetRenderer implements Disposable{
|
|||||||
camPos.set(0, 0f, camLength);
|
camPos.set(0, 0f, camLength);
|
||||||
projector.setScaling(1f / 150f);
|
projector.setScaling(1f / 150f);
|
||||||
cam.fov = 60f;
|
cam.fov = 60f;
|
||||||
|
cam.far = 150f;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Render the entire planet scene to the screen. */
|
/** Render the entire planet scene to the screen. */
|
||||||
@@ -93,6 +94,8 @@ public class PlanetRenderer implements Disposable{
|
|||||||
|
|
||||||
renderPlanet(solarSystem);
|
renderPlanet(solarSystem);
|
||||||
|
|
||||||
|
renderTransparent(solarSystem);
|
||||||
|
|
||||||
endBloom();
|
endBloom();
|
||||||
|
|
||||||
Events.fire(Trigger.universeDrawEnd);
|
Events.fire(Trigger.universeDrawEnd);
|
||||||
@@ -125,11 +128,21 @@ public class PlanetRenderer implements Disposable{
|
|||||||
|
|
||||||
renderOrbit(planet);
|
renderOrbit(planet);
|
||||||
|
|
||||||
|
for(Planet child : planet.children){
|
||||||
|
renderPlanet(child);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public void renderTransparent(Planet planet){
|
||||||
|
if(!planet.visible()) return;
|
||||||
|
|
||||||
if(planet.isLandable() && planet == this.planet){
|
if(planet.isLandable() && planet == this.planet){
|
||||||
renderSectors(planet);
|
renderSectors(planet);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(planet.parent != null && planet.hasAtmosphere && Core.settings.getBool("atmosphere")){
|
if(planet.parent != null && planet.hasAtmosphere && Core.settings.getBool("atmosphere")){
|
||||||
|
Gl.depthMask(false);
|
||||||
|
|
||||||
Blending.additive.apply();
|
Blending.additive.apply();
|
||||||
|
|
||||||
Shaders.atmosphere.camera = cam;
|
Shaders.atmosphere.camera = cam;
|
||||||
@@ -140,10 +153,12 @@ public class PlanetRenderer implements Disposable{
|
|||||||
atmosphere.render(Shaders.atmosphere, Gl.triangles);
|
atmosphere.render(Shaders.atmosphere, Gl.triangles);
|
||||||
|
|
||||||
Blending.normal.apply();
|
Blending.normal.apply();
|
||||||
|
|
||||||
|
Gl.depthMask(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
for(Planet child : planet.children){
|
for(Planet child : planet.children){
|
||||||
renderPlanet(child);
|
renderTransparent(child);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ import mindustry.world.*;
|
|||||||
public abstract class PlanetGenerator extends BasicGenerator implements HexMesher{
|
public abstract class PlanetGenerator extends BasicGenerator implements HexMesher{
|
||||||
protected IntSeq ints = new IntSeq();
|
protected IntSeq ints = new IntSeq();
|
||||||
protected Sector sector;
|
protected Sector sector;
|
||||||
|
protected Simplex noise = new Simplex();
|
||||||
|
|
||||||
/** Should generate sector bases for a planet. */
|
/** Should generate sector bases for a planet. */
|
||||||
public void generateSector(Sector sector){
|
public void generateSector(Sector sector){
|
||||||
@@ -46,6 +47,12 @@ public abstract class PlanetGenerator extends BasicGenerator implements HexMeshe
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
protected float noise(float x, float y, double octaves, double falloff, double scl, double mag){
|
||||||
|
Vec3 v = sector.rect.project(x, y);
|
||||||
|
return (float)noise.octaveNoise3D(octaves, falloff, 1f / scl, v.x, v.y, v.z) * (float)mag;
|
||||||
|
}
|
||||||
|
|
||||||
public void generate(Tiles tiles, Sector sec){
|
public void generate(Tiles tiles, Sector sec){
|
||||||
this.tiles = tiles;
|
this.tiles = tiles;
|
||||||
this.sector = sec;
|
this.sector = sec;
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ import mindustry.world.*;
|
|||||||
import static mindustry.Vars.*;
|
import static mindustry.Vars.*;
|
||||||
|
|
||||||
public class SerpuloPlanetGenerator extends PlanetGenerator{
|
public class SerpuloPlanetGenerator extends PlanetGenerator{
|
||||||
Simplex noise = new Simplex();
|
|
||||||
RidgedPerlin rid = new RidgedPerlin(1, 2);
|
RidgedPerlin rid = new RidgedPerlin(1, 2);
|
||||||
BaseGenerator basegen = new BaseGenerator();
|
BaseGenerator basegen = new BaseGenerator();
|
||||||
float scl = 5f;
|
float scl = 5f;
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ import static mindustry.Vars.*;
|
|||||||
|
|
||||||
public class Planet extends UnlockableContent{
|
public class Planet extends UnlockableContent{
|
||||||
/** Default spacing between planet orbits in world units. */
|
/** Default spacing between planet orbits in world units. */
|
||||||
private static final float orbitSpacing = 10f;
|
private static final float orbitSpacing = 9f;
|
||||||
/** intersect() temp var. */
|
/** intersect() temp var. */
|
||||||
private static final Vec3 intersectResult = new Vec3();
|
private static final Vec3 intersectResult = new Vec3();
|
||||||
/** Mesh used for rendering. Created on load() - will be null on the server! */
|
/** Mesh used for rendering. Created on load() - will be null on the server! */
|
||||||
@@ -33,6 +33,8 @@ public class Planet extends UnlockableContent{
|
|||||||
public Seq<Sector> sectors;
|
public Seq<Sector> sectors;
|
||||||
/** Radius of this planet's sphere. Does not take into account sattelites. */
|
/** Radius of this planet's sphere. Does not take into account sattelites. */
|
||||||
public float radius;
|
public float radius;
|
||||||
|
/** Atmosphere radius adjustment parameters. */
|
||||||
|
public float atmosphereRadIn = 0, atmosphereRadOut = 0.3f;
|
||||||
/** Orbital radius around the sun. Do not change unless you know exactly what you are doing.*/
|
/** Orbital radius around the sun. Do not change unless you know exactly what you are doing.*/
|
||||||
public float orbitRadius;
|
public float orbitRadius;
|
||||||
/** Total radius of this planet and all its children. */
|
/** Total radius of this planet and all its children. */
|
||||||
|
|||||||
@@ -103,7 +103,7 @@ public class Sector{
|
|||||||
|
|
||||||
/** @return whether the enemy has a generated base here. */
|
/** @return whether the enemy has a generated base here. */
|
||||||
public boolean hasEnemyBase(){
|
public boolean hasEnemyBase(){
|
||||||
return generateEnemyBase && (save == null || info.attack);
|
return ((generateEnemyBase && preset == null) || (preset != null && preset.captureWave == 0)) && (save == null || info.attack);
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isBeingPlayed(){
|
public boolean isBeingPlayed(){
|
||||||
|
|||||||
@@ -283,7 +283,7 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Sector current = state.getSector() != null && state.getSector().isBeingPlayed() ? state.getSector() : null;
|
Sector current = state.getSector() != null && state.getSector().isBeingPlayed() && state.getSector().planet == planets.planet ? state.getSector() : null;
|
||||||
|
|
||||||
if(current != null){
|
if(current != null){
|
||||||
planets.fill(current, hoverColor, -0.001f);
|
planets.fill(current, hoverColor, -0.001f);
|
||||||
@@ -418,6 +418,8 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
|
|||||||
Planet planet = content.planets().get(i);
|
Planet planet = content.planets().get(i);
|
||||||
if(planet.accessible){
|
if(planet.accessible){
|
||||||
pt.button(planet.localizedName, Styles.clearTogglet, () -> {
|
pt.button(planet.localizedName, Styles.clearTogglet, () -> {
|
||||||
|
selected = null;
|
||||||
|
launchSector = null;
|
||||||
renderer.planets.planet = planet;
|
renderer.planets.planet = planet;
|
||||||
}).width(200).height(40).growX().update(bb -> bb.setChecked(renderer.planets.planet == planet));
|
}).width(200).height(40).growX().update(bb -> bb.setChecked(renderer.planets.planet == planet));
|
||||||
pt.row();
|
pt.row();
|
||||||
@@ -485,6 +487,10 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
|
|||||||
hoverLabel.remove();
|
hoverLabel.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(launching && selected != null){
|
||||||
|
lookAt(selected, 0.1f);
|
||||||
|
}
|
||||||
|
|
||||||
if(showing()){
|
if(showing()){
|
||||||
Sector to = newPresets.peek();
|
Sector to = newPresets.peek();
|
||||||
|
|
||||||
|
|||||||
@@ -749,6 +749,14 @@ public class HudFragment extends Fragment{
|
|||||||
return builder;
|
return builder;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!state.rules.waves && state.isCampaign()){
|
||||||
|
builder.append("[lightgray]").append(Core.bundle.get("sector.curcapture"));
|
||||||
|
}
|
||||||
|
|
||||||
|
if(!state.rules.waves){
|
||||||
|
return builder;
|
||||||
|
}
|
||||||
|
|
||||||
if(state.rules.winWave > 1 && state.rules.winWave >= state.wave && state.isCampaign()){
|
if(state.rules.winWave > 1 && state.rules.winWave >= state.wave && state.isCampaign()){
|
||||||
builder.append(wavefc.get(state.wave, state.rules.winWave));
|
builder.append(wavefc.get(state.wave, state.rules.winWave));
|
||||||
}else{
|
}else{
|
||||||
@@ -774,9 +782,6 @@ public class HudFragment extends Fragment{
|
|||||||
return builder;
|
return builder;
|
||||||
}).growX().pad(8f);
|
}).growX().pad(8f);
|
||||||
|
|
||||||
table.update(() -> {
|
|
||||||
//table.background(state.rules.waves ? Tex.wavepane : null);
|
|
||||||
});
|
|
||||||
table.touchable(() -> state.rules.waves ? Touchable.enabled : Touchable.disabled);
|
table.touchable(() -> state.rules.waves ? Touchable.enabled : Touchable.disabled);
|
||||||
|
|
||||||
return table;
|
return table;
|
||||||
|
|||||||
@@ -174,7 +174,7 @@ public class UnitFactory extends UnitBlock{
|
|||||||
i.setScaling(Scaling.fit);
|
i.setScaling(Scaling.fit);
|
||||||
i.setColor(currentPlan == -1 ? Color.lightGray : Color.white);
|
i.setColor(currentPlan == -1 ? Color.lightGray : Color.white);
|
||||||
}).size(32).padBottom(-4).padRight(2);
|
}).size(32).padBottom(-4).padRight(2);
|
||||||
t.label(() -> currentPlan == -1 ? "@none" : plans.get(currentPlan).unit.localizedName).color(Color.lightGray);
|
t.label(() -> currentPlan == -1 ? "@none" : plans.get(currentPlan).unit.localizedName).wrap().width(230f).color(Color.lightGray);
|
||||||
}).left();
|
}).left();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
10
fastlane/metadata/android/en-US/changelogs/29702.txt
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
- Sound fixes for various platforms
|
||||||
|
- Added a few new sound effects
|
||||||
|
- Added stats for unit weapons (Contributed by @genNAowl)
|
||||||
|
- Logic: Added logical AND operation
|
||||||
|
- Disabled automatic targeting of derelict structures
|
||||||
|
- Campaign: Many various bugfixes
|
||||||
|
- Campaign: Added random water pool generation
|
||||||
|
- Campaign: Added more preset sectors
|
||||||
|
- Campaign: Removed item/liquid research costs, items are now discovered upon production
|
||||||
|
- Campaign: More scrap generation
|
||||||
@@ -1,3 +1,3 @@
|
|||||||
org.gradle.daemon=true
|
org.gradle.daemon=true
|
||||||
org.gradle.jvmargs=-Xms256m -Xmx1024m
|
org.gradle.jvmargs=-Xms256m -Xmx1024m
|
||||||
archash=079640f8ea3e46c1aff497f5f8a5e5f9c5197282
|
archash=f1feed86eb643c2e5dbcee013b1b186644b5cf98
|
||||||
|
|||||||