Add New Ranks chceckboxes

Fix Updates for Skill/Skill Category Totals
Inventory Implementation
This commit is contained in:
Anthony Murphy
2022-09-18 21:31:15 +10:00
parent cfc645d888
commit cab5aa07f3
32 changed files with 1180 additions and 333 deletions

View File

@@ -146,26 +146,17 @@ export class RMSSActor extends Actor {
// For each skill category return an object in this format.
// {{ _id: "skill category name"}}
// This is the format that the select helper on the skill sheet needs
getOwnedSkillCategories() {
var ownedSkillCategories = {None: "None"};
console.log("rmss | actor.js | Getting owned skill categories for: " + this.name);
getOwnedItemsByType(item_type) {
var ownedItems = {None: "None"};
console.log("rmss | actor.js | Getting owned " + item_type + " for: " + this.name);
for (const item of this.items) {
if (item.type === "skill_category") {
ownedSkillCategories[item._id] = item.name;
if (item.type === item_type) {
ownedItems[item._id] = item.name;
}
}
return(ownedSkillCategories);
return(ownedItems);
}
getOwnedSkills() {
var ownedSkills = {None: "None"};
console.log("rmss | actor.js | Getting owned skills for: " + this.name);
for (const item of this.items) {
if (item.type === "skill") {
ownedSkills[item._id] = item.name;
}
}
return(ownedSkills);
}
}