Esempio n. 1
0
 public static bool IsGameMenuMapButton(SButton b) => ModEntry.GetConfig().key_gamemenu_map.Contains(b);
Esempio n. 2
0
 public static bool IsGameMenuSkillsButton(SButton b) => ModEntry.GetConfig().key_gamemenu_skills.Contains(b);
Esempio n. 3
0
 public static bool IsGameMenuSocialButton(SButton b) => ModEntry.GetConfig().key_gamemenu_social.Contains(b);
Esempio n. 4
0
 public static bool IsMenuPrevButton(SButton b) => ModEntry.GetConfig().key_menu_prev.Contains(b);
Esempio n. 5
0
 public static bool IsGameMenuInventoryButton(SButton b) => ModEntry.GetConfig().key_gamemenu_inv.Contains(b);
Esempio n. 6
0
 public static bool IsGameMenuExitButton(SButton b) => ModEntry.GetConfig().key_gamemenu_exit.Contains(b);
Esempio n. 7
0
        private static string GetPitchArg()
        {
            int pitch = ModEntry.GetConfig().tts_pitch;

            return("--setf int_f0_target_mean=" + pitch);
        }
Esempio n. 8
0
 public static bool IsTTSInfoButton(SButton b) => ModEntry.GetConfig().key_tts_info.Contains(b);
Esempio n. 9
0
 public static bool IsTTSRepeatButton(SButton b) => ModEntry.GetConfig().key_tts_repeat.Contains(b);
Esempio n. 10
0
 public static bool IsMenuTitleMuteButton(SButton b) => ModEntry.GetConfig().key_menu_title_mute.Contains(b);
Esempio n. 11
0
 public static bool IsTTSMapCheckButton(SButton b) => ModEntry.GetConfig().key_tts_map_check.Contains(b);
Esempio n. 12
0
 public static bool IsMenuEscapeButton(SButton b) => ModEntry.GetConfig().key_menu_escape.Contains(b);
Esempio n. 13
0
 public static bool IsMenuDeleteButton(SButton b) => ModEntry.GetConfig().key_menu_delete.Contains(b);
Esempio n. 14
0
 public static bool IsMenuActivateButton(SButton b) => ModEntry.GetConfig().key_menu_activate.Contains(b) || b.IsActionButton();
Esempio n. 15
0
 public static bool IsGameMenuCraftingButton(SButton b) => ModEntry.GetConfig().key_gamemenu_crafting.Contains(b);
Esempio n. 16
0
 public static bool IsTTSStopButton(SButton b) => ModEntry.GetConfig().key_tts_stop.Contains(b);
Esempio n. 17
0
 public static bool IsGameMenuOptionsButton(SButton b) => ModEntry.GetConfig().key_gamemenu_options.Contains(b);
Esempio n. 18
0
 public static bool IsTTSTimeButton(SButton b) => ModEntry.GetConfig().key_tts_time.Contains(b);
Esempio n. 19
0
        private static string GetSpeedArg()
        {
            float speed = 1 + 1 - ModEntry.GetConfig().tts_speed / 100f;

            return("--setf duration_stretch=" + speed.ToString(System.Globalization.CultureInfo.InvariantCulture));
        }
Esempio n. 20
0
 public static bool IsTTSHealthButton(SButton b) => ModEntry.GetConfig().key_tts_health.Contains(b);
