mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-01-12 15:57:42 +07:00
More fixes
This commit is contained in:
parent
42c2ea68f1
commit
f5e30f53e0
core
assets
src/io/anuke/moment
BIN
core/assets/music/place.wav
Normal file
BIN
core/assets/music/place.wav
Normal file
Binary file not shown.
BIN
core/assets/music/shoot.wav
Normal file
BIN
core/assets/music/shoot.wav
Normal file
Binary file not shown.
@ -165,13 +165,6 @@ grass
|
||||
orig: 8, 8
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
healturret
|
||||
rotate: false
|
||||
xy: 49, 21
|
||||
size: 10, 10
|
||||
orig: 10, 10
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
icon-coal
|
||||
rotate: false
|
||||
xy: 247, 23
|
||||
@ -251,7 +244,7 @@ laserend
|
||||
index: -1
|
||||
machineturret
|
||||
rotate: false
|
||||
xy: 49, 9
|
||||
xy: 49, 21
|
||||
size: 10, 10
|
||||
orig: 10, 10
|
||||
offset: 0, 0
|
||||
@ -263,9 +256,9 @@ mech1
|
||||
orig: 8, 8
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
megahealturret
|
||||
megarepairturret
|
||||
rotate: false
|
||||
xy: 61, 21
|
||||
xy: 49, 9
|
||||
size: 10, 10
|
||||
orig: 10, 10
|
||||
offset: 0, 0
|
||||
@ -277,6 +270,13 @@ player
|
||||
orig: 8, 8
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
repairturret
|
||||
rotate: false
|
||||
xy: 61, 21
|
||||
size: 10, 10
|
||||
orig: 10, 10
|
||||
offset: 0, 0
|
||||
index: -1
|
||||
router
|
||||
rotate: false
|
||||
xy: 198, 13
|
||||
|
Binary file not shown.
Before (image error) Size: 4.1 KiB After (image error) Size: 4.1 KiB |
@ -12,7 +12,6 @@ import com.badlogic.gdx.math.MathUtils;
|
||||
import com.badlogic.gdx.math.Rectangle;
|
||||
import com.badlogic.gdx.math.Vector2;
|
||||
|
||||
import io.anuke.gif.GifRecorder;
|
||||
import io.anuke.moment.ai.Pathfind;
|
||||
import io.anuke.moment.entities.TileEntity;
|
||||
import io.anuke.moment.resource.ItemStack;
|
||||
@ -29,7 +28,7 @@ import io.anuke.ucore.util.Mathf;
|
||||
import io.anuke.ucore.util.Timers;
|
||||
|
||||
public class Control extends RendererModule<Moment>{
|
||||
GifRecorder recorder = new GifRecorder(batch);
|
||||
//GifRecorder recorder = new GifRecorder(batch);
|
||||
int rangex = 10, rangey = 10;
|
||||
float breaktime = 0;
|
||||
float breakdur = 50;
|
||||
@ -290,7 +289,7 @@ public class Control extends RendererModule<Moment>{
|
||||
|
||||
drawDefault();
|
||||
|
||||
recorder.update();
|
||||
//recorder.update();
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -431,7 +430,7 @@ public class Control extends RendererModule<Moment>{
|
||||
buffers.remove("shadow");
|
||||
buffers.add("shadow", (int) (Gdx.graphics.getWidth() / cameraScale), (int) (Gdx.graphics.getHeight() / cameraScale));
|
||||
|
||||
rangex = (int) (width / tilesize / cameraScale/2)+1;
|
||||
rangey = (int) (height / tilesize / cameraScale/2)+1;
|
||||
rangex = (int) (width / tilesize / cameraScale/2)+2;
|
||||
rangey = (int) (height / tilesize / cameraScale/2)+2;
|
||||
}
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ public class Moment extends ModuleController<Moment>{
|
||||
public float respawntime = 60*5;
|
||||
|
||||
public int wave = 1;
|
||||
public float wavespace = 20*60;
|
||||
public float wavespace = 35*60;
|
||||
public float wavetime;
|
||||
public float spawnspace = 65;
|
||||
public Tile core;
|
||||
@ -90,6 +90,7 @@ public class Moment extends ModuleController<Moment>{
|
||||
//if(UInput.keyUp(Keys.Q))
|
||||
// System.out.println("Enemies: " + Enemy.amount + " Wavetime: " + wavetime + " Wave: " + wave + " Wavespace: " + wavespace);
|
||||
|
||||
//System.out.println(Enemy.amount);
|
||||
if(Enemy.amount <= 0)
|
||||
wavetime -= delta();
|
||||
|
||||
@ -123,13 +124,13 @@ public class Moment extends ModuleController<Moment>{
|
||||
generate();
|
||||
|
||||
player.x = core.worldx();
|
||||
player.y = core.worldy()+10;
|
||||
player.y = core.worldy()-8;
|
||||
|
||||
items.put(Item.stone, 20);
|
||||
|
||||
items.put(Item.stone, 2000);
|
||||
items.put(Item.iron, 2000);
|
||||
items.put(Item.steel, 2000);
|
||||
//items.put(Item.stone, 2000);
|
||||
//items.put(Item.iron, 2000);
|
||||
//items.put(Item.steel, 2000);
|
||||
|
||||
if(get(UI.class).about != null)
|
||||
get(UI.class).updateItems();
|
||||
@ -160,19 +161,20 @@ public class Moment extends ModuleController<Moment>{
|
||||
int x = core.x, y = core.y;
|
||||
|
||||
set(x, y-1, TileType.conveyor, 1);
|
||||
set(x, y-2, TileType.router, 0);
|
||||
set(x, y-2, TileType.conveyor, 1);
|
||||
set(x, y-3, TileType.conveyor, 1);
|
||||
set(x, y-4, TileType.stonedrill, 0);
|
||||
//just in case
|
||||
tiles[x][y-4].setFloor(TileType.stone);
|
||||
|
||||
set(x+1, y-2, TileType.conveyor, 0);
|
||||
set(x+2, y-2, TileType.conveyor, 1);
|
||||
|
||||
tiles[x+2][y-2].setFloor(TileType.stone);
|
||||
set(x+2, y-2, TileType.stonedrill, 0);
|
||||
set(x+2, y-1, TileType.conveyor, 1);
|
||||
set(x+2, y, TileType.turret, 0);
|
||||
|
||||
set(x-1, y-2, TileType.conveyor, 2);
|
||||
set(x-2, y-2, TileType.conveyor, 1);
|
||||
tiles[x-2][y-2].setFloor(TileType.stone);
|
||||
set(x-2, y-2, TileType.stonedrill, 0);
|
||||
set(x-2, y-1, TileType.conveyor, 1);
|
||||
set(x-2, y, TileType.turret, 0);
|
||||
}
|
||||
|
@ -169,12 +169,14 @@ public class UI extends SceneModule<Moment>{
|
||||
|
||||
tutorial.content().add(
|
||||
"[GREEN]Default Controls:[WHITE]\n[YELLOW][[WASD][] to move, [YELLOW][[R][] to rotate blocks."
|
||||
+ "\n[YELLOW][[R-MOUSE][] to destroy blocks, [YELLOW][[L-MOUSE][] to place them."
|
||||
+ "\nHold [YELLOW][[R-MOUSE][] to destroy blocks, click [YELLOW][[L-MOUSE][] to place them."
|
||||
+ "\n[YELLOW][[L-MOUSE][] to shoot."
|
||||
+ "\n\n[GOLD]Every 20 seconds, a new wave will appear."
|
||||
+ "\nBuild turrets to defend the core."
|
||||
+ "\nIf the core is destroyed, you lose the game."
|
||||
+ "\n[LIME]To collect building resources, \nmove them into the core with conveyors."
|
||||
+ "\n[LIME]Place [ORANGE]drills[] on the right material,\nthey will automatically mine material\nand dump it to nearby conveyors or turrets."
|
||||
+ "\n\n[SCARLET]To produce steel, feed coal and iron into a smelter."
|
||||
);
|
||||
|
||||
tutorial.content().pad(8);
|
||||
|
@ -45,7 +45,13 @@ public class Enemy extends DestructibleEntity{
|
||||
Moment.module(Control.class).tryMove(this, vec.x*delta, vec.y*delta);
|
||||
|
||||
//if(Timers.get(this, 10))
|
||||
target = TileType.findTileTarget(x, y, null, range, false);
|
||||
target = TileType.findTileTarget(x, y, null, range, false);
|
||||
|
||||
//no tile found
|
||||
if(target == null)
|
||||
target = Entities.getClosest(x, y, range, e->{
|
||||
return e instanceof Player;
|
||||
});
|
||||
|
||||
if(target != null){
|
||||
if(Timers.get(this, reload)){
|
||||
|
@ -36,7 +36,7 @@ public class Player extends DestructibleEntity{
|
||||
Effects.effect("respawn", this);
|
||||
|
||||
Timers.run(Moment.i.respawntime, ()->{
|
||||
set(Moment.i.core.worldx(), Moment.i.core.worldy()+8);
|
||||
set(Moment.i.core.worldx(), Moment.i.core.worldy()-8);
|
||||
heal();
|
||||
add();
|
||||
});
|
||||
@ -53,7 +53,7 @@ public class Player extends DestructibleEntity{
|
||||
|
||||
@Override
|
||||
public void update(){
|
||||
if(health < maxhealth && Timers.get(this, 30))
|
||||
if(health < maxhealth && Timers.get(this, 50))
|
||||
health ++;
|
||||
|
||||
vector.set(0, 0);
|
||||
|
@ -22,8 +22,8 @@ public enum Recipe{
|
||||
flameturret(defense, TileType.flameturret, stack(Item.iron, 25), stack(Item.steel, 18)),
|
||||
sniperturret(defense, TileType.sniperturret, stack(Item.iron, 30), stack(Item.steel, 20)),
|
||||
|
||||
healturret(defense, TileType.healturret, stack(Item.iron, 40)),
|
||||
megahealturret(defense, TileType.megahealturret, stack(Item.iron, 30), stack(Item.steel, 40)),
|
||||
healturret(defense, TileType.repairturret, stack(Item.iron, 40)),
|
||||
megahealturret(defense, TileType.megarepairturret, stack(Item.iron, 30), stack(Item.steel, 40)),
|
||||
|
||||
drill(production, TileType.stonedrill, stack(Item.stone, 6)),
|
||||
irondrill(production, TileType.irondrill, stack(Item.stone, 40)),
|
||||
|
@ -415,7 +415,7 @@ public enum TileType{
|
||||
|
||||
}
|
||||
},
|
||||
healturret(true, true, false){
|
||||
repairturret(true, true, false){
|
||||
{
|
||||
range = 30;
|
||||
reload = 40f;
|
||||
@ -469,7 +469,7 @@ public enum TileType{
|
||||
return "Heals nearby tiles.";
|
||||
}
|
||||
},
|
||||
megahealturret(true, true, false){
|
||||
megarepairturret(true, true, false){
|
||||
{
|
||||
range = 30;
|
||||
reload = 20f;
|
||||
|
Loading…
Reference in New Issue
Block a user