Make crater speed configurable

This commit is contained in:
Patrick 'Quezler' Mounier 2020-01-03 12:19:33 +01:00
parent 0807e1bd25
commit d843f29e09
No known key found for this signature in database
GPG Key ID: 0D6CA7326C76D8EA
2 changed files with 5 additions and 6 deletions

View File

@ -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"){{

View File

@ -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);
}
}