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
|
|
@ -29,7 +29,8 @@
|
||||||
"thin-glim": "Thin Glim"
|
"thin-glim": "Thin Glim"
|
||||||
},
|
},
|
||||||
"ability": "Ability",
|
"ability": "Ability",
|
||||||
"access": {
|
"access": "Access",
|
||||||
|
"accessLevels": {
|
||||||
"Common": "Common",
|
"Common": "Common",
|
||||||
"Uncommon": "Uncommon",
|
"Uncommon": "Uncommon",
|
||||||
"Rare": "Rare",
|
"Rare": "Rare",
|
||||||
|
|
@ -100,7 +101,13 @@
|
||||||
"singular": "Weapon",
|
"singular": "Weapon",
|
||||||
"plural": "Weapons"
|
"plural": "Weapons"
|
||||||
},
|
},
|
||||||
"wear": "Wear"
|
"wear": "Wear",
|
||||||
|
"weightRating": "Weight",
|
||||||
|
"weightRatings": {
|
||||||
|
"light": "Light",
|
||||||
|
"modest": "Modest",
|
||||||
|
"heavy": "Heavy"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"setting": {
|
"setting": {
|
||||||
"abbrAccess": {
|
"abbrAccess": {
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ export class AmmoData extends CommonItemData {
|
||||||
{
|
{
|
||||||
id: `access`,
|
id: `access`,
|
||||||
type: `dropdown`,
|
type: `dropdown`,
|
||||||
label: `Access`,
|
label: `RipCrypt.common.access`,
|
||||||
path: `system.access`,
|
path: `system.access`,
|
||||||
value: this.access,
|
value: this.access,
|
||||||
limited: false,
|
limited: false,
|
||||||
|
|
@ -39,7 +39,7 @@ export class AmmoData extends CommonItemData {
|
||||||
value: ``,
|
value: ``,
|
||||||
},
|
},
|
||||||
...gameTerms.Access.map(opt => ({
|
...gameTerms.Access.map(opt => ({
|
||||||
label: `RipCrypt.common.access.${opt}`,
|
label: `RipCrypt.common.accessLevels.${opt}`,
|
||||||
value: opt,
|
value: opt,
|
||||||
})),
|
})),
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,12 @@ export class ArmourData extends CommonItemData {
|
||||||
required: true,
|
required: true,
|
||||||
nullable: false,
|
nullable: false,
|
||||||
}),
|
}),
|
||||||
|
weight: new fields.StringField({
|
||||||
|
blank: false,
|
||||||
|
nullable: true,
|
||||||
|
initial: null,
|
||||||
|
options: Object.values(gameTerms.WeightRatings),
|
||||||
|
}),
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
@ -119,7 +125,7 @@ export class ArmourData extends CommonItemData {
|
||||||
{
|
{
|
||||||
id: `access`,
|
id: `access`,
|
||||||
type: `dropdown`,
|
type: `dropdown`,
|
||||||
label: `Access`,
|
label: `RipCrypt.common.access`,
|
||||||
path: `system.access`,
|
path: `system.access`,
|
||||||
value: this.access,
|
value: this.access,
|
||||||
limited: false,
|
limited: false,
|
||||||
|
|
@ -129,7 +135,24 @@ export class ArmourData extends CommonItemData {
|
||||||
value: ``,
|
value: ``,
|
||||||
},
|
},
|
||||||
...gameTerms.Access.map(opt => ({
|
...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,
|
value: opt,
|
||||||
})),
|
})),
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@ export class GoodData extends CommonItemData {
|
||||||
{
|
{
|
||||||
id: `access`,
|
id: `access`,
|
||||||
type: `dropdown`,
|
type: `dropdown`,
|
||||||
label: `Access`,
|
label: `RipCrypt.common.access`,
|
||||||
path: `system.access`,
|
path: `system.access`,
|
||||||
value: this.access,
|
value: this.access,
|
||||||
limited: false,
|
limited: false,
|
||||||
|
|
@ -54,7 +54,7 @@ export class GoodData extends CommonItemData {
|
||||||
value: ``,
|
value: ``,
|
||||||
},
|
},
|
||||||
...gameTerms.Access.map(opt => ({
|
...gameTerms.Access.map(opt => ({
|
||||||
label: `RipCrypt.common.access.${opt}`,
|
label: `RipCrypt.common.accessLevels.${opt}`,
|
||||||
value: opt,
|
value: opt,
|
||||||
})),
|
})),
|
||||||
],
|
],
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,12 @@ export class WeaponData extends CommonItemData {
|
||||||
required: true,
|
required: true,
|
||||||
nullable: false,
|
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`,
|
id: `access`,
|
||||||
type: `dropdown`,
|
type: `dropdown`,
|
||||||
label: `Access`,
|
label: `RipCrypt.common.access`,
|
||||||
path: `system.access`,
|
path: `system.access`,
|
||||||
value: this.access,
|
value: this.access,
|
||||||
limited: false,
|
limited: false,
|
||||||
|
|
@ -104,7 +110,24 @@ export class WeaponData extends CommonItemData {
|
||||||
value: ``,
|
value: ``,
|
||||||
},
|
},
|
||||||
...gameTerms.Access.map(opt => ({
|
...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,
|
value: opt,
|
||||||
})),
|
})),
|
||||||
],
|
],
|
||||||
|
|
@ -180,24 +203,6 @@ export class WeaponData extends CommonItemData {
|
||||||
min: 0,
|
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) {
|
if (this.parent.isEmbedded) {
|
||||||
|
|
|
||||||
|
|
@ -42,4 +42,9 @@ export const gameTerms = Object.preventExtensions({
|
||||||
`shield`,
|
`shield`,
|
||||||
`good`,
|
`good`,
|
||||||
]),
|
]),
|
||||||
|
WeightRatings: Object.freeze({
|
||||||
|
LIGHT: `light`,
|
||||||
|
MODEST: `modest`,
|
||||||
|
HEAVY: `heavy`,
|
||||||
|
}),
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@
|
||||||
grid-template-columns: auto 200px;
|
grid-template-columns: auto 200px;
|
||||||
column-gap: var(--col-gap);
|
column-gap: var(--col-gap);
|
||||||
row-gap: var(--row-gap);
|
row-gap: var(--row-gap);
|
||||||
max-width: 300px;
|
max-width: 350px;
|
||||||
|
|
||||||
padding: 8px;
|
padding: 8px;
|
||||||
background: var(--base-background);
|
background: var(--base-background);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue