Fixed pyratite mixer glitchy animation / Fixed block select flashing
This commit is contained in:
+1
-1
@@ -27,7 +27,7 @@ allprojects {
|
|||||||
gdxVersion = '1.9.8'
|
gdxVersion = '1.9.8'
|
||||||
roboVMVersion = '2.3.0'
|
roboVMVersion = '2.3.0'
|
||||||
aiVersion = '1.8.1'
|
aiVersion = '1.8.1'
|
||||||
uCoreVersion = '2e6aa0a1df'
|
uCoreVersion = '7945183f17'
|
||||||
|
|
||||||
getVersionString = {
|
getVersionString = {
|
||||||
String buildVersion = getBuildVersion()
|
String buildVersion = getBuildVersion()
|
||||||
|
|||||||
@@ -129,6 +129,7 @@ public class CraftingBlocks extends BlockList implements ContentList {
|
|||||||
}};
|
}};
|
||||||
|
|
||||||
pyratiteMixer = new PowerSmelter("pyratite-mixer") {{
|
pyratiteMixer = new PowerSmelter("pyratite-mixer") {{
|
||||||
|
flameColor = Color.CLEAR;
|
||||||
itemCapacity = 20;
|
itemCapacity = 20;
|
||||||
hasItems = true;
|
hasItems = true;
|
||||||
hasPower = true;
|
hasPower = true;
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package io.anuke.mindustry.ui.fragments;
|
package io.anuke.mindustry.ui.fragments;
|
||||||
|
|
||||||
|
import com.badlogic.gdx.Gdx;
|
||||||
import com.badlogic.gdx.graphics.Color;
|
import com.badlogic.gdx.graphics.Color;
|
||||||
import com.badlogic.gdx.graphics.g2d.TextureRegion;
|
import com.badlogic.gdx.graphics.g2d.TextureRegion;
|
||||||
import com.badlogic.gdx.math.Interpolation;
|
import com.badlogic.gdx.math.Interpolation;
|
||||||
@@ -148,6 +149,7 @@ public class BlocksFragment extends Fragment{
|
|||||||
input.recipe = null;
|
input.recipe = null;
|
||||||
}
|
}
|
||||||
lastCategory = cat;
|
lastCategory = cat;
|
||||||
|
stack.act(Gdx.graphics.getDeltaTime());
|
||||||
}).growX().height(54).group(group)
|
}).growX().height(54).group(group)
|
||||||
.name("sectionbutton" + cat.name()).get();
|
.name("sectionbutton" + cat.name()).get();
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
package io.anuke.mindustry.world.blocks.production;
|
package io.anuke.mindustry.world.blocks.production;
|
||||||
|
|
||||||
import com.badlogic.gdx.graphics.Color;
|
import com.badlogic.gdx.graphics.Color;
|
||||||
|
import com.badlogic.gdx.graphics.g2d.TextureRegion;
|
||||||
import io.anuke.mindustry.content.fx.BlockFx;
|
import io.anuke.mindustry.content.fx.BlockFx;
|
||||||
import io.anuke.mindustry.entities.TileEntity;
|
import io.anuke.mindustry.entities.TileEntity;
|
||||||
import io.anuke.mindustry.type.Item;
|
import io.anuke.mindustry.type.Item;
|
||||||
@@ -48,6 +49,8 @@ public class PowerSmelter extends PowerBlock {
|
|||||||
burnEffect = BlockFx.fuelburn;
|
burnEffect = BlockFx.fuelburn;
|
||||||
protected Color flameColor = Color.valueOf("ffc999");
|
protected Color flameColor = Color.valueOf("ffc999");
|
||||||
|
|
||||||
|
protected TextureRegion topRegion;
|
||||||
|
|
||||||
public PowerSmelter(String name) {
|
public PowerSmelter(String name) {
|
||||||
super(name);
|
super(name);
|
||||||
hasItems = true;
|
hasItems = true;
|
||||||
@@ -56,6 +59,12 @@ public class PowerSmelter extends PowerBlock {
|
|||||||
itemCapacity = 20;
|
itemCapacity = 20;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void load() {
|
||||||
|
super.load();
|
||||||
|
topRegion = Draw.region(name + "-top");
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setBars(){
|
public void setBars(){
|
||||||
super.setBars();
|
super.setBars();
|
||||||
@@ -169,7 +178,7 @@ public class PowerSmelter extends PowerBlock {
|
|||||||
PowerSmelterEntity entity = tile.entity();
|
PowerSmelterEntity entity = tile.entity();
|
||||||
|
|
||||||
//draw glowing center
|
//draw glowing center
|
||||||
if(entity.heat > 0f){
|
if(entity.heat > 0f && flameColor.a > 0.001f){
|
||||||
float g = 0.3f;
|
float g = 0.3f;
|
||||||
float r = 0.06f;
|
float r = 0.06f;
|
||||||
float cr = Mathf.random(0.1f);
|
float cr = Mathf.random(0.1f);
|
||||||
@@ -179,7 +188,7 @@ public class PowerSmelter extends PowerBlock {
|
|||||||
Draw.tint(flameColor);
|
Draw.tint(flameColor);
|
||||||
Fill.circle(tile.drawx(), tile.drawy(), 3f + Mathf.absin(Timers.time(), 5f, 2f) + cr);
|
Fill.circle(tile.drawx(), tile.drawy(), 3f + Mathf.absin(Timers.time(), 5f, 2f) + cr);
|
||||||
Draw.color(1f, 1f, 1f, entity.heat);
|
Draw.color(1f, 1f, 1f, entity.heat);
|
||||||
Draw.rect(name + "-top", tile.drawx(), tile.drawy());
|
Draw.rect(topRegion, tile.drawx(), tile.drawy());
|
||||||
Fill.circle(tile.drawx(), tile.drawy(), 1.9f + Mathf.absin(Timers.time(), 5f, 1f) + cr);
|
Fill.circle(tile.drawx(), tile.drawy(), 1.9f + Mathf.absin(Timers.time(), 5f, 1f) + cr);
|
||||||
|
|
||||||
Draw.color();
|
Draw.color();
|
||||||
|
|||||||
Reference in New Issue
Block a user