private static bool FinishItemEquippedItemKeyword(ref object?item, Dictionary <string, object> contentTable, Dictionary <string, Json.Token> contentTypeTable, List <object> itemCollection, Json.Token lastItemType, List <string> knownFieldList, List <string> usedFieldList, string parsedFile, string parsedKey)
        {
            bool Result;
            PgAbilityRequirement NewItem;

            if (contentTable.ContainsKey("MaxCount"))
            {
                NewItem = new PgAbilityRequirementDisallowedItemKeyword();
                Result  = FinishItemDisallowedItemKeyword((PgAbilityRequirementDisallowedItemKeyword)NewItem, contentTable, contentTypeTable, itemCollection, lastItemType, knownFieldList, usedFieldList, parsedFile, parsedKey);
            }
            else
            {
                NewItem = new PgAbilityRequirementEquippedItemKeyword();
                Result  = FinishItemEquippedItemKeyword((PgAbilityRequirementEquippedItemKeyword)NewItem, contentTable, contentTypeTable, itemCollection, lastItemType, knownFieldList, usedFieldList, parsedFile, parsedKey);
            }

            if (Result)
            {
                item = NewItem;
                return(true);
            }
            else
            {
                return(false);
            }
        }
        private static bool FinishItemEquippedItemKeyword(PgAbilityRequirementEquippedItemKeyword item, Dictionary <string, object> contentTable, Dictionary <string, Json.Token> contentTypeTable, List <object> itemCollection, Json.Token lastItemType, List <string> knownFieldList, List <string> usedFieldList, string parsedFile, string parsedKey)
        {
            bool Result = true;

            foreach (KeyValuePair <string, object> Entry in contentTable)
            {
                string Key   = Entry.Key;
                object Value = Entry.Value;

                if (!knownFieldList.Contains(Key))
                {
                    Result = Program.ReportFailure($"Unknown field {Key}");
                }
                else
                {
                    usedFieldList.Add(Key);

                    switch (Key)
                    {
                    case "T":
                        break;

                    case "MinCount":
                        Result = SetIntProperty((int valueInt) => item.RawMinCount = valueInt, Value);
                        break;

                    case "Keyword":
                        Result = StringToEnumConversion <ItemKeyword> .SetEnum((ItemKeyword valueEnum) => item.Keyword = valueEnum, Value);

                        break;

                    default:
                        Result = Program.ReportFailure(parsedFile, parsedKey, $"Key '{Key}' not handled");
                        break;
                    }
                }

                if (!Result)
                {
                    break;
                }
            }

            return(Result);
        }