Compare commits

..

37 Commits

Author SHA1 Message Date
Anuken
6686584003 Merge remote-tracking branch 'origin/master' 2020-12-02 18:01:49 -05:00
Anuken
78c8c57649 Made water unlocked again 2020-12-02 18:01:46 -05:00
Anuken
ca65fd31e5 Merge pull request #3728 from Vortetty/patch-2
Update surrealment to v6
2020-12-02 17:23:09 -05:00
Vortetty
e2109f2f56 Update servers_be.json 2020-12-02 14:20:55 -08:00
Vortetty
6b63cd7a46 Update servers_v6.json 2020-12-02 14:19:54 -08:00
Anuken
e19c857d74 Possible crash fix 2020-12-02 16:08:53 -05:00
Anuken
b18f418c61 Reduced easy sector difficulty 2020-12-02 14:48:42 -05:00
Anuken
12ee38476c Minor build fix 2020-12-02 14:35:03 -05:00
Anuken
48c8357ff7 Added community server disclaimer 2020-12-02 14:32:51 -05:00
Anuken
a0702559f3 Fixed #3725 2020-12-02 14:14:42 -05:00
Anuken
55db91e53e Cleanup 2020-12-02 13:53:49 -05:00
Anuken
a333fa3722 Added more hints 2020-12-02 13:40:49 -05:00
Anuken
5284750c6a Merge remote-tracking branch 'origin/master' 2020-12-02 13:02:35 -05:00
Anuken
9c616fd03b Possible fix for notched insets 2020-12-02 13:02:27 -05:00
Anuken
d4bee41103 Merge pull request #3722 from Quezler/patch-77
Fast forward boulder deconstruction
2020-12-02 12:58:58 -05:00
Patrick 'Quezler' Mounier
2e586c4403 Update ConstructBlock.java 2020-12-02 18:54:46 +01:00
Patrick 'Quezler' Mounier
129f21e3a9 Update Boulder.java 2020-12-02 18:01:40 +01:00
Patrick 'Quezler' Mounier
435f15a450 Update ConstructBlock.java 2020-12-02 18:00:50 +01:00
Patrick 'Quezler' Mounier
3eac8cb6ad Update Boulder.java 2020-12-02 17:59:20 +01:00
Patrick 'Quezler' Mounier
ea96bf2675 Update Block.java 2020-12-02 17:58:58 +01:00
Patrick 'Quezler' Mounier
e4c3664cc6 Update ConstructBlock.java 2020-12-02 16:36:07 +01:00
Patrick 'Quezler' Mounier
664cd6a3a0 Update ConstructBlock.java 2020-12-02 16:26:22 +01:00
Anuken
c26a9bd123 Merge pull request #3715 from Quezler/patch-75
Keep items inside reconstructor when construction booped
2020-12-02 10:05:51 -05:00
Anuken
5008573aa5 Merge pull request #3714 from Recessive/patch-7
Update servers_v6.json
2020-12-02 09:58:15 -05:00
Anuken
395f7193ea Merge remote-tracking branch 'origin/master' 2020-12-02 09:56:06 -05:00
Anuken
775e17a726 Fixed #3709 2020-12-02 09:56:02 -05:00
Anuken
900ec8db6a Merge pull request #3717 from Quezler/patch-76
Fixes massdriver typo
2020-12-02 09:54:37 -05:00
Anuken
e23a7c213c Merge pull request #3710 from joshuaptfan/master
Spellcheck English Steam achievements
2020-12-02 09:53:46 -05:00
Anuken
96513e4967 Merge pull request #3712 from MEEPofFaith/patch-1
Why is this protected in the first place?
2020-12-02 09:52:31 -05:00
Patrick 'Quezler' Mounier
b64df565a4 Update MassDriver.java 2020-12-02 14:09:19 +01:00
Patrick 'Quezler' Mounier
382e27e1e4 Populate prevBuild when deconstructting 2020-12-02 12:02:49 +01:00
Patrick 'Quezler' Mounier
0dd95e736d Add items back to reconstructor if it overwrote itself 2020-12-02 12:01:21 +01:00
Recessive
0ae6a33971 Update servers_v6.json
Add {AA} Hub and Campaign servers
2020-12-02 21:56:47 +11:00
MEEP of Faith
380c9ab113 Why is this protected in the first place? 2020-12-01 22:17:32 -08:00
joshuaptfan
1028ade80d Fix Poly unit description 2020-12-01 21:07:44 -08:00
joshuaptfan
a8e34381ef Spellcheck Steam store description 2020-12-01 20:37:00 -08:00
joshuaptfan
5f5987cef2 Spellcheck English Steam achievements 2020-12-01 20:20:37 -08:00
31 changed files with 114 additions and 43 deletions

View File

