Added slotFillerCondition field to class levels, same as in slot filler
This commit is contained in:
@@ -26,6 +26,12 @@ const ClassLevelSchema = createPropertySchema({
|
|||||||
defaultValue: 1,
|
defaultValue: 1,
|
||||||
max: STORAGE_LIMITS.levelMax,
|
max: STORAGE_LIMITS.levelMax,
|
||||||
},
|
},
|
||||||
|
// Filters out of UI if condition isn't met, but isn't otherwise enforced
|
||||||
|
slotFillerCondition: {
|
||||||
|
type: String,
|
||||||
|
optional: true,
|
||||||
|
max: STORAGE_LIMITS.calculation,
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const ComputedOnlyClassLevelSchema = createPropertySchema({
|
const ComputedOnlyClassLevelSchema = createPropertySchema({
|
||||||
|
|||||||
@@ -27,6 +27,15 @@
|
|||||||
@change="change('variableName', ...arguments)"
|
@change="change('variableName', ...arguments)"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
<text-field
|
||||||
|
v-if="context.isLibraryForm"
|
||||||
|
label="Condition"
|
||||||
|
hint="A caclulation to determine if this can be added to the character"
|
||||||
|
placeholder="Always active"
|
||||||
|
:value="model.slotFillerCondition"
|
||||||
|
:error-messages="errors.slotFillerCondition"
|
||||||
|
@change="change('slotFillerCondition', ...arguments)"
|
||||||
|
/>
|
||||||
|
|
||||||
<inline-computation-field
|
<inline-computation-field
|
||||||
label="Description"
|
label="Description"
|
||||||
@@ -54,6 +63,9 @@
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
mixins: [propertyFormMixin],
|
mixins: [propertyFormMixin],
|
||||||
|
inject: {
|
||||||
|
context: { default: {} }
|
||||||
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -15,7 +15,6 @@
|
|||||||
:error-messages="errors.name"
|
:error-messages="errors.name"
|
||||||
@change="change('name', ...arguments)"
|
@change="change('name', ...arguments)"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<text-area
|
<text-area
|
||||||
label="Description"
|
label="Description"
|
||||||
:value="model.description"
|
:value="model.description"
|
||||||
@@ -74,12 +73,8 @@
|
|||||||
<script lang="js">
|
<script lang="js">
|
||||||
import propertyFormMixin from '/imports/ui/properties/forms/shared/propertyFormMixin.js';
|
import propertyFormMixin from '/imports/ui/properties/forms/shared/propertyFormMixin.js';
|
||||||
import PROPERTIES from '/imports/constants/PROPERTIES.js';
|
import PROPERTIES from '/imports/constants/PROPERTIES.js';
|
||||||
import CalculationErrorList from '/imports/ui/properties/forms/shared/CalculationErrorList.vue';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
|
||||||
CalculationErrorList,
|
|
||||||
},
|
|
||||||
mixins: [propertyFormMixin],
|
mixins: [propertyFormMixin],
|
||||||
inject: {
|
inject: {
|
||||||
context: { default: {} }
|
context: { default: {} }
|
||||||
|
|||||||
@@ -15,6 +15,12 @@
|
|||||||
mono
|
mono
|
||||||
:value="model.variableName"
|
:value="model.variableName"
|
||||||
/>
|
/>
|
||||||
|
<property-field
|
||||||
|
v-if="!context.creatureId"
|
||||||
|
name="Condition"
|
||||||
|
mono
|
||||||
|
:value="model.slotFillerCondition"
|
||||||
|
/>
|
||||||
<property-description
|
<property-description
|
||||||
name="Description"
|
name="Description"
|
||||||
:model="model.description"
|
:model="model.description"
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
:value="model.slotQuantityFilled"
|
:value="model.slotQuantityFilled"
|
||||||
/>
|
/>
|
||||||
<property-field
|
<property-field
|
||||||
v-if="context.creatureId"
|
v-if="!context.creatureId"
|
||||||
name="Condition"
|
name="Condition"
|
||||||
mono
|
mono
|
||||||
:value="model.slotFillerCondition"
|
:value="model.slotFillerCondition"
|
||||||
|
|||||||
Reference in New Issue
Block a user