mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-02-25 22:17:59 +07:00
Bugfixes
This commit is contained in:
parent
a86f62cbe8
commit
46f43a3456
@ -172,7 +172,7 @@ public class SectorPresets{
|
||||
new BuildCountObjective(Blocks.coreBastion, 1).withMarkers(
|
||||
new ShapeTextMarker("New cores can be placed on [accent]core tiles[].\nNew cores function as forward bases and share a resource inventory with other cores.\nPlace a core.", 287.5f * 8f, 197.5f * 8f, 9f * 2.6f, 0f, 12f)
|
||||
),
|
||||
new TimerObjective("Set up defenses", 120 * 60).withMarkers(
|
||||
new TimerObjective("[accent]Set up defenses:[lightgray] {0}", 120 * 60).withMarkers(
|
||||
new TextMarker("The enemy will be able to detect you in 2 minutes.\nSet up defenses, mining, and production.", 288f * 8f, 202f * 8f)
|
||||
).withFlags("openMap")
|
||||
);
|
||||
|
@ -213,6 +213,7 @@ public class Control implements ApplicationListener, Loadable{
|
||||
|
||||
if(state.isCampaign()){
|
||||
|
||||
//don't run when hosting, that doesn't really work.
|
||||
if(state.rules.sector.planet.prebuildBase){
|
||||
toBePlaced.clear();
|
||||
float unitsPerTick = 2f;
|
||||
@ -225,19 +226,26 @@ public class Control implements ApplicationListener, Loadable{
|
||||
var ccore = build.closestCore();
|
||||
|
||||
if(ccore != null && build.within(ccore, buildRadius)){
|
||||
build.pickedUp();
|
||||
build.tile.remove();
|
||||
anyBuilds = true;
|
||||
|
||||
toBePlaced.add(build);
|
||||
if(!net.active()){
|
||||
build.pickedUp();
|
||||
build.tile.remove();
|
||||
|
||||
Time.run(build.dst(ccore) / unitsPerTick + coreDelay, () -> {
|
||||
if(build.tile.build != build){
|
||||
placeLandBuild(build);
|
||||
toBePlaced.add(build);
|
||||
|
||||
toBePlaced.remove(build);
|
||||
}
|
||||
});
|
||||
Time.run(build.dst(ccore) / unitsPerTick + coreDelay, () -> {
|
||||
if(build.tile.build != build){
|
||||
placeLandBuild(build);
|
||||
|
||||
toBePlaced.remove(build);
|
||||
}
|
||||
});
|
||||
}else{
|
||||
//when already hosting, instantly build everything. this looks bad but it's better than a desync
|
||||
Fx.coreBuildBlock.at(build.x, build.y, 0f, build.block);
|
||||
Fx.placeBlock.at(build.x, build.y, build.block.size);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -495,15 +495,15 @@ public class CoreBlock extends StorageBlock{
|
||||
public void handleItem(Building source, Item item){
|
||||
boolean incinerate = incinerateNonBuildable && !item.buildable;
|
||||
|
||||
if(team == state.rules.defaultTeam){
|
||||
state.stats.coreItemCount.increment(item);
|
||||
}
|
||||
|
||||
if(net.server() || !net.active()){
|
||||
if(team == state.rules.defaultTeam && state.isCampaign() && !incinerate){
|
||||
state.rules.sector.info.handleCoreItem(item, 1);
|
||||
}
|
||||
|
||||
if(team == state.rules.defaultTeam){
|
||||
state.stats.coreItemCount.increment(item);
|
||||
}
|
||||
|
||||
if(items.get(item) >= storageCapacity || incinerate){
|
||||
//create item incineration effect at random intervals
|
||||
if(!noEffect){
|
||||
|
Loading…
Reference in New Issue
Block a user