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); }
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}"); } }
public IEnumerable <ConceptPreflightCheckResult> Errors() { return(PreflightCheck.Errors()); }
public RocketPreflightComplete(NitroxId id, PreflightCheck flightCheck) { Id = id; FlightCheck = flightCheck; }