Add weight ratings and localize the Access field (and add it to items that should but don't have it)
This commit is contained in:
parent
40ba46fc6b
commit
329c45dad9
7 changed files with 69 additions and 29 deletions
|
|
@ -33,6 +33,12 @@ export class WeaponData extends CommonItemData {
|
|||
required: true,
|
||||
nullable: false,
|
||||
}),
|
||||
weight: new fields.StringField({
|
||||
blank: false,
|
||||
nullable: true,
|
||||
initial: null,
|
||||
options: Object.values(gameTerms.WeightRatings),
|
||||
}),
|
||||
};
|
||||
};
|
||||
|
||||
|
|
@ -94,7 +100,7 @@ export class WeaponData extends CommonItemData {
|
|||
{
|
||||
id: `access`,
|
||||
type: `dropdown`,
|
||||
label: `Access`,
|
||||
label: `RipCrypt.common.access`,
|
||||
path: `system.access`,
|
||||
value: this.access,
|
||||
limited: false,
|
||||
|
|
@ -104,7 +110,24 @@ export class WeaponData extends CommonItemData {
|
|||
value: ``,
|
||||
},
|
||||
...gameTerms.Access.map(opt => ({
|
||||
label: `RipCrypt.common.access.${opt}`,
|
||||
label: `RipCrypt.common.accessLevels.${opt}`,
|
||||
value: opt,
|
||||
})),
|
||||
],
|
||||
},
|
||||
{
|
||||
id: `weight`,
|
||||
type: `dropdown`,
|
||||
label: `RipCrypt.common.weightRating`,
|
||||
path: `system.weight`,
|
||||
value: this.weight,
|
||||
options: [
|
||||
{
|
||||
label: `RipCrypt.common.empty`,
|
||||
value: null,
|
||||
},
|
||||
...Object.values(gameTerms.WeightRatings).map(opt => ({
|
||||
label: `RipCrypt.common.weightRatings.${opt}`,
|
||||
value: opt,
|
||||
})),
|
||||
],
|
||||
|
|
@ -180,24 +203,6 @@ export class WeaponData extends CommonItemData {
|
|||
min: 0,
|
||||
},
|
||||
},
|
||||
{
|
||||
id: `access`,
|
||||
type: `dropdown`,
|
||||
label: `Access`,
|
||||
path: `system.access`,
|
||||
value: this.access,
|
||||
limited: false,
|
||||
options: [
|
||||
{
|
||||
label: `RipCrypt.common.empty`,
|
||||
value: ``,
|
||||
},
|
||||
...gameTerms.Access.map(opt => ({
|
||||
label: `RipCrypt.common.access.${opt}`,
|
||||
value: opt,
|
||||
})),
|
||||
],
|
||||
},
|
||||
);
|
||||
|
||||
if (this.parent.isEmbedded) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue