-
Notifications
You must be signed in to change notification settings - Fork 530
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ce28bf8
commit bf62f5a
Showing
30 changed files
with
4,481 additions
and
3,777 deletions.
There are no files selected for viewing
488 changes: 371 additions & 117 deletions
488
Habitica/src/main/java/com/habitrpg/android/habitica/api/ApiService.kt
Large diffs are not rendered by default.
Oops, something went wrong.
787 changes: 499 additions & 288 deletions
787
Habitica/src/main/java/com/habitrpg/android/habitica/data/ApiClient.kt
Large diffs are not rendered by default.
Oops, something went wrong.
1,028 changes: 535 additions & 493 deletions
1,028
...ica/src/main/java/com/habitrpg/android/habitica/data/implementation/UserRepositoryImpl.kt
Large diffs are not rendered by default.
Oops, something went wrong.
67 changes: 34 additions & 33 deletions
67
Habitica/src/main/java/com/habitrpg/android/habitica/models/shops/Shop.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 |
---|---|---|
@@ -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" | ||
} | ||
} |
Oops, something went wrong.