feat: batch NPC import, ally/enemy gen, map sync, UI shortcuts
- batch NPC creator: import images from dir → actors (dedup, folder) - ally/enemy generator: data tables, D66 specials, tests (39 pass) - sector map sync: DialogV2 player view, socket v13/v14, sync click pos - actor/scene directory: shortcut buttons (Commerce, PNJ, Map, Sync vue) - closeImagePopout: GM closes player portraits via socket - canvasSync: force same canvas view on all players - FilePicker: v14 folder picker support with v13 fallback - cleanup: debug logs, template dedup, return guards
This commit is contained in:
+4
-10
@@ -16,9 +16,10 @@ let _pendingHandle = false;
|
||||
|
||||
/* ───── Fonctions partagées ───── */
|
||||
|
||||
async function openMap(sector, subsector) {
|
||||
const app = new SectorMapApp(sector, subsector);
|
||||
async function openMap(sector, subsector, { readOnly = false } = {}) {
|
||||
const app = new SectorMapApp(sector, subsector, { readOnly });
|
||||
await app.render({ force: true });
|
||||
return app;
|
||||
}
|
||||
|
||||
async function handleSectorCommand(sector, subsector) {
|
||||
@@ -139,16 +140,9 @@ Hooks.on('preCreateChatMessage', (message, data, options) => {
|
||||
}
|
||||
});
|
||||
|
||||
/* ───── Socket (synchronisation MJ → joueurs) ───── */
|
||||
/* ───── Socket (synchronisation MJ → joueurs) ───── voir sectorSocket.js ───── */
|
||||
|
||||
Hooks.once('ready', () => {
|
||||
game.socket.on(`module.${MODULE_ID}`, (data) => {
|
||||
if (data?.type !== 'sectorMapSync') return;
|
||||
if (game.user?.isGM) return;
|
||||
openMap(data.sector, data.subsector);
|
||||
});
|
||||
|
||||
// Clics sur les liens de monde dans les journals de trajet
|
||||
document.addEventListener('click', (event) => {
|
||||
const link = event.target.closest('.mgt2-world-link');
|
||||
if (!link) return;
|
||||
|
||||
Reference in New Issue
Block a user