Fixed #2654 / Fixed #2651 / fine I'll add a base

This commit is contained in:
Anuken
2020-09-22 10:03:05 -04:00
parent 87032c82b1
commit a6c10a97f2
13 changed files with 1797 additions and 1779 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 828 B

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 942 KiB

After

Width:  |  Height:  |  Size: 952 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 506 KiB

After

Width:  |  Height:  |  Size: 504 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 185 KiB

After

Width:  |  Height:  |  Size: 184 KiB

File diff suppressed because it is too large Load Diff

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 MiB

After

Width:  |  Height:  |  Size: 2.8 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 186 KiB

After

Width:  |  Height:  |  Size: 186 KiB

View File

@@ -382,9 +382,10 @@ public class UnitTypes implements ContentList{
mechStepShake = 0.15f; mechStepShake = 0.15f;
speed = 0.35f; speed = 0.35f;
boostMultiplier = 1.5f; boostMultiplier = 2.1f;
engineOffset = 12f; engineOffset = 12f;
engineSize = 6f; engineSize = 6f;
lowAltitude = true;
health = 6000f; health = 6000f;
armor = 7f; armor = 7f;
@@ -444,7 +445,7 @@ public class UnitTypes implements ContentList{
legCount = 4; legCount = 4;
legLength = 14f; legLength = 14f;
legBaseOffset = 10f; legBaseOffset = 11f;
legMoveSpace = 1.5f; legMoveSpace = 1.5f;
legTrns = 0.58f; legTrns = 0.58f;
hovering = true; hovering = true;

View File

@@ -277,7 +277,7 @@ public abstract class BulletType extends Content{
bullet.damage = damage < 0 ? this.damage : damage; bullet.damage = damage < 0 ? this.damage : damage;
bullet.add(); bullet.add();
if(keepVelocity && owner instanceof Hitboxc) bullet.vel.add(((Hitboxc)owner).deltaX() / Time.delta, ((Hitboxc)owner).deltaY() / Time.delta); if(keepVelocity && owner instanceof Hitboxc) bullet.vel.add(((Velc)owner).vel().x, ((Velc)owner).vel().y);
return bullet; return bullet;
} }

View File

@@ -66,12 +66,14 @@ public class LaserBulletType extends BulletType{
int f = idx++; int f = idx++;
for(int s : Mathf.signs){ for(int s : Mathf.signs){
Time.run(f * lightningDelay, () -> Time.run(f * lightningDelay, () -> {
Lightning.create(b, lightningColor, if(b.isAdded() && b.type == this){
lightningDamage < 0 ? damage : lightningDamage, Lightning.create(b, lightningColor,
cx, cy, rot + 90*s + Mathf.range(lightningAngleRand), lightningDamage < 0 ? damage : lightningDamage,
lightningLength + Mathf.random(lightningLengthRand)) cx, cy, rot + 90*s + Mathf.range(lightningAngleRand),
); lightningLength + Mathf.random(lightningLengthRand));
}
});
} }
} }
} }

View File

@@ -615,11 +615,6 @@ public class UnitType extends UnlockableContent{
Drawf.shadow(leg.base.x, leg.base.y, ssize); Drawf.shadow(leg.base.x, leg.base.y, ssize);
} }
//TODO should be below/above legs
if(baseRegion.found()){
Draw.rect(baseRegion, unit.x, unit.y, rotation);
}
//legs are drawn front first //legs are drawn front first
for(int j = legs.length - 1; j >= 0; j--){ for(int j = legs.length - 1; j >= 0; j--){
int i = (j % 2 == 0 ? j/2 : legs.length - 1 - j/2); int i = (j % 2 == 0 ? j/2 : legs.length - 1 - j/2);
@@ -657,6 +652,11 @@ public class UnitType extends UnlockableContent{
} }
} }
//TODO should be below/above legs
if(baseRegion.found()){
Draw.rect(baseRegion, unit.x, unit.y, rotation - 90);
}
Draw.reset(); Draw.reset();
} }

View File

@@ -227,6 +227,7 @@ public class ChatFragment extends Table{
} }
public void addMessage(String message, String sender){ public void addMessage(String message, String sender){
if(sender == null && message == null) return;
messages.insert(0, new ChatMessage(message, sender)); messages.insert(0, new ChatMessage(message, sender));
fadetime += 1f; fadetime += 1f;
@@ -244,7 +245,7 @@ public class ChatFragment extends Table{
this.message = message; this.message = message;
this.sender = sender; this.sender = sender;
if(sender == null){ //no sender, this is a server message? if(sender == null){ //no sender, this is a server message?
formattedMessage = message; formattedMessage = message == null ? "" : message;
}else{ }else{
formattedMessage = "[coral][[" + sender + "[coral]]:[white] " + message; formattedMessage = "[coral][[" + sender + "[coral]]:[white] " + message;
} }