From c9520e607f1785bf79590a1cec04ddb162903db5 Mon Sep 17 00:00:00 2001 From: Anuken Date: Tue, 18 Jun 2019 20:45:21 -0400 Subject: [PATCH] Implemented craters map, again / Disabled unit editing --- .travis.yml | 5 +- core/assets/maps/craters.msav | Bin 3546 -> 11299 bytes core/src/io/anuke/mindustry/Vars.java | 2 + .../src/io/anuke/mindustry/content/Zones.java | 4 +- .../io/anuke/mindustry/core/GameState.java | 3 +- core/src/io/anuke/mindustry/core/Logic.java | 2 +- .../mindustry/ui/fragments/HudFragment.java | 97 +++++++++--------- 7 files changed, 60 insertions(+), 53 deletions(-) diff --git a/.travis.yml b/.travis.yml index 997046ee8b..2c226bdf10 100644 --- a/.travis.yml +++ b/.travis.yml @@ -5,14 +5,15 @@ script: - "./gradlew test" - "./gradlew desktop:dist -Pbuildversion=${TRAVIS_TAG:1}" - "./gradlew server:dist -Pbuildversion=${TRAVIS_TAG:1}" -- git clone --depth=1 --branch=master https://github.com/mindustrygame/wiki ../wiki + git config --global user.name "Wiki Updater" +- git clone --depth=1 --branch=master https://github.com/MindustryGame/wiki ../wiki - git clone --depth=1 --branch=master https://github.com/Anuken/Mindustry-Wiki-Generator ../Mindustry-Wiki-Generator - cd ../Mindustry-Wiki-Generator - "./gradlew run" - cd ../wiki - git add . - git commit -m "Update to match commit ${TRAVIS_COMMIT}" -- git push https://Anuken:${GH_PUSH_TOKEN}@github.com/mindustrygame/wiki +- git push https://Anuken:${GH_PUSH_TOKEN}@github.com/MindustryGame/wiki deploy: provider: releases skip_cleanup: true diff --git a/core/assets/maps/craters.msav b/core/assets/maps/craters.msav index 08435d2896822d16c9183e57a43d28cfb3c1b489..25102a39443329a7f85038f79d897df459424f4b 100644 GIT binary patch literal 11299 zcmV+;EZoz0ob7#klU&7>XWm=4-j9B%^=cs`Ko4X!sJmJc$TNT>1HyxN3^q2#SX6hF zS_SoJS67v+@v;#!jIrn833dRFA7MK-V*lBQ{Q&zh_OJaG`yDpVFK?cc=k{%wiP%3k zf+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Bg0`XS?E`|6jl$F`xwlIC_#fM85vcqlV&6nl` zNqk8gOa2~gJ<;|JK%<0(elml;1u&+G($ zhdw(J{1AId;_s4;6a0Plp~OF=Cx0UIM^rKs{97u*34WAgVVuwQ7@u6?<2*|Icn%+D zo+9s(Jfl?D5}pD}KF*R0^vOdqkv>d?GyWCd>lb{}pK(n6gst%~+X`dqB95s#-%jVd z8*Ggx$I&c@$WFFxJ|L<&r*36mRA21Wt?a5=&Z*njk$WKiGJVs;U!pvZzewL?@fUdf zJiwI@e=awE7T^^Se}>0T0lW(0PXfI9C68A_{BeNSq~pf`uE~v(F7dSx-#2Ky<|Mmt z`~;6DXw1vZOMWfH9|f#w@x1`oLHuEW>mmLiee=fr|J?Bh=%q?wgaLFnTc*N6_I|cl zm4oknoCZ@IpzoolHn|+Fx{4|9=CD8sXG44@JN{i9G!rcIEc%9z@1p)k64pX|4hO{B znKI4wU;|U`WXf6&rp-)w3+r0PIT3 zlqs}VQt(vk*(01hvl|HWmR3&bDCd=oD@>P^{j3EkD^p!paRioGqoiEP zu~BASTbZ(#Z6b@~MSMr>MOqp&c&h8UBsDl|uH*CXN-^4S57&?bY{Sc$KEm?%@#;S2 zFK{mGWu8Oa6~~xz8B^Xsg)GUzJ#1%-y;)_-ZkBV5@h--1PBC)6m3?8bU+&=M-r!r@ z$!(y{_#K>gb^5ZUriIUdck-&1o@52*Eb`1So?sikmwC2xmH1GKYg|Jl#xvi;cpLA! zhb1VCF>@iyzlSw$qQHPEyC?|!%pM^JC&Bme*a diff --git a/core/src/io/anuke/mindustry/Vars.java b/core/src/io/anuke/mindustry/Vars.java index 974c262ffc..c969aa4006 100644 --- a/core/src/io/anuke/mindustry/Vars.java +++ b/core/src/io/anuke/mindustry/Vars.java @@ -47,6 +47,8 @@ public class Vars{ public static final Team defaultTeam = Team.blue; /** team of the enemy in waves/sectors */ public static final Team waveTeam = Team.red; + /** whether to enable editing of units in the editor */ + public static final boolean enableUnitEditing = false; /** max chat message length */ public static final int maxTextLength = 150; /** max player name length in bytes */ diff --git a/core/src/io/anuke/mindustry/content/Zones.java b/core/src/io/anuke/mindustry/content/Zones.java index 1f3f4088da..7f5cbaabb9 100644 --- a/core/src/io/anuke/mindustry/content/Zones.java +++ b/core/src/io/anuke/mindustry/content/Zones.java @@ -88,12 +88,12 @@ public class Zones implements ContentList{ resources = new Item[]{Items.copper, Items.scrap, Items.lead, Items.coal, Items.sand}; }}; - craters = new Zone("craters", new MapGenerator("craters", 1).dist(0).decor(new Decoration(Blocks.snow, Blocks.sporeCluster, 0.011))){{ + craters = new Zone("craters", new MapGenerator("craters", 1).dist(0).decor(new Decoration(Blocks.snow, Blocks.sporeCluster, 0.004))){{ startingItems = ItemStack.list(Items.copper, 200); conditionWave = 10; zoneRequirements = ZoneRequirement.with(groundZero, 10); blockRequirements = new Block[]{Blocks.router}; - resources = new Item[]{Items.copper, Items.lead, Items.coal}; + resources = new Item[]{Items.copper, Items.lead, Items.coal, Items.sand, Items.scrap}; }}; frozenForest = new Zone("frozenForest", new MapGenerator("frozenForest", 1) diff --git a/core/src/io/anuke/mindustry/core/GameState.java b/core/src/io/anuke/mindustry/core/GameState.java index fcf4d6646c..1e755de6c6 100644 --- a/core/src/io/anuke/mindustry/core/GameState.java +++ b/core/src/io/anuke/mindustry/core/GameState.java @@ -2,6 +2,7 @@ package io.anuke.mindustry.core; import io.anuke.arc.Events; import io.anuke.mindustry.entities.type.BaseUnit; +import io.anuke.mindustry.entities.type.base.BaseDrone; import io.anuke.mindustry.game.EventType.StateChangeEvent; import io.anuke.mindustry.game.*; import io.anuke.mindustry.net.Net; @@ -28,7 +29,7 @@ public class GameState{ private State state = State.menu; public int enemies(){ - return Net.client() ? enemies : unitGroups[waveTeam.ordinal()].size(); + return Net.client() ? enemies : unitGroups[waveTeam.ordinal()].count(b -> !(b instanceof BaseDrone)); } public BaseUnit boss(){ diff --git a/core/src/io/anuke/mindustry/core/Logic.java b/core/src/io/anuke/mindustry/core/Logic.java index 2b8a61e685..b4a2fd9b76 100644 --- a/core/src/io/anuke/mindustry/core/Logic.java +++ b/core/src/io/anuke/mindustry/core/Logic.java @@ -198,7 +198,7 @@ public class Logic implements ApplicationListener{ Entities.update(tileGroup); Entities.update(fireGroup); }else{ - for(EntityGroup group : unitGroups){ + for(EntityGroup group : unitGroups){ group.updateEvents(); collisions.updatePhysics(group); } diff --git a/core/src/io/anuke/mindustry/ui/fragments/HudFragment.java b/core/src/io/anuke/mindustry/ui/fragments/HudFragment.java index 0392442a86..3a10063236 100644 --- a/core/src/io/anuke/mindustry/ui/fragments/HudFragment.java +++ b/core/src/io/anuke/mindustry/ui/fragments/HudFragment.java @@ -194,57 +194,60 @@ public class HudFragment extends Fragment{ } }).left(); - t.row(); - t.addImageTextButton("$editor.spawn", "icon-add", 8*3, () -> { - FloatingDialog dialog = new FloatingDialog("$editor.spawn"); - int i = 0; - for(UnitType type : content.getBy(ContentType.unit)){ - dialog.cont.addImageButton("white", 48, () -> { - Call.spawnUnitEditor(player, type); - dialog.hide(); - }).get().getStyle().imageUp = new TextureRegionDrawable(type.iconRegion); - if(++i % 4 == 0) dialog.cont.row(); - } - dialog.addCloseButton(); - dialog.setFillParent(false); - dialog.show(); - }).fillX(); + if(enableUnitEditing){ - float[] size = {0}; - float[] position = {0, 0}; - - t.row(); - t.addImageTextButton("$editor.removeunit", "icon-quit", "toggle", 8*3, () -> { - - }).fillX().update(b -> { - boolean[] found = {false}; - if(b.isChecked()){ - Element e = Core.scene.hit(Core.input.mouseX(), Core.input.mouseY(), true); - if(e == null){ - Vector2 world = Core.input.mouseWorld(); - Units.nearby(world.x, world.y, 1f, 1f, unit -> { - if(!found[0] && unit instanceof BaseUnit){ - if(Core.input.keyTap(KeyCode.MOUSE_LEFT)){ - Call.removeUnitEditor(player, (BaseUnit)unit); - } - found[0] = true; - unit.hitbox(Tmp.r1); - size[0] = Mathf.lerpDelta(size[0], Tmp.r1.width*2f + Mathf.absin(Time.time(), 10f, 5f), 0.1f); - position[0] = unit.x; - position[1] = unit.y; - } - }); + t.row(); + t.addImageTextButton("$editor.spawn", "icon-add", 8 * 3, () -> { + FloatingDialog dialog = new FloatingDialog("$editor.spawn"); + int i = 0; + for(UnitType type : content.getBy(ContentType.unit)){ + dialog.cont.addImageButton("white", 48, () -> { + Call.spawnUnitEditor(player, type); + dialog.hide(); + }).get().getStyle().imageUp = new TextureRegionDrawable(type.iconRegion); + if(++i % 4 == 0) dialog.cont.row(); } - } + dialog.addCloseButton(); + dialog.setFillParent(false); + dialog.show(); + }).fillX(); - Draw.color(Pal.accent, Color.WHITE, Mathf.absin(Time.time(), 8f, 1f)); - Lines.poly(position[0], position[1], 4, size[0]/2f); - Draw.reset(); + float[] size = {0}; + float[] position = {0, 0}; - if(!found[0]){ - size[0] = Mathf.lerpDelta(size[0], 0f, 0.2f); - } - }); + t.row(); + t.addImageTextButton("$editor.removeunit", "icon-quit", "toggle", 8 * 3, () -> { + + }).fillX().update(b -> { + boolean[] found = {false}; + if(b.isChecked()){ + Element e = Core.scene.hit(Core.input.mouseX(), Core.input.mouseY(), true); + if(e == null){ + Vector2 world = Core.input.mouseWorld(); + Units.nearby(world.x, world.y, 1f, 1f, unit -> { + if(!found[0] && unit instanceof BaseUnit){ + if(Core.input.keyTap(KeyCode.MOUSE_LEFT)){ + Call.removeUnitEditor(player, (BaseUnit)unit); + } + found[0] = true; + unit.hitbox(Tmp.r1); + size[0] = Mathf.lerpDelta(size[0], Tmp.r1.width * 2f + Mathf.absin(Time.time(), 10f, 5f), 0.1f); + position[0] = unit.x; + position[1] = unit.y; + } + }); + } + } + + Draw.color(Pal.accent, Color.WHITE, Mathf.absin(Time.time(), 8f, 1f)); + Lines.poly(position[0], position[1], 4, size[0] / 2f); + Draw.reset(); + + if(!found[0]){ + size[0] = Mathf.lerpDelta(size[0], 0f, 0.2f); + } + }); + } }).width(dsize * 4 + 3f); editorMain.visible(() -> shown && state.isEditor()); }