Merge remote-tracking branch 'origin/master' into 013-rollLibRefinements
Before Width: | Height: | Size: 52 KiB After Width: | Height: | Size: 52 KiB |
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 54 KiB |
Before Width: | Height: | Size: 41 KiB After Width: | Height: | Size: 41 KiB |
Before Width: | Height: | Size: 45 KiB After Width: | Height: | Size: 45 KiB |
Before Width: | Height: | Size: 51 KiB After Width: | Height: | Size: 51 KiB |
Before Width: | Height: | Size: 36 KiB After Width: | Height: | Size: 36 KiB |
Before Width: | Height: | Size: 44 KiB After Width: | Height: | Size: 44 KiB |
Before Width: | Height: | Size: 48 KiB After Width: | Height: | Size: 48 KiB |
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
Before Width: | Height: | Size: 87 KiB After Width: | Height: | Size: 87 KiB |
361
src/assets/official/LICENSE
Normal file
|
@ -0,0 +1,361 @@
|
|||
Creative Commons Legal Code
|
||||
|
||||
Attribution-NonCommercial-ShareAlike 3.0 Unported
|
||||
|
||||
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
|
||||
LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN
|
||||
ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
|
||||
INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
|
||||
REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR
|
||||
DAMAGES RESULTING FROM ITS USE.
|
||||
|
||||
License
|
||||
|
||||
THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE
|
||||
COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY
|
||||
COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS
|
||||
AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.
|
||||
|
||||
BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE
|
||||
TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY
|
||||
BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS
|
||||
CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND
|
||||
CONDITIONS.
|
||||
|
||||
1. Definitions
|
||||
|
||||
a. "Adaptation" means a work based upon the Work, or upon the Work and
|
||||
other pre-existing works, such as a translation, adaptation,
|
||||
derivative work, arrangement of music or other alterations of a
|
||||
literary or artistic work, or phonogram or performance and includes
|
||||
cinematographic adaptations or any other form in which the Work may be
|
||||
recast, transformed, or adapted including in any form recognizably
|
||||
derived from the original, except that a work that constitutes a
|
||||
Collection will not be considered an Adaptation for the purpose of
|
||||
this License. For the avoidance of doubt, where the Work is a musical
|
||||
work, performance or phonogram, the synchronization of the Work in
|
||||
timed-relation with a moving image ("synching") will be considered an
|
||||
Adaptation for the purpose of this License.
|
||||
b. "Collection" means a collection of literary or artistic works, such as
|
||||
encyclopedias and anthologies, or performances, phonograms or
|
||||
broadcasts, or other works or subject matter other than works listed
|
||||
in Section 1(g) below, which, by reason of the selection and
|
||||
arrangement of their contents, constitute intellectual creations, in
|
||||
which the Work is included in its entirety in unmodified form along
|
||||
with one or more other contributions, each constituting separate and
|
||||
independent works in themselves, which together are assembled into a
|
||||
collective whole. A work that constitutes a Collection will not be
|
||||
considered an Adaptation (as defined above) for the purposes of this
|
||||
License.
|
||||
c. "Distribute" means to make available to the public the original and
|
||||
copies of the Work or Adaptation, as appropriate, through sale or
|
||||
other transfer of ownership.
|
||||
d. "License Elements" means the following high-level license attributes
|
||||
as selected by Licensor and indicated in the title of this License:
|
||||
Attribution, Noncommercial, ShareAlike.
|
||||
e. "Licensor" means the individual, individuals, entity or entities that
|
||||
offer(s) the Work under the terms of this License.
|
||||
f. "Original Author" means, in the case of a literary or artistic work,
|
||||
the individual, individuals, entity or entities who created the Work
|
||||
or if no individual or entity can be identified, the publisher; and in
|
||||
addition (i) in the case of a performance the actors, singers,
|
||||
musicians, dancers, and other persons who act, sing, deliver, declaim,
|
||||
play in, interpret or otherwise perform literary or artistic works or
|
||||
expressions of folklore; (ii) in the case of a phonogram the producer
|
||||
being the person or legal entity who first fixes the sounds of a
|
||||
performance or other sounds; and, (iii) in the case of broadcasts, the
|
||||
organization that transmits the broadcast.
|
||||
g. "Work" means the literary and/or artistic work offered under the terms
|
||||
of this License including without limitation any production in the
|
||||
literary, scientific and artistic domain, whatever may be the mode or
|
||||
form of its expression including digital form, such as a book,
|
||||
pamphlet and other writing; a lecture, address, sermon or other work
|
||||
of the same nature; a dramatic or dramatico-musical work; a
|
||||
choreographic work or entertainment in dumb show; a musical
|
||||
composition with or without words; a cinematographic work to which are
|
||||
assimilated works expressed by a process analogous to cinematography;
|
||||
a work of drawing, painting, architecture, sculpture, engraving or
|
||||
lithography; a photographic work to which are assimilated works
|
||||
expressed by a process analogous to photography; a work of applied
|
||||
art; an illustration, map, plan, sketch or three-dimensional work
|
||||
relative to geography, topography, architecture or science; a
|
||||
performance; a broadcast; a phonogram; a compilation of data to the
|
||||
extent it is protected as a copyrightable work; or a work performed by
|
||||
a variety or circus performer to the extent it is not otherwise
|
||||
considered a literary or artistic work.
|
||||
h. "You" means an individual or entity exercising rights under this
|
||||
License who has not previously violated the terms of this License with
|
||||
respect to the Work, or who has received express permission from the
|
||||
Licensor to exercise rights under this License despite a previous
|
||||
violation.
|
||||
i. "Publicly Perform" means to perform public recitations of the Work and
|
||||
to communicate to the public those public recitations, by any means or
|
||||
process, including by wire or wireless means or public digital
|
||||
performances; to make available to the public Works in such a way that
|
||||
members of the public may access these Works from a place and at a
|
||||
place individually chosen by them; to perform the Work to the public
|
||||
by any means or process and the communication to the public of the
|
||||
performances of the Work, including by public digital performance; to
|
||||
broadcast and rebroadcast the Work by any means including signs,
|
||||
sounds or images.
|
||||
j. "Reproduce" means to make copies of the Work by any means including
|
||||
without limitation by sound or visual recordings and the right of
|
||||
fixation and reproducing fixations of the Work, including storage of a
|
||||
protected performance or phonogram in digital form or other electronic
|
||||
medium.
|
||||
|
||||
2. Fair Dealing Rights. Nothing in this License is intended to reduce,
|
||||
limit, or restrict any uses free from copyright or rights arising from
|
||||
limitations or exceptions that are provided for in connection with the
|
||||
copyright protection under copyright law or other applicable laws.
|
||||
|
||||
3. License Grant. Subject to the terms and conditions of this License,
|
||||
Licensor hereby grants You a worldwide, royalty-free, non-exclusive,
|
||||
perpetual (for the duration of the applicable copyright) license to
|
||||
exercise the rights in the Work as stated below:
|
||||
|
||||
a. to Reproduce the Work, to incorporate the Work into one or more
|
||||
Collections, and to Reproduce the Work as incorporated in the
|
||||
Collections;
|
||||
b. to create and Reproduce Adaptations provided that any such Adaptation,
|
||||
including any translation in any medium, takes reasonable steps to
|
||||
clearly label, demarcate or otherwise identify that changes were made
|
||||
to the original Work. For example, a translation could be marked "The
|
||||
original work was translated from English to Spanish," or a
|
||||
modification could indicate "The original work has been modified.";
|
||||
c. to Distribute and Publicly Perform the Work including as incorporated
|
||||
in Collections; and,
|
||||
d. to Distribute and Publicly Perform Adaptations.
|
||||
|
||||
The above rights may be exercised in all media and formats whether now
|
||||
known or hereafter devised. The above rights include the right to make
|
||||
such modifications as are technically necessary to exercise the rights in
|
||||
other media and formats. Subject to Section 8(f), all rights not expressly
|
||||
granted by Licensor are hereby reserved, including but not limited to the
|
||||
rights described in Section 4(e).
|
||||
|
||||
4. Restrictions. The license granted in Section 3 above is expressly made
|
||||
subject to and limited by the following restrictions:
|
||||
|
||||
a. You may Distribute or Publicly Perform the Work only under the terms
|
||||
of this License. You must include a copy of, or the Uniform Resource
|
||||
Identifier (URI) for, this License with every copy of the Work You
|
||||
Distribute or Publicly Perform. You may not offer or impose any terms
|
||||
on the Work that restrict the terms of this License or the ability of
|
||||
the recipient of the Work to exercise the rights granted to that
|
||||
recipient under the terms of the License. You may not sublicense the
|
||||
Work. You must keep intact all notices that refer to this License and
|
||||
to the disclaimer of warranties with every copy of the Work You
|
||||
Distribute or Publicly Perform. When You Distribute or Publicly
|
||||
Perform the Work, You may not impose any effective technological
|
||||
measures on the Work that restrict the ability of a recipient of the
|
||||
Work from You to exercise the rights granted to that recipient under
|
||||
the terms of the License. This Section 4(a) applies to the Work as
|
||||
incorporated in a Collection, but this does not require the Collection
|
||||
apart from the Work itself to be made subject to the terms of this
|
||||
License. If You create a Collection, upon notice from any Licensor You
|
||||
must, to the extent practicable, remove from the Collection any credit
|
||||
as required by Section 4(d), as requested. If You create an
|
||||
Adaptation, upon notice from any Licensor You must, to the extent
|
||||
practicable, remove from the Adaptation any credit as required by
|
||||
Section 4(d), as requested.
|
||||
b. You may Distribute or Publicly Perform an Adaptation only under: (i)
|
||||
the terms of this License; (ii) a later version of this License with
|
||||
the same License Elements as this License; (iii) a Creative Commons
|
||||
jurisdiction license (either this or a later license version) that
|
||||
contains the same License Elements as this License (e.g.,
|
||||
Attribution-NonCommercial-ShareAlike 3.0 US) ("Applicable License").
|
||||
You must include a copy of, or the URI, for Applicable License with
|
||||
every copy of each Adaptation You Distribute or Publicly Perform. You
|
||||
may not offer or impose any terms on the Adaptation that restrict the
|
||||
terms of the Applicable License or the ability of the recipient of the
|
||||
Adaptation to exercise the rights granted to that recipient under the
|
||||
terms of the Applicable License. You must keep intact all notices that
|
||||
refer to the Applicable License and to the disclaimer of warranties
|
||||
with every copy of the Work as included in the Adaptation You
|
||||
Distribute or Publicly Perform. When You Distribute or Publicly
|
||||
Perform the Adaptation, You may not impose any effective technological
|
||||
measures on the Adaptation that restrict the ability of a recipient of
|
||||
the Adaptation from You to exercise the rights granted to that
|
||||
recipient under the terms of the Applicable License. This Section 4(b)
|
||||
applies to the Adaptation as incorporated in a Collection, but this
|
||||
does not require the Collection apart from the Adaptation itself to be
|
||||
made subject to the terms of the Applicable License.
|
||||
c. You may not exercise any of the rights granted to You in Section 3
|
||||
above in any manner that is primarily intended for or directed toward
|
||||
commercial advantage or private monetary compensation. The exchange of
|
||||
the Work for other copyrighted works by means of digital file-sharing
|
||||
or otherwise shall not be considered to be intended for or directed
|
||||
toward commercial advantage or private monetary compensation, provided
|
||||
there is no payment of any monetary compensation in con-nection with
|
||||
the exchange of copyrighted works.
|
||||
d. If You Distribute, or Publicly Perform the Work or any Adaptations or
|
||||
Collections, You must, unless a request has been made pursuant to
|
||||
Section 4(a), keep intact all copyright notices for the Work and
|
||||
provide, reasonable to the medium or means You are utilizing: (i) the
|
||||
name of the Original Author (or pseudonym, if applicable) if supplied,
|
||||
and/or if the Original Author and/or Licensor designate another party
|
||||
or parties (e.g., a sponsor institute, publishing entity, journal) for
|
||||
attribution ("Attribution Parties") in Licensor's copyright notice,
|
||||
terms of service or by other reasonable means, the name of such party
|
||||
or parties; (ii) the title of the Work if supplied; (iii) to the
|
||||
extent reasonably practicable, the URI, if any, that Licensor
|
||||
specifies to be associated with the Work, unless such URI does not
|
||||
refer to the copyright notice or licensing information for the Work;
|
||||
and, (iv) consistent with Section 3(b), in the case of an Adaptation,
|
||||
a credit identifying the use of the Work in the Adaptation (e.g.,
|
||||
"French translation of the Work by Original Author," or "Screenplay
|
||||
based on original Work by Original Author"). The credit required by
|
||||
this Section 4(d) may be implemented in any reasonable manner;
|
||||
provided, however, that in the case of a Adaptation or Collection, at
|
||||
a minimum such credit will appear, if a credit for all contributing
|
||||
authors of the Adaptation or Collection appears, then as part of these
|
||||
credits and in a manner at least as prominent as the credits for the
|
||||
other contributing authors. For the avoidance of doubt, You may only
|
||||
use the credit required by this Section for the purpose of attribution
|
||||
in the manner set out above and, by exercising Your rights under this
|
||||
License, You may not implicitly or explicitly assert or imply any
|
||||
connection with, sponsorship or endorsement by the Original Author,
|
||||
Licensor and/or Attribution Parties, as appropriate, of You or Your
|
||||
use of the Work, without the separate, express prior written
|
||||
permission of the Original Author, Licensor and/or Attribution
|
||||
Parties.
|
||||
e. For the avoidance of doubt:
|
||||
|
||||
i. Non-waivable Compulsory License Schemes. In those jurisdictions in
|
||||
which the right to collect royalties through any statutory or
|
||||
compulsory licensing scheme cannot be waived, the Licensor
|
||||
reserves the exclusive right to collect such royalties for any
|
||||
exercise by You of the rights granted under this License;
|
||||
ii. Waivable Compulsory License Schemes. In those jurisdictions in
|
||||
which the right to collect royalties through any statutory or
|
||||
compulsory licensing scheme can be waived, the Licensor reserves
|
||||
the exclusive right to collect such royalties for any exercise by
|
||||
You of the rights granted under this License if Your exercise of
|
||||
such rights is for a purpose or use which is otherwise than
|
||||
noncommercial as permitted under Section 4(c) and otherwise waives
|
||||
the right to collect royalties through any statutory or compulsory
|
||||
licensing scheme; and,
|
||||
iii. Voluntary License Schemes. The Licensor reserves the right to
|
||||
collect royalties, whether individually or, in the event that the
|
||||
Licensor is a member of a collecting society that administers
|
||||
voluntary licensing schemes, via that society, from any exercise
|
||||
by You of the rights granted under this License that is for a
|
||||
purpose or use which is otherwise than noncommercial as permitted
|
||||
under Section 4(c).
|
||||
f. Except as otherwise agreed in writing by the Licensor or as may be
|
||||
otherwise permitted by applicable law, if You Reproduce, Distribute or
|
||||
Publicly Perform the Work either by itself or as part of any
|
||||
Adaptations or Collections, You must not distort, mutilate, modify or
|
||||
take other derogatory action in relation to the Work which would be
|
||||
prejudicial to the Original Author's honor or reputation. Licensor
|
||||
agrees that in those jurisdictions (e.g. Japan), in which any exercise
|
||||
of the right granted in Section 3(b) of this License (the right to
|
||||
make Adaptations) would be deemed to be a distortion, mutilation,
|
||||
modification or other derogatory action prejudicial to the Original
|
||||
Author's honor and reputation, the Licensor will waive or not assert,
|
||||
as appropriate, this Section, to the fullest extent permitted by the
|
||||
applicable national law, to enable You to reasonably exercise Your
|
||||
right under Section 3(b) of this License (right to make Adaptations)
|
||||
but not otherwise.
|
||||
|
||||
5. Representations, Warranties and Disclaimer
|
||||
|
||||
UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING AND TO THE
|
||||
FULLEST EXTENT PERMITTED BY APPLICABLE LAW, LICENSOR OFFERS THE WORK AS-IS
|
||||
AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE
|
||||
WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT
|
||||
LIMITATION, WARRANTIES OF TITLE, MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS,
|
||||
ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT
|
||||
DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION OF IMPLIED
|
||||
WARRANTIES, SO THIS EXCLUSION MAY NOT APPLY TO YOU.
|
||||
|
||||
6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE
|
||||
LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR
|
||||
ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES
|
||||
ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS
|
||||
BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
7. Termination
|
||||
|
||||
a. This License and the rights granted hereunder will terminate
|
||||
automatically upon any breach by You of the terms of this License.
|
||||
Individuals or entities who have received Adaptations or Collections
|
||||
from You under this License, however, will not have their licenses
|
||||
terminated provided such individuals or entities remain in full
|
||||
compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will
|
||||
survive any termination of this License.
|
||||
b. Subject to the above terms and conditions, the license granted here is
|
||||
perpetual (for the duration of the applicable copyright in the Work).
|
||||
Notwithstanding the above, Licensor reserves the right to release the
|
||||
Work under different license terms or to stop distributing the Work at
|
||||
any time; provided, however that any such election will not serve to
|
||||
withdraw this License (or any other license that has been, or is
|
||||
required to be, granted under the terms of this License), and this
|
||||
License will continue in full force and effect unless terminated as
|
||||
stated above.
|
||||
|
||||
8. Miscellaneous
|
||||
|
||||
a. Each time You Distribute or Publicly Perform the Work or a Collection,
|
||||
the Licensor offers to the recipient a license to the Work on the same
|
||||
terms and conditions as the license granted to You under this License.
|
||||
b. Each time You Distribute or Publicly Perform an Adaptation, Licensor
|
||||
offers to the recipient a license to the original Work on the same
|
||||
terms and conditions as the license granted to You under this License.
|
||||
c. If any provision of this License is invalid or unenforceable under
|
||||
applicable law, it shall not affect the validity or enforceability of
|
||||
the remainder of the terms of this License, and without further action
|
||||
by the parties to this agreement, such provision shall be reformed to
|
||||
the minimum extent necessary to make such provision valid and
|
||||
enforceable.
|
||||
d. No term or provision of this License shall be deemed waived and no
|
||||
breach consented to unless such waiver or consent shall be in writing
|
||||
and signed by the party to be charged with such waiver or consent.
|
||||
e. This License constitutes the entire agreement between the parties with
|
||||
respect to the Work licensed here. There are no understandings,
|
||||
agreements or representations with respect to the Work not specified
|
||||
here. Licensor shall not be bound by any additional provisions that
|
||||
may appear in any communication from You. This License may not be
|
||||
modified without the mutual written agreement of the Licensor and You.
|
||||
f. The rights granted under, and the subject matter referenced, in this
|
||||
License were drafted utilizing the terminology of the Berne Convention
|
||||
for the Protection of Literary and Artistic Works (as amended on
|
||||
September 28, 1979), the Rome Convention of 1961, the WIPO Copyright
|
||||
Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996
|
||||
and the Universal Copyright Convention (as revised on July 24, 1971).
|
||||
These rights and subject matter take effect in the relevant
|
||||
jurisdiction in which the License terms are sought to be enforced
|
||||
according to the corresponding provisions of the implementation of
|
||||
those treaty provisions in the applicable national law. If the
|
||||
standard suite of rights granted under applicable copyright law
|
||||
includes additional rights not granted under this License, such
|
||||
additional rights are deemed to be included in the License; this
|
||||
License is not intended to restrict the license of any rights under
|
||||
applicable law.
|
||||
|
||||
|
||||
Creative Commons Notice
|
||||
|
||||
Creative Commons is not a party to this License, and makes no warranty
|
||||
whatsoever in connection with the Work. Creative Commons will not be
|
||||
liable to You or any party on any legal theory for any damages
|
||||
whatsoever, including without limitation any general, special,
|
||||
incidental or consequential damages arising in connection to this
|
||||
license. Notwithstanding the foregoing two (2) sentences, if Creative
|
||||
Commons has expressly identified itself as the Licensor hereunder, it
|
||||
shall have all rights and obligations of Licensor.
|
||||
|
||||
Except for the limited purpose of indicating to the public that the
|
||||
Work is licensed under the CCPL, Creative Commons does not authorize
|
||||
the use by either party of the trademark "Creative Commons" or any
|
||||
related trademark or logo of Creative Commons without the prior
|
||||
written consent of Creative Commons. Any permitted use will be in
|
||||
compliance with Creative Commons' then-current trademark usage
|
||||
guidelines, as may be published on its website or otherwise made
|
||||
available upon request from time to time. For the avoidance of doubt,
|
||||
this trademark restriction does not form part of this License.
|
||||
|
||||
Creative Commons may be contacted at https://creativecommons.org/.
|
||||
|
|
@ -18,4 +18,6 @@
|
|||
@import "scss/components/items";
|
||||
@import "scss/components/description";
|
||||
@import "scss/components/character_values";
|
||||
@import "scss/components/attributes_traits";
|
||||
@import "scss/components/combat_values";
|
||||
}
|
||||
|
|
|
@ -62,6 +62,8 @@ export class DS4ActorSheet extends ActorSheet<DS4ActorDataType, DS4Actor, DS4Ite
|
|||
li.slideUp(200, () => this.render(false));
|
||||
});
|
||||
|
||||
html.find(".item-change").on("change", this._onItemChange.bind(this));
|
||||
|
||||
// Rollable abilities.
|
||||
html.find(".rollable").click(this._onRoll.bind(this));
|
||||
}
|
||||
|
@ -70,7 +72,7 @@ export class DS4ActorSheet extends ActorSheet<DS4ActorDataType, DS4Actor, DS4Ite
|
|||
|
||||
/**
|
||||
* Handle creating a new Owned Item for the actor using initial data defined in the HTML dataset
|
||||
* @param {Event} event The originating click event
|
||||
* @param {JQuery.ClickEvent} event The originating click event
|
||||
* @private
|
||||
*/
|
||||
private _onItemCreate(event: JQuery.ClickEvent): Promise<Item> {
|
||||
|
@ -95,9 +97,93 @@ export class DS4ActorSheet extends ActorSheet<DS4ActorDataType, DS4Actor, DS4Ite
|
|||
return this.actor.createOwnedItem(itemData);
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle changes to properties of an Owned Item from within character sheet.
|
||||
* Can currently properly bind: see getValue().
|
||||
* Assumes the item property is given as the value of the HTML element property 'data-property'.
|
||||
* @param {JQuery.ChangeEvent<HTMLFormElement>} ev The originating change event
|
||||
* @private
|
||||
*/
|
||||
private _onItemChange(ev: JQuery.ChangeEvent<HTMLFormElement>): void {
|
||||
ev.preventDefault();
|
||||
console.log("Current target:", $(ev.currentTarget).get(0)["name"]);
|
||||
const el: HTMLFormElement = $(ev.currentTarget).get(0);
|
||||
const id = $(ev.currentTarget).parents(".item").data("itemId");
|
||||
const item = duplicate(this.actor.getOwnedItem(id)); // getOwnedItem is typed incorrectly, it actually returns a ItemData<DS4ItemDataType>, not an Item
|
||||
const property: string | undefined = $(ev.currentTarget).data("property");
|
||||
|
||||
// Early return:
|
||||
// Disabled => do nothing
|
||||
if (el.disabled || el.getAttribute("disabled")) return;
|
||||
// name not given => raise
|
||||
if (property === undefined) {
|
||||
throw TypeError("HTML element does not provide 'data-property' attribute");
|
||||
}
|
||||
|
||||
// Set new value
|
||||
const newValue = this.getValue(el);
|
||||
setProperty(item, property, newValue);
|
||||
this.actor.updateOwnedItem(item);
|
||||
}
|
||||
|
||||
/**
|
||||
* Collect the value of a form element depending on the element's type
|
||||
* The value is parsed to:
|
||||
* - Checkbox: boolean
|
||||
* - Text input: string
|
||||
* - Number: number
|
||||
* @param el the input element to collect the value of
|
||||
*/
|
||||
private getValue(el: HTMLFormElement): boolean | string | number {
|
||||
// One needs to differentiate between e.g. checkboxes (value="on") and select boxes etc.
|
||||
// Checkbox:
|
||||
if (el.type === "checkbox") {
|
||||
const value: boolean = el.checked;
|
||||
return value;
|
||||
}
|
||||
|
||||
// Text input:
|
||||
else if (el.type === "text") {
|
||||
const value: string = el.value;
|
||||
return value;
|
||||
}
|
||||
|
||||
// Numbers:
|
||||
else if (el.type === "number") {
|
||||
const value = Number(el.value.trim());
|
||||
return value;
|
||||
}
|
||||
|
||||
// // Ranges:
|
||||
// else if (el.type === "range") {
|
||||
// const value: string = el.value.trim();
|
||||
// return value;
|
||||
// }
|
||||
|
||||
// // Radio Checkboxes (untested, cf. FormDataExtended.process)
|
||||
// else if (el.type === "radio") {
|
||||
// const chosen: HTMLFormElement = el.find((r: HTMLFormElement) => r["checked"]);
|
||||
// const value: string = chosen ? chosen.value : null;
|
||||
// return value;
|
||||
// }
|
||||
|
||||
// // Multi-Select (untested, cf. FormDataExtended.process)
|
||||
// else if (el.type === "select-multiple") {
|
||||
// const value: Array<string> = [];
|
||||
// el.options.array.forEach((opt: HTMLOptionElement) => {
|
||||
// if (opt.selected) value.push(opt.value);
|
||||
// });
|
||||
// return value;
|
||||
|
||||
// unsupported:
|
||||
else {
|
||||
throw TypeError("Binding of item property to this type of HTML element not supported; given: " + el);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Handle clickable rolls.
|
||||
* @param {Event} event The originating click event
|
||||
* @param {JQuery.ClickEvent} event The originating click event
|
||||
* @private
|
||||
*/
|
||||
private _onRoll(event: JQuery.ClickEvent): void {
|
||||
|
|
|
@ -21,9 +21,9 @@ export const DS4 = {
|
|||
* Define the file paths to icon images
|
||||
*/
|
||||
attackTypesIcons: {
|
||||
melee: "systems/ds4/assets/DS4-MAT.png",
|
||||
meleeRanged: "systems/ds4/assets/DS4-MRA.png",
|
||||
ranged: "systems/ds4/assets/DS4-RAT.png",
|
||||
melee: "systems/ds4/assets/official/DS4-MAT.png",
|
||||
meleeRanged: "systems/ds4/assets/official/DS4-MRA.png",
|
||||
ranged: "systems/ds4/assets/official/DS4-RAT.png",
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -106,10 +106,10 @@ export const DS4 = {
|
|||
*/
|
||||
traits: {
|
||||
strength: "DS4.TraitStrength",
|
||||
constitution: "DS4.TraitConstitution",
|
||||
agility: "DS4.TraitAgility",
|
||||
dexterity: "DS4.TraitDexterity",
|
||||
intellect: "DS4.TraitIntellect",
|
||||
constitution: "DS4.TraitConstitution",
|
||||
dexterity: "DS4.TraitDexterity",
|
||||
aura: "DS4.TraitAura",
|
||||
},
|
||||
|
||||
|
|
|
@ -36,7 +36,9 @@ async function registerHandlebarsPartials() {
|
|||
"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",
|
||||
"systems/ds4/templates/actor/partials/items-overview.hbs",
|
||||
"systems/ds4/templates/actor/partials/attributes-traits.hbs",
|
||||
"systems/ds4/templates/actor/partials/combat-values.hbs",
|
||||
];
|
||||
return loadTemplates(templatePaths);
|
||||
}
|
||||
|
@ -67,7 +69,7 @@ Hooks.once("setup", function () {
|
|||
];
|
||||
|
||||
// Exclude some from sorting where the default order matters
|
||||
const noSort = [];
|
||||
const noSort = ["attributes", "traits", "combatValues"];
|
||||
|
||||
// Localize and sort CONFIG objects
|
||||
for (const o of toLocalize) {
|
||||
|
|
46
src/scss/components/_attributes_traits.scss
Normal file
|
@ -0,0 +1,46 @@
|
|||
.attributes-traits {
|
||||
margin-top: $margin-sm;
|
||||
.attribute {
|
||||
.attribute-label {
|
||||
font-family: $font-heading;
|
||||
font-size: 2em;
|
||||
text-align: center;
|
||||
}
|
||||
.attribute-value {
|
||||
border: 2px groove $c-border-groove;
|
||||
line-height: $default-input-height;
|
||||
font-size: 1.5em;
|
||||
text-align: center;
|
||||
padding-left: 2px;
|
||||
padding-right: 2px;
|
||||
gap: 0;
|
||||
input,
|
||||
.attribute-value-total {
|
||||
grid-column: span 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
.trait {
|
||||
.trait-label {
|
||||
color: transparent;
|
||||
font-family: $font-heading;
|
||||
font-size: 2em;
|
||||
text-align: center;
|
||||
//text-shadow: -1px 1px 0 $c-black, 1px 1px 0 $c-black, 1px -1px 0 $c-black, -1px -1px 0 $c-black;
|
||||
-webkit-text-stroke: 1px $c-black;
|
||||
}
|
||||
.trait-value {
|
||||
border: 2px groove $c-border-groove;
|
||||
font-size: 1.5em;
|
||||
line-height: $default-input-height;
|
||||
text-align: center;
|
||||
padding-left: 2px;
|
||||
padding-right: 2px;
|
||||
gap: 0;
|
||||
input,
|
||||
.trait-value-total {
|
||||
grid-column: span 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,99 +1,5 @@
|
|||
header.sheet-header {
|
||||
.character-values {
|
||||
flex: 0 0 100%;
|
||||
.attributes-traits {
|
||||
margin-top: $margin-sm;
|
||||
.attribute {
|
||||
.attribute-label {
|
||||
font-family: $font-heading;
|
||||
font-size: 2em;
|
||||
text-align: center;
|
||||
}
|
||||
.attribute-value {
|
||||
border: 2px groove $c-border-groove;
|
||||
line-height: 26px;
|
||||
font-size: 1.5em;
|
||||
text-align: center;
|
||||
padding-left: 2px;
|
||||
padding-right: 2px;
|
||||
gap: 0;
|
||||
input,
|
||||
.attribute-value-total {
|
||||
grid-column: span 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
.trait {
|
||||
.trait-label {
|
||||
color: transparent;
|
||||
font-family: $font-heading;
|
||||
font-size: 2em;
|
||||
text-align: center;
|
||||
//text-shadow: -1px 1px 0 $c-black, 1px 1px 0 $c-black, 1px -1px 0 $c-black, -1px -1px 0 $c-black;
|
||||
-webkit-text-stroke: 1px $c-black;
|
||||
}
|
||||
.trait-value {
|
||||
border: 2px groove $c-border-groove;
|
||||
font-size: 1.5em;
|
||||
line-height: 26px;
|
||||
text-align: center;
|
||||
padding-left: 2px;
|
||||
padding-right: 2px;
|
||||
gap: 0;
|
||||
input,
|
||||
.trait-value-total {
|
||||
grid-column: span 2;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.combat-values {
|
||||
margin-top: $margin-sm;
|
||||
.combat-value-with-formula {
|
||||
display: grid;
|
||||
place-items: center;
|
||||
$size: 60px;
|
||||
row-gap: $margin-sm;
|
||||
.combat-value {
|
||||
@include centered-content;
|
||||
height: $size;
|
||||
width: $size;
|
||||
flex: 0 0 auto;
|
||||
background-size: contain;
|
||||
font-size: 1.5em;
|
||||
&.hitPoints {
|
||||
background-image: url("assets/DS4-HP.png");
|
||||
}
|
||||
&.defense {
|
||||
background-image: url("assets/DS4-DEF.png");
|
||||
}
|
||||
&.initiative {
|
||||
background-image: url("assets/DS4-INI.png");
|
||||
}
|
||||
&.movement {
|
||||
background-image: url("assets/DS4-MR.png");
|
||||
}
|
||||
&.meleeAttack {
|
||||
background-image: url("assets/DS4-MAT.png");
|
||||
}
|
||||
&.rangedAttack {
|
||||
background-image: url("assets/DS4-RAT.png");
|
||||
}
|
||||
&.spellcasting {
|
||||
background-image: url("assets/DS4-SPC.png");
|
||||
}
|
||||
&.targetedSpellcasting {
|
||||
background-image: url("assets/DS4-TSC.png");
|
||||
}
|
||||
}
|
||||
|
||||
.combat-value-formula {
|
||||
width: $size;
|
||||
input {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
48
src/scss/components/_combat_values.scss
Normal file
|
@ -0,0 +1,48 @@
|
|||
.combat-values {
|
||||
margin-top: $margin-sm;
|
||||
.combat-value-with-formula {
|
||||
display: grid;
|
||||
place-items: center;
|
||||
$size: 60px;
|
||||
row-gap: $margin-sm;
|
||||
.combat-value {
|
||||
@include centered-content;
|
||||
height: $size;
|
||||
width: $size;
|
||||
flex: 0 0 auto;
|
||||
background-size: contain;
|
||||
font-size: 1.5em;
|
||||
&.hitPoints {
|
||||
background-image: url("#{$official-assets-path}/DS4-HP.png");
|
||||
}
|
||||
&.defense {
|
||||
background-image: url("#{$official-assets-path}/DS4-DEF.png");
|
||||
}
|
||||
&.initiative {
|
||||
background-image: url("#{$official-assets-path}/DS4-INI.png");
|
||||
}
|
||||
&.movement {
|
||||
background-image: url("#{$official-assets-path}/DS4-MR.png");
|
||||
}
|
||||
&.meleeAttack {
|
||||
background-image: url("#{$official-assets-path}/DS4-MAT.png");
|
||||
}
|
||||
&.rangedAttack {
|
||||
background-image: url("#{$official-assets-path}/DS4-RAT.png");
|
||||
}
|
||||
&.spellcasting {
|
||||
background-image: url("#{$official-assets-path}/DS4-SPC.png");
|
||||
}
|
||||
&.targetedSpellcasting {
|
||||
background-image: url("#{$official-assets-path}/DS4-TSC.png");
|
||||
}
|
||||
}
|
||||
|
||||
.combat-value-formula {
|
||||
width: $size;
|
||||
input {
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,26 +1,33 @@
|
|||
.side-properties {
|
||||
flex: 0 0 50%;
|
||||
flex: 0;
|
||||
min-width: fit-content;
|
||||
max-width: 50%;
|
||||
margin: 5px 5px 5px 0;
|
||||
padding-right: 5px;
|
||||
border-right: 2px groove $c-border-groove;
|
||||
|
||||
.side-property {
|
||||
margin: 2px 0;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
display: grid;
|
||||
grid-template-columns: 40% auto;
|
||||
justify-content: left;
|
||||
|
||||
label {
|
||||
flex: 1;
|
||||
line-height: 26px;
|
||||
line-height: $default-input-height;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
input,
|
||||
select {
|
||||
text-align: left;
|
||||
flex: 1.5 1.5 0px;
|
||||
width: calc(100% - 2px);
|
||||
}
|
||||
|
||||
input[type="checkbox"] {
|
||||
width: auto;
|
||||
height: 100%;
|
||||
margin: 0px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
@use "sass:color";
|
||||
|
||||
.items-list {
|
||||
list-style: none;
|
||||
margin: 7px 0;
|
||||
|
@ -16,13 +18,26 @@
|
|||
|
||||
.item-image {
|
||||
flex: 0 0 24px;
|
||||
margin-right: 5px;
|
||||
height: 100%;
|
||||
//margin-right: 5px;
|
||||
@include centered-content;
|
||||
}
|
||||
|
||||
img {
|
||||
display: block;
|
||||
border: none;
|
||||
}
|
||||
|
||||
input {
|
||||
border: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
input[type="checkbox"] {
|
||||
width: auto;
|
||||
height: 100%;
|
||||
margin: 0px;
|
||||
}
|
||||
}
|
||||
|
||||
.item-name {
|
||||
|
@ -36,6 +51,11 @@
|
|||
|
||||
.item-num-val {
|
||||
text-align: center;
|
||||
width: 2.5em;
|
||||
padding: 0;
|
||||
}
|
||||
.item-num-val:invalid {
|
||||
background-color: color.mix(lightcoral, $c-light-grey, 25%);
|
||||
}
|
||||
|
||||
.item-description {
|
||||
|
@ -43,6 +63,7 @@
|
|||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
height: 100%;
|
||||
p {
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
|
|
|
@ -32,6 +32,10 @@
|
|||
}
|
||||
}
|
||||
|
||||
.flexnowrap {
|
||||
flex-wrap: nowrap;
|
||||
}
|
||||
|
||||
.flexcol {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
|
|
@ -4,3 +4,7 @@ $padding-lg: 20px;
|
|||
$margin-sm: $padding-sm;
|
||||
$margin-md: $padding-md;
|
||||
$margin-lg: $padding-lg;
|
||||
|
||||
$default-input-height: 26px;
|
||||
|
||||
$official-assets-path: "assets/official";
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "ds4",
|
||||
"title": "Dungeonslayers 4",
|
||||
"description": "The Dungeonslayers 4 system for FoundryVTT!",
|
||||
"description": "The Dungeonslayers 4 system for FoundryVTT. Dungeonslayers (© Christian Kennig) is licensed under CC BY-NC-SA 3.0 (https://creativecommons.org/licenses/by-nc-sa/3.0/de/deed.en).",
|
||||
"version": "0.1.0",
|
||||
"minimumCoreVersion": "0.7.9",
|
||||
"compatibleCoreVersion": "0.7.9",
|
||||
"templateVersion": 2,
|
||||
"author": "Johannes Loher",
|
||||
"author": "Johannes Loher, Gesina Schwalbe, Oliver Rümpelein",
|
||||
"esmodules": ["module/ds4.js"],
|
||||
"styles": ["ds4.css"],
|
||||
"scripts": [],
|
||||
|
@ -20,9 +20,9 @@
|
|||
],
|
||||
"gridDistance": 1,
|
||||
"gridUnits": "m",
|
||||
"primaryTokenAttribute": "hitPoints",
|
||||
"url": "",
|
||||
"manifest": "",
|
||||
"download": "",
|
||||
"license": ""
|
||||
"primaryTokenAttribute": "combatValues.hitPoints.current",
|
||||
"url": "https://git.f3l.de/dungeonslayers/ds4",
|
||||
"manifest": "https://git.f3l.de/dungeonslayers/ds4/-/blob/master/src/system.json",
|
||||
"download": "https://git.f3l.de/dungeonslayers/ds4/-/archive/master/ds4-master.zip",
|
||||
"license": "MIT"
|
||||
}
|
||||
|
|
|
@ -81,154 +81,10 @@
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="attributes-traits grid grid-3col">
|
||||
<div class="attribute flexrow"><label for="data.attributes.body.total"
|
||||
class="attribute-label ">{{config.attributes.body}}</label>
|
||||
<div class="attribute-value flex15 grid grid-8col"><input type="number"
|
||||
name="data.attributes.body.base" value='{{data.attributes.body.base}}'
|
||||
data-dtype="Number" /><span> +
|
||||
</span><input type="number" name="data.attributes.body.mod" value='{{data.attributes.body.mod}}'
|
||||
data-dtype="Number" /><span> =
|
||||
</span><span class="attribute-value-total">{{data.attributes.body.total}}</span></div>
|
||||
</div>
|
||||
<div class="attribute flexrow"><label for="data.attributes.mobility.total"
|
||||
class="attribute-label">{{config.attributes.mobility}}</label>
|
||||
<div class="attribute-value flex15 grid grid-8col"><input type="number"
|
||||
name="data.attributes.mobility.base" value='{{data.attributes.mobility.base}}'
|
||||
data-dtype="Number" /><span> +
|
||||
</span><input type="number" name="data.attributes.mobility.mod"
|
||||
value='{{data.attributes.mobility.mod}}' data-dtype="Number" /><span> =
|
||||
</span><span class="attribute-value-total">{{data.attributes.mobility.total}}</span></div>
|
||||
</div>
|
||||
<div class="attribute flexrow"><label for="data.attributes.mind.total"
|
||||
class="attribute-label">{{config.attributes.mind}}</label>
|
||||
<div class="attribute-value flex15 grid grid-8col"><input type="number"
|
||||
name="data.attributes.mind.base" value='{{data.attributes.mind.base}}'
|
||||
data-dtype="Number" /><span> +
|
||||
</span><input type="number" name="data.attributes.mind.mod" value='{{data.attributes.mind.mod}}'
|
||||
data-dtype="Number" /><span> =
|
||||
</span><span class="attribute-value-total">{{data.attributes.mind.total}}</span></div>
|
||||
</div>
|
||||
<div class="trait flexrow"><label for="data.traits.strength.total"
|
||||
class="trait-label">{{config.traits.strength}}</label>
|
||||
<div class="trait-value flex15 grid grid-8col"><input type="number" name="data.traits.strength.base"
|
||||
value='{{data.traits.strength.base}}' data-dtype="Number" /><span> +
|
||||
</span><input type="number" name="data.traits.strength.mod" value='{{data.traits.strength.mod}}'
|
||||
data-dtype="Number" /><span> =
|
||||
</span><span class="trait-value-total">{{data.traits.strength.total}}</span></div>
|
||||
</div>
|
||||
<div class="trait flexrow"><label for="data.traits.agility.total"
|
||||
class="trait-label">{{config.traits.agility}}</label>
|
||||
<div class="trait-value flex15 grid grid-8col"><input type="number" name="data.traits.agility.base"
|
||||
value='{{data.traits.agility.base}}' data-dtype="Number" /><span> +
|
||||
</span><input type="number" name="data.traits.agility.mod" value='{{data.traits.agility.mod}}'
|
||||
data-dtype="Number" /><span> =
|
||||
</span><span class="trait-value-total">{{data.traits.agility.total}}</span></div>
|
||||
</div>
|
||||
<div class="trait flexrow"><label for="data.traits.intellect.total"
|
||||
class="trait-label">{{config.traits.intellect}}</label>
|
||||
<div class="trait-value flex15 grid grid-8col"><input type="number"
|
||||
name="data.traits.intellect.base" value='{{data.traits.intellect.base}}'
|
||||
data-dtype="Number" /><span> +
|
||||
</span><input type="number" name="data.traits.intellect.mod"
|
||||
value='{{data.traits.intellect.mod}}' data-dtype="Number" /><span> =
|
||||
</span><span class="trait-value-total">{{data.traits.intellect.total}}</span></div>
|
||||
</div>
|
||||
<div class="trait flexrow"><label for="data.traits.constitution.total"
|
||||
class="trait-label">{{config.traits.constitution}}</label>
|
||||
<div class="trait-value flex15 grid grid-8col"><input type="number"
|
||||
name="data.traits.constitution.base" value='{{data.traits.constitution.base}}'
|
||||
data-dtype="Number" /><span> +
|
||||
</span><input type="number" name="data.traits.constitution.mod"
|
||||
value='{{data.traits.constitution.mod}}' data-dtype="Number" /><span> =
|
||||
</span><span class="trait-value-total">{{data.traits.constitution.total}}</span></div>
|
||||
</div>
|
||||
<div class="trait flexrow"><label for="data.traits.dexterity.total"
|
||||
class="trait-label">{{config.traits.dexterity}}</label>
|
||||
<div class="trait-value flex15 grid grid-8col"><input type="number"
|
||||
name="data.traits.dexterity.base" value='{{data.traits.dexterity.base}}'
|
||||
data-dtype="Number" /><span> +
|
||||
</span><input type="number" name="data.traits.dexterity.mod"
|
||||
value='{{data.traits.dexterity.mod}}' data-dtype="Number" /><span> =
|
||||
</span><span class="trait-value-total">{{data.traits.dexterity.total}}</span></div>
|
||||
</div>
|
||||
<div class="trait flexrow"><label for="data.traits.aura.total"
|
||||
class="trait-label">{{config.traits.aura}}</label>
|
||||
<div class="trait-value flex15 grid grid-8col"><input type="number" name="data.traits.aura.base"
|
||||
value='{{data.traits.aura.base}}' data-dtype="Number" /><span> +
|
||||
</span><input type="number" name="data.traits.aura.mod" value='{{data.traits.aura.mod}}'
|
||||
data-dtype="Number" /><span> =
|
||||
</span><span class="trait-value-total">{{data.traits.aura.total}}</span></div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="combat-values flexrow flex-between">
|
||||
<div class="combat-value-with-formula">
|
||||
<div class="combat-value hitPoints"><span
|
||||
class="combat-value-value-total">{{data.combatValues.hitPoints.total}}</span></div>
|
||||
<div class="combat-value-formula flexrow"><input type="number"
|
||||
name="data.combatValues.hitPoints.base" value='{{data.combatValues.hitPoints.base}}'
|
||||
data-dtype="Number" /><input type="number" name="data.combatValues.hitPoints.mod"
|
||||
value='{{data.combatValues.hitPoints.mod}}' data-dtype="Number" /></div>
|
||||
</div>
|
||||
<div class="combat-value-with-formula">
|
||||
<div class="combat-value defense"><span
|
||||
class="combat-value-value-total">{{data.combatValues.defense.total}}</span></div>
|
||||
<div class="combat-value-formula flexrow"><input type="number" name="data.combatValues.defense.base"
|
||||
value='{{data.combatValues.defense.base}}' data-dtype="Number" /><input type="number"
|
||||
name="data.combatValues.defense.mod" value='{{data.combatValues.defense.mod}}'
|
||||
data-dtype="Number" /></div>
|
||||
</div>
|
||||
<div class="combat-value-with-formula">
|
||||
<div class="combat-value initiative"><span
|
||||
class="combat-value-value-total">{{data.combatValues.initiative.total}}</span></div>
|
||||
<div class="combat-value-formula flexrow"><input type="number"
|
||||
name="data.combatValues.initiative.base" value='{{data.combatValues.initiative.base}}'
|
||||
data-dtype="Number" /><input type="number" name="data.combatValues.initiative.mod"
|
||||
value='{{data.combatValues.initiative.mod}}' data-dtype="Number" /></div>
|
||||
</div>
|
||||
<div class="combat-value-with-formula">
|
||||
<div class="combat-value movement"><span
|
||||
class="combat-value-value-total">{{data.combatValues.movement.total}}</span></div>
|
||||
<div class="combat-value-formula flexrow"><input type="number"
|
||||
name="data.combatValues.movement.base" value='{{data.combatValues.movement.base}}'
|
||||
data-dtype="Number" /><input type="number" name="data.combatValues.movement.mod"
|
||||
value='{{data.combatValues.movement.mod}}' data-dtype="Number" /></div>
|
||||
</div>
|
||||
<div class="combat-value-with-formula">
|
||||
<div class="combat-value meleeAttack"><span
|
||||
class="combat-value-value-total">{{data.combatValues.meleeAttack.total}}</span></div>
|
||||
<div class="combat-value-formula flexrow"><input type="number"
|
||||
name="data.combatValues.meleeAttack.base" value='{{data.combatValues.meleeAttack.base}}'
|
||||
data-dtype="Number" /><input type="number" name="data.combatValues.meleeAttack.mod"
|
||||
value='{{data.combatValues.meleeAttack.mod}}' data-dtype="Number" /></div>
|
||||
</div>
|
||||
<div class="combat-value-with-formula">
|
||||
<div class="combat-value rangedAttack"><span
|
||||
class="combat-value-value-total">{{data.combatValues.rangedAttack.total}}</span></div>
|
||||
<div class="combat-value-formula flexrow"><input type="number"
|
||||
name="data.combatValues.rangedAttack.base" value='{{data.combatValues.rangedAttack.base}}'
|
||||
data-dtype="Number" /><input type="number" name="data.combatValues.rangedAttack.mod"
|
||||
value='{{data.combatValues.rangedAttack.mod}}' data-dtype="Number" /></div>
|
||||
</div>
|
||||
<div class="combat-value-with-formula">
|
||||
<div class="combat-value spellcasting"><span
|
||||
class="combat-value-value-total">{{data.combatValues.spellcasting.total}}</span></div>
|
||||
<div class="combat-value-formula flexrow"><input type="number"
|
||||
name="data.combatValues.spellcasting.base" value='{{data.combatValues.spellcasting.base}}'
|
||||
data-dtype="Number" /><input type="number" name="data.combatValues.spellcasting.mod"
|
||||
value='{{data.combatValues.spellcasting.mod}}' data-dtype="Number" /></div>
|
||||
</div>
|
||||
<div class="combat-value-with-formula">
|
||||
<div class="combat-value targetedSpellcasting"><span
|
||||
class="combat-value-value-total">{{data.combatValues.targetedSpellcasting.total}}</span>
|
||||
</div>
|
||||
<div class="combat-value-formula flexrow"><input type="number"
|
||||
name="data.combatValues.targetedSpellcasting.base"
|
||||
value='{{data.combatValues.targetedSpellcasting.base}}' data-dtype="Number" /><input
|
||||
type="number" name="data.combatValues.targetedSpellcasting.mod"
|
||||
value='{{data.combatValues.targetedSpellcasting.mod}}' data-dtype="Number" /></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{> systems/ds4/templates/actor/partials/attributes-traits.hbs}}
|
||||
{{> systems/ds4/templates/actor/partials/combat-values.hbs}}
|
||||
|
||||
</div>
|
||||
</header>
|
||||
|
||||
|
@ -246,6 +102,6 @@
|
|||
</div>
|
||||
|
||||
{{!-- Items Tab --}}
|
||||
{{> systems/ds4/templates/actor/partials/items.hbs}}
|
||||
{{> systems/ds4/templates/actor/partials/items-overview.hbs}}
|
||||
</section>
|
||||
</form>
|
52
src/templates/actor/partials/attributes-traits.hbs
Normal file
|
@ -0,0 +1,52 @@
|
|||
{{!-- ======================================================================== --}}
|
||||
{{!-- INLINE PARTIAL DEFINITIONS --}}
|
||||
{{!-- ======================================================================== --}}
|
||||
|
||||
{{!--
|
||||
!-- Render an attribute.
|
||||
!--
|
||||
!-- @param attribute-label: The label to display for the attribute
|
||||
!-- @param attribute-key: The key of the attribute
|
||||
!-- @param attribute-data: The data for the attribute
|
||||
--}}
|
||||
|
||||
{{#*inline "attribute"}}
|
||||
<div class="attribute flexrow"><label for="data.attributes.body.total"
|
||||
class="attribute-label ">{{attribute-label}}</label>
|
||||
<div class="attribute-value flex15 grid grid-8col"><input type="number"
|
||||
name="data.attributes.{{attribute-key}}.base" value='{{attribute-data.base}}' data-dtype="Number" /><span> +
|
||||
</span><input type="number" name="data.attributes.{{attribute-key}}.mod" value='{{attribute-data.mod}}'
|
||||
data-dtype="Number" /><span> =
|
||||
</span><span class="attribute-value-total">{{attribute-data.total}}</span></div>
|
||||
</div>
|
||||
{{/inline}}
|
||||
|
||||
{{!--
|
||||
!-- Render a trait.
|
||||
!--
|
||||
!-- @param trait-label: The label to display for the trait
|
||||
!-- @param trait-key: The key of the trait
|
||||
!-- @param trait-data: The data for the trait
|
||||
--}}
|
||||
|
||||
{{#*inline "trait"}}
|
||||
<div class="trait flexrow"><label for="data.traits.strength.total" class="trait-label">{{trait-label}}</label>
|
||||
<div class="trait-value flex15 grid grid-8col"><input type="number" name="data.traits.{{trait-key}}.base"
|
||||
value='{{trait-data.base}}' data-dtype="Number" /><span> +
|
||||
</span><input type="number" name="data.traits.{{trait-key}}.mod" value='{{trait-data.mod}}'
|
||||
data-dtype="Number" /><span> =
|
||||
</span><span class="trait-value-total">{{trait-data.total}}</span></div>
|
||||
</div>
|
||||
{{/inline}}
|
||||
|
||||
{{!-- ======================================================================== --}}
|
||||
|
||||
<div class="attributes-traits grid grid-3col">
|
||||
{{#each config.attributes as |attribute-label attribute-key|}}
|
||||
{{> attribute attribute-label=attribute-label attribute-key=attribute-key attribute-data=(lookup ../data.attributes
|
||||
attribute-key)}}
|
||||
{{/each}}
|
||||
{{#each config.traits as |trait-label trait-key|}}
|
||||
{{> trait trait-label=trait-label trait-key=trait-key trait-data=(lookup ../data.traits trait-key)}}
|
||||
{{/each}}
|
||||
</div>
|
30
src/templates/actor/partials/combat-values.hbs
Normal file
|
@ -0,0 +1,30 @@
|
|||
{{!-- ======================================================================== --}}
|
||||
{{!-- INLINE PARTIAL DEFINITIONS --}}
|
||||
{{!-- ======================================================================== --}}
|
||||
|
||||
{{!--
|
||||
!-- Render a combat value.
|
||||
!--
|
||||
!-- @param combat-value-key: The key of the combat value
|
||||
!-- @param combat-value-data: The data for the attribute
|
||||
--}}
|
||||
|
||||
{{#*inline "combat-value"}}
|
||||
<div class="combat-value-with-formula">
|
||||
<div class="combat-value {{combat-value-key}}"><span class="combat-value-total">{{combat-value-data.total}}</span>
|
||||
</div>
|
||||
<div class="combat-value-formula flexrow"><input type="number" name="data.combatValues.{{combat-value-key}}.base"
|
||||
value='{{combat-value-data.base}}' data-dtype="Number" /><input type="number"
|
||||
name="data.combatValues.{{combat-value-key}}.mod" value='{{combat-value-data.mod}}' data-dtype="Number" />
|
||||
</div>
|
||||
</div>
|
||||
{{/inline}}
|
||||
|
||||
{{!-- ======================================================================== --}}
|
||||
|
||||
<div class="combat-values flexrow flex-between">
|
||||
{{#each config.combatValues as |combat-value-label combat-value-key|}}
|
||||
{{> combat-value combat-value-key=combat-value-key combat-value-data=(lookup ../data.combatValues
|
||||
combat-value-key)}}
|
||||
{{/each}}
|
||||
</div>
|
197
src/templates/actor/partials/items-overview.hbs
Normal file
|
@ -0,0 +1,197 @@
|
|||
{{!-- TODO: For items list: only show header, if list is not empty --}}
|
||||
|
||||
|
||||
{{!-- ======================================================================== --}}
|
||||
{{!-- INLINE PARTIAL DEFINITIONS --}}
|
||||
{{!-- ======================================================================== --}}
|
||||
|
||||
{{!--
|
||||
!-- Render an "add" button for a given data type.
|
||||
!--
|
||||
!-- @param datType: hand over the dataType to the partial as hash parameter
|
||||
--}}
|
||||
{{#*inline "addItemButton"}}
|
||||
<div class="item-controls">
|
||||
<a class="item-control item-create" title="Create item" data-type="{{dataType}}">
|
||||
<i class="fas fa-plus"></i>
|
||||
{{localize 'DS4.UserInteractionAddItem'}}</a>
|
||||
</div>
|
||||
{{/inline}}
|
||||
{{!--
|
||||
!-- Render a group of an "edit" and a "delete" button for the current item.
|
||||
!-- The current item is defined by the data-item-id HTML property of the parent li element.
|
||||
--}}
|
||||
{{#*inline "itemControlButtons"}}
|
||||
<div class="item-controls">
|
||||
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
|
||||
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
|
||||
</div>
|
||||
{{/inline}}
|
||||
|
||||
|
||||
{{!--
|
||||
!-- Render a header row for a given data type.
|
||||
!-- It is a flexbox with a child for each column head.
|
||||
!-- An "equipped" heading is rendered except for the case dataType==='equipment'.
|
||||
!-- The partial assumes a variable dataType to be given in the context.
|
||||
!-- If the partial is called with a partial block, the partial block
|
||||
!-- content is inserted before the description heading.
|
||||
|
||||
!-- @param datType: hand over the dataType to the partial as hash parameter
|
||||
!-- @param partial-block: hand over custom children of the flexbox in the partial block.
|
||||
--}}
|
||||
{{#*inline "itemListHeader" }}
|
||||
<li class="item flexrow item-header">
|
||||
{{!-- equipped --}}
|
||||
{{#if (ne dataType 'equipment')}}
|
||||
<div class="flex05" title="{{localize 'DS4.ItemEquipped'}}">E</div>
|
||||
{{/if}}
|
||||
{{!-- image --}}
|
||||
<div class="flex05 item-image"></div>
|
||||
{{!-- amount --}}
|
||||
<div class="flex05 item-num-val" title="{{localize 'DS4.Quantity'}}">#</div>
|
||||
{{!-- name --}}
|
||||
<div class="flex3 item-name">{{localize 'DS4.ItemName'}}</div>
|
||||
{{!-- item type specifics --}}
|
||||
{{> @partial-block }}
|
||||
{{!-- description --}}
|
||||
<div class="flex4">{{localize 'DS4.Description'}}</div>
|
||||
{{!-- add button --}}
|
||||
{{> addItemButton dataType=dataType }}
|
||||
</li>
|
||||
{{/inline}}
|
||||
|
||||
{{!--
|
||||
!-- Render a list row from a given item.
|
||||
!-- It is a flexbox with a child for each item value of interest.
|
||||
!-- An equipped checkbox is rendered if item.data.data.equipped is defined.
|
||||
!-- The partial assumes a variable item to be given in the context.
|
||||
!-- If the partial is called with a partial block, the partial block
|
||||
!-- content is inserted before the description.
|
||||
|
||||
!-- @param item: hand over the item to the partial as hash parameter
|
||||
!-- @param partial-block: hand over custom children of the flexbox in the partial block.
|
||||
--}}
|
||||
{{#*inline "itemListEntry"}}
|
||||
<li class="item flexrow" data-item-id="{{item._id}}">
|
||||
{{!-- equipped --}}
|
||||
{{#if (ne item.data.data.equipped undefined)}}
|
||||
<input class="flex05 item-change" type="checkbox" {{checked item.data.data.equipped}} data-dtype="Boolean"
|
||||
data-property="data.equipped" title="{{localize 'DS4.ItemEquipped'}}">
|
||||
{{/if}}
|
||||
{{!-- image --}}
|
||||
<div class="flex05 item-image">
|
||||
<img src="{{item.img}}" title="{{item.name}}" width="24" height="24" />
|
||||
</div>
|
||||
{{!-- amount --}}
|
||||
<input class="flex05 item-num-val item-change" type="number" min="0" step="1" value="{{item.data.data.quantity}}" data-dtype="Number"
|
||||
data-property="data.quantity" title="{{localize 'DS4.Quantity'}}">
|
||||
{{!-- name --}}
|
||||
<input class="flex3 item-name item-change" type="text" value="{{item.name}}" data-dtype="String"
|
||||
data-property="name" title="{{localize 'DS4.ItemName'}}">
|
||||
{{!-- item type specifics --}}
|
||||
{{> @partial-block}}
|
||||
{{!-- description --}}
|
||||
<div class="flex4 item-description">{{{item.data.data.description}}}</div>
|
||||
{{!-- control buttons --}}
|
||||
{{> itemControlButtons}}
|
||||
</li>
|
||||
{{/inline}}
|
||||
|
||||
|
||||
{{!-- ======================================================================== --}}
|
||||
|
||||
|
||||
<div class="tab items" data-group="primary" data-tab="items">
|
||||
|
||||
{{!-- WEAPONS --}}
|
||||
<h4 class="items-list-title">{{localize 'DS4.ItemTypeWeapon'}}</h4>
|
||||
<ol class="items-list">
|
||||
{{#> itemListHeader dataType='weapon'}}
|
||||
<div class="flex05 item-image" title="{{localize 'DS4.AttackType'}}">{{localize 'DS4.AttackTypeAbbr'}}</div>
|
||||
<div class="flex05 item-num-val" title="{{localize 'DS4.WeaponBonus'}}">
|
||||
{{localize 'DS4.WeaponBonusAbbr'}}
|
||||
</div>
|
||||
<div class="flex05 item-num-val" title="{{localize 'DS4.OpponentDefense'}}">
|
||||
{{localize 'DS4.OpponentDefenseAbbr'}}
|
||||
</div>
|
||||
{{/itemListHeader}}
|
||||
{{#each itemsByType.weapon as |item id|}}
|
||||
{{#> itemListEntry item=item}}
|
||||
<div class="flex05 item-image">
|
||||
<img src="{{lookup ../../config.attackTypesIcons item.data.data.attackType}}"
|
||||
title="{{lookup ../../config.attackTypes item.data.data.attackType}}" width="24" height="24" />
|
||||
</div>
|
||||
<div class="flex05 item-num-val">{{ item.data.data.weaponBonus}}</div>
|
||||
<div class="flex05 item-num-val">{{ item.data.data.opponentDefense}}</div>
|
||||
{{/itemListEntry}}
|
||||
{{/each}}
|
||||
</ol>
|
||||
|
||||
{{!-- ARMOR --}}
|
||||
<h4 class="items-list-title">{{localize 'DS4.ItemTypeArmor'}}</h4>
|
||||
<ol class="items-list">
|
||||
{{#> itemListHeader dataType='armor'}}
|
||||
<div title="{{localize 'DS4.ArmorMaterialType'}}">{{localize 'DS4.ArmorMaterialTypeAbbr'}}</div>
|
||||
<div title="{{localize 'DS4.ArmorType'}}">{{localize 'DS4.ArmorTypeAbbr'}}</div>
|
||||
<div class="flex05 item-num-val" title="{{localize 'DS4.ArmorValue'}}">
|
||||
{{localize 'DS4.ArmorValueAbbr'}}
|
||||
</div>
|
||||
{{/itemListHeader}}
|
||||
{{#each itemsByType.armor as |item id|}}
|
||||
{{#> itemListEntry item=item }}
|
||||
<div title="{{lookup ../../config.armorMaterialTypes item.data.data.armorMaterialType}}">
|
||||
{{lookup ../../config.armorMaterialTypesAbbr item.data.data.armorMaterialType}}
|
||||
</div>
|
||||
<div title="{{lookup ../../config.armorTypes item.data.data.armorType}}">
|
||||
{{lookup ../../config.armorTypesAbbr item.data.data.armorType}}
|
||||
</div>
|
||||
<div class="flex05 item-num-val">{{ item.data.data.armorValue}}</div>
|
||||
{{/itemListEntry}}
|
||||
{{/each}}
|
||||
</ol>
|
||||
|
||||
|
||||
{{!-- SHIELD --}}
|
||||
<h4 class="items-list-title">{{localize 'DS4.ItemTypeShield'}}</h4> {{!-- SPECIFIC --}}
|
||||
<ol class="items-list">
|
||||
{{#> itemListHeader dataType='shield' }}
|
||||
<div class="flex05 item-num-val" title="{{localize 'DS4.ArmorValue'}}">
|
||||
{{localize 'DS4.ArmorValueAbbr'}}
|
||||
</div>
|
||||
{{/itemListHeader}}
|
||||
{{#each itemsByType.shield as |item id|}}
|
||||
{{#> itemListEntry item=item }}
|
||||
<div class="flex05 item-num-val">{{item.data.data.armorValue}}</div> {{!-- SPECIFIC --}}
|
||||
{{/itemListEntry}}
|
||||
{{/each}}
|
||||
</ol>
|
||||
|
||||
{{!-- TRINKET --}}
|
||||
<h4 class="items-list-title">{{localize 'DS4.ItemTypeTrinket'}}</h4>
|
||||
<ol class="items-list">
|
||||
{{#> itemListHeader dataType='trinket'}}
|
||||
<div class="flex2">{{localize 'DS4.StorageLocation'}}</div>
|
||||
{{/itemListHeader}}
|
||||
{{#each itemsByType.trinket as |item id|}}
|
||||
{{#> itemListEntry item=item }}
|
||||
<input class="flex2 item-change" type="text" value="{{item.data.data.storageLocation}}" data-dtype="String"
|
||||
data-property="data.storageLocation" title="{{localize 'DS4.StorageLocation'}}">
|
||||
{{/itemListEntry}}
|
||||
{{/each}}
|
||||
</ol>
|
||||
|
||||
{{!-- EQUIPMENT --}}
|
||||
<h4 class="items-list-title">{{localize 'DS4.ItemTypeEquipment'}}</h4>
|
||||
<ol class="items-list">
|
||||
{{#> itemListHeader dataType='equipment'}}
|
||||
<div class="flex2">{{localize 'DS4.StorageLocation'}}</div>
|
||||
{{/itemListHeader}}
|
||||
{{#each itemsByType.equipment as |item id|}}
|
||||
{{#> itemListEntry item=item }}
|
||||
<input class="flex2 item-change" type="text" value="{{item.data.data.storageLocation}}" data-dtype="String"
|
||||
data-property="data.storageLocation" title="{{localize 'DS4.StorageLocation'}}">
|
||||
{{/itemListEntry}}
|
||||
{{/each}}
|
||||
</ol>
|
||||
</div>
|
|
@ -1,277 +0,0 @@
|
|||
{{!-- TODO: For items list: only show header, if list is not empty --}}
|
||||
{{!-- TODO: Reduce code duplications --}}
|
||||
{{!-- TODO: Change from flex layout to grid layout --}}
|
||||
{{!-- Tab with overview and quick-actions on owned items --}}
|
||||
<div class="tab items" data-group="primary" data-tab="items">
|
||||
|
||||
{{!-- WEAPONS --}}
|
||||
<h4 class="items-list-title">{{localize 'DS4.ItemTypeWeapon'}}</h4> {{!-- SPECIFIC --}}
|
||||
<ol class="items-list">
|
||||
<li class="item flexrow item-header">
|
||||
<div class="flexrow flex15">
|
||||
<div title="{{localize 'DS4.ItemEquipped'}}">E</div> {{!-- equipped --}} {{!-- SPECIFIC --}}
|
||||
<div class="item-image"></div>
|
||||
<div class="item-num-val" title="{{localize 'DS4.Quantity'}}">#</div> {{!-- amount --}}
|
||||
</div>
|
||||
<div class="item-name flex3">{{localize 'DS4.ItemName'}}</div>
|
||||
<div title="{{localize 'DS4.AttackType'}}">{{localize 'DS4.AttackTypeAbbr'}}</div> {{!-- SPECIFIC --}}
|
||||
<div class="flexrow flex15">
|
||||
<div class="item-num-val" title="{{localize 'DS4.WeaponBonus'}}">{{localize 'DS4.WeaponBonusAbbr'}}
|
||||
</div> {{!-- SPECIFIC --}}
|
||||
<div class="item-num-val" title="{{localize 'DS4.OpponentDefense'}}">{{localize
|
||||
'DS4.OpponentDefenseAbbr'}}</div> {{!-- SPECIFIC --}}
|
||||
</div>
|
||||
<div class="flex4">{{localize 'DS4.Description'}}</div>
|
||||
{{!-- add button --}}
|
||||
<div class="item-controls"> {{!-- SPECIFIC --}}
|
||||
<a class="item-control item-create" title="Create item" data-type="weapon" {{!-- SPECIFIC --}}>
|
||||
<i class="fas fa-plus"></i>
|
||||
{{localize 'DS4.UserInteractionAddItem'}}</a>
|
||||
</div>
|
||||
</li>
|
||||
{{#each itemsByType.weapon as |item id|}} {{!-- SPECIFIC --}}
|
||||
{{#with item.data.data as |itemData|}}
|
||||
<li class="item flexrow" data-item-id="{{item._id}}">
|
||||
<div class="flexrow flex15">
|
||||
{{!-- equipped? --}}
|
||||
{{#if itemData.equipped}}<i class="fas fa-check-square"></i>
|
||||
{{else}}<i class="far fa-square"></i>
|
||||
{{/if}} {{!--SPECIFIC --}}
|
||||
{{!-- image --}}
|
||||
<div class="item-image">
|
||||
<img src="{{item.img}}" title="{{item.name}}" width="24" height="24" />
|
||||
</div>
|
||||
{{!-- amount --}}
|
||||
<div class="item-num-val">{{itemData.quantity}}</div>
|
||||
</div>
|
||||
{{!-- name --}}
|
||||
<h4 class="item-name flex3">{{item.name}}</h4>
|
||||
{{!-- item specifics --}}
|
||||
<div>
|
||||
<img src="{{lookup ../../config.attackTypesIcons itemData.attackType}}"
|
||||
title="{{lookup ../../config.attackTypes itemData.attackType}}" width="24" height="24" />
|
||||
</div> {{!-- SPECIFIC --}}
|
||||
<div class="flexrow flex15">
|
||||
<div class="item-num-val">{{itemData.weaponBonus}}</div> {{!-- SPECIFIC --}}
|
||||
<div class="item-num-val">{{itemData.opponentDefense}}</div> {{!-- SPECIFIC --}}
|
||||
</div>
|
||||
{{!-- description --}}
|
||||
<div class="flex4 item-description">{{{itemData.description}}}</div>
|
||||
{{!-- edit & delete buttons --}}
|
||||
<div class="item-controls">
|
||||
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
|
||||
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
|
||||
</div>
|
||||
</li>
|
||||
{{/with}}
|
||||
{{/each}}
|
||||
</ol>
|
||||
|
||||
{{!-- ARMOR --}}
|
||||
<h4 class="items-list-title">{{localize 'DS4.ItemTypeArmor'}}</h4> {{!-- SPECIFIC --}}
|
||||
<ol class="items-list">
|
||||
<li class="item flexrow item-header">
|
||||
<div class="flexrow flex15">
|
||||
<div title="{{localize 'DS4.ItemEquipped'}}">E</div> {{!-- equipped --}} {{!-- SPECIFIC --}}
|
||||
<div class="item-image"></div>
|
||||
<div class="item-num-val" title="{{localize 'DS4.Quantity'}}">#</div> {{!-- amount --}}
|
||||
</div>
|
||||
<div class="item-name flex3">{{localize 'DS4.ItemName'}}</div>
|
||||
<div title="{{localize 'DS4.ArmorMaterialType'}}">{{localize 'DS4.ArmorMaterialTypeAbbr'}}</div> {{!--
|
||||
SPECIFIC --}}
|
||||
<div title="{{localize 'DS4.ArmorType'}}">{{localize 'DS4.ArmorTypeAbbr'}}</div> {{!-- SPECIFIC --}}
|
||||
<div class="flex05 item-num-val" title="{{localize 'DS4.ArmorValue'}}">
|
||||
{{localize 'DS4.ArmorValueAbbr'}}
|
||||
</div> {{!-- SPECIFIC --}}
|
||||
<div class="flex3">{{localize 'DS4.Description'}}</div>
|
||||
{{!-- add button --}}
|
||||
<div class="item-controls"> {{!-- SPECIFIC --}}
|
||||
<a class="item-control item-create" title="Create item" data-type="armor" {{!-- SPECIFIC --}}>
|
||||
<i class="fas fa-plus"></i>
|
||||
{{localize 'DS4.UserInteractionAddItem'}}</a>
|
||||
</div>
|
||||
</li>
|
||||
{{#each itemsByType.armor as |item id|}} {{!-- SPECIFIC --}}
|
||||
{{#with item.data.data as |itemData|}}
|
||||
<li class="item flexrow" data-item-id="{{item._id}}">
|
||||
<div class="flexrow flex15">
|
||||
{{!-- equipped? --}}
|
||||
{{#if itemData.equipped}}<i class="fas fa-check-square"></i>
|
||||
{{else}}<i class="far fa-square"></i>
|
||||
{{/if}} {{!--SPECIFIC --}}
|
||||
{{!-- image --}}
|
||||
<div class="item-image">
|
||||
<img src="{{item.img}}" title="{{item.name}}" width="24" height="24" />
|
||||
</div>
|
||||
{{!-- amount --}}
|
||||
<div class="item-num-val">{{itemData.quantity}}</div>
|
||||
</div>
|
||||
{{!-- name --}}
|
||||
<h4 class="item-name flex3">{{item.name}}</h4>
|
||||
{{!-- item specifics --}}
|
||||
<div title="{{lookup ../../config.armorMaterialTypes itemData.armorMaterialType}}">
|
||||
{{lookup ../../config.armorMaterialTypesAbbr itemData.armorMaterialType}}
|
||||
</div> {{!-- SPECIFIC --}}
|
||||
<div title="{{lookup ../../config.armorTypes itemData.armorType}}">
|
||||
{{lookup ../../config.armorTypesAbbr itemData.armorType}}
|
||||
</div> {{!-- SPECIFIC --}}
|
||||
<div class="flex05 item-num-val">{{itemData.armorValue}}</div> {{!-- SPECIFIC --}}
|
||||
{{!-- description --}}
|
||||
<div class="flex3 item-description">{{{itemData.description}}}</div>
|
||||
{{!-- edit & delete buttons --}}
|
||||
<div class="item-controls">
|
||||
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
|
||||
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
|
||||
</div>
|
||||
</li>
|
||||
{{/with}}
|
||||
{{/each}}
|
||||
</ol>
|
||||
|
||||
|
||||
{{!-- SHIELD --}}
|
||||
<h4 class="items-list-title">{{localize 'DS4.ItemTypeShield'}}</h4> {{!-- SPECIFIC --}}
|
||||
<ol class="items-list">
|
||||
<li class="item flexrow item-header">
|
||||
<div class="flexrow flex15">
|
||||
<div title="{{localize 'DS4.ItemEquipped'}}">E</div> {{!-- equipped --}} {{!-- SPECIFIC --}}
|
||||
<div class="item-image"></div>
|
||||
<div class="item-num-val" title="{{localize 'DS4.Quantity'}}">#</div> {{!-- amount --}}
|
||||
</div>
|
||||
<div class="item-name flex3">{{localize 'DS4.ItemName'}}</div>
|
||||
<div class="flex05 item-num-val" title="{{localize 'DS4.ArmorValue'}}">{{localize 'DS4.ArmorValueAbbr'}}
|
||||
</div> {{!-- SPECIFIC --}}
|
||||
<div class="flex4">{{localize 'DS4.Description'}}</div>
|
||||
{{!-- add button --}}
|
||||
<div class="item-controls"> {{!-- SPECIFIC --}}
|
||||
<a class="item-control item-create" title="Create item" data-type="shield" {{!-- SPECIFIC --}}>
|
||||
<i class="fas fa-plus"></i>
|
||||
{{localize 'DS4.UserInteractionAddItem'}}</a>
|
||||
</div>
|
||||
</li>
|
||||
{{#each itemsByType.shield as |item id|}} {{!-- SPECIFIC --}}
|
||||
{{#with item.data.data as |itemData|}}
|
||||
<li class="item flexrow" data-item-id="{{item._id}}">
|
||||
<div class="flexrow flex15">
|
||||
{{!-- equipped? --}}
|
||||
{{#if itemData.equipped}}<i class="fas fa-check-square"></i>
|
||||
{{else}}<i class="far fa-square"></i>
|
||||
{{/if}} {{!--SPECIFIC --}}
|
||||
{{!-- image --}}
|
||||
<div class="item-image">
|
||||
<img src="{{item.img}}" title="{{item.name}}" width="24" height="24" />
|
||||
</div>
|
||||
{{!-- amount --}}
|
||||
<div class="item-num-val">{{itemData.quantity}}</div>
|
||||
</div>
|
||||
{{!-- name --}}
|
||||
<h4 class="item-name flex3">{{item.name}}</h4>
|
||||
{{!-- item specifics --}}
|
||||
<div class="flex05 item-num-val">{{itemData.armorValue}}</div> {{!-- SPECIFIC --}}
|
||||
{{!-- description --}}
|
||||
<div class="flex4 item-description">{{{itemData.description}}}</div>
|
||||
{{!-- edit & delete buttons --}}
|
||||
<div class="item-controls">
|
||||
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
|
||||
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
|
||||
</div>
|
||||
</li>
|
||||
{{/with}}
|
||||
{{/each}}
|
||||
</ol>
|
||||
|
||||
{{!-- TRINKET --}}
|
||||
<h4 class="items-list-title">{{localize 'DS4.ItemTypeTrinket'}}</h4> {{!-- SPECIFIC --}}
|
||||
<ol class="items-list">
|
||||
<li class="item flexrow item-header">
|
||||
<div class="flexrow flex15">
|
||||
<div title="{{localize 'DS4.ItemEquipped'}}">E</div> {{!-- equipped --}} {{!-- SPECIFIC --}}
|
||||
<div class="item-image"></div>
|
||||
<div class="item-num-val" title="{{localize 'DS4.Quantity'}}">#</div> {{!-- amount --}}
|
||||
</div>
|
||||
<div class="item-name flex3">{{localize 'DS4.ItemName'}}</div>
|
||||
<div class="flex2">{{localize 'DS4.StorageLocation'}}</div> {{!-- SPECIFIC --}}
|
||||
<div class="flex4">{{localize 'DS4.Description'}}</div>
|
||||
{{!-- add button --}}
|
||||
<div class="item-controls"> {{!-- SPECIFIC --}}
|
||||
<a class="item-control item-create" title="Create item" data-type="trinket" {{!-- SPECIFIC --}}>
|
||||
<i class="fas fa-plus"></i>
|
||||
{{localize 'DS4.UserInteractionAddItem'}}</a>
|
||||
</div>
|
||||
</li>
|
||||
{{#each itemsByType.trinket as |item id|}} {{!-- SPECIFIC --}}
|
||||
{{#with item.data.data as |itemData|}}
|
||||
<li class="item flexrow" data-item-id="{{item._id}}">
|
||||
<div class="flexrow flex15">
|
||||
{{!-- equipped? --}}
|
||||
{{#if itemData.equipped}}<i class="fas fa-check-square"></i>
|
||||
{{else}}<i class="far fa-square"></i>
|
||||
{{/if}} {{!--SPECIFIC --}}
|
||||
{{!-- image --}}
|
||||
<div class="item-image">
|
||||
<img src="{{item.img}}" title="{{item.name}}" width="24" height="24" />
|
||||
</div>
|
||||
{{!-- amount --}}
|
||||
<div class="item-num-val">{{itemData.quantity}}</div>
|
||||
</div>
|
||||
{{!-- name --}}
|
||||
<h4 class="item-name flex3">{{item.name}}</h4>
|
||||
{{!-- storage location --}}
|
||||
<div class="flex2">{{{itemData.storageLocation}}}</div> {{!-- SPECIFIC --}}
|
||||
{{!-- description --}}
|
||||
<div class="flex4 item-description">{{{itemData.description}}}</div>
|
||||
{{!-- edit & delete buttons --}}
|
||||
<div class="item-controls">
|
||||
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
|
||||
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
|
||||
</div>
|
||||
</li>
|
||||
{{/with}}
|
||||
{{/each}}
|
||||
</ol>
|
||||
|
||||
{{!-- EQUIPMENT --}}
|
||||
<h4 class="items-list-title">{{localize 'DS4.ItemTypeEquipment'}}</h4> {{!-- SPECIFIC --}}
|
||||
<ol class="items-list">
|
||||
<li class="item flexrow item-header">
|
||||
<div class="flexrow flex15">
|
||||
<div class="item-image"></div>
|
||||
<div class="item-num-val" title="{{localize 'DS4.Quantity'}}">#</div> {{!-- amount --}}
|
||||
</div>
|
||||
<div class="item-name flex3">{{localize 'DS4.ItemName'}}</div>
|
||||
<div class="flex2">{{localize 'DS4.StorageLocation'}}</div> {{!-- SPECIFIC --}}
|
||||
<div class="flex4">{{localize 'DS4.Description'}}</div>
|
||||
{{!-- add button --}}
|
||||
<div class="item-controls"> {{!-- SPECIFIC --}}
|
||||
<a class="item-control item-create" title="Create item" data-type="equipment" {{!-- SPECIFIC --}}>
|
||||
<i class="fas fa-plus"></i>
|
||||
{{localize 'DS4.UserInteractionAddItem'}}</a>
|
||||
</div>
|
||||
</li>
|
||||
{{#each itemsByType.equipment as |item id|}} {{!-- SPECIFIC --}}
|
||||
{{#with item.data.data as |itemData|}}
|
||||
<li class="item flexrow" data-item-id="{{item._id}}">
|
||||
<div class="flexrow flex15">
|
||||
{{!-- image --}}
|
||||
<div class="item-image">
|
||||
<img src="{{item.img}}" title="{{item.name}}" width="24" height="24" />
|
||||
</div>
|
||||
{{!-- amount --}}
|
||||
<div class="item-num-val">{{itemData.quantity}}</div>
|
||||
</div>
|
||||
{{!-- name --}}
|
||||
<h4 class="item-name flex3">{{item.name}}</h4>
|
||||
{{!-- storage location --}}
|
||||
<div class="flex2">{{{itemData.storageLocation}}}</div> {{!-- SPECIFIC --}}
|
||||
{{!-- description --}}
|
||||
<div class="flex4 item-description">{{{itemData.description}}}</div>
|
||||
{{!-- edit & delete buttons --}}
|
||||
<div class="item-controls">
|
||||
<a class="item-control item-edit" title="Edit Item"><i class="fas fa-edit"></i></a>
|
||||
<a class="item-control item-delete" title="Delete Item"><i class="fas fa-trash"></i></a>
|
||||
</div>
|
||||
</li>
|
||||
{{/with}}
|
||||
{{/each}}
|
||||
</ol>
|
||||
</div>
|
|
@ -1,19 +1,19 @@
|
|||
<div class="tab flexrow" data-group="primary" data-tab="description">
|
||||
<div class="side-properties">
|
||||
{{#if isOwned}}
|
||||
<div class="side-property">
|
||||
<label for="data.actor">{{localize 'DS4.ItemOwner'}}</label>
|
||||
<a class="entity-link" draggable="true" data-entity="Actor" data-id="{{actor._id}}"><i
|
||||
class="fas fa-user"></i>{{actor.name}}</a>
|
||||
</div>
|
||||
{{#if (ne data.equipped undefined)}}<div class="side-property">
|
||||
<label for="data.equipped">{{localize 'DS4.ItemEquipped'}}</label>
|
||||
<input type="checkbox" name="data.equipped" data-dtype="Boolean" {{checked data.equipped}} title="{{localize 'DS4.ItemEquipped'}}">
|
||||
</div>
|
||||
{{/if}}
|
||||
<div class="side-property">
|
||||
<label for="data.actor">{{localize 'DS4.ItemOwner'}}</label>
|
||||
<a class="entity-link" draggable="true" data-entity="Actor" data-id="{{actor._id}}"><i
|
||||
class="fas fa-user"></i>{{actor.name}}</a>
|
||||
</div>
|
||||
<div class="side-property">
|
||||
<label for="data.quantity">{{localize 'DS4.Quantity'}}</label>
|
||||
<input type="number" data-dtype="Number" name="data.quantity" value="{{data.quantity}}" />
|
||||
<input type="number" min="0" step="1" data-dtype="Number" name="data.quantity" value="{{data.quantity}}" />
|
||||
</div>
|
||||
<div class="side-property">
|
||||
<label for="data.storageLocation">{{localize 'DS4.StorageLocation'}}</label>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
<div class="side-properties">
|
||||
<div class="side-property">
|
||||
<label for="data.price">{{localize "DS4.PriceGold"}}</label>
|
||||
<input type="number" data-dtype="Number" name="data.price" value="{{data.price}}" />
|
||||
<input type="number" min="0" data-dtype="Number" name="data.price" value="{{data.price}}" />
|
||||
</div>
|
||||
<div class="side-property">
|
||||
<label for="data.availability">{{localize "DS4.ItemAvailability"}}</label>
|
||||
|
|