Merge branch 'master' of https://github.com/Anuken/Mindustry
This commit is contained in:
@@ -143,3 +143,4 @@ BlueWolf
|
|||||||
[Error_27]
|
[Error_27]
|
||||||
code-explorer786
|
code-explorer786
|
||||||
KayAyeAre
|
KayAyeAre
|
||||||
|
SMOLKEYS
|
||||||
@@ -184,6 +184,12 @@ public class BulletType extends Content implements Cloneable{
|
|||||||
public Seq<BulletType> spawnBullets = new Seq<>();
|
public Seq<BulletType> spawnBullets = new Seq<>();
|
||||||
/** Unit spawned _instead of_ this bullet. Useful for missiles. */
|
/** Unit spawned _instead of_ this bullet. Useful for missiles. */
|
||||||
public @Nullable UnitType spawnUnit;
|
public @Nullable UnitType spawnUnit;
|
||||||
|
/** Unit spawned when this bullet hits something or despawns due to it hitting the end of its lifetime. */
|
||||||
|
public @Nullable UnitType despawnUnit;
|
||||||
|
/** Amount of units spawned when this bullet despawns. */
|
||||||
|
public int despawnUnitCount = 1;
|
||||||
|
/** Random offset distance from the original bullet despawn/hit coordinate. */
|
||||||
|
public float despawnUnitRadius = 0.1f;
|
||||||
|
|
||||||
/** Color of trail behind bullet. */
|
/** Color of trail behind bullet. */
|
||||||
public Color trailColor = Pal.missileYellowBack;
|
public Color trailColor = Pal.missileYellowBack;
|
||||||
@@ -373,6 +379,7 @@ public class BulletType extends Content implements Cloneable{
|
|||||||
}
|
}
|
||||||
createPuddles(b, x, y);
|
createPuddles(b, x, y);
|
||||||
createIncend(b, x, y);
|
createIncend(b, x, y);
|
||||||
|
createUnits(b, x, y);
|
||||||
|
|
||||||
if(suppressionRange > 0){
|
if(suppressionRange > 0){
|
||||||
//bullets are pooled, require separate Vec2 instance
|
//bullets are pooled, require separate Vec2 instance
|
||||||
@@ -432,17 +439,26 @@ public class BulletType extends Content implements Cloneable{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void createUnits(Bullet b, float x, float y){
|
||||||
|
if(despawnUnit != null){
|
||||||
|
for(int i = 0; i < despawnUnitCount; i++){
|
||||||
|
despawnUnit.spawn(b.team, x + Mathf.range(despawnUnitRadius), y + Mathf.range(despawnUnitRadius));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/** Called when the bullet reaches the end of its lifetime or is destroyed by something external. */
|
/** Called when the bullet reaches the end of its lifetime or is destroyed by something external. */
|
||||||
public void despawned(Bullet b){
|
public void despawned(Bullet b){
|
||||||
if(despawnHit){
|
if(despawnHit){
|
||||||
hit(b);
|
hit(b);
|
||||||
|
}else{
|
||||||
|
createUnits(b, b.x, b.y);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!fragOnHit){
|
if(!fragOnHit){
|
||||||
createFrags(b, b.x, b.y);
|
createFrags(b, b.x, b.y);
|
||||||
}
|
}
|
||||||
|
|
||||||
despawnEffect.at(b.x, b.y, b.rotation(), hitColor);
|
despawnEffect.at(b.x, b.y, b.rotation(), hitColor);
|
||||||
despawnSound.at(b);
|
despawnSound.at(b);
|
||||||
|
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ public class Rules{
|
|||||||
public float dropZoneRadius = 300f;
|
public float dropZoneRadius = 300f;
|
||||||
/** Time between waves in ticks. */
|
/** Time between waves in ticks. */
|
||||||
public float waveSpacing = 2 * Time.toMinutes;
|
public float waveSpacing = 2 * Time.toMinutes;
|
||||||
/** Starting wave spacing; if <0, uses waveSpacing * 2. */
|
/** Starting wave spacing; if <=0, uses waveSpacing * 2. */
|
||||||
public float initialWaveSpacing = 0f;
|
public float initialWaveSpacing = 0f;
|
||||||
/** Wave after which the player 'wins'. Used in sectors. Use a value <= 0 to disable. */
|
/** Wave after which the player 'wins'. Used in sectors. Use a value <= 0 to disable. */
|
||||||
public int winWave = 0;
|
public int winWave = 0;
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ public class ShieldBreaker extends Block{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canBreak(Tile tile){
|
public boolean canBreak(Tile tile){
|
||||||
return false;
|
return Vars.state.isEditor();
|
||||||
}
|
}
|
||||||
|
|
||||||
public class ShieldBreakerBuild extends Building{
|
public class ShieldBreakerBuild extends Building{
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ public class CoreBlock extends StorageBlock{
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canBreak(Tile tile){
|
public boolean canBreak(Tile tile){
|
||||||
return false;
|
return state.isEditor();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
Reference in New Issue
Block a user