/
GlobalOverrides.cs
101 lines (86 loc) · 3.31 KB
/
GlobalOverrides.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
using Kingmaker.Blueprints;
using Kingmaker.Blueprints.Classes;
using Kingmaker.Blueprints.Classes.Selection;
using Kingmaker.Blueprints.Classes.Spells;
using Kingmaker.UnitLogic.Abilities.Blueprints;
using Kingmaker.UnitLogic.Buffs.Blueprints;
using System;
using System.Collections.Generic;
namespace BlueprintCoreGen.CodeGen.Overrides
{
/// <summary>
/// Stores hardcoded overrides.
/// </summary>
public class GlobalOverrides
{
/// <summary>
/// List blueprint types which should not have concrete implementations because they have custom implementations.
/// </summary>
public static readonly HashSet<Type> CustomBlueprintConfigurators =
new()
{
typeof(BlueprintAbility),
typeof(BlueprintAbilityAreaEffect),
typeof(BlueprintAbilityResource),
typeof(BlueprintArchetype),
typeof(BlueprintBuff),
typeof(BlueprintFeature),
typeof(BlueprintFeatureSelection),
typeof(BlueprintProgression),
typeof(BlueprintScriptableObject),
typeof(BlueprintSpellList),
};
public static readonly Dictionary<Type, string> TypeNameOverrides =
new()
{
// Name conflicts
{ typeof(Kingmaker.AI.Blueprints.TargetType), "Kingmaker.AI.Blueprints.TargetType" },
{ typeof(Kingmaker.UnitLogic.Abilities.Components.TargetType), "Kingmaker.UnitLogic.Abilities.Components.TargetType" },
{ typeof(Kingmaker.UnitLogic.Mechanics.ValueType), "Kingmaker.UnitLogic.Mechanics.ValueType" },
{ typeof(UnityEngine.Object), "UnityEngine.Object" },
{ typeof(Kingmaker.Dungeon.Blueprints.BlueprintDungeonBoonReference), "Kingmaker.Dungeon.Blueprints.BlueprintDungeonBoonReference" },
{ typeof(bool), "bool" },
{ typeof(bool?), "bool" },
{ typeof(byte), "byte" },
{ typeof(byte?), "byte" },
{ typeof(sbyte), "sbyte" },
{ typeof(sbyte?), "sbyte" },
{ typeof(ushort), "ushort" },
{ typeof(ushort?), "ushort" },
{ typeof(int), "int" },
{ typeof(int?), "int" },
{ typeof(uint), "uint" },
{ typeof(uint?), "uint" },
{ typeof(long), "long" },
{ typeof(long?), "long" },
{ typeof(ulong), "ulong" },
{ typeof(ulong?), "ulong" },
{ typeof(char), "char" },
{ typeof(char?), "char" },
{ typeof(double), "double" },
{ typeof(double?), "double" },
{ typeof(float), "float" },
{ typeof(float?), "float" },
{ typeof(string), "string" },
};
/// <summary>
/// Ensures parameter names compile successfully. This is for things like 'm_Class' which would map to a parameter
/// name of 'class' normally.
/// </summary>
public static readonly Dictionary<string, string> ParamNameOverrides =
new()
{
{ "default", "defaultValue" },
{ "event", "eventValue" },
{ "break", "breakValue" },
{ "string", "stringValue" },
{ "class", "clazz" },
{ "override", "overrideValue" },
{ "continue", "continueValue" },
{ "double", "doubleValue" },
{ "fixed", "fixedValue" },
{ "bool", "boolValue" },
{ "object", "objectValue" }
};
}
}