Merge branch 'master' of https://github.com/Anuken/Mindustry into 7.0-features

 Conflicts:
	core/src/mindustry/content/Blocks.java
This commit is contained in:
Anuken
2021-06-09 17:10:49 -04:00
93 changed files with 1617 additions and 574 deletions

View File

@@ -43,7 +43,7 @@ public class Blocks implements ContentList{
regolithWall, yellowStoneWall, rhyoliteWall, carbonWall,
graphiticStone,
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,
metalFloor, metalFloorDamaged, metalFloor2, metalFloor3, metalFloor4, metalFloor5, basalt, magmarock, hotrock, snowWall, saltWall,
darkPanel1, darkPanel2, darkPanel3, darkPanel4, darkPanel5, darkPanel6, darkMetal,
pebbles, tendrils,
@@ -493,32 +493,24 @@ public class Blocks implements ContentList{
wall = sporeWall;
}};
metalFloor = new Floor("metal-floor"){{
metalFloor = new MetalFloor("metal-floor"){{
variants = 0;
attributes.set(Attribute.water, -1f);
}};
metalFloorDamaged = new Floor("metal-floor-damaged"){{
variants = 3;
}};
metalFloorDamaged = new MetalFloor("metal-floor-damaged", 3);
metalFloor2 = new Floor("metal-floor-2"){{
variants = 0;
}};
metalFloor2 = new MetalFloor("metal-floor-2");
metalFloor3 = new MetalFloor("metal-floor-3");
metalFloor4 = new MetalFloor("metal-floor-4");
metalFloor5 = new MetalFloor("metal-floor-5");
metalFloor3 = new Floor("metal-floor-3"){{
variants = 0;
}};
metalFloor5 = new Floor("metal-floor-5"){{
variants = 0;
}};
darkPanel1 = new Floor("dark-panel-1"){{ variants = 0; }};
darkPanel2 = new Floor("dark-panel-2"){{ variants = 0; }};
darkPanel3 = new Floor("dark-panel-3"){{ variants = 0; }};
darkPanel4 = new Floor("dark-panel-4"){{ variants = 0; }};
darkPanel5 = new Floor("dark-panel-5"){{ variants = 0; }};
darkPanel6 = new Floor("dark-panel-6"){{ variants = 0; }};
darkPanel1 = new MetalFloor("dark-panel-1");
darkPanel2 = new MetalFloor("dark-panel-2");
darkPanel3 = new MetalFloor("dark-panel-3");
darkPanel4 = new MetalFloor("dark-panel-4");
darkPanel5 = new MetalFloor("dark-panel-5");
darkPanel6 = new MetalFloor("dark-panel-6");
darkMetal = new StaticWall("dark-metal");
@@ -1773,8 +1765,8 @@ public class Blocks implements ContentList{
);
size = 2;
range = 180f;
reloadTime = 38f;
range = 190f;
reloadTime = 34f;
restitution = 0.03f;
ammoEjectBack = 3f;
cooldown = 0.03f;
@@ -2013,7 +2005,7 @@ public class Blocks implements ContentList{
}};
health = 200 * size * size;
consumes.add(new ConsumeLiquidFilter(liquid -> liquid.temperature <= 0.5f && liquid.flammability < 0.1f, 0.5f)).update(false);
consumes.add(new ConsumeCoolant(0.5f)).update(false);
}};
//endregion
@@ -2191,10 +2183,11 @@ public class Blocks implements ContentList{
payloadPropulsionTower = new PayloadMassDriver("payload-propulsion-tower"){{
requirements(Category.units, with(Items.thorium, 300, Items.silicon, 200, Items.plastanium, 200, Items.phaseFabric, 50));
size = 5;
reloadTime = 150f;
reloadTime = 140f;
chargeTime = 100f;
range = 300f;
consumes.power(10f);
range = 500f;
maxPayloadSize = 3.5f;
consumes.power(6f);
}};
//endregion

View File

@@ -1231,10 +1231,10 @@ public class Fx{
});
}),
shootLiquid = new Effect(40f, 80f, e -> {
color(e.color, Color.white, e.fout() / 6f + Mathf.randomSeedRange(e.id, 0.1f));
shootLiquid = new Effect(15f, 80f, e -> {
color(e.color);
randLenVectors(e.id, 6, e.finpow() * 60f, e.rotation, 11f, (x, y) -> {
randLenVectors(e.id, 2, e.finpow() * 15f, e.rotation, 11f, (x, y) -> {
Fill.circle(e.x + x, e.y + y, 0.5f + e.fout() * 2.5f);
});
}),

View File

@@ -709,7 +709,7 @@ public class TechTree implements ContentList{
/** Item requirements for this content. */
public ItemStack[] requirements;
/** Requirements that have been fulfilled. Always the same length as the requirement array. */
public final ItemStack[] finishedRequirements;
public ItemStack[] finishedRequirements;
/** Extra objectives needed to research this. */
public Seq<Objective> objectives = new Seq<>();
/** Nodes that depend on this node. */
@@ -720,14 +720,8 @@ public class TechTree implements ContentList{
this.parent = parent;
this.content = content;
this.requirements = requirements;
this.depth = parent == null ? 0 : parent.depth + 1;
this.finishedRequirements = new ItemStack[requirements.length];
//load up the requirements that have been finished if settings are available
for(int i = 0; i < requirements.length; i++){
finishedRequirements[i] = new ItemStack(requirements[i].item, Core.settings == null ? 0 : Core.settings.getInt("req-" + content.name + "-" + requirements[i].item.name));
}
setupRequirements(requirements);
var used = new ObjectSet<Content>();
@@ -742,6 +736,16 @@ public class TechTree implements ContentList{
all.add(this);
}
public void setupRequirements(ItemStack[] requirements){
this.requirements = requirements;
this.finishedRequirements = new ItemStack[requirements.length];
//load up the requirements that have been finished if settings are available
for(int i = 0; i < requirements.length; i++){
finishedRequirements[i] = new ItemStack(requirements[i].item, Core.settings == null ? 0 : Core.settings.getInt("req-" + content.name + "-" + requirements[i].item.name));
}
}
/** Resets finished requirements and saves. */
public void reset(){
for(ItemStack stack : finishedRequirements){

View File

@@ -611,7 +611,7 @@ public class UnitTypes implements ContentList{
bullet = new LiquidBulletType(Liquids.slag){{
damage = 11;
speed = 2.3f;
speed = 2.4f;
drag = 0.01f;
shootEffect = Fx.shootSmall;
lifetime = 56f;

View File

@@ -117,5 +117,4 @@ public class Weathers implements ContentList{
baseSpeed = 0.03f;
}};
}
}