Fix char sheet iteration

This commit is contained in:
2025-03-03 23:35:22 +01:00
parent 5771272cff
commit da9a69b916
11 changed files with 493 additions and 825 deletions

View File

@@ -323,46 +323,46 @@ i.fvtt-ftl-nomad {
.fvtt-ftl-nomad .character-main .character-pc-edit {
min-width: 650px;
}
.fvtt-ftl-nomad .character-main .character-characteristics {
.fvtt-ftl-nomad .character-main .character-skills {
background-color: var(--color-light-1);
display: flex;
flex-direction: column;
gap: 5px;
flex: 1;
}
.fvtt-ftl-nomad .character-main .character-characteristics .character-characteristic {
.fvtt-ftl-nomad .character-main .character-skills .character-skill {
display: flex;
align-items: center;
}
.fvtt-ftl-nomad .character-main .character-characteristics .character-characteristic .rollable:hover,
.fvtt-ftl-nomad .character-main .character-characteristics .character-characteristic .rollable:focus {
.fvtt-ftl-nomad .character-main .character-skills .character-skill .rollable:hover,
.fvtt-ftl-nomad .character-main .character-skills .character-skill .rollable:focus {
text-shadow: 0 0 8px var(--color-shadow-primary);
cursor: pointer;
}
.fvtt-ftl-nomad .character-main .character-characteristics .character-characteristic .rollable {
min-width: 3rem;
max-width: 3rem;
.fvtt-ftl-nomad .character-main .character-skills .character-skill .rollable {
min-width: 4.5rem;
max-width: 4.5rem;
}
.fvtt-ftl-nomad .character-main .character-characteristics .character-characteristic .char-text {
.fvtt-ftl-nomad .character-main .character-skills .character-skill .char-text {
margin-left: 0.5rem;
}
.fvtt-ftl-nomad .character-main .character-characteristics .character-characteristic .d100 {
.fvtt-ftl-nomad .character-main .character-skills .character-skill .d100 {
flex: 0;
max-width: 0.6rem;
}
.fvtt-ftl-nomad .character-main .character-characteristics .character-characteristic .form-group {
.fvtt-ftl-nomad .character-main .character-skills .character-skill .form-group {
flex: 0;
padding-left: 5px;
}
.fvtt-ftl-nomad .character-main .character-characteristics .character-characteristic .form-group .form-fields {
.fvtt-ftl-nomad .character-main .character-skills .character-skill .form-group .form-fields {
font-size: 1.1rem;
flex: none;
width: 40px;
}
.fvtt-ftl-nomad .character-main .character-characteristic-play {
.fvtt-ftl-nomad .character-main .character-skill-play {
min-width: 225px;
}
.fvtt-ftl-nomad .character-main .character-characteristic-edit {
.fvtt-ftl-nomad .character-main .character-skill-edit {
min-width: 400px;
}
.fvtt-ftl-nomad .character-biography {

View File

@@ -32,7 +32,7 @@ Hooks.once("init", function () {
CONFIG.Actor.documentClass = documents.FTLNomadActor
CONFIG.Actor.dataModels = {
protagonist: models.FTLNomadCharacter,
character: models.FTLNomadCharacter,
vehicle: models.FTLNomadVehicle,
creature: models.FTLNomadCreature,
starship: models.FTLNomadStarship

View File

@@ -1,323 +1,168 @@
{
"TYPES": {
"Actor": {
"character": "Character",
"vehicle": "Vehicle",
"creature": "Creature",
"starship": "Starship"
},
"Item": {
"weapon": "Weapon",
"armor": "Armor",
"equipment": "Equipment",
"psionic": "Psionic",
"talent": "Talent",
"creature-trait": "Creature Trait",
"creature-ability": "Creature Ability",
"implant": "Implant",
"language": "Language"
}
},
"FTLNOMAD": {
"TechAge": {
"NoTech": "No Tech",
"EarlyPrimitive": "Early Primitive",
"LatePrimitive": "Late Primitive",
"EarlyMechanical": "Early Mechanical",
"LateMechanical": "Late Mechanical",
"EarlyAtomic": "Early Atomic",
"LateAtomic": "Late Atomic",
"EarlySpace" : "Early Space",
"LateSpace" : "Late Space",
"EarlyInterstellar" : "Early Interstellar",
"LateInterstellar" : "Late Interstellar",
"EarlyGalactic" : "Early Galactic",
"LateGalactic" : "Late Galactic",
"Cosmic" : "Cosmic"
},
"Character": {
"FIELDS": {
"concept": {
"label": "Concept"
},
"age": {
"label": "Age"
},
"gender": {
"label": "Gender"
},
"hair": {
"label": "Hair"
},
"eyes": {
"label": "Eyes"
},
"height": {
"label": "Height"
},
"home": {
"label": "Home"
},
"birthplace": {
"label": "Birthplace"
},
"skills:": {
"str": {
"label": "Strength"
},
"dex": {
"label": "Dexterity"
},
"int": {
"label": "Intelligence"
},
"pow": {
"label": "Power"
},
"con": {
"label": "Constitution"
},
"char": {
"label": "Charisma"
}
}
}
},
"Creature": {
"FIELDS": {
"damageBonus": {
"label": "Dmg.Bonus"
},
"resources": {
"permanentRating": {
"label": "Permanent Rating"
},
"hand": {
"label": "Hand"
},
"stowed": {
"label": "Stowed"
},
"storage": {
"label": "Storage"
}
},
"biodata": {
"feature": {
"label": "Feature"
},
"adaptedToViolence": {
"label": "Adapted to violence"
},
"adaptedToHelplessness": {
"label": "Adapted to helplessness"
},
"harshness": {
"label": "Harshness"
},
"age": {
"label": "Age"
},
"gender": {
"label": "Gender"
},
"hair": {
"label": "Hair"
},
"eyes": {
"label": "Eyes"
},
"height": {
"label": "Height"
},
"home": {
"label": "Home"
},
"birthplace": {
"label": "Birthplace"
},
"label": "Biodata"
},
"characteristics:": {
"str": {
"label": "Strength"
},
"dex": {
"label": "Dexterity"
},
"int": {
"label": "Intelligence"
},
"pow": {
"label": "Power"
},
"con": {
"label": "Constitution"
},
"char": {
"label": "Charisma"
}
}
}
},
"Skill": {
"Unnatural": "Unnatural",
"Melee": "Melee Weapons",
"Firearms": "Firearms",
"Athletics": "Athletics",
"UnarmedCombat": "Unarmed Combat",
"RangedWeapons": "Ranged Weapons",
"FirearmsBeams": "Firearms / Beam Weapons",
"FIELDS": {
"isAdversary": {
"label": "Adversary"
},
"settings": {
"label": "Settings era"
},
"diceEvolved": {
"label": "Can increase on failure"
},
"bonus" :{
"label": "Bonus"
},
"base": {
"label": "Base"
},
"rollFailed": {
"label": "Roll Failed"
},
"description": {
"label": "Description"
}
}
},
"Equipment": {
"FIELDS": {
"techAge": {
"label": "Tech Age"
},
"description": {
"label": "Description"
},
"enc": {
"label": "Enc"
},
"cost": {
"label": "Cost"
}
}
},
"Psionic": {
"FIELDS": {
"description": {
"label": "Description"
},
"isAdvantage" :{
"label": "Provide advantage"
}
}
},
"Weapon": {
"Types": {
"Melee": "Melee",
"Projectile": "Projectile",
"Energy": "Energy",
"Heavy": "Heavy",
"Grenade": "Grenade/Explosive",
"Vehicle": "Vehicle"
},
"Range": {
"Melee": "Melee",
"Handgun": "Handgun",
"Rifle": "Rifle",
"LongRange": "Long Range"
},
"FIELDS": {
"techAge": {
"label": "Tech Age"
},
"rangeType": {
"label": "Range"
},
"weaponType": {
"label": "Type"
},
"damage": {
"label": "Damage"
},
"enc": {
"label": "Enc"
},
"cost": {
"label": "Cost"
},
"description": {
"label": "Description"
}
}
},
"Armor": {
"FIELDS": {
"techAge": {
"label": "Tech Age"
"cost": {
"label": "Cost"
},
"description": {
"label": "Description"
},
"enc": {
"label": "Enc"
},
"protection": {
"label": "Protection"
},
"description": {
"label": "Description"
},
"enc": {
"label": "Enc"
},
"cost": {
"label": "Cost"
"techAge": {
"label": "Tech Age"
}
}
},
"Language": {
"Character": {
"FIELDS": {
"description": {
"label": "Description"
"age": {
"label": "Age"
},
"birthplace": {
"label": "Birthplace"
},
"concept": {
"label": "Concept"
},
"species": {
"label": "Species"
},
"archetype": {
"label": "Archetype"
},
"eyes": {
"label": "Eyes"
},
"gender": {
"label": "Gender"
},
"hair": {
"label": "Hair"
},
"height": {
"label": "Height"
},
"home": {
"label": "Home"
},
"health": {
"staminaValue": {
"label": "Current"
},
"staminaMax": {
"label": "Max"
},
"wounds": {
"label": "Wounds"
},
"label": "Stamina"
},
"skills:": {
"combat": {
"label": "Combat"
},
"knowledge": {
"label": "Knowledge"
},
"physical": {
"label": "Physical"
},
"social": {
"label": "Social"
},
"stealth": {
"label": "Stealth"
},
"technology": {
"label": "Technology"
},
"vehicles": {
"label": "Vehicles"
}
}
}
},
"Vehicle": {
"Chat": {},
"Creature": {
"FIELDS": {
"description": {
"label": "Description"
"biodata": {
"adaptedToHelplessness": {
"label": "Adapted to helplessness"
},
"adaptedToViolence": {
"label": "Adapted to violence"
},
"age": {
"label": "Age"
},
"birthplace": {
"label": "Birthplace"
},
"eyes": {
"label": "Eyes"
},
"feature": {
"label": "Feature"
},
"gender": {
"label": "Gender"
},
"hair": {
"label": "Hair"
},
"harshness": {
"label": "Harshness"
},
"height": {
"label": "Height"
},
"home": {
"label": "Home"
},
"label": "Biodata"
},
"notes": {
"label": "Notes"
"characteristics:": {
"char": {
"label": "Charisma"
},
"con": {
"label": "Constitution"
},
"dex": {
"label": "Dexterity"
},
"int": {
"label": "Intelligence"
},
"pow": {
"label": "Power"
},
"str": {
"label": "Strength"
}
},
"surfaceSpeed": {
"label": "Surface Speed"
"damageBonus": {
"label": "Dmg.Bonus"
},
"airSpeed": {
"label": "Air Speed"
},
"armor": {
"label": "Armor"
},
"settings": {
"label": "Settings era"
},
"crew": {
"label": "Crew"
},
"state": {
"label": "State"
}
}
},
"CreatureTrait": {
"FIELDS": {
"description": {
"label": "Description"
},
"isAdvantage": {
"label": "Provide advantage"
"resources": {
"hand": {
"label": "Hand"
},
"permanentRating": {
"label": "Permanent Rating"
},
"storage": {
"label": "Storage"
},
"stowed": {
"label": "Stowed"
}
}
}
},
@@ -331,10 +176,23 @@
}
}
},
"Implant": {
"CreatureTrait": {
"FIELDS": {
"techAge": {
"label": "Tech Age"
"description": {
"label": "Description"
},
"isAdvantage": {
"label": "Provide advantage"
}
}
},
"Delete": "Delete",
"Dialog": {},
"Edit": "Edit",
"Equipment": {
"FIELDS": {
"cost": {
"label": "Cost"
},
"description": {
"label": "Description"
@@ -342,91 +200,260 @@
"enc": {
"label": "Enc"
},
"cost": {
"label": "Cost"
"techAge": {
"label": "Tech Age"
}
}
},
"Starship": {
"Implant": {
"FIELDS": {
"value": {
"label": "Value"
"cost": {
"label": "Cost"
},
"description": {
"label": "Description"
},
"enc": {
"label": "Enc"
},
"techAge": {
"label": "Tech Age"
}
}
},
"Label": {
"combat": "Combat",
"physical": "Physical",
"social": "Social",
"stealth": "Stealth",
"technology": "Technology",
"vehicles": "Vehicles",
"knowledge": "Knowledge",
"Stamina": "Stamina",
"equipments": "Equipment",
"Rank": "Rank",
"HP": "HP",
"Unarmed": "Unarmed",
"Vehicle": "Vehicle",
"armor": "Armor",
"armors": "Armors",
"biodata": "Biodata",
"biography": "Biography",
"character": "Character",
"creature": "Creature",
"criticalFailure": "Critical Failure",
"criticalSuccess": "Critical Success",
"current": "Current",
"damage": "Damage",
"damageShort": "Dmg",
"description": "Description",
"equipment": "Equipment",
"experience": "Experience",
"failure": "Failure",
"finalScore": "Final Score",
"languages": "Languages",
"malus": "Malus",
"max": "Max",
"maximum": "Maximum",
"modifier": "Modifier",
"multiplier": "Multiplier",
"newArmor": "New Armor",
"newWeapon": "New Weapon",
"notes": "Notes",
"psionics": "Psionics",
"rollView": "Roll View",
"skill": "Skill",
"skillRoll": "Skill Roll",
"skills": "Skills",
"status": "Status",
"success": "Success",
"talents": "Talents",
"targetScore": "Target Score",
"titleSkill": "Skill Roll",
"titleWeapon": "Weapon Roll",
"total": "Total",
"totalScore": "Total Score",
"weapons": "Weapons"
},
"Language": {
"FIELDS": {
"description": {
"label": "Description"
}
}
},
"Notifications": {},
"Psionic": {
"FIELDS": {
"description": {
"label": "Description"
},
"isAdvantage": {
"label": "Provide advantage"
}
}
},
"Roll": {
"cancel": "Cancel",
"roll": "Roll",
"skill": "Skill"
},
"Skill": {
"Athletics": "Athletics",
"FIELDS": {
"base": {
"label": "Base"
},
"bonus": {
"label": "Bonus"
},
"description": {
"label": "Description"
},
"diceEvolved": {
"label": "Can increase on failure"
},
"isAdversary": {
"label": "Adversary"
},
"rollFailed": {
"label": "Roll Failed"
},
"settings": {
"label": "Settings era"
}
},
"Firearms": "Firearms",
"FirearmsBeams": "Firearms / Beam Weapons",
"Melee": "Melee Weapons",
"RangedWeapons": "Ranged Weapons",
"UnarmedCombat": "Unarmed Combat",
"Unnatural": "Unnatural"
},
"Starship": {
"FIELDS": {
"description": {
"label": "Description"
},
"value": {
"label": "Value"
}
}
},
"Talent": {
"FIELDS": {
"isAdvantage": {
"label": "Provide advantage"
},
"description": {
"label": "Description"
},
"isAdvantage": {
"label": "Provide advantage"
}
}
},
"Label": {
"creature": "Creature",
"Unarmed": "Unarmed",
"multiplier": "Multiplier",
"Vehicle": "Vehicle",
"titleSkill": "Skill Roll",
"titleWeapon": "Weapon Roll",
"biodata": "Biodata",
"skill": "Skill",
"modifier": "Modifier",
"rollView": "Roll View",
"character": "Character",
"description": "Description",
"total": "Total",
"skills": "Skills",
"damage": "Damage",
"armor": "Armor",
"malus": "Malus",
"experience": "Experience",
"maximum": "Maximum",
"equipment": "Equipment",
"biography": "Biography",
"notes": "Notes",
"weapons": "Weapons",
"HP": "HP",
"current": "Current",
"max": "Max",
"totalScore": "Total Score",
"skillRoll": "Skill Roll",
"finalScore": "Final Score",
"failure": "Failure",
"success": "Success",
"criticalSuccess": "Critical Success",
"criticalFailure": "Critical Failure",
"targetScore": "Target Score",
"armors": "Armors",
"psionics": "Psionics",
"talents": "Talents",
"languages": "Languages",
"damageShort": "Dmg",
"status": "Status",
"newWeapon": "New Weapon",
"newArmor": "New Armor"
"TechAge": {
"Cosmic": "Cosmic",
"EarlyAtomic": "Early Atomic",
"EarlyGalactic": "Early Galactic",
"EarlyInterstellar": "Early Interstellar",
"EarlyMechanical": "Early Mechanical",
"EarlyPrimitive": "Early Primitive",
"EarlySpace": "Early Space",
"LateAtomic": "Late Atomic",
"LateGalactic": "Late Galactic",
"LateInterstellar": "Late Interstellar",
"LateMechanical": "Late Mechanical",
"LatePrimitive": "Late Primitive",
"LateSpace": "Late Space",
"NoTech": "No Tech"
},
"Edit": "Edit",
"Delete": "Delete",
"ToggleSheet": "Toggle Sheet",
"Warning": { },
"Dialog": {
"Tooltip": {},
"Vehicle": {
"FIELDS": {
"airSpeed": {
"label": "Air Speed"
},
"armor": {
"label": "Armor"
},
"crew": {
"label": "Crew"
},
"description": {
"label": "Description"
},
"notes": {
"label": "Notes"
},
"settings": {
"label": "Settings era"
},
"state": {
"label": "State"
},
"surfaceSpeed": {
"label": "Surface Speed"
}
}
},
"Roll": {
"skill": "Skill",
"roll": "Roll",
"cancel": "Cancel"
"Warning": {},
"Weapon": {
"FIELDS": {
"cost": {
"label": "Cost"
},
"damage": {
"label": "Damage"
},
"description": {
"label": "Description"
},
"enc": {
"label": "Enc"
},
"rangeType": {
"label": "Range"
},
"techAge": {
"label": "Tech Age"
},
"weaponType": {
"label": "Type"
}
},
"Range": {
"Handgun": "Handgun",
"LongRange": "Long Range",
"Melee": "Melee",
"Rifle": "Rifle"
},
"Types": {
"Energy": "Energy",
"Grenade": "Grenade/Explosive",
"Heavy": "Heavy",
"Melee": "Melee",
"Projectile": "Projectile",
"Vehicle": "Vehicle"
}
}
},
"TYPES": {
"Actor": {
"character": "Character",
"creature": "Creature",
"starship": "Starship",
"vehicle": "Vehicle"
},
"Tooltip": {
},
"Chat": {
},
"Notifications": {
"Item": {
"armor": "Armor",
"creature-ability": "Creature Ability",
"creature-trait": "Creature Trait",
"equipment": "Equipment",
"implant": "Implant",
"language": "Language",
"psionic": "Psionic",
"talent": "Talent",
"weapon": "Weapon"
}
}
}
}

View File

@@ -12,45 +12,31 @@ export default class FTLNomadCharacterSheet extends FTLNomadActorSheet {
contentClasses: ["character-content"],
},
actions: {
setBP: FTLNomadCharacterSheet.#onSetBP,
createGear: FTLNomadCharacterSheet.#onCreateGear,
createArmor: FTLNomadCharacterSheet.#onCreateArmor,
createWeapon: FTLNomadCharacterSheet.#onCreateWeapon,
createBond: FTLNomadCharacterSheet.#onCreateBond,
createInjury: FTLNomadCharacterSheet.#onCreateInjury,
createMentalDisorder: FTLNomadCharacterSheet.#onCreateMentalDisorder,
createMotivation: FTLNomadCharacterSheet.#onCreateMotivation,
createSkill: FTLNomadCharacterSheet.#onCreateSkill,
createRitual: FTLNomadCharacterSheet.#onCreateRitual,
createTome: FTLNomadCharacterSheet.#onCreateTome,
createWeapon: FTLNomadCharacterSheet.#onCreateWeapon
},
}
/** @override */
static PARTS = {
main: {
template: "systems/fvtt-ftl-nomad/templates/protagonist-main.hbs",
template: "systems/fvtt-ftl-nomad/templates/character-main.hbs",
},
tabs: {
template: "templates/generic/tab-navigation.hbs",
},
skills: {
template: "systems/fvtt-ftl-nomad/templates/protagonist-skills.hbs",
},
status: {
template: "systems/fvtt-ftl-nomad/templates/protagonist-status.hbs",
},
equipment: {
template: "systems/fvtt-ftl-nomad/templates/protagonist-equipment.hbs",
template: "systems/fvtt-ftl-nomad/templates/character-equipment.hbs",
},
biography: {
template: "systems/fvtt-ftl-nomad/templates/protagonist-biography.hbs",
template: "systems/fvtt-ftl-nomad/templates/character-biography.hbs",
},
}
/** @override */
tabGroups = {
sheet: "skills",
sheet: "main",
}
/**
@@ -59,8 +45,6 @@ export default class FTLNomadCharacterSheet extends FTLNomadActorSheet {
*/
#getTabs() {
const tabs = {
skills: { id: "skills", group: "sheet", icon: "fa-solid fa-shapes", label: "FTLNOMAD.Label.skills" },
status: { id: "status", group: "sheet", icon: "fa-solid fa-file-waveform", label: "FTLNOMAD.Label.status" },
equipment: { id: "equipment", group: "sheet", icon: "fa-solid fa-shapes", label: "FTLNOMAD.Label.equipment" },
biography: { id: "biography", group: "sheet", icon: "fa-solid fa-book", label: "FTLNOMAD.Label.biography" },
}
@@ -79,15 +63,6 @@ export default class FTLNomadCharacterSheet extends FTLNomadActorSheet {
context.enrichedDescription = await TextEditor.enrichHTML(this.document.system.description, { async: true })
context.enrichedNotes = await TextEditor.enrichHTML(this.document.system.notes, { async: true })
context.tooltipsCharacteristic = {
str: game.i18n.localize("FTLNOMAD.Characteristic.Str"),
dex: game.i18n.localize("FTLNOMAD.Characteristic.Dex"),
con: game.i18n.localize("FTLNOMAD.Characteristic.Con"),
int: game.i18n.localize("FTLNOMAD.Characteristic.Int"),
pow: game.i18n.localize("FTLNOMAD.Characteristic.Pow"),
cha: game.i18n.localize("FTLNOMAD.Characteristic.Cha")
}
return context
}
@@ -97,34 +72,14 @@ export default class FTLNomadCharacterSheet extends FTLNomadActorSheet {
switch (partId) {
case "main":
break
case "skills":
context.tab = context.tabs.skills
context.skills = doc.itemTypes.skill
context.skills.sort((a, b) => a.name.localeCompare(b.name))
break
case "equipment":
context.tab = context.tabs.equipment
context.weapons = doc.itemTypes.weapon
context.weapons.sort((a, b) => a.name.localeCompare(b.name))
context.armors = doc.itemTypes.armor
context.armors.sort((a, b) => a.name.localeCompare(b.name))
context.gears = doc.itemTypes.gear
context.gears.sort((a, b) => a.name.localeCompare(b.name))
context.rituals = doc.itemTypes.ritual
context.rituals.sort((a, b) => a.name.localeCompare(b.name))
context.tomes = doc.itemTypes.tome
context.tomes.sort((a, b) => a.name.localeCompare(b.name))
break
case "status":
context.tab = context.tabs.status
context.injuries = doc.itemTypes.injury
context.injuries.sort((a, b) => a.name.localeCompare(b.name))
context.mentaldisorders = doc.itemTypes.mentaldisorder
context.mentaldisorders.sort((a, b) => a.name.localeCompare(b.name))
context.motivations = doc.itemTypes.motivation
context.motivations.sort((a, b) => a.name.localeCompare(b.name))
context.bonds = doc.itemTypes.bond
context.bonds.sort((a, b) => a.name.localeCompare(b.name))
context.equipments = doc.itemTypes.equipment
context.equipments.sort((a, b) => a.name.localeCompare(b.name))
break
case "biography":
context.tab = context.tabs.biography
@@ -135,14 +90,6 @@ export default class FTLNomadCharacterSheet extends FTLNomadActorSheet {
return context
}
/**
* Creates a new attack item directly from the sheet and embeds it into the document.
* @param {Event} event The initiating click event.
* @param {HTMLElement} target The current target of the event listener.
*/
static #onSetBP(event, target) {
this.document.system.setBP()
}
static #onCreateGear(event, target) {
this.document.createEmbeddedDocuments("Item", [{ name: game.i18n.localize("FTLNOMAD.Label.newGear"), type: "gear" }])
@@ -156,33 +103,6 @@ export default class FTLNomadCharacterSheet extends FTLNomadActorSheet {
this.document.createEmbeddedDocuments("Item", [{ name: game.i18n.localize("FTLNOMAD.Label.newArmor"), type: "armor" }])
}
static #onCreateBond(event, target) {
this.document.createEmbeddedDocuments("Item", [{ name: game.i18n.localize("FTLNOMAD.Label.newBond"), type: "bond" }])
}
static #onCreateInjury(event, target) {
this.document.createEmbeddedDocuments("Item", [{ name: game.i18n.localize("FTLNOMAD.Label.newInjury"), type: "injury" }])
}
static #onCreateMentalDisorder(event, target) {
this.document.createEmbeddedDocuments("Item", [{ name: game.i18n.localize("FTLNOMAD.Label.newMentalDisorder"), type: "mentaldisorder" }])
}
static #onCreateMotivation(event, target) {
this.document.createEmbeddedDocuments("Item", [{ name: game.i18n.localize("FTLNOMAD.Label.newMotivation"), type: "motivation" }])
}
static #onCreateSkill(event, target) {
this.document.createEmbeddedDocuments("Item", [{ name: game.i18n.localize("FTLNOMAD.Label.newSkill"), type: "skill" }])
}
static #onCreateRitual(event, target) {
this.document.createEmbeddedDocuments("Item", [{ name: game.i18n.localize("FTLNOMAD.Label.newRitual"), type: "ritual" }])
}
static #onCreateTome(event, target) {
this.document.createEmbeddedDocuments("Item", [{ name: game.i18n.localize("FTLNOMAD.Label.newTome"), type: "tome" }])
}
/**
* Handles the roll action triggered by user interaction.

View File

@@ -20,7 +20,7 @@ export const SKILLS = {
"social": { id: "social", label: "FTLNOMAD.Skill.Social" },
"physical": { id: "physical", label: "FTLNOMAD.Skill.Physical" },
"stealth": { id: "stealth", label: "FTLNOMAD.Skill.Stealth" },
"vehicles": { id: "vehicle", label: "FTLNOMAD.Skill.Vehicles" },
"vehicles": { id: "vehicles", label: "FTLNOMAD.Skill.Vehicles" },
"technology": { id: "technology", label: "FTLNOMAD.Skill.Technology" }
}

View File

@@ -180,14 +180,14 @@
min-width: 650px;
}
.character-characteristics {
.character-skills {
background-color: var(--color-light-1);
display: flex;
flex-direction: column;
gap: 5px;
flex: 1;
.character-characteristic {
.character-skill {
display: flex;
align-items: center;
.rollable:hover,
@@ -196,8 +196,8 @@
cursor: pointer;
}
.rollable {
min-width: 3rem;
max-width: 3rem;
min-width: 4.5rem;
max-width: 4.5rem;
}
.char-text {
margin-left: 0.5rem;
@@ -218,11 +218,11 @@
}
}
.character-characteristic-play {
.character-skill-play {
min-width: 225px;
}
.character-characteristic-edit {
.character-skill-edit {
min-width: 400px;
}
}

View File

@@ -1,72 +1,19 @@
<section class="tab protagonist-{{tab.id}} {{tab.cssClass}}" data-tab="{{tab.id}}" data-group="{{tab.group}}">
<section class="tab character-{{tab.id}} {{tab.cssClass}}" data-tab="{{tab.id}}" data-group="{{tab.group}}">
<fieldset>
<legend>{{localize "FTLNOMAD.Label.resources"}}</legend>
<div class="resources">
{{formField systemFields.resources.fields.permanentRating value=system.resources.permanentRating name="system.resources.permanentRating" localize=true}}
<div>
<span class="label-field">{{localize "FTLNOMAD.Label.resourceChecks"}}</span>
{{#each system.resources.checks as |check idx|}}
<input class="san-checkbox" type="checkbox" data-action="updateCheckResource" data-index="{{@index}}"
data-name="checks" {{#if check}} checked {{/if}} {{#if (gte @index @root.system.resources.nbValidChecks)}} disabled {{/if}}>
{{/each}}
</div>
<button class="resource-roll rollable" data-roll-type="resource"><img src="systems/fvtt-cthulhu-eternal/assets/ui/d100.svg" class="d100" />Resource roll</button>
{{formField systemFields.resources.fields.hand value=system.resources.hand name="system.resources.hand" localize=true disabled=true}}
{{formField systemFields.resources.fields.stowed value=system.resources.stowed name="system.resources.stowed" localize=true disabled=true}}
{{formField systemFields.resources.fields.storage value=system.resources.storage name="system.resources.storage" localize=true disabled=true}}
</div>
</div>
</fieldset>
<fieldset>
<legend>{{localize "FTLNOMAD.Label.biodata"}}</legend>
<div class="adapted">
{{formField systemFields.biodata.fields.adaptedToViolence value=system.biodata.adaptedToViolence name="system.biodata.adaptedToViolence" localize=true}}
{{formField systemFields.biodata.fields.adaptedToHelplessness value=system.biodata.adaptedToHelplessness name="system.biodata.adaptedToHelplessness" localize=true}}
</div>
<div class="biodata">
{{formField systemFields.biodata.fields.harshness value=system.biodata.harshness name="system.biodata.harshness" localize=true}}
{{formField systemFields.biodata.fields.age value=system.biodata.age name="system.biodata.age" localize=true classes="field-label"}}
{{formField systemFields.biodata.fields.gender value=system.biodata.gender name="system.biodata.gender" localize=true classes="field-label"}}
{{formField systemFields.biodata.fields.height value=system.biodata.height name="system.biodata.height" localize=true classes="field-label"}}
{{formField systemFields.biodata.fields.eyes value=system.biodata.eyes name="system.biodata.eyes" localize=true classes="field-label"}}
{{formField systemFields.biodata.fields.hair value=system.biodata.hair name="system.biodata.hair" localize=true classes="field-label"}}
{{formField systemFields.biodata.fields.home value=system.biodata.home name="system.biodata.home" localize=true classes="field-label"}}
{{formField systemFields.biodata.fields.birthplace value=system.biodata.birthplace name="system.biodata.birthplace" localize=true classes="field-label"}}
</div>
</fieldset>
<fieldset>
<legend>{{localize "FTLNOMAD.Label.distinguishingFeatures"}}</legend>
<div class="features">
<div class="feature">
<label>{{localize "FTLNOMAD.Label.strShort"}}</label>
{{formInput systemFields.characteristics.fields.str.fields.feature value=system.characteristics.str.feature localize=true}}
</div>
<div class="feature">
<label>{{localize "FTLNOMAD.Label.dexShort"}}</label>
{{formInput systemFields.characteristics.fields.dex.fields.feature value=system.characteristics.dex.feature localize=true}}
</div>
<div class="feature">
<label>{{localize "FTLNOMAD.Label.conShort"}}</label>
{{formInput systemFields.characteristics.fields.con.fields.feature value=system.characteristics.con.feature localize=true}}
</div>
<div class="feature">
<label>{{localize "FTLNOMAD.Label.intShort"}}</label>
{{formInput systemFields.characteristics.fields.int.fields.feature value=system.characteristics.int.feature localize=true}}
</div>
<div class="feature">
<label>{{localize "FTLNOMAD.Label.powShort"}}</label>
{{formInput systemFields.characteristics.fields.pow.fields.feature value=system.characteristics.pow.feature localize=true}}
</div>
<div class="feature">
<label>{{localize "FTLNOMAD.Label.chaShort"}}</label>
{{formInput systemFields.characteristics.fields.cha.fields.feature value=system.characteristics.cha.feature localize=true}}
</div>
</div>
</fieldset>
<fieldset>
<legend>{{localize "FTLNOMAD.Label.description"}}</legend>
{{formInput systemFields.description enriched=enrichedDescription value=system.description name="system.description" toggled=true}}

View File

@@ -1,4 +1,4 @@
<section class="tab protagonist-{{tab.id}} {{tab.cssClass}}" data-tab="{{tab.id}}" data-group="{{tab.group}}">
<section class="tab character-{{tab.id}} {{tab.cssClass}}" data-tab="{{tab.id}}" data-group="{{tab.group}}">
<fieldset>
<legend>{{localize "FTLNOMAD.Label.weapons"}}{{#if isEditMode}}
@@ -58,14 +58,14 @@
</fieldset>
<fieldset>
<legend>{{localize "FTLNOMAD.Label.gears"}}{{#if isEditMode}}
<legend>{{localize "FTLNOMAD.Label.equipments"}}{{#if isEditMode}}
<a class="action" data-tooltip="{{localize " FTLNOMAD.Tooltip.addGear"}}" data-tooltip-direction="UP"><i
class="fas fa-plus" data-action="createGear"></i></a>{{/if}}
</legend>
<div class="gears">
{{#each gears as |item|}}
<div class="equipments">
{{#each equipments as |item|}}
{{!log 'armor' this}}
<div class="gear" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}">
<div class="equipment" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}">
<img class="item-img" src="{{item.img}}" data-tooltip="{{item.name}}" />
<div class="name" data-tooltip="{{{item.system.description}}}">
{{item.name}}
@@ -81,55 +81,4 @@
</div>
</fieldset>
{{#if (count tomes)}}
<fieldset>
<legend>{{localize "FTLNOMAD.Label.Tomes"}}{{#if isEditMode}}
<a class="action" data-tooltip="{{localize "FTLNOMAD.Tooltip.addTome"}}" data-tooltip-direction="UP"><i
class="fas fa-plus" data-action="createTome"></i></a>{{/if}}
</legend>
<div class="tomes">
{{#each tomes as |item|}}
<div class="tome" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}">
<img class="item-img" src="{{item.img}}" data-tooltip="{{item.name}}" />
<div class="name" data-tooltip="{{{item.system.description}}}">
{{item.name}}
</div>
<div class="controls">
<a data-tooltip="{{localize 'FTLNOMAD.Edit'}}" data-action="edit" data-item-id="{{item.id}}"
data-item-uuid="{{item.uuid}}"><i class="fas fa-edit"></i></a>
<a data-tooltip="{{localize 'FTLNOMAD.Delete'}}" data-action="delete" data-item-id="{{item.id}}"
data-item-uuid="{{item.uuid}}"><i class="fas fa-trash"></i></a>
</div>
</div>
{{/each}}
</div>
</fieldset>
{{/if}}
{{#if (count rituals)}}
<fieldset>
<legend>{{localize "FTLNOMAD.Label.Rituals"}}{{#if isEditMode}}
<a class="action" data-tooltip="{{localize "FTLNOMAD.Tooltip.addRitual"}}" data-tooltip-direction="UP"><i
class="fas fa-plus" data-action="createRitual"></i></a>{{/if}}
</legend>
<div class="rituals">
{{#each rituals as |item|}}
<div class="ritual" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}">
<img class="item-img" src="{{item.img}}" data-tooltip="{{item.name}}" />
<div class="name" data-tooltip="{{{item.system.description}}}">
{{item.name}}
</div>
<div class="controls">
<a data-tooltip="{{localize 'FTLNOMAD.Edit'}}" data-action="edit" data-item-id="{{item.id}}"
data-item-uuid="{{item.uuid}}"><i class="fas fa-edit"></i></a>
<a data-tooltip="{{localize 'FTLNOMAD.Delete'}}" data-action="delete" data-item-id="{{item.id}}"
data-item-uuid="{{item.uuid}}"><i class="fas fa-trash"></i></a>
</div>
</div>
{{/each}}
</div>
</fieldset>
{{/if}}
</section>

View File

@@ -1,155 +1,100 @@
<section class="protagonist-main protagonist-main-{{ifThen isPlayMode 'play' 'edit'}}">
{{!log "protagonist-main" this}}
<section class="character-main character-main-{{ifThen isPlayMode 'play' 'edit'}}">
{{!log "character-main" this}}
<fieldset>
<legend>{{localize "FTLNOMAD.Label.protagonist"}}</legend>
<div class="protagonist-pc protagonist-pc-{{ifThen isPlayMode 'play' 'edit'}}">
<div class="protagonist-left">
<div class="protagonist-left-image">
<img class="protagonist-img" src="{{actor.img}}" data-edit="img" data-action="editImage"
<legend>{{localize "FTLNOMAD.Label.character"}}</legend>
<div class="character-pc character-pc-{{ifThen isPlayMode 'play' 'edit'}}">
<div class="character-left">
<div class="character-left-image">
<img class="character-img" src="{{actor.img}}" data-edit="img" data-action="editImage"
data-tooltip="{{actor.name}}" />
</div>
<fieldset class="protagonist-hp">
<legend>{{localize "FTLNOMAD.Label.HP"}}</legend>
<fieldset class="character-hp">
<legend>{{localize "FTLNOMAD.Label.Stamina"}}</legend>
<div class="flexrow">
{{formField systemFields.hp.fields.value value=system.hp.value}}
{{formField systemFields.health.fields.staminaValue value=health.staminaValue}}
<span class="hp-separator">/</span>
{{formField systemFields.hp.fields.max value=system.hp.max rootId=partId disabled=true}}
{{formField systemFields.health.fields.staminaMax value=system.health.staminaMax rootId=partId
disabled=true}}
</div>
<div class="flexrow ">
{{formField systemFields.damageBonus value=system.damageBonus classes="damage-bonus"}}
{{formField systemFields.health.fields.wounds value=system.health.wounds }}
</div>
</fieldset>
</div>
<div class="protagonist-right">
<div class="protagonist-name">
<div class="character-right">
<div class="character-name">
{{formInput fields.name value=source.name rootId=partId disabled=isPlayMode}}
<a class="control" data-action="toggleSheet" data-tooltip="FTLNOMAD.ToggleSheet"
data-tooltip-direction="UP">
<a class="control" data-action="toggleSheet" data-tooltip="FTLNOMAD.ToggleSheet" data-tooltip-direction="UP">
<i class="fa-solid fa-user-{{ifThen isPlayMode 'lock' 'pen'}}"></i>
</a>
</div>
<fieldset class="san">
<legend>{{localize "FTLNOMAD.Label.SAN"}}</legend>
<div class="flexrow">
<label class="label-field rollable" data-roll-type="san" ><img src="systems/fvtt-cthulhu-eternal/assets/ui/d100.svg" class="d100" />
{{localize "FTLNOMAD.Label.current"}}</label>
{{formInput systemFields.san.fields.value value=system.san.value}}
<span class="label-field label-recovery">{{localize "FTLNOMAD.Label.recovery"}}</span>
{{formInput systemFields.san.fields.recovery value=system.san.recovery disabled=true}}
<span class="label-bp" data-tooltip='{{localize "FTLNOMAD.Tooltip.sanBPShort"}}'>{{localize
"FTLNOMAD.Label.sanBPShort"}}</span>
{{formInput systemFields.san.fields.breakingPoint value=system.san.breakingPoint disabled=true}}
</div>
<div class="flexrow">
<div class="flexrow">
<span class="label-short-field">{{localize "FTLNOMAD.Label.max"}}</span>
{{formInput systemFields.san.fields.max value=system.san.max rootId=partId disabled=true}}
</div>
<span class="label-insanity" >
{{localize "FTLNOMAD.Label.tempInsanity"}}
</span>
{{formInput systemFields.san.fields.insanity value=system.san.insanity localize=true}}
{{#if (not isPlayMode)}}
<button data-action="setBP" class="button" data-tooltip="{{localize "FTLNOMAD.Tooltip.setBP"}}">{{localize "FTLNOMAD.Label.setBP"}}</button>
{{/if}}
</div>
<div class="flexrow">
<span class="label-field">{{localize "FTLNOMAD.Label.violence"}}</span>
{{#each system.san.violence as |violence idx|}}
<input class="san-checkbox" type="checkbox" data-action="updateCheckboxArray" data-index="{{@index}}"
data-name="violence" {{#if violence}} checked {{/if}}>
{{/each}}
<span class="label-field">{{localize "FTLNOMAD.Label.helplessness"}}</span>
{{#each system.san.helplessness as |helplessness idx|}}
<input class="san-checkbox" type="checkbox" data-action="updateCheckboxArray" data-index="{{@index}}"
data-name="helplessness" {{#if helplessness}} checked {{/if}}>
{{/each}}
</div>
<fieldset class="rank">
{{formField systemFields.concept value=system.concept rootId=partId disabled=isPlayMode}}
{{formField systemFields.species value=system.species rootId=partId disabled=isPlayMode}}
{{formField systemFields.archetype value=system.archetype rootId=partId disabled=isPlayMode}}
</fieldset>
<fieldset class="willpower">
<legend>{{localize "FTLNOMAD.Label.willpower"}}</legend>
<div class="flexrow">
<label class="label-field">{{localize "FTLNOMAD.Label.current"}}</label>
{{formInput systemFields.wp.fields.value value=system.wp.value}}
<label class="label-field">{{localize "FTLNOMAD.Label.max"}}</label>
{{formInput systemFields.wp.fields.max value=system.wp.max rootId=partId disabled=true}}
<label class="label-field">{{localize "FTLNOMAD.Label.exhausted"}}</label>
{{formInput systemFields.wp.fields.exhausted value=system.wp.exhausted classes="checkbox"}}
</div>
</fieldset>
</div>
</div>
</fieldset>
<fieldset class="protagonist-characteristics protagonist-characteristics-{{ifThen isPlayMode 'play' 'edit'}}">
<legend>{{localize "FTLNOMAD.Label.characteristics"}}</legend>
<div class="protagonist-characteristic" >
<img src="systems/fvtt-cthulhu-eternal/assets/ui/d100.svg" class="d100" />
<label class="rollable" data-roll-type="char" data-char-id="str" data-tooltip="{{system.characteristics.str.feature}}">{{localize
"FTLNOMAD.Label.strShort"}}</label>
{{formField systemFields.characteristics.fields.str.fields.value value=system.characteristics.str.value
<fieldset class="character-skills character-skills-{{ifThen isPlayMode 'play' 'edit'}}">
<legend>{{localize "FTLNOMAD.Label.skills"}}</legend>
<div class="character-skill">
<img src="systems/fvtt-ftl-nomad/assets/ui/2d6.svg" class="d6s" />
<label class="rollable" data-roll-type="skill" data-char-id="combat">{{localize
"FTLNOMAD.Label.combat"}}</label>
{{formField systemFields.skills.fields.combat.fields.value value=system.skills.combat.value
rootId=partId disabled=isPlayMode }}
<label class="char-text">{{mul system.characteristics.str.value 5}}</label>
</div>
<div class="protagonist-characteristic">
<img src="systems/fvtt-cthulhu-eternal/assets/ui/d100.svg" class="d100" />
<label class="rollable" data-roll-type="char" data-char-id="dex" data-tooltip="{{system.characteristics.dex.feature}}">{{localize
"FTLNOMAD.Label.dexShort"}}</label>
{{formField systemFields.characteristics.fields.dex.fields.value value=system.characteristics.dex.value
<div class="character-skill">
<img src="systems/fvtt-ftl-nomad/assets/ui/2d6.svg" class="d6s" />
<label class="rollable" data-roll-type="skill" data-char-id="knowledge">{{localize
"FTLNOMAD.Label.knowledge"}}</label>
{{formField systemFields.skills.fields.knowledge.fields.value value=system.skills.knowledge.value
rootId=partId disabled=isPlayMode }}
<label class="char-text">{{mul system.characteristics.dex.value 5}}</label>
</div>
<div class="protagonist-characteristic" >
<img src="systems/fvtt-cthulhu-eternal/assets/ui/d100.svg" class="d100" />
<label class="rollable" data-roll-type="char" data-char-id="con" data-tooltip="{{system.characteristics.con.feature}}">{{localize
"FTLNOMAD.Label.conShort"}}</label>
{{formField systemFields.characteristics.fields.con.fields.value value=system.characteristics.con.value
<div class="character-skill">
<img src="systems/fvtt-ftl-nomad/assets/ui/2d6.svg" class="d6s" />
<label class="rollable" data-roll-type="skill" data-char-id="social">{{localize
"FTLNOMAD.Label.social"}}</label>
{{formField systemFields.skills.fields.social.fields.value value=system.skills.social.value
rootId=partId disabled=isPlayMode }}
<label class="char-text">{{mul system.characteristics.con.value 5}}</label>
</div>
<div class="protagonist-characteristic" >
<img src="systems/fvtt-cthulhu-eternal/assets/ui/d100.svg" class="d100" />
<label class="rollable" data-roll-type="char" data-char-id="int" data-tooltip="{{system.characteristics.int.feature}}">{{localize
"FTLNOMAD.Label.intShort"}}</label>
{{formField systemFields.characteristics.fields.int.fields.value value=system.characteristics.int.value
<div class="character-skill">
<img src="systems/fvtt-ftl-nomad/assets/ui/2d6.svg" class="d6s" />
<label class="rollable" data-roll-type="skill" data-char-id="physical">{{localize
"FTLNOMAD.Label.physical"}}</label>
{{formField systemFields.skills.fields.physical.fields.value value=system.skills.physical.value
rootId=partId disabled=isPlayMode }}
<label class="char-text">{{mul system.characteristics.int.value 5}}</label>
</div>
<div class="protagonist-characteristic" >
<img src="systems/fvtt-cthulhu-eternal/assets/ui/d100.svg" class="d100" />
<label class="rollable" data-roll-type="char" data-char-id="pow" data-tooltip="{{system.characteristics.pow.feature}}">{{localize
"FTLNOMAD.Label.powShort"}}</label>
{{formField systemFields.characteristics.fields.pow.fields.value value=system.characteristics.pow.value
<div class="character-skill">
<img src="systems/fvtt-ftl-nomad/assets/ui/2d6.svg" class="d6s" />
<label class="rollable" data-roll-type="skill" data-char-id="stealth">{{localize
"FTLNOMAD.Label.stealth"}}</label>
{{formField systemFields.skills.fields.stealth.fields.value value=system.skills.stealth.value
rootId=partId disabled=isPlayMode }}
<label class="char-text">{{mul system.characteristics.pow.value 5}}</label>
</div>
<div class="protagonist-characteristic" >
<img src="systems/fvtt-cthulhu-eternal/assets/ui/d100.svg" class="d100" />
<label class="rollable" data-roll-type="char" data-char-id="cha" data-tooltip="{{system.characteristics.cha.feature}}">{{localize
"FTLNOMAD.Label.chaShort"}}</label>
{{formField systemFields.characteristics.fields.cha.fields.value value=system.characteristics.cha.value
<div class="character-skill">
<img src="systems/fvtt-ftl-nomad/assets/ui/2d6.svg" class="d6s" />
<label class="rollable" data-roll-type="skill" data-char-id="vehicles">{{localize
"FTLNOMAD.Label.vehicles"}}</label>
{{formField systemFields.skills.fields.vehicles.fields.value value=system.skills.vehicles.value
rootId=partId disabled=isPlayMode }}
</div>
<div class="character-skill">
<img src="systems/fvtt-ftl-nomad/assets/ui/2d6.svg" class="d6s" />
<label class="rollable" data-roll-type="skill" data-char-id="technology">{{localize
"FTLNOMAD.Label.technology"}}</label>
{{formField systemFields.skills.fields.technology.fields.value value=system.skills.technology.value
rootId=partId disabled=isPlayMode }}
<label class="char-text">{{mul system.characteristics.cha.value 5}}</label>
</div>
</fieldset>
</section>

View File

@@ -1,25 +0,0 @@
<section class="tab protagonist-{{tab.id}} {{tab.cssClass}}" data-tab="{{tab.id}}" data-group="{{tab.group}}">
{{log this}}
<fieldset>
<legend data-tooltip="{{localize "FTLNOMAD.Tooltip.skills"}}" data-tooltip-direction="UP">{{localize "FTLNOMAD.Label.skills"}}</legend>
<div class="skills">
{{#each skills as |item|}}
<div class="skill item" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}">
<img class="item-img" src="{{item.img}}" data-tooltip="{{item.name}}" />
<img src="systems/fvtt-cthulhu-eternal/assets/ui/d100.svg" class="d100" />
<div class="name rollable" data-roll-type="skill" data-tooltip="{{{item.description}}}" data-tooltip-direction="UP">{{item.name}}
</div>
<div class="score" >
{{item.system.skillTotal}}
</div>
<div class="controls">
<a data-tooltip="{{localize 'FTLNOMAD.Edit'}}" data-action="edit" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}"><i class="fas fa-edit"></i></a>
<a data-tooltip="{{localize 'FTLNOMAD.Delete'}}" data-action="delete" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}"><i class="fas fa-trash"></i></a>
</div>
</div>
{{/each}}
</div>
</fieldset>
</section>

View File

@@ -1,95 +0,0 @@
<section class="tab protagonist-{{tab.id}} {{tab.cssClass}}" data-tab="{{tab.id}}" data-group="{{tab.group}}">
<fieldset>
<legend>{{localize "FTLNOMAD.Label.bonds"}}{{#if isEditMode}}
<a class="action" data-tooltip="{{localize "FTLNOMAD.Tooltip.addBond"}}" data-tooltip-direction="UP"><i class="fas fa-plus" data-action="createBond"></i></a>{{/if}}</legend>
<div class="bonds">
{{#each bonds as |item|}}
{{!log 'weapon' this}}
<div class="bond" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}" >
<img class="item-img" src="{{item.img}}" data-tooltip="{{item.name}}" />
<div class="name" data-tooltip="{{{item.system.description}}}">
{{item.name}}
</div>
<div class="type">
{{upperFirst item.system.bondType}}
</div>
<div class="level">
{{item.system.value}}
</div>
<div class="controls">
<a data-tooltip="{{localize 'FTLNOMAD.Edit'}}" data-action="edit" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}"><i class="fas fa-edit"></i></a>
<a data-tooltip="{{localize 'FTLNOMAD.Delete'}}" data-action="delete" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}"><i class="fas fa-trash"></i></a>
</div>
</div>
{{/each}}
</div>
</fieldset>
<fieldset>
<legend>{{localize "FTLNOMAD.Label.injuries"}}{{#if isEditMode}}
<a class="action" data-tooltip="{{localize "FTLNOMAD.Tooltip.addInjury"}}" data-tooltip-direction="UP"><i class="fas fa-plus" data-action="createInjury"></i></a>{{/if}}</legend>
<div class="injuries">
{{#each injuries as |item|}}
<div class="injury" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}">
<img class="item-img" src="{{item.img}}" data-tooltip="{{item.name}}" />
<div class="name" data-tooltip="{{{item.system.description}}}">
{{item.name}}
</div>
<div class="controls">
<a data-tooltip="{{localize 'FTLNOMAD.Edit'}}" data-action="edit" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}"><i class="fas fa-edit"></i></a>
<a data-tooltip="{{localize 'FTLNOMAD.Delete'}}" data-action="delete" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}"><i class="fas fa-trash"></i></a>
</div>
</div>
{{/each}}
</div>
</fieldset>
<fieldset>
<legend>{{localize "FTLNOMAD.Label.mentaldisorders"}}{{#if isEditMode}}
<a class="action" data-tooltip="{{localize "FTLNOMAD.Tooltip.addMentalDisorder"}}" data-tooltip-direction="UP"><i class="fas fa-plus" data-action="createMentalDisorder"></i></a>{{/if}}</legend>
<div class="mentaldisorders">
{{#each mentaldisorders as |item|}}
{{!log 'armor' this}}
<div class="mentaldisorder" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}">
<img class="item-img" src="{{item.img}}" data-tooltip="{{item.name}}" />
<div class="name" data-tooltip="{{{item.system.description}}}">
{{item.name}}
</div>
<div class="cured">
{{#if item.system.cured}}
{{localize 'FTLNOMAD.Label.Cured'}}
{{else}}
{{localize 'FTLNOMAD.Label.Uncured'}}
{{/if}}
</div>
<div class="controls">
<a data-tooltip="{{localize 'FTLNOMAD.Edit'}}" data-action="edit" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}"><i class="fas fa-edit"></i></a>
<a data-tooltip="{{localize 'FTLNOMAD.Delete'}}" data-action="delete" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}"><i class="fas fa-trash"></i></a>
</div>
</div>
{{/each}}
</div>
</fieldset>
<fieldset>
<legend>{{localize "FTLNOMAD.Label.motivations"}}{{#if isEditMode}}
<a class="action" data-tooltip="{{localize "FTLNOMAD.Tooltip.addMotivation"}}" data-tooltip-direction="UP"><i class="fas fa-plus" data-action="createMotivation"></i></a>{{/if}}</legend>
<div class="motivations">
{{#each motivations as |item|}}
{{!log 'armor' this}}
<div class="motivation" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}">
<img class="item-img" src="{{item.img}}" data-tooltip="{{item.name}}" />
<div class="name" data-tooltip="{{{item.system.description}}}">
{{item.name}}
</div>
<div class="controls">
<a data-tooltip="{{localize 'FTLNOMAD.Edit'}}" data-action="edit" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}"><i class="fas fa-edit"></i></a>
<a data-tooltip="{{localize 'FTLNOMAD.Delete'}}" data-action="delete" data-item-id="{{item.id}}" data-item-uuid="{{item.uuid}}"><i class="fas fa-trash"></i></a>
</div>
</div>
{{/each}}
</div>
</fieldset>
</section>