Ejemplo n.º 1
0
        //Floors

        public static void setMissingFloorsToDefault(StardewValley.Locations.DecoratableLocation location)
        {
            List <Rectangle> floors = location.getFloors();

            while (location.floor.Count < floors.Count)
            {
                location.floor[location.floor.Count] = getFloorIndex(location.map, floors[location.floor.Count].X, floors[location.floor.Count].Y);
            }
        }
Ejemplo n.º 2
0
        //Walls

        public static void setMissingWallpaperToDefault(StardewValley.Locations.DecoratableLocation location)
        {
            List <Rectangle> walls = location.getWalls();

            Logger.Log(location.Name + " has " + walls.Count + " walls, and " + location.wallPaper.Count + " wallpapers.");
            while (location.wallPaper.Count < walls.Count)
            {
                location.wallPaper[location.wallPaper.Count] = getWallpaperIndex(location.map, walls[location.wallPaper.Count].X, walls[location.wallPaper.Count].Y);
                Logger.Log("Added wall with wallpaper " + location.wallPaper[location.wallPaper.Count - 1]);
            }
            Logger.Log(location.Name + " now has " + walls.Count + " walls, and " + location.wallPaper.Count + " wallpapers.");
        }
Ejemplo n.º 3
0
        public static void setWallpaperDefaults(StardewValley.Locations.DecoratableLocation location)
        {
            List <Rectangle> walls  = location.getWalls();
            List <Rectangle> floors = location.getFloors();

            Logger.Log("Setting defaults for " + location.name + " (" + location.uniqueName + ")");
            for (int wallIndex = 0; wallIndex < walls.Count; wallIndex++)
            {
                Logger.Log("Setting default wall for the wall " + walls[wallIndex].ToString() + "...");
                int wallPaperIndex = getWallpaperIndex(location.map, walls[wallIndex].X, walls[wallIndex].Y);
                location.wallPaper[wallIndex] = wallPaperIndex;
                //house.setWallpaper(wallPaperIndex, wallIndex, true);
            }
            for (int floorIndex = 0; floorIndex < floors.Count; floorIndex++)
            {
                Logger.Log("Setting default floor for the floor " + floors[floorIndex].ToString() + "...");
                int floorTileIndex = getFloorIndex(location.map, floors[floorIndex].X, floors[floorIndex].Y);
                location.floor[floorIndex] = floorTileIndex;
            }
        }