forked from FakeFishGames/Barotrauma
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Added QuikGraph for Depth-first search function.
- Lots of resource structure refactoring. - Combined some related interface definitions into single files.
- Loading branch information
1 parent
7437680
commit ef91d6e
Showing
22 changed files
with
318 additions
and
170 deletions.
There are no files selected for viewing
36 changes: 36 additions & 0 deletions
36
Barotrauma/BarotraumaClient/ClientSource/LuaCs/Data/IConfigInfoClient.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,36 @@ | ||
using Microsoft.Xna.Framework; | ||
|
||
namespace Barotrauma.LuaCs.Data; | ||
|
||
/// <summary> | ||
/// Client-only information for IConfigInfo contract, such as icons and display resources. | ||
/// </summary> | ||
public interface IConfigInfoClient | ||
{ | ||
string Description { get; } | ||
/// <summary> | ||
/// Human-friendly name displayed in menus. Internal name will be used if empty. | ||
/// </summary> | ||
string DisplayName { get; } | ||
/// <summary> | ||
/// What category should this be displayed under in the menus. Overriden when 'ConfigDataType' is 'ControlInput'. | ||
/// </summary> | ||
string DisplayCategory { get; } | ||
/// <summary> | ||
/// Icon to be displayed next to the setting. | ||
/// </summary> | ||
string ImageIcon { get; } | ||
/// <summary> | ||
/// Absolute icon size in pixels. | ||
/// </summary> | ||
Vector2 IconSize { get; } | ||
/// <summary> | ||
/// On hover tooltip. | ||
/// </summary> | ||
string Tooltip { get; } | ||
/// <summary> | ||
/// Whether the value should be allowed to be shown when mods are not loaded. Used when developers want to hook events | ||
/// before values are allowed to be changed. | ||
/// </summary> | ||
bool HideWhenPackageNotLoaded { get; } | ||
} |
6 changes: 6 additions & 0 deletions
6
Barotrauma/BarotraumaClient/ClientSource/LuaCs/Data/IStylesInfo.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 IStylesInfo | ||
{ | ||
|
||
} |
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
20 changes: 0 additions & 20 deletions
20
Barotrauma/BarotraumaShared/SharedSource/LuaCs/Data/IAssemblyResourceInfo.cs
This file was deleted.
Oops, something went wrong.
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/IConfigProfileInfo.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 IConfigProfileInfo | ||
{ | ||
|
||
} |
6 changes: 0 additions & 6 deletions
6
Barotrauma/BarotraumaShared/SharedSource/LuaCs/Data/IConfigResourceInfo.cs
This file was deleted.
Oops, something went wrong.
6 changes: 0 additions & 6 deletions
6
Barotrauma/BarotraumaShared/SharedSource/LuaCs/Data/ILocalizationResourceInfo.cs
This file was deleted.
Oops, something went wrong.
15 changes: 13 additions & 2 deletions
15
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 |
---|---|---|
@@ -1,6 +1,17 @@ | ||
namespace Barotrauma.LuaCs.Data; | ||
using System.Collections.Immutable; | ||
|
||
public interface IModConfigInfo | ||
namespace Barotrauma.LuaCs.Data; | ||
|
||
public interface IModConfigInfo : IPackageDependenciesInfo, IResourceCultureInfo | ||
{ | ||
// package info | ||
ContentPackage Package { get; } | ||
string PackageName { get; } | ||
|
||
// loadable content metadata | ||
ImmutableArray<IAssemblyResourceInfo> LoadableAssemblies { get; } | ||
ImmutableArray<ILocalizationResourceInfo> LocalizationFiles { get; } | ||
|
||
// configuration | ||
TargetRunMode RunModes { get; } | ||
} |
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
9 changes: 0 additions & 9 deletions
9
Barotrauma/BarotraumaShared/SharedSource/LuaCs/Data/IResourceCultureInfo.cs
This file was deleted.
Oops, something went wrong.
25 changes: 25 additions & 0 deletions
25
Barotrauma/BarotraumaShared/SharedSource/LuaCs/Data/IResourceInfoDefinitions.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,25 @@ | ||
using System.Collections.Immutable; | ||
using System.Globalization; | ||
|
||
namespace Barotrauma.LuaCs.Data; | ||
|
||
public interface IConfigResourceInfo : IResourceInfo, IResourceCultureInfo, IPackageDependenciesInfo { } | ||
public interface IConfigProfileResourceInfo : IResourceInfo, IResourceCultureInfo, IPackageDependenciesInfo { } | ||
public interface ILocalizationResourceInfo : IResourceInfo, IResourceCultureInfo, IPackageDependenciesInfo { } | ||
|
||
public interface IAssemblyResourceInfo : IResourceInfo, IResourceCultureInfo, IPackageDependenciesInfo | ||
{ | ||
/// <summary> | ||
/// The friendly name of the assembly. Script files belonging to the same assembly should all have the same name. | ||
/// Legacy scripts will all be given the sanitized name of the Content Package they belong to. | ||
/// </summary> | ||
public string FriendlyName { get; } | ||
/// <summary> | ||
/// Is this entry referring to a script file collection. | ||
/// </summary> | ||
public bool IsScript { get; } | ||
/// <summary> | ||
/// Should this be compiled/loaded immediately or stored until demanded. | ||
/// </summary> | ||
public bool LazyLoad { get; } | ||
} |
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
Oops, something went wrong.