@@ -253,18 +253,22 @@ project(":ios"){
task incrementConfig{ task incrementConfig{
def vfile = file('robovm.properties') def vfile = file('robovm.properties')
def bversion = getBuildVersion()
def props = new Properties() def props = new Properties()
if(vfile.exists()){ if(vfile.exists()){
props.load(new FileInputStream(vfile)) props.load(new FileInputStream(vfile))
}else{ }else{
props['app.id'] = 'io.anuke.mindustry' props['app.id'] = 'io.anuke.mindustry'
props['app.version'] = '5.0' props['app.version'] = '6.0'
props['app.mainclass'] = 'mindustry.IOSLauncher' props['app.mainclass'] = 'mindustry.IOSLauncher'
props['app.executable'] = 'IOSLauncher' props['app.executable'] = 'IOSLauncher'
props['app.name'] = 'Mindustry' props['app.name'] = 'Mindustry'
} }
props['app.build'] = (!props.containsKey("app.build") ? 40 : props['app.build'].toInteger() + 1) + "" props['app.build'] = (!props.containsKey("app.build") ? 40 : props['app.build'].toInteger() + 1) + ""
if(bversion != "custom build"){
props['app.version'] = versionNumber + "." + bversion + (bversion.contains(".") ? "" : ".0")
}
props.store(vfile.newWriter(), null) props.store(vfile.newWriter(), null)
} }

View File

@@ -196,6 +196,7 @@ servers.local = Local Servers
servers.remote = Remote Servers servers.remote = Remote Servers
servers.global = Community Servers servers.global = Community Servers
servers.disclaimer = Community servers are [accent]not[] owned or controlled by the developer.\n\nServers may contain user-generated content that is not appropriate for all ages.
servers.showhidden = Show Hidden Servers servers.showhidden = Show Hidden Servers
server.shown = Shown server.shown = Shown
server.hidden = Hidden server.hidden = Hidden
@@ -1279,6 +1280,8 @@ hint.payloadDrop.mobile = [accent]Tap and hold[] an empty location to drop a pay
hint.waveFire = [accent]Wave[] turrets with water as ammunition will automatically put out nearby fires. hint.waveFire = [accent]Wave[] turrets with water as ammunition will automatically put out nearby fires.
hint.generator = \uf879 [accent]Combustion Generators[] burn coal and transmit power to adjacent blocks.\n\nPower transmission range can be extended with \uf87f [accent]Power Nodes[]. hint.generator = \uf879 [accent]Combustion Generators[] burn coal and transmit power to adjacent blocks.\n\nPower transmission range can be extended with \uf87f [accent]Power Nodes[].
hint.guardian = [accent]Guardian[] units are armored. Weak ammo such as [accent]Copper[] and [accent]Lead[] is [scarlet]not effective[].\n\nUse higher tier turrets or \uf835 [accent]Graphite[] \uf861Duo/\uf859Salvo ammunition to take Guardians down. hint.guardian = [accent]Guardian[] units are armored. Weak ammo such as [accent]Copper[] and [accent]Lead[] is [scarlet]not effective[].\n\nUse higher tier turrets or \uf835 [accent]Graphite[] \uf861Duo/\uf859Salvo ammunition to take Guardians down.
hint.coreUpgrade = Cores can be upgraded by [accent]placing higher-tier cores over them[].\n\nPlace a  [accent]Foundation[] core over the  [accent]Shard[] core. Make sure it is free from nearby obstructions.
hint.presetLaunch = Gray [accent]landing zone sectors[], such as [accent]Frozen Forest[], can be launched to from anywhere. They do not require capture of nearby territory.\n\n[accent]Numbered sectors[], such as this one, are [accent]optional[].
item.copper.description = Used in all types of construction and ammunition. item.copper.description = Used in all types of construction and ammunition.
item.copper.details = Copper. Abnormally abundant metal on Serpulo. Structurally weak unless reinforced. item.copper.details = Copper. Abnormally abundant metal on Serpulo. Structurally weak unless reinforced.
@@ -1473,7 +1476,7 @@ unit.zenith.description = Fires salvos of missiles at all nearby enemies.
unit.antumbra.description = Fires a barrage of bullets at all nearby enemies. unit.antumbra.description = Fires a barrage of bullets at all nearby enemies.
unit.eclipse.description = Fires two piercing lasers and a barrage of flak at all nearby enemies. unit.eclipse.description = Fires two piercing lasers and a barrage of flak at all nearby enemies.
unit.mono.description = Automatically mines copper and lead, depositing it into the core. unit.mono.description = Automatically mines copper and lead, depositing it into the core.
unit.poly.description = Automatically rebuilds damaged structures and assists other units in construction. unit.poly.description = Automatically rebuilds destroyed structures and assists other units in construction.
unit.mega.description = Automatically repairs damaged structures. Capable of carrying blocks and small ground units. unit.mega.description = Automatically repairs damaged structures. Capable of carrying blocks and small ground units.
unit.quad.description = Drops large bombs on ground targets, repairing allied structures and damaging enemies. Capable of carrying medium-sized ground units. unit.quad.description = Drops large bombs on ground targets, repairing allied structures and damaging enemies. Capable of carrying medium-sized ground units.
unit.oct.description = Protects nearby allies with its regenerating shield. Capable of carrying most ground units. unit.oct.description = Protects nearby allies with its regenerating shield. Capable of carrying most ground units.

View File

@@ -12,6 +12,7 @@ public class Liquids implements ContentList{
water = new Liquid("water", Color.valueOf("596ab8")){{ water = new Liquid("water", Color.valueOf("596ab8")){{
heatCapacity = 0.4f; heatCapacity = 0.4f;
alwaysUnlocked = true;
effect = StatusEffects.wet; effect = StatusEffects.wet;
}}; }};

View File

@@ -714,8 +714,14 @@ public class TechTree implements ContentList{
finishedRequirements[i] = new ItemStack(requirements[i].item, Core.settings == null ? 0 : Core.settings.getInt("req-" + content.name + "-" + requirements[i].item.name)); finishedRequirements[i] = new ItemStack(requirements[i].item, Core.settings == null ? 0 : Core.settings.getInt("req-" + content.name + "-" + requirements[i].item.name));
} }
var used = new ObjectSet<Content>();
//add dependencies as objectives. //add dependencies as objectives.
content.getDependencies(d -> objectives.add(new Research(d))); content.getDependencies(d -> {
if(used.add(d)){
objectives.add(new Research(d));
}
});
map.put(content, this); map.put(content, this);
all.add(this); all.add(this);

View File

@@ -75,7 +75,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.75f; opacityMultiplier = 0.5f;
force = 0.1f; force = 0.1f;
sound = Sounds.wind; sound = Sounds.wind;
soundVol = 0.7f; soundVol = 0.7f;

View File

@@ -92,6 +92,12 @@ public class UI implements ApplicationListener, Loadable{
Core.scene = new Scene(); Core.scene = new Scene();
Core.input.addProcessor(Core.scene); Core.input.addProcessor(Core.scene);
int[] insets = Core.graphics.getSafeInsets();
Core.scene.marginLeft = insets[0];
Core.scene.marginRight = insets[1];
Core.scene.marginTop = insets[2];
Core.scene.marginBottom = insets[3];
Tex.load(); Tex.load();
Icon.load(); Icon.load();
Styles.load(); Styles.load();

View File

@@ -6,7 +6,7 @@ import mindustry.gen.*;
import mindustry.content.*; import mindustry.content.*;
public class LaserBoltBulletType extends BasicBulletType{ public class LaserBoltBulletType extends BasicBulletType{
protected float height = 7f, width = 2f; public float width = 2f, height = 7f;
public LaserBoltBulletType(float speed, float damage){ public LaserBoltBulletType(float speed, float damage){
super(speed, damage); super(speed, damage);

View File

@@ -91,7 +91,7 @@ abstract class BuilderComp implements Posc, Teamc, Rotc{
plans.removeFirst(); plans.removeFirst();
return; return;
} }
}else if(tile.team() != team){ }else if(tile.team() != team && tile.team() != Team.derelict){
plans.removeFirst(); plans.removeFirst();
return; return;
} }

View File

@@ -68,13 +68,12 @@ public class Schematics implements Loadable{
shadowBuffer.dispose(); shadowBuffer.dispose();
if(errorTexture != null){ if(errorTexture != null){
errorTexture.dispose(); errorTexture.dispose();
errorTexture = null;
} }
}); });
Events.on(ClientLoadEvent.class, event -> { Events.on(ClientLoadEvent.class, event -> {
Pixmap pixmap = Core.atlas.getPixmap("error").crop(); errorTexture = new Texture("sprites/error.png");
errorTexture = new Texture(pixmap);
pixmap.dispose();
}); });
} }

