mirror of
https://github.com/2revoemag/PSF-BotServer.git
synced 2026-07-12 06:55:10 +00:00
Add capacitor / max capacitor values to vehicles
This commit is contained in:
parent
8a2896f434
commit
2d2788383c
4 changed files with 24 additions and 1 deletions
|
|
@ -2705,6 +2705,7 @@ object GlobalDefinitions {
|
||||||
ant.DeployTime = 1500
|
ant.DeployTime = 1500
|
||||||
ant.UndeployTime = 1500
|
ant.UndeployTime = 1500
|
||||||
ant.AutoPilotSpeeds = (18, 6)
|
ant.AutoPilotSpeeds = (18, 6)
|
||||||
|
ant.MaximumCapacitor = 1500
|
||||||
ant.Packet = utilityConverter
|
ant.Packet = utilityConverter
|
||||||
|
|
||||||
ams.Name = "ams"
|
ams.Name = "ams"
|
||||||
|
|
|
||||||
|
|
@ -47,6 +47,7 @@ class Vehicle(private val vehicleDef : VehicleDefinition) extends PlanetSideServ
|
||||||
private var trunkAccess : Option[PlanetSideGUID] = None
|
private var trunkAccess : Option[PlanetSideGUID] = None
|
||||||
private var jammered : Boolean = false
|
private var jammered : Boolean = false
|
||||||
private var cloaked : Boolean = false
|
private var cloaked : Boolean = false
|
||||||
|
private var capacitor : Int = 0
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Permissions control who gets to access different parts of the vehicle;
|
* Permissions control who gets to access different parts of the vehicle;
|
||||||
|
|
@ -147,6 +148,19 @@ class Vehicle(private val vehicleDef : VehicleDefinition) extends PlanetSideServ
|
||||||
Cloaked
|
Cloaked
|
||||||
}
|
}
|
||||||
|
|
||||||
|
def Capacitor : Int = capacitor
|
||||||
|
|
||||||
|
def Capacitor_=(value: Int) : Int = {
|
||||||
|
if(value > Definition.MaximumCapacitor) {
|
||||||
|
capacitor = Definition.MaximumCapacitor
|
||||||
|
} else if (value < 0) {
|
||||||
|
capacitor = 0
|
||||||
|
} else {
|
||||||
|
capacitor = value
|
||||||
|
}
|
||||||
|
Capacitor
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Given the index of an entry mounting point, return the infantry-accessible `Seat` associated with it.
|
* Given the index of an entry mounting point, return the infantry-accessible `Seat` associated with it.
|
||||||
* @param mountPoint an index representing the seat position / mounting point
|
* @param mountPoint an index representing the seat position / mounting point
|
||||||
|
|
|
||||||
|
|
@ -29,6 +29,7 @@ class VehicleDefinition(objectId : Int) extends ObjectDefinition(objectId) {
|
||||||
private var canCloak : Boolean = false
|
private var canCloak : Boolean = false
|
||||||
private var canBeOwned : Boolean = true
|
private var canBeOwned : Boolean = true
|
||||||
private var serverVehicleOverrideSpeeds : (Int, Int) = (0, 0)
|
private var serverVehicleOverrideSpeeds : (Int, Int) = (0, 0)
|
||||||
|
private var maximumCapacitor : Int = 0
|
||||||
Name = "vehicle"
|
Name = "vehicle"
|
||||||
Packet = VehicleDefinition.converter
|
Packet = VehicleDefinition.converter
|
||||||
|
|
||||||
|
|
@ -114,6 +115,13 @@ class VehicleDefinition(objectId : Int) extends ObjectDefinition(objectId) {
|
||||||
def AutoPilotSpeed1 : Int = serverVehicleOverrideSpeeds._1
|
def AutoPilotSpeed1 : Int = serverVehicleOverrideSpeeds._1
|
||||||
|
|
||||||
def AutoPilotSpeed2 : Int = serverVehicleOverrideSpeeds._2
|
def AutoPilotSpeed2 : Int = serverVehicleOverrideSpeeds._2
|
||||||
|
|
||||||
|
def MaximumCapacitor : Int = maximumCapacitor
|
||||||
|
|
||||||
|
def MaximumCapacitor_=(maxCapacitor: Int) : Int = {
|
||||||
|
maximumCapacitor = maxCapacitor
|
||||||
|
MaximumCapacitor
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
object VehicleDefinition {
|
object VehicleDefinition {
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ class Building(private val mapId : Int, private val zone : Zone, private val bui
|
||||||
/**
|
/**
|
||||||
* The mapId is the identifier number used in BuildingInfoUpdateMessage.
|
* The mapId is the identifier number used in BuildingInfoUpdateMessage.
|
||||||
* The modelId is the identifier number used in SetEmpireMessage / Facility hacking / PlanetSideAttributeMessage.
|
* The modelId is the identifier number used in SetEmpireMessage / Facility hacking / PlanetSideAttributeMessage.
|
||||||
*/
|
*/
|
||||||
private var modelId : Option[Int] = None
|
private var modelId : Option[Int] = None
|
||||||
private var faction : PlanetSideEmpire.Value = PlanetSideEmpire.NEUTRAL
|
private var faction : PlanetSideEmpire.Value = PlanetSideEmpire.NEUTRAL
|
||||||
private var amenities : List[Amenity] = List.empty
|
private var amenities : List[Amenity] = List.empty
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue