Made all color names lowercase for consistent style

This commit is contained in:
Anuken
2019-09-09 16:22:29 -04:00
parent b867cdb8b9
commit 5a3fbf33df
73 changed files with 296 additions and 298 deletions
@@ -49,7 +49,7 @@ public class Effects{
}
public static void effect(Effect effect, float x, float y, float rotation){
provider.createEffect(effect, Color.WHITE, x, y, rotation, null);
provider.createEffect(effect, Color.white, x, y, rotation, null);
}
public static void effect(Effect effect, float x, float y){
@@ -61,7 +61,7 @@ public class Effects{
}
public static void effect(Effect effect, Position loc){
provider.createEffect(effect, Color.WHITE, loc.getX(), loc.getY(), 0f, null);
provider.createEffect(effect, Color.white, loc.getX(), loc.getY(), 0f, null);
}
public static void effect(Effect effect, Color color, float x, float y, float rotation){
@@ -73,7 +73,7 @@ public class Effects{
}
public static void effect(Effect effect, float x, float y, float rotation, Object data){
provider.createEffect(effect, Color.WHITE, x, y, rotation, data);
provider.createEffect(effect, Color.white, x, y, rotation, data);
}
/** Default value is 1000. Higher numbers mean more powerful shake (less falloff). */
@@ -50,7 +50,7 @@ public class LiquidBulletType extends BulletType{
@Override
public void draw(Bullet b){
Draw.color(liquid.color, Color.WHITE, b.fout() / 100f);
Draw.color(liquid.color, Color.white, b.fout() / 100f);
Fill.circle(b.x, b.y, 0.5f + b.fout() * 2.5f);
}
@@ -93,7 +93,7 @@ public class MassDriverBolt extends BulletType{
int amountDropped = Mathf.random(0, data.items[i]);
if(amountDropped > 0){
float angle = b.rot() + Mathf.range(100f);
Effects.effect(Fx.dropItem, Color.WHITE, b.x, b.y, angle, content.item(i));
Effects.effect(Fx.dropItem, Color.white, b.x, b.y, angle, content.item(i));
}
}
}
@@ -110,7 +110,7 @@ public class Lightning extends TimedEntity implements DrawTrait, TimeTrait{
@Override
public void draw(){
Lines.stroke(3f * fout());
Draw.color(color, Color.WHITE, fin());
Draw.color(color, Color.white, fin());
Lines.beginLine();
Lines.linePoint(x, y);
@@ -13,7 +13,7 @@ import static io.anuke.mindustry.Vars.effectGroup;
public class EffectEntity extends TimedEntity implements Poolable, DrawTrait{
public Effect effect;
public Color color = new Color(Color.WHITE);
public Color color = new Color(Color.white);
public Object data;
public float rotation = 0f;
@@ -63,7 +63,7 @@ public class EffectEntity extends TimedEntity implements Poolable, DrawTrait{
@Override
public void reset(){
effect = null;
color.set(Color.WHITE);
color.set(Color.white);
rotation = time = poffsetx = poffsety = 0f;
parent = null;
data = null;
@@ -88,7 +88,7 @@ public interface MinerTrait extends Entity{
float ex = tile.worldx() + Mathf.sin(Time.time() + 48, swingScl, swingMag);
float ey = tile.worldy() + Mathf.sin(Time.time() + 48, swingScl + 2f, swingMag);
Draw.color(Color.LIGHT_GRAY, Color.WHITE, 1f - flashScl + Mathf.absin(Time.time(), 0.5f, flashScl));
Draw.color(Color.lightGray, Color.white, 1f - flashScl + Mathf.absin(Time.time(), 0.5f, flashScl));
Drawf.laser(Core.atlas.find("minelaser"), Core.atlas.find("minelaser-end"), px, py, ex, ey, 0.75f);
@@ -9,7 +9,6 @@ import io.anuke.mindustry.entities.*;
import io.anuke.mindustry.entities.bullet.*;
import io.anuke.mindustry.entities.units.*;
import io.anuke.mindustry.graphics.*;
import io.anuke.mindustry.net.*;
import io.anuke.mindustry.world.*;
import io.anuke.mindustry.world.meta.*;
@@ -136,7 +135,7 @@ public abstract class FlyingUnit extends BaseUnit{
@Override
public void draw(){
Draw.mixcol(Color.WHITE, hitTime / hitDuration);
Draw.mixcol(Color.white, hitTime / hitDuration);
Draw.rect(type.region, x, y, rotation - 90);
drawWeapons();
@@ -153,7 +152,7 @@ public abstract class FlyingUnit extends BaseUnit{
Fill.circle(x + Angles.trnsx(rotation + 180, type.engineOffset), y + Angles.trnsy(rotation + 180, type.engineOffset),
type.engineSize + Mathf.absin(Time.time(), 2f, type.engineSize / 4f));
Draw.color(Color.WHITE);
Draw.color(Color.white);
Fill.circle(x + Angles.trnsx(rotation + 180, type.engineOffset - 1f), y + Angles.trnsy(rotation + 180, type.engineOffset - 1f),
(type.engineSize + Mathf.absin(Time.time(), 2f, type.engineSize / 4f)) / 2f);
Draw.color();
@@ -125,14 +125,14 @@ public abstract class GroundUnit extends BaseUnit{
@Override
public void draw(){
Draw.mixcol(Color.WHITE, hitTime / hitDuration);
Draw.mixcol(Color.white, hitTime / hitDuration);
float ft = Mathf.sin(walkTime * type.speed * 5f, 6f, 2f + type.hitsize / 15f);
Floor floor = getFloorOn();
if(floor.isLiquid){
Draw.color(Color.WHITE, floor.color, 0.5f);
Draw.color(Color.white, floor.color, 0.5f);
}
for(int i : Mathf.signs){
@@ -143,9 +143,9 @@ public abstract class GroundUnit extends BaseUnit{
}
if(floor.isLiquid){
Draw.color(Color.WHITE, floor.color, drownTime * 0.4f);
Draw.color(Color.white, floor.color, drownTime * 0.4f);
}else{
Draw.color(Color.WHITE);
Draw.color(Color.white);
}
Draw.rect(type.baseRegion, x, y, baseRotation - 90);
@@ -295,11 +295,11 @@ public class Player extends Unit implements BuilderMinerTrait, ShooterTrait{
Floor floor = getFloorOn();
Draw.color();
Draw.mixcol(Color.WHITE, hitTime / hitDuration);
Draw.mixcol(Color.white, hitTime / hitDuration);
if(!mech.flying){
if(floor.isLiquid){
Draw.color(Color.WHITE, floor.color, 0.5f);
Draw.color(Color.white, floor.color, 0.5f);
}
float boostTrnsY = -boostHeat * 3f;
@@ -319,9 +319,9 @@ public class Player extends Unit implements BuilderMinerTrait, ShooterTrait{
}
if(floor.isLiquid){
Draw.color(Color.WHITE, floor.color, drownTime);
Draw.color(Color.white, floor.color, drownTime);
}else{
Draw.color(Color.WHITE);
Draw.color(Color.white);
}
Draw.rect(mech.region, x, y, rotation - 90);
@@ -344,7 +344,7 @@ public class Player extends Unit implements BuilderMinerTrait, ShooterTrait{
@Override
public void drawStats(){
Draw.color(Color.BLACK, team.color, healthf() + Mathf.absin(Time.time(), healthf() * 5f, 1f - healthf()));
Draw.color(Color.black, team.color, healthf() + Mathf.absin(Time.time(), healthf() * 5f, 1f - healthf()));
Draw.rect(getPowerCellRegion(), x + Angles.trnsx(rotation, mech.cellTrnsY, 0f), y + Angles.trnsy(rotation, mech.cellTrnsY, 0f), rotation - 90);
Draw.reset();
drawBackItems(itemtime, isLocal);
@@ -366,7 +366,7 @@ public class Player extends Unit implements BuilderMinerTrait, ShooterTrait{
Fill.circle(x + Angles.trnsx(rotation + 180, mech.engineOffset), y + Angles.trnsy(rotation + 180, mech.engineOffset),
size + Mathf.absin(Time.time(), 2f, size / 4f));
Draw.color(Color.WHITE);
Draw.color(Color.white);
Fill.circle(x + Angles.trnsx(rotation + 180, mech.engineOffset - 1f), y + Angles.trnsy(rotation + 180, mech.engineOffset - 1f),
(size + Mathf.absin(Time.time(), 2f, size / 4f)) / 2f);
Draw.color();
@@ -380,7 +380,7 @@ public class Player extends Unit implements BuilderMinerTrait, ShooterTrait{
boolean ints = font.usesIntegerPositions();
font.setUseIntegerPositions(false);
font.getData().setScale(0.25f / UnitScl.dp.scl(1f));
font.getData().setScale(0.25f / Scl.scl(1f));
layout.setText(font, name);
Draw.color(0f, 0f, 0f, 0.3f);
Fill.rect(x, y + nameHeight - layout.height / 2, layout.width + 2, layout.height + 3);
@@ -403,7 +403,7 @@ public class Player extends Unit implements BuilderMinerTrait, ShooterTrait{
float visualFadeTime = 1f - Mathf.curve(1f - textFadeTime, 0.9f);
font.setColor(1f, 1f, 1f, textFadeTime <= 0 || lastText == null ? 1f : visualFadeTime);
layout.setText(font, text, Color.WHITE, width, Align.bottom, true);
layout.setText(font, text, Color.white, width, Align.bottom, true);
Draw.color(0f, 0f, 0f, 0.3f * (textFadeTime <= 0 || lastText == null ? 1f : visualFadeTime));
Fill.rect(x, y + textHeight + layout.height - layout.height/2f, layout.width + 2, layout.height + 3);
@@ -413,7 +413,7 @@ public class Player extends Unit implements BuilderMinerTrait, ShooterTrait{
Draw.reset();
Pools.free(layout);
font.getData().setScale(1f);
font.setColor(Color.WHITE);
font.setColor(Color.white);
font.setUseIntegerPositions(ints);
}
@@ -372,7 +372,7 @@ public abstract class Unit extends DestructibleEntity implements SaveTrait, Targ
}
public void drawStats(){
Draw.color(Color.BLACK, team.color, healthf() + Mathf.absin(Time.time(), Math.max(healthf() * 5f, 1f), 1f - healthf()));
Draw.color(Color.black, team.color, healthf() + Mathf.absin(Time.time(), Math.max(healthf() * 5f, 1f), 1f - healthf()));
Draw.rect(getPowerCellRegion(), x, y, rotation - 90);
Draw.color();
@@ -403,7 +403,7 @@ public abstract class Unit extends DestructibleEntity implements SaveTrait, Targ
Fonts.outline.draw(item.amount + "",
x + Angles.trnsx(rotation + 180f, backTrns),
y + Angles.trnsy(rotation + 180f, backTrns) - 3,
Pal.accent, 0.25f * itemtime / UnitScl.dp.scl(1f), false, Align.center
Pal.accent, 0.25f * itemtime / Scl.scl(1f), false, Align.center
);
}
}
@@ -60,7 +60,7 @@ public class Statuses implements Saveable{
public Color getStatusColor(){
if(statuses.size == 0){
return Tmp.c1.set(Color.WHITE);
return Tmp.c1.set(Color.white);
}
float r = 0f, g = 0f, b = 0f;