refactor: update for api 9
This commit is contained in:
parent
3ab9670da1
commit
89cfed4300
|
@ -6,12 +6,12 @@ using System.Linq;
|
|||
using System.Net.Http;
|
||||
using System.Net.Http.Headers;
|
||||
using System.Threading.Tasks;
|
||||
using Dalamud.Game;
|
||||
using Dalamud.Game.Gui.PartyFinder.Types;
|
||||
using Dalamud.Logging;
|
||||
using Dalamud.Plugin.Services;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace RemotePartyFinder {
|
||||
namespace RemotePartyFinder;
|
||||
|
||||
internal class Gatherer : IDisposable {
|
||||
#if DEBUG
|
||||
private const string UploadUrl = "http://192.168.174.240:7878/contribute/multiple";
|
||||
|
@ -47,7 +47,7 @@ namespace RemotePartyFinder {
|
|||
this.Batches[args.BatchNumber].Add(listing);
|
||||
}
|
||||
|
||||
private void OnUpdate(Framework framework) {
|
||||
private void OnUpdate(IFramework framework1) {
|
||||
if (this.UploadTimer.Elapsed < TimeSpan.FromSeconds(10)) {
|
||||
return;
|
||||
}
|
||||
|
@ -65,9 +65,8 @@ namespace RemotePartyFinder {
|
|||
Headers = { ContentType = MediaTypeHeaderValue.Parse("application/json") },
|
||||
});
|
||||
var output = await resp.Content.ReadAsStringAsync();
|
||||
PluginLog.Log(output);
|
||||
Plugin.Log.Info(output);
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,17 +1,18 @@
|
|||
using Dalamud.Game;
|
||||
using Dalamud.Game.Gui.PartyFinder;
|
||||
using Dalamud.IoC;
|
||||
using Dalamud.IoC;
|
||||
using Dalamud.Plugin;
|
||||
using Dalamud.Plugin.Services;
|
||||
|
||||
namespace RemotePartyFinder;
|
||||
|
||||
namespace RemotePartyFinder {
|
||||
public class Plugin : IDalamudPlugin {
|
||||
public string Name => "Remote Party Finder";
|
||||
[PluginService]
|
||||
internal static IPluginLog Log { get; private set; }
|
||||
|
||||
[PluginService]
|
||||
internal Framework Framework { get; private init; }
|
||||
internal IFramework Framework { get; private init; }
|
||||
|
||||
[PluginService]
|
||||
internal PartyFinderGui PartyFinderGui { get; private init; }
|
||||
internal IPartyFinderGui PartyFinderGui { get; private init; }
|
||||
|
||||
private Gatherer Gatherer { get; }
|
||||
|
||||
|
@ -23,4 +24,3 @@ namespace RemotePartyFinder {
|
|||
this.Gatherer.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,7 +5,8 @@ using Dalamud.Game.Gui.PartyFinder.Types;
|
|||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Serialization;
|
||||
|
||||
namespace RemotePartyFinder {
|
||||
namespace RemotePartyFinder;
|
||||
|
||||
[Serializable]
|
||||
[JsonObject(NamingStrategyType = typeof(SnakeCaseNamingStrategy))]
|
||||
internal class UploadableListing {
|
||||
|
@ -69,4 +70,3 @@ namespace RemotePartyFinder {
|
|||
this.Accepting = slot.Accepting.Aggregate((JobFlags) 0, (agg, flag) => agg | flag);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,7 +3,8 @@ using Pidgin;
|
|||
using static Pidgin.Parser;
|
||||
using static Pidgin.Parser<char>;
|
||||
|
||||
namespace SourceGenerator {
|
||||
namespace SourceGenerator;
|
||||
|
||||
internal static class AutoTranslate {
|
||||
internal static Parser<char, (string name, Maybe<IEnumerable<ISelectorPart>> selector)> Parser() {
|
||||
var sheetName = Any
|
||||
|
@ -82,4 +83,3 @@ namespace SourceGenerator {
|
|||
this.Column = column;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -10,7 +10,8 @@ using Lumina.Excel.GeneratedSheets;
|
|||
using Lumina.Text;
|
||||
using Pidgin;
|
||||
|
||||
namespace SourceGenerator {
|
||||
namespace SourceGenerator;
|
||||
|
||||
internal class Program {
|
||||
private static void Main(string[] args) {
|
||||
var data = new Dictionary<Language, GameData>(4);
|
||||
|
@ -458,4 +459,3 @@ namespace SourceGenerator {
|
|||
return sb.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,7 +2,8 @@
|
|||
using Lumina.Text;
|
||||
using Lumina.Text.Payloads;
|
||||
|
||||
namespace SourceGenerator {
|
||||
namespace SourceGenerator;
|
||||
|
||||
internal static class SeStringExtensions {
|
||||
internal static string TextValue(this SeString str) {
|
||||
var payloads = str.Payloads
|
||||
|
@ -34,4 +35,3 @@ namespace SourceGenerator {
|
|||
return string.Join("", payloads);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue