Gestion de l'import skill/categories
This commit is contained in:
@ -1,3 +1,5 @@
|
||||
import { RFRPUtility } from "../../rfrp-utility.js";
|
||||
|
||||
export default class RMSSToolsSCImporter extends FormApplication {
|
||||
|
||||
constructor(selectOptions, character) {
|
||||
@ -42,13 +44,13 @@ export default class RMSSToolsSCImporter extends FormApplication {
|
||||
const skillCategoryData = await pack.getIndex();
|
||||
|
||||
console.log("Importing New Skills/Skill Categories.");
|
||||
|
||||
let gameSystem = RFRPUtility.getGameSystem();
|
||||
for (const sc of skillCategoryData) {
|
||||
const newitem = await pack.getDocument(sc._id);
|
||||
|
||||
|
||||
let newDocuments = [];
|
||||
if (newitem.type === itemType) {
|
||||
console.log(newitem);
|
||||
if (newitem.type === itemType && (newitem.system.game_system === "common" || newitem.system.game_system === gameSystem)) {
|
||||
//console.log(newitem);
|
||||
newDocuments.push(newitem);
|
||||
}
|
||||
if (newDocuments.length > 0) {
|
||||
|
Reference in New Issue
Block a user