Various tweaks and bugfixes

This commit is contained in:
Anuken
2020-11-22 21:20:33 -05:00
parent 3db2fea32b
commit ecea8eab01
27 changed files with 9363 additions and 9208 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 682 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 683 B

View File

@@ -813,7 +813,7 @@ setting.smoothcamera.name = Smooth Camera
setting.vsync.name = VSync
setting.pixelate.name = Pixelate
setting.minimap.name = Show Minimap
setting.coreitems.name = Display Core Items (WIP)
setting.coreitems.name = Display Core Items
setting.position.name = Show Player Position
setting.musicvol.name = Music Volume
setting.atmosphere.name = Show Planet Atmosphere
@@ -894,6 +894,7 @@ keybind.pause.name = Pause
keybind.pause_building.name = Pause/Resume Building
keybind.minimap.name = Minimap
keybind.planet_map.name = Planet Map
keybind.research.name = Research
keybind.chat.name = Chat
keybind.player_list.name = Player List
keybind.console.name = Console
@@ -1018,6 +1019,7 @@ block.resupply-point.name = Resupply Point
block.parallax.name = Parallax
block.cliff.name = Cliff
block.sand-boulder.name = Sand Boulder
block.basalt-boulder.name = Basalt Boulder
block.grass.name = Grass
block.slag.name = Slag
block.space.name = Space
@@ -1273,6 +1275,7 @@ hint.payloadPickup.mobile = [accent]Tap and hold[] a small block or unit to pick
hint.payloadDrop = Press [accent]][] to drop a payload.
hint.payloadDrop.mobile = [accent]Tap and hold[] an empty location to drop a payload there.
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[].
item.copper.description = Used in all types of construction and ammunition.
item.copper.details = Copper. Abnormally abundant metal on Serpulo. Structurally weak unless reinforced.

View File

@@ -317,3 +317,4 @@
63419=legacy-unit-factory-air|block-legacy-unit-factory-air-medium
63418=legacy-unit-factory-ground|block-legacy-unit-factory-ground-medium
63417=interplanetary-accelerator|block-interplanetary-accelerator-medium
63416=basalt-boulder|block-basalt-boulder-medium

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 828 B

After

Width:  |  Height:  |  Size: 831 B

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 675 KiB

After

Width:  |  Height:  |  Size: 667 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 186 KiB

After

Width:  |  Height:  |  Size: 186 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 437 KiB

After

Width:  |  Height:  |  Size: 440 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 MiB

After

Width:  |  Height:  |  Size: 1.4 MiB

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.0 MiB

After

Width:  |  Height:  |  Size: 3.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 187 KiB

After

Width:  |  Height:  |  Size: 187 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 438 KiB

After

Width:  |  Height:  |  Size: 438 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 MiB

After

Width:  |  Height:  |  Size: 1.4 MiB

View File

