/tmra renvoie une tmr aléatoire
This commit is contained in:
		| @@ -32,7 +32,7 @@ export class RdDCommands { | ||||
|       rddCommands.registerCommand({ path: ["/nom"], func: (content, msg, params) => RdDNameGen.getName(msg, params), descr: "Génère un nom aléatoire" }); | ||||
|  | ||||
|       rddCommands.registerCommand({ | ||||
|       path: ["/tmra"], func: (content, msg, params) => rddCommands.getTMRAleatoire(msg, params), | ||||
|         path: ["/tmra"], func: (content, msg, params) => rddCommands.getTMRAleatoire(msg, params), | ||||
|         descr: `Tire une case aléatoire des Terres médianes | ||||
|           <br><strong>/tmra forêt</strong> détermine une 'forêt' aléatoire | ||||
|           <br><strong>/tmra</strong> détermine une case aléatoire dans toutes les TMR` }); | ||||
| @@ -241,7 +241,7 @@ export class RdDCommands { | ||||
|   getTMRAleatoire(msg, params) { | ||||
|     if (params.length < 2) { | ||||
|       let type = params[0]; | ||||
|       const tmr = TMRUtility.getTMRAleatoire(it => it.type == type); | ||||
|       const tmr = TMRUtility.getTMRAleatoire(type ? (it => it.type == type) : (it => true)); | ||||
|       RdDCommands._chatAnswer(msg, `Case aléatoire: ${tmr.coord} - ${tmr.label}`); | ||||
|     } | ||||
|     else { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user