Passport Tier 팬덤 단위 · 활동 Badge · 진화 Emblem · Eclipse 참여 기록
This commit is contained in:
@@ -314,6 +314,11 @@ enum PlanetHistoryKind {
|
||||
questReward,
|
||||
companyAdBonus,
|
||||
funding,
|
||||
|
||||
/// PASSPORT Stamp — Eclipse 성공 참여(FX §5.2) · 진화 기념 Emblem(상세정의 22장) · 최초 100명 Badge(별첨 B).
|
||||
eclipseSuccess,
|
||||
emblemEvolution,
|
||||
founderBadge,
|
||||
}
|
||||
|
||||
class PlanetHistoryEntry {
|
||||
@@ -325,6 +330,7 @@ class PlanetHistoryEntry {
|
||||
this.toStage,
|
||||
this.participationConfirmed = false,
|
||||
this.amount,
|
||||
this.memberNo,
|
||||
});
|
||||
final String id;
|
||||
final PlanetHistoryKind kind;
|
||||
@@ -333,6 +339,9 @@ class PlanetHistoryEntry {
|
||||
final int? toStage;
|
||||
final bool participationConfirmed;
|
||||
final int? amount;
|
||||
|
||||
/// 최초 100명 Badge 의 순번.
|
||||
final int? memberNo;
|
||||
}
|
||||
|
||||
class PlanetHistoryPage {
|
||||
|
||||
@@ -95,6 +95,9 @@ class _PlanetHistoryScreenState extends State<PlanetHistoryScreen> {
|
||||
PlanetHistoryKind.questReward => Icons.task_alt,
|
||||
PlanetHistoryKind.companyAdBonus => Icons.play_circle_outline,
|
||||
PlanetHistoryKind.funding => Icons.favorite_border,
|
||||
PlanetHistoryKind.eclipseSuccess => Icons.shield_outlined,
|
||||
PlanetHistoryKind.emblemEvolution => Icons.military_tech_outlined,
|
||||
PlanetHistoryKind.founderBadge => Icons.workspace_premium_outlined,
|
||||
}),
|
||||
title: Text(switch (item.kind) {
|
||||
PlanetHistoryKind.evolution => context.l10n.historyEvolution(
|
||||
@@ -107,6 +110,12 @@ class _PlanetHistoryScreenState extends State<PlanetHistoryScreen> {
|
||||
PlanetHistoryKind.questReward => context.l10n.historyQuest,
|
||||
PlanetHistoryKind.companyAdBonus => context.l10n.historyAdBonus,
|
||||
PlanetHistoryKind.funding => context.l10n.historyFunding,
|
||||
PlanetHistoryKind.eclipseSuccess =>
|
||||
context.l10n.historyEclipseSuccess,
|
||||
PlanetHistoryKind.emblemEvolution =>
|
||||
'${context.l10n.historyEmblemEvolution} · STAGE ${item.toStage ?? ''}',
|
||||
PlanetHistoryKind.founderBadge =>
|
||||
'${context.l10n.historyFounderBadge} · #${(item.memberNo ?? 0).toString().padLeft(3, '0')}',
|
||||
}),
|
||||
subtitle: Text(
|
||||
[
|
||||
|
||||
@@ -59,6 +59,9 @@ class FirestorePlanetRepository implements PlanetRepository {
|
||||
'quest_reward' => PlanetHistoryKind.questReward,
|
||||
'company_ad_bonus' => PlanetHistoryKind.companyAdBonus,
|
||||
'funding' => PlanetHistoryKind.funding,
|
||||
'eclipse_success' => PlanetHistoryKind.eclipseSuccess,
|
||||
'emblem_evolution' => PlanetHistoryKind.emblemEvolution,
|
||||
'badge_founder100' => PlanetHistoryKind.founderBadge,
|
||||
_ => null,
|
||||
};
|
||||
final date = row['occurredAt'] is String
|
||||
@@ -74,7 +77,12 @@ class FirestorePlanetRepository implements PlanetRepository {
|
||||
PlanetHistoryKind.companyAdBonus,
|
||||
PlanetHistoryKind.funding,
|
||||
].contains(kind);
|
||||
if (activity != personal ||
|
||||
final stamp = [
|
||||
PlanetHistoryKind.eclipseSuccess,
|
||||
PlanetHistoryKind.emblemEvolution,
|
||||
PlanetHistoryKind.founderBadge,
|
||||
].contains(kind);
|
||||
if ((activity || stamp) != personal ||
|
||||
(activity && (amount is! int || amount <= 0)) ||
|
||||
kind == null ||
|
||||
date == null ||
|
||||
@@ -95,7 +103,12 @@ class FirestorePlanetRepository implements PlanetRepository {
|
||||
occurredAt: date,
|
||||
amount: activity ? amount as int : null,
|
||||
fromStage: kind == PlanetHistoryKind.evolution ? from as int : null,
|
||||
toStage: kind == PlanetHistoryKind.evolution ? to as int : null,
|
||||
toStage: kind == PlanetHistoryKind.evolution
|
||||
? to as int
|
||||
: kind == PlanetHistoryKind.emblemEvolution && to is int
|
||||
? to
|
||||
: null,
|
||||
memberNo: row['memberNo'] is int ? row['memberNo'] as int : null,
|
||||
participationConfirmed:
|
||||
kind == PlanetHistoryKind.evolution &&
|
||||
row['participationConfirmed'] == true,
|
||||
|
||||
Reference in New Issue
Block a user