Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -68,3 +68,6 @@ If something needs to be encapsulated in the future, IntelliJ can handle it with
|
|||||||
|
|
||||||
#### Do not create methods unless necessary.
|
#### Do not create methods unless necessary.
|
||||||
Unless a block of code is very large or used in more than 1-2 places, don't split it up into a separate method. Making unnecessary methods only creates confusion, and may slightly decrease performance.
|
Unless a block of code is very large or used in more than 1-2 places, don't split it up into a separate method. Making unnecessary methods only creates confusion, and may slightly decrease performance.
|
||||||
|
|
||||||
|
## Other Notes
|
||||||
|
If you would like your name to appear in the game's credits, add it to the [list of contributors](https://github.com/Anuken/Mindustry/blob/master/core/assets/contributors) as part of your PR.
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ public class TractorBeamTurret extends Block{
|
|||||||
public float scaledForce = 0f;
|
public float scaledForce = 0f;
|
||||||
public float damage = 0f;
|
public float damage = 0f;
|
||||||
public boolean targetAir = true, targetGround = false;
|
public boolean targetAir = true, targetGround = false;
|
||||||
|
public Color laserColor = Color.white;
|
||||||
|
|
||||||
public TractorBeamTurret(String name){
|
public TractorBeamTurret(String name){
|
||||||
super(name);
|
super(name);
|
||||||
@@ -113,7 +114,7 @@ public class TractorBeamTurret extends Block{
|
|||||||
float ang = angleTo(lastX, lastY);
|
float ang = angleTo(lastX, lastY);
|
||||||
float len = 5f;
|
float len = 5f;
|
||||||
|
|
||||||
Draw.mixcol(Color.white, Mathf.absin(4f, 0.6f));
|
Draw.mixcol(laserColor, Mathf.absin(4f, 0.6f));
|
||||||
|
|
||||||
Drawf.laser(team, laser, laserEnd,
|
Drawf.laser(team, laser, laserEnd,
|
||||||
x + Angles.trnsx(ang, len), y + Angles.trnsy(ang, len),
|
x + Angles.trnsx(ang, len), y + Angles.trnsy(ang, len),
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
package mindustry.world.blocks.distribution;
|
package mindustry.world.blocks.distribution;
|
||||||
|
|
||||||
|
import arc.audio.*;
|
||||||
import arc.graphics.g2d.*;
|
import arc.graphics.g2d.*;
|
||||||
import arc.math.*;
|
import arc.math.*;
|
||||||
import arc.math.geom.*;
|
import arc.math.geom.*;
|
||||||
@@ -30,6 +31,7 @@ public class MassDriver extends Block{
|
|||||||
public Effect shootEffect = Fx.shootBig2;
|
public Effect shootEffect = Fx.shootBig2;
|
||||||
public Effect smokeEffect = Fx.shootBigSmoke2;
|
public Effect smokeEffect = Fx.shootBigSmoke2;
|
||||||
public Effect receiveEffect = Fx.mineBig;
|
public Effect receiveEffect = Fx.mineBig;
|
||||||
|
public Sound shootSound = Sounds.shootBig;
|
||||||
public float shake = 3f;
|
public float shake = 3f;
|
||||||
public @Load("@-base") TextureRegion baseRegion;
|
public @Load("@-base") TextureRegion baseRegion;
|
||||||
|
|
||||||
@@ -265,6 +267,8 @@ public class MassDriver extends Block{
|
|||||||
y + Angles.trnsy(angle, translation), angle);
|
y + Angles.trnsy(angle, translation), angle);
|
||||||
|
|
||||||
Effect.shake(shake, shake, this);
|
Effect.shake(shake, shake, this);
|
||||||
|
|
||||||
|
shootSound.at(tile, Mathf.random(0.9f, 1.1f));
|
||||||
}
|
}
|
||||||
|
|
||||||
public void handlePayload(Bullet bullet, DriverBulletData data){
|
public void handlePayload(Bullet bullet, DriverBulletData data){
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import arc.util.*;
|
|||||||
import arc.util.io.*;
|
import arc.util.io.*;
|
||||||
import mindustry.annotations.Annotations.*;
|
import mindustry.annotations.Annotations.*;
|
||||||
import mindustry.content.*;
|
import mindustry.content.*;
|
||||||
|
import mindustry.entities.*;
|
||||||
import mindustry.entities.units.*;
|
import mindustry.entities.units.*;
|
||||||
import mindustry.gen.*;
|
import mindustry.gen.*;
|
||||||
import mindustry.graphics.*;
|
import mindustry.graphics.*;
|
||||||
@@ -27,6 +28,8 @@ public class StackConveyor extends Block implements Autotiler{
|
|||||||
public float speed = 0f;
|
public float speed = 0f;
|
||||||
public boolean splitOut = true;
|
public boolean splitOut = true;
|
||||||
public float recharge = 2f;
|
public float recharge = 2f;
|
||||||
|
public Effect loadEffect = Fx.plasticburn;
|
||||||
|
public Effect unloadEffect = Fx.plasticburn;
|
||||||
|
|
||||||
public StackConveyor(String name){
|
public StackConveyor(String name){
|
||||||
super(name);
|
super(name);
|
||||||
@@ -221,11 +224,11 @@ public class StackConveyor extends Block implements Autotiler{
|
|||||||
|
|
||||||
protected void poofIn(){
|
protected void poofIn(){
|
||||||
link = tile.pos();
|
link = tile.pos();
|
||||||
Fx.plasticburn.at(this);
|
loadEffect.at(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void poofOut(){
|
protected void poofOut(){
|
||||||
Fx.plasticburn.at(this);
|
unloadEffect.at(this);
|
||||||
link = -1;
|
link = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -33,6 +33,8 @@ public class PowerNode extends PowerBlock{
|
|||||||
public @Load("laser-end") TextureRegion laserEnd;
|
public @Load("laser-end") TextureRegion laserEnd;
|
||||||
public float laserRange = 6;
|
public float laserRange = 6;
|
||||||
public int maxNodes = 3;
|
public int maxNodes = 3;
|
||||||
|
public Color laserColor1 = Color.white;
|
||||||
|
public Color laserColor2 = Pal.powerLight;
|
||||||
|
|
||||||
public PowerNode(String name){
|
public PowerNode(String name){
|
||||||
super(name);
|
super(name);
|
||||||
@@ -158,7 +160,7 @@ public class PowerNode extends PowerBlock{
|
|||||||
|
|
||||||
float fract = 1f - satisfaction;
|
float fract = 1f - satisfaction;
|
||||||
|
|
||||||
Draw.color(Color.white, Pal.powerLight, fract * 0.86f + Mathf.absin(3f, 0.1f));
|
Draw.color(laserColor1, laserColor2, fract * 0.86f + Mathf.absin(3f, 0.1f));
|
||||||
Draw.alpha(opacity);
|
Draw.alpha(opacity);
|
||||||
Drawf.laser(team, laser, laserEnd, x1, y1, x2, y2, 0.25f);
|
Drawf.laser(team, laser, laserEnd, x1, y1, x2, y2, 0.25f);
|
||||||
Draw.color();
|
Draw.color();
|
||||||
|
|||||||
Reference in New Issue
Block a user