Esempio n. 21
0
        private static BarrierType FindBarrierType()
        {
            Vector2 nextPos = PlayerNextPosition();

            xTile.Dimensions.Location location = new xTile.Dimensions.Location((int)nextPos.X, (int)nextPos.Y);
            Vector2      tilePos = new Vector2(location.X / Game1.tileSize, location.Y / Game1.tileSize);
            GameLocation loc     = Game1.currentLocation;

            Layer buildingsLayer = loc.map.GetLayer("Buildings");
            Tile  tile           = buildingsLayer.PickTile(location, Game1.viewport.Size);

            if (tile != null)
            {
                int i = tile.TileIndex;
                ModEntry.Log("tile " + tile.TileIndex);
                if (loc is FarmHouse)
                {
                    return(BarrierType.Housewall);
                }
                else if (i == 184 || i == 1183 || i == 1210 || i == 211 || i == 183 || i == 1182 || i == 185 || i == 1184 || i == 235 || i == 1290 || i == 260 || i == 1315 ||
                         i == 259 || i == 258 || i == 1257 || i == 1207 || i == 208 || i == 213 || i == 212 || i == 1232 || i == 233 || i == 1209 || i == 210 || i == 238 || i == 1292 ||
                         i == 237 || i == 1291)
                {
                    return(BarrierType.Water);
                }
                else if (i == 383 || i == 384 || i == 385 || i == 436 || i == 411 || i == 386 || i == 434 ||
                         i == 832 || i == 833 || i == 834 || i == 866 || i == 898 || i == 930 || i == 900 || i == 929 || i == 928 || i == 896 || i == 864)
                {
                    return(BarrierType.Fence);
                }
                else if (i == 541 || i == 542 || i == 543 || i == 544 || i == 391 || i == 416 || i == 441 || i == 466 || i == 491 || i == 516 || i == 419 || i == 394 || i == 444 ||
                         i == 469 || i == 494 || i == 519 || i == 422 || i == 438 || i == 540 || i == 439 || i == 464 || i == 440 || i == 467 || i == 468 || i == 369 ||
                         i == 344 || i == 319 || i == 294 || i == 295 || i == 291 || i == 316 || i == 366 || i == 496 || i == 522 || i == 548 || i == 547 || i == 546 ||
                         i == 545 || i == 539 || i == 371 || i == 399 || i == 446 || i == 290)
                {
                    return(BarrierType.Cliff);
                }
                else if (i == 1938 || i == 1939)
                {
                    return(BarrierType.PetWaterBowl);
                }
                else if (i == 40 || i == 72 || i == 322 || i == 323 || i == 327 || i == 54 || i == 86)
                {
                    return(BarrierType.Bench);
                }
                else if (i == 1003)
                {
                    return(BarrierType.Lantern);
                }
                return(BarrierType.UnknownWall);
            }
            else if (loc.isTerrainFeatureAt((int)tilePos.X, (int)tilePos.Y))
            {
                TerrainFeature terrainFeature = loc.terrainFeatures.ContainsKey(tilePos) ? loc.terrainFeatures[tilePos] : loc.getLargeTerrainFeatureAt((int)tilePos.X, (int)tilePos.Y);
                //ModEntry.Log("terrain: "+terrainFeature.ToString());
                if (terrainFeature is Bush)
                {
                    return(BarrierType.Bush);
                }
                if (terrainFeature is Tree)
                {
                    return(BarrierType.Tree);
                }
                return(BarrierType.UnknownTerrain);
            }

            /*
             * else if (Game1.currentLocation.getLargeTerrainFeatureAt(location.X / Game1.tileSize, location.Y / Game1.tileSize) != null)
             * {
             *  ModEntry.Log("large terrain");
             *  return BarrierType.UnknownLargeTerrain;
             * }
             */
            else if (Game1.currentLocation.getObjectAtTile(location.X / Game1.tileSize, location.Y / Game1.tileSize) is StardewValley.Object obj && obj != null)
            {
                switch (obj.ParentSheetIndex)
                {
                case 294:
                case 295:
                    return(BarrierType.Wood);

                case Object.mineStoneSnow1:
                case Object.mineStoneSnow2:
                case Object.mineStoneSnow3:
                case Object.mineStonePurpleSnowIndex:
                case Object.mineStoneRed1Index:
                case Object.mineStoneRed2Index:
                case Object.mineStoneBlue1Index:
                case Object.mineStoneBlue2Index:
                case Object.mineStoneGrey1Index:
                case Object.mineStoneGrey2Index:
                case Object.mineStoneBrown1Index:
                case Object.mineStoneBrown2Index:
                case Object.mineStoneMysticIndex:
                case Object.mineStonePurpleIndex:
                case 343:
                case 450:
                    return(BarrierType.Stone);

                //case Object.mineStoneSnow1
                case 674:
                case 675:
                case 784:
                case 792:
                    return(BarrierType.Weed);

                default:
                    ModEntry.Log("obj: " + obj.Name + ", id: " + obj.ParentSheetIndex);
                    return(BarrierType.UnknownObject);
                }
            }
Esempio n. 22
0
 public static bool IsMenuNextButton(SButton b) => ModEntry.GetConfig().key_menu_next.Contains(b);