Skip to content

Commit 7662095

Browse files
committed
Stellaris CS 3.14 update
1 parent 1d0f16c commit 7662095

File tree

18 files changed

+674
-312
lines changed

18 files changed

+674
-312
lines changed

Readme.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,7 @@ Check the [Wiki](https://github.com/bcssov/IronyModManager/wiki)
55
All instructions are for Windows.
66
1. Install Visual Studio 2022 (required for .NET6)
77
1. Clone the repo to your local machine
8-
1. Open the LocalizationResourceGenerator solution file located in \Tools\LocalizationResourceGenerator\src
9-
* Build the solution and copy the binaries to the Tools\LocalizationResourceGenerator folder
8+
1. Run cmd\build-tools.bat to build the LocalizationResourceGenerator
109
1. If you don't already have one, create a folder for local NuGet packages and unzip the [CWTools.Irony-Private.0.4.0-alpha8](https://github.com/bcssov/IronyModManager/files/7798143/CWTools.Irony-Private.0.4.0-alpha8.zip) package to it
1110
* This is just an up to date version of CWTools, the one on the public NuGet is older
1211
* Example path: C:\Users\username\code\LocalNuGet

References/CopyAll/Maps/HeartsofIronIVParserMap.json

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -325,9 +325,6 @@
325325
}, {
326326
"DirectoryPath": "history\\units",
327327
"PreferredParser": "HOI4WholeTextParser"
328-
}, {
329-
"DirectoryPath": "interface",
330-
"PreferredParser": "GenericGraphicsParser"
331328
}, {
332329
"DirectoryPath": "integrated_dlc\\dlc018_together_for_victory\\gfx\\entities",
333330
"PreferredParser": "GenericGraphicsParser"
@@ -363,9 +360,9 @@
363360
"PreferredParser": "DefaultParser"
364361
}, {
365362
"DirectoryPath": "interface",
366-
"PreferredParser": "DefaultParser"
363+
"PreferredParser": "GenericGraphicsParser"
367364
}, {
368-
"DirectoryPath": "launcher-assets",
365+
"DirectoryPath": "interface",
369366
"PreferredParser": "DefaultParser"
370367
}, {
371368
"DirectoryPath": "localisation",

References/CopyAll/Maps/StellarisParserMap.json

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,24 @@
271271
}, {
272272
"DirectoryPath": "common\\inline_scripts\\events",
273273
"PreferredParser": "StellarisWholeTextParser"
274+
}, {
275+
"DirectoryPath": "common\\inline_scripts\\grand_archive",
276+
"PreferredParser": "StellarisWholeTextParser"
277+
}, {
278+
"DirectoryPath": "common\\inline_scripts\\grand_archive\\collection",
279+
"PreferredParser": "StellarisWholeTextParser"
280+
}, {
281+
"DirectoryPath": "common\\inline_scripts\\grand_archive\\mutations",
282+
"PreferredParser": "StellarisWholeTextParser"
283+
}, {
284+
"DirectoryPath": "common\\inline_scripts\\grand_archive\\mutations\\camouflage",
285+
"PreferredParser": "StellarisWholeTextParser"
286+
}, {
287+
"DirectoryPath": "common\\inline_scripts\\grand_archive\\mutations\\core_components",
288+
"PreferredParser": "StellarisWholeTextParser"
289+
}, {
290+
"DirectoryPath": "common\\inline_scripts\\grand_archive\\specimen_upkeeps",
291+
"PreferredParser": "StellarisWholeTextParser"
274292
}, {
275293
"DirectoryPath": "common\\inline_scripts\\jobs",
276294
"PreferredParser": "StellarisWholeTextParser"
@@ -292,6 +310,9 @@
292310
}, {
293311
"DirectoryPath": "common\\inline_scripts\\ship_components\\weights",
294312
"PreferredParser": "StellarisWholeTextParser"
313+
}, {
314+
"DirectoryPath": "common\\inline_scripts\\starbase_modules",
315+
"PreferredParser": "StellarisWholeTextParser"
295316
}, {
296317
"DirectoryPath": "common\\inline_scripts\\technologies",
297318
"PreferredParser": "StellarisWholeTextParser"
@@ -337,6 +358,9 @@
337358
}, {
338359
"DirectoryPath": "common\\missions",
339360
"PreferredParser": "DefaultParser"
361+
}, {
362+
"DirectoryPath": "common\\mutations",
363+
"PreferredParser": "DefaultParser"
340364
}, {
341365
"DirectoryPath": "common\\named_colors",
342366
"PreferredParser": "DefaultParser"
@@ -433,6 +457,9 @@
433457
}, {
434458
"DirectoryPath": "common\\ship_behaviors",
435459
"PreferredParser": "GenericKeyParser"
460+
}, {
461+
"DirectoryPath": "common\\ship_categories",
462+
"PreferredParser": "DefaultParser"
436463
}, {
437464
"DirectoryPath": "common\\ship_sizes",
438465
"PreferredParser": "StellarisOverwrittenObjectSingleFileParser"
@@ -484,6 +511,9 @@
484511
}, {
485512
"DirectoryPath": "common\\species_rights\\slavery_types",
486513
"PreferredParser": "StellarisOverwrittenParser"
514+
}, {
515+
"DirectoryPath": "common\\specimens",
516+
"PreferredParser": "DefaultParser"
487517
}, {
488518
"DirectoryPath": "common\\starbase_buildings",
489519
"PreferredParser": "DefaultParser"
@@ -649,6 +679,9 @@
649679
}, {
650680
"DirectoryPath": "gfx\\shipview",
651681
"PreferredParser": "DefaultParser"
682+
}, {
683+
"DirectoryPath": "gfx\\vivariumview",
684+
"PreferredParser": "DefaultParser"
652685
}, {
653686
"DirectoryPath": "gfx\\worldgfx",
654687
"PreferredParser": "GenericKeyParser"
@@ -808,6 +841,21 @@
808841
}, {
809842
"DirectoryPath": "sound\\firstcontact\\ui",
810843
"PreferredParser": "GenericWholeTextParser"
844+
}, {
845+
"DirectoryPath": "sound\\grand_archive\\events",
846+
"PreferredParser": "GenericWholeTextParser"
847+
}, {
848+
"DirectoryPath": "sound\\grand_archive\\relics",
849+
"PreferredParser": "GenericWholeTextParser"
850+
}, {
851+
"DirectoryPath": "sound\\grand_archive\\ships",
852+
"PreferredParser": "GenericWholeTextParser"
853+
}, {
854+
"DirectoryPath": "sound\\grand_archive\\ui",
855+
"PreferredParser": "GenericWholeTextParser"
856+
}, {
857+
"DirectoryPath": "sound\\grand_archive\\weapons",
858+
"PreferredParser": "GenericWholeTextParser"
811859
}, {
812860
"DirectoryPath": "sound\\guardians",
813861
"PreferredParser": "GenericWholeTextParser"

src/IronyModManager.DI/MessageBus/MessageBusDependencyResolver.cs

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
1-

2-
// ***********************************************************************
1+
// ***********************************************************************
32
// Assembly : IronyModManager.DI
43
// Author : Mario
54
// Created : 06-10-2020
65
//
76
// Last Modified By : Mario
8-
// Last Modified On : 06-26-2023
7+
// Last Modified On : 10-29-2024
98
// ***********************************************************************
109
// <copyright file="MessageBusDependencyResolver.cs" company="Mario">
1110
// Mario
1211
// </copyright>
1312
// <summary></summary>
1413
// ***********************************************************************
14+
1515
using System;
1616
using System.Collections.Generic;
17+
using System.Linq;
1718
using Microsoft.Extensions.Logging;
1819
using Microsoft.Extensions.Logging.Abstractions;
1920
using SlimMessageBus.Host;
2021

2122
namespace IronyModManager.DI.MessageBus
2223
{
23-
2424
/// <summary>
2525
/// Class MessageBusDependencyResolver.
2626
/// Implements the <see cref="SlimMessageBus.Host.DependencyResolver.IDependencyResolver" />
@@ -34,6 +34,7 @@ internal class MessageBusDependencyResolver : IServiceProvider
3434
/// The message type resolver
3535
/// </summary>
3636
private readonly MessageTypeResolver messageTypeResolver;
37+
3738
/// <summary>
3839
/// The resolved collections
3940
/// </summary>
@@ -75,18 +76,19 @@ public object GetService(Type serviceType)
7576
{
7677
return messageTypeResolver;
7778
}
79+
else if (typeof(System.Collections.IEnumerable).IsAssignableFrom(serviceType) && typeof(SlimMessageBus.Host.Interceptor.IMessageBusLifecycleInterceptor).IsAssignableFrom(serviceType.GetGenericArguments()[0]))
80+
{
81+
return null;
82+
}
83+
7884
if (DIContainer.Container.IsLocked)
7985
{
8086
var obj = DIResolver.Get(serviceType);
8187
return obj;
8288
}
8389
else
8490
{
85-
if (resolvedCollections.TryGetValue(serviceType, out var instance))
86-
{
87-
return instance();
88-
}
89-
return null;
91+
return resolvedCollections.TryGetValue(serviceType, out var instance) ? instance() : null;
9092
}
9193
}
9294

src/IronyModManager.Parser.Common/Parsers/BaseParser.cs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// Created : 02-17-2020
55
//
66
// Last Modified By : Mario
7-
// Last Modified On : 10-17-2024
7+
// Last Modified On : 10-29-2024
88
// ***********************************************************************
99
// <copyright file="BaseParser.cs" company="Mario">
1010
// Mario
@@ -309,6 +309,15 @@ protected virtual IEnumerable<IDefinition> ParseComplexTypes(IEnumerable<IScript
309309
definition.OriginalId = isFirstLevel ? TrimId(item.Key) : TrimId(parent);
310310
definition.ValueType = ValueType.Object;
311311
definition.OriginalCode = definition.Code = FormatCode(item, parent);
312+
if (item.Values != null && item.Values.Count() == 1)
313+
{
314+
if (item.Values.FirstOrDefault()!.Key.Equals(Constants.Stellaris.InlineScriptId, StringComparison.OrdinalIgnoreCase))
315+
{
316+
// Yay, paradox
317+
definition.ContainsInlineIdentifier = true;
318+
}
319+
}
320+
312321
if (!isFirstLevel)
313322
{
314323
definition.OriginalCode = FormatCode(item, skipVariables: true);

0 commit comments

Comments
 (0)