Regen projection recolor
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.0 KiB |
@@ -1545,28 +1545,30 @@ public class Blocks{
|
|||||||
buildSpeed = 1.5f;
|
buildSpeed = 1.5f;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
//TODO green looks bad switch to orange
|
|
||||||
//TODO orange also looks bad hhhh
|
|
||||||
regenProjector = new RegenProjector("regen-projector"){{
|
regenProjector = new RegenProjector("regen-projector"){{
|
||||||
requirements(Category.effect, with(Items.silicon, 60, Items.tungsten, 60, Items.oxide, 30, Items.beryllium, 80));
|
requirements(Category.effect, with(Items.silicon, 60, Items.tungsten, 60, Items.oxide, 30, Items.beryllium, 80));
|
||||||
size = 3;
|
size = 3;
|
||||||
consumes.power(1f);
|
consumes.power(1f);
|
||||||
range = 28;
|
range = 28;
|
||||||
|
baseColor = Pal.regen;
|
||||||
|
|
||||||
consumes.liquid(Liquids.hydrogen, 1f / 60f);
|
consumes.liquid(Liquids.hydrogen, 1f / 60f);
|
||||||
|
|
||||||
healPercent = 4f / 60f;
|
healPercent = 4f / 60f;
|
||||||
|
|
||||||
|
Color col = Color.valueOf("8ca9e8");
|
||||||
|
|
||||||
drawer = new DrawMulti(new DrawRegion("-bottom"), new DrawLiquidTile(Liquids.hydrogen, 9f / 4f), new DrawBlock(), new DrawGlowRegion(){{
|
drawer = new DrawMulti(new DrawRegion("-bottom"), new DrawLiquidTile(Liquids.hydrogen, 9f / 4f), new DrawBlock(), new DrawGlowRegion(){{
|
||||||
color = Color.orange;//Color.valueOf("1eff21");
|
color = Color.sky;
|
||||||
}}, new DrawPulseShape(false){{
|
}}, new DrawPulseShape(false){{
|
||||||
//radiusScl = 0.95f;
|
|
||||||
layer = Layer.effect;
|
layer = Layer.effect;
|
||||||
|
color = col;
|
||||||
}}, new DrawShape(){{
|
}}, new DrawShape(){{
|
||||||
layer = Layer.effect;
|
layer = Layer.effect;
|
||||||
radius = 3.5f;
|
radius = 3.5f;
|
||||||
useWarmupRadius = true;
|
useWarmupRadius = true;
|
||||||
timeScl = 2f;
|
timeScl = 2f;
|
||||||
|
color = col;
|
||||||
}});
|
}});
|
||||||
}};
|
}};
|
||||||
|
|
||||||
@@ -2338,7 +2340,7 @@ public class Blocks{
|
|||||||
|
|
||||||
//TODO different requirements
|
//TODO different requirements
|
||||||
consumes.power(6f);
|
consumes.power(6f);
|
||||||
consumes.liquids(LiquidStack.with(Liquids.water, 0.5f, Liquids.hydrogen, 4f / 60f));
|
consumes.liquids(LiquidStack.with(Liquids.water, 0.4f, Liquids.hydrogen, 4f / 60f));
|
||||||
}};
|
}};
|
||||||
|
|
||||||
//endregion
|
//endregion
|
||||||
|
|||||||
@@ -1467,7 +1467,7 @@ public class Fx{
|
|||||||
}),
|
}),
|
||||||
|
|
||||||
regenParticle = new Effect(100f, e -> {
|
regenParticle = new Effect(100f, e -> {
|
||||||
color(Pal.accent);
|
color(Pal.regen);
|
||||||
|
|
||||||
Fill.square(e.x, e.y, e.fslope() * 1.5f + 0.14f, 45f);
|
Fill.square(e.x, e.y, e.fslope() * 1.5f + 0.14f, 45f);
|
||||||
}),
|
}),
|
||||||
|
|||||||
@@ -16,6 +16,8 @@ public class Pal{
|
|||||||
sapBullet = Color.valueOf("bf92f9"),
|
sapBullet = Color.valueOf("bf92f9"),
|
||||||
sapBulletBack = Color.valueOf("6d56bf"),
|
sapBulletBack = Color.valueOf("6d56bf"),
|
||||||
|
|
||||||
|
regen = Color.valueOf("d1efff"),
|
||||||
|
|
||||||
reactorPurple = Color.valueOf("bf92f9"),
|
reactorPurple = Color.valueOf("bf92f9"),
|
||||||
reactorPurple2 = Color.valueOf("8a73c6"),
|
reactorPurple2 = Color.valueOf("8a73c6"),
|
||||||
|
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ public class RegenProjector extends Block{
|
|||||||
|
|
||||||
public DrawBlock drawer = new DrawMulti(new DrawRegion("-bottom"), new DrawSideRegion(true));
|
public DrawBlock drawer = new DrawMulti(new DrawRegion("-bottom"), new DrawSideRegion(true));
|
||||||
|
|
||||||
public float effectChance = 0.013f;
|
public float effectChance = 0.003f;
|
||||||
public Color baseColor = Pal.accent;
|
public Color baseColor = Pal.accent;
|
||||||
public Effect effect = Fx.regenParticle;
|
public Effect effect = Fx.regenParticle;
|
||||||
|
|
||||||
@@ -53,7 +53,7 @@ public class RegenProjector extends Block{
|
|||||||
x *= tilesize;
|
x *= tilesize;
|
||||||
y *= tilesize;
|
y *= tilesize;
|
||||||
|
|
||||||
Drawf.dashSquare(Pal.accent, x, y, range * tilesize);
|
Drawf.dashSquare(baseColor, x, y, range * tilesize);
|
||||||
indexer.eachBlock(Vars.player.team(), Tmp.r1.setCentered(x, y, range * tilesize), b -> true, t -> {
|
indexer.eachBlock(Vars.player.team(), Tmp.r1.setCentered(x, y, range * tilesize), b -> true, t -> {
|
||||||
Drawf.selected(t, Tmp.c1.set(baseColor).a(Mathf.absin(4f, 1f)));
|
Drawf.selected(t, Tmp.c1.set(baseColor).a(Mathf.absin(4f, 1f)));
|
||||||
});
|
});
|
||||||
@@ -111,7 +111,7 @@ public class RegenProjector extends Block{
|
|||||||
|
|
||||||
if(consValid()){
|
if(consValid()){
|
||||||
//use Math.max to prevent stacking
|
//use Math.max to prevent stacking
|
||||||
for(Building build : targets){
|
for(var build : targets){
|
||||||
if(!build.damaged() || build.isHealSuppressed()) continue;
|
if(!build.damaged() || build.isHealSuppressed()) continue;
|
||||||
|
|
||||||
didRegen = true;
|
didRegen = true;
|
||||||
@@ -121,7 +121,7 @@ public class RegenProjector extends Block{
|
|||||||
float value = mendMap.get(pos);
|
float value = mendMap.get(pos);
|
||||||
mendMap.put(pos, Math.min(Math.max(value, healPercent * edelta() * build.block.health / 100f), build.block.health - build.health));
|
mendMap.put(pos, Math.min(Math.max(value, healPercent * edelta() * build.block.health / 100f), build.block.health - build.health));
|
||||||
|
|
||||||
if(Mathf.chanceDelta(effectChance)){
|
if(value <= 0 && Mathf.chanceDelta(effectChance * build.block.size * build.block.size)){
|
||||||
effect.at(build.x + Mathf.range(build.block.size * tilesize/2f - 1f), build.y + Mathf.range(build.block.size * tilesize/2f - 1f));
|
effect.at(build.x + Mathf.range(build.block.size * tilesize/2f - 1f), build.y + Mathf.range(build.block.size * tilesize/2f - 1f));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user