コード例 #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);
                // 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();
                    }
                }
            }
コード例 #3
0
 public void Normalise()
 {
     FDShipType         = JournalFieldNaming.NormaliseFDShipName(ShipType);
     ShipType           = JournalFieldNaming.GetBetterShipName(FDShipType);
     ShipType_Localised = JournalFieldNaming.CheckLocalisation(ShipType_Localised ?? "", ShipType);
 }
コード例 #4
0
            public string FriendlyShipType;   // created

            public void Normalise()
            {
                ShipType           = JournalFieldNaming.NormaliseFDShipName(ShipType);
                FriendlyShipType   = JournalFieldNaming.GetBetterShipName(ShipType);
                ShipType_Localised = JournalFieldNaming.CheckLocalisation(ShipType_Localised, FriendlyShipType);
            }