Skip to content

Commit

Permalink
format fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
phillipthelen committed Apr 22, 2024
1 parent ce28bf8 commit bf62f5a
Show file tree
Hide file tree
Showing 30 changed files with 4,481 additions and 3,777 deletions.
488 changes: 371 additions & 117 deletions Habitica/src/main/java/com/habitrpg/android/habitica/api/ApiService.kt

Large diffs are not rendered by default.

787 changes: 499 additions & 288 deletions Habitica/src/main/java/com/habitrpg/android/habitica/data/ApiClient.kt

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,33 +1,34 @@
package com.habitrpg.android.habitica.models.shops

import android.content.Context
import com.habitrpg.android.habitica.R

class Shop {
var identifier: String = ""
var text: String = ""
var notes: String = ""
var imageName: String = ""

var categories: MutableList<ShopCategory> = ArrayList()

val npcNameResource: Int
get() = when (identifier) {
MARKET -> R.string.market_owner
QUEST_SHOP -> R.string.questShop_owner
SEASONAL_SHOP -> R.string.seasonalShop_owner
TIME_TRAVELERS_SHOP -> R.string.timetravelers_owner
CUSTOMIZATIONS -> R.string.customizations_owner
else -> R.string.market_owner
}

fun getNpcName(context: Context): String = context.getString(npcNameResource)

companion object {
const val MARKET = "market"
const val QUEST_SHOP = "questShop"
const val TIME_TRAVELERS_SHOP = "timeTravelersShop"
const val SEASONAL_SHOP = "seasonalShop"
const val CUSTOMIZATIONS = "customizations"
}
}
package com.habitrpg.android.habitica.models.shops

import android.content.Context
import com.habitrpg.android.habitica.R

class Shop {
var identifier: String = ""
var text: String = ""
var notes: String = ""
var imageName: String = ""

var categories: MutableList<ShopCategory> = ArrayList()

val npcNameResource: Int
get() =
when (identifier) {
MARKET -> R.string.market_owner
QUEST_SHOP -> R.string.questShop_owner
SEASONAL_SHOP -> R.string.seasonalShop_owner
TIME_TRAVELERS_SHOP -> R.string.timetravelers_owner
CUSTOMIZATIONS -> R.string.customizations_owner
else -> R.string.market_owner
}

fun getNpcName(context: Context): String = context.getString(npcNameResource)

companion object {
const val MARKET = "market"
const val QUEST_SHOP = "questShop"
const val TIME_TRAVELERS_SHOP = "timeTravelersShop"
const val SEASONAL_SHOP = "seasonalShop"
const val CUSTOMIZATIONS = "customizations"
}
}
Loading

0 comments on commit bf62f5a

Please sign in to comment.