private void LoadBathhouseMap() { //if for whatever reason this exists already, abort. There's a problem. if (Game1.getLocationFromName(BathhouseLocationName) != null) { return; } //load in the TBO sweet sweet tbin Map map = this.Helper.Content.Load <Map>(BathhouseLocationFilename); //ento's hax require some custom manipulation of the always-front later if (map.Layers.Contains(map.GetLayer("AlwaysFront"))) { map.RemoveLayer(map.GetLayer("AlwaysFront")); } Texture2D steamTexture = this.Helper.Content.Load <Texture2D>(SteamSpriteSheetFilename); // add the new location GameLocation location = new CustomBathhouse(map, BathhouseLocationName, steamTexture) { IsOutdoors = false, IsFarm = false }; Game1.locations.Add(location); //apparently this does things if (location.map.Properties.ContainsKey("DayTiles")) { location.map.Properties.Remove("DayTiles"); } //apparently this does things too. if (location.map.Properties.ContainsKey("NightTiles")) { location.map.Properties.Remove("NightTiles"); } //from Ento, no clue why this works. My life is a mess. location.map = map; //more ento hax location.ignoreLights = true; }
private void LoadBathhouseMap() { //if for whatever reason this exists already, abort. There's a problem. if (Game1.getLocationFromName(BathhouseLocationName) != null) { return; } //load in the TBO sweet sweet tbin Map map = this.Helper.Content.Load <Map>(BathhouseLocationFilename); // The TBin contains fog on the AlwaysFront Layer, but we're adding our own in so just remove this layer. // This can be removed once the fog is taken out of that layer. if (map.Layers.Contains(map.GetLayer("AlwaysFront"))) { map.RemoveLayer(map.GetLayer("AlwaysFront")); } Texture2D steamTexture = this.Helper.Content.Load <Texture2D>(SteamSpriteSheetFilename); // add the new location GameLocation location = new CustomBathhouse(map, BathhouseLocationName, steamTexture) { IsOutdoors = false, IsFarm = false }; location.map = map; // Removing these and turning on ignoreLights ensures teh entire map is always fully lit. // Currently this has no affect since there's no lighting in the map anyway. if (location.map.Properties.ContainsKey("DayTiles")) { location.map.Properties.Remove("DayTiles"); } if (location.map.Properties.ContainsKey("NightTiles")) { location.map.Properties.Remove("NightTiles"); } location.ignoreLights = true; Game1.locations.Add(location); }