forked from streetcomplete/StreetComplete
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
3 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
app/src/main/java/de/westnordost/streetcomplete/quests/general_fee/AddGeneralFee.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package de.westnordost.streetcomplete.quests.general_fee | ||
|
||
import de.westnordost.streetcomplete.R | ||
import de.westnordost.streetcomplete.data.osm.SimpleOverpassQuestType | ||
import de.westnordost.streetcomplete.data.osm.changes.StringMapChangesBuilder | ||
import de.westnordost.streetcomplete.data.osm.download.OverpassMapDataDao | ||
import de.westnordost.streetcomplete.quests.YesNoQuestAnswerFragment | ||
|
||
class AddGeneralFee(o: OverpassMapDataDao) : SimpleOverpassQuestType<Boolean>(o) { | ||
|
||
override val tagFilters = "nodes, ways, relations with " + | ||
"(tourism=museum or leisure=beach_resort or tourism=gallery) " + | ||
"and access !~ private|no and !fee and name" | ||
override val commitMessage = "Add fee info" | ||
override val icon = R.drawable.ic_quest_money | ||
|
||
override fun getTitle(tags: Map<String, String>) = R.string.quest_generalFee_title | ||
|
||
override fun createForm() = YesNoQuestAnswerFragment() | ||
|
||
override fun applyAnswerTo(answer: Boolean, changes: StringMapChangesBuilder) { | ||
changes.add("fee", if (answer) "yes" else "no") | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters