mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-04 15:27:19 +07:00
Balancing, tweaks and bugfixes
This commit is contained in:
@ -377,7 +377,7 @@ blocks.ammo = Ammo
|
||||
|
||||
bar.drillspeed = Drill Speed: {0}/s
|
||||
bar.efficiency = Efficiency: {0}%
|
||||
bar.powerbalance = Power: {0}
|
||||
bar.powerbalance = Power: {0}/s
|
||||
bar.poweroutput = Power Output: {0}
|
||||
bar.items = Items: {0}
|
||||
bar.liquid = Liquid
|
||||
|
@ -447,7 +447,7 @@ public class Blocks implements ContentList{
|
||||
int topRegion = reg("-top");
|
||||
|
||||
drawer = tile -> {
|
||||
super.draw(tile);
|
||||
Draw.rect(region, tile.drawx(), tile.drawy());
|
||||
|
||||
GenericCrafterEntity entity = tile.entity();
|
||||
|
||||
@ -810,7 +810,7 @@ public class Blocks implements ContentList{
|
||||
|
||||
mender = new MendProjector("mender"){{
|
||||
requirements(Category.effect, ItemStack.with(Items.lead, 60, Items.copper, 50));
|
||||
consumes.power(0.7f);
|
||||
consumes.power(0.3f);
|
||||
size = 1;
|
||||
reload = 200f;
|
||||
range = 40f;
|
||||
@ -823,7 +823,7 @@ public class Blocks implements ContentList{
|
||||
|
||||
mendProjector = new MendProjector("mend-projector"){{
|
||||
requirements(Category.effect, ItemStack.with(Items.lead, 200, Items.titanium, 50, Items.silicon, 80));
|
||||
consumes.power(1.8f);
|
||||
consumes.power(1.5f);
|
||||
size = 2;
|
||||
reload = 250f;
|
||||
range = 85f;
|
||||
@ -1009,20 +1009,20 @@ public class Blocks implements ContentList{
|
||||
}};
|
||||
|
||||
battery = new Battery("battery"){{
|
||||
requirements(Category.power, ItemStack.with(Items.copper, 8, Items.lead, 30, Items.silicon, 4));
|
||||
consumes.powerBuffered(3200f, 1f);
|
||||
requirements(Category.power, ItemStack.with(Items.copper, 8, Items.lead, 40));
|
||||
consumes.powerBuffered(4000f, 1f);
|
||||
}};
|
||||
|
||||
batteryLarge = new Battery("battery-large"){{
|
||||
requirements(Category.power, ItemStack.with(Items.titanium, 40, Items.lead, 80, Items.silicon, 30));
|
||||
requirements(Category.power, ItemStack.with(Items.titanium, 40, Items.lead, 80, Items.silicon, 40));
|
||||
size = 3;
|
||||
consumes.powerBuffered(37440f, 1f);
|
||||
consumes.powerBuffered(50000f, 1f);
|
||||
}};
|
||||
|
||||
combustionGenerator = new BurnerGenerator("combustion-generator"){{
|
||||
requirements(Category.power, ItemStack.with(Items.copper, 50, Items.lead, 30));
|
||||
powerProduction = 1f;
|
||||
itemDuration = 40f;
|
||||
itemDuration = 60f;
|
||||
}};
|
||||
|
||||
thermalGenerator = new ThermalGenerator("thermal-generator"){{
|
||||
@ -1035,7 +1035,7 @@ public class Blocks implements ContentList{
|
||||
turbineGenerator = new BurnerGenerator("turbine-generator"){{
|
||||
requirements(Category.power, ItemStack.with(Items.copper, 70, Items.graphite, 50, Items.lead, 80, Items.silicon, 60));
|
||||
powerProduction = 6f;
|
||||
itemDuration = 30f;
|
||||
itemDuration = 40f;
|
||||
consumes.liquid(Liquids.water, 0.05f);
|
||||
hasLiquids = true;
|
||||
size = 2;
|
||||
@ -1260,7 +1260,7 @@ public class Blocks implements ContentList{
|
||||
Items.scrap, Bullets.flakScrap,
|
||||
Items.lead, Bullets.flakLead
|
||||
);
|
||||
reload = 20f;
|
||||
reload = 15f;
|
||||
range = 180f;
|
||||
size = 2;
|
||||
burstSpacing = 5f;
|
||||
|
@ -273,7 +273,7 @@ public class Bullets implements ContentList{
|
||||
keepVelocity = false;
|
||||
splashDamageRadius = 25f;
|
||||
splashDamage = 10f;
|
||||
lifetime = 80f;
|
||||
lifetime = 50f;
|
||||
trailColor = Pal.unitBack;
|
||||
backColor = Pal.unitBack;
|
||||
frontColor = Pal.unitFront;
|
||||
|
@ -199,12 +199,14 @@ public class TechTree implements ContentList{
|
||||
node(combustionGenerator, () -> {
|
||||
node(powerNode, () -> {
|
||||
node(powerNodeLarge, () -> {
|
||||
node(battery, () -> {
|
||||
node(batteryLarge, () -> {
|
||||
node(surgeTower, () -> {
|
||||
node(surgeTower, () -> {
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
node(battery, () -> {
|
||||
node(batteryLarge, () -> {
|
||||
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@ -243,11 +245,12 @@ public class TechTree implements ContentList{
|
||||
});
|
||||
});
|
||||
|
||||
node(spiritFactory, () -> {
|
||||
node(phantomFactory);
|
||||
});
|
||||
|
||||
node(alphaDartPad, () -> {
|
||||
node(deltaPad, () -> {
|
||||
node(spiritFactory, () -> {
|
||||
node(phantomFactory);
|
||||
});
|
||||
|
||||
node(javelinPad, () -> {
|
||||
node(tridentPad, () -> {
|
||||
|
@ -39,7 +39,7 @@ public class Zones implements ContentList{
|
||||
rules = () -> new Rules(){{
|
||||
waves = true;
|
||||
waveTimer = true;
|
||||
waveSpacing = 60 * 60 * 1f;
|
||||
waveSpacing = 60 * 60 * 1.5f;
|
||||
}};
|
||||
}};
|
||||
|
||||
|
@ -231,9 +231,7 @@ public class Renderer implements ApplicationListener{
|
||||
|
||||
overlays.drawTop();
|
||||
|
||||
EntityDraw.setClip(false);
|
||||
drawAndInterpolate(playerGroup, p -> !p.isDead() && !p.isLocal, Player::drawName);
|
||||
EntityDraw.setClip(true);
|
||||
|
||||
Draw.color();
|
||||
Draw.flush();
|
||||
|
@ -278,6 +278,7 @@ public abstract class BaseUnit extends Unit implements ShooterTrait{
|
||||
|
||||
@Override
|
||||
public void removed(){
|
||||
super.removed();
|
||||
Tile tile = world.tile(spawner);
|
||||
if(tile != null){
|
||||
tile.block().unitRemoved(tile, this);
|
||||
|
@ -142,10 +142,17 @@ public abstract class Unit extends DestructibleEntity implements SaveTrait, Targ
|
||||
|
||||
@Override
|
||||
public void removed(){
|
||||
Tile tile = world.tile(lastWeightTile);
|
||||
if(lastWeightTile != Pos.invalid){
|
||||
Tile tile = world.tile(lastWeightTile);
|
||||
|
||||
if(tile != null){
|
||||
tile.weight -= Math.max(lastWeightDelta, tile.weight);
|
||||
if(tile != null){
|
||||
int dec = Math.min(lastWeightDelta, wasFlying ? tile.airWeight : tile.weight);
|
||||
if(!wasFlying){
|
||||
tile.weight -= dec;
|
||||
}else{
|
||||
tile.airWeight -= dec;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -15,6 +15,7 @@ public enum RulePreset{
|
||||
infiniteResources = true;
|
||||
waves = true;
|
||||
waveTimer = false;
|
||||
respawnTime = 0f;
|
||||
spawns = DefaultWaves.get();
|
||||
}}),
|
||||
attack(() -> new Rules(){{
|
||||
|
@ -5,9 +5,11 @@ import io.anuke.arc.graphics.Blending;
|
||||
import io.anuke.arc.graphics.g2d.Draw;
|
||||
import io.anuke.arc.graphics.glutils.FrameBuffer;
|
||||
import io.anuke.arc.util.Disposable;
|
||||
import io.anuke.mindustry.entities.type.Player;
|
||||
|
||||
import static io.anuke.arc.Core.camera;
|
||||
import static io.anuke.arc.Core.graphics;
|
||||
import static io.anuke.mindustry.Vars.playerGroup;
|
||||
import static io.anuke.mindustry.Vars.renderer;
|
||||
|
||||
public class Pixelator implements Disposable{
|
||||
@ -41,6 +43,8 @@ public class Pixelator implements Disposable{
|
||||
Draw.rect(Draw.wrap(buffer.getTexture()), Core.camera.position.x, Core.camera.position.y, Core.camera.width, -Core.camera.height);
|
||||
Draw.blend();
|
||||
|
||||
renderer.drawAndInterpolate(playerGroup, p -> !p.isDead() && !p.isLocal, Player::drawName);
|
||||
|
||||
Core.camera.position.set(px, py);
|
||||
Core.settings.put("animatedwater", hadWater);
|
||||
Core.settings.put("animatedshields", hadShields);
|
||||
|
@ -69,7 +69,7 @@ public class Item extends UnlockableContent implements Comparable<Item>{
|
||||
|
||||
@Override
|
||||
public TextureRegion getContentIcon(){
|
||||
return icon(Icon.large);
|
||||
return icon(Icon.xlarge);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -267,6 +267,7 @@ public class HudFragment extends Fragment{
|
||||
testb[0] = button;
|
||||
|
||||
button.getStyle().disabledFontColor = Color.WHITE;
|
||||
button.margin(16f);
|
||||
button.visible(() ->
|
||||
world.isZone() &&
|
||||
world.getZone().metCondition() &&
|
||||
@ -282,8 +283,8 @@ public class HudFragment extends Fragment{
|
||||
button.setText(state.enemies() > 0 ? Core.bundle.format("launch.unable", state.enemies()) : Core.bundle.get("launch") + "\n" +
|
||||
Core.bundle.format("launch.next", state.wave + world.getZone().launchPeriod));
|
||||
|
||||
button.getLabel().setColor(Tmp.c1.set(Color.WHITE).lerp(state.enemies() > 0 ? Color.WHITE : Pal.accent,
|
||||
Mathf.absin(Time.time(), 7f, 1f)));
|
||||
button.getLabel().setColor(Tmp.c1.set(Color.WHITE).lerp(state.enemies() > 0 ? Color.WHITE : Color.SCARLET,
|
||||
Mathf.absin(Time.time(), 2f, 1f)));
|
||||
});
|
||||
|
||||
button.setDisabled(() -> state.enemies() > 0);
|
||||
|
@ -210,6 +210,8 @@ public class Block extends BlockStorage{
|
||||
}
|
||||
|
||||
protected void drawPlaceText(String text, int x, int y, boolean valid){
|
||||
if(renderer.pixelator.enabled()) return;
|
||||
|
||||
Color color = valid ? Pal.accent : Pal.remove;
|
||||
BitmapFont font = Core.scene.skin.getFont("default-font");
|
||||
GlyphLayout layout = Pools.obtain(GlyphLayout.class, GlyphLayout::new);
|
||||
@ -290,7 +292,7 @@ public class Block extends BlockStorage{
|
||||
|
||||
@Override
|
||||
public TextureRegion getContentIcon(){
|
||||
return icon(Icon.medium);
|
||||
return icon(Icon.large);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -13,6 +13,7 @@ import io.anuke.arc.util.Time;
|
||||
import io.anuke.arc.util.Tmp;
|
||||
import io.anuke.mindustry.content.Fx;
|
||||
import io.anuke.mindustry.entities.type.TileEntity;
|
||||
import io.anuke.mindustry.graphics.Pal;
|
||||
import io.anuke.mindustry.world.Block;
|
||||
import io.anuke.mindustry.world.Tile;
|
||||
import io.anuke.mindustry.world.meta.BlockStat;
|
||||
@ -103,6 +104,13 @@ public class MendProjector extends Block{
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawPlace(int x, int y, int rotation, boolean valid){
|
||||
Draw.color(Pal.accent);
|
||||
Lines.dashCircle(x * tilesize, y * tilesize, range);
|
||||
Draw.color();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawSelect(Tile tile){
|
||||
MendEntity entity = tile.entity();
|
||||
|
@ -10,6 +10,7 @@ import io.anuke.arc.graphics.g2d.TextureRegion;
|
||||
import io.anuke.arc.math.Mathf;
|
||||
import io.anuke.arc.util.Time;
|
||||
import io.anuke.mindustry.entities.type.TileEntity;
|
||||
import io.anuke.mindustry.graphics.Pal;
|
||||
import io.anuke.mindustry.world.Block;
|
||||
import io.anuke.mindustry.world.Tile;
|
||||
import io.anuke.mindustry.world.meta.BlockStat;
|
||||
@ -52,6 +53,13 @@ public class OverdriveProjector extends Block{
|
||||
topRegion = Core.atlas.find(name + "-top");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void drawPlace(int x, int y, int rotation, boolean valid){
|
||||
Draw.color(Pal.accent);
|
||||
Lines.dashCircle(x * tilesize, y * tilesize, range);
|
||||
Draw.color();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setStats(){
|
||||
super.setStats();
|
||||
|
Reference in New Issue
Block a user