コード例 #1
0
            public static bool CheckPond(FarmTileId tile, Border border, PondDefinition definition, List <Pond> ponds, FarmData __instance)
            {
                if (__instance.GetFence(tile, border) != null)
                {
                    return(false);
                }
                FarmTile tile2 = __instance.GetTile(tile + border.GetBorderOffset());

                if (tile2 == null)
                {
                    return(false);
                }
                PondContents pondContents = tile2.Contents as PondContents;

                if (pondContents == null)
                {
                    return(false);
                }
                if (ponds.Contains(pondContents.Pond))
                {
                    return(false);
                }
                if (pondContents.Definition.Race != definition.Race && false)
                {
                    return(false);
                }
                if (pondContents.Pond.Tiles.Count >= settings.maxTileCount)
                {
                    return(false);
                }
                ponds.Add(pondContents.Pond);
                return(false);
            }
コード例 #2
0
ファイル: DumpShop.cs プロジェクト: zaxcs/farmtogether_mods
        private static string[] DumpPondStats(PondDefinition def)
        {
            var list = new List <string>();

            list.Add(def.FishInterval.ToString());
            list.AddRange(new string[4]);
            list.Add(def.HarvestXp.ToString());
            list.AddRange(ConvertMoney(def.HarvestMoney));
            list.Add(def.SuccessChance.ToString());
            list.AddRange(ConvertMoney(def.FailMoney));
            return(list.ToArray());
        }