Adds lair actions, regional actions, and reactions to the data model. Renames baseSpeed to walkSpeed.
This commit is contained in:
@@ -9,7 +9,11 @@ import CoreData
|
||||
import SwiftUI
|
||||
|
||||
struct EditMonster: View {
|
||||
// TODO: add challengeRating/challengeRatingEnum and customChallengeRating maybe in basicInfo
|
||||
// TODO: Add challengeRating/challengeRatingEnum and customChallengeRating maybe in basicInfo
|
||||
// TODO: Add a way to edit the monster being blind. Probably a header section to the senses section.
|
||||
// TODO: Add a way to edit lair actions
|
||||
// TODO: Add a way to edit regional actions
|
||||
// TODO: Add a way to edit reactions
|
||||
@Environment(\.presentationMode) var presentationMode: Binding<PresentationMode>
|
||||
@Environment(\.managedObjectContext) private var viewContext
|
||||
|
||||
@@ -141,7 +145,7 @@ struct EditMonster_Previews: PreviewProvider {
|
||||
monster.hitDice = 6
|
||||
monster.hasCustomHP = true
|
||||
monster.customHP = "12 (1d10)+2"
|
||||
monster.baseSpeed = 5
|
||||
monster.walkSpeed = 5
|
||||
monster.burrowSpeed = 10
|
||||
monster.climbSpeed = 15
|
||||
monster.flySpeed = 20
|
||||
|
||||
@@ -12,12 +12,12 @@ struct EditSpeed: View {
|
||||
|
||||
var body: some View {
|
||||
List {
|
||||
// Number bound to monster.baseSpeed
|
||||
// Number bound to monster.walkSpeed
|
||||
MCStepperField(
|
||||
label: "Base",
|
||||
step: 5,
|
||||
suffix: " ft.",
|
||||
value: $monsterViewModel.baseSpeed)
|
||||
value: $monsterViewModel.walkSpeed)
|
||||
|
||||
// Number bound to monster.burrowSpeed
|
||||
MCStepperField(
|
||||
|
||||
@@ -293,6 +293,10 @@ struct MonsterDetailView: View {
|
||||
}
|
||||
|
||||
struct MonsterDetailWrapper: View {
|
||||
// TODO: Add display for when the monster is blind
|
||||
// TODO: Add display for lair actions
|
||||
// TODO: Add display for regional actions
|
||||
// TODO: Add display for reactions
|
||||
let kTextColor: Color = Color(hex: 0x982818)
|
||||
|
||||
@ObservedObject var monster: Monster
|
||||
@@ -330,7 +334,7 @@ struct MonsterDetailWrapper_Previews: PreviewProvider {
|
||||
monster.hitDice = 6
|
||||
monster.hasCustomHP = true
|
||||
monster.customHP = "12 (1d10)+2"
|
||||
monster.baseSpeed = 5
|
||||
monster.walkSpeed = 5
|
||||
monster.burrowSpeed = 10
|
||||
monster.climbSpeed = 15
|
||||
monster.flySpeed = 20
|
||||
|
||||
Reference in New Issue
Block a user