Skip to content

Commit

Permalink
specific string for below bridges is not always correct anymore (coul…
Browse files Browse the repository at this point in the history
…d also be below building roofs, overhead pipelines)

see #5912 (comment)
  • Loading branch information
westnordost committed Sep 22, 2024
1 parent e311c63 commit 5cafc50
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,20 +84,7 @@ class AddMaxHeight : OsmElementQuestType<MaxHeightAnswer> {
override val icon = R.drawable.ic_quest_max_height
override val achievements = listOf(CAR)

override fun getTitle(tags: Map<String, String>): Int {
val isBelowBridge = tags["amenity"] != "parking_entrance"
&& tags["barrier"] != "height_restrictor"
&& tags["tunnel"] == null
&& tags["covered"] == null
&& tags["man_made"] != "pipeline"
&& tags["railway"] != "level_crossing"
&& tags["building"] != "roof"
// only the "below the bridge" situation may need some context
return when {
isBelowBridge -> R.string.quest_maxheight_sign_below_bridge_title
else -> R.string.quest_maxheight_sign_title
}
}
override fun getTitle(tags: Map<String, String>) = R.string.quest_maxheight_sign_title

override fun getApplicableElements(mapData: MapDataWithGeometry): Iterable<Element> {
// amenity = parking_entrance nodes etc. only if they are a vertex in a road
Expand Down
1 change: 0 additions & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1145,7 +1145,6 @@ If any lanes are reserved for buses, please leave a note instead."</string>
<string name="quest_maxheight_title">"What’s the height limit here?"</string>
<string name="quest_maxheight_below_bridge_title">What’s the height limit below the bridge?</string>
<string name="quest_maxheight_sign_title">"What height limit is indicated here?"</string>
<string name="quest_maxheight_sign_below_bridge_title">What height limit is indicated below the bridge?</string>
<string name="quest_maxheight_answer_noSign">There is no sign…</string>
<string name="quest_maxheight_split_way_hint">If it doesn’t apply for the whole way, consider answering “%s”.</string>
<string name="quest_maxheight_unusualInput_confirmation_description">This height looks implausible. Are you sure that it is correct?</string>
Expand Down

0 comments on commit 5cafc50

Please sign in to comment.