mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-10 18:57:39 +07:00
Smoother mobile player movement / Cleanup
This commit is contained in:
parent
562c41c288
commit
dac2264ac7
@ -1080,7 +1080,7 @@ block.additive-reconstructor.name = Additive Reconstructor
|
||||
block.multiplicative-reconstructor.name = Multiplicative Reconstructor
|
||||
block.exponential-reconstructor.name = Exponential Reconstructor
|
||||
block.tetrative-reconstructor.name = Tetrative Reconstructor
|
||||
block.mass-conveyor.name = Mass Conveyor
|
||||
block.payload-conveyor.name = Payload Conveyor
|
||||
block.payload-router.name = Payload Router
|
||||
block.disassembler.name = Disassembler
|
||||
block.silicon-crucible.name = Silicon Crucible
|
||||
|
@ -128,8 +128,6 @@ const ConfigEvent = Packages.mindustry.game.EventType.ConfigEvent
|
||||
const DepositEvent = Packages.mindustry.game.EventType.DepositEvent
|
||||
const WithdrawEvent = Packages.mindustry.game.EventType.WithdrawEvent
|
||||
const SectorCaptureEvent = Packages.mindustry.game.EventType.SectorCaptureEvent
|
||||
const ZoneConfigureCompleteEvent = Packages.mindustry.game.EventType.ZoneConfigureCompleteEvent
|
||||
const ZoneRequireCompleteEvent = Packages.mindustry.game.EventType.ZoneRequireCompleteEvent
|
||||
const PlayerChatEvent = Packages.mindustry.game.EventType.PlayerChatEvent
|
||||
const ClientPreConnectEvent = Packages.mindustry.game.EventType.ClientPreConnectEvent
|
||||
const CommandIssueEvent = Packages.mindustry.game.EventType.CommandIssueEvent
|
||||
|
@ -995,12 +995,12 @@ public class Blocks implements ContentList{
|
||||
consumes.power(1.75f);
|
||||
}};
|
||||
|
||||
payloadConveyor = new PayloadConveyor("mass-conveyor"){{
|
||||
requirements(Category.distribution, with(Items.copper, 1));
|
||||
payloadConveyor = new PayloadConveyor("payload-conveyor"){{
|
||||
requirements(Category.distribution, with(Items.graphite, 10, Items.copper, 20));
|
||||
}};
|
||||
|
||||
payloadRouter = new PayloadRouter("payload-router"){{
|
||||
requirements(Category.distribution, with(Items.copper, 1));
|
||||
requirements(Category.distribution, with(Items.graphite, 15, Items.copper, 20));
|
||||
}};
|
||||
|
||||
//endregion
|
||||
|
@ -155,12 +155,6 @@ public class Control implements ApplicationListener, Loadable{
|
||||
}
|
||||
});
|
||||
|
||||
Events.on(ZoneRequireCompleteEvent.class, e -> {
|
||||
if(e.objective.display() != null){
|
||||
ui.hudfrag.showToast(Core.bundle.format("zone.requirement.complete", e.zoneForMet.localizedName, e.objective.display()));
|
||||
}
|
||||
});
|
||||
|
||||
//delete save on campaign game over
|
||||
Events.on(GameOverEvent.class, e -> {
|
||||
if(state.isCampaign() && !net.client() && !headless){
|
||||
|
@ -106,27 +106,6 @@ public class EventType{
|
||||
}
|
||||
}
|
||||
|
||||
/** Called when a zone's requirements are met. */
|
||||
public static class ZoneRequireCompleteEvent{
|
||||
public final SectorPreset zoneMet, zoneForMet;
|
||||
public final Objectives.Objective objective;
|
||||
|
||||
public ZoneRequireCompleteEvent(SectorPreset zoneMet, SectorPreset zoneForMet, Objectives.Objective objective){
|
||||
this.zoneMet = zoneMet;
|
||||
this.zoneForMet = zoneForMet;
|
||||
this.objective = objective;
|
||||
}
|
||||
}
|
||||
|
||||
/** Called when a zone's requirements are met. */
|
||||
public static class ZoneConfigureCompleteEvent{
|
||||
public final SectorPreset zone;
|
||||
|
||||
public ZoneConfigureCompleteEvent(SectorPreset zone){
|
||||
this.zone = zone;
|
||||
}
|
||||
}
|
||||
|
||||
/** Called when a sector is conquered, e.g. a boss or base is defeated. */
|
||||
public static class SectorCaptureEvent{
|
||||
public final Sector sector;
|
||||
|
@ -863,6 +863,7 @@ public class MobileInput extends InputHandler implements GestureListener{
|
||||
|
||||
if(player.within(targetPos, attractDst)){
|
||||
movement.setZero();
|
||||
unit.vel.approachDelta(Vec2.ZERO, type.speed * type.accel / 2f);
|
||||
}
|
||||
|
||||
float expansion = 3f;
|
||||
|
@ -34,7 +34,8 @@ public abstract class SaveFileReader{
|
||||
"titan-factory", "legacy-unit-factory",
|
||||
"fortress-factory", "legacy-unit-factory",
|
||||
|
||||
"command-center", "legacy-command-center"
|
||||
"command-center", "legacy-command-center",
|
||||
"mass-conveyor", "payload-conveyor"
|
||||
);
|
||||
|
||||
protected int lastRegionLength;
|
||||
|
@ -372,7 +372,7 @@ public class LStatements{
|
||||
public static class RadarStatement extends LStatement{
|
||||
public RadarTarget target1 = RadarTarget.enemy, target2 = RadarTarget.any, target3 = RadarTarget.any;
|
||||
public RadarSort sort = RadarSort.distance;
|
||||
public String radar = "turret1", sortOrder = "0", output = "result";
|
||||
public String radar = "turret1", sortOrder = "1", output = "result";
|
||||
|
||||
@Override
|
||||
public void build(Table table){
|
||||
|
@ -132,6 +132,7 @@ public class BeControl{
|
||||
() -> Core.app.post(() -> {
|
||||
Log.info("&lcSaving...");
|
||||
SaveIO.save(saveDirectory.child("autosavebe." + saveExtension));
|
||||
Log.info("&lcAutosaved.");
|
||||
|
||||
netServer.kickAll(KickReason.serverRestarting);
|
||||
Threads.sleep(32);
|
||||
|
@ -51,7 +51,7 @@ public class SStats implements SteamUserStatsCallback{
|
||||
this.updated = true;
|
||||
}
|
||||
|
||||
private void checkUpdate(){
|
||||
void checkUpdate(){
|
||||
if(campaign()){
|
||||
SStat.maxUnitActive.max(Groups.unit.count(t -> t.team() == player.team()));
|
||||
|
||||
@ -87,11 +87,11 @@ public class SStats implements SteamUserStatsCallback{
|
||||
});
|
||||
|
||||
//TODO achievement invalid
|
||||
Events.on(ZoneConfigureCompleteEvent.class, e -> {
|
||||
//Events.on(ZoneConfigureCompleteEvent.class, e -> {
|
||||
//if(!content.sectors().contains(z -> !z.canConfigure())){
|
||||
// configAllZones.complete();
|
||||
//}
|
||||
});
|
||||
//});
|
||||
|
||||
Events.run(Trigger.newGame, () -> Core.app.post(() -> {
|
||||
if(campaign() && player.core() != null && player.core().items.total() >= 10 * 1000){
|
||||
|
Loading…
Reference in New Issue
Block a user