dnd5-scripts/mercenariesHirePlaces.js
2026-06-17 22:32:48 +03:00

33 lines
1.4 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

await dv.view("scripts/utils");
await dv.view("scripts/locations");
await dv.view("scripts/locationTypesList");
// Асинхронная функция для запуска отображения таблицы
async function run_show_table(...args) {
let dv = args[0].arg1;
let targetLocations = args[0].arg2; // Предполагается, что это массив целевых локаций
let distributeMagicItemsTemplateName = args[0].arg3; // Предполагается, что это массив целевых локаций
let title = "Места найма наёмников";
const locationTypesArray = ["Tavern", "Guild Hall", "Inn", "Arena", "Barracks", "Port", "Training Hall", "Secret Hideout", "Thieves' Guild", "Dock", "Training Grounds", "Circus", "Caravanserai"];
let goodsAndServicesArray = [];
let basePath = this.app.vault.adapter.basePath; // Получаем базовый путь к хранилищу
dv.span(`## ${title}`);
// Вставляем содержимое шаблона-заметки
await dv.utils.displayNoteContent(dv, distributeMagicItemsTemplateName);
// Отображаем таблицу с локациями
dv.locationTypesList.show_table(
dv,
targetLocations,
locationTypesArray,
goodsAndServicesArray,
basePath
);
}
run_show_table(input);