diff --git a/src/lang/en.json b/src/lang/en.json index b2244a44..6f8526d1 100644 --- a/src/lang/en.json +++ b/src/lang/en.json @@ -1,6 +1,7 @@ { "DS4.Description": "Description", "DS4.Details": "Details", + "DS4.Effects": "Effects", "DS4.AttackType": "Attack Type", "DS4.AttackTypeAbbr": "AT", "DS4.WeaponBonus": "Weapon Bonus", @@ -12,13 +13,15 @@ "DS4.AttackTypeMeleeRanged": "Melee / Ranged", "DS4.Quantity": "Quantity", "DS4.PriceGold": "Price (Gold)", + "DS4.StorageLocation": "Stored at", "DS4.ItemAvailability": "Availability", "DS4.ItemAvailabilityHamlet": "Hamlet", "DS4.ItemAvailabilityVilage": "Village", "DS4.ItemAvailabilityCity": "City", "DS4.ItemAvailabilityElves": "Elves", "DS4.ItemAvailabilityDwarves": "Dwarves", - "DS4.ItemAvailabilityNone": "None", + "DS4.ItemAvailabilityUnset": "Unset", + "DS4.ItemAvailabilityNowhere": "Nowhere", "DS4.ItemTypeWeapon": "Weapon", "DS4.ItemTypeArmor": "Armor", "DS4.ItemTypeShield": "Shield", diff --git a/src/module/config.ts b/src/module/config.ts index 09bcfe5a..07c97ca1 100644 --- a/src/module/config.ts +++ b/src/module/config.ts @@ -23,12 +23,13 @@ export const DS4 = { * @type {Object} */ itemAvailabilities: { + unset: "DS4.ItemAvailabilityUnset", hamlet: "DS4.ItemAvailabilityHamlet", village: "DS4.ItemAvailabilityVilage", city: "DS4.ItemAvailabilityCity", elves: "DS4.ItemAvailabilityElves", dwarves: "DS4.ItemAvailabilityDwarves", - none: "DS4.ItemAvailabilityNone", + nowhere: "DS4.ItemAvailabilityNowhere", }, /** diff --git a/src/module/ds4.ts b/src/module/ds4.ts index ea4f4486..09899c42 100644 --- a/src/module/ds4.ts +++ b/src/module/ds4.ts @@ -33,6 +33,9 @@ Hooks.once("init", async function () { async function registerHandlebarsPartials() { const templatePaths = [ "systems/ds4/templates/item/partials/description.hbs", + "systems/ds4/templates/item/partials/details.hbs", + "systems/ds4/templates/item/partials/effects.hbs", + "systems/ds4/templates/item/partials/body.hbs", "systems/ds4/templates/actor/partials/items.hbs", ]; return loadTemplates(templatePaths); diff --git a/src/module/item/item-data.ts b/src/module/item/item-data.ts index fed78643..58f4dc90 100644 --- a/src/module/item/item-data.ts +++ b/src/module/item/item-data.ts @@ -26,7 +26,8 @@ interface DS4ItemBase { interface DS4ItemPhysical { quantity: number; price: number; - availability: "hamlet" | "village" | "city" | "elves" | "dwarves" | "none"; + availability: "hamlet" | "village" | "city" | "elves" | "dwarves" | "nowhere" | "unset"; + storageLocation: string; } interface DS4ItemEquipable { diff --git a/src/scss/components/_description.scss b/src/scss/components/_description.scss index 61ce282f..5f507f7f 100644 --- a/src/scss/components/_description.scss +++ b/src/scss/components/_description.scss @@ -1,5 +1,5 @@ .side-properties { - flex: 0 0 150px; + flex: 0 0 50%; margin: 5px 5px 5px 0; padding-right: 5px; border-right: 2px groove $c-border-groove; @@ -10,15 +10,15 @@ flex-direction: row; label { - flex: 2; + flex: 1; line-height: 26px; font-weight: bold; } input, select { - text-align: right; - flex: 1; + text-align: left; + flex: 1.5 1.5 0px; width: calc(100% - 2px); } } diff --git a/src/template.json b/src/template.json index f81bd603..f25fe366 100644 --- a/src/template.json +++ b/src/template.json @@ -46,7 +46,8 @@ "physical": { "quantity": 1, "price": 0, - "availability": "none" + "availability": "unset", + "storageLocation": "-" }, "equipable": { "equipped": false diff --git a/src/templates/item/armor-sheet.hbs b/src/templates/item/armor-sheet.hbs index 64974483..a0a671dc 100644 --- a/src/templates/item/armor-sheet.hbs +++ b/src/templates/item/armor-sheet.hbs @@ -34,21 +34,6 @@ - {{!-- Sheet Tab Navigation --}} - - - {{!-- Sheet Body --}} -
- - {{!-- Description Tab --}} - {{> systems/ds4/templates/item/partials/description.hbs}} - - {{!-- Attributes Tab --}} -
- {{!-- As you add new fields, add them in here! --}} -
-
+ {{!-- Common Item body --}} + {{> systems/ds4/templates/item/partials/body.hbs}} \ No newline at end of file diff --git a/src/templates/item/equipment-sheet.hbs b/src/templates/item/equipment-sheet.hbs index 79d4832a..5c2c3d4e 100644 --- a/src/templates/item/equipment-sheet.hbs +++ b/src/templates/item/equipment-sheet.hbs @@ -7,21 +7,6 @@ - {{!-- Sheet Tab Navigation --}} - - - {{!-- Sheet Body --}} -
- - {{!-- Description Tab --}} - {{> systems/ds4/templates/item/partials/description.hbs}} - - {{!-- Attributes Tab --}} -
- {{!-- As you add new fields, add them in here! --}} -
-
+ {{!-- Common Item body --}} + {{> systems/ds4/templates/item/partials/body.hbs}} \ No newline at end of file diff --git a/src/templates/item/partials/body.hbs b/src/templates/item/partials/body.hbs new file mode 100644 index 00000000..9b5cde20 --- /dev/null +++ b/src/templates/item/partials/body.hbs @@ -0,0 +1,22 @@ +{{!-- Template for the common body (navigation & body sections) of all items. --}} + +{{!-- Sheet Tab Navigation --}} + + +{{!-- Sheet Body --}} +
+ + {{!-- Description Tab --}} + {{> systems/ds4/templates/item/partials/description.hbs}} + + {{!-- Details Tab --}} + {{> systems/ds4/templates/item/partials/details.hbs}} + + {{!-- Effects Tab --}} + {{> systems/ds4/templates/item/partials/effects.hbs}} + +
\ No newline at end of file diff --git a/src/templates/item/partials/description.hbs b/src/templates/item/partials/description.hbs index 5d46f9b5..56c8fdd2 100644 --- a/src/templates/item/partials/description.hbs +++ b/src/templates/item/partials/description.hbs @@ -4,12 +4,16 @@ +
+ + +
- +
- {{editor content=data.description target="data.description" button=true owner=owner editable=editable}} \ No newline at end of file diff --git a/src/templates/item/partials/details.hbs b/src/templates/item/partials/details.hbs new file mode 100644 index 00000000..2d5b3f0c --- /dev/null +++ b/src/templates/item/partials/details.hbs @@ -0,0 +1,5 @@ +{{!-- The item tab for details. --}} +
+ {{!-- As you add new fields, add them in here! --}} +

Nothing to see yet.

+
\ No newline at end of file diff --git a/src/templates/item/partials/effects.hbs b/src/templates/item/partials/effects.hbs new file mode 100644 index 00000000..819290d6 --- /dev/null +++ b/src/templates/item/partials/effects.hbs @@ -0,0 +1,22 @@ +{{!-- Tab for the items view to manage effects --}} +
+
    +
  1. +
    +
    Name
    + +
  2. + {{#each item.effects as |effect id|}} +
  3. +

    {{effect.label}}

    +
    + + +
    +
  4. + {{/each}} +
+
\ No newline at end of file diff --git a/src/templates/item/shield-sheet.hbs b/src/templates/item/shield-sheet.hbs index ae1166f9..1e893d2a 100644 --- a/src/templates/item/shield-sheet.hbs +++ b/src/templates/item/shield-sheet.hbs @@ -14,21 +14,6 @@ - {{!-- Sheet Tab Navigation --}} - - - {{!-- Sheet Body --}} -
- - {{!-- Description Tab --}} - {{> systems/ds4/templates/item/partials/description.hbs}} - - {{!-- Attributes Tab --}} -
- {{!-- As you add new fields, add them in here! --}} -
-
+ {{!-- Common Item body --}} + {{> systems/ds4/templates/item/partials/body.hbs}} \ No newline at end of file diff --git a/src/templates/item/trinket-sheet.hbs b/src/templates/item/trinket-sheet.hbs index 364174c8..5c2c3d4e 100644 --- a/src/templates/item/trinket-sheet.hbs +++ b/src/templates/item/trinket-sheet.hbs @@ -7,39 +7,6 @@ - {{!-- Sheet Tab Navigation --}} - - - {{!-- Sheet Body --}} -
- - {{!-- Description Tab --}} - {{> systems/ds4/templates/item/partials/description.hbs}} - - {{!-- Attributes Tab --}} -
-
    -
  1. -
    -
    Name
    - -
  2. - {{#each item.effects as |effect id|}} -
  3. -

    {{effect.label}}

    -
    - - -
    -
  4. - {{/each}} -
-
-
+ {{!-- Common Item body --}} + {{> systems/ds4/templates/item/partials/body.hbs}} \ No newline at end of file diff --git a/src/templates/item/weapon-sheet.hbs b/src/templates/item/weapon-sheet.hbs index ce77965e..7a7efcfd 100644 --- a/src/templates/item/weapon-sheet.hbs +++ b/src/templates/item/weapon-sheet.hbs @@ -29,21 +29,6 @@ - {{!-- Sheet Tab Navigation --}} - - - {{!-- Sheet Body --}} -
- - {{!-- Description Tab --}} - {{> systems/ds4/templates/item/partials/description.hbs}} - - {{!-- Attributes Tab --}} -
- {{!-- As you add new fields, add them in here! --}} -
-
+ {{!-- Common Item body --}} + {{> systems/ds4/templates/item/partials/body.hbs}} \ No newline at end of file