diff --git a/app/src/androidMain/kotlin/de/westnordost/streetcomplete/osm/Places.kt b/app/src/androidMain/kotlin/de/westnordost/streetcomplete/osm/Places.kt index 83fb80a28fd..b5efb94f1e0 100644 --- a/app/src/androidMain/kotlin/de/westnordost/streetcomplete/osm/Places.kt +++ b/app/src/androidMain/kotlin/de/westnordost/streetcomplete/osm/Places.kt @@ -6,14 +6,17 @@ import de.westnordost.streetcomplete.data.osm.mapdata.Element /** Return whether this element is a kind of place, regardless whether it is currently vacant or * not */ -fun Element.isPlaceOrDisusedPlace(): Boolean = - isPlace() || isDisusedPlace() +fun Element.isKindOfPlace(): Boolean = + isPlace() || isDisusedPlace() || isAbandonedPlace() /** Return whether this element is a kind of disused or vacant place */ fun Element.isDisusedPlace(): Boolean = IS_VACANT_PLACE_EXPRESSION.matches(this) || this.asIfItWasnt("disused")?.let { IS_PLACE_EXPRESSION.matches(it) } == true +fun Element.isAbandonedPlace(): Boolean = + this.asIfItWasnt("abandoned")?.let { IS_PLACE_EXPRESSION.matches(it) } == true + fun Element.isPlace(): Boolean = IS_PLACE_EXPRESSION.matches(this) diff --git a/app/src/androidMain/kotlin/de/westnordost/streetcomplete/osm/Things.kt b/app/src/androidMain/kotlin/de/westnordost/streetcomplete/osm/Things.kt index eca20203e76..0127ac545b3 100644 --- a/app/src/androidMain/kotlin/de/westnordost/streetcomplete/osm/Things.kt +++ b/app/src/androidMain/kotlin/de/westnordost/streetcomplete/osm/Things.kt @@ -4,8 +4,8 @@ import de.westnordost.streetcomplete.data.elementfilter.toElementFilterExpressio import de.westnordost.streetcomplete.data.osm.mapdata.Element /** Return whether this element is a kind of thing, regardless whether it is disused or not */ -fun Element.isThingOrDisusedThing(): Boolean = - isThing() || isDisusedThing() +fun Element.isKindOfThing(): Boolean = + isThing() || isDisusedThing() || isAbandonedThing() fun Element.isThing(): Boolean = IS_THING_EXPRESSION.matches(this) @@ -13,6 +13,9 @@ fun Element.isThing(): Boolean = fun Element.isDisusedThing(): Boolean = this.asIfItWasnt("disused")?.let { IS_THING_EXPRESSION.matches(it) } == true +fun Element.isAbandonedThing(): Boolean = + this.asIfItWasnt("abandoned")?.let { IS_THING_EXPRESSION.matches(it) } == true + /** Small map features that are often mapped as points and usually cannot be entered. * * To demarcate this category from others, the following are not included: diff --git a/app/src/androidMain/kotlin/de/westnordost/streetcomplete/overlays/Style.kt b/app/src/androidMain/kotlin/de/westnordost/streetcomplete/overlays/Style.kt index 73bc81c4dd8..a28d344b59d 100644 --- a/app/src/androidMain/kotlin/de/westnordost/streetcomplete/overlays/Style.kt +++ b/app/src/androidMain/kotlin/de/westnordost/streetcomplete/overlays/Style.kt @@ -39,4 +39,6 @@ data class PointStyle( val label: String? = null, /** color to use for the icon */ val color: String? = null, + /** night mode color for the icon */ + val nightColor: String? = null, ) : Style diff --git a/app/src/androidMain/kotlin/de/westnordost/streetcomplete/overlays/places/PlacesOverlay.kt b/app/src/androidMain/kotlin/de/westnordost/streetcomplete/overlays/places/PlacesOverlay.kt index 674d9b17de3..b3702fa0ffe 100644 --- a/app/src/androidMain/kotlin/de/westnordost/streetcomplete/overlays/places/PlacesOverlay.kt +++ b/app/src/androidMain/kotlin/de/westnordost/streetcomplete/overlays/places/PlacesOverlay.kt @@ -7,8 +7,10 @@ import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.data.osm.mapdata.Node import de.westnordost.streetcomplete.data.osm.mapdata.filter import de.westnordost.streetcomplete.data.user.achievements.EditTypeAchievement +import de.westnordost.streetcomplete.osm.asIfItWasnt +import de.westnordost.streetcomplete.osm.isAbandonedPlace import de.westnordost.streetcomplete.osm.isDisusedPlace -import de.westnordost.streetcomplete.osm.isPlaceOrDisusedPlace +import de.westnordost.streetcomplete.osm.isKindOfPlace import de.westnordost.streetcomplete.overlays.Color import de.westnordost.streetcomplete.overlays.Overlay import de.westnordost.streetcomplete.overlays.PointStyle @@ -36,17 +38,25 @@ class PlacesOverlay(private val getFeature: (Element) -> Feature?) : Overlay { override fun getStyledElements(mapData: MapDataWithGeometry) = mapData .asSequence() - .filter { it.isPlaceOrDisusedPlace() } - .map { element -> - // show disused places always with the icon for "disused shop" icon - val icon = getFeature(element)?.icon?.let { presetIconIndex[it] } - ?: if (element.isDisusedPlace()) R.drawable.preset_fas_store_alt_slash else null - ?: R.drawable.preset_maki_shop + .filter { it.isKindOfPlace() } + .mapNotNull { element -> + val feature = getFeature(element) + ?: element.asIfItWasnt("disused")?.let { getFeature(it) } + ?: element.asIfItWasnt("abandoned")?.let { getFeature(it) } + ?: return@mapNotNull null + + val icon = feature.icon?.let { presetIconIndex[it] } ?: R.drawable.preset_maki_shop val label = getNameLabel(element.tags) val style = if (element is Node) { - PointStyle(icon, label) + PointStyle(icon, label, + if (element.isDisusedPlace()) "#606269" + else if (element.isAbandonedPlace()) "#B06269" + else null, + if (element.isDisusedPlace()) "#aaaaaf" + else if (element.isAbandonedPlace()) "#ffaaaa" + else null) } else { PolygonStyle(Color.INVISIBLE, icon, label) } @@ -63,5 +73,5 @@ class PlacesOverlay(private val getFeature: (Element) -> Feature?) : Overlay { override fun createForm(element: Element?) = // this check is necessary because the form shall not be shown for entrances - if (element == null || element.isPlaceOrDisusedPlace()) PlacesOverlayForm() else null + if (element == null || element.isKindOfPlace()) PlacesOverlayForm() else null } diff --git a/app/src/androidMain/kotlin/de/westnordost/streetcomplete/overlays/places/PlacesOverlayForm.kt b/app/src/androidMain/kotlin/de/westnordost/streetcomplete/overlays/places/PlacesOverlayForm.kt index ac851e5d8e8..227fa93db4d 100644 --- a/app/src/androidMain/kotlin/de/westnordost/streetcomplete/overlays/places/PlacesOverlayForm.kt +++ b/app/src/androidMain/kotlin/de/westnordost/streetcomplete/overlays/places/PlacesOverlayForm.kt @@ -20,6 +20,7 @@ import de.westnordost.streetcomplete.databinding.FragmentOverlayPlacesBinding import de.westnordost.streetcomplete.osm.POPULAR_PLACE_FEATURE_IDS import de.westnordost.streetcomplete.osm.applyReplacePlaceTo import de.westnordost.streetcomplete.osm.applyTo +import de.westnordost.streetcomplete.osm.asIfItWasnt import de.westnordost.streetcomplete.osm.isDisusedPlace import de.westnordost.streetcomplete.osm.isPlace import de.westnordost.streetcomplete.osm.localized_name.LocalizedName @@ -80,6 +81,7 @@ class PlacesOverlayForm : AbstractOverlayForm() { return getFeatureDictionaryFeature(element) ?: if (element.isDisusedPlace()) vacantShopFeature else null + ?: getAbandonedFeatureDictionaryFeature(element) ?: BaseFeature( id = "shop/unknown", names = listOf(requireContext().getString(R.string.unknown_shop_title)), @@ -101,6 +103,13 @@ class PlacesOverlayForm : AbstractOverlayForm() { ).firstOrNull { it.toElement().isPlace() } } + private fun getAbandonedFeatureDictionaryFeature(element: Element): Feature? { + val abandonedElement = element.asIfItWasnt("abandoned") ?: return null + val abandonedFeature = getFeatureDictionaryFeature(abandonedElement) ?: return null + val abandonedLabel = resources.getString(R.string.abandoned).uppercase() + return abandonedFeature.toPrefixedFeature("abandoned", abandonedLabel) + } + override fun onViewCreated(view: View, savedInstanceState: Bundle?) { super.onViewCreated(view, savedInstanceState) diff --git a/app/src/androidMain/kotlin/de/westnordost/streetcomplete/overlays/things/ThingsOverlay.kt b/app/src/androidMain/kotlin/de/westnordost/streetcomplete/overlays/things/ThingsOverlay.kt index 4e205964477..3c3342c8695 100644 --- a/app/src/androidMain/kotlin/de/westnordost/streetcomplete/overlays/things/ThingsOverlay.kt +++ b/app/src/androidMain/kotlin/de/westnordost/streetcomplete/overlays/things/ThingsOverlay.kt @@ -7,7 +7,11 @@ import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.data.osm.mapdata.Node import de.westnordost.streetcomplete.data.user.achievements.EditTypeAchievement import de.westnordost.streetcomplete.osm.asIfItWasnt -import de.westnordost.streetcomplete.osm.isThingOrDisusedThing +import de.westnordost.streetcomplete.osm.isAbandonedPlace +import de.westnordost.streetcomplete.osm.isAbandonedThing +import de.westnordost.streetcomplete.osm.isDisusedPlace +import de.westnordost.streetcomplete.osm.isDisusedThing +import de.westnordost.streetcomplete.osm.isKindOfThing import de.westnordost.streetcomplete.overlays.Color import de.westnordost.streetcomplete.overlays.Overlay import de.westnordost.streetcomplete.overlays.PointStyle @@ -26,18 +30,23 @@ class ThingsOverlay(private val getFeature: (Element) -> Feature?) : Overlay { override fun getStyledElements(mapData: MapDataWithGeometry) = mapData .asSequence() - .filter { it.isThingOrDisusedThing() } + .filter { it.isKindOfThing() } .mapNotNull { element -> - // show disused things with the same icon as normal things because they usually look - // similar (a disused telephone booth still looks like a telephone booth, etc.) val feature = getFeature(element) ?: element.asIfItWasnt("disused")?.let { getFeature(it) } + ?: element.asIfItWasnt("abandoned")?.let { getFeature(it) } ?: return@mapNotNull null val icon = feature.icon?.let { presetIconIndex[it] } ?: R.drawable.preset_maki_marker_stroked val style = if (element is Node) { - PointStyle(icon) + PointStyle(icon, null, + if (element.isDisusedThing()) "#606269" + else if (element.isAbandonedThing()) "#B06269" + else null, + if (element.isDisusedThing()) "#9999AF" + else if (element.isAbandonedThing()) "#FF99AF" + else null) } else { PolygonStyle(Color.INVISIBLE, icon) } diff --git a/app/src/androidMain/kotlin/de/westnordost/streetcomplete/overlays/things/ThingsOverlayForm.kt b/app/src/androidMain/kotlin/de/westnordost/streetcomplete/overlays/things/ThingsOverlayForm.kt index 6e3680b97aa..572470e0aa7 100644 --- a/app/src/androidMain/kotlin/de/westnordost/streetcomplete/overlays/things/ThingsOverlayForm.kt +++ b/app/src/androidMain/kotlin/de/westnordost/streetcomplete/overlays/things/ThingsOverlayForm.kt @@ -54,6 +54,7 @@ class ThingsOverlayForm : AbstractOverlayForm() { return getFeatureDictionaryFeature(element) ?: getDisusedFeatureDictionaryFeature(element) + ?: getAbandonedFeatureDictionaryFeature(element) ?: BaseFeature( id = "thing/unknown", names = listOf(requireContext().getString(R.string.unknown_object)), @@ -69,6 +70,12 @@ class ThingsOverlayForm : AbstractOverlayForm() { val disusedLabel = resources.getString(R.string.disused).uppercase() return disusedFeature.toPrefixedFeature("disused", disusedLabel) } + private fun getAbandonedFeatureDictionaryFeature(element: Element): Feature? { + val abandonedElement = element.asIfItWasnt("abandoned") ?: return null + val abandonedFeature = getFeatureDictionaryFeature(abandonedElement) ?: return null + val abandonedLabel = resources.getString(R.string.abandoned).uppercase() + return abandonedFeature.toPrefixedFeature("abandoned", abandonedLabel) + } private fun getFeatureDictionaryFeature(element: Element): Feature? { val languages = getLanguagesForFeatureDictionary(resources.configuration) diff --git a/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/AbstractOsmQuestForm.kt b/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/AbstractOsmQuestForm.kt index a814f876415..b3cafda8616 100644 --- a/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/AbstractOsmQuestForm.kt +++ b/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/AbstractOsmQuestForm.kt @@ -43,7 +43,7 @@ import de.westnordost.streetcomplete.data.quest.QuestKey import de.westnordost.streetcomplete.data.visiblequests.HideQuestController import de.westnordost.streetcomplete.data.visiblequests.QuestsHiddenController import de.westnordost.streetcomplete.osm.applyReplacePlaceTo -import de.westnordost.streetcomplete.osm.isPlaceOrDisusedPlace +import de.westnordost.streetcomplete.osm.isKindOfPlace import de.westnordost.streetcomplete.osm.ALL_PATHS import de.westnordost.streetcomplete.osm.ALL_ROADS import de.westnordost.streetcomplete.quests.custom.CustomQuestList @@ -71,7 +71,6 @@ import kotlinx.datetime.DateTimeUnit import kotlinx.datetime.LocalDate import kotlinx.datetime.plus import kotlinx.datetime.toJavaLocalDate -import kotlinx.serialization.encodeToString import kotlinx.serialization.json.Json import org.koin.android.ext.android.inject import org.koin.core.qualifier.named @@ -336,7 +335,7 @@ abstract class AbstractOsmQuestForm : AbstractQuestForm(), IsShowingQuestDeta } protected fun replacePlace(extra: Boolean = true) { - if (element.isPlaceOrDisusedPlace()) { + if (element.isKindOfPlace()) { ShopGoneDialog( requireContext(), element, diff --git a/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/accepts_cards/AddAcceptsCards.kt b/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/accepts_cards/AddAcceptsCards.kt index 50c30d724f3..daa45e5adcb 100644 --- a/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/accepts_cards/AddAcceptsCards.kt +++ b/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/accepts_cards/AddAcceptsCards.kt @@ -7,7 +7,7 @@ import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType import de.westnordost.streetcomplete.data.user.achievements.EditTypeAchievement.CITIZEN import de.westnordost.streetcomplete.osm.Tags -import de.westnordost.streetcomplete.osm.isPlaceOrDisusedPlace +import de.westnordost.streetcomplete.osm.isKindOfPlace import de.westnordost.streetcomplete.util.ktx.toYesNo class AddAcceptsCards : OsmFilterQuestType() { @@ -34,7 +34,7 @@ class AddAcceptsCards : OsmFilterQuestType() { override fun getTitle(tags: Map) = R.string.quest_accepts_cards override fun getHighlightedElements(element: Element, getMapData: () -> MapDataWithGeometry) = - getMapData().asSequence().filter { it.isPlaceOrDisusedPlace() } + getMapData().asSequence().filter { it.isKindOfPlace() } override fun createForm() = AddAcceptsCardsForm() diff --git a/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/accepts_cash/AddAcceptsCash.kt b/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/accepts_cash/AddAcceptsCash.kt index 79033870ff5..2109d01cabd 100644 --- a/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/accepts_cash/AddAcceptsCash.kt +++ b/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/accepts_cash/AddAcceptsCash.kt @@ -8,7 +8,7 @@ import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType import de.westnordost.streetcomplete.data.quest.NoCountriesExcept import de.westnordost.streetcomplete.data.user.achievements.EditTypeAchievement.CITIZEN import de.westnordost.streetcomplete.osm.Tags -import de.westnordost.streetcomplete.osm.isPlaceOrDisusedPlace +import de.westnordost.streetcomplete.osm.isKindOfPlace import de.westnordost.streetcomplete.quests.YesNoQuestForm import de.westnordost.streetcomplete.util.ktx.toYesNo @@ -66,7 +66,7 @@ class AddAcceptsCash : OsmFilterQuestType() { override fun getTitle(tags: Map) = R.string.quest_accepts_cash_title2 override fun getHighlightedElements(element: Element, getMapData: () -> MapDataWithGeometry) = - getMapData().asSequence().filter { it.isPlaceOrDisusedPlace() } + getMapData().asSequence().filter { it.isKindOfPlace() } override fun createForm() = YesNoQuestForm() diff --git a/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/air_conditioning/AddAirConditioning.kt b/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/air_conditioning/AddAirConditioning.kt index d1aa14dca76..0394595ae54 100644 --- a/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/air_conditioning/AddAirConditioning.kt +++ b/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/air_conditioning/AddAirConditioning.kt @@ -7,7 +7,7 @@ import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType import de.westnordost.streetcomplete.data.user.achievements.EditTypeAchievement.CITIZEN import de.westnordost.streetcomplete.osm.Tags -import de.westnordost.streetcomplete.osm.isPlaceOrDisusedPlace +import de.westnordost.streetcomplete.osm.isKindOfPlace import de.westnordost.streetcomplete.quests.YesNoQuestForm import de.westnordost.streetcomplete.util.ktx.toYesNo @@ -33,7 +33,7 @@ class AddAirConditioning : OsmFilterQuestType() { override fun getTitle(tags: Map) = R.string.quest_airConditioning_title override fun getHighlightedElements(element: Element, getMapData: () -> MapDataWithGeometry) = - getMapData().asSequence().filter { it.isPlaceOrDisusedPlace() } + getMapData().asSequence().filter { it.isKindOfPlace() } override fun createForm() = YesNoQuestForm() diff --git a/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/bike_shop/AddBicyclePump.kt b/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/bike_shop/AddBicyclePump.kt index 5d691764460..52268e8060f 100644 --- a/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/bike_shop/AddBicyclePump.kt +++ b/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/bike_shop/AddBicyclePump.kt @@ -7,7 +7,7 @@ import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType import de.westnordost.streetcomplete.data.user.achievements.EditTypeAchievement.BICYCLIST import de.westnordost.streetcomplete.osm.Tags -import de.westnordost.streetcomplete.osm.isPlaceOrDisusedPlace +import de.westnordost.streetcomplete.osm.isKindOfPlace import de.westnordost.streetcomplete.osm.updateWithCheckDate import de.westnordost.streetcomplete.quests.YesNoQuestForm import de.westnordost.streetcomplete.util.ktx.toYesNo @@ -31,7 +31,7 @@ class AddBicyclePump : OsmFilterQuestType() { override fun getTitle(tags: Map) = R.string.quest_air_pump_bicycle_shop_title override fun getHighlightedElements(element: Element, getMapData: () -> MapDataWithGeometry) = - getMapData().asSequence().filter { it.isPlaceOrDisusedPlace() } + getMapData().asSequence().filter { it.isKindOfPlace() } override fun createForm() = YesNoQuestForm() diff --git a/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/bike_shop/AddBikeRepairAvailability.kt b/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/bike_shop/AddBikeRepairAvailability.kt index 23e02759f2d..009fa22d7a9 100644 --- a/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/bike_shop/AddBikeRepairAvailability.kt +++ b/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/bike_shop/AddBikeRepairAvailability.kt @@ -7,7 +7,7 @@ import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType import de.westnordost.streetcomplete.data.user.achievements.EditTypeAchievement.BICYCLIST import de.westnordost.streetcomplete.osm.Tags -import de.westnordost.streetcomplete.osm.isPlaceOrDisusedPlace +import de.westnordost.streetcomplete.osm.isKindOfPlace import de.westnordost.streetcomplete.osm.updateWithCheckDate import de.westnordost.streetcomplete.quests.YesNoQuestForm import de.westnordost.streetcomplete.util.ktx.toYesNo @@ -32,7 +32,7 @@ class AddBikeRepairAvailability : OsmFilterQuestType() { override fun getTitle(tags: Map) = R.string.quest_bicycle_shop_repair_title override fun getHighlightedElements(element: Element, getMapData: () -> MapDataWithGeometry) = - getMapData().asSequence().filter { it.isPlaceOrDisusedPlace() } + getMapData().asSequence().filter { it.isKindOfPlace() } override fun createForm() = YesNoQuestForm() diff --git a/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/bike_shop/AddSecondHandBicycleAvailability.kt b/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/bike_shop/AddSecondHandBicycleAvailability.kt index a248f463ff8..454788237e4 100644 --- a/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/bike_shop/AddSecondHandBicycleAvailability.kt +++ b/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/bike_shop/AddSecondHandBicycleAvailability.kt @@ -7,7 +7,7 @@ import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType import de.westnordost.streetcomplete.data.user.achievements.EditTypeAchievement.BICYCLIST import de.westnordost.streetcomplete.osm.Tags -import de.westnordost.streetcomplete.osm.isPlaceOrDisusedPlace +import de.westnordost.streetcomplete.osm.isKindOfPlace import de.westnordost.streetcomplete.osm.updateWithCheckDate class AddSecondHandBicycleAvailability : OsmFilterQuestType() { @@ -35,7 +35,7 @@ class AddSecondHandBicycleAvailability : OsmFilterQuestType) = R.string.quest_bicycle_shop_second_hand_title override fun getHighlightedElements(element: Element, getMapData: () -> MapDataWithGeometry) = - getMapData().asSequence().filter { it.isPlaceOrDisusedPlace() } + getMapData().asSequence().filter { it.isKindOfPlace() } override fun createForm() = AddSecondHandBicycleAvailabilityForm() diff --git a/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/diet_type/AddGlutenFree.kt b/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/diet_type/AddGlutenFree.kt index 39afd657c92..9254defe29f 100644 --- a/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/diet_type/AddGlutenFree.kt +++ b/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/diet_type/AddGlutenFree.kt @@ -7,7 +7,7 @@ import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType import de.westnordost.streetcomplete.data.user.achievements.EditTypeAchievement.CITIZEN import de.westnordost.streetcomplete.osm.Tags -import de.westnordost.streetcomplete.osm.isPlaceOrDisusedPlace +import de.westnordost.streetcomplete.osm.isKindOfPlace import de.westnordost.streetcomplete.osm.updateWithCheckDate class AddGlutenFree : OsmFilterQuestType() { @@ -37,7 +37,7 @@ class AddGlutenFree : OsmFilterQuestType() { override fun getTitle(tags: Map) = R.string.quest_dietType_glutenfree_name_title override fun getHighlightedElements(element: Element, getMapData: () -> MapDataWithGeometry) = - getMapData().asSequence().filter { it.isPlaceOrDisusedPlace() } + getMapData().asSequence().filter { it.isKindOfPlace() } override fun createForm() = AddDietTypeForm() diff --git a/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/diet_type/AddHalal.kt b/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/diet_type/AddHalal.kt index 2a4d724dc35..922d082c538 100644 --- a/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/diet_type/AddHalal.kt +++ b/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/diet_type/AddHalal.kt @@ -7,7 +7,7 @@ import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType import de.westnordost.streetcomplete.data.user.achievements.EditTypeAchievement.CITIZEN import de.westnordost.streetcomplete.osm.Tags -import de.westnordost.streetcomplete.osm.isPlaceOrDisusedPlace +import de.westnordost.streetcomplete.osm.isKindOfPlace import de.westnordost.streetcomplete.osm.updateWithCheckDate class AddHalal : OsmFilterQuestType() { @@ -35,7 +35,7 @@ class AddHalal : OsmFilterQuestType() { override fun getTitle(tags: Map) = R.string.quest_dietType_halal_name_title2 override fun getHighlightedElements(element: Element, getMapData: () -> MapDataWithGeometry) = - getMapData().asSequence().filter { it.isPlaceOrDisusedPlace() } + getMapData().asSequence().filter { it.isKindOfPlace() } override fun createForm() = AddDietTypeForm() diff --git a/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/diet_type/AddKosher.kt b/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/diet_type/AddKosher.kt index 0aeabc3afaa..c6a81aad2b6 100644 --- a/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/diet_type/AddKosher.kt +++ b/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/diet_type/AddKosher.kt @@ -7,7 +7,7 @@ import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType import de.westnordost.streetcomplete.data.user.achievements.EditTypeAchievement.CITIZEN import de.westnordost.streetcomplete.osm.Tags -import de.westnordost.streetcomplete.osm.isPlaceOrDisusedPlace +import de.westnordost.streetcomplete.osm.isKindOfPlace import de.westnordost.streetcomplete.osm.updateWithCheckDate class AddKosher : OsmFilterQuestType() { @@ -36,7 +36,7 @@ class AddKosher : OsmFilterQuestType() { override fun getTitle(tags: Map) = R.string.quest_dietType_kosher_name_title2 override fun getHighlightedElements(element: Element, getMapData: () -> MapDataWithGeometry) = - getMapData().asSequence().filter { it.isPlaceOrDisusedPlace() } + getMapData().asSequence().filter { it.isKindOfPlace() } override fun createForm() = AddDietTypeForm() diff --git a/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/diet_type/AddVegan.kt b/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/diet_type/AddVegan.kt index dc42eb78eff..1a77f6e8224 100644 --- a/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/diet_type/AddVegan.kt +++ b/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/diet_type/AddVegan.kt @@ -8,7 +8,7 @@ import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType import de.westnordost.streetcomplete.data.user.achievements.EditTypeAchievement.CITIZEN import de.westnordost.streetcomplete.data.user.achievements.EditTypeAchievement.VEG import de.westnordost.streetcomplete.osm.Tags -import de.westnordost.streetcomplete.osm.isPlaceOrDisusedPlace +import de.westnordost.streetcomplete.osm.isKindOfPlace import de.westnordost.streetcomplete.osm.updateWithCheckDate class AddVegan : OsmFilterQuestType() { @@ -41,7 +41,7 @@ class AddVegan : OsmFilterQuestType() { override fun getTitle(tags: Map) = R.string.quest_dietType_vegan_title2 override fun getHighlightedElements(element: Element, getMapData: () -> MapDataWithGeometry) = - getMapData().asSequence().filter { it.isPlaceOrDisusedPlace() } + getMapData().asSequence().filter { it.isKindOfPlace() } override fun createForm() = AddDietTypeForm() diff --git a/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/diet_type/AddVegetarian.kt b/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/diet_type/AddVegetarian.kt index 186fa72afba..47d9ccc9a63 100644 --- a/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/diet_type/AddVegetarian.kt +++ b/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/diet_type/AddVegetarian.kt @@ -8,7 +8,7 @@ import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType import de.westnordost.streetcomplete.data.user.achievements.EditTypeAchievement.CITIZEN import de.westnordost.streetcomplete.data.user.achievements.EditTypeAchievement.VEG import de.westnordost.streetcomplete.osm.Tags -import de.westnordost.streetcomplete.osm.isPlaceOrDisusedPlace +import de.westnordost.streetcomplete.osm.isKindOfPlace import de.westnordost.streetcomplete.osm.updateWithCheckDate class AddVegetarian : OsmFilterQuestType() { @@ -37,7 +37,7 @@ class AddVegetarian : OsmFilterQuestType() { override fun getTitle(tags: Map) = R.string.quest_dietType_vegetarian_title2 override fun getHighlightedElements(element: Element, getMapData: () -> MapDataWithGeometry) = - getMapData().asSequence().filter { it.isPlaceOrDisusedPlace() } + getMapData().asSequence().filter { it.isKindOfPlace() } override fun createForm() = AddDietTypeForm() diff --git a/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/hairdresser/AddHairdresserCustomers.kt b/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/hairdresser/AddHairdresserCustomers.kt index 49376fc66de..651224a881f 100644 --- a/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/hairdresser/AddHairdresserCustomers.kt +++ b/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/hairdresser/AddHairdresserCustomers.kt @@ -7,7 +7,7 @@ import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType import de.westnordost.streetcomplete.data.user.achievements.EditTypeAchievement.CITIZEN import de.westnordost.streetcomplete.osm.Tags -import de.westnordost.streetcomplete.osm.isPlaceOrDisusedPlace +import de.westnordost.streetcomplete.osm.isKindOfPlace class AddHairdresserCustomers : OsmFilterQuestType() { @@ -29,7 +29,7 @@ class AddHairdresserCustomers : OsmFilterQuestType() { override fun getTitle(tags: Map) = R.string.quest_hairdresser_title override fun getHighlightedElements(element: Element, getMapData: () -> MapDataWithGeometry) = - getMapData().asSequence().filter { it.isPlaceOrDisusedPlace() } + getMapData().asSequence().filter { it.isKindOfPlace() } override fun createForm() = AddHairdresserCustomersForm() diff --git a/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/level/AddLevelForm.kt b/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/level/AddLevelForm.kt index 0df123f47cc..7668a7f33d4 100644 --- a/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/level/AddLevelForm.kt +++ b/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/level/AddLevelForm.kt @@ -8,7 +8,7 @@ import de.westnordost.streetcomplete.data.osm.edits.MapDataWithEditsSource import de.westnordost.streetcomplete.data.osm.geometry.ElementGeometry import de.westnordost.streetcomplete.data.osm.mapdata.Element import de.westnordost.streetcomplete.databinding.QuestLevelBinding -import de.westnordost.streetcomplete.osm.isPlaceOrDisusedPlace +import de.westnordost.streetcomplete.osm.isKindOfPlace import de.westnordost.streetcomplete.osm.level.Level import de.westnordost.streetcomplete.osm.level.levelsIntersect import de.westnordost.streetcomplete.osm.level.parseLevelsOrNull @@ -58,11 +58,11 @@ class AddLevelForm : AbstractOsmQuestForm() { val shopsWithLevels = if (prefs.getBoolean(PREF_MORE_LEVELS, false)) mapData.filter { e -> e.tags["level"] != null - && (e.isPlaceOrDisusedPlace() || getIcon(featureDictionary, e) != null) + && (e.isKindOfPlace() || getIcon(featureDictionary, e) != null) } else mapData.filter { - it.tags["level"] != null && it.isPlaceOrDisusedPlace() + it.tags["level"] != null && it.isKindOfPlace() } shopElementsAndGeometry = shopsWithLevels.mapNotNull { e -> diff --git a/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/opening_hours/AddOpeningHours.kt b/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/opening_hours/AddOpeningHours.kt index 4b77108e0ca..a2031090626 100644 --- a/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/opening_hours/AddOpeningHours.kt +++ b/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/opening_hours/AddOpeningHours.kt @@ -14,7 +14,7 @@ import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.data.osm.osmquests.OsmElementQuestType import de.westnordost.streetcomplete.data.user.achievements.EditTypeAchievement.CITIZEN import de.westnordost.streetcomplete.osm.Tags -import de.westnordost.streetcomplete.osm.isPlaceOrDisusedPlace +import de.westnordost.streetcomplete.osm.isKindOfPlace import de.westnordost.streetcomplete.osm.opening_hours.parser.isSupportedOpeningHours import de.westnordost.streetcomplete.osm.updateCheckDateForKey import de.westnordost.streetcomplete.osm.updateWithCheckDate @@ -170,7 +170,7 @@ class AddOpeningHours( } override fun getHighlightedElements(element: Element, getMapData: () -> MapDataWithGeometry) = - getMapData().asSequence().filter { it.isPlaceOrDisusedPlace() } + getMapData().asSequence().filter { it.isKindOfPlace() } override fun createForm() = AddOpeningHoursForm() diff --git a/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/opening_hours_signed/CheckOpeningHoursSigned.kt b/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/opening_hours_signed/CheckOpeningHoursSigned.kt index 9a3d796b550..b460d4f2f46 100644 --- a/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/opening_hours_signed/CheckOpeningHoursSigned.kt +++ b/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/opening_hours_signed/CheckOpeningHoursSigned.kt @@ -10,7 +10,7 @@ import de.westnordost.streetcomplete.data.osm.osmquests.OsmElementQuestType import de.westnordost.streetcomplete.data.user.achievements.EditTypeAchievement.CITIZEN import de.westnordost.streetcomplete.osm.Tags import de.westnordost.streetcomplete.osm.getLastCheckDateKeys -import de.westnordost.streetcomplete.osm.isPlaceOrDisusedPlace +import de.westnordost.streetcomplete.osm.isKindOfPlace import de.westnordost.streetcomplete.osm.setCheckDateForKey import de.westnordost.streetcomplete.osm.toCheckDate import de.westnordost.streetcomplete.osm.updateCheckDateForKey @@ -57,7 +57,7 @@ class CheckOpeningHoursSigned( filter.matches(element) override fun getHighlightedElements(element: Element, getMapData: () -> MapDataWithGeometry) = - getMapData().asSequence().filter { it.isPlaceOrDisusedPlace() } + getMapData().asSequence().filter { it.isKindOfPlace() } override fun createForm() = YesNoQuestForm() diff --git a/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/place_name/AddPlaceName.kt b/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/place_name/AddPlaceName.kt index 5ae51f124f0..801f7d26495 100644 --- a/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/place_name/AddPlaceName.kt +++ b/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/place_name/AddPlaceName.kt @@ -10,7 +10,7 @@ import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.data.osm.osmquests.OsmElementQuestType import de.westnordost.streetcomplete.data.user.achievements.EditTypeAchievement.CITIZEN import de.westnordost.streetcomplete.osm.Tags -import de.westnordost.streetcomplete.osm.isPlaceOrDisusedPlace +import de.westnordost.streetcomplete.osm.isKindOfPlace import de.westnordost.streetcomplete.osm.localized_name.applyTo import de.westnordost.streetcomplete.quests.fullElementSelectionDialog import de.westnordost.streetcomplete.quests.questPrefix @@ -54,7 +54,7 @@ class AddPlaceName( filter.matches(element) && getFeature(element) != null override fun getHighlightedElements(element: Element, getMapData: () -> MapDataWithGeometry) = - getMapData().asSequence().filter { it.isPlaceOrDisusedPlace() } + getMapData().asSequence().filter { it.isKindOfPlace() } override fun createForm() = AddPlaceNameForm() diff --git a/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/seating/AddSeating.kt b/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/seating/AddSeating.kt index ba3558fc4bd..47a8f463561 100644 --- a/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/seating/AddSeating.kt +++ b/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/seating/AddSeating.kt @@ -7,7 +7,7 @@ import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType import de.westnordost.streetcomplete.data.user.achievements.EditTypeAchievement.CITIZEN import de.westnordost.streetcomplete.osm.Tags -import de.westnordost.streetcomplete.osm.isPlaceOrDisusedPlace +import de.westnordost.streetcomplete.osm.isKindOfPlace import de.westnordost.streetcomplete.util.ktx.toYesNo class AddSeating : OsmFilterQuestType() { @@ -31,7 +31,7 @@ class AddSeating : OsmFilterQuestType() { override fun getTitle(tags: Map) = R.string.quest_seating_name_title override fun getHighlightedElements(element: Element, getMapData: () -> MapDataWithGeometry) = - getMapData().asSequence().filter { it.isPlaceOrDisusedPlace() } + getMapData().asSequence().filter { it.isKindOfPlace() } override fun createForm() = AddSeatingForm() diff --git a/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/shop_type/CheckShopExistence.kt b/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/shop_type/CheckShopExistence.kt index 410451756d6..06b15a219a8 100644 --- a/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/shop_type/CheckShopExistence.kt +++ b/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/shop_type/CheckShopExistence.kt @@ -11,7 +11,7 @@ import de.westnordost.streetcomplete.data.user.achievements.EditTypeAchievement. import de.westnordost.streetcomplete.osm.LAST_CHECK_DATE_KEYS import de.westnordost.streetcomplete.osm.Tags import de.westnordost.streetcomplete.osm.isPlace -import de.westnordost.streetcomplete.osm.isPlaceOrDisusedPlace +import de.westnordost.streetcomplete.osm.isKindOfPlace import de.westnordost.streetcomplete.osm.updateCheckDate class CheckShopExistence( @@ -52,7 +52,7 @@ class CheckShopExistence( element.isPlace() override fun getHighlightedElements(element: Element, getMapData: () -> MapDataWithGeometry) = - getMapData().asSequence().filter { it.isPlaceOrDisusedPlace() } + getMapData().asSequence().filter { it.isKindOfPlace() } override fun createForm() = CheckShopExistenceForm() diff --git a/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/shop_type/CheckShopType.kt b/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/shop_type/CheckShopType.kt index 3995cf2317c..3bd9d005ccd 100644 --- a/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/shop_type/CheckShopType.kt +++ b/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/shop_type/CheckShopType.kt @@ -12,7 +12,7 @@ import de.westnordost.streetcomplete.osm.Tags import de.westnordost.streetcomplete.osm.applyReplacePlaceTo import de.westnordost.streetcomplete.osm.isDisusedPlace import de.westnordost.streetcomplete.osm.isPlace -import de.westnordost.streetcomplete.osm.isPlaceOrDisusedPlace +import de.westnordost.streetcomplete.osm.isKindOfPlace import de.westnordost.streetcomplete.osm.updateCheckDate class CheckShopType : OsmElementQuestType { @@ -58,7 +58,7 @@ class CheckShopType : OsmElementQuestType { !element.isPlace() override fun getHighlightedElements(element: Element, getMapData: () -> MapDataWithGeometry) = - getMapData().asSequence().filter { it.isPlaceOrDisusedPlace() } + getMapData().asSequence().filter { it.isKindOfPlace() } override fun createForm() = ShopTypeForm() diff --git a/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/shop_type/SpecifyShopType.kt b/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/shop_type/SpecifyShopType.kt index 15d4fb0484c..3dd1f19fa07 100644 --- a/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/shop_type/SpecifyShopType.kt +++ b/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/shop_type/SpecifyShopType.kt @@ -8,7 +8,7 @@ import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType import de.westnordost.streetcomplete.data.user.achievements.EditTypeAchievement.CITIZEN import de.westnordost.streetcomplete.osm.Tags import de.westnordost.streetcomplete.osm.applyReplacePlaceTo -import de.westnordost.streetcomplete.osm.isPlaceOrDisusedPlace +import de.westnordost.streetcomplete.osm.isKindOfPlace import de.westnordost.streetcomplete.osm.removeCheckDates import de.westnordost.streetcomplete.osm.removePlaceRelatedTags @@ -43,7 +43,7 @@ class SpecifyShopType : OsmFilterQuestType() { override fun getTitle(tags: Map) = R.string.quest_shop_type_title2 override fun getHighlightedElements(element: Element, getMapData: () -> MapDataWithGeometry) = - getMapData().asSequence().filter { it.isPlaceOrDisusedPlace() } + getMapData().asSequence().filter { it.isKindOfPlace() } override fun createForm() = ShopTypeForm() diff --git a/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/smoking/AddSmoking.kt b/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/smoking/AddSmoking.kt index 56b1b023a8f..17359739f72 100644 --- a/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/smoking/AddSmoking.kt +++ b/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/smoking/AddSmoking.kt @@ -7,7 +7,7 @@ import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType import de.westnordost.streetcomplete.data.user.achievements.EditTypeAchievement.CITIZEN import de.westnordost.streetcomplete.osm.Tags -import de.westnordost.streetcomplete.osm.isPlaceOrDisusedPlace +import de.westnordost.streetcomplete.osm.isKindOfPlace import de.westnordost.streetcomplete.osm.updateWithCheckDate class AddSmoking : OsmFilterQuestType() { @@ -48,7 +48,7 @@ class AddSmoking : OsmFilterQuestType() { override fun getTitle(tags: Map) = R.string.quest_smoking_title2 override fun getHighlightedElements(element: Element, getMapData: () -> MapDataWithGeometry) = - getMapData().asSequence().filter { it.isPlaceOrDisusedPlace() } + getMapData().asSequence().filter { it.isKindOfPlace() } override fun createForm() = SmokingAllowedForm() diff --git a/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/swimming_pool_availability/AddSwimmingPoolAvailability.kt b/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/swimming_pool_availability/AddSwimmingPoolAvailability.kt index 7b577e3d44a..dab9c682482 100644 --- a/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/swimming_pool_availability/AddSwimmingPoolAvailability.kt +++ b/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/swimming_pool_availability/AddSwimmingPoolAvailability.kt @@ -7,7 +7,6 @@ import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.data.osm.mapdata.filter import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType import de.westnordost.streetcomplete.osm.Tags -import de.westnordost.streetcomplete.osm.isPlaceOrDisusedPlace import de.westnordost.streetcomplete.osm.updateWithCheckDate class AddSwimmingPoolAvailability : OsmFilterQuestType() { diff --git a/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/wheelchair_access/AddWheelchairAccessBusiness.kt b/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/wheelchair_access/AddWheelchairAccessBusiness.kt index 010a94be804..cd2a407e03d 100644 --- a/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/wheelchair_access/AddWheelchairAccessBusiness.kt +++ b/app/src/androidMain/kotlin/de/westnordost/streetcomplete/quests/wheelchair_access/AddWheelchairAccessBusiness.kt @@ -7,7 +7,7 @@ import de.westnordost.streetcomplete.data.osm.mapdata.MapDataWithGeometry import de.westnordost.streetcomplete.data.osm.osmquests.OsmFilterQuestType import de.westnordost.streetcomplete.data.user.achievements.EditTypeAchievement.WHEELCHAIR import de.westnordost.streetcomplete.osm.Tags -import de.westnordost.streetcomplete.osm.isPlaceOrDisusedPlace +import de.westnordost.streetcomplete.osm.isKindOfPlace class AddWheelchairAccessBusiness : OsmFilterQuestType() { @@ -122,7 +122,7 @@ class AddWheelchairAccessBusiness : OsmFilterQuestType() { override fun getTitle(tags: Map) = R.string.quest_wheelchairAccess_outside_title override fun getHighlightedElements(element: Element, getMapData: () -> MapDataWithGeometry) = - getMapData().asSequence().filter { it.isPlaceOrDisusedPlace() } + getMapData().asSequence().filter { it.isKindOfPlace() } override fun createForm() = WheelchairAccessForm() diff --git a/app/src/androidMain/kotlin/de/westnordost/streetcomplete/screens/main/map/components/StyleableOverlayMapComponent.kt b/app/src/androidMain/kotlin/de/westnordost/streetcomplete/screens/main/map/components/StyleableOverlayMapComponent.kt index 702884b3a7c..7cff0ce65a3 100644 --- a/app/src/androidMain/kotlin/de/westnordost/streetcomplete/screens/main/map/components/StyleableOverlayMapComponent.kt +++ b/app/src/androidMain/kotlin/de/westnordost/streetcomplete/screens/main/map/components/StyleableOverlayMapComponent.kt @@ -252,9 +252,16 @@ class StyleableOverlayMapComponent( is PointStyle -> { if (style.icon != null) { p.addProperty("icon", context.resources.getResourceEntryName(style.icon)) - val color = style.color ?: if (isNightMode) "#ccf" else "#124" + val color = + if (isNightMode) style.nightColor ?: style.color ?: "#ccf" + else style.color ?: "#124" p.addProperty("icon-color", color) - val haloColor = style.color?.let { getDarkenedColor(it) } ?: if (isNightMode) "#2e2e48" else "#fff" + val haloColor = + if (isNightMode) + style.nightColor?.let { getDarkenedColor(it) } + ?: style.color?.let { getDarkenedColor(it) } + ?: "#2e2e48" + else "#fff" p.addProperty("icon-halo-color", haloColor) } if (style.label != null) p.addProperty("label", style.label) @@ -384,7 +391,7 @@ class StyleableOverlayMapComponent( darkenedColors.getOrPut(color) { val rgb = color.toRgb() val hsv = rgb.toHsv() - val darkenedHsv = hsv.copy(value = hsv.value * 2 / 3) + val darkenedHsv = hsv.copy(value = hsv.value / 3) darkenedHsv.toRgb().toHexString() } diff --git a/app/src/androidMain/res/values-ast/strings.xml b/app/src/androidMain/res/values-ast/strings.xml index efa51d90dac..d1b2b5b1074 100644 --- a/app/src/androidMain/res/values-ast/strings.xml +++ b/app/src/androidMain/res/values-ast/strings.xml @@ -781,7 +781,7 @@ Repara en qu'esta aplicación solo pide'l númberu de portal d'un edificiu en sa "Esti tipu de xera ta desactivada de serie porque nun ye útil en dalgunes rexones y seguramente tengas d'entrar nel sitiu p'alcontrar la información y responder bien a les preguntes." "Los productos kosher han preparase d'una manera especial, hai axencias que los certifiquen denomaes \"kashrut\"." "Nun hai carril bici nengún equí." - "Pa completar la xera, como siempre; toca un llau de la vía, escueyi la respuesta y fai lo mesmo nel otru llau. + "Pa completar la xera, como siempre; toca un llau de la vía, escueyi la respuesta y fai lo mesmo nel otru llau. Repara en toles opciones disponibles: a veces nun ye tan obvio, como en víes d'un solu sentíu con dos direcciones de carril bici." "Marcando como que nun hai carril bici" @@ -1335,6 +1335,7 @@ Dalgunes capes tamién permiten añader datos que falten al traviés del marcado "Sitios" "Coses" "en desusu" + abandoned "Oxetu desconocíu" "¿Esti árbol tien fueya ancho o en forma d'aguya?" "Gas" @@ -1420,4 +1421,4 @@ El pisu d'arriba cuenta como «teyáu» si tien ventanes. Si hai cero pisos d'es "Hai señales que dexen dir en bici" "Ensin señales sobre dir en bici" "Si usáis capes, caún habría usar una diferente, yá que namás se dividen les misiones." - \ No newline at end of file + diff --git a/app/src/androidMain/res/values-el/strings.xml b/app/src/androidMain/res/values-el/strings.xml index 42ea08be992..19f0455e1b1 100644 --- a/app/src/androidMain/res/values-el/strings.xml +++ b/app/src/androidMain/res/values-el/strings.xml @@ -1332,6 +1332,7 @@ "Μέρη" "Πράγματα" "αχρησιμοποίητο" + εγκαταλειμμένο "Άγνωστο αντικείμενο" "Αυτό το δέντρο έχει βελόνες ή φύλλα;" "Καύσιμο" @@ -1447,4 +1448,4 @@ "Επικάλυψη" "Ενεργοποίηση αυτής της επικάλυψης;" "Δωρεάν και ανοιχτού κώδικα δρομολόγηση δημόσιων συγκοινωνιών με ουδέτερο πάροχο" - \ No newline at end of file + diff --git a/app/src/androidMain/res/values-en-rAU/strings.xml b/app/src/androidMain/res/values-en-rAU/strings.xml index e2fc65ac960..bd90e1aafe5 100644 --- a/app/src/androidMain/res/values-en-rAU/strings.xml +++ b/app/src/androidMain/res/values-en-rAU/strings.xml @@ -1346,6 +1346,7 @@ Additionally, some overlays allow you to add new data at the position of a displ "Places" "Things" "disused" + abandoned "Unknown object" "Does this tree have needles or leaves?" "Gas" @@ -1432,4 +1433,4 @@ A level counts as a roof level when its windows are in the roof. Subsequently, r "A sign allows cycling here" "No explicit sign about cycling here" "If you use overlays, each of you should use a different one, as only quests are split up." - \ No newline at end of file + diff --git a/app/src/androidMain/res/values-en/strings.xml b/app/src/androidMain/res/values-en/strings.xml index 2706856b811..3b869341ee2 100644 --- a/app/src/androidMain/res/values-en/strings.xml +++ b/app/src/androidMain/res/values-en/strings.xml @@ -1785,6 +1785,7 @@ Partially means that a wheelchair can enter and use the restroom, but no handrai Things disused + abandoned Unknown object Street parking diff --git a/app/src/androidMain/res/values/strings.xml b/app/src/androidMain/res/values/strings.xml index 6cd4fd5c6ac..68aa4dde0ab 100644 --- a/app/src/androidMain/res/values/strings.xml +++ b/app/src/androidMain/res/values/strings.xml @@ -1785,6 +1785,7 @@ Partially means that a wheelchair can enter and use the restroom, but no handrai Things disused + abandoned Unknown object Street parking diff --git a/build.gradle.kts b/build.gradle.kts index 5af847a9553..3af5502cf13 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -1,3 +1,8 @@ +buildscript { + val agp_version by extra("8.9.3") + val agp_version1 by extra("8.7.2") + val agp_version2 by extra("8.9.3") +} plugins { // this is necessary to avoid the plugins to be loaded multiple times // in each subproject's classloader diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index ca025c83a7c..2e6ed411b24 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,3 +1,4 @@ +#Sat Aug 09 11:18:26 EEST 2025 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-bin.zip