Skip to content

Commit

Permalink
Extend General fee with Sanitary Dump Stations (#5332)
Browse files Browse the repository at this point in the history
* Add General fee for amenity=sanitary_dump_station

* Update app/src/main/java/de/westnordost/streetcomplete/quests/general_fee/AddGeneralFee.kt

Co-authored-by: Flo Edelmann <[email protected]>

* Update AddGeneralFee with a new title

* Update strings.xml with a second title

* Update missing brackets

Co-authored-by: Tobias Zwick <[email protected]>

---------

Co-authored-by: Flo Edelmann <[email protected]>
Co-authored-by: Tobias Zwick <[email protected]>
  • Loading branch information
3 people authored Nov 26, 2023
1 parent 9da0fc7 commit 8b57805
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ class AddGeneralFee : OsmFilterQuestType<Boolean>() {

override val elementFilter = """
nodes, ways with
(tourism = museum or leisure = beach_resort or tourism = gallery or tourism = caravan_site)
(
tourism ~ museum|gallery|caravan_site
or leisure = beach_resort
or amenity = sanitary_dump_station
)
and access !~ private|no
and !fee
"""
Expand All @@ -21,7 +25,11 @@ class AddGeneralFee : OsmFilterQuestType<Boolean>() {
override val icon = R.drawable.ic_quest_fee
override val achievements = listOf(CITIZEN)

override fun getTitle(tags: Map<String, String>) = R.string.quest_generalFee_title2
override fun getTitle(tags: Map<String, String>) =
if (tags["amenity"] == "sanitary_dump_station")
R.string.quest_generalFee_title

Check failure on line 30 in app/src/main/java/de/westnordost/streetcomplete/quests/general_fee/AddGeneralFee.kt

View workflow job for this annotation

GitHub Actions / Kotlin

Missing { ... }
else
R.string.quest_generalFee_title2

Check failure on line 32 in app/src/main/java/de/westnordost/streetcomplete/quests/general_fee/AddGeneralFee.kt

View workflow job for this annotation

GitHub Actions / Kotlin

Missing { ... }

override fun createForm() = YesNoQuestForm()

Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1038,6 +1038,7 @@ Before uploading your changes, the app checks with a &lt;a href=\"https://www.we
<!-- "Self-service" refers to a situation where patrons can pump gas for themselves -->
<string name="quest_fuelSelfService_title">Does this gas station allow self-service?</string>

<string name="quest_generalFee_title">Do you need to pay to use this?</string>
<string name="quest_generalFee_title2">Do you need to pay to enter here?</string>
<string name="quest_genericRef_title">What’s the identification number here?</string>

Expand Down

0 comments on commit 8b57805

Please sign in to comment.