Public toilets planned for a seaside town will include design features aimed at deterring vandalism, rough sleepers and sexual activity.
Plans for the facilities in Porthcawl's Griffin Park include weight-sensitive floors to ensure one user at a time.
Violent movement would activate a water jet to soak users, automatically open the doors and sound an alarm.
Responsibility for Porthcawl's public toilets has been transferred from Bridgend council to the town council.
Plans say people would be able to use the cubicles for a set time to deter rough sleepers, dousing equipment would be installed to prevent smoking and drug-taking and walls and floors would be graffiti-resistant.
Planning documents state: "Every effort has been made to make sure that the new toilet facility will enhance this location and be safe for the community at all times."
People will have to pay to use the toilets but the town council has yet to decide how much to charge.
The town council is paying £135,000 towards the £170,000 project and Bridgend council is providing £35,000.
Town councillor Mike Clarke told the Local Democracy Reporting Service: "Rebuilding the public toilets is an important element of Porthcawl Town Council's ambition to ensure that Porthcawl is a great place to live, work and to visit."
The existing facilities are due to close in October while the demolition and construction of the new building takes place - temporary toilets will be provided nearby.