mirror of
https://github.com/Anuken/Mindustry.git
synced 2025-07-15 10:17:39 +07:00
Flux speed buff / Server drowning / Delta buff
This commit is contained in:
@ -11,7 +11,7 @@ import io.anuke.mindustry.type.ContentList;
|
|||||||
|
|
||||||
public class AmmoTypes implements ContentList{
|
public class AmmoTypes implements ContentList{
|
||||||
public static AmmoType bulletCopper, bulletDense, bulletThorium, bulletSilicon, bulletPyratite,
|
public static AmmoType bulletCopper, bulletDense, bulletThorium, bulletSilicon, bulletPyratite,
|
||||||
shotgunTungsten, bombExplosive, bombIncendiary, bombOil, shellCarbide, flamerThermite, weaponMissile, weaponMissileSwarm, bulletMech,
|
shock, bombExplosive, bombIncendiary, bombOil, shellCarbide, flamerThermite, weaponMissile, weaponMissileSwarm, bulletMech,
|
||||||
healBlaster, bulletGlaive,
|
healBlaster, bulletGlaive,
|
||||||
flakExplosive, flakPlastic, flakSurge,
|
flakExplosive, flakPlastic, flakSurge,
|
||||||
missileExplosive, missileIncindiary, missileSurge,
|
missileExplosive, missileIncindiary, missileSurge,
|
||||||
@ -43,7 +43,7 @@ public class AmmoTypes implements ContentList{
|
|||||||
inaccuracy = 2f;
|
inaccuracy = 2f;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
shotgunTungsten = new AmmoType(TurretBullets.lightning){{
|
shock = new AmmoType(TurretBullets.lightning){{
|
||||||
shootEffect = BulletFx.hitLancer;
|
shootEffect = BulletFx.hitLancer;
|
||||||
smokeEffect = Fx.none;
|
smokeEffect = Fx.none;
|
||||||
}};
|
}};
|
||||||
|
@ -107,7 +107,7 @@ public class Mechs implements ContentList{
|
|||||||
if(player.altHeat >= 0.91f){
|
if(player.altHeat >= 0.91f){
|
||||||
Effects.shake(3f, 3f, player);
|
Effects.shake(3f, 3f, player);
|
||||||
for(int i = 0; i < 8; i++){
|
for(int i = 0; i < 8; i++){
|
||||||
Timers.run(Mathf.random(5f), () -> Lightning.create(player.getTeam(), BulletFx.hitLancer, player.getTeam().color, 10f, player.x, player.y, Mathf.random(360f), 20));
|
Timers.run(Mathf.random(5f), () -> Lightning.create(player.getTeam(), BulletFx.hitLancer, player.getTeam().color, 15f, player.x, player.y, Mathf.random(360f), 20));
|
||||||
}
|
}
|
||||||
player.altHeat = 0f;
|
player.altHeat = 0f;
|
||||||
}
|
}
|
||||||
|
@ -96,7 +96,7 @@ public class Weapons implements ContentList{
|
|||||||
inaccuracy = 0f;
|
inaccuracy = 0f;
|
||||||
velocityRnd = 0.2f;
|
velocityRnd = 0.2f;
|
||||||
ejectEffect = Fx.none;
|
ejectEffect = Fx.none;
|
||||||
ammo = AmmoTypes.shotgunTungsten;
|
ammo = AmmoTypes.shock;
|
||||||
}};
|
}};
|
||||||
|
|
||||||
flakgun = new Weapon("flakgun"){{
|
flakgun = new Weapon("flakgun"){{
|
||||||
|
@ -229,7 +229,7 @@ public class TurretBullets extends BulletList implements ContentList{
|
|||||||
statusIntensity = 0.5f;
|
statusIntensity = 0.5f;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
lightning = new BulletType(0.001f, 10){
|
lightning = new BulletType(0.001f, 14){
|
||||||
{
|
{
|
||||||
lifetime = 1;
|
lifetime = 1;
|
||||||
despawneffect = Fx.none;
|
despawneffect = Fx.none;
|
||||||
|
@ -302,7 +302,7 @@ public class Player extends Unit implements BuilderTrait, CarryTrait, ShooterTra
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(floor.isLiquid){
|
if(floor.isLiquid){
|
||||||
Draw.tint(Color.WHITE, floor.liquidColor, drownTime);
|
Draw.tint(Color.WHITE, floor.liquidColor, Mathf.clamp(drownTime));
|
||||||
}else{
|
}else{
|
||||||
Draw.tint(Color.WHITE);
|
Draw.tint(Color.WHITE);
|
||||||
}
|
}
|
||||||
@ -461,6 +461,7 @@ public class Player extends Unit implements BuilderTrait, CarryTrait, ShooterTra
|
|||||||
interpolate();
|
interpolate();
|
||||||
updateBuilding(this); //building happens even with non-locals
|
updateBuilding(this); //building happens even with non-locals
|
||||||
status.update(this); //status effect updating also happens with non locals for effect purposes
|
status.update(this); //status effect updating also happens with non locals for effect purposes
|
||||||
|
updateVelocityStatus(mech.drag, mech.maxSpeed); //velocity too, for visual purposes
|
||||||
|
|
||||||
if(getCarrier() != null){
|
if(getCarrier() != null){
|
||||||
x = getCarrier().getX();
|
x = getCarrier().getX();
|
||||||
|
@ -259,7 +259,7 @@ public abstract class Unit extends DestructibleEntity implements SaveTrait, Targ
|
|||||||
|
|
||||||
drownTime = Mathf.clamp(drownTime);
|
drownTime = Mathf.clamp(drownTime);
|
||||||
|
|
||||||
if(drownTime >= 1f){
|
if(drownTime >= 0.999f){
|
||||||
damage(health + 1);
|
damage(health + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -87,7 +87,7 @@ public class Lightning extends TimedEntity implements Poolable, DrawTrait, SyncT
|
|||||||
if(checkShield(team, x2, y2)) break;
|
if(checkShield(team, x2, y2)) break;
|
||||||
float fangle = angle;
|
float fangle = angle;
|
||||||
|
|
||||||
angle += Mathf.range(30f);
|
angle += Mathf.range(15f);
|
||||||
rect.setSize(attractRange).setCenter(x, y);
|
rect.setSize(attractRange).setCenter(x, y);
|
||||||
|
|
||||||
Units.getNearbyEnemies(team, rect, entity -> {
|
Units.getNearbyEnemies(team, rect, entity -> {
|
||||||
|
@ -31,6 +31,7 @@ public class PowerSmelter extends PowerBlock{
|
|||||||
|
|
||||||
protected float minFlux = 0.2f;
|
protected float minFlux = 0.2f;
|
||||||
protected int fluxNeeded = 1;
|
protected int fluxNeeded = 1;
|
||||||
|
protected float fluxSpeedMult = 0.75f;
|
||||||
protected float baseFluxChance = 0.25f;
|
protected float baseFluxChance = 0.25f;
|
||||||
protected boolean useFlux = false;
|
protected boolean useFlux = false;
|
||||||
|
|
||||||
@ -111,9 +112,17 @@ public class PowerSmelter extends PowerBlock{
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
float baseSmeltSpeed = 1f;
|
||||||
|
for(Item item : Item.all()){
|
||||||
|
if(item.fluxiness >= minFlux && tile.entity.items.get(item) > 0){
|
||||||
|
baseSmeltSpeed = fluxSpeedMult;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(entity.items.get(result) >= itemCapacity //output full
|
if(entity.items.get(result) >= itemCapacity //output full
|
||||||
|| entity.heat <= minHeat //not burning
|
|| entity.heat <= minHeat //not burning
|
||||||
|| !entity.timer.get(timerCraft, craftTime)){ //not yet time
|
|| !entity.timer.get(timerCraft, craftTime*baseSmeltSpeed)){ //not yet time
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27,6 +27,7 @@ public class Smelter extends Block{
|
|||||||
protected Item result;
|
protected Item result;
|
||||||
|
|
||||||
protected float minFlux = 0.2f;
|
protected float minFlux = 0.2f;
|
||||||
|
protected float fluxSpeedMult = 0.75f;
|
||||||
protected float baseFluxChance = 0.25f;
|
protected float baseFluxChance = 0.25f;
|
||||||
protected boolean useFlux = false;
|
protected boolean useFlux = false;
|
||||||
|
|
||||||
@ -107,9 +108,17 @@ public class Smelter extends Block{
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
float baseSmeltSpeed = 1f;
|
||||||
|
for(Item item : Item.all()){
|
||||||
|
if(item.fluxiness >= minFlux && tile.entity.items.get(item) > 0){
|
||||||
|
baseSmeltSpeed = fluxSpeedMult;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if(entity.items.get(result) >= itemCapacity //output full
|
if(entity.items.get(result) >= itemCapacity //output full
|
||||||
|| entity.burnTime <= 0 //not burning
|
|| entity.burnTime <= 0 //not burning
|
||||||
|| !entity.timer.get(timerCraft, craftTime)){ //not yet time
|
|| !entity.timer.get(timerCraft, craftTime*baseSmeltSpeed)){ //not yet time
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -151,7 +151,7 @@ public class ServerControl extends Module{
|
|||||||
});
|
});
|
||||||
|
|
||||||
handler.register("version", "Displays server version info.", arg -> {
|
handler.register("version", "Displays server version info.", arg -> {
|
||||||
info("&lmVersion: &lyMindustry {0} {1} / {2}", Version.code, Version.type, Version.buildName);
|
info("&lmVersion: &lyMindustry {0}-{1} {2} / build {3}", Version.number, Version.modifier, Version.type, Version.build);
|
||||||
info("&lmJava Version: &ly{0}", System.getProperty("java.version"));
|
info("&lmJava Version: &ly{0}", System.getProperty("java.version"));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user