Adds Saving Throws to the data model and monster editor.

This commit is contained in:
2020-10-03 22:31:47 -07:00
parent fae10b17ed
commit 757f75657f
10 changed files with 634 additions and 151 deletions

View File

@@ -408,52 +408,99 @@
<rect key="frame" x="0.0" y="88" width="414" height="725"/>
<color key="backgroundColor" systemColor="systemBackgroundColor"/>
<prototypes>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="MCIntegerField" id="KwC-8P-1dy" userLabel="MCIntegerField" customClass="MCIntegerFieldTableViewCell">
<rect key="frame" x="0.0" y="28" width="414" height="43.5"/>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="MCRadioField" id="iSG-Tv-aCX" userLabel="MCRadioField" customClass="MCRadioFieldTableViewCell">
<rect key="frame" x="0.0" y="28" width="414" height="68"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="KwC-8P-1dy" id="Dwe-Tg-VQ6">
<rect key="frame" x="0.0" y="0.0" width="414" height="43.5"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="iSG-Tv-aCX" id="scU-nK-qiI">
<rect key="frame" x="0.0" y="0.0" width="414" height="68"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" textAlignment="natural" minimumFontSize="17" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="RCc-cF-BI3" userLabel="Text Field">
<rect key="frame" x="82" y="5" width="192" height="34"/>
<constraints>
<constraint firstAttribute="height" constant="34" id="8Nj-FL-Ab6"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits"/>
<connections>
<action selector="textFieldValueChanged:" destination="KwC-8P-1dy" eventType="valueChanged" id="5In-Xx-LJB"/>
</connections>
</textField>
<stepper opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" maximumValue="100" translatesAutoresizingMaskIntoConstraints="NO" id="vgc-Rg-Zc8">
<rect key="frame" x="294" y="6" width="100" height="32"/>
<constraints>
<constraint firstAttribute="height" constant="32" id="HhX-Qt-vVP"/>
<constraint firstAttribute="width" constant="100" id="Qn1-ca-Tsy"/>
</constraints>
<connections>
<action selector="stepperValueChanged:" destination="KwC-8P-1dy" eventType="valueChanged" id="BKh-dh-f3d"/>
</connections>
</stepper>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="7nN-Bo-Jgm">
<rect key="frame" x="20" y="11.5" width="42" height="21"/>
<constraints>
<constraint firstAttribute="height" constant="21" id="x72-wj-jT3"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" distribution="equalSpacing" translatesAutoresizingMaskIntoConstraints="NO" id="nTa-ey-RFM">
<rect key="frame" x="20" y="8" width="374" height="52"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="clip" baselineAdjustment="alignBaselines" minimumScaleFactor="0.25" translatesAutoresizingMaskIntoConstraints="NO" id="Sap-Qr-1ZU">
<rect key="frame" x="0.0" y="0.0" width="374" height="20.5"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<segmentedControl opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="top" segmentControlStyle="plain" selectedSegmentIndex="0" translatesAutoresizingMaskIntoConstraints="NO" id="rJq-eZ-wvm">
<rect key="frame" x="0.0" y="21" width="374" height="32"/>
<segments>
<segment title="First"/>
<segment title="Second"/>
</segments>
<connections>
<action selector="selectedSegmentChanged:" destination="iSG-Tv-aCX" eventType="valueChanged" id="k8p-F7-ILf"/>
</connections>
</segmentedControl>
</subviews>
</stackView>
</subviews>
<constraints>
<constraint firstItem="vgc-Rg-Zc8" firstAttribute="centerY" secondItem="Dwe-Tg-VQ6" secondAttribute="centerY" id="6as-ZA-8B4"/>
<constraint firstAttribute="trailingMargin" secondItem="vgc-Rg-Zc8" secondAttribute="trailing" id="GHC-1H-v20"/>
<constraint firstItem="7nN-Bo-Jgm" firstAttribute="centerY" secondItem="Dwe-Tg-VQ6" secondAttribute="centerY" id="Rcx-L4-hEN"/>
<constraint firstItem="7nN-Bo-Jgm" firstAttribute="leading" secondItem="Dwe-Tg-VQ6" secondAttribute="leadingMargin" id="SQY-8s-eLf"/>
<constraint firstItem="RCc-cF-BI3" firstAttribute="leading" secondItem="7nN-Bo-Jgm" secondAttribute="trailing" constant="20" id="So8-Uf-Zfa"/>
<constraint firstItem="vgc-Rg-Zc8" firstAttribute="leading" secondItem="RCc-cF-BI3" secondAttribute="trailing" constant="20" id="T1Y-Pj-gsO"/>
<constraint firstItem="RCc-cF-BI3" firstAttribute="centerY" secondItem="Dwe-Tg-VQ6" secondAttribute="centerY" id="ett-1I-J0L"/>
<constraint firstItem="nTa-ey-RFM" firstAttribute="top" secondItem="scU-nK-qiI" secondAttribute="top" constant="8" id="VT0-G5-ofZ"/>
<constraint firstAttribute="bottom" secondItem="nTa-ey-RFM" secondAttribute="bottom" constant="8" id="XR5-nT-N05"/>
<constraint firstItem="nTa-ey-RFM" firstAttribute="leading" secondItem="scU-nK-qiI" secondAttribute="leading" constant="20" id="oB6-ry-kjt"/>
<constraint firstAttribute="trailing" secondItem="nTa-ey-RFM" secondAttribute="trailing" constant="20" id="p7Q-Bn-sSi"/>
</constraints>
</tableViewCellContentView>
<connections>
<outlet property="labelView" destination="Sap-Qr-1ZU" id="qJ3-Wb-qrb"/>
<outlet property="segmentedControl" destination="rJq-eZ-wvm" id="gKh-IH-iQO"/>
</connections>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="MCIntegerField" id="KwC-8P-1dy" userLabel="MCIntegerField" customClass="MCIntegerFieldTableViewCell">
<rect key="frame" x="0.0" y="96" width="414" height="71.5"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="KwC-8P-1dy" id="Dwe-Tg-VQ6">
<rect key="frame" x="0.0" y="0.0" width="414" height="71.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="tqg-e0-rNO">
<rect key="frame" x="20" y="8" width="374" height="55.5"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="clip" baselineAdjustment="alignBaselines" minimumScaleFactor="0.25" translatesAutoresizingMaskIntoConstraints="NO" id="7nN-Bo-Jgm">
<rect key="frame" x="0.0" y="0.0" width="374" height="21"/>
<constraints>
<constraint firstAttribute="height" constant="21" id="x72-wj-jT3"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
</label>
<stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="5Hz-MY-MYZ">
<rect key="frame" x="0.0" y="21" width="374" height="34.5"/>
<subviews>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" textAlignment="natural" minimumFontSize="10" clearButtonMode="whileEditing" translatesAutoresizingMaskIntoConstraints="NO" id="RCc-cF-BI3" userLabel="Text Field">
<rect key="frame" x="0.0" y="0.0" width="280" height="34.5"/>
<constraints>
<constraint firstAttribute="height" constant="34" id="8Nj-FL-Ab6"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="14"/>
<textInputTraits key="textInputTraits"/>
<connections>
<action selector="textFieldValueChanged:" destination="KwC-8P-1dy" eventType="valueChanged" id="5In-Xx-LJB"/>
</connections>
</textField>
<stepper opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="750" verticalHuggingPriority="750" contentHorizontalAlignment="center" contentVerticalAlignment="center" maximumValue="100" translatesAutoresizingMaskIntoConstraints="NO" id="vgc-Rg-Zc8">
<rect key="frame" x="280" y="0.0" width="94" height="34.5"/>
<constraints>
<constraint firstAttribute="height" constant="34" id="HhX-Qt-vVP"/>
</constraints>
<connections>
<action selector="stepperValueChanged:" destination="KwC-8P-1dy" eventType="valueChanged" id="BKh-dh-f3d"/>
</connections>
</stepper>
</subviews>
</stackView>
</subviews>
</stackView>
</subviews>
<constraints>
<constraint firstAttribute="trailing" secondItem="tqg-e0-rNO" secondAttribute="trailing" constant="20" id="9U8-8r-ZOV"/>
<constraint firstItem="tqg-e0-rNO" firstAttribute="top" secondItem="Dwe-Tg-VQ6" secondAttribute="top" constant="8" id="Ctm-x1-7Uf"/>
<constraint firstAttribute="bottom" secondItem="tqg-e0-rNO" secondAttribute="bottom" constant="8" id="gHo-d9-oh1"/>
<constraint firstItem="tqg-e0-rNO" firstAttribute="leading" secondItem="Dwe-Tg-VQ6" secondAttribute="leading" constant="20" id="pSJ-yP-eoc"/>
</constraints>
</tableViewCellContentView>
<connections>
@@ -463,7 +510,7 @@
</connections>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="MCShortStringField" id="s66-ds-RzY" userLabel="MCShortStringField" customClass="MCShortStringFieldTableViewCell">
<rect key="frame" x="0.0" y="71.5" width="414" height="43.5"/>
<rect key="frame" x="0.0" y="167.5" width="414" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="s66-ds-RzY" id="hip-Sr-WMn">
<rect key="frame" x="0.0" y="0.0" width="414" height="43.5"/>
@@ -493,14 +540,14 @@
</connections>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="MCBooleanField" id="aNO-fN-IMT" userLabel="MCBooleanField" customClass="MCBooleanFieldTableViewCell">
<rect key="frame" x="0.0" y="115" width="414" height="43.5"/>
<rect key="frame" x="0.0" y="211" width="414" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="aNO-fN-IMT" id="S88-r0-N1u">
<rect key="frame" x="0.0" y="0.0" width="414" height="43.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="tsg-zB-HOv">
<rect key="frame" x="20" y="11.5" width="305" height="21"/>
<rect key="frame" x="20" y="11.5" width="305" height="20.5"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<nil key="textColor"/>
<nil key="highlightedColor"/>
@@ -529,14 +576,14 @@
</connections>
</tableViewCell>
<tableViewCell clipsSubviews="YES" contentMode="scaleToFill" preservesSuperviewLayoutMargins="YES" selectionStyle="default" indentationWidth="10" reuseIdentifier="MCSelectField" id="PQF-mC-UlI" userLabel="MCSelectField" customClass="MCSelectFieldTableViewCell">
<rect key="frame" x="0.0" y="158.5" width="414" height="37.5"/>
<rect key="frame" x="0.0" y="254.5" width="414" height="37.5"/>
<autoresizingMask key="autoresizingMask"/>
<tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" preservesSuperviewLayoutMargins="YES" insetsLayoutMarginsFromSafeArea="NO" tableViewCell="PQF-mC-UlI" id="Wcu-Sa-z2O">
<rect key="frame" x="0.0" y="0.0" width="414" height="37.5"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="lik-sI-94j" userLabel="Label View">
<rect key="frame" x="20" y="8" width="42" height="21.5"/>
<rect key="frame" x="20" y="8" width="41.5" height="21.5"/>
<constraints>
<constraint firstAttribute="height" constant="21" id="A1K-Wk-Nuf"/>
</constraints>
@@ -545,7 +592,7 @@
<nil key="highlightedColor"/>
</label>
<textField opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="DFa-Hd-laX" userLabel="Text Field">
<rect key="frame" x="82" y="2" width="312" height="34"/>
<rect key="frame" x="81.5" y="2" width="312.5" height="34"/>
<constraints>
<constraint firstAttribute="height" constant="34" id="zHt-9x-mSt"/>
</constraints>