Compare commits

...

2 Commits

Author SHA1 Message Date
Anna fcbc3bc9f4
fix: update to 6.0 2021-12-18 19:52:01 -05:00
Anna 8e7439a30e
chore: fix repo url 2021-12-08 06:16:02 -05:00
6 changed files with 14 additions and 12 deletions

View File

@ -25,7 +25,7 @@ namespace Tourist {
public GameFunctions(Plugin plugin) {
this.Plugin = plugin;
var vistaUnlockedPtr = this.Plugin.SigScanner.ScanText("E8 ?? ?? ?? ?? E9 ?? ?? ?? ?? 41 8B CD E8 ?? ?? ?? ??");
var vistaUnlockedPtr = this.Plugin.SigScanner.ScanText("E8 ?? ?? ?? ?? E9 ?? ?? ?? ?? 41 8B CD E8");
this.VistaUnlockedHook = new Hook<VistaUnlockedDelegate>(vistaUnlockedPtr, this.OnVistaUnlock);
this.VistaUnlockedHook.Enable();

View File

@ -61,7 +61,7 @@ namespace Tourist {
row += 1;
if (adventure.Level.Value.Territory.Row != territory) {
if (adventure.Level.Value!.Territory.Row != territory) {
continue;
}

View File

@ -135,7 +135,7 @@ namespace Tourist {
.Select(adventure => (idx: adventure.RowId - first, adventure))
.OrderBy(entry => this.Plugin.Config.SortMode switch {
SortMode.Number => entry.idx,
SortMode.Zone => entry.adventure.Level.Value.Map.Row,
SortMode.Zone => entry.adventure.Level.Value!.Map.Row,
_ => throw new ArgumentOutOfRangeException(),
});
@ -143,7 +143,7 @@ namespace Tourist {
var lastTree = false;
foreach (var (idx, adventure) in adventures) {
if (this.Plugin.Config.OnlyShowCurrentZone && adventure.Level.Value.Territory.Row != this.Plugin.ClientState.TerritoryType) {
if (this.Plugin.Config.OnlyShowCurrentZone && adventure.Level.Value!.Territory.Row != this.Plugin.ClientState.TerritoryType) {
continue;
}
@ -160,13 +160,13 @@ namespace Tourist {
}
if (this.Plugin.Config.SortMode == SortMode.Zone) {
var map = adventure.Level.Value.Map.Value;
var map = adventure.Level.Value!.Map.Value;
if (lastMap != map) {
if (lastMap != null) {
ImGui.TreePop();
}
lastTree = ImGui.CollapsingHeader($"{map.PlaceName.Value.Name}");
lastTree = ImGui.CollapsingHeader($"{map!.PlaceName.Value!.Name}");
ImGui.TreePush();
}
@ -212,7 +212,7 @@ namespace Tourist {
ImGui.TextUnformatted("Command");
ImGui.NextColumn();
ImGui.TextUnformatted(adventure.Emote.Value.TextCommand.Value.Command);
ImGui.TextUnformatted(adventure.Emote.Value?.TextCommand.Value?.Command ?? "<unk>");
ImGui.NextColumn();
ImGui.TextUnformatted("Eorzea time");
@ -233,6 +233,8 @@ namespace Tourist {
var weatherString = string.Join(", ", weathers
.OrderBy(id => id)
.Select(id => this.Plugin.DataManager.GetExcelSheet<Weather>()!.GetRow(id))
.Where(weather => weather != null)
.Cast<Weather>()
.Select(weather => weather.Name));
ImGui.TextUnformatted(weatherString);
} else {

View File

@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<Version>1.2.4</Version>
<Version>1.2.5</Version>
<TargetFramework>net5-windows</TargetFramework>
<LangVersion>latest</LangVersion>
<Nullable>enable</Nullable>
@ -34,8 +34,8 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="DalamudPackager" Version="2.1.2"/>
<PackageReference Include="FFXIVWeather.Lumina" Version="1.2.2"/>
<PackageReference Include="DalamudPackager" Version="2.1.5"/>
<PackageReference Include="FFXIVWeather.Lumina" Version="2.0.0"/>
</ItemGroup>
<ItemGroup>

View File

@ -11,4 +11,4 @@ description: |-
- Show the command needed for each vista
Icon: sightseeing by muhammad from the Noun Project
repo_url: https://git.sr.ht/~jkcclemens/Tourist
repo_url: https://git.annaclemens.io/ascclemens/Tourist

View File

@ -170,7 +170,7 @@ namespace Tourist {
return true;
}
var (weather, _) = service.GetCurrentWeather(adventure.Level.Value.Territory.Value, offset);
var (weather, _) = service.GetCurrentWeather(adventure.Level.Value!.Territory.Value, offset);
return weathers.Contains(weather.RowId);
}