Skip to content

Commit

Permalink
Merge pull request #80 from crash1115/dev
Browse files Browse the repository at this point in the history
v0.6.8
  • Loading branch information
crash1115 authored Jan 26, 2022
2 parents 28ddbfb + 1deddac commit a501d17
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 152 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@ Check out the [wiki](https://github.com/crash1115/5e-training/wiki) for instruct
Contact me on Discord (CRASH1115#2944) to chat, or create an issue right here on GitHub.

## Attributions and Special Thanks
- Thanks to platypus_pi for help with English translations
- Thanks to KLO#1490 for Korean translations
- Thanks to hmqgg#5775 for Chinese translations
- Thanks to MS-PBS for Spanish translations
- Thanks Varriount for some CSS fixes

## License
- This work is licensed under a [Creative Commons Attribution 4.0 International License](https://creativecommons.org/licenses/by/4.0/legalcode).
Expand Down
6 changes: 6 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# Version 0.6.8
- Fixed some small CSS issues (credit Varriount)
- Get rid of some log spam
- Remove Chinese localization, as it lives in its own repo (credit Hmqgg)
- Confirmed v9 compatibility

# Version 0.6.7
- Fixing incompatibilities when BR and Midi are both being used simultaneously
- Fixed a bug where imported items would get lost in the void if they were in a category when they were exported
Expand Down
119 changes: 0 additions & 119 deletions lang/cn.json

This file was deleted.

13 changes: 4 additions & 9 deletions module.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "5e-training",
"title": "Crash's Tracking & Training (5e)",
"description": "Adds a section to the character sheet to keep track of downtime activities, training, spell scribing, faction reputation, quest progress, and anything else you can think of.",
"description": "Adds a tab to the character sheet to keep track of downtime activities, training, spell scribing, faction reputation, quest progress, and anything else you can think of.",
"author": "CRASH1115#2944",
"url": "https://github.com/crash1115/5e-training",
"readme": "https://github.com/crash1115/5e-training/blob/master/README.md",
"bugs": "https://github.com/crash1115/5e-training/issues",
"version": "0.6.7",
"version": "0.6.8",
"minimumCoreVersion": "0.8.2",
"compatibleCoreVersion": "0.8.9",
"compatibleCoreVersion": "9",
"minimumSystemVersion": "1.3.0",
"esmodules": [
"scripts/crash-5e-training.js"
Expand All @@ -30,17 +30,12 @@
"name": "한국어",
"path": "lang/ko.json"
},
{
"lang": "cn",
"name": "中文",
"path": "lang/cn.json"
},
{
"lang": "es",
"name": "Español",
"path": "lang/es.json"
}
],
"manifest": "https://raw.githubusercontent.com/crash1115/5e-training/master/module.json",
"download": "https://github.com/crash1115/5e-training/releases/download/v0.6.7/5e-training.zip"
"download": "https://github.com/crash1115/5e-training/releases/download/v0.6.8/5e-training.zip"
}
18 changes: 9 additions & 9 deletions scripts/CrashTrackingAndTraining.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import Category from "./Category.js";
export default class CrashTrackingAndTraining {

static async addCategory(actorId){
console.log("Crash's Tracking & Training (5e) | New Category excuted!");
// console.log("Crash's Tracking & Training (5e) | New Category excuted!");

let actor = game.actors.get(actorId);
let data = {
Expand All @@ -17,7 +17,7 @@ export default class CrashTrackingAndTraining {
}

static async editCategory(actorId, categoryId){
console.log("Crash's Tracking & Training (5e) | Edit Category excuted!");
// console.log("Crash's Tracking & Training (5e) | Edit Category excuted!");

let actor = game.actors.get(actorId);
let allCategories = actor.getFlag("5e-training","categories") || [];
Expand All @@ -30,7 +30,7 @@ export default class CrashTrackingAndTraining {
}

static async deleteCategory(actorId, categoryId){
console.log("Crash's Tracking & Training (5e) | Delete Category excuted!");
// console.log("Crash's Tracking & Training (5e) | Delete Category excuted!");

// Set up some variables
let actor = game.actors.get(actorId);
Expand Down Expand Up @@ -69,7 +69,7 @@ export default class CrashTrackingAndTraining {
}

static async addItem(actorId, DROPDOWN_OPTIONS){
console.log("Crash's Tracking & Training (5e) | New Item excuted!");
// console.log("Crash's Tracking & Training (5e) | New Item excuted!");
let actor = game.actors.get(actorId);
let allCategories = actor.getFlag("5e-training","categories") || [];
let item = new TrackedItem;
Expand All @@ -84,7 +84,7 @@ export default class CrashTrackingAndTraining {
}

static async editFromSheet(actorId, itemId, DROPDOWN_OPTIONS){
console.log("Crash's Tracking & Training (5e) | Edit Downtime Activity excuted!");
// console.log("Crash's Tracking & Training (5e) | Edit Downtime Activity excuted!");
let actor = game.actors.get(actorId);
let allCategories = actor.getFlag("5e-training","categories") || [];
let allItems = actor.getFlag("5e-training", "trainingItems") || [];
Expand All @@ -100,7 +100,7 @@ export default class CrashTrackingAndTraining {
}

static async deleteFromSheet(actorId, itemId){
console.log("Crash's Tracking & Training (5e) | Delete Downtime Activity excuted!");
// console.log("Crash's Tracking & Training (5e) | Delete Downtime Activity excuted!");

// Set up some variables
let actor = game.actors.get(actorId);
Expand Down Expand Up @@ -129,7 +129,7 @@ export default class CrashTrackingAndTraining {
}

static async updateItemProgressFromSheet(actorId, itemId, value){
console.log("Crash's Tracking & Training (5e) | Progression Override excuted!");
// console.log("Crash's Tracking & Training (5e) | Progression Override excuted!");

// Set up some variables
let actor = game.actors.get(actorId);
Expand Down Expand Up @@ -163,7 +163,7 @@ export default class CrashTrackingAndTraining {
}

static async progressItem(actorId, itemId){
console.log("Crash's Tracking & Training (5e) | Progress Downtime Activity excuted!");
// console.log("Crash's Tracking & Training (5e) | Progress Downtime Activity excuted!");

// Set up some variables
let actor = game.actors.get(actorId);
Expand Down Expand Up @@ -355,7 +355,7 @@ export default class CrashTrackingAndTraining {
}

if (sendIt){
console.log("Crash's Tracking & Training (5e) | " + actor.name + " " + game.i18n.localize("C5ETRAINING.CompletedATrackedItem"));
// console.log("Crash's Tracking & Training (5e) | " + actor.name + " " + game.i18n.localize("C5ETRAINING.CompletedATrackedItem"));
let chatHtml = await renderTemplate('modules/5e-training/templates/completion-message.html', {actor:actor, activity:item});
let chatObj = {content: chatHtml};
if(game.settings.get("5e-training", "gmOnlyMode")){
Expand Down
24 changes: 12 additions & 12 deletions scripts/crash-5e-training.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@ async function addTrainingTab(app, html, data) {
// NEW CATEGORY
html.find('.crash-training-new-category').click(async (event) => {
event.preventDefault();
console.log("Crash's Tracking & Training (5e) | Create Category excuted!");
// console.log("Crash's Tracking & Training (5e) | Create Category excuted!");
await CrashTrackingAndTraining.addCategory(actor.id);
});

// EDIT CATEGORY
html.find('.crash-training-edit-category').click(async (event) => {
event.preventDefault();
console.log("Crash's Tracking & Training (5e) | Edit Category excuted!");
// console.log("Crash's Tracking & Training (5e) | Edit Category excuted!");
let fieldId = event.currentTarget.id;
let categoryId = fieldId.replace('crash-edit-category-','');
await CrashTrackingAndTraining.editCategory(actor.id, categoryId);
Expand All @@ -68,7 +68,7 @@ async function addTrainingTab(app, html, data) {
// DELETE CATEGORY
html.find('.crash-training-delete-category').click(async (event) => {
event.preventDefault();
console.log("Crash's Tracking & Training (5e) | Delete Category excuted!");
// console.log("Crash's Tracking & Training (5e) | Delete Category excuted!");
let fieldId = event.currentTarget.id;
let categoryId = fieldId.replace('crash-delete-category-','');
await CrashTrackingAndTraining.deleteCategory(actor.id, categoryId);
Expand All @@ -77,14 +77,14 @@ async function addTrainingTab(app, html, data) {
// ADD NEW DOWNTIME ACTIVITY
html.find('.crash-training-add').click(async (event) => {
event.preventDefault();
console.log("Crash's Tracking & Training (5e) | Create Item excuted!");
// console.log("Crash's Tracking & Training (5e) | Create Item excuted!");
await CrashTrackingAndTraining.addItem(actor.id, DROPDOWN_OPTIONS);
});

// EDIT DOWNTIME ACTIVITY
html.find('.crash-training-edit').click(async (event) => {
event.preventDefault();
console.log("Crash's Tracking & Training (5e) | Edit Item excuted!");
// console.log("Crash's Tracking & Training (5e) | Edit Item excuted!");
let allItems = actor.getFlag("5e-training","trainingItems") || [];
let itemId = event.currentTarget.id.replace('crash-edit-','');
if(!itemId){
Expand All @@ -97,7 +97,7 @@ async function addTrainingTab(app, html, data) {
// DELETE DOWNTIME ACTIVITY
html.find('.crash-training-delete').click(async (event) => {
event.preventDefault();
console.log("Crash's Tracking & Training (5e) | Delete Item excuted!");
// console.log("Crash's Tracking & Training (5e) | Delete Item excuted!");
let allItems = actor.getFlag("5e-training","trainingItems") || [];
let itemId = event.currentTarget.id.replace('crash-delete-','');
if(!itemId){
Expand All @@ -110,7 +110,7 @@ async function addTrainingTab(app, html, data) {
// EDIT PROGRESS VALUE
html.find('.crash-training-override').change(async (event) => {
event.preventDefault();
console.log("Crash's Tracking & Training (5e) | Progress Override excuted!");
// console.log("Crash's Tracking & Training (5e) | Progress Override excuted!");
let field = event.currentTarget;
let itemId = event.currentTarget.id.replace('crash-override-','');
if(!itemId){
Expand All @@ -130,7 +130,7 @@ async function addTrainingTab(app, html, data) {
// ROLL TO TRAIN
html.find('.crash-training-roll').click(async (event) => {
event.preventDefault();
console.log("Crash's Tracking & Training (5e) | Roll Item excuted!");
// console.log("Crash's Tracking & Training (5e) | Roll Item excuted!");
let itemId = event.currentTarget.id.replace('crash-roll-','');
if(!itemId){
ui.notifications.warn("Crash's Tracking & Training (5e): " + game.i18n.localize("C5ETRAINING.NoIdWarning"),{permanent:true});
Expand All @@ -144,7 +144,7 @@ async function addTrainingTab(app, html, data) {
// dnd5e/module/actor/sheets/base.js
html.find('.crash-training-toggle-desc').click(async (event) => {
event.preventDefault();
console.log("Crash's Tracking & Training (5e) | Toggle Acvtivity Info excuted!");
// console.log("Crash's Tracking & Training (5e) | Toggle Acvtivity Info excuted!");

// Set up some variables
let fieldId = event.currentTarget.id;
Expand Down Expand Up @@ -189,7 +189,7 @@ async function addTrainingTab(app, html, data) {
// OPEN AUDIT LOG
html.find('.crash-training-audit').click(async (event) => {
event.preventDefault();
console.log("Crash's Tracking & Training (5e) | GM Audit excuted!");
// console.log("Crash's Tracking & Training (5e) | GM Audit excuted!");
new AuditLog(actor).render(true);
});

Expand Down Expand Up @@ -239,7 +239,7 @@ async function migrateAllActors(){
let currentUserOwnsActor = a.data.permission[currentUserId] === 3;
let currentUserIsGm = game.user.isGM;
if(!currentUserOwnsActor && !currentUserIsGm){
// console.log("Crash's Tracking & Training (5e): " + game.i18n.localize("C5ETRAINING.Skipping") + ": " + a.data.name);
console.log("Crash's Tracking & Training (5e): " + game.i18n.localize("C5ETRAINING.Skipping") + ": " + a.data.name);
continue;
}

Expand Down Expand Up @@ -338,7 +338,7 @@ Hooks.on(`renderActorSheet`, (app, html, data) => {
});

Hooks.on(`CrashTrainingTabReady`, (app, html, data) => {
console.log("Crash's Tracking & Training (5e) | Downtime tab ready!");
// console.log("Crash's Tracking & Training (5e) | Downtime tab ready!");
});

Hooks.on(`ready`, () => {
Expand Down
2 changes: 1 addition & 1 deletion styles/audit-log.css
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
.crash-audit-log .action-table table {
text-align: left;
border: none;
background-color: none;
background-color: transparent;
}

.crash-audit-log .action-table table tr th,
Expand Down

0 comments on commit a501d17

Please sign in to comment.