mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-04 23:38:10 +07:00
Additional bugfixes
This commit is contained in:
@ -181,7 +181,7 @@ public class ItemDrop extends SolidEntity implements SaveTrait, SyncTrait, DrawT
|
||||
}
|
||||
|
||||
if(sinktime >= sinkLifetime){
|
||||
CallEntity.onPickup(getID());
|
||||
remove();
|
||||
}
|
||||
}else{
|
||||
sinktime = 0f;
|
||||
|
@ -25,10 +25,7 @@ import io.anuke.ucore.graphics.Draw;
|
||||
import io.anuke.ucore.graphics.Fill;
|
||||
import io.anuke.ucore.graphics.Lines;
|
||||
import io.anuke.ucore.graphics.Shapes;
|
||||
import io.anuke.ucore.util.Angles;
|
||||
import io.anuke.ucore.util.Geometry;
|
||||
import io.anuke.ucore.util.Mathf;
|
||||
import io.anuke.ucore.util.Translator;
|
||||
import io.anuke.ucore.util.*;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
|
@ -251,6 +251,7 @@ public abstract class BaseUnit extends Unit implements ShooterTrait{
|
||||
|
||||
if(Net.client()){
|
||||
interpolate();
|
||||
status.update(this);
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -121,11 +121,11 @@ public class OverlayRenderer {
|
||||
drawbars.run();
|
||||
|
||||
if(values[0] > 0){
|
||||
drawEncloser(target.drawx(), target.drawy() + target.block().size * tilesize/2f + 2f + values[0]/2f + (values[0] > 2 ? 1 : 0), values[0]);
|
||||
drawEncloser(target.drawx(), target.drawy() + target.block().size * tilesize/2f + 2f + values[0]/2f - 0.5f + (values[0] > 2 ? 0.5f : 0), values[0]);
|
||||
}
|
||||
|
||||
if(values[1] > 0){
|
||||
drawEncloser(target.drawx(), target.drawy() - target.block().size * tilesize/2f - 2f - values[1]/2f, values[1]);
|
||||
drawEncloser(target.drawx(), target.drawy() - target.block().size * tilesize/2f - 2f - values[1]/2f - 0.5f, values[1]);
|
||||
}
|
||||
|
||||
doDraw[0] = true;
|
||||
|
@ -259,7 +259,11 @@ public class BlocksFragment extends Fragment{
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}/*else{
|
||||
if(control.input(0).recipe == r){
|
||||
control.input(0).recipe = null;
|
||||
}
|
||||
}*/
|
||||
image.setChecked(false);
|
||||
});
|
||||
|
||||
|
@ -196,7 +196,6 @@ public class BuildBlock extends Block {
|
||||
double maxProgress = amount;
|
||||
|
||||
for(int i = 0; i < recipe.requirements.length; i ++){
|
||||
accumulator[i] += recipe.requirements[i].amount*amount; //add amount progressed to the accumulator
|
||||
int required = (int)(accumulator[i]); //calculate items that are required now
|
||||
|
||||
if(required > 0){ //if this amount is positive...
|
||||
@ -205,7 +204,7 @@ public class BuildBlock extends Block {
|
||||
//get this as a fraction
|
||||
double fraction = maxUse / (double)required;
|
||||
|
||||
accumulator[i] -= recipe.requirements[i].amount*amount*(1-fraction);
|
||||
//accumulator[i] -= recipe.requirements[i].amount*amount*(1-fraction);
|
||||
|
||||
//move max progress down if this fraction is less than 1
|
||||
maxProgress = Math.min(maxProgress, maxProgress*fraction);
|
||||
@ -217,6 +216,10 @@ public class BuildBlock extends Block {
|
||||
//else, no items are required yet, so just keep going
|
||||
}
|
||||
|
||||
for (int i = 0; i < recipe.requirements.length; i++) {
|
||||
accumulator[i] += recipe.requirements[i].amount*maxProgress; //add min amount progressed to the accumulator
|
||||
}
|
||||
|
||||
progress += maxProgress;
|
||||
updated = true;
|
||||
}
|
||||
|
@ -77,8 +77,11 @@ public class Conveyor extends Block{
|
||||
float x = tile.drawx(), y = tile.drawy();
|
||||
|
||||
if(offset % 2 == 1){
|
||||
if(point.x < 0) x += 0.5f;
|
||||
if(point.y < 0) y += 0.5f;
|
||||
if(point.x < 0) x += 0.75f;
|
||||
if(point.y < 0)
|
||||
y += 0.5f;
|
||||
else if(point.y > 0)
|
||||
y -= 0.5f;
|
||||
}
|
||||
|
||||
Draw.rect(region1,
|
||||
|
Reference in New Issue
Block a user