Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
NotAdam committed Mar 6, 2021
2 parents 4c10275 + e92eeb9 commit 2786712
Show file tree
Hide file tree
Showing 698 changed files with 15,306 additions and 17,478 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,5 @@ jobs:
# run: dotnet nuget push ./src/Lumina/bin/Release/*.nupkg -k ${{ secrets.GITHUB_TOKEN }} -s https://nuget.pkg.github.com/NotAdam/index.json --skip-duplicate
- name: publish nuget package
# for some cursed reason this fails on windows ???????????
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' && matrix.os == 'ubuntu-latest' }}
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/preview' && matrix.os == 'ubuntu-latest' }}
run: dotnet nuget push ./src/Lumina/bin/Release/*.nupkg -k ${{ secrets.NUGET_API_KEY }} -s https://api.nuget.org/v3/index.json --skip-duplicate
2 changes: 1 addition & 1 deletion src/.idea/.idea.Lumina/.idea/indexLayout.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 0 additions & 8 deletions src/.idea/.idea.Lumina/.idea/modules.xml

This file was deleted.

12 changes: 0 additions & 12 deletions src/.idea/.idea.Lumina/.idea/riderModule.iml

This file was deleted.

13 changes: 0 additions & 13 deletions src/.idea/.idea.Lumina/riderModule.iml

This file was deleted.

8 changes: 2 additions & 6 deletions src/Lumina.Cmd/Commands/ExcelUpdate.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
using System;
using System.Diagnostics;
using System.Linq;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
using CliFx;
using CliFx.Attributes;
using Lumina.Data.Files.Excel;
using Lumina.Data.Structs.Excel;

namespace Lumina.Cmd.Commands
{
Expand All @@ -25,8 +21,8 @@ public class ExcelUpdate : ICommand
public ValueTask ExecuteAsync( IConsole console )
{
var co = console.Output;
var ol = new Lumina( OldPath );
var nl = new Lumina( NewPath );
var ol = new GameData( OldPath );
var nl = new GameData( NewPath );

co.WriteLine( $"old sheets: {ol.Excel.SheetNames.Count} new sheets: {nl.Excel.SheetNames.Count}" );

Expand Down
5 changes: 2 additions & 3 deletions src/Lumina.Cmd/Commands/FileDiff.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using CliFx;
using CliFx.Attributes;
Expand Down Expand Up @@ -28,8 +27,8 @@ public ValueTask ExecuteAsync( IConsole console )
CacheFileResources = false
};

var ol = new Lumina( Path, opts );
var nl = new Lumina( NewPath, opts );
var ol = new GameData( Path, opts );
var nl = new GameData( NewPath, opts );

if( !File.Exists( PathsFile ) )
{
Expand Down
2 changes: 1 addition & 1 deletion src/Lumina.Cmd/Commands/FileExtract.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class FileExtract : ICommand

public ValueTask ExecuteAsync( IConsole console )
{
var lumina = new Lumina( Path );
var lumina = new GameData( Path );

var file = lumina.GetFile( FilePath );

Expand Down
21 changes: 9 additions & 12 deletions src/Lumina.Cmd/Commands/FileInfo.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
using System.Drawing;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using CliFx;
using CliFx.Attributes;
using Lumina.Data;
using Lumina.Data.Files;
using Lumina.Data.Files.Excel;
using Pastel;

namespace Lumina.Cmd.Commands
{
Expand All @@ -23,40 +20,40 @@ public class FileInfo : ICommand
EnvironmentVariableName = "LUMINA_CMD_CLIENT_PATH" )]
public string DataPath { get; set; }

private FileResource LoadResource( Lumina lumina, string path )
private FileResource LoadResource( GameData gameData, string path )
{
var ext = Path.GetExtension( path );

switch( ext )
{
case ".exh":
return lumina.GetFile< ExcelHeaderFile >( path );
return gameData.GetFile< ExcelHeaderFile >( path );

case ".exd":
return lumina.GetFile< ExcelDataFile >( path );
return gameData.GetFile< ExcelDataFile >( path );

case ".exl":
return lumina.GetFile< ExcelListFile >( path );
return gameData.GetFile< ExcelListFile >( path );

case ".imc":
return lumina.GetFile< ImcFile >( path );
return gameData.GetFile< ImcFile >( path );

case ".lgb":
return lumina.GetFile< LgbFile >( path );
return gameData.GetFile< LgbFile >( path );

case ".tex":
return lumina.GetFile< TexFile >( path );
return gameData.GetFile< TexFile >( path );

case ".hwc":
return lumina.GetFile< HwcFile >( path );
return gameData.GetFile< HwcFile >( path );
}

return null;
}

public ValueTask ExecuteAsync( IConsole console )
{
var lumina = new Lumina( DataPath );
var lumina = new GameData( DataPath );

var file = LoadResource( lumina, FilePath );

Expand Down
7 changes: 1 addition & 6 deletions src/Lumina.Cmd/Commands/Repo.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
using System.Drawing;
using System.IO;
using System.Linq;
using System.Threading.Tasks;
using CliFx;
using CliFx.Attributes;
using Lumina.Data;
using Lumina.Data.Files;
using Lumina.Data.Files.Excel;
using Pastel;

namespace Lumina.Cmd.Commands
{
Expand All @@ -22,7 +17,7 @@ public class Repo : ICommand

public ValueTask ExecuteAsync( IConsole console )
{
var lumina = new Lumina( DataPath );
var lumina = new GameData( DataPath );

var totalFiles = 0;

Expand Down
3 changes: 1 addition & 2 deletions src/Lumina.Cmd/Program.cs
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
using System;
using System.Threading.Tasks;
using System.Threading.Tasks;
using CliFx;

namespace Lumina.Cmd
Expand Down
18 changes: 7 additions & 11 deletions src/Lumina.Example/Condition.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,23 @@

namespace Lumina.Example
{
[Sheet("Condition" )]
public class Condition : IExcelRow
[Sheet( "Condition" )]
public class Condition : ExcelRow
{
public int Index;

public uint LogMessageId;

public LazyRow< LogMessage > LogMessage;

public uint RowId { get; set; }
public uint SubRowId { get; set; }

public void PopulateData( RowParser parser, Lumina lumina, Language language )
public override void PopulateData( RowParser parser, GameData gameData, Language language )
{
RowId = parser.Row;
SubRowId = parser.SubRow;
base.PopulateData( parser, gameData, language );

Index = parser.ReadColumn< int >( 0 );

LogMessageId = parser.ReadColumn< uint >( 2 );
LogMessage = new LazyRow< LogMessage >( lumina, LogMessageId, language );
LogMessage = new LazyRow< LogMessage >( gameData, LogMessageId, language );
}
}
}
11 changes: 3 additions & 8 deletions src/Lumina.Example/LogMessage.cs
Original file line number Diff line number Diff line change
@@ -1,21 +1,16 @@
using Lumina.Data;
using Lumina.Excel;
using Lumina.Text;

namespace Lumina.Example
{
[Sheet( "LogMessage" )]
public class LogMessage : IExcelRow
public class LogMessage : ExcelRow
{
public uint RowId { get; set; }
public uint SubRowId { get; set; }

public string Text;

public void PopulateData( RowParser parser, Lumina lumina, Language language )
public override void PopulateData( RowParser parser, GameData gameData, Language language )
{
RowId = parser.Row;
SubRowId = parser.SubRow;
base.PopulateData( parser, gameData, language );

Text = parser.ReadColumn< string >( 4 );
}
Expand Down
5 changes: 1 addition & 4 deletions src/Lumina.Example/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
using System.IO;
using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Lumina.Data;
using Lumina.Excel;
using Lumina.Excel.GeneratedSheets;

namespace Lumina.Example
Expand Down Expand Up @@ -60,7 +57,7 @@ public override void SaveFile( string path )

static void Main( string[] args )
{
var lumina = new Lumina( args[ 0 ] );
var lumina = new GameData( args[ 0 ] );

bool exitThread = false;
var handleThread = new Thread( () =>
Expand Down
18 changes: 7 additions & 11 deletions src/Lumina.Excel/GeneratedSheets/AOZArrangement.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,18 @@
namespace Lumina.Excel.GeneratedSheets
{
[Sheet( "AOZArrangement", columnHash: 0x2020acf6 )]
public class AOZArrangement : IExcelRow
public class AOZArrangement : ExcelRow
{

public LazyRow< AOZContentBriefingBNpc > AOZContentBriefingBNpc;
public ushort Unknown1;
public LazyRow< AOZContentBriefingBNpc > AOZContentBriefingBNpc { get; set; }
public ushort Position { get; set; }

public uint RowId { get; set; }
public uint SubRowId { get; set; }

public void PopulateData( RowParser parser, Lumina lumina, Language language )
public override void PopulateData( RowParser parser, GameData gameData, Language language )
{
RowId = parser.Row;
SubRowId = parser.SubRow;
base.PopulateData( parser, gameData, language );

AOZContentBriefingBNpc = new LazyRow< AOZContentBriefingBNpc >( lumina, parser.ReadColumn< ushort >( 0 ), language );
Unknown1 = parser.ReadColumn< ushort >( 1 );
AOZContentBriefingBNpc = new LazyRow< AOZContentBriefingBNpc >( gameData, parser.ReadColumn< ushort >( 0 ), language );
Position = parser.ReadColumn< ushort >( 1 );
}
}
}
18 changes: 7 additions & 11 deletions src/Lumina.Excel/GeneratedSheets/AOZBoss.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,18 @@
namespace Lumina.Excel.GeneratedSheets
{
[Sheet( "AOZBoss", columnHash: 0x2020acf6 )]
public class AOZBoss : IExcelRow
public class AOZBoss : ExcelRow
{

public LazyRow< AOZContentBriefingBNpc > Boss;
public ushort Unknown1;
public LazyRow< AOZContentBriefingBNpc > Boss { get; set; }
public ushort Position { get; set; }

public uint RowId { get; set; }
public uint SubRowId { get; set; }

public void PopulateData( RowParser parser, Lumina lumina, Language language )
public override void PopulateData( RowParser parser, GameData gameData, Language language )
{
RowId = parser.Row;
SubRowId = parser.SubRow;
base.PopulateData( parser, gameData, language );

Boss = new LazyRow< AOZContentBriefingBNpc >( lumina, parser.ReadColumn< ushort >( 0 ), language );
Unknown1 = parser.ReadColumn< ushort >( 1 );
Boss = new LazyRow< AOZContentBriefingBNpc >( gameData, parser.ReadColumn< ushort >( 0 ), language );
Position = parser.ReadColumn< ushort >( 1 );
}
}
}
42 changes: 19 additions & 23 deletions src/Lumina.Excel/GeneratedSheets/AOZContent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,33 +7,29 @@
namespace Lumina.Excel.GeneratedSheets
{
[Sheet( "AOZContent", columnHash: 0x615a9876 )]
public class AOZContent : IExcelRow
public class AOZContent : ExcelRow
{

public ushort StandardFinishTime;
public ushort IdealFinishTime;
public byte Act1FightType;
public ushort Act1;
public byte ArenaType1;
public byte Act2FightType;
public ushort Act2;
public byte ArenaType2;
public byte Act3FightType;
public ushort Act3;
public byte ArenaType3;
public uint ContentEntry;
public byte Order;
public ushort GilReward;
public ushort AlliedSealsReward;
public ushort TomestonesReward;
public ushort StandardFinishTime { get; set; }
public ushort IdealFinishTime { get; set; }
public byte Act1FightType { get; set; }
public ushort Act1 { get; set; }
public byte ArenaType1 { get; set; }
public byte Act2FightType { get; set; }
public ushort Act2 { get; set; }
public byte ArenaType2 { get; set; }
public byte Act3FightType { get; set; }
public ushort Act3 { get; set; }
public byte ArenaType3 { get; set; }
public uint ContentEntry { get; set; }
public byte Order { get; set; }
public ushort GilReward { get; set; }
public ushort AlliedSealsReward { get; set; }
public ushort TomestonesReward { get; set; }

public uint RowId { get; set; }
public uint SubRowId { get; set; }

public void PopulateData( RowParser parser, Lumina lumina, Language language )
public override void PopulateData( RowParser parser, GameData gameData, Language language )
{
RowId = parser.Row;
SubRowId = parser.SubRow;
base.PopulateData( parser, gameData, language );

StandardFinishTime = parser.ReadColumn< ushort >( 0 );
IdealFinishTime = parser.ReadColumn< ushort >( 1 );
Expand Down
Loading

0 comments on commit 2786712

Please sign in to comment.