mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-24 14:47:58 +07:00
Bugfixes
This commit is contained in:
@ -76,6 +76,8 @@ public class AndroidLauncher extends AndroidApplication{
|
|||||||
if(code == Activity.RESULT_OK && in != null && in.getData() != null){
|
if(code == Activity.RESULT_OK && in != null && in.getData() != null){
|
||||||
Uri uri = in.getData();
|
Uri uri = in.getData();
|
||||||
|
|
||||||
|
if(uri.getPath().contains("(invalid)")) return;
|
||||||
|
|
||||||
Core.app.post(() -> Core.app.post(() -> cons.accept(new FileHandle(uri.getPath()){
|
Core.app.post(() -> Core.app.post(() -> cons.accept(new FileHandle(uri.getPath()){
|
||||||
@Override
|
@Override
|
||||||
public InputStream read(){
|
public InputStream read(){
|
||||||
|
@ -12,7 +12,6 @@ import io.anuke.mindustry.content.*;
|
|||||||
import io.anuke.mindustry.entities.*;
|
import io.anuke.mindustry.entities.*;
|
||||||
import io.anuke.mindustry.entities.Effects.*;
|
import io.anuke.mindustry.entities.Effects.*;
|
||||||
import io.anuke.mindustry.entities.type.*;
|
import io.anuke.mindustry.entities.type.*;
|
||||||
import io.anuke.mindustry.entities.type.Bullet;
|
|
||||||
import io.anuke.mindustry.gen.*;
|
import io.anuke.mindustry.gen.*;
|
||||||
import io.anuke.mindustry.graphics.*;
|
import io.anuke.mindustry.graphics.*;
|
||||||
import io.anuke.mindustry.type.*;
|
import io.anuke.mindustry.type.*;
|
||||||
@ -120,12 +119,13 @@ public class MassDriver extends Block{
|
|||||||
|
|
||||||
if(
|
if(
|
||||||
tile.entity.items.total() >= minDistribute && //must shoot minimum amount of items
|
tile.entity.items.total() >= minDistribute && //must shoot minimum amount of items
|
||||||
link.block().itemCapacity - link.entity.items.total() >= minDistribute && //must have minimum amount of space
|
link.block().itemCapacity - link.entity.items.total() >= minDistribute //must have minimum amount of space
|
||||||
entity.reload <= 0.0001f //must have reloaded
|
|
||||||
){
|
){
|
||||||
MassDriverEntity other = link.entity();
|
MassDriverEntity other = link.entity();
|
||||||
other.waitingShooters.add(tile);
|
other.waitingShooters.add(tile);
|
||||||
|
|
||||||
|
if(entity.reload <= 0.0001f){
|
||||||
|
|
||||||
//align to target location
|
//align to target location
|
||||||
entity.rotation = Mathf.slerpDelta(entity.rotation, targetRotation, rotateSpeed * entity.power.satisfaction);
|
entity.rotation = Mathf.slerpDelta(entity.rotation, targetRotation, rotateSpeed * entity.power.satisfaction);
|
||||||
|
|
||||||
@ -144,6 +144,7 @@ public class MassDriver extends Block{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void draw(Tile tile){
|
public void draw(Tile tile){
|
||||||
|
@ -97,9 +97,11 @@ public class CoreBlock extends StorageBlock{
|
|||||||
entity.storageCapacity += other.block().itemCapacity + other.entity.proximity().sum(e -> isContainer(e) ? e.block().itemCapacity : 0);
|
entity.storageCapacity += other.block().itemCapacity + other.entity.proximity().sum(e -> isContainer(e) ? e.block().itemCapacity : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!world.isGenerating()){
|
||||||
for(Item item : content.items()){
|
for(Item item : content.items()){
|
||||||
entity.items.set(item, Math.min(entity.items.get(item), entity.storageCapacity));
|
entity.items.set(item, Math.min(entity.items.get(item), entity.storageCapacity));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for(Tile other : state.teams.get(tile.getTeam()).cores){
|
for(Tile other : state.teams.get(tile.getTeam()).cores){
|
||||||
CoreEntity oe = other.entity();
|
CoreEntity oe = other.entity();
|
||||||
|
Reference in New Issue
Block a user