This commit is contained in:
JDR-Ninja
2024-05-16 21:57:22 -04:00
parent d0be581d78
commit c05855fd39
17 changed files with 1466 additions and 503 deletions

370
.gitignore vendored
View File

@@ -1,6 +1,3 @@
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/main/VisualStudio.gitignore
# User-specific files
@@ -10,353 +7,8 @@
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Mono auto generated files
mono_crash.*
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
[Ww][Ii][Nn]32/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
[Ll]ogs/
# Visual Studio 2015/2017 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# Visual Studio 2017 auto generated files
Generated\ Files/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUnit
*.VisualState.xml
TestResult.xml
nunit-*.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# Benchmark Results
BenchmarkDotNet.Artifacts/
# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/
# ASP.NET Scaffolding
ScaffoldingReadMe.txt
# StyleCop
StyleCopReport.xml
# Files built by Visual Studio
*_i.c
*_p.c
*_h.h
*.ilk
*.meta
*.obj
*.iobj
*.pch
*.pdb
*.ipdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*_wpftmp.csproj
*.log
*.tlog
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# Visual Studio Trace Files
*.e2e
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# AxoCover is a Code Coverage Tool
.axoCover/*
!.axoCover/settings.json
# Coverlet is a free, cross platform Code Coverage Tool
coverage*.json
coverage*.xml
coverage*.info
# Visual Studio code coverage results
*.coverage
*.coveragexml
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# NuGet Symbol Packages
*.snupkg
# The packages folder can be ignored because of Package Restore
**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
!**/[Pp]ackages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/[Pp]ackages/repositories.config
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
*.appx
*.appxbundle
*.appxupload
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!?*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs
# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
#*.snk
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
ServiceFabricBackup/
*.rptproj.bak
# SQL Server files
*.mdf
*.ldf
*.ndf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
*.rptproj.rsuser
*- [Bb]ackup.rdl
*- [Bb]ackup ([0-9]).rdl
*- [Bb]ackup ([0-9][0-9]).rdl
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw
# Visual Studio 6 auto-generated project file (contains which files were open etc.)
*.vbp
# Visual Studio 6 workspace and project file (working project files containing files to include in project)
*.dsw
*.dsp
# Visual Studio 6 technical files
*.ncb
*.aps
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# CodeRush personal settings
.cr/personal
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config
# Tabs Studio
*.tss
# Telerik's JustMock configuration file
*.jmconfig
# BizTalk build output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs
# OpenCover UI analysis results
OpenCover/
# Azure Stream Analytics local run output
ASALocalRun/
# MSBuild Binary and Structured Log
*.binlog
# NVidia Nsight GPU debugger configuration file
*.nvuser
# MFractors (Xamarin productivity tool) working folder
.mfractor/
# Local History for Visual Studio
.localhistory/
@@ -364,18 +16,6 @@ ASALocalRun/
# Visual Studio History (VSHistory) files
.vshistory/
# BeatPulse healthcheck temp database
healthchecksdb
# Backup folder for Package Reference Convert tool in Visual Studio 2017
MigrationBackup/
# Ionide (cross platform F# VS Code tools) working folder
.ionide/
# Fody - auto-generated XML schema
FodyWeavers.xsd
# VS Code files for those working on multiple tools
.vscode/*
!.vscode/settings.json
@@ -387,12 +27,4 @@ FodyWeavers.xsd
# Local History for Visual Studio Code
.history/
# Windows Installer files from build outputs
*.cab
*.msi
*.msix
*.msm
*.msp
# JetBrains Rider
*.sln.iml
src/

18
CHANGELOG.md Normal file
View File

@@ -0,0 +1,18 @@
## [0.1.2](https://github.com/xdy/twodsix-foundryvtt/compare/v4.24.5...v4.24.6) (2024-05-04)
### Bug Fixes
* Affichage de la difficulté pour les Talents Psioniques
* Ajout de scrollbar dans la feuille de personnage
* Drag & Drop sur la fiche des Carrières, Maladies, Contacts, Espèces
* Retrait du style sur les messages (le temps d'uniformiser les messages)
* Différents ajustements css
### Features
* Thème Bleu
* Amélioration du modèle Espèce
* Ajout des champs : Description Détaillée, Modificateurs (tableau) et Traits (tableau)
* Lors du Drop d'une Espèce, copie des informations sur la fiche
* Ajout de la Durée pour les Talents Psioniques
* Bouton pour le jet de la Durée des Talents Psionique sur les messages
* Ajout de la difficulté sur la fenêtre des Jets
* Affichage du succès et de l'échec sur les messages

View File

@@ -15,9 +15,13 @@
"TYPES.Actor.vehicule": "Vehicule",
"TYPES.Actor.container": "Container (backpack, chest)",
"MGT2": {
"Save": "Save",
"Cancel": "Cancel",
"Close": "Close",
"Themes": {
"BlackAndRed": "Classic Traveller Cover",
"Mwamba": "Oppa Mwamba Style"
"Mwamba": "Oppa Mwamba Style",
"Blue": "Blue"
},
"Settings": {
"theme": {
@@ -57,6 +61,8 @@
"NewCareer":"New Career",
"AddCareer":"Add Career",
"EditCareer":"Edit Career",
"EditTrait":"Éditer Trait",
"DeleteTrait": "Supprimer Trait",
"DeleteCareer":"Delete Career",
"NewSkill":"New Skill",
"DeleteSkill":"Delete Skill",
@@ -136,6 +142,7 @@
"ShowMinMax": "Show Min/Max",
"ShowPsionicTalents": "Show Psionic Talents",
"Skills": "Skills",
"TabSkills": "Traits & Compétences",
"States": "States",
"StoreEquipment": "Store Equipment",
"StoreItem": "Store Item",
@@ -344,7 +351,9 @@
"Chat": {
"Roll": {
"ApplyDamages": "Apply Damages",
"Damages": "Roll damages"
"Damages": "Roll damages",
"Success": "Success",
"Failure": "Failure"
}
},
"Items": {
@@ -367,10 +376,12 @@
"Cost": "Cost",
"Damage": "Damage",
"Description": "Description",
"DetailedDescription": "Detailled Description",
"Details": "Details",
"Disease": "Disease",
"Diseases": "Diseases",
"Difficulty": "Difficulty",
"Duration": "Duration",
"Equipped": "Equipped",
"Equipment": "Equipment",
"Equipments": "Equipments",
@@ -387,6 +398,9 @@
"LockedDescription": "Locked Description",
"Magazine": "Magazine",
"MagazineCost": "Magazine Cost",
"Modifier": "Modifier",
"Modifiers": "Modifiers",
"Name": "Name",
"Nickname": "Nickname",
"NotProficient": "Not proficient (-3)",
"Notes": "Notes",
@@ -408,6 +422,7 @@
"Relation": "Relation",
"Relations": "Relations",
"Skill": "Skill",
"PsySkill": "Psy Skill",
"Speciality": "Speciality",
"Status": "Status",
"Storage": "Storage",
@@ -417,12 +432,18 @@
"Terms": "Terms",
"Title": "Title",
"Trait": "Trait",
"Traits": "Traits",
"Type": "Type",
"Weapon": "Weapon",
"Weapons": "Weapons",
"Weight": "Weight",
"Weightless": "Weightless",
"Quantity": "Quantity"
},
"Durations": {
"Seconds": "Seconds",
"Minutes": "Minutes",
"Heures": "Hours"
}
}
}

View File

@@ -15,9 +15,13 @@
"TYPES.Actor.vehicule": "Véhicule",
"TYPES.Actor.container": "Contenant (sac, coffre)",
"MGT2": {
"Save": "Sauvegarder",
"Cancel": "Annuler",
"Close": "Fermer",
"Themes": {
"BlackAndRed": "Couverture Classique Traveller",
"Mwamba": "Oppa Mwamba Style"
"Mwamba": "Oppa Mwamba Style",
"Blue": "Bleu"
},
"Settings": {
"theme": {
@@ -57,6 +61,8 @@
"NewCareer":"Nouvelle Carrière",
"AddCareer":"Ajouter Carrière",
"EditCareer":"Éditer Carrière",
"EditTrait":"Éditer Trait",
"DeleteTrait": "Supprimer Trait",
"DeleteCareer":"Supprimer Carrière",
"NewSkill":"Nouvelle Compétence",
"DeleteSkill":"Supprimer Compétence",
@@ -136,6 +142,7 @@
"ShowMinMax": "Afficher le Min/Max",
"ShowPsionicTalents": "Afficher les Talents Psy",
"Skills": "Compétences",
"TabSkills": "Traits & Compétences",
"States": "États",
"StoreEquipment": "Entreposer Équipement",
"StoreItem": "Entreposer Objet",
@@ -344,7 +351,9 @@
"Chat": {
"Roll": {
"ApplyDamages": "Appliquer Dégâts",
"Damages": "Lancer les Dégâts"
"Damages": "Lancer les Dégâts",
"Success": "Succès",
"Failure": "Échec"
}
},
"Items": {
@@ -367,10 +376,12 @@
"Cost": "Coût",
"Damage": "Dégâts",
"Description": "Description",
"DetailedDescription": "Desc. Détailée",
"Details": "Détails",
"Difficulty": "Difficulté",
"Disease": "Maladie",
"Diseases": "Maladies",
"Duration": "Durée",
"Equipped": "Équipé",
"Equipment": "Équipement",
"Equipments": "Équipements",
@@ -387,6 +398,9 @@
"LockedDescription": "Description Verrouillé",
"Magazine": "Chargeur",
"MagazineCost": "Coût du Chargeur",
"Modifier": "Modificateur",
"Modifiers": "Modificateurs",
"Name": "Nom",
"Nickname": "Surnom",
"NotProficient": "Incompétent (-3)",
"Notes": "Notes",
@@ -408,6 +422,7 @@
"Relation": "Relation",
"Relations": "Relations",
"Skill": "Compétence",
"PsySkill": "Comp. Psionique",
"Speciality": "Spécialité",
"Status": "Statut",
"Storage": "Stockage",
@@ -417,12 +432,18 @@
"Terms": "Termes",
"Title": "Titre",
"Trait": "Trait",
"Traits": "Traits",
"Type": "Type",
"Weapon": "Arme",
"Weapons": "Armes",
"Weight": "Poid",
"Weightless": "Aucun Poid",
"Quantity": "Quantité"
},
"Durations": {
"Seconds": "Secondes",
"Minutes": "Minutes",
"Heures": "Heures"
}
}
}

View File

@@ -10,11 +10,21 @@ class CharacterData extends foundry.abstract.TypeDataModel {
personal: new fields.SchemaField({
title: new fields.StringField({ required: false, blank: true, trim: true }),
species: new fields.StringField({ required: false, blank: true, trim: true }),
speciesText: new fields.SchemaField({
description: new fields.StringField({ required: false, blank: true, trim: true, nullable: true }),
descriptionLong: new fields.HTMLField({ required: false, blank: true, trim: true })
}),
age: new fields.StringField({ required: false, blank: true, trim: true }),
gender: new fields.StringField({ required: false, blank: true, trim: true }),
pronouns: new fields.StringField({ required: false, blank: true, trim: true }),
homeworld: new fields.StringField({ required: false, blank: true, trim: true }),
ucp: new fields.StringField({ required: false, blank: true, trim: true, initial: "" })
ucp: new fields.StringField({ required: false, blank: true, trim: true, initial: "" }),
traits: new fields.ArrayField(
new fields.SchemaField({
name: new fields.StringField({ required: true, blank: true, trim: true }),
description: new fields.StringField({ required: false, blank: true, trim: true })
})
)
}),
biography: new fields.HTMLField({ required: false, blank: true, trim: true }),
characteristics: new fields.SchemaField({
@@ -212,7 +222,9 @@ class TalentData extends ItemBaseData {
});
schema.psionic = new fields.SchemaField({
reach: new fields.StringField({ required: false, blank: true, trim: true }),
cost: new fields.NumberField({ required: false, initial: 1, min: 0, integer: true })
cost: new fields.NumberField({ required: false, initial: 1, min: 0, integer: true }),
duration: new fields.StringField({ required: false, blank: true, trim: true }),
durationUnit: new fields.StringField({ required: false })
});
schema.roll = new fields.SchemaField({
characteristic: new fields.StringField({ required: false, blank: true, trim: true }),
@@ -306,9 +318,25 @@ class ComputerData extends PhysicalItemData {
return schema;
}
}
class SpeciesData extends ItemBaseData {
class SpeciesData extends foundry.abstract.TypeDataModel {
static defineSchema() {
const schema = super.defineSchema();
const fields2 = foundry.data.fields;
const schema = {
description: new fields2.StringField({ required: false, blank: true, trim: true, nullable: true }),
descriptionLong: new fields2.HTMLField({ required: false, blank: true, trim: true }),
traits: new fields2.ArrayField(
new fields2.SchemaField({
name: new fields2.StringField({ required: true, blank: true, trim: true }),
description: new fields2.StringField({ required: false, blank: true, trim: true })
})
),
modifiers: new fields2.ArrayField(
new fields2.SchemaField({
characteristic: new fields2.StringField({ required: false, blank: true, trim: true }),
value: new fields2.NumberField({ required: false, integer: true, nullable: true })
})
)
};
return schema;
}
}
@@ -458,16 +486,21 @@ MGT2.Timeframes = Object.freeze({
Faster: "MGT2.Timeframes.Faster"
});
MGT2.SpeedBands = Object.freeze({
Stoppped: "MGT2.Stoppped",
Idle: "MGT2.Idle",
VerySlow: "MGT2.VerySlow",
Slow: "MGT2.Slow",
Medium: "MGT2.Medium",
High: "MGT2.High.",
Fast: "MGT2.Fast",
VeryFast: "MGT2.VeryFast",
Subsonic: "MGT2.Subsonic",
Hypersonic: "MGT2.Hypersonic"
Stoppped: "MGT2.SpeedBands.Stoppped",
Idle: "MGT2.SpeedBands.Idle",
VerySlow: "MGT2.SpeedBands.VerySlow",
Slow: "MGT2.SpeedBands.Slow",
Medium: "MGT2.SpeedBands.Medium",
High: "MGT2.SpeedBands.High.",
Fast: "MGT2.SpeedBands.Fast",
VeryFast: "MGT2.SpeedBands.VeryFast",
Subsonic: "MGT2.SpeedBands.Subsonic",
Hypersonic: "MGT2.SpeedBands.Hypersonic"
});
MGT2.Durations = Object.freeze({
Seconds: "MGT2.Durations.Seconds",
Minutes: "MGT2.Durations.Minutes",
Heures: "MGT2.Durations.Heures"
});
class ActorCharacter {
@@ -975,6 +1008,9 @@ var __publicField = (obj, key, value) => {
return value;
};
const _MGT2Helper = class _MGT2Helper {
static hasValue(object, property) {
return object !== void 0 && object.hasOwnProperty(property) && object[property] !== null && object[property] !== void 0 && object[property] !== "";
}
static getItemsWeight(items) {
let weight = 0;
for (let i of items) {
@@ -1043,26 +1079,66 @@ const _MGT2Helper = class _MGT2Helper {
}
return total;
}
static getDifficultyValue(difficulty) {
switch (difficulty) {
case "Simple":
return 2;
case "Easy":
return 4;
case "Routine":
return 6;
case "Average":
return 8;
case "Difficult":
return 10;
case "VeryDifficult":
return 12;
case "Formidable":
return 14;
case "Impossible":
return 16;
default:
return 0;
}
}
static getDifficultyDisplay(difficulty) {
switch (difficulty) {
case "Simple":
return game.i18n.localize("MGT2.Difficulty.Simple") + " (2+)";
case "Easy":
return game.i18n.localize("MGT2.Difficulty.Easy") + " (4+)";
case "Routine":
return game.i18n.localize("MGT2.Difficulty.Routine") + " (6+)";
case "Average":
return game.i18n.localize("MGT2.Difficulty.Average") + " (8+)";
case "Difficult":
return game.i18n.localize("MGT2.Difficulty.Difficult") + " (10+)";
case "VeryDifficult":
return game.i18n.localize("MGT2.Difficulty.VeryDifficult") + " (12+)";
case "Formidable":
return game.i18n.localize("MGT2.Difficulty.Formidable") + " (14+)";
case "Impossible":
return game.i18n.localize("MGT2.Difficulty.Impossible") + " (16+)";
default:
return null;
}
}
static getRangeDisplay(range) {
let value = Number(range.value);
if (isNaN(value))
return null;
let label;
if (game.settings.get("mgt2", "useDistanceMetric") === true) {
if (range.unit !== null && range.unit !== void 0 && range.unit !== "")
label = game.i18n.localize(`MGT2.MetricRange.${range.unit}`).toLowerCase();
else
label = "";
}
return `${value}${label}`;
}
static getWeightLabel() {
const label = game.settings.get("mgt2", "useWeightMetric") === true ? "MGT2.MetricSystem.Weight.kg" : "MGT2.ImperialSystem.Weight.lb";
return game.i18n.localize(label);
return game.i18n.localize("MGT2.MetricSystem.Weight.kg");
}
static getDistanceLabel() {
const label = game.settings.get("mgt2", "useDistanceMetric") === true ? "MGT2.MetricSystem.Distance.km" : "MGT2.ImperialSystem.Distance.mi";
return game.i18n.localize(label);
return game.i18n.localize("MGT2.MetricSystem.Distance.km");
}
static getIntegerFromInput(data) {
return Math.trunc(this.getNumberFromInput(data));
@@ -1082,16 +1158,10 @@ const _MGT2Helper = class _MGT2Helper {
return converted;
}
static convertWeightForDisplay(weight) {
if (game.settings.get("mgt2", "useWeightMetric") === true || weight === 0)
return weight;
const pounds = weight * this.POUNDS_CONVERT;
return Math.round(pounds * 10) / 10;
}
static convertWeightFromInput(weight) {
if (game.settings.get("mgt2", "useWeightMetric") === true || weight === 0)
return Math.round(weight * 10) / 10;
const kg = this.POUNDS_CONVERT / weight;
return Math.round(kg * 10) / 10;
}
static getDataFromDropEvent(event) {
var _a;
@@ -1127,6 +1197,14 @@ __publicField(_MGT2Helper, "decimalSeparator");
__publicField(_MGT2Helper, "badDecimalSeparator");
_MGT2Helper.decimalSeparator = Number(1.1).toLocaleString().charAt(1);
_MGT2Helper.badDecimalSeparator = _MGT2Helper.decimalSeparator === "." ? "," : ".";
__publicField(_MGT2Helper, "format", function() {
var s = arguments[0];
for (var i = 0; i < arguments.length - 1; i++) {
var reg = new RegExp("\\{" + i + "\\}", "gm");
s = s.replace(reg, arguments[i + 1]);
}
return s;
});
let MGT2Helper = _MGT2Helper;
class TravellerItemSheet extends ItemSheet {
@@ -1208,10 +1286,55 @@ class TravellerItemSheet extends ItemSheet {
if (this.item.type == "career") {
html.find(".event-create").click(this._onCareerEventCreate.bind(this));
html.find(".event-delete").click(this._onCareerEventDelete.bind(this));
} else if (this.item.type == "armor" || this.item.type == "computer" || this.item.type == "weapon") {
} else if (this.item.type == "armor" || this.item.type == "computer" || this.item.type == "species" || this.item.type == "weapon") {
html.find(".options-create").click(this._onOptionCreate.bind(this));
html.find(".options-delete").click(this._onOptionDelete.bind(this));
}
if (this.item.type == "species") {
html.find(".modifiers-create").click(this._onModifierEventCreate.bind(this));
html.find(".modifiers-delete").click(this._onModifierEventDelete.bind(this));
}
}
async _onModifierEventCreate(event) {
event.preventDefault();
await this._onSubmit(event);
let modifiers = this.item.system.modifiers;
let index;
if (modifiers.length === 0) {
modifiers = {};
modifiers["0"] = { characteristic: "Endurance", value: null };
} else {
index = Math.max(...Object.keys(modifiers));
index++;
modifiers[index] = { characteristic: "Endurance", value: null };
}
let update = {
system: {
modifiers
}
};
return this.item.update(update);
}
async _onModifierEventDelete(event) {
event.preventDefault();
await this._onSubmit(event);
const element = event.currentTarget.closest(".modifiers-part");
const modifiers = foundry.utils.deepClone(this.item.system.modifiers);
let index = Number(element.dataset.modifiersPart);
const newModifiers = [];
let entries = Object.entries(modifiers);
if (entries.length > 1) {
for (const [key, value] of entries) {
if (key != index)
newModifiers.push(value);
}
}
let update = {
system: {
modifiers: newModifiers
}
};
return this.item.update(update);
}
async _onCareerEventCreate(event) {
event.preventDefault();
@@ -1291,20 +1414,20 @@ class TravellerItemSheet extends ItemSheet {
update[`system.${property}`] = newOptions;
return this.item.update(update);
}
async _onTraitCreate(event) {
event.preventDefault();
await this._onSubmit(event);
const traits = this.item.system.traits;
return this.item.update({ "system.traits.parts": traits.parts.concat([["", ""]]) });
}
async _onTraitDelete(event) {
event.preventDefault();
await this._onSubmit(event);
const element = event.currentTarget.closest(".traits-part");
const traits = foundry.utils.deepClone(this.item.system.traits);
traits.parts.splice(Number(element.dataset.traitsPart), 1);
return this.item.update({ "system.traits.parts": traits.parts });
}
// async _onTraitCreate(event) {
// event.preventDefault();
// await this._onSubmit(event);
// const traits = this.item.system.traits;
// return this.item.update({ "system.traits.parts": traits.parts.concat([["", ""]]) });
// }
// async _onTraitDelete(event) {
// event.preventDefault();
// await this._onSubmit(event);
// const element = event.currentTarget.closest(".traits-part");
// const traits = foundry.utils.deepClone(this.item.system.traits);
// traits.parts.splice(Number(element.dataset.traitsPart), 1);
// return this.item.update({ "system.traits.parts": traits.parts });
// }
_getSubmitData(updateData = {}) {
const formData = foundry.utils.expandObject(super._getSubmitData(updateData));
if (formData.hasOwnProperty("system") && formData.system.hasOwnProperty("container") && this.item.system.hasOwnProperty("equipped")) {
@@ -1351,7 +1474,8 @@ class RollPromptDialog extends Dialog {
skills: options.skills,
skill: options.skill,
fatigue: options.fatigue,
encumbrance: options.encumbrance
encumbrance: options.encumbrance,
difficulty: options.difficulty
});
const results = new Promise((resolve) => {
new this({
@@ -1425,6 +1549,29 @@ class RollPromptHelper {
}
}
class EditorFullViewDialog extends Dialog {
constructor(dialogData = {}, options = {}) {
super(dialogData, options);
this.options.classes = ["mgt2", game.settings.get("mgt2", "theme"), "sheet"];
this.options.resizable = true;
}
static async create(title, html) {
const htmlContent = await renderTemplate("systems/mgt2/templates/editor-fullview.html", {
config: CONFIG.MGT2,
html
});
const results = new Promise((resolve) => {
new this({
title,
content: htmlContent,
buttons: {
//close: { label: game.i18n.localize("MGT2.Close") }
}
}).render(true);
});
return results;
}
}
class ActorConfigDialog extends Dialog {
constructor(dialogData = {}, options = {}) {
super(dialogData, options);
@@ -1441,7 +1588,7 @@ class ActorConfigDialog extends Dialog {
content: htmlContent,
buttons: {
submit: {
label: "Save",
label: game.i18n.localize("MGT2.Save"),
icon: '<i class="fa-solid fa-floppy-disk"></i>',
callback: (html) => {
const formData = new FormDataExtended(html[0].querySelector("form")).object;
@@ -1454,14 +1601,6 @@ class ActorConfigDialog extends Dialog {
return results;
}
}
class CharacterPrompts {
static async openConfig(system) {
return await ActorConfigDialog.create(system);
}
static async openCharacteristic(name, hide, showMax, showAll = false) {
return await ActorCharacteristicDialog.create(name, hide, showMax, showAll);
}
}
class ActorCharacteristicDialog extends Dialog {
// https://foundryvtt.wiki/en/development/api/dialog
constructor(dialogData = {}, options = {}) {
@@ -1481,7 +1620,7 @@ class ActorCharacteristicDialog extends Dialog {
content: htmlContent,
buttons: {
submit: {
label: "Save",
label: game.i18n.localize("MGT2.Save"),
icon: '<i class="fa-solid fa-floppy-disk"></i>',
callback: (html) => {
const formData = new FormDataExtended(html[0].querySelector("form")).object;
@@ -1494,6 +1633,56 @@ class ActorCharacteristicDialog extends Dialog {
return results;
}
}
class TraitEditDialog extends Dialog {
constructor(dialogData = {}, options = {}) {
super(dialogData, options);
this.options.classes = ["mgt2", game.settings.get("mgt2", "theme"), "sheet"];
}
static async create(data) {
const htmlContent = await renderTemplate("systems/mgt2/templates/actors/trait-sheet.html", {
config: CONFIG.MGT2,
data
});
const title = data.hasOwnProperty("name") && data.name !== void 0 ? data.name : game.i18n.localize("MGT2.Actor.EditTrait");
const results = new Promise((resolve) => {
new this({
title,
content: htmlContent,
buttons: {
submit: {
label: game.i18n.localize("MGT2.Save"),
icon: '<i class="fa-solid fa-floppy-disk"></i>',
callback: (html) => {
const formData = new FormDataExtended(html[0].querySelector("form")).object;
resolve(formData);
}
}
//cancel: { label: "Cancel" }
}
// close: (html) => {
// console.log("This always is logged no matter which option is chosen");
// const formData = new FormDataExtended(html[0].querySelector('form')).object;
// resolve(formData);
// }
}).render(true);
});
return results;
}
}
class CharacterPrompts {
static async openConfig(system) {
return await ActorConfigDialog.create(system);
}
static async openCharacteristic(name, hide, showMax, showAll = false) {
return await ActorCharacteristicDialog.create(name, hide, showMax, showAll);
}
static async openTraitEdit(data) {
return await TraitEditDialog.create(data);
}
static async openEditorFullView(title, html) {
return await EditorFullViewDialog.create(title, html);
}
}
class TravellerActorSheet extends ActorSheet {
/** @inheritdoc */
@@ -1538,7 +1727,8 @@ class TravellerActorSheet extends ActorSheet {
const wounds = [];
const contacts = [];
const settings = {
weightUnit: game.settings.get("mgt2", "useWeightMetric") ? "kg" : "lb",
weightUnit: "kg",
//weightUnit: game.settings.get("mgt2", "useWeightMetric") ? "kg" : "lb",
usePronouns: game.settings.get("mgt2", "usePronouns"),
useGender: game.settings.get("mgt2", "useGender"),
showLife: game.settings.get("mgt2", "showLife")
@@ -1694,6 +1884,12 @@ class TravellerActorSheet extends ActorSheet {
if (i.system.subType === "skill") {
skills.push(i);
} else {
if (MGT2Helper.hasValue(i.system.psionic, "reach")) {
i.reach = game.i18n.localize(`MGT2.PsionicReach.${i.system.psionic.reach}`);
}
if (MGT2Helper.hasValue(i.system.roll, "difficulty")) {
i.difficulty = game.i18n.localize(`MGT2.Difficulty.${i.system.roll.difficulty}`);
}
psionics.push(i);
}
break;
@@ -1810,6 +2006,55 @@ class TravellerActorSheet extends ActorSheet {
html.find("a[data-roll]").click(this._onRoll.bind(this));
html.find('a[name="config"]').click(this._onOpenConfig.bind(this));
html.find("a[data-cfg-characteristic]").click(this._onOpenCharacteristic.bind(this));
html.find(".traits-create").click(this._onTraitCreate.bind(this));
html.find(".traits-edit").click(this._onTraitEdit.bind(this));
html.find(".traits-delete").click(this._onTraitDelete.bind(this));
html.find('a[data-editor="open"]').click(this._onOpenEditor.bind(this));
}
async _onOpenEditor(event) {
event.preventDefault();
await CharacterPrompts.openEditorFullView(this.actor.system.personal.species, this.actor.system.personal.speciesText.descriptionLong);
}
async _onTraitCreate(event) {
event.preventDefault();
await this._onSubmit(event);
let traits = this.actor.system.personal.traits;
let index;
if (traits.length === 0) {
traits = {};
traits["0"] = { name: "", description: "" };
} else {
index = Math.max(...Object.keys(traits));
index++;
traits[index] = { name: "", description: "" };
}
return this.actor.update({ system: { personal: { traits } } });
}
async _onTraitEdit(event) {
event.preventDefault();
const index = $(event.currentTarget).parents("[data-traits-part]").data("traits-part");
const trait = this.actor.system.personal.traits[index];
let result = await CharacterPrompts.openTraitEdit(trait);
const traits = this.actor.system.personal.traits;
traits[index].name = result.name;
traits[index].description = result.description;
return this.actor.update({ system: { personal: { traits } } });
}
async _onTraitDelete(event) {
event.preventDefault();
await this._onSubmit(event);
const element = event.currentTarget.closest(".traits-part");
const traits = foundry.utils.deepClone(this.actor.system.personal.traits);
let index = Number(element.dataset.traitsPart);
const newTraits = [];
let entries = Object.entries(traits);
if (entries.length > 1) {
for (const [key, value] of entries) {
if (key != index)
newTraits.push(value);
}
}
return this.actor.update({ system: { personal: { traits: newTraits } } });
}
async _onOpenConfig(ev) {
ev.preventDefault();
@@ -1864,6 +2109,7 @@ class TravellerActorSheet extends ActorSheet {
difficulty: null,
damageFormula: null
};
const cardButtons = [];
for (const [key, label] of Object.entries(MGT2.Characteristics)) {
const c = this.actor.system.characteristics[key];
if (c.show) {
@@ -1912,25 +2158,35 @@ class TravellerActorSheet extends ActorSheet {
}
if (button.dataset.roll === "psionic") {
rollOptions.rollObjectName = itemObj.name;
if (MGT2Helper.hasValue(itemObj.system.psionic, "duration")) {
cardButtons.push({
label: game.i18n.localize("MGT2.Items.Duration"),
formula: itemObj.system.psionic.duration,
message: {
objectName: itemObj.name,
flavor: "{0} ".concat(game.i18n.localize(`MGT2.Durations.${itemObj.system.psionic.durationUnit}`))
}
});
}
}
if (itemObj.system.hasOwnProperty("damage")) {
rollOptions.damageFormula = itemObj.system.damage;
if (itemObj.type === "disease") {
if (itemObj.system.subTypetype === "disease") {
rollOptions.rollTypeName = game.i18n.localize("DiseaseSubType.disease");
rollOptions.rollTypeName = game.i18n.localize("MGT2.DiseaseSubType.disease");
} else if (itemObj.system.subTypetype === "poison") {
rollOptions.rollTypeName = game.i18n.localize("DiseaseSubType.poison");
rollOptions.rollTypeName = game.i18n.localize("MGT2.DiseaseSubType.poison");
}
}
}
if (itemObj.system.hasOwnProperty("roll")) {
if (itemObj.system.roll.hasOwnProperty("characteristic") && itemObj.system.roll.characteristic !== "" && itemObj.system.roll.characteristic !== void 0) {
if (MGT2Helper.hasValue(itemObj.system.roll, "characteristic")) {
rollOptions.characteristic = itemObj.system.roll.characteristic;
}
if (itemObj.system.roll.hasOwnProperty("skill") && itemObj.system.roll.skill !== "" && itemObj.system.roll.skill !== void 0) {
if (MGT2Helper.hasValue(itemObj.system.roll, "skill")) {
rollOptions.skill = itemObj.system.roll.skill;
}
if (rollOptions.difficulty === null && itemObj.system.roll.hasOwnProperty("difficulty") && itemObj.system.roll.difficulty !== "" && itemObj.system.roll.difficulty !== void 0) {
if (MGT2Helper.hasValue(itemObj.system.roll, "difficulty")) {
rollOptions.difficulty = itemObj.system.roll.difficulty;
}
}
@@ -1983,6 +2239,9 @@ class TravellerActorSheet extends ActorSheet {
rollFormulaParts.push("+");
rollFormulaParts.push(s);
}
if (MGT2Helper.hasValue(userRollData, "difficulty")) {
rollOptions.difficulty = userRollData.difficulty;
}
const rollData = this.actor.getRollData();
const rollFormula = rollFormulaParts.join("");
if (!Roll.validate(rollFormula)) {
@@ -2007,13 +2266,31 @@ class TravellerActorSheet extends ActorSheet {
rollTypeName: rollOptions.rollTypeName,
rollObjectName: rollOptions.rollObjectName,
rollModifiers,
showRollDamage: rollOptions.damageFormula !== null && rollOptions.damageFormula !== ""
showRollDamage: rollOptions.damageFormula !== null && rollOptions.damageFormula !== "",
cardButtons
};
if (MGT2Helper.hasValue(rollOptions, "difficulty")) {
chatData.rollDifficulty = rollOptions.difficulty;
chatData.rollDifficultyLabel = MGT2Helper.getDifficultyDisplay(rollOptions.difficulty);
if (roll.total >= MGT2Helper.getDifficultyValue(rollOptions.difficulty)) {
chatData.rollSuccess = true;
} else {
chatData.rollFailure = true;
}
}
const html = await renderTemplate("systems/mgt2/templates/chat/roll.html", chatData);
chatData.content = html;
let flags = null;
if (rollOptions.damageFormula !== null && rollOptions.damageFormula !== "") {
chatData.flags = { mgt2: { damage: { formula: rollOptions.damageFormula, rollObjectName: rollOptions.rollObjectName, rollTypeName: rollOptions.rollTypeName } } };
flags = { mgt2: { damage: { formula: rollOptions.damageFormula, rollObjectName: rollOptions.rollObjectName, rollTypeName: rollOptions.rollTypeName } } };
}
if (cardButtons.length > 0) {
if (flags === null)
flags = { mgt2: {} };
flags.mgt2.buttons = cardButtons;
}
if (flags !== null)
chatData.flags = flags;
return roll.toMessage(chatData);
}
_onItemCreate(ev) {
@@ -2098,7 +2375,49 @@ class TravellerActorSheet extends ActorSheet {
if (!dropData)
return false;
const sourceItemData = await MGT2Helper.getItemDataFromDropData(dropData);
if (sourceItemData.type !== "contact" && sourceItemData.type !== "talent" && sourceItemData.type !== "armor" && sourceItemData.type !== "weapon" && sourceItemData.type !== "computer" && sourceItemData.type !== "container" && sourceItemData.type !== "species" && sourceItemData.type !== "item" && sourceItemData.type !== "equipment")
if (sourceItemData.type === "species") {
const update = {
system: {
personal: {
species: sourceItemData.name,
speciesText: {
description: sourceItemData.system.description,
descriptionLong: sourceItemData.system.descriptionLong
}
}
}
};
update.system.personal.traits = this.actor.system.personal.traits.concat(sourceItemData.system.traits);
if (sourceItemData.system.modifiers && sourceItemData.system.modifiers.length > 0) {
update.system.characteristics = {};
for (let modifier of sourceItemData.system.modifiers) {
if (MGT2Helper.hasValue(modifier, "characteristic") && MGT2Helper.hasValue(modifier, "value")) {
const c = this.actor.system.characteristics[modifier.characteristic];
const updateValue = { value: c.value };
updateValue.value += modifier.value;
if (c.showMax) {
updateValue.max = c.max + modifier.value;
}
update.system.characteristics[modifier.characteristic] = updateValue;
}
}
}
this.actor.update(update);
return true;
}
if (sourceItemData.type === "contact" || sourceItemData.type === "disease" || sourceItemData.type === "career" || sourceItemData.type === "talent") {
let transferData = {};
try {
transferData = sourceItemData.toJSON();
} catch (err) {
transferData = sourceItemData;
}
delete transferData._id;
delete transferData.id;
await this.actor.createEmbeddedDocuments("Item", [transferData]);
return true;
}
if (sourceItemData.type !== "armor" && sourceItemData.type !== "weapon" && sourceItemData.type !== "computer" && sourceItemData.type !== "container" && sourceItemData.type !== "item" && sourceItemData.type !== "equipment")
return false;
const target = event.target.closest(".table-row");
let targetId = null;
@@ -2142,7 +2461,6 @@ class TravellerActorSheet extends ActorSheet {
} catch (err) {
transferData = sourceItemData;
}
transferData._id;
delete transferData._id;
delete transferData.id;
const recalcWeight = transferData.system.hasOwnProperty("weight");
@@ -2193,7 +2511,9 @@ const preloadHandlebarsTemplates = async function() {
"systems/mgt2/templates/chat/roll.html",
//"systems/mgt2/templates/chat/roll-characteristic.html",
"systems/mgt2/templates/actors/actor-config-sheet.html",
"systems/mgt2/templates/actors/actor-config-characteristic-sheet.html"
"systems/mgt2/templates/actors/actor-config-characteristic-sheet.html",
"systems/mgt2/templates/actors/trait-sheet.html",
"systems/mgt2/templates/editor-fullview.html"
//"systems/mgt2/templates/actors/parts/actor-characteristic.html"
];
return loadTemplates(templatePaths);
@@ -2216,6 +2536,33 @@ class ChatHelper {
html.find('button[data-action="healing"]').click(async (event) => {
ui.notifications.warn("healing");
});
html.find("button[data-index]").click(async (event) => {
await this._processRollButtonEvent(message, event);
});
}
static async _processRollButtonEvent(message, event) {
event.preventDefault();
event.stopPropagation();
let buttons = message.flags.mgt2.buttons;
const index = event.target.dataset.index;
const button = buttons[index];
let roll = await new Roll(button.formula, {}).roll({ async: true });
const chatData = {
user: game.user.id,
speaker: message.speaker,
formula: roll._formula,
tooltip: await roll.getTooltip(),
total: Math.round(roll.total * 100) / 100,
//formula: isPrivate ? "???" : roll._formula,
//tooltip: isPrivate ? "" : await roll.getTooltip(),
//total: isPrivate ? "?" : Math.round(roll.total * 100) / 100,
type: CONST.CHAT_MESSAGE_TYPES.ROLL,
rollObjectName: button.message.objectName,
rollMessage: MGT2Helper.format(button.message.flavor, Math.round(roll.total * 100) / 100)
};
const html = await renderTemplate("systems/mgt2/templates/chat/roll.html", chatData);
chatData.content = html;
return roll.toMessage(chatData);
}
static async _processRollDamageButtonEvent(message, event) {
event.preventDefault();
@@ -2270,7 +2617,8 @@ const registerSettings = function() {
type: String,
choices: {
"black-and-red": "MGT2.Themes.BlackAndRed",
"mwamba": "MGT2.Themes.Mwamba"
"mwamba": "MGT2.Themes.Mwamba",
"blue": "MGT2.Themes.Blue"
},
requiresReload: true
});
@@ -2295,30 +2643,12 @@ const registerSettings = function() {
game.settings.register("mgt2", "showLife", {
name: "MGT2.Settings.showLife.name",
hint: "MGT2.Settings.showLife.hint",
default: true,
default: false,
scope: "world",
type: Boolean,
config: true,
requiresReload: false
});
game.settings.register("mgt2", "useWeightMetric", {
name: "MGT2.Settings.useWeightMetric.name",
hint: "MGT2.Settings.useWeightMetric.hint",
default: true,
scope: "world",
type: Boolean,
config: true,
requiresReload: true
});
game.settings.register("mgt2", "useDistanceMetric", {
name: "MGT2.Settings.useDistanceMetric.name",
hint: "MGT2.Settings.useDistanceMetric.hint",
default: true,
scope: "world",
type: Boolean,
config: true,
requiresReload: true
});
};
function registerHandlebarsHelpers() {

File diff suppressed because one or more lines are too long

BIN
mgt2.zip Normal file

Binary file not shown.

99
styles/mgt2.min.css vendored
View File

@@ -43,6 +43,26 @@
--mgt2-row-inactive-icon: #b5b3a4;
}
.blue {
--mgt2-color-form: #0A0405;
--mgt2-bgcolor-form: #fff;
--mgt2-color-primary: #91AAC8;
--mgt2-color-primary-active: #BCDCFF;
--mgt2-bgcolor-primary: #0A0405;
--mgt2-color-primary-light: #4b4a44;
--mgt2-color-warning: #EE4050;
--mgt2-color-dm: #fff;
--mgt2-bgcolor-dm: #0A0405;
--mgt2-color-software: #fff;
--mgt2-bgcolor-software: #0A0405;
--mgt2-input-color: #0A0405;
--mgt2-input-bgcolor: #fff;
--mgt2-editor-border: #C6C6C6;
--mgt2-row-hover: #F2F2F2;
--mgt2-subrow-color: #727272;
--mgt2-row-inactive-icon: #b5b3a4;
}
.upcase {
text-transform: uppercase;
}
@@ -90,10 +110,6 @@
.mgt2 .mt-2 {
margin-top: 14px;
}
.mgt2 .flex-fix {
flex-grow: 0 !important;
flex-shrink: 0 !important;
}
.mgt2.sheet header.window-header {
color: var(--mgt2-color-primary);
@@ -112,6 +128,32 @@
padding: 0;
}
.mgt2 .flex-fix {
flex-grow: 0 !important;
flex-shrink: 0 !important;
}
.mgt2 .flex-basis-10 {
flex-basis: 10%;
}
.mgt2 .flex-basis-20 {
flex-basis: 20%;
}
.mgt2 .flex-basis-30 {
flex-basis: 30%;
}
.mgt2 .flex-basis-40 {
flex-basis: 40%;
}
.mgt2 .flex-basis-50 {
flex-basis: 50%;
}
.mgt2 .flex-basis-60 {
flex-basis: 60%;
}
.mgt2 .flex-basis-70 {
flex-basis: 70%;
}
.mgt2.sheet textarea {
color: var(--mgt2-input-color);
background-color: var(--mgt2-input-bgcolor);
@@ -207,6 +249,15 @@
padding: 4px;
}
.species {
font-size: 13px;
margin: 4px 1rem 0 1rem;
text-align: justify;
}
.species a {
margin-right: 1rem;
}
.mgt2 .characteristics {
flex-basis: 138px;
flex-grow: 0;
@@ -482,6 +533,17 @@ ul.softwares li:hover a {
font-weight: bold;
}
.character-body {
height: 100%;
overflow: hidden;
display: flex;
flex-direction: row;
width: 100%;
justify-content: flex-start;
align-items: flex-start;
border-top: 3px solid black;
}
.actor-footer {
bottom: 0;
color: var(--mgt2-color-primary);
@@ -560,12 +622,6 @@ ul.softwares li:hover a {
box-shadow: 0 0 2px #FFF inset;
}
.chat-message.message {
color: #0A0405;
background-color: #fff;
background-image: none;
}
.dice-formula,
.dice-total {
background-color: #fff;
@@ -590,6 +646,13 @@ ul.softwares li:hover a {
flex-direction: column;
}
.roll-type-group {
flex-direction: row;
flex-wrap: wrap;
justify-content: space-between;
display: flex;
}
.roll-type-name {
font-size: 11px;
text-transform: uppercase;
@@ -601,6 +664,14 @@ ul.softwares li:hover a {
font-size: 1.4rem;
}
.roll-success {
font-size: 1.2rem;
font-weight: bold;
text-transform: uppercase;
margin-top: 1rem;
text-align: center;
}
.mgt2 nav.horizontal-tabs {
color: var(--mgt2-color-primary);
background: var(--mgt2-bgcolor-primary);
@@ -932,6 +1003,14 @@ ul.softwares li:hover a {
border-bottom: 0;
}
.table-container.editable .table-row {
margin-top: 4px;
}
.table-container.editable .table-row:last-child {
margin-bottom: 4px;
}
.item-options {
position: absolute;
top: 0.7rem;

View File

@@ -1,13 +1,14 @@
{
"id": "mgt2",
"version": "0.1.1",
"version": "0.1.2",
"title": "MGT2 - Mongoose Traveller (Unofficial)",
"description": "An unofficial implementation of Mongoose Publishing Traveller. Traveller is the property of Mongoose Publishing, and can be purchased at https://www.mongoosepublishing.com",
"description": "An unofficial implementation of Mongoose Publishing Traveller (VO/VF). Traveller is the property of Mongoose Publishing, and can be purchased at https://www.mongoosepublishing.com",
"background": "systems/mgt2/assets/screens/rosette-nebula-ngc2239-hoo.webp",
"url": "https://github.com/JDR-Ninja/foundryvtt-mgt2",
"manifest": "https://github.com/JDR-Ninja/foundryvtt-mgt2/releases/latest/download/system.json",
"readme": "https://raw.githubusercontent.com/JDR-Ninja/foundryvtt-mgt2/main/README.md",
"download": "https://github.com/JDR-Ninja/foundryvtt-mgt2/releases/download/v0.1.1/mgt2.zip",
"download": "https://github.com/JDR-Ninja/foundryvtt-mgt2/releases/download/v0.1.2/mgt2.zip",
"changelog": "https://raw.githubusercontent.com/JDR-Ninja/foundryvtt-mgt2/main/CHANGELOG.md",
"authors": [
{
"name": "JdR Ninja",
@@ -15,8 +16,12 @@
"discord": "jdr.ninja"
}
],
"esmodules": ["mgt2.bundle.js"],
"styles": ["styles/mgt2.min.css"],
"esmodules": [
"mgt2.bundle.js"
],
"styles": [
"styles/mgt2.min.css"
],
"packs": [],
"languages": [
{

View File

@@ -0,0 +1,749 @@
<form class="{{cssClass}} flexcol" autocomplete="off" style="align-content: flex-start;align-items: baseline;overflow: hidden;height: 100%;">
<nav class="sheet-sidebar tabs" data-group="sidebar">
<!-- <a class="item tab-select" data-tab="personal" title="Personal"><i class="fa-solid fa-id-card"></i></a> -->
<a class="item tab-select" data-tab="health" title="{{ localize 'MGT2.Actor.Health' }}"><i class="fa-solid fa-heart-pulse"></i></a>
<a class="item tab-select" data-tab="skills" title="{{ localize 'MGT2.Actor.TabSkills' }}"><i class="fa-solid fa-head-side"></i></a>
<a class="item tab-select" data-tab="inventory" title="{{ localize 'MGT2.Actor.Inventory' }}"><i class="fa-solid fa-briefcase-blank"></i></a>
<a class="item tab-select" data-tab="relations" title="{{ localize 'MGT2.Actor.Contacts' }}"><i class="fa-solid fa-users"></i></a>
<a class="item tab-select" data-tab="notes" title="{{ localize 'MGT2.Actor.Notes' }}"><i class="fa-solid fa-books"></i></a>
<a class="item tab-select" data-tab="biography" title="{{ localize 'MGT2.Actor.Biography' }}"><i class="fa-solid fa-book-user"></i></a>
</nav>
<section class="character-header">
<div class="character-header-img">
<img class="profile" src="{{img}}" data-edit="img" title="{{name}}" height="130" width="100" />
</div>
<div class="character-header-body">
<input class="field-name" name="name" type="text" value="{{name}}" />
<ul class="character-summary">
{{#if (and settings.usePronouns settings.useGender)}}
<li class="w1-10"><input name="system.personal.pronouns" type="text" value="{{system.personal.pronouns}}" placeholder="{{ localize 'MGT2.Actor.PlaceholderPRONOUNS' }}" /></li>
<li class="w1-10"><input name="system.personal.gender" type="text" value="{{system.personal.gender}}" placeholder="{{ localize 'MGT2.Actor.PlaceholderGENDER' }}" /></li>
<li class="w4-10"><input name="system.personal.title" type="text" value="{{system.personal.title}}" placeholder="{{ localize 'MGT2.Actor.PlaceholderTITLE' }}" /></li>
{{else if settings.usePronouns}}
<li class="w5-10"><input name="system.personal.pronouns" type="text" value="{{system.personal.pronouns}}" placeholder="{{ localize 'MGT2.Actor.PlaceholderPRONOUNS' }}" /></li>
<li class="w4-10"><input name="system.personal.title" type="text" value="{{system.personal.title}}" placeholder="{{ localize 'MGT2.Actor.PlaceholderTITLE' }}" /></li>
{{else if settings.useGender}}
<li class="w1-10"><input name="system.personal.gender" type="text" value="{{system.personal.gender}}" placeholder="{{ localize 'MGT2.Actor.PlaceholderGENDER' }}" /></li>
<li class="w4-10"><input name="system.personal.title" type="text" value="{{system.personal.title}}" placeholder="{{ localize 'MGT2.Actor.PlaceholderTITLE' }}" /></li>
{{else}}
<li class="w5-10"><input name="system.personal.title" type="text" value="{{system.personal.title}}" placeholder="{{ localize 'MGT2.Actor.PlaceholderTITLE' }}" /></li>
{{/if}}
<li class="w2-10"><input name="system.personal.species" type="text" value="{{system.personal.species}}" placeholder="{{ localize 'MGT2.Actor.PlaceholderSPECIES' }}" /></li>
<li class="w1-10"><input name="system.personal.age" type="text" value="{{system.personal.age}}" placeholder="{{ localize 'MGT2.Actor.PlaceholderAGE' }}" /></li>
<li class="w2-10"><input name="system.personal.wup" type="text" value="{{system.personal.wup}}" placeholder="{{ localize 'MGT2.Actor.PlaceholderUCP' }}" /></li>
</ul>
<div class="flexrow">
<div class="w4-10">
<!-- FULL REST ICON -->
</div>
<div class="flex-fix">
<fieldset class="lifes">
<legend><a class="roll upcase" data-roll="initiative" tabindex='-1' style="display: inline-flex;"><i class="fa-solid fa-dice"></i>{{ localize 'MGT2.Actor.Initiative' }}</a></legend>
<div>{{showDM initiative}}</div>
</fieldset>
</div>
<div class="flex-fix">
{{#if settings.showLife}}
<fieldset class="lifes">
<legend class="upcase">{{ localize 'MGT2.Actor.Life' }}</legend>
<div>{{system.life.value}}{{#if (gt system.life.max 0) }}/{{system.life.max}}{{/if}}</div>
</fieldset>
{{/if}}
</div>
<div class="flex-fix">
<fieldset class="lifes">
<legend class="upcase">{{ localize 'MGT2.Actor.Armor' }}</legend>
<div>{{system.inventory.armor}}</div>
</fieldset>
</div>
<div class="w4-10">
<fieldset style="margin:0;padding: 0 1rem;">
<legend class="upcase">{{ localize 'MGT2.Actor.States' }}</legend>
<ul class="character-states">
<li><label title="{{ localize 'MGT2.Actor.EncumbranceHint' }}">{{ localize 'MGT2.Actor.Encumbrance' }}</label><input type="checkbox" class="checkbox-small" {{checked system.states.encumbrance}} readonly disabled /></label></li>
<li><label title="{{ localize 'MGT2.Actor.FatigueHint' }}">{{ localize 'MGT2.Actor.Fatigue' }}</label><input type="checkbox" class="checkbox-small" name="system.states.fatigue" data-dtype="Boolean" {{checked system.states.fatigue}} /></label></li>
<li><label title="{{ localize 'MGT2.Actor.SurgeryRequiredHint' }}">{{ localize 'MGT2.Actor.SurgeryRequired' }}</label><input type="checkbox" class="checkbox-small" name="system.states.surgeryRequired" data-dtype="Boolean" {{checked system.states.surgeryRequired}} /></li>
<!-- <li><label>Unconscious</label><input type="checkbox" class="checkbox-small" name="system.states.unconscious" data-dtype="Boolean" {{checked system.states.unconscious}} /></li> -->
</ul>
</fieldset>
</div>
</div>
</div>
</section>
<div style="height: 100%;overflow: hidden;display: flex;flex-direction: row;width: 100%;justify-content: flex-start;align-items: flex-start;">
<div class="characteristics">
<nav class="horizontal-tabs tabs" data-group="characteristics" style="border-right: 7px double #fff;">
<a class="item tab-select" data-tab="core">{{ localize 'MGT2.Actor.TabCore' }}</a>
<a class="item tab-select" data-tab="other">{{ localize 'MGT2.Actor.TabOthers' }}</a>
</nav>
<section class="characteristics-panel">
<div class="tab" data-group="characteristics" data-tab="core">
{{#if system.characteristics.strength.show}}
<div class="characteristic-label"><a class="roll" data-roll="characteristic" data-roll-characteristic="strength" tabindex='-1'><i class="fa-solid fa-dice"></i></a>{{ localize 'MGT2.Characteristics.strength.name' }}<a class="cfg-characteristic" data-cfg-characteristic="strength" title="Configure"><i class="fa-solid fa-gear"></i></a></div>
{{#if system.characteristics.strength.showMax}}
<div class="characteristic-minmax">
<div class="minmaxwrapper">
<input type="text" maxlength="2" name="system.characteristics.strength.value" value="{{system.characteristics.strength.value}}" data-dtype="Number" /><span>|</span><input type="text" maxlength="2" name="system.characteristics.strength.max" value="{{system.characteristics.strength.max}}" />
</div>
<input class="characteristic-dm" type="text" maxlength="2" value="{{#if (gt system.characteristics.strength.dm 0)}}+{{/if}}{{system.characteristics.strength.dm}}" readonly tabindex='-1' />
</div>
{{else}}
<div class="characteristic-row">
<input class="characteristic-input" type="text" maxlength="2" name="system.characteristics.strength.value" value="{{system.characteristics.strength.value}}" />
<input class="characteristic-dm" type="text" maxlength="2" value="{{#if (gt system.characteristics.strength.dm 0)}}+{{/if}}{{system.characteristics.strength.dm}}" readonly tabindex='-1' />
</div>
{{/if}}
{{/if}}
{{#if system.characteristics.dexterity.show}}
<div class="characteristic-label mt-1"><a class="roll" data-roll="characteristic" data-roll-characteristic="dexterity" tabindex='-1'><i class="fa-solid fa-dice"></i></a>{{ localize 'MGT2.Characteristics.dexterity.name' }}<a class="cfg-characteristic" data-cfg-characteristic="dexterity" title="Configure"><i class="fa-solid fa-gear"></i></a></div>
{{#if system.characteristics.dexterity.showMax}}
<div class="characteristic-minmax">
<div class="minmaxwrapper">
<input type="text" maxlength="2" name="system.characteristics.dexterity.value" value="{{system.characteristics.dexterity.value}}" /><span>|</span><input type="text" maxlength="2" name="system.characteristics.dexterity.max" value="{{system.characteristics.dexterity.max}}" />
</div>
<input class="characteristic-dm" type="text" maxlength="2" value="{{#if (gt system.characteristics.dexterity.dm 0)}}+{{/if}}{{system.characteristics.dexterity.dm}}" readonly tabindex='-1' />
</div>
{{else}}
<div class="characteristic-row">
<input class="characteristic-input" type="text" maxlength="2" name="system.characteristics.dexterity.value" value="{{system.characteristics.dexterity.value}}" />
<input class="characteristic-dm" type="text" maxlength="2" value="{{#if (gt system.characteristics.dexterity.dm 0)}}+{{/if}}{{system.characteristics.dexterity.dm}}" readonly tabindex='-1' />
</div>
{{/if}}
{{/if}}
{{#if system.characteristics.endurance.show}}
<div class="characteristic-label mt-1"><a class="roll" data-roll="characteristic" data-roll-characteristic="endurance" tabindex='-1'><i class="fa-solid fa-dice"></i></a>{{ localize 'MGT2.Characteristics.endurance.name' }}<a class="cfg-characteristic" data-cfg-characteristic="endurance" title="Configure"><i class="fa-solid fa-gear"></i></a></div>
{{#if system.characteristics.endurance.showMax}}
<div class="characteristic-minmax">
<div class="minmaxwrapper">
<input type="text" maxlength="2" name="system.characteristics.endurance.value" value="{{system.characteristics.endurance.value}}" /><span>|</span><input type="text" maxlength="2" name="system.characteristics.endurance.max" value="{{system.characteristics.endurance.max}}" />
</div>
<input class="characteristic-dm" type="text" maxlength="2" value="{{#if (gt system.characteristics.endurance.dm 0)}}+{{/if}}{{system.characteristics.endurance.dm}}" readonly tabindex='-1' />
</div>
{{else}}
<div class="characteristic-row">
<input class="characteristic-input" type="text" maxlength="2" name="system.characteristics.endurance.value" value="{{system.characteristics.endurance.value}}" />
<input class="characteristic-dm" type="text" maxlength="2" value="{{#if (gt system.characteristics.endurance.dm 0)}}+{{/if}}{{system.characteristics.endurance.dm}}" readonly tabindex='-1' />
</div>
{{/if}}
{{/if}}
{{#if system.characteristics.intellect.show}}
<div class="characteristic-label mt-1"><a class="roll" data-roll="characteristic" data-roll-characteristic="intellect" tabindex='-1'><i class="fa-solid fa-dice"></i></a>{{ localize 'MGT2.Characteristics.intellect.name' }}<a class="cfg-characteristic" data-cfg-characteristic="intellect" title="Configure"><i class="fa-solid fa-gear"></i></a></div>
{{#if system.characteristics.intellect.showMax}}
<div class="characteristic-minmax">
<div class="minmaxwrapper">
<input type="text" maxlength="2" name="system.characteristics.intellect.value" value="{{system.characteristics.intellect.value}}" /><span>|</span><input type="text" maxlength="2" name="system.characteristics.intellect.max" value="{{system.characteristics.intellect.max}}" />
</div>
<input class="characteristic-dm" type="text" maxlength="2" value="{{#if (gt system.characteristics.intellect.dm 0)}}+{{/if}}{{system.characteristics.intellect.dm}}" readonly tabindex='-1' />
</div>
{{else}}
<div class="characteristic-row">
<input class="characteristic-input" type="text" maxlength="2" name="system.characteristics.intellect.value" value="{{system.characteristics.intellect.value}}" />
<input class="characteristic-dm" type="text" maxlength="2" value="{{#if (gt system.characteristics.intellect.dm 0)}}+{{/if}}{{system.characteristics.intellect.dm}}" readonly tabindex='-1' />
</div>
{{/if}}
{{/if}}
{{#if system.characteristics.education.show}}
<div class="characteristic-label mt-1"><a class="roll" data-roll="characteristic" data-roll-characteristic="education" tabindex='-1'><i class="fa-solid fa-dice"></i></a>{{ localize 'MGT2.Characteristics.education.name' }}<a class="cfg-characteristic" data-cfg-characteristic="education" title="Configure"><i class="fa-solid fa-gear"></i></a></div>
{{#if system.characteristics.education.showMax}}
<div class="characteristic-minmax">
<div class="minmaxwrapper">
<input type="text" maxlength="2" name="system.characteristics.education.value" value="{{system.characteristics.education.value}}" /><span>|</span><input type="text" maxlength="2" name="system.characteristics.education.max" value="{{system.characteristics.education.max}}" />
</div>
<input class="characteristic-dm" type="text" maxlength="2" value="{{#if (gt system.characteristics.education.dm 0)}}+{{/if}}{{system.characteristics.education.dm}}" readonly tabindex='-1' />
</div>
{{else}}
<div class="characteristic-row">
<input class="characteristic-input" type="text" maxlength="2" name="system.characteristics.education.value" value="{{system.characteristics.education.value}}" />
<input class="characteristic-dm" type="text" maxlength="2" value="{{#if (gt system.characteristics.education.dm 0)}}+{{/if}}{{system.characteristics.education.dm}}" readonly tabindex='-1' />
</div>
{{/if}}
{{/if}}
{{#if system.characteristics.social.show}}
<div class="characteristic-label mt-1"><a class="roll" data-roll="characteristic" data-roll-characteristic="social" tabindex='-1'><i class="fa-solid fa-dice"></i></a>{{ localize 'MGT2.Characteristics.social.name' }}<a class="cfg-characteristic" data-cfg-characteristic="social" title="Configure"><i class="fa-solid fa-gear"></i></a></div>
{{#if system.characteristics.social.showMax}}
<div class="characteristic-minmax">
<div class="minmaxwrapper">
<input type="text" maxlength="2" name="system.characteristics.social.value" value="{{system.characteristics.social.value}}" /><span>|</span><input type="text" maxlength="2" name="system.characteristics.social.max" value="{{system.characteristics.social.max}}" />
</div>
<input class="characteristic-dm" type="text" maxlength="2" value="{{#if (gt system.characteristics.social.dm 0)}}+{{/if}}{{system.characteristics.social.dm}}" readonly tabindex='-1' />
</div>
{{else}}
<div class="characteristic-row">
<input class="characteristic-input" type="text" maxlength="2" name="system.characteristics.social.value" value="{{system.characteristics.social.value}}" />
<input class="characteristic-dm" type="text" maxlength="2" value="{{#if (gt system.characteristics.social.dm 0)}}+{{/if}}{{system.characteristics.social.dm}}" readonly tabindex='-1' />
</div>
{{/if}}
{{/if}}
</div>
<div class="tab" data-group="characteristics" data-tab="other">
{{#if system.characteristics.morale.show}}
<div class="characteristic-label"><a class="roll" data-roll="characteristic" data-roll-characteristic="morale" tabindex='-1'><i class="fa-solid fa-dice"></i></a>{{ localize 'MGT2.Characteristics.morale.name' }}<a class="cfg-characteristic" data-cfg-characteristic="morale" title="Configure"><i class="fa-solid fa-gear"></i></a></div>
{{#if system.characteristics.morale.showMax}}
<div class="characteristic-minmax">
<div class="minmaxwrapper">
<input type="text" maxlength="2" name="system.characteristics.morale.value" value="{{system.characteristics.morale.value}}" /><span>|</span><input type="text" maxlength="2" name="system.characteristics.morale.max" value="{{system.characteristics.morale.max}}" />
</div>
<input class="characteristic-dm" type="text" maxlength="2" value="{{#if (gt system.characteristics.morale.dm 0)}}+{{/if}}{{system.characteristics.morale.dm}}" readonly tabindex='-1' />
</div>
{{else}}
<div class="characteristic-row">
<input class="characteristic-input" type="text" maxlength="2" name="system.characteristics.morale.value" value="{{system.characteristics.morale.value}}" />
<input class="characteristic-dm" type="text" maxlength="2" value="{{#if (gt system.characteristics.morale.dm 0)}}+{{/if}}{{system.characteristics.morale.dm}}" readonly tabindex='-1' />
</div>
{{/if}}
{{/if}}
{{#if system.characteristics.luck.show}}
<div class="characteristic-label mt-1"><a class="roll" data-roll="characteristic" data-roll-characteristic="luck" tabindex='-1'><i class="fa-solid fa-dice"></i></a>{{ localize 'MGT2.Characteristics.luck.name' }}<a class="cfg-characteristic" data-cfg-characteristic="luck" title="Configure"><i class="fa-solid fa-gear"></i></a></div>
{{#if system.characteristics.luck.showMax}}
<div class="characteristic-minmax">
<div class="minmaxwrapper">
<input type="text" maxlength="2" name="system.characteristics.luck.value" value="{{system.characteristics.luck.value}}" /><span>|</span><input type="text" maxlength="2" name="system.characteristics.luck.max" value="{{system.characteristics.luck.max}}" />
</div>
<input class="characteristic-dm" type="text" maxlength="2" value="{{#if (gt system.characteristics.luck.dm 0)}}+{{/if}}{{system.characteristics.luck.dm}}" readonly tabindex='-1' />
</div>
{{else}}
<div class="characteristic-row">
<input class="characteristic-input" type="text" maxlength="2" name="system.characteristics.luck.value" value="{{system.characteristics.luck.value}}" />
<input class="characteristic-dm" type="text" maxlength="2" value="{{#if (gt system.characteristics.luck.dm 0)}}+{{/if}}{{system.characteristics.luck.dm}}" readonly tabindex='-1' />
</div>
{{/if}}
{{/if}}
{{#if system.characteristics.sanity.show}}
<div class="characteristic-label mt-1"><a class="roll" data-roll="characteristic" data-roll-characteristic="sanity" tabindex='-1'><i class="fa-solid fa-dice"></i></a>{{ localize 'MGT2.Characteristics.sanity.name' }}<a class="cfg-characteristic" data-cfg-characteristic="sanity" title="Configure"><i class="fa-solid fa-gear"></i></a></div>
{{#if system.characteristics.sanity.showMax}}
<div class="characteristic-minmax">
<div class="minmaxwrapper">
<input type="text" maxlength="2" name="system.characteristics.sanity.value" value="{{system.characteristics.sanity.value}}" /><span>|</span><input type="text" maxlength="2" name="system.characteristics.sanity.max" value="{{system.characteristics.sanity.max}}" />
</div>
<input class="characteristic-dm" type="text" maxlength="2" value="{{#if (gt system.characteristics.sanity.dm 0)}}+{{/if}}{{system.characteristics.sanity.dm}}" readonly tabindex='-1' />
</div>
{{else}}
<div class="characteristic-row">
<input class="characteristic-input" type="text" maxlength="2" name="system.characteristics.sanity.value" value="{{system.characteristics.sanity.value}}" />
<input class="characteristic-dm" type="text" maxlength="2" value="{{#if (gt system.characteristics.sanity.dm 0)}}+{{/if}}{{system.characteristics.sanity.dm}}" readonly tabindex='-1' />
</div>
{{/if}}
{{/if}}
{{#if system.characteristics.charm.show}}
<div class="characteristic-label mt-1"><a class="roll" data-roll="characteristic" data-roll-characteristic="charm" tabindex='-1'><i class="fa-solid fa-dice"></i></a>{{ localize 'MGT2.Characteristics.charm.name' }}<a class="cfg-characteristic" data-cfg-characteristic="charm" title="Configure"><i class="fa-solid fa-gear"></i></a></div>
{{#if system.characteristics.charm.showMax}}
<div class="characteristic-minmax">
<div class="minmaxwrapper">
<input type="text" maxlength="2" name="system.characteristics.charm.value" value="{{system.characteristics.charm.value}}" /><span>|</span><input type="text" maxlength="2" name="system.characteristics.charm.max" value="{{system.characteristics.charm.max}}" />
</div>
<input class="characteristic-dm" type="text" maxlength="2" value="{{#if (gt system.characteristics.charm.dm 0)}}+{{/if}}{{system.characteristics.charm.dm}}" readonly tabindex='-1' />
</div>
{{else}}
<div class="characteristic-row">
<input class="characteristic-input" type="text" maxlength="2" name="system.characteristics.charm.value" value="{{system.characteristics.charm.value}}" />
<input class="characteristic-dm" type="text" maxlength="2" value="{{#if (gt system.characteristics.charm.dm 0)}}+{{/if}}{{system.characteristics.charm.dm}}" readonly tabindex='-1' />
</div>
{{/if}}
{{/if}}
{{#if system.characteristics.psionic.show}}
<div class="characteristic-label mt-1"><a class="roll" data-roll="characteristic" data-roll-characteristic="psionic" tabindex='-1'><i class="fa-solid fa-dice"></i></a>{{ localize 'MGT2.Characteristics.psionic.name' }}<a class="cfg-characteristic" data-cfg-characteristic="psionic" title="Configure"><i class="fa-solid fa-gear"></i></a></div>
{{#if system.characteristics.psionic.showMax}}
<div class="characteristic-minmax">
<div class="minmaxwrapper">
<input type="text" maxlength="2" name="system.characteristics.psionic.value" value="{{system.characteristics.psionic.value}}" /><span>|</span><input type="text" maxlength="2" name="system.characteristics.psionic.max" value="{{system.characteristics.psionic.max}}" />
</div>
<input class="characteristic-dm" type="text" maxlength="2" value="{{#if (gt system.characteristics.psionic.dm 0)}}+{{/if}}{{system.characteristics.psionic.dm}}" readonly tabindex='-1' />
</div>
{{else}}
<div class="characteristic-row">
<input class="characteristic-input" type="text" maxlength="2" name="system.characteristics.psionic.value" value="{{system.characteristics.psionic.value}}" />
<input class="characteristic-dm" type="text" maxlength="2" value="{{#if (gt system.characteristics.psionic.dm 0)}}+{{/if}}{{system.characteristics.psionic.dm}}" readonly tabindex='-1' />
</div>
{{/if}}
{{/if}}
{{#if system.characteristics.other.show}}
<div class="characteristic-label mt-1"><a class="roll" data-roll="characteristic" data-roll-characteristic="other" tabindex='-1'><i class="fa-solid fa-dice"></i></a>{{ localize 'MGT2.Characteristics.other.name' }}<a class="cfg-characteristic" data-cfg-characteristic="other" title="Configure"><i class="fa-solid fa-gear"></i></a></div>
{{#if system.characteristics.other.showMax}}
<div class="characteristic-minmax">
<div class="minmaxwrapper">
<input type="text" maxlength="2" name="system.characteristics.other.value" value="{{system.characteristics.other.value}}" /><span>|</span><input type="text" maxlength="2" name="system.characteristics.other.max" value="{{system.characteristics.other.max}}" />
</div>
<input class="characteristic-dm" type="text" maxlength="2" value="{{#if (gt system.characteristics.other.dm 0)}}+{{/if}}{{system.characteristics.other.dm}}" readonly tabindex='-1' />
</div>
{{else}}
<div class="characteristic-row">
<input class="characteristic-input" type="text" maxlength="2" name="system.characteristics.other.value" value="{{system.characteristics.other.value}}" />
<input class="characteristic-dm" type="text" maxlength="2" value="{{#if (gt system.characteristics.other.dm 0)}}+{{/if}}{{system.characteristics.other.dm}}" readonly tabindex='-1' />
</div>
{{/if}}
{{/if}}
</div>
</section>
</div>
<div class="tab w100" data-group="sidebar" data-tab="health">
<div class="header upcase">{{ localize 'MGT2.Actor.Health' }}</div>
<div class="field-group mb-1">
<label class="upcase">{{ localize 'MGT2.Actor.Rads' }}</label>
<input class="field" name="system.health.radiations" type="text" value="{{system.health.radiations}}" />
</div>
<div class="table-container">
<div class="table-row heading color-1">
<div class="row-item row-item-30 row-item-left upcase">{{ localize 'MGT2.Actor.Wounds' }}</div>
<div class="row-item row-item-center">{{ localize 'MGT2.Items.Difficulty' }}</div>
<div class="row-item row-item-center">{{ localize 'MGT2.Items.Damage' }}</div>
<div class="row-item row-item-center">{{ localize 'MGT2.Items.Interval' }}</div>
<div class="row-item row-item row-item-15 item-controls flex-fix"><a class="item-create" data-type-item="disease" data-subtype="wound" data-create-name="{{ localize 'MGT2.Actor.NewWound' }}" title="{{ localize 'MGT2.Actor.AddWound' }}"><i class="fas fa-plus"></i></a></div>
</div>
{{#each wounds as |wound id|}}
<div class="table-row item" data-item-id="{{wound._id}}" role="rowgroup">
<div class="row-item row-item-30 row-item-left">{{wound.name}}</div>
<div class="row-item row-item-center">{{wound.system.difficulty}}</div>
<div class="row-item row-item-center">{{wound.system.damage}}</div>
<div class="row-item row-item-center">{{wound.system.interval}}</div>
<div class="row-item row-item row-item-15 item-controls flex-fix">
<a class="item-control item-edit" title="{{ localize 'MGT2.Actor.EditWound' }}"><i class="fas fa-edit"></i></a>
<a class="item-control item-delete" title="{{ localize 'MGT2.Actor.DeleteWound' }}"><i class="fas fa-trash"></i></a>
</div>
</div>
{{/each}}
</div>
<div class="table-container">
<div class="table-row heading color-1">
<div class="row-item row-item-30 row-item-left upcase">{{ localize 'MGT2.Items.Diseases' }}</div>
<div class="row-item row-item-center">{{ localize 'MGT2.Items.Difficulty' }}</div>
<div class="row-item row-item-center">{{ localize 'MGT2.Items.Damage' }}</div>
<div class="row-item row-item-center">{{ localize 'MGT2.Items.Interval' }}</div>
<div class="row-item row-item row-item-15 item-controls flex-fix"><a class="item-create" data-type-item="disease" data-subtype="disease" data-create-name="{{ localize 'MGT2.Actor.NewDisease' }}" title="{{ localize 'MGT2.Actor.AddDisease' }}"><i class="fas fa-plus"></i></a></div>
</div>
{{#each diseases as |disease id|}}
<div class="table-row item" data-item-id="{{disease._id}}" role="rowgroup">
<div class="row-item row-item-30 row-item-left"><a data-roll="disease" data-item-id="{{disease._id}}"><i class="fa-solid fa-dice"></i></a>{{disease.name}}</div>
<div class="row-item row-item-center">{{disease.system.difficulty}}</div>
<div class="row-item row-item-center">{{disease.system.damage}}</div>
<div class="row-item row-item-center">{{disease.system.interval}}</div>
<div class="row-item row-item row-item-15 item-controls flex-fix">
<a class="item-control item-edit" title="{{ localize 'MGT2.Actor.EditDisease' }}"><i class="fas fa-edit"></i></a>
<a class="item-control item-delete" title="{{ localize 'MGT2.Actor.DeleteDisease' }}"><i class="fas fa-trash"></i></a>
</div>
</div>
{{/each}}
</div>
</div>
<div class="tab w100 tab-scroll" data-group="sidebar" data-tab="skills">
<div class="header upcase">{{ localize 'MGT2.Actor.TabSkills' }}</div>
<div class="species"><a title="Description longue"><i class="fa-solid fa-book"></i></a>{{system.personal.speciesText.description}}</div>
<div class="table-container">
<div class="table-row heading color-1">
<div class="row-item row-item-15 row-item-left upcase">{{ localize 'MGT2.Items.Trait' }}</div>
<div class="row-item row-item-left">{{ localize 'MGT2.Items.Description' }}</div>
<div class="row-item row-item row-item-15 item-controls flex-fix"><a class="traits-create"><i class="fas fa-plus"></i></a></div>
</div>
{{#each system.personal.traits as |trait i| }}
<div class="table-row traits-part" data-traits-part="{{i}}" role="rowgroup">
<div class="row-item row-item-15 row-item-left">{{trait.name}}</div>
<div class="row-item row-item-left">{{trait.description}}</div>
<div class="row-item row-item row-item-15 item-controls flex-fix">
<a class="item-control traits-edit" title="{{ localize 'MGT2.Actor.EditTrait' }}"><i class="fas fa-edit"></i></a>
<a class="item-control traits-delete" title="Delete Trait"><i class="fas fa-trash"></i></a>
</div>
</div>
{{/each}}
</div>
<div class="header upcase">{{ localize 'MGT2.Actor.StudyPeriod' }}</div>
<div class="fields mb-1">
<div class="field-group" style="flex: 2 1 auto;">
<label class="upcase">{{ localize 'MGT2.Actor.TrainingInSkill' }}</label>
<input class="field" name="system.study.skill" type="text" value="{{system.study.skill}}" />
</div>
<div class="field-group" style="flex: 1 1 0%;">
<label>{{ localize 'MGT2.Actor.Completed' }}</label>
<input class="field" name="system.study.completed" type="number" value="{{system.study.completed}}" />
</div>
<div class="field-group" style="flex: 1 1 0%;">
<label class="upcase">{{ localize 'MGT2.Actor.Weeks' }}</label>
<input class="field" name="system.study.total" type="number" value="{{system.study.total}}" />
</div>
</div>
<div class="table-container">
<div class="table-row heading color-1">
<div class="row-item row-item-30 row-item-left">{{ localize 'MGT2.Items.Careers' }}</div>
<div class="row-item row-item-center">{{ localize 'MGT2.Items.Terms' }}</div>
<div class="row-item row-item-center">{{ localize 'MGT2.Items.Rank' }}</div>
<div class="row-item row-item row-item-15 item-controls flex-fix"><a class="item-create" data-type-item="career" data-create-name="{{ localize 'MGT2.Actor.NewCareer' }}" title="{{ localize 'MGT2.Actor.AddCareer' }}"><i class="fas fa-plus"></i></a></div>
</div>
{{#each careers as |career id|}}
<div class="table-row item" data-item-id="{{career._id}}" role="rowgroup">
<div class="row-item row-item-30 row-item-left">{{career.name}}</div>
<div class="row-item row-item-center">{{career.system.terms}}</div>
<div class="row-item row-item-center">{{career.system.rank}}</div>
<div class="row-item row-item row-item-15 item-controls flex-fix">
<a class="item-control item-edit" title="{{ localize 'MGT2.Actor.EditCareer' }}"><i class="fas fa-edit"></i></a>
<a class="item-control item-delete" title="{{ localize 'MGT2.Actor.DeleteCareer' }}"><i class="fas fa-trash"></i></a>
</div>
</div>
{{/each}}
</div>
<div class="table-container">
<div class="table-row heading color-1">
<div class="row-item row-item-30 row-item-left flex-fix">{{ localize 'MGT2.Actor.Skills' }}</div>
<div class="row-item row-item-center">{{ localize 'MGT2.Items.Level' }}</div>
<div class="row-item row-item row-item-15 item-controls flex-fix"><a class="item-create" data-type-item="talent" data-subtype="skill" data-create-name="{{ localize 'MGT2.Actor.NewSkill' }}" title="{{ localize 'MGT2.Actor.AddSkill' }}"><i class="fas fa-plus"></i></a></div>
</div>
{{#each skills as |skill id|}}
<div class="table-row" data-item-id="{{skill._id}}" role="rowgroup">
<div class="row-item row-item-30 row-item-left flex-fix">
<a data-roll="skill" data-roll-skill="{{skill._id}}"><i class="fa-solid fa-dice"></i></a>{{skill.name}}{{#if skill.system.skill.speciality}} ({{skill.system.skill.speciality}}){{/if}}
</div>
<div class="row-item row-item-center">{{skill.system.level}}</div>
<div class="row-item item-controls">
<a class="item-control item-edit" title="{{ localize 'MGT2.Actor.EditSkill' }}"><i class="fas fa-edit"></i></a>
<a class="item-control item-delete" title="{{ localize 'MGT2.Actor.DeleteSkill' }}"><i class="fas fa-trash"></i></a>
</div>
</div>
{{/each}}
</div>
{{#if system.config.psionic}}
<div class="table-container">
<div class="table-row heading color-1">
<div class="row-item row-item-30 row-item-left upcase">{{ localize 'MGT2.Actor.PsionicTalents' }}</div>
<div class="row-item row-item-10 row-item-center flex-fix">{{ localize 'MGT2.Items.Level' }}</div>
<div class="row-item row-item-10 row-item-center flex-fix">{{ localize 'MGT2.Items.Cost' }}</div>
<div class="row-item row-item-10 row-item-center flex-fix">{{ localize 'MGT2.Items.Reach' }}</div>
<div class="row-item row-item-10 row-item-center flex-fix">{{ localize 'MGT2.Items.Difficulty' }}</div>
<div class="row-item row-item row-item-15 item-controls flex-fix"><a class="item-create" data-type-item="talent" data-subtype="psionic" data-create-name="{{ localize 'MGT2.Actor.NewPsionicTalent' }}" title="{{ localize 'MGT2.Actor.AddPsionicTalent' }}"><i class="fas fa-plus"></i></a></div>
</div>
{{#each psionics as |psionic id|}}
<div class="table-row" data-item-id="{{psionic._id}}" role="rowgroup">
<div class="row-item row-item-30 row-item-left">
<a data-roll="psionic" data-item-id="{{psionic._id}}"><i class="fa-solid fa-dice"></i></a>{{psionic.name}}
</div>
<div class="row-item row-item-10 row-item-center flex-fix">{{psionic.system.level}}</div>
<div class="row-item row-item-10 row-item-center flex-fix">{{psionic.system.psionic.cost}}</div>
<div class="row-item row-item-10 row-item-center flex-fix">{{psionic.system.psionic.reach}}</div>
<div class="row-item row-item-10 row-item-center flex-fix">{{psionic.system.psionic.difficulty}}</div>
<div class="row-item row-item row-item-15 item-controls flex-fix">
<a class="item-control item-edit" title="{{ localize 'MGT2.Items.EditPsionic' }}"><i class="fas fa-edit"></i></a>
<a class="item-control item-delete" title="{{ localize 'MGT2.Items.DeletePsionic' }}"><i class="fas fa-trash"></i></a>
</div>
</div>
{{/each}}
</div>
{{/if}}
</div>
<div class="tab w100 subTabs" data-group="sidebar" data-tab="inventory">
<nav class="horizontal-tabs tabs" data-group="inventory">
<a class="item tab-select" data-tab="onhand"><i class="fa-solid fa-person-walking-luggage"></i>{{ localize 'MGT2.Items.OnHand' }}</a>
<a class="item tab-select" data-tab="storage"><i class="fa-solid fa-treasure-chest"></i>{{ localize 'MGT2.Items.Storage' }}</a>
<a class="item tab-select" data-tab="finance"><i class="fa-solid fa-credit-card"></i>{{ localize 'MGT2.Actor.Finance' }}</a>
{{#if showTrash}}
<!-- <a class="item tab-select" data-tab="trash" style="flex-basis: 3rem;flex-grow: 0;" title="Trash"><i class="fa-solid fa-trash" style="margin: 0;"></i></a> -->
{{/if}}
</nav>
<div class="tab w100 tab-scroll" data-group="inventory" data-tab="onhand">
<div class="table-container mt-1">
<div class="table-row heading color-1">
<div class="row-item row-item-30 row-item-left upcase"><i class="fa-solid fa-gun"></i>{{ localize 'MGT2.Items.Weapons' }}</div>
<div class="row-item row-item-2 row-item-center">{{ localize 'MGT2.Items.Range' }}</div>
<div class="row-item row-item-20 row-item-center">{{ localize 'MGT2.Items.Damage' }}</div>
<div class="row-item row-item-2 row-item-right flex-fix">{{ localize 'MGT2.Items.Weight' }}</div>
<div class="row-item row-item-15 item-controls flex-fix"><a class="item-create" data-type-item="weapon" data-create-name="{{ localize 'MGT2.Actor.NewWeapon' }}" title="{{ localize 'MGT2.Actor.AddWeapon' }}"><i class="fas fa-plus"></i></a></div>
</div>
{{#each weapons as |weapon id|}}
<div class="table-row{{#if weapon.subInfo}} table-row-mb-4{{/if}} drag-item-list" data-item-id="{{weapon._id}}" role="rowgroup">
<div class="row-item row-item-30 row-item-left flex-3 row-large">
<a data-roll="item" data-item-id="{{weapon._id}}"><i class="fa-solid fa-dice"></i></a>{{weapon.name}}{{#if weapon.subInfo}}<div class="item-options">{{weapon.subInfo}}</div>{{/if}}
</div>
<div class="row-item row-item-2 row-item-center">{{weapon.range}}</div>
<div class="row-item row-item-20 row-item-center">{{weapon.system.damage}}</div>
<div class="row-item row-item-2 row-item-right flex-fix">{{weapon.weight}}</div>
<div class="row-item row-item-15 item-controls flex-fix">
<a class="item-control item-equip {{weapon.toggleClass}}" title="Equip"><i class="fa-solid fa-shield-halved"></i></a>
<a class="item-control item-storage-in" title="{{ localize 'MGT2.Actor.StoreItem' }}"><i class="fa-solid fa-inbox-in"></i></a>
<a class="item-control item-edit" title="{{ localize 'MGT2.Actor.EditWeapon' }}"><i class="fas fa-edit"></i></a>
<a class="item-control item-delete" title="{{ localize 'MGT2.Actor.DeleteWeapon' }}"><i class="fas fa-trash"></i></a>
</div>
</div>
{{/each}}
</div>
<div class="table-container">
<div class="table-row heading color-1">
<div class="row-item row-item-40 row-item-left upcase"><i class="fa-solid fa-shield"></i>{{ localize 'MGT2.Items.Armors' }}</div>
<div class="row-item row-item-10 row-item-center">{{ localize 'MGT2.Items.Rads' }}</div>
<div class="row-item row-item-10 row-item-center">{{ localize 'MGT2.Items.Protection' }}</div>
<div class="row-item row-item-2 row-item-right flex-fix">{{ localize 'MGT2.Items.Weight' }}</div>
<div class="row-item row-item-15 item-controls flex-fix"><a class="item-create" data-type-item="armor" data-create-name="{{ localize 'MGT2.Actor.NewArmor' }}" title="{{ localize 'MGT2.Actor.AddArmor' }}"><i class="fas fa-plus"></i></a></div>
</div>
{{#each armors as |armor id|}}
<div class="table-row{{#if armor.subInfo}} table-row-mb-4{{/if}} drag-item-list" data-item-id="{{armor._id}}" role="rowgroup">
<div class="row-item row-item-40 row-item-left">
<a data-roll="item" data-item-id="{{armor._id}}"><i class="fa-solid fa-dice"></i></a>{{armor.name}}{{#if armor.subInfo}}<div class="item-options">{{armor.subInfo}}</div>{{/if}}
</div>
<div class="row-item row-item-10 row-item-center">{{armor.system.radiations}}</div>
<div class="row-item row-item-10 row-item-center">{{armor.system.protection}}</div>
<div class="row-item row-item-2 row-item-right flex-fix">{{armor.weight}}</div>
<div class="row-item row-item-15 item-controls flex-fix">
<a class="item-control item-equip {{armor.toggleClass}}" title="Equip"><i class="fa-solid fa-shield-halved"></i></a>
<a class="item-control item-storage-in" title="{{ localize 'MGT2.Actor.StoreItem' }}"><i class="fa-solid fa-inbox-in"></i></a>
<a class="item-control item-edit" title="{{ localize 'MGT2.Actor.EditArmor' }}"><i class="fas fa-edit"></i></a>
<a class="item-control item-delete" title="{{ localize 'MGT2.Actor.DeleteArmor' }}"><i class="fas fa-trash"></i></a>
</div>
</div>
{{/each}}
</div>
<div class="table-container">
<div class="table-row heading color-1">
<div class="row-item row-item-30 row-item-left upcase"><i class="fa-solid fa-brain-circuit"></i>{{ localize 'MGT2.Actor.Augments' }}</div>
<div class="row-item row-item-40 row-item-left">{{ localize 'MGT2.Items.Improvement' }}</div>
<div class="row-item row-item-15 item-controls flex-fix"><a class="item-create" data-type-item="equipment" data-subtype="augment" data-create-name="{{ localize 'MGT2.Actor.NewAugment' }}" title="{{ localize 'MGT2.Actor.AddAugment' }}"><i class="fas fa-plus"></i></a></div>
</div>
{{#each augments as |augment id|}}
<div class="table-row drag-item-list" data-item-id="{{augment._id}}" role="rowgroup">
<div class="row-item row-item-30 row-item-left">{{augment.name}}</div>
<div class="row-item row-item-40 row-item-left">{{augment.system.improvement}}</div>
<div class="row-item row-item-15 item-controls flex-fix">
<a class="item-control item-equip {{augment.toggleClass}}" title="Equip"><i class="fa-solid fa-shield-halved"></i></a>
<a class="item-control item-storage-in" title="{{ localize 'MGT2.Actor.StoreItem' }}"><i class="fa-solid fa-inbox-in"></i></a>
<a class="item-control item-edit" title="{{ localize 'MGT2.Actor.EditAugment' }}"><i class="fas fa-edit"></i></a>
<a class="item-control item-delete" title="{{ localize 'MGT2.Actor.DeleteAugment' }}"><i class="fas fa-trash"></i></a>
</div>
</div>
{{/each}}
</div>
<div class="table-container">
<div class="table-row heading color-1">
<div class="row-item row-item-50 row-item-left upcase"><i class="fa-solid fa-tablet-screen"></i>{{ localize 'MGT2.Items.Computers' }}</div>
<div class="row-item row-item-2 row-item-center"><i class="fa-solid fa-bolt-lightning"></i></div>
<div class="row-item row-item-2 row-item-right flex-fix">{{ localize 'MGT2.Items.Weight' }}</div>
<div class="row-item row-item-15 item-controls flex-fix"><a class="item-create" data-type-item="computer" data-create-name="{{ localize 'MGT2.Actor.NewComputer' }}" title="{{ localize 'MGT2.Actor.AddComputer' }}"><i class="fas fa-plus"></i></a></div>
</div>
{{#each computers as |computer id|}}
<div class="table-row drop-item-list" data-item-id="{{computer._id}}" role="rowgroup">
<div class="row-item row-item-50 row-item-left">
<a data-roll="item" data-item-id="{{computer._id}}"><i class="fa-solid fa-dice"></i></a>{{computer.name}}{{#if computer.subInfo}}<div class="item-options">{{computer.subInfo}}</div>{{/if}}
</div>
<div class="row-item row-item-2 row-item-center {{overloadClass}}">{{computer.system.processingUsed}}/{{computer.system.processing}}
{{#if computer.system.overload}}<a title="Overload"><i class="fa-solid fa-triangle-exclamation"></i></a>{{/if}}
</div>
<div class="row-item row-item-2 row-item-right flex-fix">{{computer.weight}}</div>
<div class="row-item row-item-15 item-controls flex-fix">
<a class="item-control item-equip {{computer.toggleClass}}" title="Equip"><i class="fa-solid fa-shield-halved"></i></a>
<a class="item-control item-storage-in" title="{{ localize 'MGT2.Actor.StoreItem' }}"><i class="fa-solid fa-inbox-in"></i></a>
<a class="item-control item-edit" title="{{ localize 'MGT2.Actor.EditComputer' }}"><i class="fas fa-edit"></i></a>
<a class="item-control item-delete" title="{{ localize 'MGT2.Actor.DeleteComputer' }}"><i class="fas fa-trash"></i></a>
</div>
</div>
{{#each subItems as |subItem|}}
<div class="table-row table-subrow drag-item-list" data-item-id="{{subItem._id}}">
<div class="row-item row-item-50 row-item-left"><i class="fa-brands fa-usb"></i>{{subItem.name}}</div>
<div class="row-item row-item-2 row-item-center">{{subItem.system.bandwidth}}</div>
<div class="row-item row-item-2 row-item-right flex-fix"></div>
<div class="row-item row-item-15 item-controls flex-fix">
<a class="item-control software-eject" title="{{ localize 'MGT2.Actor.UnloadSoftware' }}"><i class="fa-solid fa-eject"></i></i></a>
<a class="item-control item-edit" title="{{ localize 'MGT2.Actor.EditSoftware' }}"><i class="fas fa-edit"></i></a>
</div>
</div>
{{/each}}
{{/each}}
{{#if softwares}}
<fieldset style="padding: 5px;margin: 1rem 0;">
<legend><i class="fa-brands fa-usb"></i> {{ localize 'MGT2.Items.Softwares' }}</legend>
<ul class="softwares">
{{#each softwares as |software id|}}
<li class="drag-item-list" data-item-id="{{software._id}}">{{software.display}}
<a class="item-control item-edit" title="{{ localize 'MGT2.Actor.EditSoftware' }}"><i class="fas fa-edit"></i></a>
<a class="item-delete" title="{{ localize 'MGT2.Actor.DeleteSoftware' }}"><i class="fas fa-trash"></i></a>
</li>
{{/each}}
</ul>
</fieldset>
{{/if}}
</div>
<div class="table-container">
<div class="table-row heading color-1">
<div class="row-item row-item-85 row-item-left upcase"><i class="fa-solid fa-toolbox"></i>{{ localize 'MGT2.Items.Equipments' }}</div>
<div class="row-item row-item-2 row-item-center">{{ localize 'MGT2.Items.Qty' }}</div>
<div class="row-item row-item-2 row-item-right flex-fix">{{ localize 'MGT2.Items.Weight' }}</div>
<div class="row-item row-item-15 item-controls flex-fix"><a class="item-create" data-type-item="equipment" data-create-name="{{ localize 'MGT2.Actor.Equipment' }}" title="{{ localize 'MGT2.Actor.AddEquipment' }}"><i class="fas fa-plus"></i></a></div>
</div>
{{#each equipments as |equipment id|}}
<div class="table-row drag-item-list" data-item-id="{{equipment._id}}" role="rowgroup">
<div class="row-item row-item-85 row-item-left">{{equipment.name}}</div>
<div class="row-item row-item-2 row-item-center">{{equipment.system.quantity}}</div>
<div class="row-item row-item-2 row-item-right flex-fix">{{equipment.weight}}</div>
<div class="row-item row-item-15 item-controls flex-fix">
<a class="item-control item-equip {{equipment.toggleClass}}" title="{{ localize 'MGT2.Actor.EquipUnequip' }}"><i class="fa-solid fa-shield-halved"></i></a>
<a class="item-control item-storage-in" title="{{ localize 'MGT2.Actor.StoreEquipment' }}"><i class="fa-solid fa-inbox-in"></i></a>
<a class="item-control item-edit" title="{{ localize 'MGT2.Actor.EditEquipment' }}"><i class="fas fa-edit"></i></a>
<a class="item-control item-delete" title="{{ localize 'MGT2.Actor.DeleteEquipment' }}"><i class="fas fa-trash"></i></a>
</div>
</div>
{{/each}}
</div>
<div class="table-container">
<div class="table-row heading color-1">
<div class="row-item row-item-85 row-item-left upcase"><i class="fa-solid fa-backpack"></i>{{ localize 'MGT2.Items.Items' }}</div>
<div class="row-item row-item-2 row-item-center">{{ localize 'MGT2.Items.Qty' }}</div>
<div class="row-item row-item-2 row-item-right flex-fix">{{ localize 'MGT2.Items.Weight' }}</div>
<div class="row-item row-item-15 item-controls flex-fix"><a class="item-create" data-type-item="item" data-create-name="{{ localize 'MGT2.Actor.NewItem' }}" title="{{ localize 'MGT2.Actor.AddItem' }}"><i class="fas fa-plus"></i></a></div>
</div>
{{#each items as |item|}}
{{#if (eq item.type "container")}}
<div class="table-row drop-item-list" data-item-id="{{item._id}}">
{{else}}
<div class="table-row drag-item-list" data-item-id="{{item._id}}">
{{/if}}
<div class="row-item row-item-85 row-item-left">{{item.name}}</div>
<div class="row-item row-item-2 row-item-center">{{item.system.quantity}}</div>
<div class="row-item row-item-2 row-item-right flex-fix">{{item.weight}}</div>
<div class="row-item row-item-15 item-controls flex-fix">
<a class="item-control item-storage-in" title="{{ localize 'MGT2.Actor.StoreItem' }}"><i class="fa-solid fa-inbox-in"></i></a>
<a class="item-control item-edit" title="{{ localize 'MGT2.Actor.EditItem' }}"><i class="fas fa-edit"></i></a>
<a class="item-control item-delete" title="{{ localize 'MGT2.Actor.DeleteItem' }}"><i class="fas fa-trash"></i></a>
</div>
</div>
{{#if (eq item.type "container")}}
{{#each subItems as |subItem|}}
<div class="table-row table-subrow drag-item-list" data-item-id="{{subItem._id}}">
<div class="row-item row-item-85 row-item-left">{{subItem.name}}</div>
<div class="row-item row-item-2 row-item-center">{{subItem.system.quantity}}</div>
<div class="row-item row-item-2 row-item-right flex-fix">{{subItem.weight}}</div>
<div class="row-item row-item-15 item-controls flex-fix">
<a class="item-control item-storage-out" title="{{ localize 'MGT2.Actor.UnstoreItem' }}"><i class="fa-solid fa-inbox-out"></i></a>
<a class="item-control item-edit" title="{{ localize 'MGT2.Actor.EditItem' }}"><i class="fas fa-edit"></i></a>
<a class="item-control item-delete" title="{{ localize 'MGT2.Actor.DeleteItem' }}"><i class="fas fa-trash"></i></a>
</div>
</div>
{{/each}}
{{/if}}
{{/each}}
</div>
<hr />
<div class="table-container">
<div class="table-row">
<div class="row-item row-item-left" style="flex-basis: 48%">{{ localize 'MGT2.Actor.Encumbrance' }} {{encumbranceNormal}} {{settings.weightUnit}} / {{encumbranceHeavy}} {{settings.weightUnit}}</div>
<div class="row-item row-item-right" style="flex-basis: 28%">Total :</div>
<div class="row-item row-item-2 row-item-right {{encumbranceClasses}} flex-fix">{{system.inventory.weight}} {{settings.weightUnit}}</div>
<div class="row-item row-item-15 row-item-left flex-fix {{encumbranceClasses}}"></div>
</div>
</div>
</div>
<div class="tab" data-group="inventory" data-tab="storage">
<div class="mt-1" style="flex-direction: row;display: flex;justify-content: space-between;">
<div>
<label>{{ localize 'MGT2.Items.Containers' }}</label>
<select name="system.containerView">
{{selectOptions containers selected=system.containerView nameAttr="_id" labelAttr="display"}}
</select>
<div class="container-controls">
{{#unless containerShowAll}}<a class="container-edit"><i class="fas fa-edit"></i></a>{{/unless}}
<a class="container-create"><i class="fas fa-plus"></i></a>
{{#unless containerShowAll}}<a class="container-delete"><i class="fas fa-trash"></i></a>{{/unless}}
</div>
</div>
<div>
<label>DropIn</label>
<select name="system.containerDropIn">
{{selectOptions actorContainers selected=system.containerDropIn nameAttr="_id" labelAttr="display"}}
</select>
</div>
</div>
<hr />
{{#if (and containerView.system.locked (not isGM))}}
<i class="fa-solid fa-lock"></i><label class="upcase">{{ localize 'MGT2.Items.Locked' }}</label>
{{else}}
<div class="table-container">
<div class="table-row heading color-1">
<div class="row-item row-item-30 row-item-left upcase">{{ localize 'MGT2.Items.Items' }}</div>
{{#if containerShowAll}}
<div class="row-item row-item-center row-item-storage">{{ localize 'MGT2.Items.Storage' }}</div>
{{/if}}
<div class="row-item row-item-2 row-item-center flex-fix">{{ localize 'MGT2.Items.Qty' }}</div>
<div class="row-item row-item-2 row-item-center flex-fix">{{ localize 'MGT2.Items.Weight' }}</div>
<div class="row-item row-item-15 item-controls flex-fix"></div>
</div>
{{#each containerItems as |containerItem id|}}
<div class="table-row drag-item-list" data-item-id="{{containerItem._id}}" role="rowgroup">
<div class="row-item row-item-30 row-item-left">{{containerItem.name}}</div>
{{#if ../containerShowAll}}
<div class="row-item row-item-center row-item-storage">{{containerItem.containerName}}</div>
{{/if}}
<div class="row-item row-item-2 row-item-center flex-fix">{{containerItem.system.quantity}}</div>
<div class="row-item row-item-2 row-item-center flex-fix">{{containerItem.weight}}</div>
<div class="row-item row-item-15 item-controls flex-fix">
<a class="item-control item-storage-out" title="{{ localize 'MGT2.Actor.UnstoreItem' }}"><i class="fa-solid fa-inbox-out"></i></a>
<a class="item-control item-edit" title="{{ localize 'MGT2.Actor.EditItem' }}"><i class="fas fa-edit"></i></a>
<a class="item-control item-delete" title="{{ localize 'MGT2.Actor.DeleteItem' }}"><i class="fas fa-trash"></i></a>
</div>
</div>
{{/each}}
</div>
<hr />
<div>{{ localize 'MGT2.Actor.TotalWeight' }} : {{containerWeight}} {{settings.weightUnit}}</div>
{{/if}}
</div>
<div class="tab" data-group="inventory" data-tab="finance">
<div class="field-groups mb-1 mt-1">
<div class="field-group">
<label class="upcase">{{ localize 'MGT2.Actor.CashOnHand' }}</label>
<input class="field" name="system.finance.credits" type="text" value="{{system.finance.credits}}" />
</div>
<div class="field-group">
<label class="upcase">{{ localize 'MGT2.Actor.Pension' }}</label>
<input class="field" name="system.finance.pension" type="text" value="{{system.finance.pension}}" />
</div>
<div class="field-group">
<label class="upcase">{{ localize 'MGT2.Actor.LivingCost' }}</label>
<input class="field" name="system.finance.livingCost" type="text" value="{{system.finance.livingCost}}" />
</div>
<div class="field-group">
<label class="upcase">{{ localize 'MGT2.Actor.Debt' }}</label>
<input class="field" name="system.finance.debt" type="text" value="{{system.finance.debt}}" />
</div>
</div>
<div class="field-group mt-1">
<label class="upcase">{{ localize 'MGT2.Actor.Notes' }}</label>
<textarea name="system.finance.description" rows="3">{{system.finance.description}}</textarea>
</div>
</div>
</div>
<div class="tab w100 tab-scroll" data-group="sidebar" data-tab="relations">
<div class="header upcase">{{ localize 'MGT2.Actor.RelationsAndContacts' }}</div>
<div class="table-container">
<div class="table-row heading color-1">
<div class="row-item flex-grow-2">{{ localize 'MGT2.Items.Relations' }}</div>
<div class="row-item row-item-center">{{ localize 'MGT2.Items.Relation' }}</div>
<div class="row-item row-item-center">{{ localize 'MGT2.Items.Attitude' }}</div>
<div class="row-item row-item-center">{{ localize 'MGT2.Items.Occupation' }}</div>
<div class="row-item row-item-center">{{ localize 'MGT2.Items.Location' }}</div>
<div class="row-item item-controls"><a class="item-create" data-type-item="contact" data-create-name="{{ localize 'MGT2.Actor.NewContact' }}" title="{{ localize 'MGT2.Actor.AddContact' }}"><i class="fas fa-plus"></i></a></div>
</div>
{{#each contacts as |contact id|}}
<div class="table-row" data-item-id="{{contact._id}}" role="rowgroup">
<div class="row-item row-item-left flex-grow-2">{{contact.name}}</div>
<div class="row-item row-item-center">{{localize (concat "MGT2.Contact.Relation." contact.system.relation)}}</div>
<div class="row-item row-item-center">{{localize (concat "MGT2.Contact.Attitude." contact.system.attitude)}}</div>
<div class="row-item row-item-center">{{contact.system.occupation}}</div>
<div class="row-item row-item-center">{{contact.system.location}}</div>
<div class="row-item item-controls">
<a class="item-control item-edit" title="{{ localize 'MGT2.Actor.EditContact' }}"><i class="fas fa-edit"></i></a>
<a class="item-control item-delete" title="{{ localize 'MGT2.Actor.DeleteContact' }}"><i class="fas fa-trash"></i></a>
</div>
</div>
{{/each}}
</div>
</div>
<div class="tab w100 h100" data-group="sidebar" data-tab="notes">
<div class="header upcase">{{ localize 'MGT2.Actor.Notes' }}</div>
{{editor system.notes target="system.notes" button=true editable=true}}
</div>
<div class="tab w100 h100" data-group="sidebar" data-tab="biography">
<div class="header upcase">{{ localize 'MGT2.Actor.Biography' }}</div>
{{editor system.biography target="system.biography" button=true editable=true}}
</div>
{{#if showTrash}}
<!-- <div class="tab" data-group="inventory" data-tab="trash">
<p>À FAIRE</p>
</div> -->
{{/if}}
</div>
<section class="actor-footer">
<div></div>
<div><a name="config" title="Config" style="margin-right: 0.5rem;"><i class="fa-solid fa-gear"></i></a></div>
</section>
</form>

View File

@@ -2,7 +2,7 @@
<nav class="sheet-sidebar tabs" data-group="sidebar">
<!-- <a class="item tab-select" data-tab="personal" title="Personal"><i class="fa-solid fa-id-card"></i></a> -->
<a class="item tab-select" data-tab="health" title="{{ localize 'MGT2.Actor.Health' }}"><i class="fa-solid fa-heart-pulse"></i></a>
<a class="item tab-select" data-tab="skills" title="{{ localize 'MGT2.Actor.Skills' }}"><i class="fa-solid fa-head-side"></i></a>
<a class="item tab-select" data-tab="skills" title="{{ localize 'MGT2.Actor.TabSkills' }}"><i class="fa-solid fa-head-side"></i></a>
<a class="item tab-select" data-tab="inventory" title="{{ localize 'MGT2.Actor.Inventory' }}"><i class="fa-solid fa-briefcase-blank"></i></a>
<a class="item tab-select" data-tab="relations" title="{{ localize 'MGT2.Actor.Contacts' }}"><i class="fa-solid fa-users"></i></a>
<a class="item tab-select" data-tab="notes" title="{{ localize 'MGT2.Actor.Notes' }}"><i class="fa-solid fa-books"></i></a>
@@ -70,7 +70,7 @@
</div>
</div>
</section>
<div style="height: 100%;overflow: hidden;display: flex;flex-direction: row;width: 100%;justify-content: flex-start;align-items: flex-start;">
<div class="character-body">
<div class="characteristics">
<nav class="horizontal-tabs tabs" data-group="characteristics" style="border-right: 7px double #fff;">
<a class="item tab-select" data-tab="core">{{ localize 'MGT2.Actor.TabCore' }}</a>
@@ -275,7 +275,7 @@
</div>
</section>
</div>
<div class="tab w100" data-group="sidebar" data-tab="health">
<div class="tab w100 tab-scroll" data-group="sidebar" data-tab="health">
<div class="header upcase">{{ localize 'MGT2.Actor.Health' }}</div>
<div class="field-group mb-1">
<label class="upcase">{{ localize 'MGT2.Actor.Rads' }}</label>
@@ -324,7 +324,26 @@
{{/each}}
</div>
</div>
<div class="tab w100" data-group="sidebar" data-tab="skills">
<div class="tab w100 tab-scroll" data-group="sidebar" data-tab="skills">
<div class="header upcase">{{ localize 'MGT2.Actor.TabSkills' }}</div>
<div class="species"><a title="Description détaillé" data-editor="open"><i class="fa-solid fa-book"></i></a>{{system.personal.speciesText.description}}</div>
<div class="table-container">
<div class="table-row heading color-1">
<div class="row-item row-item-15 row-item-left upcase">{{ localize 'MGT2.Items.Trait' }}</div>
<div class="row-item row-item-left">{{ localize 'MGT2.Items.Description' }}</div>
<div class="row-item row-item row-item-15 item-controls flex-fix"><a class="traits-create"><i class="fas fa-plus"></i></a></div>
</div>
{{#each system.personal.traits as |trait i| }}
<div class="table-row traits-part" data-traits-part="{{i}}" role="rowgroup">
<div class="row-item row-item-15 row-item-left">{{trait.name}}</div>
<div class="row-item row-item-left">{{trait.description}}</div>
<div class="row-item row-item row-item-15 item-controls flex-fix">
<a class="item-control traits-edit" title="{{ localize 'MGT2.Actor.EditTrait' }}"><i class="fas fa-edit"></i></a>
<a class="item-control traits-delete" title="Delete Trait"><i class="fas fa-trash"></i></a>
</div>
</div>
{{/each}}
</div>
<div class="header upcase">{{ localize 'MGT2.Actor.StudyPeriod' }}</div>
<div class="fields mb-1">
<div class="field-group" style="flex: 2 1 auto;">
@@ -381,22 +400,22 @@
{{#if system.config.psionic}}
<div class="table-container">
<div class="table-row heading color-1">
<div class="row-item row-item-30 row-item-left upcase">{{ localize 'MGT2.Actor.PsionicTalents' }}</div>
<div class="row-item row-item-left upcase">{{ localize 'MGT2.Actor.PsionicTalents' }}</div>
<div class="row-item row-item-10 row-item-center flex-fix">{{ localize 'MGT2.Items.Level' }}</div>
<div class="row-item row-item-10 row-item-center flex-fix">{{ localize 'MGT2.Items.Cost' }}</div>
<div class="row-item row-item-10 row-item-center flex-fix">{{ localize 'MGT2.Items.Reach' }}</div>
<div class="row-item row-item-10 row-item-center flex-fix">{{ localize 'MGT2.Items.Difficulty' }}</div>
<div class="row-item row-item-15 row-item-center flex-fix">{{ localize 'MGT2.Items.Difficulty' }}</div>
<div class="row-item row-item row-item-15 item-controls flex-fix"><a class="item-create" data-type-item="talent" data-subtype="psionic" data-create-name="{{ localize 'MGT2.Actor.NewPsionicTalent' }}" title="{{ localize 'MGT2.Actor.AddPsionicTalent' }}"><i class="fas fa-plus"></i></a></div>
</div>
{{#each psionics as |psionic id|}}
<div class="table-row" data-item-id="{{psionic._id}}" role="rowgroup">
<div class="row-item row-item-30 row-item-left">
<div class="row-item row-item-left">
<a data-roll="psionic" data-item-id="{{psionic._id}}"><i class="fa-solid fa-dice"></i></a>{{psionic.name}}
</div>
<div class="row-item row-item-10 row-item-center flex-fix">{{psionic.system.level}}</div>
<div class="row-item row-item-10 row-item-center flex-fix">{{psionic.system.psionic.cost}}</div>
<div class="row-item row-item-10 row-item-center flex-fix">{{psionic.system.psionic.reach}}</div>
<div class="row-item row-item-10 row-item-center flex-fix">{{psionic.system.psionic.difficulty}}</div>
<div class="row-item row-item-10 row-item-center flex-fix">{{psionic.reach}}</div>
<div class="row-item row-item-15 row-item-center flex-fix">{{psionic.difficulty}}</div>
<div class="row-item row-item row-item-15 item-controls flex-fix">
<a class="item-control item-edit" title="{{ localize 'MGT2.Items.EditPsionic' }}"><i class="fas fa-edit"></i></a>
<a class="item-control item-delete" title="{{ localize 'MGT2.Items.DeletePsionic' }}"><i class="fas fa-trash"></i></a>
@@ -723,8 +742,7 @@
{{/if}}
</div>
<section class="actor-footer">
<div></div>
<div><a name="config" title="Config" style="margin-right: 0.5rem;"><i class="fa-solid fa-gear"></i></a></div>
</section>
</div>
</form>

View File

@@ -0,0 +1,12 @@
<form class="{{cssClass}} itemsheet" autocomplete="off">
<div class="itemsheet-header"><label class="upcase">{{ localize 'MGT2.Items.Trait' }}</label></div>
<div class="itemsheet-panel">
<div class="w-100 h100 flexcol">
<input class="field field-item-name" name="name" type="text" value="{{data.name}}" style="flex-grow: 0;" />
<div class="field-group mt-1">
<label>{{ localize 'MGT2.Items.Description' }}</label>
<textarea name="description" rows="6">{{data.description}}</textarea>
</div>
</div>
</div>
</form>

View File

@@ -1,8 +1,15 @@
<div class="roll-info">
<div class="roll-object-name">{{rollObjectName}}</div>
{{#if rollTypeName}}
{{#if rollDifficulty}}
<div class="roll-type-group"><div class="roll-type-name">{{rollTypeName}}</div><div class="roll-type-name">{{ localize rollDifficultyLabel }}</div></div>
{{else}}
<div class="roll-type-name">{{rollTypeName}}</div>
{{/if}}
{{/if}}
{{#if rollMessage}}
<div>{{rollMessage}}</div>
{{/if}}
{{#if rollModifiers}}
{{#each rollModifiers as |rollModifier i| }}
<div>{{rollModifier}}</div>
@@ -13,12 +20,13 @@
{{#if flavor}}
<div class="dice-flavor">{{flavor}}</div>
{{/if}}
<div class="dice-result">
<div class="dice-formula">{{formula}}</div>
{{{tooltip}}}
<h4 class="dice-total">{{total}}</h4>
</div>
<div class="dice-result"><div class="dice-formula">{{formula}}</div>{{{tooltip}}}<h4 class="dice-total">{{total}}</h4></div>
</div>
{{#if rollSuccess}}
<div class="roll-success">{{ localize 'MGT2.Chat.Roll.Success' }}</div>
{{else if rollFailure}}
<div class="roll-success">{{ localize 'MGT2.Chat.Roll.Failure' }}</div>
{{/if}}
{{#if showButtons}}
<div class="mgt2-buttons">
{{#if hasDamage}}
@@ -31,5 +39,8 @@
{{#if showRollDamage}}
<button data-action="rollDamage" title="Roll">{{ localize 'MGT2.Chat.Roll.Damages' }}</button>
{{/if}}
{{#each cardButtons as |cardButton i| }}
<button data-index="{{i}}" title="{{cardButton.label}}">{{cardButton.label}}</button>
{{/each}}
</div>
{{/if}}

View File

@@ -0,0 +1,3 @@
<form class="{{cssClass}}" autocomplete="off" style="padding: 0 0.5rem;">
{{{html}}}
</form>

View File

@@ -4,12 +4,67 @@
<div class="itemsheet-maincol">
<img class="profile-img" src="{{item.img}}" data-edit="img" data-tooltip="{{item.name}}" />
</div>
<div class="w-100">
<div class="w-100" style="display: flex;flex-direction: column;justify-content: flex-start;align-items: stretch;">
<input class="field item-name" name="name" type="text" value="{{item.name}}" />
<div class="field-group mt-1">
<label>{{ localize 'MGT2.Items.Description' }}</label>
<nav class="horizontal-tabs tabs mt-1" data-group="primary">
<a class="item tab-select" data-tab="tab1">{{ localize 'MGT2.Items.Description' }}</a>
<a class="item tab-select" data-tab="tab2">{{ localize 'MGT2.Items.DetailedDescription' }}</a>
<a class="item tab-select" data-tab="tab3">{{ localize 'MGT2.Items.Details' }}</a>
</nav>
<div class="tab" data-group="primary" data-tab="tab1">
<div class="field-group mt-1">
<label>{{ localize 'MGT2.Items.Description' }}</label>
<textarea name="system.description" rows="6">{{system.description}}</textarea>
</div>
</div>
<div class="tab w100 h100" data-group="primary" data-tab="tab2">
{{editor system.descriptionLong target="system.descriptionLong" button=true editable=true}}
</div>
<div class="tab" data-group="primary" data-tab="tab3">
<div class="table-container">
<div class="table-row heading color-2">
<div class="row-item row-item-left upcase">{{ localize 'MGT2.Items.Characteristics' }}</div>
<div class="row-item row-item-center row-item-15 flex-fix">{{ localize 'MGT2.Items.Modifiers' }}</div>
<div class="row-item row-item-15 item-controls flex-fix"><a class="modifiers-create"><i class="fas fa-plus"></i></a></div>
</div>
{{#each system.modifiers as |modifier i| }}
<div class="table-row modifiers-part" data-modifiers-part="{{i}}" role="rowgroup">
<div class="row-item row-item-left">
<select name="system.modifiers.{{i}}.characteristic">
{{selectOptions ../config.Characteristics selected=modifier.characteristic localize = true}}
</select>
</div>
<div class="row-item row-item-left row-item-15 flex-fix">
<input type="number" name="system.modifiers.{{i}}.value" value="{{modifier.value}}" />
</div>
<div class="row-item row-item-15 item-controls flex-fix">
<a class="item-control modifiers-delete" title="Delete Trait"><i class="fas fa-trash"></i></a>
</div>
</div>
{{/each}}
</div>
<div class="table-container mt-1">
<div class="table-row heading color-2">
<div class="row-item row-item-30 row-item-left upcase">{{ localize 'MGT2.Items.Traits' }}</div>
<div class="row-item row-item-left">{{ localize 'MGT2.Items.Description' }}</div>
<div class="row-item row-item-15 item-controls flex-fix"><a class="options-create" data-property="traits"><i class="fas fa-plus"></i></a></div>
</div>
{{#each system.traits as |trait i| }}
<div class="table-row options-part" data-options-part="{{i}}" data-property="traits" role="rowgroup">
<div class="row-item row-item-30 row-item-left"><input type="text" name="system.traits.{{i}}.name" value="{{trait.name}}" /></div>
<div class="row-item row-item-left">
<textarea name="system.traits.{{i}}.description" rows="3">{{trait.description}}</textarea>
</div>
<div class="row-item row-item-15 item-controls flex-fix">
<a class="item-control options-delete" title="Delete Trait"><i class="fas fa-trash"></i></a>
</div>
</div>
{{/each}}
</div>
</div>
</div>
</div>
</div>
</form>

View File

@@ -47,6 +47,17 @@
<input type="number" name="system.psionic.cost" value="{{system.psionic.cost}}" data-dtype="Number" />
</div>
</div>
<div class="field-groups mt-1">
<div class="field-group">
<label>{{ localize 'MGT2.Items.Duration' }}</label>
<div class="flexrow">
<input type="text" name="system.psionic.duration" value="{{system.psionic.duration}}" data-dtype="String" class="flex-basis-50" />
<select name="system.psionic.durationUnit" class="flex-basis-50 flex-fix">
{{selectOptions config.Durations selected=system.psionic.durationUnit localize = true}}
</select>
</div>
</div>
</div>
{{/if}}
<nav class="horizontal-tabs tabs mt-1" data-group="primary">
<a class="item tab-select" data-tab="tab1">{{ localize 'MGT2.Items.Description' }}</a>

View File

@@ -29,7 +29,6 @@
<label>{{ localize 'MGT2.RollPrompt.CustomDM' }}</label>
<input type="text" name="customDM" maxlength="15" />
</div>
{{#if showDifficulty}}
<div class="form-group">
<label>{{ localize 'MGT2.RollPrompt.Difficulty' }}</label>
<select name="difficulty">
@@ -37,7 +36,6 @@
{{selectOptions config.Difficulty selected = difficulty localize = true}}
</select>
</div>
{{/if}}
<div class="form-group">
<label>{{ localize 'MGT2.RollPrompt.RollMode' }}</label>
<select name="rollMode">