The problem with the water detection is that IIRC it just uses getWaterLevel - and nothing else. This means if you're in an interior with NO WATER, you may well get stupid messages telling you "you can't set up a bedroll in water" and have to go outside to sleep. Because if the "cell has water" box isn't checked, the value returned by getWaterLevel could be 10000 units above the highest static in the cell. And there's no function to detect whether the cell has water at all.
So to correctly detect whether the player is in water is not as easy as it sounds. Firstly, you *have* to use getSoundPlaying, there's no other way to know if an interior has water (unless it's a fake exterior, then it does). And getSoundPlaying is extremely unreliable on some systems, so I'm assuming Gluby at least will want to avoid using it. So without getSoundPlaying, it's false alarms for people using the mod as intended, or dropping it and allowing people to do silly things if they want to, which frankly is just fine by me. Why bother stopping them? Most portable bedroll scripts don't have those checks. Or you could use the getSoundPlaying check and let some people sleep in water and some not, if you prefer (if it's not working on a particular system it just won't register when it should). Here's how to detect when the player is in water (so you know where I'm coming from with not wanting this running all the time - which it would have to, it couldn't be a local script!):
First you check for a sudden change in player position on one or both x,y axes.
If found, assume a cell change (because cellChanged isn't reliable, so can't use it for this) and reset water check.
If cell is an exterior, it has water. Otherwise:
If getWindSpeed returns values higher than 0, it's a fake exterior, and has water.
If the player has any one of three water-related sounds playing on them (FootWaterLeft, FootWaterRight, DefaultLandWater), the cell very probably has water, and you can use getWaterLevel to find the water level.
Once you know the cell has water and what the water level is, you can check the player's z-pos against it, and be reasonably confident you won't get it completely wrong very often.
Now I don't know about you, but if I'm going to go to all that trouble over something (and sacrifice game performance to it), I'd rather it was something important. If this is really that important to you then fine, I'm just saying it's not that important to me. :shrug:
If you do decide to do the full water check, btw:
IIRC, Wrye has some water check scripts in NoM already. I don't remember exactly how they worked but they were usable for any mod (ie the just checked for player in water, they weren't tied to NoM) - so more than one mod could use them even without a dependency. IMO this is a good idea: more efficient to have one global script checking this, since there are quite a few mods that want the info.
To me, it seems the restrictions were designed primarily to make the player utilize other avenues that were made available in NoM
Personally, I'd really rather it didn't do that. Why make the player use the inns if they don't want to?