mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-14 17:57:56 +07:00
Fixed lighting not rendering / Fixed engine colors
This commit is contained in:
@ -386,7 +386,7 @@ public class Blocks implements ContentList{
|
|||||||
craftEffect = Fx.smeltsmoke;
|
craftEffect = Fx.smeltsmoke;
|
||||||
output = Items.surgealloy;
|
output = Items.surgealloy;
|
||||||
craftTime = 75f;
|
craftTime = 75f;
|
||||||
size = 2;
|
size = 3;
|
||||||
|
|
||||||
consumes.power(4f);
|
consumes.power(4f);
|
||||||
consumes.items(new ItemStack(Items.titanium, 2), new ItemStack(Items.lead, 4), new ItemStack(Items.silicon, 3), new ItemStack(Items.copper, 3));
|
consumes.items(new ItemStack(Items.titanium, 2), new ItemStack(Items.lead, 4), new ItemStack(Items.silicon, 3), new ItemStack(Items.copper, 3));
|
||||||
|
@ -35,7 +35,7 @@ public class Mechs implements ContentList{
|
|||||||
mass = 1.2f;
|
mass = 1.2f;
|
||||||
speed = 0.5f;
|
speed = 0.5f;
|
||||||
boostSpeed = 0.85f;
|
boostSpeed = 0.85f;
|
||||||
trailColorTo = Color.valueOf("ffd37f");
|
engineColor = Color.valueOf("ffd37f");
|
||||||
health = 250f;
|
health = 250f;
|
||||||
|
|
||||||
weapon = new Weapon("blaster"){{
|
weapon = new Weapon("blaster"){{
|
||||||
@ -65,7 +65,7 @@ public class Mechs implements ContentList{
|
|||||||
health = 220f;
|
health = 220f;
|
||||||
weaponOffsetX = -1;
|
weaponOffsetX = -1;
|
||||||
weaponOffsetY = -1;
|
weaponOffsetY = -1;
|
||||||
trailColorTo = Color.valueOf("d3ddff");
|
engineColor = Color.valueOf("d3ddff");
|
||||||
|
|
||||||
weapon = new Weapon("shockgun"){{
|
weapon = new Weapon("shockgun"){{
|
||||||
length = 1f;
|
length = 1f;
|
||||||
@ -110,7 +110,7 @@ public class Mechs implements ContentList{
|
|||||||
boostSpeed = 0.8f;
|
boostSpeed = 0.8f;
|
||||||
canHeal = true;
|
canHeal = true;
|
||||||
health = 200f;
|
health = 200f;
|
||||||
trailColorTo = Palette.heal;
|
engineColor = Palette.heal;
|
||||||
|
|
||||||
weapon = new Weapon("heal-blaster"){{
|
weapon = new Weapon("heal-blaster"){{
|
||||||
length = 1.5f;
|
length = 1.5f;
|
||||||
@ -159,7 +159,7 @@ public class Mechs implements ContentList{
|
|||||||
shake = 4f;
|
shake = 4f;
|
||||||
weaponOffsetX = 1;
|
weaponOffsetX = 1;
|
||||||
weaponOffsetY = 0;
|
weaponOffsetY = 0;
|
||||||
trailColorTo = Color.valueOf("feb380");
|
engineColor = Color.valueOf("feb380");
|
||||||
health = 300f;
|
health = 300f;
|
||||||
weapon = new Weapon("swarmer"){{
|
weapon = new Weapon("swarmer"){{
|
||||||
length = 1.5f;
|
length = 1.5f;
|
||||||
@ -228,7 +228,7 @@ public class Mechs implements ContentList{
|
|||||||
health = 180f;
|
health = 180f;
|
||||||
weaponOffsetX = -1;
|
weaponOffsetX = -1;
|
||||||
weaponOffsetY = -1;
|
weaponOffsetY = -1;
|
||||||
trailColor = Palette.lightTrail;
|
engineColor = Palette.lightTrail;
|
||||||
cellTrnsY = 1f;
|
cellTrnsY = 1f;
|
||||||
weapon = new Weapon("blaster"){{
|
weapon = new Weapon("blaster"){{
|
||||||
length = 1.5f;
|
length = 1.5f;
|
||||||
@ -255,7 +255,7 @@ public class Mechs implements ContentList{
|
|||||||
drag = 0.01f;
|
drag = 0.01f;
|
||||||
mass = 2f;
|
mass = 2f;
|
||||||
health = 170f;
|
health = 170f;
|
||||||
trailColor = Color.valueOf("d3ddff");
|
engineColor = Color.valueOf("d3ddff");
|
||||||
cellTrnsY = 1f;
|
cellTrnsY = 1f;
|
||||||
weapon = new Weapon("missiles"){{
|
weapon = new Weapon("missiles"){{
|
||||||
length = 1.5f;
|
length = 1.5f;
|
||||||
@ -321,7 +321,7 @@ public class Mechs implements ContentList{
|
|||||||
turnCursor = false;
|
turnCursor = false;
|
||||||
health = 220f;
|
health = 220f;
|
||||||
itemCapacity = 30;
|
itemCapacity = 30;
|
||||||
trailColor = Color.valueOf("84f491");
|
engineColor = Color.valueOf("84f491");
|
||||||
cellTrnsY = 1f;
|
cellTrnsY = 1f;
|
||||||
weapon = new Weapon("bomber"){{
|
weapon = new Weapon("bomber"){{
|
||||||
length = 0f;
|
length = 0f;
|
||||||
@ -352,7 +352,7 @@ public class Mechs implements ContentList{
|
|||||||
mass = 3f;
|
mass = 3f;
|
||||||
health = 240f;
|
health = 240f;
|
||||||
itemCapacity = 60;
|
itemCapacity = 60;
|
||||||
trailColor = Color.valueOf("feb380");
|
engineColor = Color.valueOf("feb380");
|
||||||
cellTrnsY = 1f;
|
cellTrnsY = 1f;
|
||||||
|
|
||||||
weapon = new Weapon("bomber"){{
|
weapon = new Weapon("bomber"){{
|
||||||
|
@ -4,6 +4,8 @@ import io.anuke.annotations.Annotations.Loc;
|
|||||||
import io.anuke.annotations.Annotations.Remote;
|
import io.anuke.annotations.Annotations.Remote;
|
||||||
import io.anuke.arc.collection.Array;
|
import io.anuke.arc.collection.Array;
|
||||||
import io.anuke.arc.collection.IntSet;
|
import io.anuke.arc.collection.IntSet;
|
||||||
|
import io.anuke.arc.graphics.g2d.Fill;
|
||||||
|
import io.anuke.arc.graphics.g2d.Lines;
|
||||||
import io.anuke.mindustry.entities.EntityGroup;
|
import io.anuke.mindustry.entities.EntityGroup;
|
||||||
import io.anuke.mindustry.entities.impl.TimedEntity;
|
import io.anuke.mindustry.entities.impl.TimedEntity;
|
||||||
import io.anuke.mindustry.entities.traits.DrawTrait;
|
import io.anuke.mindustry.entities.traits.DrawTrait;
|
||||||
@ -129,31 +131,22 @@ public class Lightning extends TimedEntity implements DrawTrait, SyncTrait, Time
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void draw(){
|
public void draw(){
|
||||||
float lx = x, ly = y;
|
Lines.stroke(2f * fout());
|
||||||
Draw.color(color, Color.WHITE, fin());
|
Draw.color(color, Color.WHITE, fin());
|
||||||
//TODO this is really, really bad rendering
|
Lines.beginLine();
|
||||||
/*
|
|
||||||
for(int i = 0; i < lines.size; i++){
|
|
||||||
Position v = lines.get(i);
|
|
||||||
|
|
||||||
float f = (float) i / lines.size;
|
Lines.linePoint(x, y);
|
||||||
|
for(Position p : lines){
|
||||||
|
Lines.linePoint(p.getX(), p.getY());
|
||||||
|
}
|
||||||
|
Lines.endLine();
|
||||||
|
|
||||||
Lines.stroke(fout() * 3f * (1.5f - f));
|
int i = 0;
|
||||||
|
|
||||||
Lines.stroke(Lines.getStroke() * 4f);
|
for(Position p : lines){
|
||||||
Draw.alpha(0.3f);
|
Fill.square(p.getX(), p.getY(), (4f - (float)i++/lines.size*2f) * fout(), 45);
|
||||||
Lines.line(lx, ly, v.getX(), v.getY());
|
}
|
||||||
|
Draw.reset();
|
||||||
Lines.stroke(Lines.getStroke()/4f);
|
|
||||||
Draw.alpha(1f);
|
|
||||||
Lines.line(lx, ly, v.getX(), v.getY());
|
|
||||||
|
|
||||||
Lines.stroke(3f * fout() * (1f - f));
|
|
||||||
|
|
||||||
lx = v.getX();
|
|
||||||
ly = v.getY();
|
|
||||||
}*/
|
|
||||||
Draw.color();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -371,7 +371,7 @@ public class Player extends Unit implements BuilderTrait, ShooterTrait{
|
|||||||
public void drawUnder(){
|
public void drawUnder(){
|
||||||
float size = mech.engineSize * (mech.flying ? 1f : boostHeat);
|
float size = mech.engineSize * (mech.flying ? 1f : boostHeat);
|
||||||
|
|
||||||
Draw.color(mech.trailColorTo);
|
Draw.color(mech.engineColor);
|
||||||
Fill.circle(x + Angles.trnsx(rotation + 180, mech.engineOffset), y + Angles.trnsy(rotation + 180, mech.engineOffset),
|
Fill.circle(x + Angles.trnsx(rotation + 180, mech.engineOffset), y + Angles.trnsy(rotation + 180, mech.engineOffset),
|
||||||
size + Mathf.absin(Time.time(), 2f, size/4f));
|
size + Mathf.absin(Time.time(), 2f, size/4f));
|
||||||
|
|
||||||
|
@ -27,8 +27,7 @@ public class Mech extends UnlockableContent{
|
|||||||
public float mineSpeed = 1f;
|
public float mineSpeed = 1f;
|
||||||
public int drillPower = -1;
|
public int drillPower = -1;
|
||||||
public float buildPower = 1f;
|
public float buildPower = 1f;
|
||||||
public Color trailColor = Palette.boostFrom;
|
public Color engineColor = Palette.boostTo;
|
||||||
public Color trailColorTo = Palette.boostTo;
|
|
||||||
public int itemCapacity = 30;
|
public int itemCapacity = 30;
|
||||||
public boolean turnCursor = true;
|
public boolean turnCursor = true;
|
||||||
public boolean canHeal = false;
|
public boolean canHeal = false;
|
||||||
|
Reference in New Issue
Block a user