This commit is contained in:
Anna 2022-09-04 16:39:09 -04:00
parent 483ed30ca4
commit c8d6af01d8
3 changed files with 10 additions and 7 deletions

View File

@ -18,7 +18,9 @@ internal class Messages : IDisposable {
internal Messages(Plugin plugin) {
this.Plugin = plugin;
this.SpawnVfx();
if (this.Plugin.Config.ApiKey != string.Empty) {
this.SpawnVfx();
}
this.Plugin.Framework.Update += this.HandleSpawnQueue;
this.Plugin.ClientState.Login += this.SpawnVfx;

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Version>1.0.0</Version>
<Version>1.0.1</Version>
<TargetFramework>net6.0-windows</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>

View File

@ -33,19 +33,20 @@ public class Plugin : IDalamudPlugin {
public Plugin() {
this.Config = this.Interface!.GetPluginConfig() as Configuration ?? new Configuration();
this.Vfx = new Vfx();
this.Messages = new Messages(this);
this.Ui = new PluginUi(this);
this.Commands = new Commands(this);
if (this.Config.ApiKey == string.Empty) {
Task.Run(async () => {
var resp = await new HttpClient().PostAsync("https://tryfingerbuthole.anna.lgbt/account", null);
var key = await resp.Content.ReadAsStringAsync();
this.Config.ApiKey = key;
this.SaveConfig();
this.Messages.SpawnVfx();
});
}
this.Vfx = new Vfx();
this.Messages = new Messages(this);
this.Ui = new PluginUi(this);
this.Commands = new Commands(this);
}
public void Dispose() {