Package mindustry.entities.bullet
Class BulletType
java.lang.Object
mindustry.ctype.Content
mindustry.entities.bullet.BulletType
- All Implemented Interfaces:
Cloneable,Comparable<Content>
- Direct Known Subclasses:
BasicBulletType,ContinuousBulletType,EmptyBulletType,ExplosionBulletType,FireBulletType,LaserBulletType,LightningBulletType,LiquidBulletType,MultiBulletType,PointBulletType,PointLaserBulletType,RailBulletType,SapBulletType,ShrapnelBulletType,SpaceLiquidBulletType
-
Nested Class Summary
Nested classes/interfaces inherited from class mindustry.ctype.Content
Content.ModContentInfo -
Field Summary
FieldsModifier and TypeFieldDescriptionbooleanWhether this projectile can be absorbed by shields.floatAcceleration per frame.floatHow many bullets get created per ammo item/liquid.floatAngle offset applied to bullet when spawned each time.floatMultiplier of how much base damage is done to tiles.floatInterval, in ticks, between which bullet spawn.protected floatEffect created when charging starts; only usable in single-shot weapons with a firstShotDelay / shotDelay.booleanIf true, the bullet will attempt to circle around its shooting entity.floatRadius that the bullet attempts to circle at.floatSmooth extra radius value for circling.floatMultiplier of speed that is used to adjust velocity when circling.booleanIf true, this projectile collides with non-surface floors.booleanWhether this bullet types collides with anything at all.booleanWhether this bullet type collides with air/ground units.booleanWhether this bullet type collides with air/ground units.booleanWhether this bullet type collides with tiles that are of the same team.booleanWhether this bullet type collides with tiles.booleanIf true, this projectile collides with static wallsfloatChance for this bullet to be created.floatDirect damage dealt on hit.booleanIf true, frag bullets are delayed to the next frame.Effect shown when bullet despawns.booleanWhether to create hit effects on despawn.floatAmount of shaking produced when this bullet hits something or despawns.arc.audio.SoundSound made when hitting something or getting removed.Unit spawned when this bullet hits something or despawns due to it hitting the end of its lifetime.floatThe chance for despawn units to spawn.intAmount of units spawned when this bullet despawns.floatRandom offset distance from the original bullet despawn/hit coordinate.booleanWhether to display the ammo multiplayer for this bullet type in its stats.floatDrag as fraction of velocity.floatClipping hitbox.floatWhen used in turrets with limitRange() applied, this adds extra range to the bullets that extends past targeting range.booleanIf true, units spawned when this bullet despawns face away from the bullet instead of the same direction as the bullet.floatSpeed at which bullet rotates to follow cursor.floatAngle offset of fragmentation bullets.Bullet type that is created when this bullet expires.intNumber of fragmentation bullets created.floatRandom range of frag lifetime as a multiplier.floatRandom range of frag lifetime as a multiplier.floatRandom offset of frag bullets from the parent bullet.floatRandom offset of frag bullets from the parent bullet.booleanIf false, this bullet will not create fraags when absorbed by a shield.booleanIf true, this bullet will create bullets when it hits anything, not just when it despawns.floatDegree spread range of fragmentation bullets.floatUniform spread between each frag bullet in degrees.floatRandom range of frag velocity as a multiplier.floatRandom range of frag velocity as a multiplier.floatflat amount of block health healedarc.graphics.ColorColor used for block heal effects.Effect emitted upon blocks that are healed.float% of block health healedarc.graphics.ColorColor used for hit/despawn effects.Effect shown on direct hit.floatAmount of shaking produced when this bullet hits something or despawns.floatHitbox size.arc.audio.SoundSound made when hitting something or getting removed.floatPitch of the sound made when hitting somethingfloatVolume of the sound made when hitting somethingbooleanWhether this bullet can be hit by point defense.booleanWhether this bullet will always hit blocks under it.floatUse a negative value to disable homing delay.floatPower of bullet ability.floatRange of homing effect around bullet.booleanIf true, the angle param in create is ignored.booleanShould knockback follow the bullet's directionfloatExtra inaccuracy when firing.intAmount of fires attempted around bullet.floatChance of fire being created.floatSpread of fires around bullet.booleanWhether to instantly make the bullet disappear.floatAngle offset for interval bullets.Bullet that is created at a fixed interval.intNumber of bullet spawned per interval.floatUse a negative value to disable interval bullet delay.floatRandom angle added to interval bullets.floatAngle spread between individual interval bullets.booleanWhether velocity is inherited from the shooter.booleanWhether to kill the shooter when this is shot.floatKnockback in velocity.booleanFor piercing lasers, setting this to true makes it get absorbed by plastanium walls.floatZ layer to drawn on.floatMin/max multipliers for lifetime applied to this bullet when spawned.floatMin/max multipliers for lifetime applied to this bullet when spawned.floatFraction of bullet damage that heals that shooter.floatLifetime in ticks.arc.graphics.ColorColor of light emitted by this bullet.intNumber of separate lightning "roots".floatOffset of lightning relative to bullet rotation.arc.graphics.ColorColor of lightning created by bullet.floatSpread of lightning, relative to bullet rotation.floatUse a negative value to use default bullet damage.intLength of each lightning strand.intExtra random length added onto base length of lightning.The bullet created at lightning points.floatOpacity of light color.floatRadius of light emitted by this bullet; <0 to use defaults.booleanWhether to make fire on impactfloatIf positive, limits non-splash damage dealt to a fraction of the target's maximum health.floatBullet range positive override.floatWhen used in a turret with multiple ammoo types, this can be set to a non-zero value to influence minRangefloatLife fraction at which this bullet has the best range/damage/etc.arc.struct.Seq<DrawPart>Extra visual parts for this bullet.booleanWhether to pierce units.booleanIf true, unit armor is ignored in damage calculations.booleanWhether to pierce buildings.intMaximum # of pierced objects.floatMultiplier of damage decreased per health pierced.intHow many times this bullet can release frag bullets, if pierce = true.floatLiquid count of each puddle created.Liquid that puddles created are made of.floatRange of puddles around bullet position.intNumber of individual puddles created.floatAngle offset applied to bullet when spawned each time.floatRange initialized in init().floatWhen used in a turret with multiple ammo types, this can be set to a non-zero value to influence range.floatWhen > 0, overrides range even if smaller than base range.floatRecoil from shooter entities.booleanWhether this bullet can be reflected.floatMultiplied by turret reload speed to get final shoot speed.booleanIf false, this bullet isn't removed after pierceCap is exceeded.floatRotation speed of the bullet velocity as it travels.booleanIf true, splash damage is "correctly" affected by unit hitbox size.booleanWhether to scale lifetime (not actually velocity!) to disappear at the target position.booleanWhether status and despawnHit should automatically be set.floatMultiplier of how much base damage is done to force shields.Effect created when shooting.Extra smoke effect created when shooting.floatRandom angle spread of spawn bullets.arc.struct.Seq<BulletType>Bullets spawned when this bullet is created.Unit spawned _instead of_ this bullet.floatSpeed in units/tick.floatDamage dealt in splash.booleanIf true, splash damage pierces through tiles.floatUse a negative value to disable splash damage.floatIf >0, this is displayed divided by the ammo multiplier.Status effect applied on hit.floatIntensity of applied status effect in terms of duration.booleanIf true, the bullet will "stick" to enemies and get deactivated on collision.floatExtra time added to bullet when it sticks to something.arc.graphics.ColorColor used for the regenSuppressSeek effect.floatDuration of healing block suppression effect.floatChance of suppression effect occurring on block, scaled down by number of blocks.floatRange of healing block suppression effect.booleanTurret only.booleanTurret only.floatChance of trail effect spawning on bullet per tick.arc.graphics.ColorColor of trail behind bullet.Trail effect that is spawned.arc.math.InterpInterpolation for trail width as function of bullet lifetimefloatUniform interval in which trail effect is spawned.intLength of trail quads.floatMin velocity required for trail effect to spawn.floatRotation/size parameter that is passed to trail.booleanWhether the parameter passed to the trail is the bullet rotation, instead of a flat value.floatIf trailSinMag > 0, these values are applied as a sine curve to trail width.floatIf trailSinMag > 0, these values are applied as a sine curve to trail width.floatRandom offset of trail effect.floatWidth of trail, if trailLength > 0booleanIf true, this bullet is rendered underwater.floatMin/max multipliers for velocity applied to this bullet when spawned.floatMin/max multipliers for velocity applied to this bullet when spawned.floatIntensity of bullet weaving.booleanIf true, the bullet weave will randomly switch directions on spawn.floatScale of bullet weave pattern. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfloatbuildingDamage(mindustry.gen.Bullet b) protected floatfloatcopy()mindustry.gen.Bulletcreate(mindustry.gen.Bullet parent, float x, float y, float angle) mindustry.gen.Bulletcreate(mindustry.gen.Bullet parent, float x, float y, float angle, float velocityScl) mindustry.gen.Bulletcreate(mindustry.gen.Bullet parent, float x, float y, float angle, float velocityScl, float lifeScale) mindustry.gen.Bulletmindustry.gen.Bulletmindustry.gen.Bulletcreate(mindustry.gen.Entityc owner, Team team, float x, float y, float angle, float velocityScl, float lifetimeScl) mindustry.gen.Bulletcreate(mindustry.gen.Entityc owner, Team team, float x, float y, float angle, float damage, float velocityScl, float lifetimeScl, Object data) mindustry.gen.Bulletcreate(mindustry.gen.Entityc owner, Team team, float x, float y, float angle, float damage, float velocityScl, float lifetimeScl, Object data, Mover mover) mindustry.gen.Bulletcreate(mindustry.gen.Entityc owner, Team team, float x, float y, float angle, float damage, float velocityScl, float lifetimeScl, Object data, Mover mover, float aimX, float aimY) mindustry.gen.Bulletcreate(mindustry.gen.Entityc owner, Team team, float x, float y, float angle, float velocityScl, float lifetimeScl, Mover mover) mindustry.gen.Bulletcreate(mindustry.gen.Entityc owner, mindustry.gen.Entityc shooter, Team team, float x, float y, float angle, float damage, float velocityScl, float lifetimeScl, Object data, Mover mover, float aimX, float aimY) mindustry.gen.Bulletcreate(mindustry.gen.Entityc owner, mindustry.gen.Entityc shooter, Team team, float x, float y, float angle, float damage, float velocityScl, float lifetimeScl, Object data, Mover mover, float aimX, float aimY, mindustry.gen.Teamc target) mindustry.gen.Bulletcreate(mindustry.gen.Teamc owner, float x, float y, float angle) static voidcreateBullet(BulletType type, Team team, float x, float y, float angle, float damage, float velocityScl, float lifetimeScl) voidcreateFrags(mindustry.gen.Bullet b, float x, float y) voidcreateIncend(mindustry.gen.Bullet b, float x, float y) voidcreateNet(Team team, float x, float y, float angle, float damage, float velocityScl, float lifetimeScl) voidcreatePuddles(mindustry.gen.Bullet b, float x, float y) voidcreateSplashDamage(mindustry.gen.Bullet b, float x, float y) voidcreateUnits(mindustry.gen.Bullet b, float x, float y) floatdamageMultiplier(mindustry.gen.Bullet b) voiddespawned(mindustry.gen.Bullet b) Called when the bullet reaches the end of its lifetime or is destroyed by something external.voiddraw(mindustry.gen.Bullet b) voiddrawLight(mindustry.gen.Bullet b) voiddrawParts(mindustry.gen.Bullet b) voiddrawTrail(mindustry.gen.Bullet b) floatReturns the type name of this piece of content.voidhandlePierce(mindustry.gen.Bullet b, float initialHealth, float x, float y) booleanheals()voidhit(mindustry.gen.Bullet b) voidhit(mindustry.gen.Bullet b, float x, float y) voidhitEntity(mindustry.gen.Bullet b, mindustry.gen.Hitboxc entity, float health) voidhitTile(mindustry.gen.Bullet b, mindustry.gen.Building build, float x, float y, float initialHealth, boolean direct) If direct is false, this is an indirect hit and the tile was already damaged.voidinit()Called after all content and modules are created.voidinit(mindustry.gen.Bullet b) voidload()Called after all content is created, only on non-headless versions.voidremoved(mindustry.gen.Bullet b) Called when the bullet is removed for any reason.floatshieldDamage(mindustry.gen.Bullet b) booleantestCollision(mindustry.gen.Bullet bullet, mindustry.gen.Building tile) voidupdate(mindustry.gen.Bullet b) voidupdateBulletInterval(mindustry.gen.Bullet b) voidupdateHoming(mindustry.gen.Bullet b) voidupdateTrail(mindustry.gen.Bullet b) voidupdateTrailEffects(mindustry.gen.Bullet b) voidupdateWeaving(mindustry.gen.Bullet b) Methods inherited from class mindustry.ctype.Content
afterPatch, compareTo, hasErrored, isModded, isVanilla, loadIcon, postInit, toString
-
Field Details
-
lifetime
public float lifetimeLifetime in ticks. -
lifeScaleRandMin
public float lifeScaleRandMinMin/max multipliers for lifetime applied to this bullet when spawned. -
lifeScaleRandMax
public float lifeScaleRandMaxMin/max multipliers for lifetime applied to this bullet when spawned. -
speed
public float speedSpeed in units/tick. -
velocityScaleRandMin
public float velocityScaleRandMinMin/max multipliers for velocity applied to this bullet when spawned. -
velocityScaleRandMax
public float velocityScaleRandMaxMin/max multipliers for velocity applied to this bullet when spawned. -
damage
public float damageDirect damage dealt on hit. -
hitSize
public float hitSizeHitbox size. -
drawSize
public float drawSizeClipping hitbox. -
angleOffset
public float angleOffsetAngle offset applied to bullet when spawned each time. -
randomAngleOffset
public float randomAngleOffsetAngle offset applied to bullet when spawned each time. -
drag
public float dragDrag as fraction of velocity. -
accel
public float accelAcceleration per frame. -
pierce
public boolean pierceWhether to pierce units. -
pierceBuilding
public boolean pierceBuildingWhether to pierce buildings. -
pierceCap
public int pierceCapMaximum # of pierced objects. -
pierceDamageFactor
public float pierceDamageFactorMultiplier of damage decreased per health pierced. -
maxDamageFraction
public float maxDamageFractionIf positive, limits non-splash damage dealt to a fraction of the target's maximum health. -
removeAfterPierce
public boolean removeAfterPierceIf false, this bullet isn't removed after pierceCap is exceeded. Expert usage only. -
laserAbsorb
public boolean laserAbsorbFor piercing lasers, setting this to true makes it get absorbed by plastanium walls. -
optimalLifeFract
public float optimalLifeFractLife fraction at which this bullet has the best range/damage/etc. Used for lasers and continuous turrets. -
layer
public float layerZ layer to drawn on. -
hitEffect
Effect shown on direct hit. -
despawnEffect
Effect shown when bullet despawns. -
shootEffect
Effect created when shooting. -
chargeEffect
Effect created when charging starts; only usable in single-shot weapons with a firstShotDelay / shotDelay. -
smokeEffect
Extra smoke effect created when shooting. -
hitSound
public arc.audio.Sound hitSoundSound made when hitting something or getting removed. -
despawnSound
public arc.audio.Sound despawnSoundSound made when hitting something or getting removed. -
hitSoundPitch
public float hitSoundPitchPitch of the sound made when hitting something -
hitSoundVolume
public float hitSoundVolumeVolume of the sound made when hitting something -
inaccuracy
public float inaccuracyExtra inaccuracy when firing. -
ammoMultiplier
public float ammoMultiplierHow many bullets get created per ammo item/liquid. -
reloadMultiplier
public float reloadMultiplierMultiplied by turret reload speed to get final shoot speed. -
buildingDamageMultiplier
public float buildingDamageMultiplierMultiplier of how much base damage is done to tiles. -
shieldDamageMultiplier
public float shieldDamageMultiplierMultiplier of how much base damage is done to force shields. -
recoil
public float recoilRecoil from shooter entities. -
killShooter
public boolean killShooterWhether to kill the shooter when this is shot. For suicide bombers. -
instantDisappear
public boolean instantDisappearWhether to instantly make the bullet disappear. -
splashDamage
public float splashDamageDamage dealt in splash. 0 to disable. -
scaledSplashDamage
public boolean scaledSplashDamageIf true, splash damage is "correctly" affected by unit hitbox size. Used for projectiles that do not collide / have splash as their main source of damage. -
knockback
public float knockbackKnockback in velocity. -
impact
public boolean impactShould knockback follow the bullet's direction -
status
Status effect applied on hit. -
statusDuration
public float statusDurationIntensity of applied status effect in terms of duration. -
targetBlocks
public boolean targetBlocksTurret only. If false, blocks will not be targeted. -
targetMissiles
public boolean targetMissilesTurret only. If false, missiles will not be targeted. -
collidesTiles
public boolean collidesTilesWhether this bullet type collides with tiles. -
collidesTeam
public boolean collidesTeamWhether this bullet type collides with tiles that are of the same team. -
collidesAir
public boolean collidesAirWhether this bullet type collides with air/ground units. -
collidesGround
public boolean collidesGroundWhether this bullet type collides with air/ground units. -
collides
public boolean collidesWhether this bullet types collides with anything at all. -
collideFloor
public boolean collideFloorIf true, this projectile collides with non-surface floors. -
collideTerrain
public boolean collideTerrainIf true, this projectile collides with static walls -
keepVelocity
public boolean keepVelocityWhether velocity is inherited from the shooter. -
scaleLife
public boolean scaleLifeWhether to scale lifetime (not actually velocity!) to disappear at the target position. Used for artillery. -
hittable
public boolean hittableWhether this bullet can be hit by point defense. -
reflectable
public boolean reflectableWhether this bullet can be reflected. -
absorbable
public boolean absorbableWhether this projectile can be absorbed by shields. -
ignoreSpawnAngle
public boolean ignoreSpawnAngleIf true, the angle param in create is ignored. -
createChance
public float createChanceChance for this bullet to be created. -
maxRange
public float maxRangeBullet range positive override. -
rangeOverride
public float rangeOverrideWhen > 0, overrides range even if smaller than base range. -
rangeChange
public float rangeChangeWhen used in a turret with multiple ammo types, this can be set to a non-zero value to influence range. -
extraRangeMargin
public float extraRangeMarginWhen used in turrets with limitRange() applied, this adds extra range to the bullets that extends past targeting range. Only particularly relevant in vanilla. -
range
public float rangeRange initialized in init(). -
minRangeChange
public float minRangeChangeWhen used in a turret with multiple ammoo types, this can be set to a non-zero value to influence minRange -
healPercent
public float healPercent% of block health healed -
healAmount
public float healAmountflat amount of block health healed -
lifesteal
public float lifestealFraction of bullet damage that heals that shooter. -
makeFire
public boolean makeFireWhether to make fire on impact -
hitUnder
public boolean hitUnderWhether this bullet will always hit blocks under it. -
despawnHit
public boolean despawnHitWhether to create hit effects on despawn. Forced to true if this bullet has any special effects like splash damage. -
fragOnHit
public boolean fragOnHitIf true, this bullet will create bullets when it hits anything, not just when it despawns. -
fragOnAbsorb
public boolean fragOnAbsorbIf false, this bullet will not create fraags when absorbed by a shield. -
pierceArmor
public boolean pierceArmorIf true, unit armor is ignored in damage calculations. -
sticky
public boolean stickyIf true, the bullet will "stick" to enemies and get deactivated on collision. -
stickyExtraLifetime
public float stickyExtraLifetimeExtra time added to bullet when it sticks to something. -
setDefaults
public boolean setDefaultsWhether status and despawnHit should automatically be set. -
hitShake
public float hitShakeAmount of shaking produced when this bullet hits something or despawns. -
despawnShake
public float despawnShakeAmount of shaking produced when this bullet hits something or despawns. -
fragBullet
Bullet type that is created when this bullet expires. -
delayFrags
public boolean delayFragsIf true, frag bullets are delayed to the next frame. Fixes obscure bugs with piercing bullet types spawning frags immediately and screwing up the Damage temporary variables. -
fragRandomSpread
public float fragRandomSpreadDegree spread range of fragmentation bullets. -
fragSpread
public float fragSpreadUniform spread between each frag bullet in degrees. -
fragAngle
public float fragAngleAngle offset of fragmentation bullets. -
fragBullets
public int fragBulletsNumber of fragmentation bullets created. -
fragVelocityMin
public float fragVelocityMinRandom range of frag velocity as a multiplier. -
fragVelocityMax
public float fragVelocityMaxRandom range of frag velocity as a multiplier. -
fragLifeMin
public float fragLifeMinRandom range of frag lifetime as a multiplier. -
fragLifeMax
public float fragLifeMaxRandom range of frag lifetime as a multiplier. -
fragOffsetMin
public float fragOffsetMinRandom offset of frag bullets from the parent bullet. -
fragOffsetMax
public float fragOffsetMaxRandom offset of frag bullets from the parent bullet. -
pierceFragCap
public int pierceFragCapHow many times this bullet can release frag bullets, if pierce = true. -
intervalBullet
Bullet that is created at a fixed interval. -
bulletInterval
public float bulletIntervalInterval, in ticks, between which bullet spawn. -
intervalBullets
public int intervalBulletsNumber of bullet spawned per interval. -
intervalRandomSpread
public float intervalRandomSpreadRandom angle added to interval bullets. -
intervalSpread
public float intervalSpreadAngle spread between individual interval bullets. -
intervalAngle
public float intervalAngleAngle offset for interval bullets. -
intervalDelay
public float intervalDelayUse a negative value to disable interval bullet delay. -
underwater
public boolean underwaterIf true, this bullet is rendered underwater. Highly experimental! -
hitColor
public arc.graphics.Color hitColorColor used for hit/despawn effects. -
healColor
public arc.graphics.Color healColorColor used for block heal effects. -
healEffect
Effect emitted upon blocks that are healed. -
spawnBullets
Bullets spawned when this bullet is created. Rarely necessary, used for visuals. -
spawnBulletRandomSpread
public float spawnBulletRandomSpreadRandom angle spread of spawn bullets. -
spawnUnit
Unit spawned _instead of_ this bullet. Useful for missiles. -
despawnUnit
Unit spawned when this bullet hits something or despawns due to it hitting the end of its lifetime. -
despawnUnitChance
public float despawnUnitChanceThe chance for despawn units to spawn. -
despawnUnitCount
public int despawnUnitCountAmount of units spawned when this bullet despawns. -
despawnUnitRadius
public float despawnUnitRadiusRandom offset distance from the original bullet despawn/hit coordinate. -
faceOutwards
public boolean faceOutwardsIf true, units spawned when this bullet despawns face away from the bullet instead of the same direction as the bullet. -
parts
Extra visual parts for this bullet. -
trailColor
public arc.graphics.Color trailColorColor of trail behind bullet. -
trailChance
public float trailChanceChance of trail effect spawning on bullet per tick. -
trailInterval
public float trailIntervalUniform interval in which trail effect is spawned. -
trailMinVelocity
public float trailMinVelocityMin velocity required for trail effect to spawn. -
trailEffect
Trail effect that is spawned. -
trailSpread
public float trailSpreadRandom offset of trail effect. -
trailParam
public float trailParamRotation/size parameter that is passed to trail. Usually, this controls size. -
trailRotation
public boolean trailRotationWhether the parameter passed to the trail is the bullet rotation, instead of a flat value. -
trailInterp
public arc.math.Interp trailInterpInterpolation for trail width as function of bullet lifetime -
trailLength
public int trailLengthLength of trail quads. Any value <= 0 disables the trail. -
trailWidth
public float trailWidthWidth of trail, if trailLength > 0 -
trailSinMag
public float trailSinMagIf trailSinMag > 0, these values are applied as a sine curve to trail width. -
trailSinScl
public float trailSinSclIf trailSinMag > 0, these values are applied as a sine curve to trail width. -
circleShooter
public boolean circleShooterIf true, the bullet will attempt to circle around its shooting entity. -
circleShooterRadius
public float circleShooterRadiusRadius that the bullet attempts to circle at. -
circleShooterRadiusSmooth
public float circleShooterRadiusSmoothSmooth extra radius value for circling. -
circleShooterRotateSpeed
public float circleShooterRotateSpeedMultiplier of speed that is used to adjust velocity when circling. -
splashDamageRadius
public float splashDamageRadiusUse a negative value to disable splash damage. -
splashDamagePierce
public boolean splashDamagePierceIf true, splash damage pierces through tiles. -
incendAmount
public int incendAmountAmount of fires attempted around bullet. -
incendSpread
public float incendSpreadSpread of fires around bullet. -
incendChance
public float incendChanceChance of fire being created. -
homingPower
public float homingPowerPower of bullet ability. Usually a number between 0 and 1; try 0.1 as a starting point. -
homingRange
public float homingRangeRange of homing effect around bullet. -
homingDelay
public float homingDelayUse a negative value to disable homing delay. -
followAimSpeed
public float followAimSpeedSpeed at which bullet rotates to follow cursor. <= 0 to disable. -
suppressionRange
public float suppressionRangeRange of healing block suppression effect. -
suppressionDuration
public float suppressionDurationDuration of healing block suppression effect. -
suppressionEffectChance
public float suppressionEffectChanceChance of suppression effect occurring on block, scaled down by number of blocks. -
suppressColor
public arc.graphics.Color suppressColorColor used for the regenSuppressSeek effect. -
lightningColor
public arc.graphics.Color lightningColorColor of lightning created by bullet. -
lightning
public int lightningNumber of separate lightning "roots". -
lightningLength
public int lightningLengthLength of each lightning strand. -
lightningLengthRand
public int lightningLengthRandExtra random length added onto base length of lightning. -
lightningDamage
public float lightningDamageUse a negative value to use default bullet damage. -
lightningCone
public float lightningConeSpread of lightning, relative to bullet rotation. -
lightningAngle
public float lightningAngleOffset of lightning relative to bullet rotation. -
lightningType
The bullet created at lightning points. -
weaveScale
public float weaveScaleScale of bullet weave pattern. Higher -> less vibration. -
weaveMag
public float weaveMagIntensity of bullet weaving. Note that this may make bullets inaccurate. -
weaveRandom
public boolean weaveRandomIf true, the bullet weave will randomly switch directions on spawn. -
rotateSpeed
public float rotateSpeedRotation speed of the bullet velocity as it travels. -
puddles
public int puddlesNumber of individual puddles created. -
puddleRange
public float puddleRangeRange of puddles around bullet position. -
puddleAmount
public float puddleAmountLiquid count of each puddle created. -
puddleLiquid
Liquid that puddles created are made of. -
displayAmmoMultiplier
public boolean displayAmmoMultiplierWhether to display the ammo multiplayer for this bullet type in its stats. -
statLiquidConsumed
public float statLiquidConsumedIf >0, this is displayed divided by the ammo multiplier. -
lightRadius
public float lightRadiusRadius of light emitted by this bullet; <0 to use defaults. -
lightOpacity
public float lightOpacityOpacity of light color. -
lightColor
public arc.graphics.Color lightColorColor of light emitted by this bullet. -
cachedDps
protected float cachedDps
-
-
Constructor Details
-
BulletType
public BulletType(float speed, float damage) -
BulletType
public BulletType()
-
-
Method Details
-
copy
-
load
public void load()Description copied from class:ContentCalled after all content is created, only on non-headless versions. Use for loading regions or other image data. -
estimateDPS
public float estimateDPS()- Returns:
- estimated damage per shot. this can be very inaccurate.
-
calculateRange
protected float calculateRange()- Returns:
- maximum distance the bullet this bullet type has can travel.
-
continuousDamage
public float continuousDamage()- Returns:
- continuous damage in damage/sec, or -1 if not continuous.
-
heals
public boolean heals() -
testCollision
public boolean testCollision(mindustry.gen.Bullet bullet, mindustry.gen.Building tile) -
hitTile
public void hitTile(mindustry.gen.Bullet b, mindustry.gen.Building build, float x, float y, float initialHealth, boolean direct) If direct is false, this is an indirect hit and the tile was already damaged. TODO this is a mess. -
hitEntity
public void hitEntity(mindustry.gen.Bullet b, mindustry.gen.Hitboxc entity, float health) -
handlePierce
public void handlePierce(mindustry.gen.Bullet b, float initialHealth, float x, float y) -
damageMultiplier
public float damageMultiplier(mindustry.gen.Bullet b) -
hit
public void hit(mindustry.gen.Bullet b) -
hit
public void hit(mindustry.gen.Bullet b, float x, float y) -
createIncend
public void createIncend(mindustry.gen.Bullet b, float x, float y) -
createPuddles
public void createPuddles(mindustry.gen.Bullet b, float x, float y) -
createSplashDamage
public void createSplashDamage(mindustry.gen.Bullet b, float x, float y) -
createFrags
public void createFrags(mindustry.gen.Bullet b, float x, float y) -
createUnits
public void createUnits(mindustry.gen.Bullet b, float x, float y) -
despawned
public void despawned(mindustry.gen.Bullet b) Called when the bullet reaches the end of its lifetime or is destroyed by something external. -
removed
public void removed(mindustry.gen.Bullet b) Called when the bullet is removed for any reason. -
buildingDamage
public float buildingDamage(mindustry.gen.Bullet b) -
shieldDamage
public float shieldDamage(mindustry.gen.Bullet b) -
draw
public void draw(mindustry.gen.Bullet b) -
drawTrail
public void drawTrail(mindustry.gen.Bullet b) -
drawParts
public void drawParts(mindustry.gen.Bullet b) -
drawLight
public void drawLight(mindustry.gen.Bullet b) -
init
public void init(mindustry.gen.Bullet b) -
update
public void update(mindustry.gen.Bullet b) -
updateBulletInterval
public void updateBulletInterval(mindustry.gen.Bullet b) -
updateHoming
public void updateHoming(mindustry.gen.Bullet b) -
updateWeaving
public void updateWeaving(mindustry.gen.Bullet b) -
updateTrailEffects
public void updateTrailEffects(mindustry.gen.Bullet b) -
updateTrail
public void updateTrail(mindustry.gen.Bullet b) -
init
public void init()Description copied from class:ContentCalled after all content and modules are created. Do not use to load regions or texture data! -
getContentType
Description copied from class:ContentReturns the type name of this piece of content. This should return the same value for all instances of this content type.- Specified by:
getContentTypein classContent
-
create
@Nullable public mindustry.gen.Bullet create(mindustry.gen.Teamc owner, float x, float y, float angle) -
create
@Nullable public mindustry.gen.Bullet create(mindustry.gen.Entityc owner, Team team, float x, float y, float angle) -
create
@Nullable public mindustry.gen.Bullet create(mindustry.gen.Entityc owner, Team team, float x, float y, float angle, float velocityScl) -
create
@Nullable public mindustry.gen.Bullet create(mindustry.gen.Entityc owner, Team team, float x, float y, float angle, float velocityScl, float lifetimeScl) -
create
-
create
@Nullable public mindustry.gen.Bullet create(mindustry.gen.Bullet parent, float x, float y, float angle) -
create
@Nullable public mindustry.gen.Bullet create(mindustry.gen.Bullet parent, float x, float y, float angle, float velocityScl, float lifeScale) -
create
@Nullable public mindustry.gen.Bullet create(mindustry.gen.Bullet parent, float x, float y, float angle, float velocityScl) -
create
-
create
-
create
-
create
-
create
@Nullable public mindustry.gen.Bullet create(@Nullable mindustry.gen.Entityc owner, @Nullable mindustry.gen.Entityc shooter, Team team, float x, float y, float angle, float damage, float velocityScl, float lifetimeScl, Object data, @Nullable Mover mover, float aimX, float aimY, @Nullable mindustry.gen.Teamc target) -
createNet
public void createNet(Team team, float x, float y, float angle, float damage, float velocityScl, float lifetimeScl) -
createBullet
public static void createBullet(BulletType type, Team team, float x, float y, float angle, float damage, float velocityScl, float lifetimeScl)
-