diff --git a/app/src/main/java/io/github/fate_grand_automata/ui/exit/BattleExit.kt b/app/src/main/java/io/github/fate_grand_automata/ui/exit/BattleExit.kt index fbc59068c..31c391ab6 100644 --- a/app/src/main/java/io/github/fate_grand_automata/ui/exit/BattleExit.kt +++ b/app/src/main/java/io/github/fate_grand_automata/ui/exit/BattleExit.kt @@ -77,6 +77,7 @@ private fun AutoBattle.ExitReason.text(): String = when (this) { AutoBattle.ExitReason.FirstClearRewards -> stringResource(R.string.first_clear_rewards) AutoBattle.ExitReason.Paused -> stringResource(R.string.script_paused) AutoBattle.ExitReason.StopAfterThisRun -> stringResource(R.string.stop_after_this_run) + AutoBattle.ExitReason.OutOfCommandSpells -> stringResource(id = R.string.p_stop_on_out_of_command_spell) } @Composable diff --git a/app/src/main/java/io/github/fate_grand_automata/ui/skill_maker/SkillMakerActivity.kt b/app/src/main/java/io/github/fate_grand_automata/ui/skill_maker/SkillMakerActivity.kt index 618075d55..4d45cc42b 100644 --- a/app/src/main/java/io/github/fate_grand_automata/ui/skill_maker/SkillMakerActivity.kt +++ b/app/src/main/java/io/github/fate_grand_automata/ui/skill_maker/SkillMakerActivity.kt @@ -12,6 +12,7 @@ import androidx.compose.runtime.getValue import androidx.compose.ui.res.stringResource import androidx.core.view.WindowCompat import dagger.hilt.android.AndroidEntryPoint +import androidx.compose.runtime.collectAsState import io.github.fate_grand_automata.R import io.github.fate_grand_automata.scripts.models.ServantTarget import io.github.fate_grand_automata.scripts.models.Skill diff --git a/app/src/main/java/io/github/fate_grand_automata/ui/skill_maker/SkillMakerCommandSpell.kt b/app/src/main/java/io/github/fate_grand_automata/ui/skill_maker/SkillMakerCommandSpell.kt index 547d76f96..f0870702b 100644 --- a/app/src/main/java/io/github/fate_grand_automata/ui/skill_maker/SkillMakerCommandSpell.kt +++ b/app/src/main/java/io/github/fate_grand_automata/ui/skill_maker/SkillMakerCommandSpell.kt @@ -48,7 +48,7 @@ fun SkillMakerCommandSpells( verticalAlignment = Alignment.CenterVertically ) { Skill.CommandSpell.list.forEach { - SkillButton( + CommandSpellButton( skill = it, color = colorResource(R.color.colorCommandSpell) ) { @@ -60,7 +60,7 @@ fun SkillMakerCommandSpells( } @Composable -fun RowScope.SkillButton( +private fun RowScope.CommandSpellButton( skill: Skill, color: Color, onClick: () -> Unit diff --git a/app/src/main/java/io/github/fate_grand_automata/ui/skill_maker/SkillMakerEntry.kt b/app/src/main/java/io/github/fate_grand_automata/ui/skill_maker/SkillMakerEntry.kt index 505b4c5c7..970be7c8b 100644 --- a/app/src/main/java/io/github/fate_grand_automata/ui/skill_maker/SkillMakerEntry.kt +++ b/app/src/main/java/io/github/fate_grand_automata/ui/skill_maker/SkillMakerEntry.kt @@ -33,6 +33,7 @@ sealed class SkillMakerEntry { is AutoSkillAction.ServantSkill -> toString(action.skill, action.targets) is AutoSkillAction.MasterSkill -> toString(action.skill, action.target) + is AutoSkillAction.CommandSpell -> toString(action.skill, action.target) is AutoSkillAction.TargetEnemy -> "t${action.enemy.autoSkillCode}" is AutoSkillAction.OrderChange -> "x${action.starting.autoSkillCode}${action.sub.autoSkillCode}" } diff --git a/app/src/main/java/io/github/fate_grand_automata/ui/skill_maker/SkillMakerTarget.kt b/app/src/main/java/io/github/fate_grand_automata/ui/skill_maker/SkillMakerTarget.kt index cf348ca25..23fe21b06 100644 --- a/app/src/main/java/io/github/fate_grand_automata/ui/skill_maker/SkillMakerTarget.kt +++ b/app/src/main/java/io/github/fate_grand_automata/ui/skill_maker/SkillMakerTarget.kt @@ -129,6 +129,7 @@ private fun TestSkillMaker( showKukulkan: Boolean = false, showSpaceIshtar: Boolean = false, showMelusine: Boolean = showEmiya + showTargetNone: Boolean = false ) { FGATheme { SkillMakerTarget( @@ -140,7 +141,8 @@ private fun TestSkillMaker( showKukulkan = showKukulkan, onKukulkan = {}, showMelusine = showMelusine, - onMelusine = {} + onMelusine = {}, + showTargetNone = showTargetNone ) } } \ No newline at end of file diff --git a/app/src/main/java/io/github/fate_grand_automata/ui/skill_maker/SkillMakerViewModel.kt b/app/src/main/java/io/github/fate_grand_automata/ui/skill_maker/SkillMakerViewModel.kt index a87db86c1..a8a96ddb7 100644 --- a/app/src/main/java/io/github/fate_grand_automata/ui/skill_maker/SkillMakerViewModel.kt +++ b/app/src/main/java/io/github/fate_grand_automata/ui/skill_maker/SkillMakerViewModel.kt @@ -18,6 +18,7 @@ import kotlinx.coroutines.flow.map import kotlinx.coroutines.flow.MutableStateFlow import kotlinx.coroutines.flow.SharingStarted import kotlinx.coroutines.flow.stateIn +import androidx.lifecycle.viewModelScope import javax.inject.Inject @HiltViewModel