@@ -45,7 +45,7 @@ public class BuilderAI extends AIController{
BuildPlan req = unit.buildPlan();
boolean valid =
(req.tile().build instanceof ConstructBuild && req.tile().<ConstructBuild>bc().cblock == req.block) ||
(req.tile() != null && req.tile().build instanceof ConstructBuild && req.tile().<ConstructBuild>bc().cblock == req.block) ||
(req.breaking ?
Build.validBreak(unit.team(), req.x, req.y) :
Build.validPlace(req.block, unit.team(), req.x, req.y, req.rotation));

View File

@@ -39,7 +39,7 @@ public class Blocks implements ContentList{
//environment
air, spawn, cliff, deepwater, water, taintedWater, tar, slag, stone, craters, charr, sand, darksand, dirt, mud, ice, snow, darksandTaintedWater, space,
dacite, stoneWall, dirtWall, sporeWall, iceWall, daciteWall, sporePine, snowPine, pine, shrubs, whiteTree, whiteTreeDead, sporeCluster,
iceSnow, sandWater, darksandWater, duneWall, sandWall, moss, sporeMoss, shale, shaleWall, shaleBoulder, sandBoulder, daciteBoulder, boulder, snowBoulder, grass, salt,
iceSnow, sandWater, darksandWater, duneWall, sandWall, moss, sporeMoss, shale, shaleWall, shaleBoulder, sandBoulder, daciteBoulder, boulder, snowBoulder, basaltBoulder, grass, salt,
metalFloor, metalFloorDamaged, metalFloor2, metalFloor3, metalFloor5, basalt, magmarock, hotrock, snowWall, saltWall,
darkPanel1, darkPanel2, darkPanel3, darkPanel4, darkPanel5, darkPanel6, darkMetal,
pebbles, tendrils,
@@ -415,6 +415,10 @@ public class Blocks implements ContentList{
variants = 2;
}};
basaltBoulder = new Boulder("basalt-boulder"){{
variants = 2;
}};
moss = new Floor("moss"){{
variants = 3;
attributes.set(Attribute.spores, 0.15f);
@@ -1153,7 +1157,7 @@ public class Blocks implements ContentList{
}};
battery = new Battery("battery"){{
requirements(Category.power, with(Items.copper, 4, Items.lead, 20));
requirements(Category.power, with(Items.copper, 5, Items.lead, 20));
consumes.powerBuffered(4000f);
}};
@@ -1354,7 +1358,7 @@ public class Blocks implements ContentList{
//region storage
coreShard = new CoreBlock("core-shard"){{
requirements(Category.effect, BuildVisibility.editorOnly, with(Items.copper, 1000, Items.lead, 1000));
requirements(Category.effect, BuildVisibility.editorOnly, with(Items.copper, 1000, Items.lead, 800));
alwaysUnlocked = true;
unitType = UnitTypes.alpha;

View File

@@ -58,6 +58,7 @@ public enum Binding implements KeyBind{
fullscreen(KeyCode.f11),
pause(KeyCode.space),
minimap(KeyCode.m),
research(KeyCode.b),
planet_map(KeyCode.n),
toggle_menus(KeyCode.c),
screenshot(KeyCode.p),

View File

@@ -240,6 +240,7 @@ public class DesktopInput extends InputHandler{
if(state.isGame() && !scene.hasDialog() && !(scene.getKeyboardFocus() instanceof TextField)){
if(Core.input.keyTap(Binding.minimap)) ui.minimapfrag.toggle();
if(Core.input.keyTap(Binding.planet_map) && state.isCampaign()) ui.planet.toggle();
if(Core.input.keyTap(Binding.research) && state.isCampaign()) ui.research.toggle();
}
if(state.isMenu() || Core.scene.hasDialog()) return;

View File

@@ -302,6 +302,14 @@ public class Maps{
flooronto = Blocks.sand;
block = Blocks.sandBoulder;
}},
new ScatterFilter(){{
flooronto = Blocks.darksand;
block = Blocks.basaltBoulder;
}},
new ScatterFilter(){{
flooronto = Blocks.basalt;
block = Blocks.basaltBoulder;
}},
new ScatterFilter(){{
flooronto = Blocks.dacite;
block = Blocks.daciteBoulder;

View File

@@ -7,7 +7,7 @@ import mindustry.world.*;
import static mindustry.maps.filters.FilterOption.*;
public class ScatterFilter extends GenerateFilter{
protected float chance = 0.014f;
protected float chance = 0.013f;
protected Block flooronto = Blocks.air, floor = Blocks.air, block = Blocks.air;
@Override

View File

@@ -22,6 +22,7 @@ import mindustry.game.*;
import mindustry.gen.*;
import mindustry.graphics.*;
import mindustry.graphics.g3d.*;
import mindustry.input.*;
import mindustry.maps.*;
import mindustry.type.*;
import mindustry.ui.*;
@@ -60,7 +61,7 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
shouldPause = true;
keyDown(key -> {
if(key == KeyCode.escape || key == KeyCode.back){
if(key == KeyCode.escape || key == KeyCode.back || key == Core.keybinds.get(Binding.planet_map).key){
if(showing() && newPresets.size > 1){
//clear all except first, which is the last sector.
newPresets.truncate(1);
@@ -684,7 +685,7 @@ public class PlanetDialog extends BaseDialog implements PlanetInterfaceRenderer{
if(sector.info.wavesSurvived >= 0 && sector.info.wavesSurvived - sector.info.wavesPassed >= 0 && !sector.isBeingPlayed()){
int toCapture = sector.info.attack || sector.info.winWave <= 1 ? -1 : sector.info.winWave - (sector.info.wave + sector.info.wavesPassed);
boolean plus = (sector.info.wavesSurvived - sector.info.wavesPassed) >= SectorDamage.maxRetWave - 1;
stable.add(Core.bundle.format("sectors.survives", Math.min(sector.info.wavesSurvived - sector.info.wavesPassed, toCapture <= 0 ? 200 : 0) +
stable.add(Core.bundle.format("sectors.survives", Math.min(sector.info.wavesSurvived - sector.info.wavesPassed, toCapture <= 0 ? 200 : toCapture) +
(plus ? "+" : "") + (toCapture < 0 ? "" : "/" + toCapture)));
stable.row();
}

View File

@@ -21,6 +21,7 @@ import mindustry.game.EventType.*;
import mindustry.game.Objectives.*;
import mindustry.gen.*;
import mindustry.graphics.*;
import mindustry.input.*;
import mindustry.type.*;
import mindustry.ui.*;
import mindustry.ui.layout.*;
@@ -114,6 +115,12 @@ public class ResearchDialog extends BaseDialog{
addCloseButton();
keyDown(key -> {
if(key == Core.keybinds.get(Binding.research).key){
Core.app.post(this::hide);
}
});
buttons.button("@database", Icon.book, () -> {
hide();
ui.database.show();

View File

@@ -396,7 +396,7 @@ public class SettingsMenuDialog extends SettingsDialog{
graphics.checkPref("blockstatus", false);
graphics.checkPref("playerchat", true);
if(!mobile){
graphics.checkPref("coreitems", false);
graphics.checkPref("coreitems", true);
}
graphics.checkPref("minimap", !mobile);
graphics.checkPref("smoothcamera", true);

View File

@@ -50,7 +50,9 @@ public class HintsFragment extends Fragment{
}else if(hints.size > 0){
//check one hint each frame to see if it should be shown.
Hint hint = hints.find(Hint::show);
if(hint != null && !hint.finished() & !hint.complete()){
if(hint != null && hint.complete()){
hints.remove(hint);
}else if(hint != null){
display(hint);
}
}
@@ -79,7 +81,7 @@ public class HintsFragment extends Fragment{
void checkNext(){
if(current != null) return;
hints.removeAll(h -> h == current || !h.valid() || h.finished() || (h.show() && h.complete()));
hints.removeAll(h -> !h.valid() || h.finished() || (h.show() && h.complete()));
hints.sort(Hint::order);
Hint first = hints.find(Hint::show);
@@ -158,6 +160,7 @@ public class HintsFragment extends Fragment{
payloadPickup(() -> !player.unit().dead && player.unit() instanceof Payloadc p && p.payloads().isEmpty(), () -> player.unit() instanceof Payloadc p && p.payloads().any()),
payloadDrop(() -> !player.unit().dead && player.unit() instanceof Payloadc p && p.payloads().any(), () -> player.unit() instanceof Payloadc p && p.payloads().isEmpty()),
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)),
;
@Nullable

View File

@@ -1,3 +1,3 @@
org.gradle.daemon=true
org.gradle.jvmargs=-Xms256m -Xmx1024m
archash=bfac70a18ab9158efefcd36f3ff43738c96733a0
archash=9446f0f01b2a1b25abf870a32bf839bc486b12e3