mirror of
https://github.com/Anuken/Mindustry.git
synced 2026-01-26 22:42:41 -08:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
70f95aef12
8 changed files with 24 additions and 5 deletions
|
|
@ -4319,6 +4319,7 @@ public class Blocks{
|
|||
knockback = 1f;
|
||||
pierceCap = 2;
|
||||
buildingDamageMultiplier = 0.3f;
|
||||
timescaleDamage = true;
|
||||
|
||||
colors = new Color[]{Color.valueOf("eb7abe").a(0.55f), Color.valueOf("e189f5").a(0.7f), Color.valueOf("907ef7").a(0.8f), Color.valueOf("91a4ff"), Color.white};
|
||||
}},
|
||||
|
|
@ -4329,6 +4330,7 @@ public class Blocks{
|
|||
knockback = 2f;
|
||||
pierceCap = 3;
|
||||
buildingDamageMultiplier = 0.3f;
|
||||
timescaleDamage = true;
|
||||
|
||||
colors = new Color[]{Color.valueOf("465ab8").a(0.55f), Color.valueOf("66a6d2").a(0.7f), Color.valueOf("89e8b6").a(0.8f), Color.valueOf("cafcbe"), Color.white};
|
||||
flareColor = Color.valueOf("89e8b6");
|
||||
|
|
|
|||
|
|
@ -2011,7 +2011,7 @@ abstract class BuildingComp implements Posc, Teamc, Healthc, Buildingc, Timerc,
|
|||
case powerNetCapacity -> power == null ? 0 : power.graph.getLastCapacity();
|
||||
case enabled -> enabled ? 1 : 0;
|
||||
case controlled -> this instanceof ControlBlock c && c.isControlled() ? GlobalVars.ctrlPlayer : 0;
|
||||
case payloadCount -> getPayload() != null ? 1 : 0;
|
||||
case payloadCount -> (getPayloads() != null ? getPayloads().total() : 0) + (getPayload() != null ? 1 : 0);
|
||||
case size -> block.size;
|
||||
case cameraX, cameraY, cameraWidth, cameraHeight -> this instanceof ControlBlock c ? c.unit().sense(sensor) : 0;
|
||||
default -> Float.NaN; //gets converted to null in logic
|
||||
|
|
|
|||
|
|
@ -284,7 +284,7 @@ abstract class UnitComp implements Healthc, Physicsc, Hitboxc, Statusc, Teamc, I
|
|||
controller instanceof CommandAI command && command.hasCommand() ? ctrlCommand :
|
||||
0;
|
||||
case payloadCount -> ((Object)this) instanceof Payloadc pay ? pay.payloads().size : 0;
|
||||
case totalPayload -> ((Object)this) instanceof Payloadc pay ? pay.payloadUsed() : 0;
|
||||
case totalPayload -> ((Object)this) instanceof Payloadc pay ? pay.payloadUsed() / (tilesize * tilesize) : 0;
|
||||
case payloadCapacity -> type.payloadCapacity / tilePayload;
|
||||
case size -> hitSize / tilesize;
|
||||
case color -> Color.toDoubleBits(team.color.r, team.color.g, team.color.b, 1f);
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ import mindustry.entities.*;
|
|||
import mindustry.game.EventType.*;
|
||||
import mindustry.gen.*;
|
||||
import mindustry.graphics.*;
|
||||
import mindustry.logic.LAccess;
|
||||
import mindustry.world.*;
|
||||
import mindustry.world.meta.*;
|
||||
|
||||
|
|
@ -103,6 +104,14 @@ public class ShockwaveTower extends Block{
|
|||
heat = Mathf.clamp(heat - Time.delta / reload * cooldownMultiplier);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public double sense(LAccess sensor) {
|
||||
if(sensor == LAccess.progress) return reloadCounter / reload;
|
||||
return super.sense(sensor);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public float warmup(){
|
||||
return heat;
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ public class ContinuousTurret extends Turret{
|
|||
entry.bullet.aimX = Tmp.v1.x;
|
||||
entry.bullet.aimY = Tmp.v1.y;
|
||||
if(scaleDamageEfficiency){
|
||||
entry.bullet.damage = entry.bullet.type.damage * Math.min(efficiency, 1f) * entry.bullet.damageMultiplier();
|
||||
entry.bullet.damage = entry.bullet.type.damage * Math.min(efficiency, 1f) * timeScale * entry.bullet.damageMultiplier();
|
||||
}
|
||||
|
||||
if(isShooting() && hasAmmo()){
|
||||
|
|
|
|||
|
|
@ -117,7 +117,7 @@ public class TractorBeamTurret extends BaseTurret{
|
|||
//shoot when possible
|
||||
if(Angles.within(rotation, dest, shootCone)){
|
||||
if(damage > 0){
|
||||
target.damageContinuous(damage * eff * state.rules.blockDamage(team));
|
||||
target.damageContinuous(damage * eff * timeScale * state.rules.blockDamage(team));
|
||||
}
|
||||
|
||||
if(status != StatusEffects.none){
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import arc.math.geom.*;
|
|||
import arc.util.*;
|
||||
import arc.util.io.*;
|
||||
import mindustry.annotations.Annotations.*;
|
||||
import mindustry.ctype.Content;
|
||||
import mindustry.entities.*;
|
||||
import mindustry.gen.*;
|
||||
import mindustry.graphics.*;
|
||||
|
|
@ -285,6 +286,13 @@ public class PayloadConveyor extends Block{
|
|||
updatePayload();
|
||||
}
|
||||
|
||||
@Override
|
||||
public double sense(Content content){
|
||||
if(item instanceof UnitPayload up && up.unit.type == content) return 1;
|
||||
if(item instanceof BuildPayload bp && bp.build.block == content) return 1;
|
||||
return super.sense(content);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onRemoved(){
|
||||
super.onRemoved();
|
||||
|
|
|
|||
|
|
@ -210,7 +210,7 @@ public class WallCrafter extends Block{
|
|||
lastEfficiency = eff * timeScale * efficiency;
|
||||
|
||||
if(cons && (time += edelta() * eff) >= drillTime){
|
||||
items.add(output, 1);
|
||||
offload(output);
|
||||
time %= drillTime;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue