public static string GetRenamedFunction(Collection <ProceduresAndFunctions> procList, string nameOfItem, ProceduresAndFunctions.Type type)
        {
            int IDNumber;

            IDNumber = GetProcID(procList, nameOfItem, type);

            if (IDNumber == 0)
            {
                return("");
            }

            return(procList[IDNumber - 1].ReplaceNameText);
        }
        public static int AddProc(Collection <ProceduresAndFunctions> procList, string nameOfItem, ProceduresAndFunctions.Type type, DataItems gameData)
        {
            int IDNumber;

            IDNumber = GetProcID(procList, nameOfItem, type);
            if (IDNumber > 0)
            {
                return(IDNumber);
            }

            //not found so add it
            procList.Add(new ProceduresAndFunctions(nameOfItem, type, procList.Count + 1));

            if (type == ProceduresAndFunctions.Type.Function)
            {
                gameData.eventList.Add(new EventLog("Added Function " + nameOfItem + "()"));
            }
            else
            {
                gameData.eventList.Add(new EventLog("Added Procedure " + nameOfItem + "()"));
            }

            return(procList.Count);
        }
        public static int GetProcID(Collection <ProceduresAndFunctions> procList, string nameOfItem, ProceduresAndFunctions.Type type)
        {
            foreach (ProceduresAndFunctions p in procList)
            {
                if (p.FunctionName() == nameOfItem && p.FunctionType() == type)
                {
                    p.CountOfUsage += 1;
                    return(p.IDNumber());
                }
            }

            return(0);
        }