コード例 #1
0
        public static TransportSystemDefinition from(VehicleInfo info)
        {
            if (info == null)
            {
                return(default(TransportSystemDefinition));
            }
            var result = availableDefinitions.Keys.FirstOrDefault(x => x.subService == info.m_class.m_subService && x.vehicleType == info.m_vehicleType && TLMUtils.HasField(info.GetAI(), "m_transportInfo") && TLMUtils.GetPrivateField <TransportInfo>(info.GetAI(), "m_transportInfo").m_transportType == x.transportType);

            return(result);
        }
コード例 #2
0
 public bool isFromSystem(VehicleInfo info)
 {
     return(info.m_class.m_subService == subService && info.m_vehicleType == vehicleType && TLMUtils.HasField(info.GetAI(), "m_passengerCapacity"));
 }
コード例 #3
0
 public bool isFromSystem(VehicleInfo info)
 {
     return(info.m_class.m_subService == subService && info.m_vehicleType == vehicleType && TLMUtils.HasField(info.GetAI(), "m_transportInfo") && TLMUtils.GetPrivateField <TransportInfo>(info.GetAI(), "m_transportInfo").m_transportType == transportType && TLMUtils.HasField(info.GetAI(), "m_passengerCapacity"));
 }