Skip to content

Commit

Permalink
give the light weapons firing cooldowns
Browse files Browse the repository at this point in the history
  • Loading branch information
Crystalzzzz committed Oct 24, 2023
1 parent af0fde0 commit 68763c9
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class HeavyTurretWeaponSubsystem(
pos: Vec3i,
face: BlockFace,
override val multiblock: HeavyTurretMultiblock
) : TurretWeaponSubsystem(ship, pos, face) {
) : TurretWeaponSubsystem(ship, pos, face), StarshipCooldownSubsystem {
override val inaccuracyRadians: Double get() = Math.toRadians(IonServer.balancing.starshipWeapons.heavyTurret.inaccuracyRadians)
override val powerUsage: Int get() = IonServer.balancing.starshipWeapons.heavyTurret.powerUsage / 3

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import org.bukkit.block.BlockFace
import org.bukkit.util.Vector

class LaserCannonWeaponSubsystem(starship: ActiveStarship, pos: Vec3i, face: BlockFace) :
CannonWeaponSubsystem(starship, pos, face) {
CannonWeaponSubsystem(starship, pos, face), StarshipCooldownSubsystem {
override val powerUsage: Int = IonServer.balancing.starshipWeapons.laserCannon.powerUsage
override val length: Int = IonServer.balancing.starshipWeapons.laserCannon.length
override val angleRadians: Double = Math.toRadians(IonServer.balancing.starshipWeapons.laserCannon.angleRadians)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class LightTurretWeaponSubsystem(
pos: Vec3i,
face: BlockFace,
override val multiblock: LightTurretMultiblock
) : TurretWeaponSubsystem(ship, pos, face), AutoWeaponSubsystem {
) : TurretWeaponSubsystem(ship, pos, face), AutoWeaponSubsystem, StarshipCooldownSubsystem {
override val powerUsage: Int = IonServer.balancing.starshipWeapons.lightTurret.powerUsage
override val inaccuracyRadians: Double = Math.toRadians(IonServer.balancing.starshipWeapons.lightTurret.inaccuracyRadians)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class MiniPhaserWeaponSubsystem(
pos: Vec3i,
face: BlockFace
) : CannonWeaponSubsystem(starship, pos, face), RestrictedSubsystem,
AmmoConsumingWeaponSubsystem {
AmmoConsumingWeaponSubsystem, StarshipCooldownSubsystem {
override val length: Int = IonServer.balancing.starshipWeapons.miniPhaser.length
override val convergeDist: Double = IonServer.balancing.starshipWeapons.miniPhaser.convergeDistance
override val extraDistance: Int = IonServer.balancing.starshipWeapons.miniPhaser.extraDistance
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import org.bukkit.block.BlockFace
import org.bukkit.util.Vector

class PlasmaCannonWeaponSubsystem(starship: ActiveStarship, pos: Vec3i, face: BlockFace) :
CannonWeaponSubsystem(starship, pos, face) {
CannonWeaponSubsystem(starship, pos, face), StarshipCooldownSubsystem {
override val powerUsage: Int = IonServer.balancing.starshipWeapons.plasmaCannon.powerUsage
override val length: Int = IonServer.balancing.starshipWeapons.plasmaCannon.length
override val angleRadians: Double = Math.toRadians(IonServer.balancing.starshipWeapons.plasmaCannon.angleRadians)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import org.bukkit.util.Vector
import kotlin.math.sqrt

class PointDefenseSubsystem(starship: ActiveStarship, pos: Vec3i, override var face: BlockFace) :
WeaponSubsystem(starship, pos), DirectionalSubsystem, AutoWeaponSubsystem {
WeaponSubsystem(starship, pos), DirectionalSubsystem, AutoWeaponSubsystem, StarshipCooldownSubsystem {
override val powerUsage: Int = IonServer.balancing.starshipWeapons.pointDefence.powerUsage
override val range: Double = IonServer.balancing.starshipWeapons.pointDefence.range

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import org.bukkit.block.BlockFace
import org.bukkit.util.Vector

class PulseCannonWeaponSubsystem(starship: ActiveStarship, pos: Vec3i, face: BlockFace) :
CannonWeaponSubsystem(starship, pos, face) {
CannonWeaponSubsystem(starship, pos, face), StarshipCooldownSubsystem {
companion object {
private val colorMap: Map<Material, Color> = STAINED_GLASS_TYPES
.associateWith { DyeColor.valueOf(it.name.removeSuffix("_STAINED_GLASS")).color }
Expand Down

0 comments on commit 68763c9

Please sign in to comment.