mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-11 11:17:11 +07:00
Bugfixes
This commit is contained in:
parent
a815c564fb
commit
cbcf237d80
@ -253,7 +253,7 @@ bestwave = [LIGHT_GRAY]Best Wave: {0}
|
||||
launch = < LAUNCH >
|
||||
launch.title = Launch Successful
|
||||
launch.next = [LIGHT_GRAY]next opportunity at wave {0}
|
||||
launch.unable = [scarlet]Unable to LAUNCH.[] Enemies.
|
||||
launch.unable = [scarlet]Unable to LAUNCH.[] {0} Enemies.
|
||||
launch.confirm = This will launch all resources in your core.\nYou will not be able to return to this base.
|
||||
uncover = Uncover
|
||||
configure = Configure Loadout
|
||||
|
@ -34,7 +34,7 @@ public class Fx implements ContentList{
|
||||
bigShockwave, nuclearShockwave, explosion, blockExplosion, blockExplosionSmoke, shootSmall, shootHeal, shootSmallSmoke, shootBig, shootBig2, shootBigSmoke,
|
||||
shootBigSmoke2, shootSmallFlame, shootLiquid, shellEjectSmall, shellEjectMedium,
|
||||
shellEjectBig, lancerLaserShoot, lancerLaserShootSmoke, lancerLaserCharge, lancerLaserChargeBegin, lightningCharge, lightningShoot,
|
||||
launchFull, unitSpawn, spawnShockwave, magmasmoke, impactShockwave, impactcloud, impactsmoke;
|
||||
unitSpawn, spawnShockwave, magmasmoke, impactShockwave, impactcloud, impactsmoke;
|
||||
|
||||
@Override
|
||||
public void load(){
|
||||
@ -1160,12 +1160,5 @@ public class Fx implements ContentList{
|
||||
Lines.poly(e.x, e.y, 6, e.rotation + e.fin(), 90);
|
||||
Draw.reset();
|
||||
});
|
||||
|
||||
launchFull = new Effect(60, 9999999999f, e -> {
|
||||
Draw.color();
|
||||
Draw.alpha(e.fslope());
|
||||
Fill.rect(Core.camera.position.x, Core.camera.position.y, Core.camera.width + 10, Core.camera.height + 10);
|
||||
Draw.reset();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -111,7 +111,9 @@ public class Logic implements ApplicationListener{
|
||||
|
||||
@Remote(called = Loc.both)
|
||||
public static void launchZone(){
|
||||
Effects.effect(Fx.launchFull, 0, 0);
|
||||
if(!headless){
|
||||
ui.hudfrag.showLaunch();
|
||||
}
|
||||
|
||||
for(Tile tile : new ObjectSetIterator<>(state.teams.get(defaultTeam).cores)){
|
||||
Effects.effect(Fx.launch, tile);
|
||||
|
@ -33,11 +33,6 @@ public class Stats{
|
||||
score += (float)((zone.conditionWave - wavesLasted) / zone.launchPeriod + 1) * 1.5f;
|
||||
}
|
||||
|
||||
//building more stuff gives a better score slightly
|
||||
score += (buildingsBuilt - buildingsDeconstructed)*0.001f;
|
||||
//destroyed buildings penalize score
|
||||
score -= buildingsDestroyed * 0.003f;
|
||||
|
||||
int capacity = zone.generator.coreBlock.itemCapacity;
|
||||
|
||||
//weigh used fractions of
|
||||
|
@ -11,7 +11,7 @@ import java.nio.ByteBuffer;
|
||||
|
||||
public class MapTileData{
|
||||
/**
|
||||
* Tile size: 4 bytes. <br>
|
||||
* Tile size: 5 bytes. <br>
|
||||
* 0: ground tile <br>
|
||||
* 1: wall tile <br>
|
||||
* 2: rotation + team <br>
|
||||
|
@ -17,7 +17,10 @@ import io.anuke.arc.scene.ui.layout.Stack;
|
||||
import io.anuke.arc.scene.ui.layout.Table;
|
||||
import io.anuke.arc.scene.ui.layout.Unit;
|
||||
import io.anuke.arc.scene.utils.Elements;
|
||||
import io.anuke.arc.util.*;
|
||||
import io.anuke.arc.util.Align;
|
||||
import io.anuke.arc.util.Scaling;
|
||||
import io.anuke.arc.util.Time;
|
||||
import io.anuke.arc.util.Tmp;
|
||||
import io.anuke.mindustry.core.GameState.State;
|
||||
import io.anuke.mindustry.game.EventType.StateChangeEvent;
|
||||
import io.anuke.mindustry.game.Team;
|
||||
@ -28,9 +31,6 @@ import io.anuke.mindustry.input.Binding;
|
||||
import io.anuke.mindustry.net.Net;
|
||||
import io.anuke.mindustry.net.Packets.AdminAction;
|
||||
import io.anuke.mindustry.ui.IntFormat;
|
||||
import io.anuke.mindustry.ui.dialogs.FloatingDialog;
|
||||
|
||||
import java.lang.StringBuilder;
|
||||
|
||||
import static io.anuke.mindustry.Vars.*;
|
||||
|
||||
@ -235,7 +235,7 @@ public class HudFragment extends Fragment{
|
||||
return;
|
||||
}
|
||||
|
||||
button.setText(Core.bundle.get(state.enemies() > 0 ? "launch.unable" : "launch") + "\n" +
|
||||
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,
|
||||
@ -370,14 +370,17 @@ public class HudFragment extends Fragment{
|
||||
}
|
||||
}
|
||||
|
||||
public void showTextDialog(String str){
|
||||
new FloatingDialog("$mission.info"){{
|
||||
shouldPause = true;
|
||||
setFillParent(false);
|
||||
getCell(cont).growX();
|
||||
cont.margin(15).add(str).width(400f).wrap().get().setAlignment(Align.left, Align.left);
|
||||
buttons.addButton("$continue", this::hide).size(140, 60).pad(4);
|
||||
}}.show();
|
||||
public void showLaunch(){
|
||||
Image image = new Image("white");
|
||||
image.getColor().a = 0f;
|
||||
image.setFillParent(true);
|
||||
image.actions(Actions.fadeIn(40f / 60f));
|
||||
image.update(() -> {
|
||||
if(state.is(State.menu)){
|
||||
image.remove();
|
||||
}
|
||||
});
|
||||
Core.scene.add(image);
|
||||
}
|
||||
|
||||
private void toggleMenus(){
|
||||
|
@ -25,10 +25,15 @@ public class Build{
|
||||
}
|
||||
|
||||
Tile tile = world.tile(x, y);
|
||||
float prevPercent = 1f;
|
||||
|
||||
//just in case
|
||||
if(tile == null) return;
|
||||
|
||||
if(tile.entity != null){
|
||||
prevPercent = tile.entity.health();
|
||||
}
|
||||
|
||||
tile = tile.target();
|
||||
|
||||
Block previous = tile.block();
|
||||
@ -38,6 +43,7 @@ public class Build{
|
||||
tile.setBlock(sub);
|
||||
tile.<BuildEntity>entity().setDeconstruct(previous);
|
||||
tile.setTeam(team);
|
||||
tile.entity.health = tile.entity.maxHealth() * prevPercent;
|
||||
|
||||
if(previous.isMultiblock()){
|
||||
int offsetx = -(previous.size - 1) / 2;
|
||||
|
@ -39,7 +39,7 @@ public class BuildBlock extends Block{
|
||||
super(name);
|
||||
update = true;
|
||||
size = Integer.parseInt(name.charAt(name.length() - 1) + "");
|
||||
health = 10;
|
||||
health = 20;
|
||||
layer = Layer.placement;
|
||||
consumesTap = true;
|
||||
solidifes = true;
|
||||
|
@ -11,6 +11,7 @@ public class DifferentialGenerator extends TurbineGenerator{
|
||||
public DifferentialGenerator(String name){
|
||||
super(name);
|
||||
|
||||
hasLiquids = true;
|
||||
consumes.require(ConsumeItem.class);
|
||||
consumes.require(ConsumeLiquid.class);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user