public static bool Prefix(SpawnerScript __instance, ref int[] s) { if (!GadgetNetwork.MatrixReady && GadgetNetwork.GetTimeSinceConnect() < GadgetNetwork.MatrixTimeout) { __instance.StartCoroutine(GadgetUtils.WaitAndInvoke(RPCMethod, GadgetNetwork.MatrixTimeout - GadgetNetwork.GetTimeSinceConnect(), () => GadgetNetwork.MatrixReady, __instance, s)); return(false); } GadgetNetwork.ConvertIDToLocal(PlanetRegistry.Singleton, ref s[0]); return(true); }
public static bool Prefix(SpawnerScript __instance, ref int[] s) { if (!GadgetNetwork.MatrixReady && GadgetNetwork.GetTimeSinceConnect() < GadgetNetwork.MatrixTimeout) { __instance.StartCoroutine(GadgetUtils.WaitAndInvoke(RPCMethod, GadgetNetwork.MatrixTimeout - GadgetNetwork.GetTimeSinceConnect(), () => GadgetNetwork.MatrixReady, __instance, s)); return(false); } GadgetNetwork.ConvertIDToLocal(null /* WorldRegistry */, ref s[0]); for (int i = 1; i < s.Length; i++) { GadgetNetwork.ConvertIDToLocal(TileRegistry.GetSingleton(), ref s[i]); } return(true); }