mirror of
https://github.com/2revoemag/PSF-BotServer.git
synced 2026-01-19 18:14:44 +00:00
allowing scaled back bfr accessibility (#1280)
This commit is contained in:
parent
08b02846b9
commit
c416ba11df
|
|
@ -96,12 +96,30 @@ add_property suppressor holstertime 600
|
||||||
add_property trek equiptime 500
|
add_property trek equiptime 500
|
||||||
add_property trek holstertime 500
|
add_property trek holstertime 500
|
||||||
add_property vulture requirement_award0 false
|
add_property vulture requirement_award0 false
|
||||||
add_property aphelion allowed false
|
add_property aphelion allowed true
|
||||||
add_property aphelion_flight allowed false
|
add_property aphelion_flight allowed false
|
||||||
add_property aphelion_gunner allowed false
|
add_property aphelion_gunner allowed true
|
||||||
add_property colossus allowed false
|
add_property aphelion_armor_siphon allowed false
|
||||||
|
add_property aphelion_armor_siphon_left allowed false
|
||||||
|
add_property aphelion_armor_siphon_right allowed false
|
||||||
|
add_property aphelion_ntu_siphon allowed false
|
||||||
|
add_property aphelion_ntu_siphon_left allowed false
|
||||||
|
add_property aphelion_ntu_siphon_right allowed false
|
||||||
|
add_property colossus allowed true
|
||||||
add_property colossus_flight allowed false
|
add_property colossus_flight allowed false
|
||||||
add_property colossus_gunner allowed false
|
add_property colossus_gunner allowed true
|
||||||
add_property peregrine allowed false
|
add_property colossus_armor_siphon allowed false
|
||||||
|
add_property colossus_armor_siphon_left allowed false
|
||||||
|
add_property colossus_armor_siphon_right allowed false
|
||||||
|
add_property colossus_ntu_siphon allowed false
|
||||||
|
add_property colossus_ntu_siphon_left allowed false
|
||||||
|
add_property colossus_ntu_siphon_right allowed false
|
||||||
|
add_property peregrine allowed true
|
||||||
add_property peregrine_flight allowed false
|
add_property peregrine_flight allowed false
|
||||||
add_property peregrine_gunner allowed false
|
add_property peregrine_gunner allowed true
|
||||||
|
add_property peregrine_armor_siphon allowed false
|
||||||
|
add_property peregrine_armor_siphon_left allowed false
|
||||||
|
add_property peregrine_armor_siphon_right allowed false
|
||||||
|
add_property peregrine_ntu_siphon allowed false
|
||||||
|
add_property peregrine_ntu_siphon_left allowed false
|
||||||
|
add_property peregrine_ntu_siphon_right allowed false
|
||||||
|
|
|
||||||
|
|
@ -870,7 +870,7 @@ class WeaponAndProjectileOperations(
|
||||||
"BattleframeLeftArm"
|
"BattleframeLeftArm"
|
||||||
} else {
|
} else {
|
||||||
"BattleframeRightArm"
|
"BattleframeRightArm"
|
||||||
}).get.Enabled
|
}).exists(_.Enabled)
|
||||||
if (!mountIsEnabled) {
|
if (!mountIsEnabled) {
|
||||||
//can't stop the local discharge, but it will not actually shoot anything; assert the magazine
|
//can't stop the local discharge, but it will not actually shoot anything; assert the magazine
|
||||||
sendResponse(QuantityUpdateMessage(tool.AmmoSlot.Box.GUID, tool.Magazine))
|
sendResponse(QuantityUpdateMessage(tool.AmmoSlot.Box.GUID, tool.Magazine))
|
||||||
|
|
|
||||||
|
|
@ -110,6 +110,6 @@ class BattleFrameFlightConverter extends ObjectCreateConverter[Vehicle]() {
|
||||||
}
|
}
|
||||||
|
|
||||||
def showBfrShield(obj: Vehicle): Boolean = {
|
def showBfrShield(obj: Vehicle): Boolean = {
|
||||||
obj.Subsystems(VehicleSubsystemEntry.BattleframeShieldGenerator).get.Enabled && obj.Shields > 0
|
obj.Subsystems(VehicleSubsystemEntry.BattleframeShieldGenerator).exists(_.Enabled) && obj.Shields > 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -110,6 +110,6 @@ class BattleFrameRoboticsConverter extends ObjectCreateConverter[Vehicle]() {
|
||||||
}
|
}
|
||||||
|
|
||||||
def showBfrShield(obj: Vehicle): Boolean = {
|
def showBfrShield(obj: Vehicle): Boolean = {
|
||||||
obj.Subsystems(VehicleSubsystemEntry.BattleframeShieldGenerator).get.Enabled && obj.Shields > 0
|
obj.Subsystems(VehicleSubsystemEntry.BattleframeShieldGenerator).exists(_.Enabled) && obj.Shields > 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2056,7 +2056,7 @@ object GlobalDefinitionsProjectile {
|
||||||
aphelion_plasma_rocket_projectile.DamageAtEdge = .1f
|
aphelion_plasma_rocket_projectile.DamageAtEdge = .1f
|
||||||
aphelion_plasma_rocket_projectile.DamageRadius = 3f
|
aphelion_plasma_rocket_projectile.DamageRadius = 3f
|
||||||
aphelion_plasma_rocket_projectile.ProjectileDamageType = DamageType.Splash
|
aphelion_plasma_rocket_projectile.ProjectileDamageType = DamageType.Splash
|
||||||
aphelion_plasma_rocket_projectile.DamageProxy = 96 //aphelion_plama_cloud
|
//aphelion_plasma_rocket_projectile.DamageProxy = 96 //aphelion_plama_cloud
|
||||||
aphelion_plasma_rocket_projectile.InitialVelocity = 75
|
aphelion_plasma_rocket_projectile.InitialVelocity = 75
|
||||||
aphelion_plasma_rocket_projectile.Lifespan = 5f
|
aphelion_plasma_rocket_projectile.Lifespan = 5f
|
||||||
ProjectileDefinition.CalculateDerivedFields(aphelion_plasma_rocket_projectile)
|
ProjectileDefinition.CalculateDerivedFields(aphelion_plasma_rocket_projectile)
|
||||||
|
|
@ -2221,7 +2221,7 @@ object GlobalDefinitionsProjectile {
|
||||||
peregrine_particle_cannon_projectile.DamageAtEdge = 0.1f
|
peregrine_particle_cannon_projectile.DamageAtEdge = 0.1f
|
||||||
peregrine_particle_cannon_projectile.DamageRadius = 3f
|
peregrine_particle_cannon_projectile.DamageRadius = 3f
|
||||||
peregrine_particle_cannon_projectile.ProjectileDamageType = DamageType.Splash
|
peregrine_particle_cannon_projectile.ProjectileDamageType = DamageType.Splash
|
||||||
peregrine_particle_cannon_projectile.DamageProxy = 655 //peregrine_particle_cannon_radiation_cloud
|
//peregrine_particle_cannon_projectile.DamageProxy = 655 //peregrine_particle_cannon_radiation_cloud
|
||||||
peregrine_particle_cannon_projectile.InitialVelocity = 500
|
peregrine_particle_cannon_projectile.InitialVelocity = 500
|
||||||
peregrine_particle_cannon_projectile.Lifespan = .6f
|
peregrine_particle_cannon_projectile.Lifespan = .6f
|
||||||
ProjectileDefinition.CalculateDerivedFields(peregrine_particle_cannon_projectile)
|
ProjectileDefinition.CalculateDerivedFields(peregrine_particle_cannon_projectile)
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ object GlobalDefinitionsVehicle {
|
||||||
restriction = MaxOnly
|
restriction = MaxOnly
|
||||||
}
|
}
|
||||||
|
|
||||||
val controlSubsystem = List(VehicleSubsystemEntry.Controls)
|
val controlSubsystem: List[VehicleSubsystemEntry] = List(VehicleSubsystemEntry.Controls)
|
||||||
|
|
||||||
fury.Name = "fury"
|
fury.Name = "fury"
|
||||||
fury.MaxHealth = 650
|
fury.MaxHealth = 650
|
||||||
|
|
@ -1162,7 +1162,7 @@ object GlobalDefinitionsVehicle {
|
||||||
bailable = true
|
bailable = true
|
||||||
}
|
}
|
||||||
|
|
||||||
val flightSubsystems = List(VehicleSubsystemEntry.Controls, VehicleSubsystemEntry.Ejection)
|
val flightSubsystems: List[VehicleSubsystemEntry] = List(VehicleSubsystemEntry.Controls, VehicleSubsystemEntry.Ejection)
|
||||||
|
|
||||||
val variantConverter = new VariantVehicleConverter
|
val variantConverter = new VariantVehicleConverter
|
||||||
mosquito.Name = "mosquito"
|
mosquito.Name = "mosquito"
|
||||||
|
|
@ -1684,20 +1684,20 @@ object GlobalDefinitionsVehicle {
|
||||||
bailable = true
|
bailable = true
|
||||||
}
|
}
|
||||||
val normalSeat = new SeatDefinition()
|
val normalSeat = new SeatDefinition()
|
||||||
val bfrSubsystems = List(
|
val bfrSubsystems: List[VehicleSubsystemEntry] = List(
|
||||||
VehicleSubsystemEntry.BattleframeMovementServos,
|
// VehicleSubsystemEntry.BattleframeMovementServos,
|
||||||
VehicleSubsystemEntry.BattleframeSensorArray,
|
// VehicleSubsystemEntry.BattleframeSensorArray,
|
||||||
VehicleSubsystemEntry.BattleframeShieldGenerator,
|
VehicleSubsystemEntry.BattleframeShieldGenerator//,
|
||||||
VehicleSubsystemEntry.BattleframeTrunk
|
// VehicleSubsystemEntry.BattleframeTrunk
|
||||||
)
|
)
|
||||||
val bfrGunnerSubsystems = List(
|
val bfrGunnerSubsystems: List[VehicleSubsystemEntry] = List(
|
||||||
VehicleSubsystemEntry.BattleframeLeftArm,
|
VehicleSubsystemEntry.BattleframeLeftArm,
|
||||||
VehicleSubsystemEntry.BattleframeRightArm,
|
VehicleSubsystemEntry.BattleframeRightArm//,
|
||||||
VehicleSubsystemEntry.BattleframeLeftWeapon,
|
// VehicleSubsystemEntry.BattleframeLeftWeapon,
|
||||||
VehicleSubsystemEntry.BattleframeRightWeapon,
|
// VehicleSubsystemEntry.BattleframeRightWeapon,
|
||||||
VehicleSubsystemEntry.BattleframeGunnerWeapon
|
// VehicleSubsystemEntry.BattleframeGunnerWeapon
|
||||||
) ++ bfrSubsystems
|
) ++ bfrSubsystems
|
||||||
val bfrFlightSubsystems = List(
|
val bfrFlightSubsystems: List[VehicleSubsystemEntry] = List(
|
||||||
VehicleSubsystemEntry.BattleframeFlightLeftArm,
|
VehicleSubsystemEntry.BattleframeFlightLeftArm,
|
||||||
VehicleSubsystemEntry.BattleframeFlightRightArm,
|
VehicleSubsystemEntry.BattleframeFlightRightArm,
|
||||||
VehicleSubsystemEntry.BattleframeFlightLeftWeapon,
|
VehicleSubsystemEntry.BattleframeFlightLeftWeapon,
|
||||||
|
|
@ -1735,7 +1735,7 @@ object GlobalDefinitionsVehicle {
|
||||||
aphelion_gunner.AutoPilotSpeeds = (5, 1)
|
aphelion_gunner.AutoPilotSpeeds = (5, 1)
|
||||||
aphelion_gunner.Packet = battleFrameConverter
|
aphelion_gunner.Packet = battleFrameConverter
|
||||||
aphelion_gunner.DestroyedModel = None
|
aphelion_gunner.DestroyedModel = None
|
||||||
aphelion_gunner.destructionDelay = Some(4000L)
|
//aphelion_gunner.destructionDelay = Some(4000L)
|
||||||
aphelion_gunner.JackingDuration = Array(0, 62, 60, 30)
|
aphelion_gunner.JackingDuration = Array(0, 62, 60, 30)
|
||||||
aphelion_gunner.RadiationShielding = 0.5f
|
aphelion_gunner.RadiationShielding = 0.5f
|
||||||
aphelion_gunner.DamageUsing = DamageCalculations.AgainstBfr
|
aphelion_gunner.DamageUsing = DamageCalculations.AgainstBfr
|
||||||
|
|
@ -1787,7 +1787,7 @@ object GlobalDefinitionsVehicle {
|
||||||
colossus_gunner.AutoPilotSpeeds = (5, 1)
|
colossus_gunner.AutoPilotSpeeds = (5, 1)
|
||||||
colossus_gunner.Packet = battleFrameConverter
|
colossus_gunner.Packet = battleFrameConverter
|
||||||
colossus_gunner.DestroyedModel = None
|
colossus_gunner.DestroyedModel = None
|
||||||
colossus_gunner.destructionDelay = Some(4000L)
|
//colossus_gunner.destructionDelay = Some(4000L)
|
||||||
colossus_gunner.JackingDuration = Array(0, 62, 60, 30)
|
colossus_gunner.JackingDuration = Array(0, 62, 60, 30)
|
||||||
colossus_gunner.RadiationShielding = 0.5f
|
colossus_gunner.RadiationShielding = 0.5f
|
||||||
colossus_gunner.DamageUsing = DamageCalculations.AgainstBfr
|
colossus_gunner.DamageUsing = DamageCalculations.AgainstBfr
|
||||||
|
|
@ -1839,7 +1839,7 @@ object GlobalDefinitionsVehicle {
|
||||||
peregrine_gunner.AutoPilotSpeeds = (5, 1)
|
peregrine_gunner.AutoPilotSpeeds = (5, 1)
|
||||||
peregrine_gunner.Packet = battleFrameConverter
|
peregrine_gunner.Packet = battleFrameConverter
|
||||||
peregrine_gunner.DestroyedModel = None
|
peregrine_gunner.DestroyedModel = None
|
||||||
peregrine_gunner.destructionDelay = Some(4000L)
|
//peregrine_gunner.destructionDelay = Some(4000L)
|
||||||
peregrine_gunner.JackingDuration = Array(0, 62, 60, 30)
|
peregrine_gunner.JackingDuration = Array(0, 62, 60, 30)
|
||||||
peregrine_gunner.RadiationShielding = 0.5f
|
peregrine_gunner.RadiationShielding = 0.5f
|
||||||
peregrine_gunner.DamageUsing = DamageCalculations.AgainstBfr
|
peregrine_gunner.DamageUsing = DamageCalculations.AgainstBfr
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@ sealed abstract class VehicleSubsystemConditionModifier(
|
||||||
) extends IntEnumEntry
|
) extends IntEnumEntry
|
||||||
|
|
||||||
object VehicleSubsystemConditionModifier extends IntEnum[VehicleSubsystemConditionModifier] {
|
object VehicleSubsystemConditionModifier extends IntEnum[VehicleSubsystemConditionModifier] {
|
||||||
val values = findValues
|
val values: IndexedSeq[VehicleSubsystemConditionModifier] = findValues
|
||||||
|
|
||||||
case object Off extends VehicleSubsystemConditionModifier(value = 1065353216, multiplier = 0f, addend = 0)
|
case object Off extends VehicleSubsystemConditionModifier(value = 1065353216, multiplier = 0f, addend = 0)
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -134,7 +134,7 @@ class BfrControl(vehicle: Vehicle)
|
||||||
item.asInstanceOf[Tool],
|
item.asInstanceOf[Tool],
|
||||||
dimorph.transform(Handiness.Generic).asInstanceOf[ToolDefinition]
|
dimorph.transform(Handiness.Generic).asInstanceOf[ToolDefinition]
|
||||||
)
|
)
|
||||||
case _ => ; //no dimorphic entry; place as-is
|
case _ => () //no dimorphic entry; place as-is
|
||||||
}
|
}
|
||||||
val guid0 = PlanetSideGUID(0)
|
val guid0 = PlanetSideGUID(0)
|
||||||
//if the weapon arm is disabled, enable it for later (makes life easy)
|
//if the weapon arm is disabled, enable it for later (makes life easy)
|
||||||
|
|
@ -173,7 +173,8 @@ class BfrControl(vehicle: Vehicle)
|
||||||
override def dismountCleanup(seatBeingDismounted: Int, player: Player): Unit = {
|
override def dismountCleanup(seatBeingDismounted: Int, player: Player): Unit = {
|
||||||
super.dismountCleanup(seatBeingDismounted, player)
|
super.dismountCleanup(seatBeingDismounted, player)
|
||||||
if (!vehicle.Seats.values.exists(_.isOccupied)) {
|
if (!vehicle.Seats.values.exists(_.isOccupied)) {
|
||||||
vehicle.Subsystems(VehicleSubsystemEntry.BattleframeShieldGenerator) match {
|
vehicle
|
||||||
|
.Subsystems(VehicleSubsystemEntry.BattleframeShieldGenerator) match {
|
||||||
case Some(subsys) =>
|
case Some(subsys) =>
|
||||||
if (vehicle.Shields > 0) {
|
if (vehicle.Shields > 0) {
|
||||||
vehicleSubsystemMessages(
|
vehicleSubsystemMessages(
|
||||||
|
|
@ -190,7 +191,7 @@ class BfrControl(vehicle: Vehicle)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
case _ => ;
|
case _ => ()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -203,7 +204,7 @@ class BfrControl(vehicle: Vehicle)
|
||||||
if !subsys.Enabled && vehicle.Shields > 0 && subsys.Enabled_=(state = true) =>
|
if !subsys.Enabled && vehicle.Shields > 0 && subsys.Enabled_=(state = true) =>
|
||||||
//if the shield is damaged, it does not turn on until the damaged is cleared
|
//if the shield is damaged, it does not turn on until the damaged is cleared
|
||||||
vehicleSubsystemMessages(subsys.changedMessages(vehicle))
|
vehicleSubsystemMessages(subsys.changedMessages(vehicle))
|
||||||
case _ => ;
|
case _ => ()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -425,9 +426,9 @@ class BfrControl(vehicle: Vehicle)
|
||||||
zone.id,
|
zone.id,
|
||||||
VehicleAction.GenericObjectAction(doNotSendTo, useThisGuid, action)
|
VehicleAction.GenericObjectAction(doNotSendTo, useThisGuid, action)
|
||||||
)
|
)
|
||||||
case _ => ;
|
case _ => ()
|
||||||
}
|
}
|
||||||
case _ => ;
|
case _ => ()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -602,7 +603,7 @@ class BfrControl(vehicle: Vehicle)
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
case _ => ;
|
case _ => ()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -58,20 +58,20 @@ class BfrFlightControl(vehicle: Vehicle)
|
||||||
case Some(drain) if localFlyingValue.isEmpty =>
|
case Some(drain) if localFlyingValue.isEmpty =>
|
||||||
//shields off
|
//shields off
|
||||||
disableShield()
|
disableShield()
|
||||||
vehicle.Subsystems(VehicleSubsystemEntry.BattleframeShieldGenerator).get.Enabled = false
|
vehicle.Subsystems(VehicleSubsystemEntry.BattleframeShieldGenerator).map(s => s.Enabled = false)
|
||||||
vehicle.Shields -= drain
|
vehicle.Shields -= drain
|
||||||
showShieldCharge()
|
showShieldCharge()
|
||||||
case None if localFlyingValue.isEmpty =>
|
case None if localFlyingValue.isEmpty =>
|
||||||
//shields off
|
//shields off
|
||||||
disableShield()
|
disableShield()
|
||||||
vehicle.Subsystems(VehicleSubsystemEntry.BattleframeShieldGenerator).get.Enabled = false
|
vehicle.Subsystems(VehicleSubsystemEntry.BattleframeShieldGenerator).map(s => s.Enabled = false)
|
||||||
case Some(drain) =>
|
case Some(drain) =>
|
||||||
vehicle.Shields -= drain
|
vehicle.Shields -= drain
|
||||||
showShieldCharge()
|
showShieldCharge()
|
||||||
case _ => ;
|
case _ => ;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (vehicle.Subsystems(VehicleSubsystemEntry.BattleframeFlightPod).get.Jammed) {
|
if (vehicle.Subsystems(VehicleSubsystemEntry.BattleframeFlightPod).exists(_.Jammed)) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -79,7 +79,7 @@ class BfrFlightControl(vehicle: Vehicle)
|
||||||
if (flying.nonEmpty) {
|
if (flying.nonEmpty) {
|
||||||
flying = None
|
flying = None
|
||||||
vehicle.Flying = None
|
vehicle.Flying = None
|
||||||
vehicle.Subsystems(VehicleSubsystemEntry.BattleframeShieldGenerator).get.Enabled = true
|
vehicle.Subsystems(VehicleSubsystemEntry.BattleframeShieldGenerator).map(s => s.Enabled = true)
|
||||||
if (vehicle.Shields > 0) {
|
if (vehicle.Shields > 0) {
|
||||||
enableShield()
|
enableShield()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -354,7 +354,7 @@ object ResolutionCalculations {
|
||||||
{
|
{
|
||||||
data.cause.source.DamageToBattleframeOnly ||
|
data.cause.source.DamageToBattleframeOnly ||
|
||||||
data.cause.source.DamageToVehicleOnly ||
|
data.cause.source.DamageToVehicleOnly ||
|
||||||
!obj.Subsystems(VehicleSubsystemEntry.BattleframeShieldGenerator).get.Enabled ||
|
!obj.Subsystems(VehicleSubsystemEntry.BattleframeShieldGenerator).exists(_.Enabled) ||
|
||||||
obj.Shields == 0
|
obj.Shields == 0
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue