Skip to content

Commit

Permalink
Merge branch 'master' into internal-traitmapper
Browse files Browse the repository at this point in the history
  • Loading branch information
IhateTrains committed Dec 15, 2024
2 parents 6694410 + 1882b53 commit 62ac84b
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion ImperatorToCK3/CK3/Characters/Character.cs
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ public string? DeathReason {

public IDictionary<string, string> PrisonerIds { get; } = new Dictionary<string, string>(); // <prisoner id, imprisonment type>

public DNA? DNA { get; set; }
internal DNA? DNA { get; set; }

public Imperator.Characters.Character? ImperatorCharacter { get; set; }

Expand Down
2 changes: 1 addition & 1 deletion ImperatorToCK3/CK3/Characters/CharacterCollection.cs
Original file line number Diff line number Diff line change
Expand Up @@ -811,7 +811,7 @@ public void GenerateSuccessorsForOldCharacters(Title.LandedTitles titles, Cultur
});
}

public void ConvertImperatorCharacterDNA(DNAFactory dnaFactory) {
internal void ConvertImperatorCharacterDNA(DNAFactory dnaFactory) {
Logger.Info("Converting Imperator character DNA to CK3...");
foreach (var character in this) {
if (character.ImperatorCharacter is null) {
Expand Down
10 changes: 5 additions & 5 deletions ImperatorToCK3/CK3/Characters/DNA.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

namespace ImperatorToCK3.CK3.Characters;

public sealed class DNA {
public sealed class PaletteCoordinates {
internal sealed class DNA {
internal sealed class PaletteCoordinates {
// hair, skin and eye color palettes are 256x256
public int X { get; init; } = 128;
public int Y { get; init; } = 128;
Expand All @@ -32,9 +32,9 @@ public IEnumerable<string> DNALines {

public DNA(
string id,
IDictionary<string, DNAColorGeneValue> colorDNAValues,
IDictionary<string, DNAGeneValue> morphDNAValues,
IDictionary<string, DNAAccessoryGeneValue> accessoryDNAValues
Dictionary<string, DNAColorGeneValue> colorDNAValues,
Dictionary<string, DNAGeneValue> morphDNAValues,
Dictionary<string, DNAAccessoryGeneValue> accessoryDNAValues
) {
Id = id;
this.colorDNAValues = new(colorDNAValues);
Expand Down
6 changes: 3 additions & 3 deletions ImperatorToCK3/CK3/Characters/DNAFactory.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

namespace ImperatorToCK3.CK3.Characters;

public sealed class DNAFactory {
internal sealed class DNAFactory {
private readonly IPixelCollection<ushort> irHairPalettePixels;
private readonly IPixelCollection<ushort> irSkinPalettePixels;
private readonly IPixelCollection<ushort> irEyePalettePixels;
Expand Down Expand Up @@ -69,7 +69,7 @@ public DNAFactory(ModFilesystem irModFS, ModFilesystem ck3ModFS) {
BuildColorConversionCaches(ck3HairPalettePixels, ck3SkinPalettePixels, ck3EyePalettePixels);
}

public DNA GenerateDNA(Imperator.Characters.Character irCharacter, PortraitData irPortraitData) {
internal DNA GenerateDNA(Imperator.Characters.Character irCharacter, PortraitData irPortraitData) {
var id = $"dna_{irCharacter.Id}";

var colorDNAValues = new Dictionary<string, DNAColorGeneValue>();
Expand Down Expand Up @@ -463,7 +463,7 @@ IPixelCollection<ushort> ck3EyePalettePixels

private static void BuildColorConversionCache(
IPixelCollection<ushort> ck3PalettePixels,
IDictionary<IMagickColor<ushort>, DNA.PaletteCoordinates> ck3ColorToCoordinatesDict
ConcurrentDictionary<IMagickColor<ushort>, DNA.PaletteCoordinates> ck3ColorToCoordinatesDict
) {
foreach (var pixel in ck3PalettePixels) {
var color = pixel.ToColor();
Expand Down

0 comments on commit 62ac84b

Please sign in to comment.