mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-01-03 13:30:25 +07:00
Testing waves
This commit is contained in:
parent
2b416588f1
commit
8168d8a3be
@ -2770,7 +2770,7 @@ public class Blocks{
|
||||
breach = new ItemTurret("breach"){{
|
||||
requirements(Category.turret, with(Items.beryllium, 35, Items.silicon, 20), true);
|
||||
ammo(
|
||||
Items.beryllium, new BasicBulletType(7f, 30){{
|
||||
Items.beryllium, new BasicBulletType(7f, 32){{
|
||||
width = 8f;
|
||||
height = 14f;
|
||||
shootEffect = Fx.berylSpark;
|
||||
@ -2795,7 +2795,7 @@ public class Blocks{
|
||||
outlineColor = Pal.darkOutline;
|
||||
size = 2;
|
||||
envEnabled |= Env.space;
|
||||
reloadTime = 40f;
|
||||
reloadTime = 35f;
|
||||
restitution = 0.03f;
|
||||
range = 180;
|
||||
shootCone = 3f;
|
||||
|
@ -2531,8 +2531,9 @@ public class UnitTypes{
|
||||
}};
|
||||
|
||||
emanate = new UnitType("emanate"){{
|
||||
defaultController = BuilderAI::new;
|
||||
isCounted = false;
|
||||
//TODO not a real enemy, should not be counted or have flying AI
|
||||
defaultController = FlyingAI::new;
|
||||
//isCounted = false;
|
||||
envDisabled = 0;
|
||||
|
||||
outlineColor = Pal.darkOutline;
|
||||
@ -2547,7 +2548,7 @@ public class UnitTypes{
|
||||
rotateSpeed = 3f;
|
||||
accel = 0.11f;
|
||||
itemCapacity = 140;
|
||||
health = 1500f;
|
||||
health = 1300f;
|
||||
armor = 3f;
|
||||
hitSize = 36f;
|
||||
commandLimit = 9;
|
||||
@ -2600,9 +2601,6 @@ public class UnitTypes{
|
||||
|
||||
}};
|
||||
|
||||
|
||||
//TODO emanate (+ better names)
|
||||
|
||||
//endregion
|
||||
//region internal + special
|
||||
|
||||
|
@ -101,6 +101,7 @@ public class Logic implements ApplicationListener{
|
||||
|
||||
if(state.isCampaign()){
|
||||
//enable building AI on campaign unless the preset disables it
|
||||
//TODO should be configurable, I don't want building AI everywhere.
|
||||
if(!(state.getSector().preset != null && !state.getSector().preset.useAI)){
|
||||
state.rules.waveTeam.rules().ai = true;
|
||||
}
|
||||
|
@ -184,9 +184,9 @@ public class ErekirPlanetGenerator extends PlanetGenerator{
|
||||
if(block != Blocks.air){
|
||||
//TODO use d4 instead of d8 for no out-of-reach ores?
|
||||
if(nearAir(x, y)){
|
||||
if(noise(x + 78, y, 4, 0.7f, 35f, 1f) > 0.6f && block == Blocks.carbonWall){
|
||||
if(block == Blocks.carbonWall && noise(x + 78, y, 4, 0.7f, 33f, 1f) > 0.59f){
|
||||
block = Blocks.graphiticWall;
|
||||
}else if(noise(x + 782, y, 4, 0.8f, 38f, 1f) > 0.68f && block != Blocks.carbonWall){
|
||||
}else if(block != Blocks.carbonWall && noise(x + 782, y, 4, 0.8f, 37f, 1f) > 0.68f){
|
||||
ore = Blocks.wallOreBeryl;
|
||||
}
|
||||
}
|
||||
@ -242,5 +242,16 @@ public class ErekirPlanetGenerator extends PlanetGenerator{
|
||||
|
||||
//TODO this is only for testing
|
||||
state.rules.defaultTeam.items().add(Seq.with(ItemStack.with(Items.beryllium, 200, Items.graphite, 200)));
|
||||
|
||||
//TODO proper waves
|
||||
state.rules.waves = !OS.hasProp("mindustry.debug");
|
||||
state.rules.waveTimer = true;
|
||||
state.rules.waveSpacing = 60f * 60f * 7.5f;
|
||||
state.rules.spawns = Seq.with(new SpawnGroup(){{
|
||||
type = UnitTypes.emanate;
|
||||
spacing = 1;
|
||||
shieldScaling = 60;
|
||||
unitScaling = 2f;
|
||||
}});
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user