Correctly show ANT capacitor on zoning (#504)

* Correctly show ANT capacitor on zoning

* Remove log

* Move vehicle shields / ntu capacitor packets to HandleSetCurrentAvatar
This commit is contained in:
Mazo 2020-07-03 01:16:56 +01:00 committed by GitHub
parent fa7342264e
commit 88b194fde2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 23 additions and 9 deletions

View file

@ -209,6 +209,14 @@ class Vehicle(private val vehicleDef : VehicleDefinition) extends AmenityOwner
NtuCapacitor
}
def NtuCapacitorScaled : Int = {
if(Definition.MaxNtuCapacitor > 0) {
scala.math.ceil((NtuCapacitor.toFloat / Definition.MaxNtuCapacitor.toFloat) * 10).toInt
} else {
0
}
}
def Capacitor : Int = capacitor
def Capacitor_=(value: Int) : Int = {