Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bbq fuel quest (Issue #4832) #5211

Merged
merged 8 commits into from
Oct 13, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import de.westnordost.streetcomplete.quests.barrier_type.AddBarrierOnPath
import de.westnordost.streetcomplete.quests.barrier_type.AddBarrierOnRoad
import de.westnordost.streetcomplete.quests.barrier_type.AddBarrierType
import de.westnordost.streetcomplete.quests.barrier_type.AddStileType
import de.westnordost.streetcomplete.quests.bbq_fuel.AddBBQFuel
import de.westnordost.streetcomplete.quests.bench_backrest.AddBenchBackrest
import de.westnordost.streetcomplete.quests.bike_parking_capacity.AddBikeParkingCapacity
import de.westnordost.streetcomplete.quests.bike_parking_cover.AddBikeParkingCover
Expand Down Expand Up @@ -353,6 +354,7 @@ fun questTypeRegistry(
66 to AddFireHydrantDiameter(),
67 to AddFireHydrantRef(),

160 to AddBBQFuel(),
/* ↓ 2.solvable when right in front of it but takes longer to input --------------------- */

// bike parking/rental: would be higher up if not for bike parking/rental capacity which is usually not solvable when moving past
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
package de.westnordost.streetcomplete.quests.bbq_fuel

import de.westnordost.streetcomplete.R
import de.westnordost.streetcomplete.data.osm.geometry.ElementGeometry
import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType
import de.westnordost.streetcomplete.data.user.achievements.EditTypeAchievement.OUTDOORS
import de.westnordost.streetcomplete.osm.Tags

class AddBBQFuel : OsmFilterQuestType<BBQFuel>() {
westnordost marked this conversation as resolved.
Show resolved Hide resolved

override val elementFilter = """
nodes, ways with
(
amenity = bbq
and !fuel
)
and access !~ no|private
qugebert marked this conversation as resolved.
Show resolved Hide resolved
"""


override val changesetComment = "Specify what grill is powered by"
qugebert marked this conversation as resolved.
Show resolved Hide resolved
override val wikiLink = "Key:amenity=bbq"
override val icon = R.drawable.ic_quest_bbq_fuel
override val achievements = listOf(OUTDOORS)

override fun getTitle(tags: Map<String, String>) = R.string.quest_bbq_fuel_title

override fun createForm() = AddBBQFuelForm()

override fun applyAnswerTo(answer: BBQFuel, tags: Tags, geometry: ElementGeometry, timestampEdited: Long) {
tags["fuel"] = answer.osmValue
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package de.westnordost.streetcomplete.quests.bbq_fuel

import de.westnordost.streetcomplete.R
import de.westnordost.streetcomplete.quests.AListQuestForm
import de.westnordost.streetcomplete.quests.TextItem

class AddBBQFuelForm : AListQuestForm<BBQFuel>() {

override val items = listOf(
TextItem(BBQFuel.WOOD, R.string.quest_bbq_fuel_wood),
TextItem(BBQFuel.ELECTRIC, R.string.quest_bbq_fuel_electric),
TextItem(BBQFuel.CHARCOAL, R.string.quest_bbq_fuel_charcoal),
)

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package de.westnordost.streetcomplete.quests.bbq_fuel

enum class BBQFuel(val osmValue: String) {
WOOD("wood"),
ELECTRIC("electric"),
CHARCOAL("charcoal")
}
20 changes: 20 additions & 0 deletions app/src/main/res/drawable/ic_quest_bbq_fuel.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="128dp"
android:height="128dp"
android:viewportWidth="128"
android:viewportHeight="128">
<path
android:pathData="m128,64c0,35.35 -28.65,64 -64,64 -35.35,0 -64,-28.65 -64,-64 0,-35.35 28.65,-64 64,-64 35.35,0 64,28.65 64,64"
android:strokeWidth=".2"
android:fillColor="#9bbe55"/>
<path
android:fillColor="#FF000000"
android:pathData="m49.24,28.68c-4.92,2.46 -9.84,2.46 -9.84,7.38 0,4.92 7.38,7.38 7.38,9.84 0,2.46 -3.28,4.92 -4.92,7.38 7.38,-2.46 9.84,-2.46 9.84,-7.38 0,-4.92 -4.92,-7.38 -7.38,-9.84 0,-2.46 4.1,-4.1 4.92,-7.38zM67.69,28.68c-4.92,2.46 -9.84,2.46 -9.84,7.38 0,4.92 7.38,7.38 7.38,9.84 0,2.46 -3.28,4.92 -4.92,7.38 7.38,-2.46 9.84,-2.46 9.84,-7.38 0,-4.92 -4.92,-7.38 -7.38,-9.84 0,-2.46 4.1,-4.1 4.92,-7.38zM86.15,28.68c-4.92,2.46 -9.84,2.46 -9.84,7.38 0,4.92 7.38,7.38 7.38,9.84 0,2.46 -3.28,4.92 -4.92,7.38 7.38,-2.46 9.84,-2.46 9.84,-7.38 0,-4.92 -4.92,-7.38 -7.38,-9.84 0,-2.46 4.1,-4.1 4.92,-7.38zM34.47,58.21l0,39.37l4.92,0L39.39,87.73l49.21,0l0,9.84l4.92,0L93.53,58.21c-19.68,0 -39.37,0 -59.05,0zM39.39,63.13L88.61,63.13L88.61,82.81L39.39,82.81ZM49.24,68.05c-2.72,0 -4.92,2.2 -4.92,4.92 0,2.72 2.2,4.92 4.92,4.92 2.72,0 4.92,-2.2 4.92,-4.92 0,-2.72 -2.2,-4.92 -4.92,-4.92zM64,68.05c-2.72,0 -4.92,2.2 -4.92,4.92 0,2.72 2.2,4.92 4.92,4.92 2.72,0 4.92,-2.2 4.92,-4.92 0,-2.72 -2.2,-4.92 -4.92,-4.92zM78.76,68.05c-2.72,0 -4.92,2.2 -4.92,4.92 0,2.72 2.2,4.92 4.92,4.92 2.72,0 4.92,-2.2 4.92,-4.92 0,-2.72 -2.2,-4.92 -4.92,-4.92z"
android:strokeWidth="4.92"/>
<path
android:fillColor="#FF000000"
android:pathData="m49.24,30.42c-4.92,2.46 -9.84,2.46 -9.84,7.38 0,4.92 7.38,7.38 7.38,9.84 0,2.46 -3.28,4.92 -4.92,7.38 7.38,-2.46 9.84,-2.46 9.84,-7.38 0,-4.92 -4.92,-7.38 -7.38,-9.84 0,-2.46 4.1,-4.1 4.92,-7.38zM67.69,30.42c-4.92,2.46 -9.84,2.46 -9.84,7.38 0,4.92 7.38,7.38 7.38,9.84 0,2.46 -3.28,4.92 -4.92,7.38 7.38,-2.46 9.84,-2.46 9.84,-7.38 0,-4.92 -4.92,-7.38 -7.38,-9.84 0,-2.46 4.1,-4.1 4.92,-7.38zM86.15,30.42c-4.92,2.46 -9.84,2.46 -9.84,7.38 0,4.92 7.38,7.38 7.38,9.84 0,2.46 -3.28,4.92 -4.92,7.38 7.38,-2.46 9.84,-2.46 9.84,-7.38 0,-4.92 -4.92,-7.38 -7.38,-9.84 0,-2.46 4.1,-4.1 4.92,-7.38zM34.47,59.95l0,39.37l4.92,0L39.39,89.48l49.21,0l0,9.84l4.92,0L93.53,59.95c-19.68,0 -39.37,0 -59.05,0zM39.39,64.87L88.61,64.87L88.61,84.56L39.39,84.56ZM49.24,69.79c-2.72,0 -4.92,2.2 -4.92,4.92 0,2.72 2.2,4.92 4.92,4.92 2.72,0 4.92,-2.2 4.92,-4.92 0,-2.72 -2.2,-4.92 -4.92,-4.92zM64,69.79c-2.72,0 -4.92,2.2 -4.92,4.92 0,2.72 2.2,4.92 4.92,4.92 2.72,0 4.92,-2.2 4.92,-4.92 0,-2.72 -2.2,-4.92 -4.92,-4.92zM78.76,69.79c-2.72,0 -4.92,2.2 -4.92,4.92 0,2.72 2.2,4.92 4.92,4.92 2.72,0 4.92,-2.2 4.92,-4.92 0,-2.72 -2.2,-4.92 -4.92,-4.92z"
android:strokeAlpha="0.403101"
android:strokeWidth="4.92"
android:fillAlpha="0.403101"/>
</vector>
6 changes: 6 additions & 0 deletions app/src/main/res/values-de/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,12 @@ Andernfalls kannst du eine alternative Tastatur im App Store herunterladen. Beli
<string name="quest_powerPolesMaterial_wood">"Holz"</string>
<string name="quest_powerPolesMaterial_metal">"Stahl"</string>
<string name="quest_powerPolesMaterial_concrete">"Beton"</string>

<string name="quest_bbq_fuel_title">Womit wird dieser Grill betrieben?</string>
westnordost marked this conversation as resolved.
Show resolved Hide resolved
<string name="quest_bbq_fuel_wood">Holz</string>
<string name="quest_bbq_fuel_electric">Elektrisch</string>
<string name="quest_bbq_fuel_charcoal">Holzkohle</string>

<string name="quest_maxspeed_answer_advisory_speed_limit">"Nur eine Richtgeschwindigkeit …"</string>
<string name="quest_address_house_name_label">"Hausname:"</string>
<string name="quest_buildingLevels_roofLevelsLabel2">"Dach­­­­geschosse"</string>
Expand Down
7 changes: 7 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1284,6 +1284,13 @@ If there are no signs along the whole street which apply for the highlighted sec
<string name="quest_powerPolesMaterial_metal">Steel</string>
<string name="quest_powerPolesMaterial_concrete">Concrete</string>


<string name="quest_bbq_fuel_title">What is this grill powered by?</string>
<string name="quest_bbq_fuel_wood">Wood</string>
<string name="quest_bbq_fuel_electric">Electric</string>
<string name="quest_bbq_fuel_charcoal">Charcoal</string>


<string name="quest_railway_crossing_barrier_title2">What barriers are used at this railway crossing?</string>
qugebert marked this conversation as resolved.
Show resolved Hide resolved
<string name="quest_railway_crossing_barrier_none2">No barriers</string>

Expand Down
3 changes: 2 additions & 1 deletion res/graphics/authors.txt
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,8 @@ quest/
barrier.svg Tobias Zwick (CC-BY-SA 4.0) (based on road_construction.svg)
barrier_on_path.svg Tobias Zwick (CC-BY-SA 4.0), adding road line by Mateusz Konieczny
barrier_on_road.svg Tobias Zwick (CC-BY-SA 4.0), adding road line by Mateusz Konieczny
beach.svg parts taken from beach_volleyball.svg by Adrien Pavie
bbq_fuel.svg based on https://github.com/gravitystorm/openstreetmap-carto/blob/master/symbols/amenity/bbq.svg (License: CC0 1.0)
beach.svg parts taken from beach_volleyball.svg by Adrien Pavie
beer.svg modified from Twemoji: U+1F37A
bench_poi.svg
bench_public_transport.svg
Expand Down
49 changes: 49 additions & 0 deletions res/graphics/quest/bbq_fuel.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.