carbide crucible implementation

This commit is contained in:
Anuken
2021-11-12 11:07:15 -05:00
parent 51301a50cc
commit 8da4e72e77
16 changed files with 213 additions and 22 deletions

View File

@@ -952,18 +952,18 @@ public class Blocks implements ContentList{
carbideCrucible = new HeatCrafter("carbide-crucible"){{
requirements(Category.crafting, with(Items.tungsten, 60, Items.graphite, 30));
craftEffect = Fx.smeltsmoke;
craftEffect = Fx.none;
outputItem = new ItemStack(Items.carbide, 1);
craftTime = 30f;
craftTime = 60f * 4f;
size = 3;
itemCapacity = 20;
hasPower = hasItems = true;
drawer = new DrawSmelter(Color.valueOf("ffc099"));
drawer = new DrawMulti(new DrawCrucible(), new DrawHeat());
ambientSound = Sounds.smelter;
ambientSoundVolume = 0.07f;
heatRequirement = 10f;
//TODO use heat!
consumes.items(with(Items.tungsten, 1, Items.graphite, 2));
consumes.power(2f);
}};

View File

@@ -1659,6 +1659,17 @@ public class Fx{
}
}).layer(Layer.bullet - 1f),
crucibleSmoke = new Effect(100, e -> {
color(Pal.redLight);
alpha(e.fslope() * 0.8f);
rand.setSeed(e.id);
for(int i = 0; i < 5; i++){
v.trns(rand.random(360f), rand.random(e.finpow() * 14f)).add(e.x, e.y);
Fill.circle(v.x, v.y, rand.random(1.4f, 2.8f));
}
}).layer(Layer.bullet - 1f),
generatespark = new Effect(18, e -> {
randLenVectors(e.id, 5, e.fin() * 8f, (x, y) -> {
float len = e.fout() * 4f;

View File

@@ -108,7 +108,7 @@ public class Items implements ContentList{
tungsten = new Item("tungsten", Color.valueOf("768a9a")){{
hardness = 5;
cost = 1.2f;
cost = 1.5f;
}};
carbide = new Item("carbide", Color.valueOf("89769a")){{