Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/karashiiro/ffxivweather.lumina

FFXIV weather forecast library for C# applications operating on a system with a local game installation.
https://github.com/karashiiro/ffxivweather.lumina

ffxiv lumina weather

Last synced: 2 days ago
JSON representation

FFXIV weather forecast library for C# applications operating on a system with a local game installation.

Awesome Lists containing this project

README

        

# FFXIVWeather
FFXIV weather forecast library for C# applications operating on a system with a local game installation. Preferable over the regular version of the package due to its much smaller file size and no need of updating each patch.

## Installation
`Install-Package FFXIVWeather.Lumina` or other methods as described [here](https://www.nuget.org/packages/FFXIVWeather.Lumina/).

## Example
Code:
```cs
var lumina = new Lumina.Lumina(pathToGameFolder, new Lumina.LuminaOptions
{
DefaultExcelLanguage = Lumina.Data.Language.English
});
var weatherService = new FFXIVWeatherLuminaService(lumina);
var zone = "Eureka Pyros";
var count = 15U;

var forecast = weatherService.GetForecast(zone, count);

Console.WriteLine($"Weather for {zone}:");
Console.WriteLine("|\tWeather\t\t|\tTime\t|");
Console.WriteLine("+-----------------------+---------------+");
foreach (var (weather, startTime) in forecast)
{
Console.WriteLine($"|\t{(((string)weather.Name).Length < 8 ? weather.Name + '\t' : weather.Name)}\t|\t{Math.Round((startTime - DateTime.UtcNow).TotalMinutes)}m\t|");
}
```

Output:
```
Weather for Eureka Pyros:
| Weather | Time |
+-----------------------+---------------+
| Umbral Wind | -3m |
| Blizzards | 20m |
| Thunder | 43m |
| Umbral Wind | 67m |
| Umbral Wind | 90m |
| Blizzards | 113m |
| Thunder | 137m |
| Heat Waves | 160m |
| Umbral Wind | 183m |
| Blizzards | 207m |
| Heat Waves | 230m |
| Thunder | 253m |
| Blizzards | 277m |
| Umbral Wind | 300m |
| Thunder | 323m |
```