コード例 #1
0
            static void Postfix(GameResPointModule __instance, ref List <ResPointInfo> ___infoList)
            {
                for (int i = 0; i < ___infoList.Count; i++)
                {
                    if (___infoList[i].level == 5)
                    {
                        ___infoList.Remove(___infoList[i]);
                    }
                }

                foreach (ResPointData rpd in TreeResData)
                {
                    ___infoList.Add(rpd.value);
                }
                foreach (ResPointData rpd in MineResData)
                {
                    ___infoList.Add(rpd.value);
                }
                for (int i = 0; i < ___infoList.Count; i++)
                {
                    if (___infoList[i].level == 0)
                    {
                        continue;
                    }

                    ___infoList[i].priceLimit *= settings.PriceLimitMult;

                    var productsId  = FieldRefAccess <ResPointInfo, string>(___infoList[i], "productsId");
                    var extraOutput = FieldRefAccess <ResPointInfo, string>(___infoList[i], "extraOutput");
                    if (___infoList[i].id == 1) // add apples and aroma apples
                    {
                        productsId = "4000047;" + productsId;
                        FieldRefAccess <ResPointInfo, string>(___infoList[i], "productsId") = productsId;
                        extraOutput += ",4000014_" + i;
                        FieldRefAccess <ResPointInfo, string>(___infoList[i], "extraOutput") = extraOutput;
                    }
                    else if (___infoList[i].id == 2) // add blood stone and marble
                    {
                        productsId += ";4000079;4000121";
                        FieldRefAccess <ResPointInfo, string>(___infoList[i], "productsId") = productsId;
                    }
                }
                foreach (ResPointInfo resPointInfo in ___infoList)
                {
                    resPointInfo.InitialOutPorts();
                }
            }
コード例 #2
0
ファイル: Main.cs プロジェクト: erinthorn/mytimeatportia
            static void Postfix(GameResPointModule __instance, ref List <ResPointInfo> ___infoList)
            {
                for (int i = 0; i < ___infoList.Count; i++)
                {
                    if (___infoList[i].level == 5)
                    {
                        ___infoList.Remove(___infoList[i]);
                    }
                }

                foreach (ResPointData rpd in TreeResData)
                {
                    ___infoList.Add(rpd.value);
                }
                foreach (ResPointData rpd in MineResData)
                {
                    ___infoList.Add(rpd.value);
                }
                foreach (ResPointInfo resPointInfo in ___infoList)
                {
                    resPointInfo.InitialOutPorts();
                }
            }