fix(codegen): Code gens base armor and fixes code genning of other armors. (#696)
* Fixes code gen of save flags * Code gens rest of armor * Fixes some existing code genned armors * Code gens BaseArmor
This commit is contained in:
parent
803d594300
commit
c8a2605c0d
127 changed files with 1107 additions and 1959 deletions
|
|
@ -37,7 +37,8 @@ namespace SerializationGenerator
|
|||
|
||||
public static void GenerateEnumValue(this StringBuilder source, string indent, bool isFlag, string name, int value)
|
||||
{
|
||||
var valueStr = isFlag ? $"0x{1 << value:X8}" : value.ToString();
|
||||
var number = value < 0 ? 0 : 1 << value;
|
||||
var valueStr = isFlag ? $"0x{number:X8}" : value.ToString();
|
||||
source.AppendLine($"{indent}{name} = {valueStr},");
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue