Ignore:
Timestamp:
03/14/22 08:46:34 (2 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
python3
Phase:
public
Message:

Updates for the new crew and passenger handling (re #357)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/rpc.py

    r1032 r1033  
    276276    STATUS_REJECTED = 4
    277277
     278    # Flight type: scheduled
     279    FLIGHT_TYPE_SCHEDULED = 0
     280
     281    # Flight type: VIP
     282    FLIGHT_TYPE_VIP = 1
     283
     284    # Flight type: charter
     285    FLIGHT_TYPE_CHARTER = 2
     286
    278287    # The instructions for the construction
    279288    _instructions = {
    280289        "numPassengers" : int,
    281         "numCrew" : int,
     290        "numChildren" : int,
     291        "numInfants" : int,
     292        "numCabinCrew" : int,
     293        "dowNumCabinCrew" : int,
     294        "numCockpitCrew" : int,
    282295        "bagWeight" : int,
    283296        "cargoWeight" : int,
    284297        "mailWeight" : int,
     298        "flightType" : int,
     299        "dow": int,
     300        "maxPassengers": int,
    285301        "aircraftType" : lambda value: BookedFlight._decodeAircraftType(value),
    286302        "status" : lambda value: BookedFlight._decodeStatus(value)
     
    342358        "bookedFlight" : lambda value: BookedFlight(value),
    343359        "numPassengers" : int,
     360        "numChildren" : int,
     361        "numInfants" : int,
    344362        "fuelUsed" : int,
    345363        "rating" : lambda value: float(value) if value else 0.0
     
    358376        if self.flightTimeEnd<self.flightTimeStart:
    359377            self.flightTimeEnd += 24*60*60
     378
     379        self.totalNumPassengers = self.numPassengers + self.numChildren + self.numInfants
    360380
    361381#---------------------------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.