mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-01-27 08:00:04 +07:00
Make crater speed configurable
This commit is contained in:
parent
0807e1bd25
commit
d843f29e09
@ -894,8 +894,8 @@ public class Blocks implements ContentList{
|
||||
plastaniumConveyor = new CraterConveyor("plastanium-conveyor"){{
|
||||
requirements(Category.distribution, ItemStack.with(Items.plastanium, 1, Items.silicon, 1, Items.graphite, 1));
|
||||
itemCapacity = 8;
|
||||
speed = 0.075f;
|
||||
health = 75;
|
||||
speed = 0f;
|
||||
}};
|
||||
|
||||
armoredConveyor = new ArmoredItemConveyor("armored-conveyor"){{
|
||||
|
@ -15,8 +15,7 @@ import mindustry.graphics.*;
|
||||
import arc.scene.ui.layout.*;
|
||||
import mindustry.world.meta.*;
|
||||
|
||||
|
||||
import static mindustry.Vars.itemSize;
|
||||
import static mindustry.Vars.*;
|
||||
|
||||
public class CraterConveyor extends BaseConveyor{
|
||||
private TextureRegion start, end, crater;
|
||||
@ -118,9 +117,9 @@ public class CraterConveyor extends BaseConveyor{
|
||||
}
|
||||
|
||||
if(entity.crater != null){
|
||||
entity.crater.x = Mathf.lerpDelta(entity.crater.x, tile.drawx(), 0.075f);
|
||||
entity.crater.y = Mathf.lerpDelta(entity.crater.y, tile.drawy(), 0.075f);
|
||||
entity.crater.rotation = Mathf.slerpDelta(entity.crater.rotation, entity.crater.face, 0.1f);
|
||||
entity.crater.x = Mathf.lerpDelta(entity.crater.x, tile.drawx(), speed);
|
||||
entity.crater.y = Mathf.lerpDelta(entity.crater.y, tile.drawy(), speed);
|
||||
entity.crater.rotation = Mathf.slerpDelta(entity.crater.rotation, entity.crater.face, speed * 2);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user