diff --git a/css/ds4.css b/css/ds4.css index 183e02f9..aacb9252 100644 --- a/css/ds4.css +++ b/css/ds4.css @@ -376,7 +376,7 @@ } .ds4 .side-properties .side-property { - margin: 0; + margin: 2px 0; display: -webkit-box; display: -ms-flexbox; display: flex; @@ -394,9 +394,11 @@ font-weight: bold; } -.ds4 .side-properties .side-property input { +.ds4 .side-properties .side-property input, +.ds4 .side-properties .side-property select { text-align: right; -webkit-box-flex: 1; -ms-flex: 1; flex: 1; + width: calc(100% - 2px); } diff --git a/lang/en.json b/lang/en.json index 8aeab911..683e2baf 100644 --- a/lang/en.json +++ b/lang/en.json @@ -11,5 +11,11 @@ "DS4.AttackTypeRanged": "Ranged", "DS4.AttackTypeMeleeRanged": "Melee / Ranged", "DS4.Quantity": "Quantity", - "DS4.PriceGold": "Price (Gold)" + "DS4.PriceGold": "Price (Gold)", + "DS4.ItemAvailability": "Availability", + "DS4.ItemAvailabilityHamlet": "Hamlet", + "DS4.ItemAvailabilityVilage": "Village", + "DS4.ItemAvailabilityCity": "City", + "DS4.ItemAvailabilityElves": "Elves", + "DS4.ItemAvailabilityDwarves": "Dwarves" } diff --git a/module/config.js b/module/config.js index 91887160..683f85d9 100644 --- a/module/config.js +++ b/module/config.js @@ -18,3 +18,15 @@ DS4.attackTypes = { ranged: "DS4.AttackTypeRanged", meleeRanged: "DS4.AttackTypeMeleeRanged", }; + +/** + * Define the set of item availabilties + * @type {Object} + */ +DS4.itemAvailabilities = { + hamlet: "DS4.ItemAvailabilityHamlet", + village: "DS4.ItemAvailabilityVilage", + city: "DS4.ItemAvailabilityCity", + elves: "DS4.ItemAvailabilityElves", + dwarves: "DS4.ItemAvailabilityDwarves", +}; diff --git a/module/ds4.js b/module/ds4.js index 761d5d31..d6989afa 100644 --- a/module/ds4.js +++ b/module/ds4.js @@ -37,7 +37,7 @@ Hooks.once("init", async function () { */ Hooks.once("setup", function () { // Localize CONFIG objects once up-front - const toLocalize = ["attackTypes"]; + const toLocalize = ["attackTypes", "itemAvailabilities"]; // Exclude some from sorting where the default order matters const noSort = []; diff --git a/scss/components/_description.scss b/scss/components/_description.scss index 943dd0d7..291ba71b 100644 --- a/scss/components/_description.scss +++ b/scss/components/_description.scss @@ -5,7 +5,7 @@ border-right: 2px groove #eeede0; .side-property { - margin: 0; + margin: 2px 0; display: flex; flex-direction: row; @@ -15,9 +15,11 @@ font-weight: bold; } - input { + input, + select { text-align: right; flex: 1; + width: calc(100% - 2px); } } } diff --git a/templates/item/weapon-sheet.hbs b/templates/item/weapon-sheet.hbs index c73543ff..6f46bebf 100644 --- a/templates/item/weapon-sheet.hbs +++ b/templates/item/weapon-sheet.hbs @@ -48,6 +48,16 @@ +