Пример #1
0
            }                                                           // may be null

            public EngineeringData(JObject evt)
            {
                Engineer              = evt["Engineer"].Str();
                EngineerID            = evt["EngineerID"].ULong();
                BlueprintName         = evt["BlueprintName"].Str();
                FriendlyBlueprintName = BlueprintName.SplitCapsWordFull();
                BlueprintID           = evt["BlueprintID"].ULong();
                Level   = evt["Level"].Int();
                Quality = evt["Quality"].Double(0);
                // EngineerCraft has it as Apply.. Loadout has just ExperimentalEffect.  Check both
                ExperimentalEffect           = evt.MultiStr(new string[] { "ExperimentalEffect", "ApplyExperimentalEffect" });
                ExperimentalEffect_Localised = JournalFieldNaming.CheckLocalisation(evt["ExperimentalEffect_Localised"].Str(), ExperimentalEffect);

                Modifiers = evt["Modifiers"]?.ToObject <EngineeringModifiers[]>(ignoretypeerrors: true, checkcustomattr: false);     // instances of Value being wrong type - ignore and continue

                if (Modifiers != null)
                {
                    foreach (EngineeringModifiers v in Modifiers)
                    {
                        v.FriendlyLabel = v.Label.SplitCapsWord();
                    }
                }
                else
                {
                }
            }
Пример #2
0
            }                                                           // may be null

            public EngineeringData(JObject evt)
            {
                Engineer              = evt["Engineer"].Str();
                EngineerID            = evt["EngineerID"].Long();
                BlueprintName         = evt["BlueprintName"].Str();
                FriendlyBlueprintName = BlueprintName.SplitCapsWordFull();
                BlueprintID           = evt["BlueprintID"].Long();
                Level   = evt["Level"].Int();
                Quality = evt["Quality"].Double(0);

                Modifiers = evt["Modifiers"]?.ToObject <EngineeringModifiers[]>();
            }
Пример #3
0
            }                                                           // may be null

            public EngineeringData(JObject evt)
            {
                Engineer              = evt["Engineer"].Str();
                EngineerID            = evt["EngineerID"].Long();
                BlueprintName         = evt["BlueprintName"].Str();
                FriendlyBlueprintName = BlueprintName.SplitCapsWordFull();
                BlueprintID           = evt["BlueprintID"].Long();
                Level   = evt["Level"].Int();
                Quality = evt["Quality"].Double(0);
                // EngineerCraft has it as Apply.. Loadout has just ExperimentalEffect.  Check both
                ExperimentalEffect = JSONObjectExtensions.GetMultiStringDef(evt, new string[] { "ExperimentalEffect", "ApplyExperimentalEffect" });

                Modifiers = evt["Modifiers"]?.ToObject <EngineeringModifiers[]>();
            }
Пример #4
0
            }                                                           // may be null

            public EngineeringData(JObject evt)
            {
                Engineer              = evt["Engineer"].Str();
                EngineerID            = evt["EngineerID"].Long();
                BlueprintName         = evt["BlueprintName"].Str();
                FriendlyBlueprintName = BlueprintName.SplitCapsWordFull();
                BlueprintID           = evt["BlueprintID"].Long();
                Level   = evt["Level"].Int();
                Quality = evt["Quality"].Double(0);
                // EngineerCraft has it as Apply.. Loadout has just ExperimentalEffect.  Check both
                ExperimentalEffect           = evt.MultiStr(new string[] { "ExperimentalEffect", "ApplyExperimentalEffect" });
                ExperimentalEffect_Localised = JournalFieldNaming.CheckLocalisation(evt["ExperimentalEffect_Localised"].Str(), ExperimentalEffect);

                Modifiers = evt["Modifiers"]?.ToObjectProtected <EngineeringModifiers[]>();

                if (Modifiers != null)
                {
                    foreach (EngineeringModifiers v in Modifiers)
                    {
                        v.FriendlyLabel = v.Label.SplitCapsWord();
                    }
                }
            }