Implemented craters map, again / Disabled unit editing
This commit is contained in:
+3
-2
@@ -5,14 +5,15 @@ script:
|
|||||||
- "./gradlew test"
|
- "./gradlew test"
|
||||||
- "./gradlew desktop:dist -Pbuildversion=${TRAVIS_TAG:1}"
|
- "./gradlew desktop:dist -Pbuildversion=${TRAVIS_TAG:1}"
|
||||||
- "./gradlew server: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
|
- git clone --depth=1 --branch=master https://github.com/Anuken/Mindustry-Wiki-Generator ../Mindustry-Wiki-Generator
|
||||||
- cd ../Mindustry-Wiki-Generator
|
- cd ../Mindustry-Wiki-Generator
|
||||||
- "./gradlew run"
|
- "./gradlew run"
|
||||||
- cd ../wiki
|
- cd ../wiki
|
||||||
- git add .
|
- git add .
|
||||||
- git commit -m "Update to match commit ${TRAVIS_COMMIT}"
|
- 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:
|
deploy:
|
||||||
provider: releases
|
provider: releases
|
||||||
skip_cleanup: true
|
skip_cleanup: true
|
||||||
|
|||||||
Binary file not shown.
@@ -47,6 +47,8 @@ public class Vars{
|
|||||||
public static final Team defaultTeam = Team.blue;
|
public static final Team defaultTeam = Team.blue;
|
||||||
/** team of the enemy in waves/sectors */
|
/** team of the enemy in waves/sectors */
|
||||||
public static final Team waveTeam = Team.red;
|
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 */
|
/** max chat message length */
|
||||||
public static final int maxTextLength = 150;
|
public static final int maxTextLength = 150;
|
||||||
/** max player name length in bytes */
|
/** max player name length in bytes */
|
||||||
|
|||||||
@@ -88,12 +88,12 @@ public class Zones implements ContentList{
|
|||||||
resources = new Item[]{Items.copper, Items.scrap, Items.lead, Items.coal, Items.sand};
|
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);
|
startingItems = ItemStack.list(Items.copper, 200);
|
||||||
conditionWave = 10;
|
conditionWave = 10;
|
||||||
zoneRequirements = ZoneRequirement.with(groundZero, 10);
|
zoneRequirements = ZoneRequirement.with(groundZero, 10);
|
||||||
blockRequirements = new Block[]{Blocks.router};
|
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)
|
frozenForest = new Zone("frozenForest", new MapGenerator("frozenForest", 1)
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package io.anuke.mindustry.core;
|
|||||||
|
|
||||||
import io.anuke.arc.Events;
|
import io.anuke.arc.Events;
|
||||||
import io.anuke.mindustry.entities.type.BaseUnit;
|
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.EventType.StateChangeEvent;
|
||||||
import io.anuke.mindustry.game.*;
|
import io.anuke.mindustry.game.*;
|
||||||
import io.anuke.mindustry.net.Net;
|
import io.anuke.mindustry.net.Net;
|
||||||
@@ -28,7 +29,7 @@ public class GameState{
|
|||||||
private State state = State.menu;
|
private State state = State.menu;
|
||||||
|
|
||||||
public int enemies(){
|
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(){
|
public BaseUnit boss(){
|
||||||
|
|||||||
@@ -198,7 +198,7 @@ public class Logic implements ApplicationListener{
|
|||||||
Entities.update(tileGroup);
|
Entities.update(tileGroup);
|
||||||
Entities.update(fireGroup);
|
Entities.update(fireGroup);
|
||||||
}else{
|
}else{
|
||||||
for(EntityGroup group : unitGroups){
|
for(EntityGroup<?> group : unitGroups){
|
||||||
group.updateEvents();
|
group.updateEvents();
|
||||||
collisions.updatePhysics(group);
|
collisions.updatePhysics(group);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -194,6 +194,8 @@ public class HudFragment extends Fragment{
|
|||||||
}
|
}
|
||||||
}).left();
|
}).left();
|
||||||
|
|
||||||
|
if(enableUnitEditing){
|
||||||
|
|
||||||
t.row();
|
t.row();
|
||||||
t.addImageTextButton("$editor.spawn", "icon-add", 8 * 3, () -> {
|
t.addImageTextButton("$editor.spawn", "icon-add", 8 * 3, () -> {
|
||||||
FloatingDialog dialog = new FloatingDialog("$editor.spawn");
|
FloatingDialog dialog = new FloatingDialog("$editor.spawn");
|
||||||
@@ -245,6 +247,7 @@ public class HudFragment extends Fragment{
|
|||||||
size[0] = Mathf.lerpDelta(size[0], 0f, 0.2f);
|
size[0] = Mathf.lerpDelta(size[0], 0f, 0.2f);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
}).width(dsize * 4 + 3f);
|
}).width(dsize * 4 + 3f);
|
||||||
editorMain.visible(() -> shown && state.isEditor());
|
editorMain.visible(() -> shown && state.isEditor());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user