Windows IsFloorableTile doesn't actually do what it says

Erinthe

Newcomer
This is a long-standing bug with the game that prevents creating wallpaper walls that are three tiles high unless the third tile down has a Buildings tile that is wallpaperable.

An example of where this issue comes up is behind the baby crib in the farmhouse, but! the game fixes this by simply saying that every wallpaper tile is floorable except those three baby crib tiles. This makes the game work as expected, but prevents mods from placing building tiles like the crib, or creating maps like the one in my screenshot, with diagonal walls.

I know this might not be considered a bug per se, but if you look at DecoratableLocation.IsFloorableTile you'll see that it really doesn't do the simple thing its name would suggest, i.e. checking whether the tile is floorable, e.g.:

protected bool IsFloorableTile(int x, int y, string layer_name)
{
int tileIndex = base.getTileIndexAt(x, y, "Buildings", "untitled tile sheet");
return (tileIndex < 197 || tileIndex > 199) && GetFloorID(x, y) != null;
}

This fix should still allow the special case of the baby crib to show wallpaper between the slats, while still allowing other use cases; if the FarmHouse map with the crib were changed to remove the non-visible floor tiles behind the crib, I think the exception wouldn't even be necessary, and you could just return GetFloorID(x, y) != null.
 

Attachments

Top