Esempio n. 1
0
        private void udfs(out string s, Fuel[] fuels)
        {
            // DEBUG
            //ScreenMessages.PostScreenMessage("a: " + fuels.Length.ToString(), 1, ScreenMessageStyle.LOWER_CENTER, true);

            if (fuels.Length == 0)
            {
                s = "None";
                return;
            }

            s = "";
            bool plus = false;

            foreach (Fuel fuel in fuels)
            {
                if (plus)
                {
                    s += " + ";
                }
                // add code to verify found exists to prevent nullref
                plus = true;
                resourceLa abr = lastResource.Find(x => x.resourceID == fuel.resourceID);

                s += PartResourceLibrary.Instance.GetDefinition(fuel.resourceID).name;

                // DEBUG
                //ScreenMessages.PostScreenMessage(s, 1, ScreenMessageStyle.UPPER_CENTER, true);
            }
        }
Esempio n. 2
0
        private void updateFS(out string s, Fuel[] fuels)
        {

            if (fuels.Length == 0)
            {
                s = "None";
                return;
            }

            s = "";
            bool plus = false;

            foreach (Fuel fuel in fuels)
            {
                if (plus)
                    s += " + ";
                // add code to verify found exists to prevent nullref
                plus = true;
                resourceLa abr = lastResource.Find(x => x.resourceID == fuel.resourceID);

                s += PartResourceLibrary.Instance.GetDefinition(fuel.resourceID).name;
            }
        }