Exemplo n.º 1
0
        public static void Prefix(RocketPreflightCheckManager __instance, PreflightCheck completeCheck)
        {
            Rocket   rocket = __instance.gameObject.RequireComponentInParent <Rocket>();
            NitroxId id     = NitroxEntity.GetId(rocket.gameObject);

            NitroxServiceLocator.LocateService <Rockets>().CompletePreflightCheck(id, completeCheck);
        }
Exemplo n.º 2
0
        public void CompletePreflightCheck(NitroxId id, PreflightCheck preflightCheck)
        {
            Optional <NeptuneRocketModel> model = vehicles.TryGetVehicle <NeptuneRocketModel>(id);

            if (model.HasValue)
            {
                model.Value.PreflightChecks?.Add(preflightCheck);
                packetSender.Send(new RocketPreflightComplete(id, preflightCheck));
            }
            else
            {
                Log.Error($"{nameof(Rockets.CompletePreflightCheck)}: Can't find model for rocket with id {id}");
            }
        }
Exemplo n.º 3
0
 public IEnumerable <ConceptPreflightCheckResult> Errors()
 {
     return(PreflightCheck.Errors());
 }
Exemplo n.º 4
0
 public RocketPreflightComplete(NitroxId id, PreflightCheck flightCheck)
 {
     Id          = id;
     FlightCheck = flightCheck;
 }