Merge remote-tracking branch 'origin/master'

This commit is contained in:
Anuken 2025-11-30 12:10:15 -05:00
commit 3acbd1afed
3 changed files with 7 additions and 2 deletions

View file

@ -2866,7 +2866,7 @@ public class Blocks{
drillTime = 400; drillTime = 400;
size = 2; size = 2;
consumeLiquid(Liquids.water, 0.06f).boost(); consumeLiquid(Liquids.water, 3.5f / 60f).boost();
}}; }};
laserDrill = new Drill("laser-drill"){{ laserDrill = new Drill("laser-drill"){{

View file

@ -15,6 +15,7 @@ import mindustry.content.*;
import mindustry.ctype.*; import mindustry.ctype.*;
import mindustry.entities.*; import mindustry.entities.*;
import mindustry.entities.part.*; import mindustry.entities.part.*;
import mindustry.entities.pattern.*;
import mindustry.game.EventType.*; import mindustry.game.EventType.*;
import mindustry.game.*; import mindustry.game.*;
import mindustry.gen.*; import mindustry.gen.*;
@ -72,6 +73,8 @@ public class BulletType extends Content implements Cloneable{
public Effect despawnEffect = Fx.hitBulletSmall; public Effect despawnEffect = Fx.hitBulletSmall;
/** Effect created when shooting. */ /** Effect created when shooting. */
public Effect shootEffect = Fx.shootSmall; public Effect shootEffect = Fx.shootSmall;
/** Pattern used to shoot this bullet. If null, uses turret's default pattern. */
public @Nullable ShootPattern shootPattern = null;
/** Effect created when charging starts; only usable in single-shot weapons with a firstShotDelay / shotDelay. */ /** Effect created when charging starts; only usable in single-shot weapons with a firstShotDelay / shotDelay. */
public Effect chargeEffect = Fx.none; public Effect chargeEffect = Fx.none;
/** Extra smoke effect created when shooting. */ /** Extra smoke effect created when shooting. */

View file

@ -705,7 +705,9 @@ public class Turret extends ReloadTurret{
type.chargeEffect.at(bulletX, bulletY, rotation); type.chargeEffect.at(bulletX, bulletY, rotation);
} }
shoot.shoot(barrelCounter, (xOffset, yOffset, angle, delay, mover) -> { ShootPattern pattern = type.shootPattern != null ? type.shootPattern : shoot;
pattern.shoot(barrelCounter, (xOffset, yOffset, angle, delay, mover) -> {
queuedBullets++; queuedBullets++;
int barrel = barrelCounter; int barrel = barrelCounter;