Skip to content

Commit

Permalink
Ensure that auth swap in Stellaris CS is completely handled
Browse files Browse the repository at this point in the history
  • Loading branch information
bcssov committed Oct 21, 2024
1 parent 735d6c8 commit 1d0f16c
Show file tree
Hide file tree
Showing 38 changed files with 1,677 additions and 474 deletions.
2 changes: 1 addition & 1 deletion Test.runsettings
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<RunSettings>
<RunConfiguration>
<MaxCpuCount>2</MaxCpuCount>
<MaxCpuCount>1</MaxCpuCount>
<TargetPlatform>x64</TargetPlatform>
<ResultsDirectory>.\TestResults</ResultsDirectory>
<TargetFrameworkVersion>net8.0</TargetFrameworkVersion>
Expand Down
20 changes: 16 additions & 4 deletions src/IronyModManager.IO.Common/Mods/IDefinitionInfoProvider.cs
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@

// ***********************************************************************
// ***********************************************************************
// Assembly : IronyModManager.IO.Common
// Author : Mario
// Created : 04-02-2020
//
// Last Modified By : Mario
// Last Modified On : 10-03-2023
// Last Modified On : 10-21-2024
// ***********************************************************************
// <copyright file="IDefinitionInfoProvider.cs" company="Mario">
// Mario
// </copyright>
// <summary></summary>
// ***********************************************************************

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using IronyModManager.Shared.Models;

