Import RMFRP tables + properly rename all files
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
import { RFRPUtility } from "../rfrp-utility.js";
|
||||
|
||||
export class RMSSItem extends Item {
|
||||
export class RMFRPItem extends Item {
|
||||
|
||||
/** @override */
|
||||
prepareData() {
|
||||
@ -8,7 +8,7 @@ export class RMSSItem extends Item {
|
||||
// the following, in order: data reset (to clear active effects),
|
||||
// prepareBaseData(), prepareEmbeddedDocuments() (including active effects),
|
||||
// prepareDerivedData().
|
||||
console.log(`rmss | item.js | prepareData for: ${this.name}`);
|
||||
console.log(`rmfrp | item.js | prepareData for: ${this.name}`);
|
||||
super.prepareData();
|
||||
}
|
||||
|
||||
@ -62,7 +62,7 @@ export class RMSSItem extends Item {
|
||||
|
||||
_prepareSkillCategoryData(itemData) {
|
||||
if (itemData.type !== "skill_category") return;
|
||||
console.log(`rmss | item.js | Preparing Skill Category Data for: ${itemData.name}`);
|
||||
console.log(`rmfrp | item.js | Preparing Skill Category Data for: ${itemData.name}`);
|
||||
// Calculate Skill Category Total Bonus
|
||||
this.calculateSkillCategoryTotalBonus(itemData);
|
||||
}
|
||||
@ -70,7 +70,7 @@ export class RMSSItem extends Item {
|
||||
_prepareSkillData(itemData) {
|
||||
if (itemData.type !== "skill") return;
|
||||
|
||||
console.log(`rmss | item.js | Preparing Skill Data for: ${itemData.name}`);
|
||||
console.log(`rmfrp | item.js | Preparing Skill Data for: ${itemData.name}`);
|
||||
// Make modifications to data here. For example:
|
||||
// const systemData = itemData.system;
|
||||
// Calculate Skill Category Bonus
|
||||
@ -81,7 +81,7 @@ export class RMSSItem extends Item {
|
||||
|
||||
calculateSkillCategoryTotalBonus(itemData) {
|
||||
if (this.type === "skill_category") {
|
||||
console.log(`rmss | item.js | Calculating Skill Category Total Bonus for: ${itemData.name}`);
|
||||
console.log(`rmfrp | item.js | Calculating Skill Category Total Bonus for: ${itemData.name}`);
|
||||
const systemData = itemData.system;
|
||||
itemData.system.total_bonus = Number(systemData.rank_bonus)
|
||||
+ Number(systemData.stat_bonus)
|
||||
@ -94,7 +94,7 @@ export class RMSSItem extends Item {
|
||||
calculateSkillTotalBonus(itemData) {
|
||||
if (this.type === "skill") {
|
||||
const systemData = itemData.system;
|
||||
console.log(`rmss | item.js | Calculating Skill Total Bonus for: ${itemData.name}`);
|
||||
console.log(`rmfrp | item.js | Calculating Skill Total Bonus for: ${itemData.name}`);
|
||||
itemData.system.total_bonus = Number(systemData.rank_bonus)
|
||||
+ Number(systemData.category_bonus)
|
||||
+ Number(systemData.item_bonus)
|
||||
|
Reference in New Issue
Block a user