forked from FakeFishGames/Barotrauma
-
Notifications
You must be signed in to change notification settings - Fork 22
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
99a2595
commit 7437680
Showing
18 changed files
with
105 additions
and
66 deletions.
There are no files selected for viewing
3 changes: 3 additions & 0 deletions
3
Barotrauma/BarotraumaClient/ClientSource/LuaCs/Data/IStylesResourceInfo.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
namespace Barotrauma.LuaCs.Data; | ||
|
||
public interface IStylesResourceInfo : IResourceInfo, IResourceCultureInfo { } |
4 changes: 4 additions & 0 deletions
4
Barotrauma/BarotraumaClient/ClientSource/LuaCs/Services/IXmlAssetService.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
...rauma/BarotraumaClient/ClientSource/LuaCs/Services/Processing/IClientParserDefinitions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
using System.Xml.Linq; | ||
using Barotrauma.LuaCs.Data; | ||
|
||
namespace Barotrauma.LuaCs.Services.Processing; | ||
|
||
#region XmlToResourceParsers | ||
|
||
public interface IXmlStylesToResParser : IResourceParser<XElement, IStylesResourceInfo> { } | ||
|
||
#endregion |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
Barotrauma/BarotraumaShared/SharedSource/LuaCs/Data/IModConfigInfo.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
namespace Barotrauma.LuaCs.Data; | ||
|
||
public interface IModConfigInfo | ||
{ | ||
|
||
} |
9 changes: 9 additions & 0 deletions
9
Barotrauma/BarotraumaShared/SharedSource/LuaCs/Data/IResourceCultureInfo.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
using System.Collections.Immutable; | ||
using System.Globalization; | ||
|
||
namespace Barotrauma.LuaCs.Data; | ||
|
||
public interface IResourceCultureInfo | ||
{ | ||
ImmutableArray<CultureInfo> SupportedCultures { get; init; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 0 additions & 6 deletions
6
Barotrauma/BarotraumaShared/SharedSource/LuaCs/Services/Parsers/IXmlAssemblyResParser.cs
This file was deleted.
Oops, something went wrong.
6 changes: 0 additions & 6 deletions
6
Barotrauma/BarotraumaShared/SharedSource/LuaCs/Services/Parsers/IXmlConfigResParser.cs
This file was deleted.
Oops, something went wrong.
6 changes: 0 additions & 6 deletions
6
Barotrauma/BarotraumaShared/SharedSource/LuaCs/Services/Parsers/IXmlDependencyResParser.cs
This file was deleted.
Oops, something went wrong.
6 changes: 0 additions & 6 deletions
6
Barotrauma/BarotraumaShared/SharedSource/LuaCs/Services/Parsers/IXmlLocalizationResParser.cs
This file was deleted.
Oops, something went wrong.
6 changes: 0 additions & 6 deletions
6
Barotrauma/BarotraumaShared/SharedSource/LuaCs/Services/Parsers/IXmlResourceParser.cs
This file was deleted.
Oops, something went wrong.
28 changes: 28 additions & 0 deletions
28
Barotrauma/BarotraumaShared/SharedSource/LuaCs/Services/Processing/IParserDefintions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
using System.Xml.Linq; | ||
using Barotrauma.LuaCs.Data; | ||
|
||
namespace Barotrauma.LuaCs.Services.Processing; | ||
|
||
/// <summary> | ||
/// Parses Xml to produce loading metadata info for linked loadable files. | ||
/// </summary> | ||
#region XmlToResourceInfoParsers | ||
|
||
public interface IXmlAssemblyResParser : IResourceParser<XElement, IAssemblyResourceInfo> { } | ||
public interface IXmlConfigResParser : IResourceParser<XElement, IConfigResourceInfo> { } | ||
public interface IXmlLocalizationResParser : IResourceParser<XElement, ILocalizationResourceInfo> { } | ||
|
||
#endregion | ||
|
||
/// <summary> | ||
/// Parses Xml to produce ready-to-use info/data without any additional file/data loading. | ||
/// </summary> | ||
#region XmlToInfoParsers | ||
public interface IXmlDependencyParser : IResourceParser<XElement, IPackageDependencyInfo> { } | ||
public interface IXmlModConfigParser : IResourceParser<XElement, IModConfigInfo> { } | ||
|
||
#endregion | ||
|
||
|
||
|
||
|
9 changes: 9 additions & 0 deletions
9
Barotrauma/BarotraumaShared/SharedSource/LuaCs/Services/Processing/IResourceParser.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
using System.Collections.Generic; | ||
|
||
namespace Barotrauma.LuaCs.Services.Processing; | ||
|
||
public interface IResourceParser<TSrc,TOut> | ||
{ | ||
bool TryParseResource(in TSrc src, out TOut resources); | ||
bool TryParseResources(in IEnumerable<TSrc> sources, out List<TOut> resources); | ||
} |