I have spent far too much time redrawing this stupid sprite
|
After Width: | Height: | Size: 462 B |
|
After Width: | Height: | Size: 5.3 KiB |
|
After Width: | Height: | Size: 351 B |
|
After Width: | Height: | Size: 258 B |
|
After Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 2.5 KiB |
|
After Width: | Height: | Size: 1.0 KiB |
|
After Width: | Height: | Size: 329 B |
@@ -449,3 +449,6 @@
|
|||||||
63257=emanate|unit-emanate-ui
|
63257=emanate|unit-emanate-ui
|
||||||
63256=overflow-duct|block-overflow-duct-ui
|
63256=overflow-duct|block-overflow-duct-ui
|
||||||
63255=large-plasma-bore|block-large-plasma-bore-ui
|
63255=large-plasma-bore|block-large-plasma-bore-ui
|
||||||
|
63254=fracture|block-fracture-ui
|
||||||
|
63253=cyanogen-synthesizer|block-cyanogen-synthesizer-ui
|
||||||
|
63252=cyanogen|liquid-cyanogen-ui
|
||||||
|
|||||||
@@ -60,7 +60,7 @@ public class Blocks implements ContentList{
|
|||||||
//crafting
|
//crafting
|
||||||
siliconSmelter, siliconCrucible, siliconArcFurnace, kiln, graphitePress, plastaniumCompressor, multiPress, phaseWeaver, surgeSmelter, pyratiteMixer, blastMixer, cryofluidMixer,
|
siliconSmelter, siliconCrucible, siliconArcFurnace, kiln, graphitePress, plastaniumCompressor, multiPress, phaseWeaver, surgeSmelter, pyratiteMixer, blastMixer, cryofluidMixer,
|
||||||
melter, separator, disassembler, sporePress, pulverizer, incinerator, coalCentrifuge,
|
melter, separator, disassembler, sporePress, pulverizer, incinerator, coalCentrifuge,
|
||||||
electrolyzer, oxidationChamber, heatReactor, carbideCrucible, slagCentrifuge, surgeCrucible,
|
electrolyzer, oxidationChamber, heatReactor, carbideCrucible, slagCentrifuge, surgeCrucible, cyanogenSynthesizer,
|
||||||
cellSynthesisChamber,
|
cellSynthesisChamber,
|
||||||
|
|
||||||
//sandbox
|
//sandbox
|
||||||
@@ -460,14 +460,17 @@ public class Blocks implements ContentList{
|
|||||||
|
|
||||||
regolithWall = new StaticWall("regolith-wall"){{
|
regolithWall = new StaticWall("regolith-wall"){{
|
||||||
regolith.asFloor().wall = this;
|
regolith.asFloor().wall = this;
|
||||||
|
attributes.set(Attribute.silicate, 1f);
|
||||||
}};
|
}};
|
||||||
|
|
||||||
yellowStoneWall = new StaticWall("yellow-stone-wall"){{
|
yellowStoneWall = new StaticWall("yellow-stone-wall"){{
|
||||||
yellowStone.asFloor().wall = slag.asFloor().wall = this;
|
yellowStone.asFloor().wall = slag.asFloor().wall = this;
|
||||||
|
attributes.set(Attribute.silicate, 1.5f);
|
||||||
}};
|
}};
|
||||||
|
|
||||||
rhyoliteWall = new StaticWall("rhyolite-wall"){{
|
rhyoliteWall = new StaticWall("rhyolite-wall"){{
|
||||||
rhyolite.asFloor().wall = rhyoliteCrater.asFloor().wall = this;
|
rhyolite.asFloor().wall = rhyoliteCrater.asFloor().wall = this;
|
||||||
|
attributes.set(Attribute.silicate, 1f);
|
||||||
}};
|
}};
|
||||||
|
|
||||||
carbonWall = new StaticWall("carbon-wall"){{
|
carbonWall = new StaticWall("carbon-wall"){{
|
||||||
@@ -1082,6 +1085,34 @@ public class Blocks implements ContentList{
|
|||||||
consumes.power(2f); //TODO necessary?
|
consumes.power(2f); //TODO necessary?
|
||||||
}};
|
}};
|
||||||
|
|
||||||
|
cyanogenSynthesizer = new HeatCrafter("cyanogen-synthesizer"){{
|
||||||
|
//TODO requirements
|
||||||
|
requirements(Category.crafting, with(Items.tungsten, 60, Items.graphite, 60, Items.carbide, 30));
|
||||||
|
|
||||||
|
heatRequirement = 5f;
|
||||||
|
|
||||||
|
drawer = new DrawMulti(new DrawRegion("-bottom"), new DrawLiquidRegion(Liquids.hydrogen), new DrawBlock(), new DrawRegion("-top"), new DrawHeatInput(),
|
||||||
|
new DrawParticlesIn(){{
|
||||||
|
color = Color.valueOf("bfe9ff");
|
||||||
|
alpha = 0.6f;
|
||||||
|
particleSize = 4f;
|
||||||
|
particles = 10;
|
||||||
|
particleRad = 12f;
|
||||||
|
particleLife = 140f;
|
||||||
|
}});
|
||||||
|
|
||||||
|
size = 3;
|
||||||
|
|
||||||
|
outputLiquid = new LiquidStack(Liquids.cyanogen, 3f);
|
||||||
|
craftTime = 60f * 1f;
|
||||||
|
|
||||||
|
consumes.liquid(Liquids.hydrogen, 3f / 60f);
|
||||||
|
consumes.item(Items.graphite);
|
||||||
|
|
||||||
|
consumes.power(2f);
|
||||||
|
liquidCapacity = 40f;
|
||||||
|
}};
|
||||||
|
|
||||||
//TODO needs to be completely redone from the ground up
|
//TODO needs to be completely redone from the ground up
|
||||||
cellSynthesisChamber = new LiquidConverter("cell-synthesis-chamber"){{
|
cellSynthesisChamber = new LiquidConverter("cell-synthesis-chamber"){{
|
||||||
//TODO booster mechanics?
|
//TODO booster mechanics?
|
||||||
@@ -2512,6 +2543,7 @@ public class Blocks implements ContentList{
|
|||||||
|
|
||||||
//TODO no coolant?
|
//TODO no coolant?
|
||||||
|
|
||||||
|
acceptCoolant = false;
|
||||||
draw = new DrawTurret("reinforced-");
|
draw = new DrawTurret("reinforced-");
|
||||||
shootLength = 0f;
|
shootLength = 0f;
|
||||||
outlineColor = Pal.darkOutline;
|
outlineColor = Pal.darkOutline;
|
||||||
@@ -2527,41 +2559,43 @@ public class Blocks implements ContentList{
|
|||||||
limitRange();
|
limitRange();
|
||||||
}};
|
}};
|
||||||
|
|
||||||
//TODO implementation; splash damage? shotgun?
|
//TODO implementation; splash damage? shotgun? AA? I have no ideas
|
||||||
if(false)
|
|
||||||
fracture = new ItemTurret("fracture"){{
|
fracture = new ItemTurret("fracture"){{
|
||||||
requirements(Category.turret, with(Items.tungsten, 35, Items.silicon, 35), true);
|
requirements(Category.turret, with(Items.tungsten, 35, Items.silicon, 35), true);
|
||||||
ammo(
|
ammo(
|
||||||
Items.tungsten, new BasicBulletType(7f, 25){{
|
Items.tungsten, new BasicBulletType(5f, 20){{
|
||||||
width = 8f;
|
velocityInaccuracy = 0.2f;
|
||||||
height = 14f;
|
width = 6f;
|
||||||
|
height = 12f;
|
||||||
shootEffect = Fx.berylSpark;
|
shootEffect = Fx.berylSpark;
|
||||||
smokeEffect = Fx.shootBigSmoke;
|
smokeEffect = Fx.shootBigSmoke;
|
||||||
ammoMultiplier = 2;
|
ammoMultiplier = 2;
|
||||||
pierce = true;
|
pierce = true;
|
||||||
pierceBuilding = true;
|
pierceBuilding = true;
|
||||||
hitColor = backColor = trailColor = Pal.berylShot;
|
hitColor = backColor = trailColor = Items.tungsten.color;
|
||||||
frontColor = Color.white;
|
frontColor = Color.white;
|
||||||
trailWidth = 1.5f;
|
trailWidth = 1f;
|
||||||
trailLength = 10;
|
trailLength = 4;
|
||||||
//TODO different effect?
|
//TODO different effect?
|
||||||
hitEffect = despawnEffect = Fx.hitBulletColor;
|
hitEffect = despawnEffect = Fx.hitBulletColor;
|
||||||
}}
|
}}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
acceptCoolant = false;
|
||||||
consumes.liquid(Liquids.hydrogen, 1.5f / 60f);
|
consumes.liquid(Liquids.hydrogen, 1.5f / 60f);
|
||||||
shots = 3;
|
shots = 5;
|
||||||
|
|
||||||
//TODO cool reload animation
|
//TODO cool reload animation
|
||||||
draw = new DrawTurret("reinforced-");
|
draw = new DrawTurret("reinforced-");
|
||||||
shootLength = 0f;
|
shootLength = 8f;
|
||||||
outlineColor = Pal.darkOutline;
|
outlineColor = Pal.darkOutline;
|
||||||
size = 2;
|
size = 2;
|
||||||
envEnabled |= Env.space;
|
envEnabled |= Env.space;
|
||||||
reloadTime = 40f;
|
reloadTime = 30f;
|
||||||
restitution = 0.03f;
|
restitution = 0.03f;
|
||||||
range = 180;
|
range = 90;
|
||||||
shootCone = 3f;
|
shootCone = 15f;
|
||||||
|
inaccuracy = 20f;
|
||||||
health = 300 * size * size;
|
health = 300 * size * size;
|
||||||
rotateSpeed = 1.8f;
|
rotateSpeed = 1.8f;
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import mindustry.type.*;
|
|||||||
|
|
||||||
public class Liquids implements ContentList{
|
public class Liquids implements ContentList{
|
||||||
public static Liquid water, slag, oil, cryofluid, neoplasm,
|
public static Liquid water, slag, oil, cryofluid, neoplasm,
|
||||||
ozone, hydrogen;
|
ozone, hydrogen, cyanogen;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void load(){
|
public void load(){
|
||||||
@@ -72,7 +72,13 @@ public class Liquids implements ContentList{
|
|||||||
flammability = 1f;
|
flammability = 1f;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
//TODO dicyanoacetylene
|
cyanogen = new Liquid("cyanogen", Color.valueOf("6fd5d5")){{
|
||||||
|
gas = true;
|
||||||
|
barColor = Color.valueOf("6fd5d5");
|
||||||
|
flammability = 2f;
|
||||||
|
}};
|
||||||
|
|
||||||
|
//TODO dicyanoacetylene vs cyanogen
|
||||||
|
|
||||||
//TODO molten lead (maybe)
|
//TODO molten lead (maybe)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,7 +17,6 @@ public class LaserTurret extends PowerTurret{
|
|||||||
|
|
||||||
public LaserTurret(String name){
|
public LaserTurret(String name){
|
||||||
super(name);
|
super(name);
|
||||||
canOverdrive = false;
|
|
||||||
|
|
||||||
consumes.add(new ConsumeCoolant(0.01f)).update(false);
|
consumes.add(new ConsumeCoolant(0.01f)).update(false);
|
||||||
coolantMultiplier = 1f;
|
coolantMultiplier = 1f;
|
||||||
@@ -25,7 +24,7 @@ public class LaserTurret extends PowerTurret{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void init(){
|
public void init(){
|
||||||
consumes.powerCond(powerUse, entity -> ((LaserTurretBuild)entity).bullet != null || ((LaserTurretBuild)entity).target != null);
|
consumes.powerCond(powerUse, (LaserTurretBuild entity) -> entity.bullet != null || entity.target != null);
|
||||||
super.init();
|
super.init();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -54,7 +53,7 @@ public class LaserTurret extends PowerTurret{
|
|||||||
wasShooting = true;
|
wasShooting = true;
|
||||||
bullet.rotation(rotation);
|
bullet.rotation(rotation);
|
||||||
bullet.set(x + bulletOffset.x, y + bulletOffset.y);
|
bullet.set(x + bulletOffset.x, y + bulletOffset.y);
|
||||||
bullet.time(0f);
|
bullet.time = 0f;
|
||||||
heat = 1f;
|
heat = 1f;
|
||||||
recoil = recoilAmount;
|
recoil = recoilAmount;
|
||||||
bulletLife -= Time.delta / Math.max(efficiency(), 0.00001f);
|
bulletLife -= Time.delta / Math.max(efficiency(), 0.00001f);
|
||||||
@@ -66,7 +65,7 @@ public class LaserTurret extends PowerTurret{
|
|||||||
Liquid liquid = liquids.current();
|
Liquid liquid = liquids.current();
|
||||||
float maxUsed = consumes.<ConsumeLiquidBase>get(ConsumeType.liquid).amount;
|
float maxUsed = consumes.<ConsumeLiquidBase>get(ConsumeType.liquid).amount;
|
||||||
|
|
||||||
float used = (cheating() ? maxUsed : Math.min(liquids.get(liquid), maxUsed)) * Time.delta;
|
float used = (cheating() ? maxUsed : Math.min(liquids.get(liquid), maxUsed)) * delta();
|
||||||
reload -= used * liquid.heatCapacity * coolantMultiplier;
|
reload -= used * liquid.heatCapacity * coolantMultiplier;
|
||||||
liquids.remove(liquid, used);
|
liquids.remove(liquid, used);
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,48 @@
|
|||||||
|
package mindustry.world.draw;
|
||||||
|
|
||||||
|
import arc.graphics.*;
|
||||||
|
import arc.graphics.g2d.*;
|
||||||
|
import arc.math.*;
|
||||||
|
import arc.math.Interp.*;
|
||||||
|
import arc.util.*;
|
||||||
|
import mindustry.gen.*;
|
||||||
|
|
||||||
|
/** Not standalone. */
|
||||||
|
public class DrawParticlesIn extends DrawBlock{
|
||||||
|
public Color color = Color.valueOf("f2d585");
|
||||||
|
|
||||||
|
public float alpha = 0.5f;
|
||||||
|
public int particles = 30;
|
||||||
|
public float particleLife = 70f, particleRad = 7f, particleSize = 3f, fadeMargin = 0.4f, rotateScl = 3f;
|
||||||
|
public Interp particleInterp = new PowIn(1.5f);
|
||||||
|
public Interp particleSizeInterp = Interp.slope;
|
||||||
|
public Blending blending = Blending.normal;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void drawBase(Building build){
|
||||||
|
|
||||||
|
if(build.warmup() > 0f){
|
||||||
|
|
||||||
|
float a = alpha * build.warmup();
|
||||||
|
Draw.blend(blending);
|
||||||
|
Draw.color(color);
|
||||||
|
|
||||||
|
float base = (Time.time / particleLife);
|
||||||
|
rand.setSeed(build.id);
|
||||||
|
for(int i = 0; i < particles; i++){
|
||||||
|
float fin = (rand.random(1f) + base) % 1f, fout = 1f - fin;
|
||||||
|
float angle = rand.random(360f) + (Time.time / rotateScl) % 360f;
|
||||||
|
float len = particleRad * particleInterp.apply(fout);
|
||||||
|
Draw.alpha(a * (1f - Mathf.curve(fin, 1f - fadeMargin)));
|
||||||
|
Fill.circle(
|
||||||
|
build.x + Angles.trnsx(angle, len),
|
||||||
|
build.y + Angles.trnsy(angle, len),
|
||||||
|
particleSize * particleSizeInterp.apply(fin) * build.warmup()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
Draw.blend();
|
||||||
|
Draw.reset();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -459,7 +459,8 @@ public class Generators{
|
|||||||
image.draw(get(type.region), true);
|
image.draw(get(type.region), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
//draw outlines
|
//TODO draw under for layerOffset < 0
|
||||||
|
//draw weapon outlines on base
|
||||||
for(Weapon weapon : type.weapons){
|
for(Weapon weapon : type.weapons){
|
||||||
weapon.load();
|
weapon.load();
|
||||||
|
|
||||||
|
|||||||