Skip to content

Commit ee0cb04

Browse files
committed
✨ [feat] Hotel Tickets 교환 통화 UI 지원 추가
- Item에 canExchangeHotelTickets computed property 추가 - ItemBellsView에 hotelTickets 모드 추가 (아이콘: icon-hoteltickets) - ItemDetailInfoView에 Hotel Tickets 교환 가격 표시 로직 추가
1 parent eeaef20 commit ee0cb04

File tree

11 files changed

+55
-3
lines changed

11 files changed

+55
-3
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"images" : [
3+
{
4+
"idiom" : "universal",
5+
"scale" : "1x"
6+
},
7+
{
8+
"filename" : "icon-hoteltickets.png",
9+
"idiom" : "universal",
10+
"scale" : "2x"
11+
},
12+
{
13+
"idiom" : "universal",
14+
"scale" : "3x"
15+
}
16+
],
17+
"info" : {
18+
"author" : "xcode",
19+
"version" : 1
20+
}
21+
}
5.74 KB
Loading

Animal-Crossing-Wiki/Projects/App/Resources/en.lproj/Localizable.strings

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -528,6 +528,8 @@ Find the villagers you have visited and tap the home icon on the villager's page
528528
"Redd's Co-op Raffle" = "Redd's Co-op Raffle";
529529
"Wilbur" = "Wilbur";
530530
"Kapp'n" = "Kapp'n";
531+
"Hotel Souvenir Shop" = "Hotel Souvenir Shop";
532+
"Slumber Islands" = "Slumber Islands";
531533

532534
// MARK: - Source note
533535
"Source Note" = "Source Note";
@@ -1577,3 +1579,11 @@ Find the villagers you have visited and tap the home icon on the villager's page
15771579
"patternLargespike" = "📈 Large Spike";
15781580
"patternSmallspike" = "📉 Small Spike";
15791581
"patternDecreasing" = "👎 Decreasing";
1582+
1583+
// MARK: - Exchange Currency
1584+
"Heart Crystals" = "Heart Crystals";
1585+
"Nook Miles" = "Nook Miles";
1586+
"Poki" = "Poki";
1587+
"Nook Points" = "Nook Points";
1588+
"Bells" = "Bells";
1589+
"Hotel Tickets" = "Hotel Tickets";

Animal-Crossing-Wiki/Projects/App/Resources/ko.lproj/Localizable.strings

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -528,6 +528,8 @@
528528
"Redd's Co-op Raffle" = "여욱 노점";
529529
"Wilbur" = "로드리";
530530
"Kapp'n" = "갑돌";
531+
"Hotel Souvenir Shop" = "호텔 기념품 가게";
532+
"Slumber Islands" = "슬럼버 아일랜드";
531533

532534
// MARK: - Source note
533535
"Source Note" = "메모";
@@ -1582,3 +1584,11 @@
15821584
"patternLargespike" = "📈 큰폭 상승";
15831585
"patternSmallspike" = "📉 작은폭 상승";
15841586
"patternDecreasing" = "👎 계속 하락";
1587+
1588+
// MARK: - Exchange Currency
1589+
"Heart Crystals" = "하트 크리스탈";
1590+
"Nook Miles" = "너굴 마일";
1591+
"Poki" = "포키";
1592+
"Nook Points" = "너굴 포인트";
1593+
"Bells" = "벨";
1594+
"Hotel Tickets" = "호텔 티켓";

Animal-Crossing-Wiki/Projects/App/Sources/Models/Items/Item.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,10 @@ extension Item {
9999
exchangeCurrency == .poki || variations?.first?.exchangeCurrency == .poki
100100
}
101101

102+
var canExchangeHotelTickets: Bool {
103+
exchangeCurrency == .hotelTickets || variations?.first?.exchangeCurrency == .hotelTickets
104+
}
105+
102106
var isCritters: Bool {
103107
Category.critters.contains(category)
104108
}

Animal-Crossing-Wiki/Projects/App/Sources/Networking/Response/Furniture/HousewaresResponseDTO.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ enum ExchangeCurrency: String, Codable {
105105
case poki = "Poki"
106106
case nookPoints = "Nook Points"
107107
case bells = "Bells"
108+
case hotelTickets = "Hotel Tickets"
108109
}
109110

110111
enum HhaCategory: String, Codable {

Animal-Crossing-Wiki/Projects/App/Sources/Networking/Utilities/EnvironmentsVariable.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import Foundation
99

1010
enum EnvironmentsVariable {
11-
static let repoURL = "https://raw.githubusercontent.com/leeari95/animal-crossing/master/json/data/"
11+
static let repoURL = "https://raw.githubusercontent.com/leeari95/animal-crossing/release/3.0.0/json/data/"
1212
static let turnupURL = "https://api.ac-turnip.com/data/"
1313
static let acnhAPI = "https://acnhapi.com/v1/"
1414
}

Animal-Crossing-Wiki/Projects/App/Sources/Presentation/Catalog/Views/CatalogCell.swift

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,8 @@ extension CatalogCell {
118118
priceView = ItemBellsView(mode: .miles, price: price)
119119
} else if item.canExchangeNookPoints, let price = item.exchangePrice {
120120
priceView = ItemBellsView(mode: .point, price: price)
121+
} else if item.canExchangeHotelTickets, let price = item.exchangePrice {
122+
priceView = ItemBellsView(mode: .hotelTickets, price: price)
121123
} else if !Category.critters.contains(item.category), let buy = item.buy, buy != -1 {
122124
priceView = ItemBellsView(mode: .buy, price: buy)
123125
} else {

Animal-Crossing-Wiki/Projects/App/Sources/Presentation/Catalog/Views/ItemBellsView.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import UIKit
99

1010
final class ItemBellsView: UIView {
1111
enum Mode {
12-
case buy, sell, cj, flick, poki, miles, point
12+
case buy, sell, cj, flick, poki, miles, point, hotelTickets
1313

1414
var iconName: String {
1515
switch self {
@@ -20,6 +20,7 @@ final class ItemBellsView: UIView {
2020
case .poki: return "icon-poki"
2121
case .miles: return "icon-nookmiles"
2222
case .point: return "icon-nookpoint"
23+
case .hotelTickets: return "icon-hoteltickets"
2324
}
2425
}
2526
}

Animal-Crossing-Wiki/Projects/App/Sources/Presentation/Catalog/Views/ItemDetailInfoView.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,9 @@ final class ItemDetailInfoView: UIView {
139139
} else if item.canExchangeNookPoints, let price = item.exchangePrice {
140140
let price = ItemBellsView(mode: .point, price: price)
141141
infoStackView.addArrangedSubviews(price)
142+
} else if item.canExchangeHotelTickets, let price = item.exchangePrice {
143+
let price = ItemBellsView(mode: .hotelTickets, price: price)
144+
infoStackView.addArrangedSubviews(price)
142145
}
143146
case .reactions: return
144147
default: break

0 commit comments

Comments
 (0)