diff --git a/src/ActorSheet.html b/src/ActorSheet.html index 8df08e4..0d911b1 100644 --- a/src/ActorSheet.html +++ b/src/ActorSheet.html @@ -1,9 +1,12 @@ -{{#*inline "editable-text"}} -
+{{#*inline "editable-input"}} +
{{#if @root.editable}} - + {{else}} -
{{value}}
+
+ {{value}} + {{#unless value}}{{placeholder}}{{/unless}} +
{{/if}} {{#if placeholder}} @@ -13,22 +16,22 @@ {{/inline}} {{#*inline "die-type"}} -
{{type}}
+
{{localize (concat "DSA41.attributes.short." type)}}
{{/inline}} {{#*inline "die-value"}}
-
{{type}}
+
{{localize (concat "DSA41.attributes.short." type)}}
{{lookup @root.actor.system.computed type}}
{{/inline}}
- {{>editable-text name="name" value=actor.name placeholder="Name"}} - {{>editable-text name="system.race" value=actor.system.race placeholder="Rasse"}} - {{>editable-text name="system.cultuee" value=actor.system.culture placeholder="Kultur"}} - {{>editable-text name="system.profession" value=actor.system.profession placeholder="Profession"}} + {{>editable-input type="text" name="name" value=actor.name placeholder=(localize "DSA41.name")}} + {{>editable-input type="text" name="system.race" value=actor.system.race placeholder=(localize "DSA41.race")}} + {{>editable-input type="text" name="system.culture" value=actor.system.culture placeholder=(localize "DSA41.culture")}} + {{>editable-input type="text" name="system.profession" value=actor.system.profession placeholder=(localize "DSA41.profession")}}
@@ -37,31 +40,34 @@ {{/each}}
- - - - {{#each actor.system.attributes}} - - {{/each}} - - - - {{#each actor.system.attributes}} - - {{/each}} - - - - {{#each actor.system.attributes}} - - {{/each}} - - - - {{#each actor.system.attributes}} - - {{/each}} - -
{{@key}}
Startwert{{>editable-text name=(concat "system.attributes." @key ".initial") value=(lookup this "initial")}}
Steigerungen{{>editable-text name=(concat "system.attributes." @key ".advancement") value=(lookup this "advancement")}}
Modifikatoren{{>editable-text name=(concat "system.attributes." @key ".modifier") value=(lookup this "modifier")}}
+
+ {{localize "DSA41.attributes.label"}} + + + + {{#each actor.system.attributes}} + + {{/each}} + + + + {{#each actor.system.attributes}} + + {{/each}} + + + + {{#each actor.system.attributes}} + + {{/each}} + + + + {{#each actor.system.attributes}} + + {{/each}} + +
{{localize (concat "DSA41.attributes.short." @key)}}
{{localize "DSA41.attributes.initial"}}{{>editable-input type="number" name=(concat "system.attributes." @key ".initial") value=(lookup this "initial")}}
{{localize "DSA41.attributes.advancement"}}{{>editable-input type="number" name=(concat "system.attributes." @key ".advancement") value=(lookup this "advancement")}}
{{localize "DSA41.attributes.modifier"}}{{>editable-input type="number" name=(concat "system.attributes." @key ".modifier") value=(lookup this "modifier")}}
+
\ No newline at end of file diff --git a/src/lang/de.json b/src/lang/de.json new file mode 100644 index 0000000..be10413 --- /dev/null +++ b/src/lang/de.json @@ -0,0 +1,37 @@ +{ + "DSA41": { + "name": "Name", + "race": "Rasse", + "culture": "Kultur", + "profession": "Profession", + + "attributes": { + "label": "Eigenschaften", + "initial": "Startwert", + "advancement": "Steigerungen", + "modifier": "Modifikatoren", + + "long": { + "courage": "Mut", + "cleverness": "Klugheit", + "intuition": "Intuition", + "charisma": "Charisma", + "dexterity": "Fingerfertigkeit", + "agility": "Gewandheit", + "constitution": "Konstitution", + "strength": "Körperkraft" + }, + + "short": { + "courage": "MU", + "cleverness": "KL", + "intuition": "IN", + "charisma": "CH", + "dexterity": "FF", + "agility": "GE", + "constitution": "KO", + "strength": "KK" + } + } + } +} \ No newline at end of file diff --git a/src/lang/en.json b/src/lang/en.json new file mode 100644 index 0000000..7ff6d94 --- /dev/null +++ b/src/lang/en.json @@ -0,0 +1,37 @@ +{ + "DSA41": { + "name": "Name", + "race": "Race", + "culture": "Culture", + "profession": "Profession", + + "attributes": { + "label": "Attributes", + "initial": "Initial", + "advancement": "Advancements", + "modifier": "Modifiers", + + "long": { + "courage": "Courage", + "cleverness": "Cleverness", + "intuition": "Intuition", + "charisma": "Charisma", + "dexterity": "Dexterity", + "agility": "Agility", + "constitution": "Constitution", + "strength": "Strength" + }, + + "short": { + "courage": "CO", + "cleverness": "CL", + "intuition": "IN", + "charisma": "CH", + "dexterity": "DE", + "agility": "AG", + "constitution": "CN", + "strength": "ST" + } + } + } +} \ No newline at end of file diff --git a/src/main.css b/src/main.css index d9f6f00..4d8cd7d 100644 --- a/src/main.css +++ b/src/main.css @@ -17,19 +17,25 @@ } + +.editable-input { + flex: 1; + padding: 0px 3px; +} + +.editable-input input { + border: none; +} + +.editable-number { + text-align: center; +} + .placeholder { font-size: 0.8em; border-top: 1px solid; } -.editable-text { - flex: 1; - padding: 0px 3px; -} - -.editable-text input { - border: none; -} .character-image { @@ -50,15 +56,24 @@ color: #fff; } -.die-MU { background-color: #b22319; } -.die-KL { background-color: #8158a3; } -.die-IN { background-color: #388834; } -.die-CH { background-color: #0c0c0c; } -.die-FF { background-color: #d4b366; } -.die-GE { background-color: #678ec3; } -.die-KO { background-color: #a3a3a3; } -.die-KK { background-color: #d5a877; } +.die-courage { background-color: #b22319; } +.die-cleverness { background-color: #8158a3; } +.die-intuition { background-color: #388834; } +.die-charisma { background-color: #0c0c0c; } +.die-dexterity { background-color: #d4b366; } +.die-agility { background-color: #678ec3; } +.die-constitution { background-color: #a3a3a3; } +.die-strength { background-color: #d5a877; } +.actor-sheet fieldset { + width: 100%; +} + +.actor-sheet table { + border: none; + background: none; + table-layout: fixed; +} .item-sheet header { display: flex; diff --git a/src/main.mjs b/src/main.mjs index bf99013..3d222ef 100644 --- a/src/main.mjs +++ b/src/main.mjs @@ -44,14 +44,14 @@ class DSA41_CharacterData extends foundry.abstract.TypeDataModel { profession: new StringField(), attributes: new SchemaField({ - MU: new AttributeField(), - KL: new AttributeField(), - IN: new AttributeField(), - CH: new AttributeField(), - FF: new AttributeField(), - GE: new AttributeField(), - KO: new AttributeField(), - KK: new AttributeField(), + courage: new AttributeField(), + cleverness: new AttributeField(), + intuition: new AttributeField(), + charisma: new AttributeField(), + dexterity: new AttributeField(), + agility: new AttributeField(), + constitution: new AttributeField(), + strength: new AttributeField(), }), } } diff --git a/system.json b/system.json index 1fe166a..bb8d5ea 100644 --- a/system.json +++ b/system.json @@ -5,6 +5,19 @@ "esmodules": ["src/main.mjs"], "styles": ["src/main.css"], + "languages": [ + { + "lang": "de", + "name": "German (Deutsch)", + "path": "src/lang/de.json" + }, + { + "lang": "en", + "name": "English", + "path": "src/lang/en.json" + } + ], + "version": "0.1.5", "manifest": "https://gitea.ammerhai.com/foundry/dsa-4th-edition/releases/download/latest/system.json", "download": "https://gitea.ammerhai.com/foundry/dsa-4th-edition/releases/download/test2/dsa-4th-edition.zip"