Merge branch 'master' of https://github.com/Anuken/Mindustry into 6.0

# Conflicts:
#	core/src/mindustry/graphics/Bloom.java
#	gradle.properties
This commit is contained in:
Anuken
2020-01-10 15:19:07 -05:00
80 changed files with 14184 additions and 12242 deletions

View File

@@ -26,6 +26,7 @@ public class ShockMine extends Block{
solid = false;
targetable = false;
layer = Layer.overlay;
rebuildable = false;
}
@Override

View File

@@ -1,9 +1,10 @@
package mindustry.world.blocks.distribution;
import arc.*;
import arc.graphics.g2d.*;
import arc.math.Mathf;
import arc.math.geom.Geometry;
import mindustry.world.Tile;
import arc.math.*;
import arc.math.geom.*;
import mindustry.world.*;
import static mindustry.Vars.*;
@@ -31,6 +32,10 @@ public class ExtendingItemBridge extends ItemBridge{
ex *= uptime;
ey *= uptime;
float opacity = Core.settings.getInt("bridgeopacity") / 100f;
if(Mathf.zero(opacity)) return;
Draw.alpha(opacity);
Lines.stroke(8f);
Lines.line(bridgeRegion,
tile.worldx() + Geometry.d4[i].x * tilesize / 2f,
@@ -50,7 +55,7 @@ public class ExtendingItemBridge extends ItemBridge{
Draw.color();
for(int a = 0; a < arrows; a++){
Draw.alpha(Mathf.absin(a / (float)arrows - entity.time / 100f, 0.1f, 1f) * uptime);
Draw.alpha(Mathf.absin(a / (float)arrows - entity.time / 100f, 0.1f, 1f) * uptime * opacity);
Draw.rect(arrowRegion,
tile.worldx() + Geometry.d4[i].x * (tilesize / 2f + a * 6f + 2) * uptime,
tile.worldy() + Geometry.d4[i].y * (tilesize / 2f + a * 6f + 2) * uptime, i * 90f);

View File

@@ -219,10 +219,13 @@ public class ItemBridge extends Block{
Tile other = world.tile(entity.link);
if(!linkValid(tile, other)) return;
float opacity = Core.settings.getInt("bridgeopacity") / 100f;
if(Mathf.zero(opacity)) return;
int i = tile.absoluteRelativeTo(other.x, other.y);
Draw.color(Color.white, Color.black, Mathf.absin(Time.time(), 6f, 0.07f));
Draw.alpha(Math.max(entity.uptime, 0.25f));
Draw.alpha(Math.max(entity.uptime, 0.25f) * opacity);
Draw.rect(endRegion, tile.drawx(), tile.drawy(), i * 90 + 90);
Draw.rect(endRegion, other.drawx(), other.drawy(), i * 90 + 270);
@@ -242,7 +245,7 @@ public class ItemBridge extends Block{
Draw.color();
for(int a = 0; a < arrows; a++){
Draw.alpha(Mathf.absin(a / (float)arrows - entity.time / 100f, 0.1f, 1f) * entity.uptime);
Draw.alpha(Mathf.absin(a / (float)arrows - entity.time / 100f, 0.1f, 1f) * entity.uptime * opacity);
Draw.rect(arrowRegion,
tile.worldx() + Geometry.d4[i].x * (tilesize / 2f + a * 4f + time % 4f),
tile.worldy() + Geometry.d4[i].y * (tilesize / 2f + a * 4f + time % 4f), i * 90f);

View File

@@ -46,6 +46,7 @@ public class NuclearReactor extends PowerGenerator{
hasItems = true;
hasLiquids = true;
entityType = NuclearReactorEntity::new;
rebuildable = false;
}
@Override

View File

@@ -4,7 +4,7 @@ import arc.Core;
import arc.graphics.Color;
import arc.graphics.g2d.*;
import arc.math.Mathf;
import arc.math.RandomXS128;
import arc.math.Rand;
import arc.util.Time;
import mindustry.content.Fx;
import mindustry.entities.type.TileEntity;
@@ -21,7 +21,7 @@ public class Cultivator extends GenericCrafter{
public Color bottomColor = Color.valueOf("474747");
public TextureRegion middleRegion, topRegion;
public RandomXS128 random = new RandomXS128(0);
public Rand random = new Rand(0);
public float recurrence = 6f;
public Attribute attribute = Attribute.spores;

View File

@@ -0,0 +1,29 @@
package mindustry.world.blocks.sandbox;
import mindustry.type.*;
import mindustry.world.*;
public class LiquidVoid extends Block{
public LiquidVoid(String name){
super(name);
hasLiquids = true;
solid = true;
update = true;
}
@Override
public void setBars(){
super.setBars();
bars.remove("liquid");
}
@Override
public boolean acceptLiquid(Tile tile, Tile source, Liquid liquid, float amount){
return true;
}
@Override
public void handleLiquid(Tile tile, Tile source, Liquid liquid, float amount){}
}

View File

@@ -73,7 +73,7 @@ public class LaunchPad extends StorageBlock{
public void update(Tile tile){
TileEntity entity = tile.entity;
if(world.isZone() && entity.cons.valid() && world.isZone() && entity.items.total() >= itemCapacity && entity.timer.get(timerLaunch, launchTime / entity.timeScale)){
if(world.isZone() && entity.cons.valid() && entity.items.total() >= itemCapacity && entity.timer.get(timerLaunch, launchTime / entity.timeScale)){
for(Item item : Vars.content.items()){
Events.fire(Trigger.itemLaunch);
Effects.effect(Fx.padlaunch, tile);