namespace IronyModManager.IO.Common.Mods
{

/// <summary>
/// Interface IDefinitionInfoProvider
/// </summary>
Expand All @@ -39,12 +39,24 @@ public interface IDefinitionInfoProvider
/// <value><c>true</c> if this instance is fully implemented; otherwise, <c>false</c>.</value>
bool IsFullyImplemented { get; }

/// <summary>
/// Gets the merge types.
/// </summary>
/// <value>The merge types.</value>
IDictionary<MergeType, List<string>> MergeTypes { get; }

/// <summary>
/// Gets a value indicating whether [supports inline scripts].
/// </summary>
/// <value><c>true</c> if [supports inline scripts]; otherwise, <c>false</c>.</value>
bool SupportsInlineScripts { get; }

/// <summary>
/// Gets a value indicating whether [supports script merge].
/// </summary>
/// <value><c>true</c> if [supports script merge]; otherwise, <c>false</c>.</value>
bool SupportsScriptMerge { get; }

#endregion Properties

#region Methods
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// Created : 04-04-2020
//
// Last Modified By : Mario
// Last Modified On : 05-23-2024
// Last Modified On : 10-21-2024
// ***********************************************************************
// <copyright file="BaseDefinitionInfoProvider.cs" company="Mario">
// Mario
Expand Down Expand Up @@ -74,12 +74,24 @@ public abstract class BaseDefinitionInfoProvider : IDefinitionInfoProvider
/// <value><c>true</c> if this instance is fully implemented; otherwise, <c>false</c>.</value>
public abstract bool IsFullyImplemented { get; }

/// <summary>
/// Gets the merge types.
/// </summary>
/// <value>The merge types.</value>
public abstract IDictionary<MergeType, List<string>> MergeTypes { get; }

/// <summary>
/// Gets a value indicating whether [supports inline scripts].
/// </summary>
/// <value><c>true</c> if [supports inline scripts]; otherwise, <c>false</c>.</value>
public abstract bool SupportsInlineScripts { get; }

/// <summary>
/// Gets a value indicating whether [supports script merge].
/// </summary>
/// <value><c>true</c> if [supports script merge]; otherwise, <c>false</c>.</value>
public abstract bool SupportsScriptMerge { get; }

#endregion Properties

#region Methods
Expand Down
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@

// ***********************************************************************
// ***********************************************************************
// Assembly : IronyModManager.IO
// Author : Mario
// Created : 07-18-2022
//
// Last Modified By : Mario
// Last Modified On : 10-03-2023
// Last Modified On : 10-21-2024
// ***********************************************************************
// <copyright file="HOI4DefinitionInfoProvider.cs" company="Mario">
// Mario
// </copyright>
// <summary></summary>
// ***********************************************************************

using System;
using System.Collections.Generic;
using System.Linq;
using IronyModManager.Shared.Models;

namespace IronyModManager.IO.Mods.InfoProviders
{

/// <summary>
/// Class HOI4DefinitionInfoProvider.
/// Implements the <see cref="IronyModManager.IO.Mods.InfoProviders.BaseDefinitionInfoProvider" />
Expand All @@ -41,12 +41,24 @@ public class HOI4DefinitionInfoProvider : BaseDefinitionInfoProvider
/// <value><c>true</c> if this instance is fully implemented; otherwise, <c>false</c>.</value>
public override bool IsFullyImplemented => false;

/// <summary>
/// Gets the merge types.
/// </summary>
/// <value>The merge types.</value>
public override IDictionary<MergeType, List<string>> MergeTypes => null;

/// <summary>
/// Gets a value indicating whether [supports inline scripts].
/// </summary>
/// <value><c>true</c> if [supports inline scripts]; otherwise, <c>false</c>.</value>
public override bool SupportsInlineScripts => false;

/// <summary>
/// Gets a value indicating whether [supports script merge].
/// </summary>
/// <value><c>true</c> if [supports script merge]; otherwise, <c>false</c>.</value>
public override bool SupportsScriptMerge => false;

#endregion Properties

#region Methods
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
// Created : 04-02-2020
//
// Last Modified By : Mario
// Last Modified On : 03-22-2024
// Last Modified On : 10-21-2024
// ***********************************************************************
// <copyright file="StellarisDefinitionInfoProvider.cs" company="Mario">
// Mario
Expand Down Expand Up @@ -62,12 +62,24 @@ public class StellarisDefinitionInfoProvider : BaseDefinitionInfoProvider
/// <value><c>true</c> if this instance is fully implemented; otherwise, <c>false</c>.</value>
public override bool IsFullyImplemented => true;

/// <summary>
/// Gets the merge types.
/// </summary>
/// <value>The merge types.</value>
public override IDictionary<MergeType, List<string>> MergeTypes => new Dictionary<MergeType, List<string>> { { MergeType.FlatMerge, ["advanced_authority_swap"] } };

/// <summary>
/// Gets a value indicating whether [supports inline scripts].
/// </summary>
/// <value><c>true</c> if [supports inline scripts]; otherwise, <c>false</c>.</value>
public override bool SupportsInlineScripts => true;

/// <summary>
/// Gets a value indicating whether [supports script merge].
/// </summary>
/// <value><c>true</c> if [supports script merge]; otherwise, <c>false</c>.</value>
public override bool SupportsScriptMerge => true;

#endregion Properties

#region Methods
Expand Down
10 changes: 9 additions & 1 deletion src/IronyModManager.Models.Common/IPriorityDefinitionResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,17 @@
// Created : 04-27-2020
//
// Last Modified By : Mario
// Last Modified On : 01-05-2022
// Last Modified On : 10-17-2024
// ***********************************************************************
// <copyright file="IPriorityDefinitionResult.cs" company="Mario">
// Mario
// </copyright>
// <summary></summary>
// ***********************************************************************

using System;
using System.Collections.Generic;
using System.Linq;
using IronyModManager.Shared.Models;

namespace IronyModManager.Models.Common
Expand All @@ -32,6 +34,12 @@ public interface IPriorityDefinitionResult : IModel
/// <value>The definition.</value>
IDefinition Definition { get; set; }

/// <summary>
/// Gets or sets the definition order.
/// </summary>
/// <value>The definition order.</value>
IEnumerable<IDefinition> DefinitionOrder { get; set; }

/// <summary>
/// Gets or sets the name of the file.
/// </summary>
Expand Down
10 changes: 9 additions & 1 deletion src/IronyModManager.Models/PriorityDefinitionResult.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,17 @@
// Created : 04-27-2020
//
// Last Modified By : Mario
// Last Modified On : 01-05-2022
// Last Modified On : 10-17-2024
// ***********************************************************************
// <copyright file="PriorityDefinitionResult.cs" company="Mario">
// Mario
// </copyright>
// <summary></summary>
// ***********************************************************************

using System;
using System.Collections.Generic;
using System.Linq;
using IronyModManager.Models.Common;
using IronyModManager.Shared.Models;

Expand All @@ -35,6 +37,12 @@ public class PriorityDefinitionResult : BaseModel, IPriorityDefinitionResult
/// <value>The definition.</value>
public virtual IDefinition Definition { get; set; }

/// <summary>
/// Gets or sets the definition order.
/// </summary>
/// <value>The definition order.</value>
public virtual IEnumerable<IDefinition> DefinitionOrder { get; set; }

/// <summary>
/// Gets or sets the name of the file.
/// </summary>
Expand Down
Loading

0 comments on commit 1d0f16c

Please sign in to comment.