View File

@@ -10,7 +10,7 @@ import mindustry.type.*;
import static mindustry.content.UnitTypes.*; import static mindustry.content.UnitTypes.*;
public class Waves{ public class Waves{
public static final int waveVersion = 4; public static final int waveVersion = 5;
private Seq<SpawnGroup> spawns; private Seq<SpawnGroup> spawns;
@@ -277,7 +277,7 @@ public class Waves{
int cap = 150; int cap = 150;
float shieldStart = 30, shieldsPerWave = 20 + difficulty*30f; float shieldStart = 30, shieldsPerWave = 20 + difficulty*30f;
float[] scaling = {1, 1.5f, 3f, 4f, 5f}; float[] scaling = {1, 2f, 3f, 4f, 5f};
Intc createProgression = start -> { Intc createProgression = start -> {
//main sequence //main sequence

View File

@@ -83,8 +83,9 @@ public class JsonIO{
@Override @Override
public Sector read(Json json, JsonValue jsonData, Class type){ public Sector read(Json json, JsonValue jsonData, Class type){
String[] split = jsonData.asString().split("-"); String name = jsonData.asString();
return Vars.content.<Planet>getByName(ContentType.planet, split[0]).sectors.get(Integer.parseInt(split[1])); int idx = name.lastIndexOf('-');
return Vars.content.<Planet>getByName(ContentType.planet, name.substring(0, idx)).sectors.get(Integer.parseInt(name.substring(idx + 1)));
} }
}); });

View File

@@ -402,7 +402,16 @@ public class JoinDialog extends BaseDialog{
container.button(b -> buildServer(host, b), Styles.cleart, () -> { container.button(b -> buildServer(host, b), Styles.cleart, () -> {
Events.fire(new ClientPreConnectEvent(host)); Events.fire(new ClientPreConnectEvent(host));
if(!Core.settings.getBool("server-disclaimer", false)){
ui.showCustomConfirm("@warning", "@servers.disclaimer", "@ok", "@back", () -> {
Core.settings.put("server-disclaimer", true);
safeConnect(host.address, host.port, host.version); safeConnect(host.address, host.port, host.version);
}, () -> {
Core.settings.put("server-disclaimer", false);
});
}else{
safeConnect(host.address, host.port, host.version);
}
}).width(w).row(); }).width(w).row();
} }

View File

@@ -144,7 +144,10 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
//load legacy research //load legacy research
if(Core.settings.has("unlocks") && !Core.settings.has("junction-unlocked")){ if(Core.settings.has("unlocks") && !Core.settings.has("junction-unlocked")){
Core.app.post(() -> { Core.app.post(() -> {
ui.showCustomConfirm("@research", "@research.legacy", "@research.load", "@research.discard", LegacyIO::readResearch, () -> Core.settings.remove("unlocks")); ui.showCustomConfirm("@research", "@research.legacy", "@research.load", "@research.discard", () -> {
LegacyIO.readResearch();
Core.settings.remove("unlocks");
}, () -> Core.settings.remove("unlocks"));
}); });
} }
@@ -490,7 +493,7 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
hoverLabel.touchable = Touchable.disabled; hoverLabel.touchable = Touchable.disabled;
Vec3 pos = planets.cam.project(Tmp.v31.set(hovered.tile.v).setLength(PlanetRenderer.outlineRad).rotate(Vec3.Y, -planets.planet.getRotation()).add(planets.planet.position)); Vec3 pos = planets.cam.project(Tmp.v31.set(hovered.tile.v).setLength(PlanetRenderer.outlineRad).rotate(Vec3.Y, -planets.planet.getRotation()).add(planets.planet.position));
hoverLabel.setPosition(pos.x, pos.y, Align.center); hoverLabel.setPosition(pos.x, pos.y - Core.scene.marginBottom, Align.center);
hoverLabel.getText().setLength(0); hoverLabel.getText().setLength(0);
if(hovered != null){ if(hovered != null){

View File

@@ -124,7 +124,7 @@ public class ChatFragment extends Table{
Draw.color(shadowColor); Draw.color(shadowColor);
if(shown){ if(shown){
Fill.crect(offsetx, chatfield.y, chatfield.getWidth() + 15f, chatfield.getHeight() - 1); Fill.crect(offsetx, chatfield.y + scene.marginBottom, chatfield.getWidth() + 15f, chatfield.getHeight() - 1);
} }
super.draw(); super.draw();
@@ -137,7 +137,7 @@ public class ChatFragment extends Table{
Draw.color(shadowColor); Draw.color(shadowColor);
Draw.alpha(shadowColor.a * opacity); Draw.alpha(shadowColor.a * opacity);
float theight = offsety + spacing + getMarginBottom(); float theight = offsety + spacing + getMarginBottom() + scene.marginBottom;
for(int i = scrollPos; i < messages.size && i < messagesShown + scrollPos && (i < fadetime || shown); i++){ for(int i = scrollPos; i < messages.size && i < messagesShown + scrollPos && (i < fadetime || shown); i++){
layout.setText(font, messages.get(i).formattedMessage, Color.white, textWidth, Align.bottomLeft, true); layout.setText(font, messages.get(i).formattedMessage, Color.white, textWidth, Align.bottomLeft, true);

View File

@@ -162,6 +162,16 @@ public class HintsFragment extends Fragment{
waveFire(() -> Groups.fire.size() > 0 && Blocks.wave.unlockedNow(), () -> indexer.getAllied(state.rules.defaultTeam, BlockFlag.extinguisher).size() > 0), waveFire(() -> Groups.fire.size() > 0 && Blocks.wave.unlockedNow(), () -> indexer.getAllied(state.rules.defaultTeam, BlockFlag.extinguisher).size() > 0),
generator(() -> control.input.block == Blocks.combustionGenerator, () -> ui.hints.placedBlocks.contains(Blocks.combustionGenerator)), generator(() -> control.input.block == Blocks.combustionGenerator, () -> ui.hints.placedBlocks.contains(Blocks.combustionGenerator)),
guardian(() -> state.boss() != null && state.boss().armor >= 4, () -> state.boss() == null), guardian(() -> state.boss() != null && state.boss().armor >= 4, () -> state.boss() == null),
coreUpgrade(() -> state.isCampaign() && Blocks.coreFoundation.unlocked()
&& state.rules.defaultTeam.core() != null
&& state.rules.defaultTeam.core().block == Blocks.coreShard
&& state.rules.defaultTeam.core().items.has(Blocks.coreFoundation.requirements),
() -> ui.hints.placedBlocks.contains(Blocks.coreFoundation)),
presetLaunch(() -> state.isCampaign()
&& state.getSector().preset == null
&& SectorPresets.frozenForest.unlocked()
&& SectorPresets.frozenForest.sector.save == null,
() -> state.isCampaign() && state.getSector().preset == SectorPresets.frozenForest),
; ;
@Nullable @Nullable

View File

@@ -1,7 +1,9 @@
package mindustry.ui.fragments; package mindustry.ui.fragments;
import arc.*;
import arc.func.*; import arc.func.*;
import arc.graphics.*; import arc.graphics.*;
import arc.graphics.g2d.*;
import arc.scene.*; import arc.scene.*;
import arc.scene.actions.*; import arc.scene.actions.*;
import arc.scene.event.*; import arc.scene.event.*;
@@ -18,7 +20,12 @@ public class LoadingFragment extends Fragment{
@Override @Override
public void build(Group parent){ public void build(Group parent){
parent.fill(Styles.black8, t -> { parent.fill(t -> {
//rect must fill screen completely.
t.rect((x, y, w, h) -> {
Draw.alpha(t.color.a);
Styles.black8.draw(0, 0, Core.graphics.getWidth(), Core.graphics.getHeight());
});
t.visible = false; t.visible = false;
t.touchable = Touchable.enabled; t.touchable = Touchable.enabled;
t.add().height(133f).row(); t.add().height(133f).row();

View File

@@ -77,12 +77,13 @@ public class MenuFragment extends Fragment{
String versionText = ((Version.build == -1) ? "[#fc8140aa]" : "[#ffffffba]") + Version.combined(); String versionText = ((Version.build == -1) ? "[#fc8140aa]" : "[#ffffffba]") + Version.combined();
parent.fill((x, y, w, h) -> { parent.fill((x, y, w, h) -> {
TextureRegion logo = Core.atlas.find("logo"); TextureRegion logo = Core.atlas.find("logo");
float width = Core.graphics.getWidth(), height = Core.graphics.getHeight() - Core.scene.marginTop;
float logoscl = Scl.scl(1); float logoscl = Scl.scl(1);
float logow = Math.min(logo.width * logoscl, Core.graphics.getWidth() - Scl.scl(20)); float logow = Math.min(logo.width * logoscl, Core.graphics.getWidth() - Scl.scl(20));
float logoh = logow * (float)logo.height / logo.width; float logoh = logow * (float)logo.height / logo.width;
float fx = (int)(Core.graphics.getWidth() / 2f); float fx = (int)(width / 2f);
float fy = (int)(Core.graphics.getHeight() - 6 - logoh) + logoh / 2 - (Core.graphics.isPortrait() ? Scl.scl(30f) : 0f); float fy = (int)(height - 6 - logoh) + logoh / 2 - (Core.graphics.isPortrait() ? Scl.scl(30f) : 0f);
Draw.color(); Draw.color();
Draw.rect(logo, fx, fy, logow, logoh); Draw.rect(logo, fx, fy, logow, logoh);
@@ -230,7 +231,7 @@ public class MenuFragment extends Fragment{
submenu.clearChildren(); submenu.clearChildren();
fadeInMenu(); fadeInMenu();
//correctly offset the button //correctly offset the button
submenu.add().height((Core.graphics.getHeight() - out[0].getY(Align.topLeft)) / Scl.scl(1f)); submenu.add().height((Core.graphics.getHeight() - Core.scene.marginTop - Core.scene.marginBottom - out[0].getY(Align.topLeft)) / Scl.scl(1f));
submenu.row(); submenu.row();
buttons(submenu, b.submenu); buttons(submenu, b.submenu);
}else{ }else{

View File

@@ -28,7 +28,7 @@ public class MinimapFragment extends Fragment{
float size = baseSize * zoom * world.width(); float size = baseSize * zoom * world.width();
Draw.color(Color.black); Draw.color(Color.black);
Fill.crect(x, y, w, h); Fill.crect(0, 0, w, h);
if(renderer.minimap.getTexture() != null){ if(renderer.minimap.getTexture() != null){
Draw.color(); Draw.color();

View File

@@ -112,7 +112,7 @@ public class ScriptConsoleFragment extends Table{
Draw.color(shadowColor); Draw.color(shadowColor);
if(open){ if(open){
Fill.crect(offsetx, chatfield.y, chatfield.getWidth() + 15f, chatfield.getHeight() - 1); Fill.crect(offsetx, chatfield.y + scene.marginBottom, chatfield.getWidth() + 15f, chatfield.getHeight() - 1);
} }
super.draw(); super.draw();
@@ -125,7 +125,7 @@ public class ScriptConsoleFragment extends Table{
Draw.color(shadowColor); Draw.color(shadowColor);
Draw.alpha(shadowColor.a * opacity); Draw.alpha(shadowColor.a * opacity);
float theight = offsety + spacing + getMarginBottom(); float theight = offsety + spacing + getMarginBottom() + scene.marginBottom;
for(int i = scrollPos; i < messages.size && i < messagesShown + scrollPos; i++){ for(int i = scrollPos; i < messages.size && i < messagesShown + scrollPos; i++){
layout.setText(font, messages.get(i), Color.white, textWidth, Align.bottomLeft, true); layout.setText(font, messages.get(i), Color.white, textWidth, Align.bottomLeft, true);

View File

@@ -126,7 +126,7 @@ public class Block extends UnlockableContent{
public BlockGroup group = BlockGroup.none; public BlockGroup group = BlockGroup.none;
/** List of block flags. Used for AI indexing. */ /** List of block flags. Used for AI indexing. */
public EnumSet<BlockFlag> flags = EnumSet.of(); public EnumSet<BlockFlag> flags = EnumSet.of();
/** Targeting priority of this block, as seen by enemies.*/ /** Targeting priority of this block, as seen by enemies .*/
public TargetPriority priority = TargetPriority.base; public TargetPriority priority = TargetPriority.base;
/** How much this block affects the unit cap by. /** How much this block affects the unit cap by.
* The block flags must contain unitModifier in order for this to work. */ * The block flags must contain unitModifier in order for this to work. */
@@ -139,9 +139,9 @@ public class Block extends UnlockableContent{
public boolean consumesTap; public boolean consumesTap;
/** Whether to draw the glow of the liquid for this block, if it has one. */ /** Whether to draw the glow of the liquid for this block, if it has one. */
public boolean drawLiquidLight = true; public boolean drawLiquidLight = true;
/** Whether to periodically sync this block across the network.*/ /** Whether to periodically sync this block across the network. */
public boolean sync; public boolean sync;
/** Whether this block uses conveyor-type placement mode.*/ /** Whether this block uses conveyor-type placement mode. */
public boolean conveyorPlacement; public boolean conveyorPlacement;
/** /**
* The color of this block when displayed on the minimap or map preview. * The color of this block when displayed on the minimap or map preview.
@@ -173,12 +173,12 @@ public class Block extends UnlockableContent{
/** Radius of the light emitted by this block. */ /** Radius of the light emitted by this block. */
public float lightRadius = 60f; public float lightRadius = 60f;
/** The sound that this block makes while active. One sound loop. Do not overuse.*/ /** The sound that this block makes while active. One sound loop. Do not overuse. */
public Sound loopSound = Sounds.none; public Sound loopSound = Sounds.none;
/** Active sound base volume. */ /** Active sound base volume. */
public float loopSoundVolume = 0.5f; public float loopSoundVolume = 0.5f;
/** The sound that this block makes while idle. Uses one sound loop for all blocks.*/ /** The sound that this block makes while idle. Uses one sound loop for all blocks. */
public Sound ambientSound = Sounds.none; public Sound ambientSound = Sounds.none;
/** Idle sound base volume. */ /** Idle sound base volume. */
public float ambientSoundVolume = 0.05f; public float ambientSoundVolume = 0.05f;
@@ -193,6 +193,8 @@ public class Block extends UnlockableContent{
public BuildVisibility buildVisibility = BuildVisibility.hidden; public BuildVisibility buildVisibility = BuildVisibility.hidden;
/** Multiplier for speed of building this block. */ /** Multiplier for speed of building this block. */
public float buildCostMultiplier = 1f; public float buildCostMultiplier = 1f;
/** Build completion at which deconstruction finishes. */
public float deconstructThreshold = 0f;
/** Multiplier for cost of research in tech tree. */ /** Multiplier for cost of research in tech tree. */
public float researchCostMultiplier = 1; public float researchCostMultiplier = 1;
/** Whether this block has instant transfer.*/ /** Whether this block has instant transfer.*/

View File

@@ -37,8 +37,12 @@ public class Build{
Block previous = tile.block(); Block previous = tile.block();
Block sub = ConstructBlock.get(previous.size); Block sub = ConstructBlock.get(previous.size);
Seq<Building> prevBuild = new Seq<>(1);
if(tile.build != null) prevBuild.add(tile.build);
tile.setBlock(sub, team, rotation); tile.setBlock(sub, team, rotation);
tile.<ConstructBuild>bc().setDeconstruct(previous); tile.<ConstructBuild>bc().setDeconstruct(previous);
tile.<ConstructBuild>bc().prevBuild = prevBuild;
tile.build.health = tile.build.maxHealth * prevPercent; tile.build.health = tile.build.maxHealth * prevPercent;
if(unit != null && unit.isPlayer()) tile.build.lastAccessed = unit.getPlayer().name; if(unit != null && unit.isPlayer()) tile.build.lastAccessed = unit.getPlayer().name;

View File

@@ -289,7 +289,7 @@ public class ConstructBlock extends Block{
progress = Mathf.clamp(progress - amount); progress = Mathf.clamp(progress - amount);
if(progress <= 0 || state.rules.infiniteResources){ if(progress <= (previous == null ? 0 : previous.deconstructThreshold) || state.rules.infiniteResources){
if(lastBuilder == null) lastBuilder = builder; if(lastBuilder == null) lastBuilder = builder;
Call.deconstructFinish(tile, this.cblock == null ? previous : this.cblock, lastBuilder); Call.deconstructFinish(tile, this.cblock == null ? previous : this.cblock, lastBuilder);
} }

View File

@@ -242,7 +242,7 @@ public class MassDriver extends Block{
@Override @Override
public boolean acceptItem(Building source, Item item){ public boolean acceptItem(Building source, Item item){
//mass drivers that ouput only cannot accept items //mass drivers that output only cannot accept items
return items.total() < itemCapacity && linkValid(); return items.total() < itemCapacity && linkValid();
} }

View File

@@ -12,6 +12,8 @@ public class Boulder extends Block{
super(name); super(name);
breakable = true; breakable = true;
alwaysReplace = true; alwaysReplace = true;
deconstructThreshold = 0.35f;
} }
@Override @Override

View File

@@ -114,6 +114,13 @@ public class Reconstructor extends UnitBlock{
return capacities[item.id]; return capacities[item.id];
} }
@Override
public void overwrote(Seq<Building> builds){
if(builds.first().block == block){
items.add(builds.first().items);
}
}
@Override @Override
public void draw(){ public void draw(){
Draw.rect(region, x, y); Draw.rect(region, x, y);

View File

@@ -0,0 +1,5 @@
[This is a truncated changelog, see Github for full notes]
Yeah, it's another hotfix. I missed these during earlier testing.
- Fixed research deadlock caused by blocks requiring optional inputs as research
- Possible fix for "Unsupported combination of formats" startup error

View File

@@ -56,21 +56,21 @@
"NEW_ACHIEVEMENT_21_3_NAME" "Swarm" "NEW_ACHIEVEMENT_21_3_NAME" "Swarm"
"NEW_ACHIEVEMENT_21_3_DESC" "Have 100 units active at once." "NEW_ACHIEVEMENT_21_3_DESC" "Have 100 units active at once."
"NEW_ACHIEVEMENT_21_4_NAME" "Flock" "NEW_ACHIEVEMENT_21_4_NAME" "Flock"
"NEW_ACHIEVEMENT_21_4_DESC" "Have 10 Phantom Poly drones active at once." "NEW_ACHIEVEMENT_21_4_DESC" "Have 10 Poly drones active at once."
"NEW_ACHIEVEMENT_21_5_NAME" "Roboticist" "NEW_ACHIEVEMENT_21_5_NAME" "Roboticist"
"NEW_ACHIEVEMENT_21_5_DESC" "Build every type of unit." "NEW_ACHIEVEMENT_21_5_DESC" "Build every type of unit."
"NEW_ACHIEVEMENT_21_6_NAME" "Legions" "NEW_ACHIEVEMENT_21_6_NAME" "Legions"
"NEW_ACHIEVEMENT_21_6_DESC" "Build 1000 units total." "NEW_ACHIEVEMENT_21_6_DESC" "Build 1000 units total."
"NEW_ACHIEVEMENT_21_9_NAME" "You Should've Listened" "NEW_ACHIEVEMENT_21_9_NAME" "You Should've Listened"
"NEW_ACHIEVEMENT_21_9_DESC" "Die in the drop point exclusion zone." "NEW_ACHIEVEMENT_21_9_DESC" "Die in the drop point exclusion zone."
"NEW_ACHIEVEMENT_21_10_NAME" "There are naval units for that." "NEW_ACHIEVEMENT_21_10_NAME" "There Are Naval Units For That"
"NEW_ACHIEVEMENT_21_10_DESC" "Drown." "NEW_ACHIEVEMENT_21_10_DESC" "Drown."
"NEW_ACHIEVEMENT_21_11_NAME" "Collector" "NEW_ACHIEVEMENT_21_11_NAME" "Collector"
"NEW_ACHIEVEMENT_21_11_DESC" "Fill the core to maximum capacity with every type of material." "NEW_ACHIEVEMENT_21_11_DESC" "Fill the core to maximum capacity with every type of material."
"NEW_ACHIEVEMENT_21_12_NAME" "Crowd" "NEW_ACHIEVEMENT_21_12_NAME" "Crowd"
"NEW_ACHIEVEMENT_21_12_DESC" "Host a server with 10 players on it." "NEW_ACHIEVEMENT_21_12_DESC" "Host a server with 10 players on it."
"NEW_ACHIEVEMENT_21_13_NAME" "Invulnerable" "NEW_ACHIEVEMENT_21_13_NAME" "Invulnerable"
"NEW_ACHIEVEMENT_21_13_DESC" "Build the Meltdown and, Spectre and Foreshadow.." "NEW_ACHIEVEMENT_21_13_DESC" "Build the Meltdown, Spectre and Foreshadow."
"NEW_ACHIEVEMENT_21_14_NAME" "Liftoff" "NEW_ACHIEVEMENT_21_14_NAME" "Liftoff"
"NEW_ACHIEVEMENT_21_14_DESC" "Use the Launch Pad." "NEW_ACHIEVEMENT_21_14_DESC" "Use the Launch Pad."
"NEW_ACHIEVEMENT_21_16_NAME" "Heresy" "NEW_ACHIEVEMENT_21_16_NAME" "Heresy"
@@ -90,7 +90,7 @@
"NEW_ACHIEVEMENT_21_23_NAME" "Ignition" "NEW_ACHIEVEMENT_21_23_NAME" "Ignition"
"NEW_ACHIEVEMENT_21_23_DESC" "Power up an Impact Reactor." "NEW_ACHIEVEMENT_21_23_DESC" "Power up an Impact Reactor."
"NEW_ACHIEVEMENT_21_24_NAME" "Acceleration" "NEW_ACHIEVEMENT_21_24_NAME" "Acceleration"
"NEW_ACHIEVEMENT_21_24_DESC" "Activate the Interplanteary Accelerator." "NEW_ACHIEVEMENT_21_24_DESC" "Activate the Interplanetary Accelerator."
"NEW_ACHIEVEMENT_21_25_NAME" "The Spiral" "NEW_ACHIEVEMENT_21_25_NAME" "The Spiral"
"NEW_ACHIEVEMENT_21_25_DESC" "Round and round it goes..." "NEW_ACHIEVEMENT_21_25_DESC" "Round and round it goes..."
"NEW_ACHIEVEMENT_21_26_NAME" "Escalation" "NEW_ACHIEVEMENT_21_26_NAME" "Escalation"

View File

@@ -43,10 +43,10 @@
[list] [list]
[*] 16 built in maps for custom games, in addition to campaign [*] 16 built in maps for custom games, in addition to campaign
[*] Play Co-op, PvP or sandbox [*] Play co-op, PvP or sandbox
[*] Join a public dedicated server, or invite friends to your own private session [*] Join a public dedicated server, or invite friends to your own private session
[*] Customizable game rules: Change block costs, enemy stats, starting items, wave timing and more [*] Customizable game rules: Change block costs, enemy stats, starting items, wave timing and more
[*] Mix&match gamemodes: Combine PvP and PvE gamemodes together [*] Mix & match gamemodes: Combine PvP and PvE gamemodes together
[/list] [/list]
[h2]Custom Map Editor[/h2] [h2]Custom Map Editor[/h2]

View File

@@ -1,3 +1,3 @@
org.gradle.daemon=true org.gradle.daemon=true
org.gradle.jvmargs=-Xms256m -Xmx1024m org.gradle.jvmargs=-Xms256m -Xmx1024m
archash=e13f9a192be0bad00766ff15a6bf7d2897ba00d1 archash=3ed298e35dafc98667875c397c7cb0d0f1fcbc07

View File

@@ -5,9 +5,6 @@
{ {
"address": "nydustry.nydus.app:6060" "address": "nydustry.nydus.app:6060"
}, },
{
"address": "md.surrealment.com"
},
{ {
"address": "routerchain.ddns.net:6568" "address": "routerchain.ddns.net:6568"
}, },

View File

@@ -5,7 +5,7 @@
}, },
{ {
"name": "{AA}", "name": "{AA}",
"address": ["aamindustry.play.ai:6571", "aamindustry.play.ai:6572"] "address": ["aamindustry.play.ai", "aamindustry.play.ai:6571", "aamindustry.play.ai:6572", "aamindustry.play.ai:6573"]
}, },
{ {
"name": "Atanner", "name": "Atanner",
@@ -42,5 +42,9 @@
{ {
"name": "Gearblock", "name": "Gearblock",
"address": ["attack.gearblock.app"] "address": ["attack.gearblock.app"]
},
{
"name": "Surrealment",
"address": ["md.surrealment.com"]
} }
] ]