Les joueurs ne peuvent plus créer de signes
Les commandes /signe+ / /signe
This commit is contained in:
parent
ec24126e75
commit
8844f76b65
@ -206,16 +206,16 @@ export class RdDCommands {
|
||||
let rollMode = game.settings.get("core", "rollMode");
|
||||
if (["gmroll", "blindroll"].includes(rollMode)) {
|
||||
msg["whisper"] = ChatMessage.getWhisperRecipients("GM");
|
||||
}
|
||||
if (rollMode === "blindroll"){
|
||||
}
|
||||
if (rollMode === "blindroll") {
|
||||
msg["blind"] = true;
|
||||
}
|
||||
}
|
||||
msg["type"] = 0;
|
||||
|
||||
if (!this.commandsTable) {
|
||||
this._registerCommands();
|
||||
}
|
||||
|
||||
|
||||
let command = commandLine[0].toLowerCase();
|
||||
if (this._isCommandHandled(command)) {
|
||||
let params = commandLine.slice(1);
|
||||
@ -225,7 +225,7 @@ export class RdDCommands {
|
||||
return false;
|
||||
}
|
||||
|
||||
_isCommandHandled(command){
|
||||
_isCommandHandled(command) {
|
||||
return this.commandsTable[command] != undefined;
|
||||
}
|
||||
|
||||
@ -331,7 +331,7 @@ export class RdDCommands {
|
||||
diff = 0;
|
||||
}
|
||||
const caracName = params[0];
|
||||
let competence = length > 1 ? actors[0].getCompetence(Misc.join(params.slice(1, length), ' ')) : {name:undefined};
|
||||
let competence = length > 1 ? actors[0].getCompetence(Misc.join(params.slice(1, length), ' ')) : { name: undefined };
|
||||
if (competence) {
|
||||
for (let actor of actors) {
|
||||
await actor.rollCaracCompetence(caracName, competence.name, diff);
|
||||
@ -448,17 +448,27 @@ export class RdDCommands {
|
||||
}
|
||||
|
||||
async creerSignesDraconiques() {
|
||||
DialogCreateSigneDraconique.createSigneForActors();
|
||||
if (game.user.isGM) {
|
||||
DialogCreateSigneDraconique.createSigneForActors();
|
||||
}
|
||||
else {
|
||||
ui.notifications.warn("Seul le MJ est autorisé à utiliser la commande /signe");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
async supprimerSignesDraconiquesEphemeres() {
|
||||
game.actors.forEach(actor => {
|
||||
const ephemeres = actor.items.filter(item => item.type = 'signedraconique' && item.system.ephemere);
|
||||
if (ephemeres.length > 0) {
|
||||
actor.deleteEmbeddedDocuments("Item", ephemeres.map(item => item.id));
|
||||
}
|
||||
});
|
||||
if (game.user.isGM) {
|
||||
game.actors.forEach(actor => {
|
||||
const ephemeres = actor.items.filter(item => item.type = 'signedraconique' && item.system.ephemere);
|
||||
if (ephemeres.length > 0) {
|
||||
actor.deleteEmbeddedDocuments("Item", ephemeres.map(item => item.id));
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
ui.notifications.warn("Seul le MJ est autorisé à utiliser la commande /signe");
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user