Bugfixes
This commit is contained in:
@@ -118,11 +118,15 @@ public class Conveyor extends Block implements Autotiler{
|
||||
|
||||
int blendbits;
|
||||
int blendsclx, blendscly;
|
||||
boolean everupdated = false;
|
||||
|
||||
float clogHeat = 0f;
|
||||
|
||||
@Override
|
||||
public void draw(){
|
||||
if(!everupdated){
|
||||
Log.info("--DID NOT UPDATE {0}", tile);
|
||||
}
|
||||
byte rotation = tile.rotation();
|
||||
int frame = clogHeat <= 0.5f ? (int)(((Time.time() * speed * 8f * timeScale())) % 4) : 0;
|
||||
Draw.rect(regions[Mathf.clamp(blendbits, 0, regions.length - 1)][Mathf.clamp(frame, 0, regions[0].length - 1)], x, y,
|
||||
@@ -142,6 +146,7 @@ public class Conveyor extends Block implements Autotiler{
|
||||
blendbits = bits[0];
|
||||
blendsclx = bits[1];
|
||||
blendscly = bits[2];
|
||||
everupdated = true;
|
||||
|
||||
if(tile.front() != null && tile.front() != null){
|
||||
next = tile.front();
|
||||
|
||||
11
core/src/mindustry/world/blocks/legacy/LegacyBlock.java
Normal file
11
core/src/mindustry/world/blocks/legacy/LegacyBlock.java
Normal file
@@ -0,0 +1,11 @@
|
||||
package mindustry.world.blocks.legacy;
|
||||
|
||||
import mindustry.world.*;
|
||||
|
||||
/** Any subclass of this will be removed upon world load. */
|
||||
public class LegacyBlock extends Block{
|
||||
|
||||
public LegacyBlock(String name){
|
||||
super(name);
|
||||
}
|
||||
}
|
||||
25
core/src/mindustry/world/blocks/legacy/LegacyMechPad.java
Normal file
25
core/src/mindustry/world/blocks/legacy/LegacyMechPad.java
Normal file
@@ -0,0 +1,25 @@
|
||||
package mindustry.world.blocks.legacy;
|
||||
|
||||
import arc.util.io.*;
|
||||
import mindustry.gen.*;
|
||||
import mindustry.world.*;
|
||||
|
||||
public class LegacyMechPad extends Block{
|
||||
|
||||
public LegacyMechPad(String name){
|
||||
super(name);
|
||||
update = true;
|
||||
}
|
||||
|
||||
public class LegacyMechPadEntity extends TileEntity{
|
||||
|
||||
@Override
|
||||
public void read(Reads read, byte revision){
|
||||
super.read(read, revision);
|
||||
//read 3 floats for pad data, and discard them
|
||||
read.f();
|
||||
read.f();
|
||||
read.f();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -204,7 +204,7 @@ public class Drill extends Block{
|
||||
float progress;
|
||||
int index;
|
||||
float warmup;
|
||||
float drillTime;
|
||||
float timeDrilled;
|
||||
float lastDrillSpeed;
|
||||
|
||||
int dominantItems;
|
||||
@@ -249,7 +249,7 @@ public class Drill extends Block{
|
||||
dump(dominantItem);
|
||||
}
|
||||
|
||||
drillTime += warmup * delta();
|
||||
timeDrilled += warmup * delta();
|
||||
|
||||
if(items.total() < itemCapacity && dominantItems > 0 && consValid()){
|
||||
|
||||
@@ -263,8 +263,7 @@ public class Drill extends Block{
|
||||
|
||||
lastDrillSpeed = (speed * dominantItems * warmup) / (drillTime + hardnessDrillMultiplier * dominantItem.hardness);
|
||||
warmup = Mathf.lerpDelta(warmup, speed, warmupSpeed);
|
||||
progress += delta()
|
||||
* dominantItems * speed * warmup;
|
||||
progress += delta() * dominantItems * speed * warmup;
|
||||
|
||||
if(Mathf.chance(Time.delta() * updateEffectChance * warmup))
|
||||
updateEffect.at(getX() + Mathf.range(size * 2f), getY() + Mathf.range(size * 2f));
|
||||
@@ -305,7 +304,7 @@ public class Drill extends Block{
|
||||
Draw.color();
|
||||
}
|
||||
|
||||
Draw.rect(rotatorRegion, x, y, drillTime * rotateSpeed);
|
||||
Draw.rect(rotatorRegion, x, y, timeDrilled * rotateSpeed);
|
||||
|
||||
Draw.rect(topRegion, x, y);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user