#131 Commande astro ajoutée
This commit is contained in:
		@@ -84,6 +84,11 @@ export class RdDCalendrier extends Application {
 | 
			
		||||
    return day+" "+heuresList[month];
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  /* -------------------------------------------- */
 | 
			
		||||
  getCurrentHeure() {
 | 
			
		||||
    return heuresList[this.calendrier.heureRdD];
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  /* -------------------------------------------- */
 | 
			
		||||
  getCurrentDayIndex( ) {
 | 
			
		||||
    return (this.calendrier.moisRdD * 28) + this.calendrier.jour;
 | 
			
		||||
@@ -283,7 +288,7 @@ export class RdDCalendrier extends Application {
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
    else {
 | 
			
		||||
      ui.notifications.warn(this.data.name + " n'a pas d'heure de naissance, ou elle est incorrecte");
 | 
			
		||||
      ui.notifications.warn(name + " n'a pas d'heure de naissance, ou elle est incorrecte : " + heureNaissance);
 | 
			
		||||
    }
 | 
			
		||||
    return 0;
 | 
			
		||||
  }
 | 
			
		||||
 
 | 
			
		||||
@@ -53,6 +53,12 @@ export class RdDCommands {
 | 
			
		||||
      <br><strong>/payer 10d</strong> permet d'envoyer un message pour payer 10 deniers
 | 
			
		||||
      `
 | 
			
		||||
      });
 | 
			
		||||
      rddCommands.registerCommand({
 | 
			
		||||
        path: ["/astro"], func: (content, msg, params) => RdDUtility.afficherHeuresChanceMalchance(params[0]),
 | 
			
		||||
        descr: `Affiche les heures de chance et de malchance selon l'heure de naissance donnée en argument. Exemples:
 | 
			
		||||
      <br><strong>/astro Lyre</strong> 
 | 
			
		||||
      `
 | 
			
		||||
      });
 | 
			
		||||
      game.system.rdd.commands = rddCommands;
 | 
			
		||||
    }
 | 
			
		||||
  }
 | 
			
		||||
 
 | 
			
		||||
@@ -908,4 +908,13 @@ export class RdDUtility {
 | 
			
		||||
      d.render(true);
 | 
			
		||||
  }
 | 
			
		||||
  
 | 
			
		||||
  /* -------------------------------------------- */
 | 
			
		||||
  static afficherHeuresChanceMalchance( heureNaissance ) {
 | 
			
		||||
    let ajustement = game.system.rdd.calendrier.getAjustementAstrologique(heureNaissance.toLowerCase());
 | 
			
		||||
    ChatMessage.create( { 
 | 
			
		||||
      content: `Pour l'heure ${game.system.rdd.calendrier.getCurrentHeure()}, le modificateur de Chance/Malchance est de : ${ajustement}.`, 
 | 
			
		||||
      whisper: ChatMessage.getWhisperRecipients("MJ")
 | 
			
		||||
      } );     
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user