forked from public/foundryvtt-reve-de-dragon
		
	Fix de la migration quand l'heure est à 0
This commit is contained in:
		| @@ -99,7 +99,7 @@ export class RdDTimestamp { | |||||||
|     return `<img class="img-signe-heure" src="${signe.webp}" alt="${signe.label}"/>` |     return `<img class="img-signe-heure" src="${signe.webp}" alt="${signe.label}"/>` | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   static handleTimestampEditor(html, path, consumeTimestamp = async (path, timestamp) => {}) { |   static handleTimestampEditor(html, path, consumeTimestamp = async (path, timestamp) => { }) { | ||||||
|     const fields = { |     const fields = { | ||||||
|       annee: html.find(`input[name="${path}.annee"]`), |       annee: html.find(`input[name="${path}.annee"]`), | ||||||
|       mois: html.find(`select[name="${path}.mois"]`), |       mois: html.find(`select[name="${path}.mois"]`), | ||||||
| @@ -157,14 +157,13 @@ export class RdDTimestamp { | |||||||
|  |  | ||||||
|   static getWorldTime() { |   static getWorldTime() { | ||||||
|     let worldTime = game.settings.get(SYSTEM_RDD, WORLD_TIMESTAMP_SETTING); |     let worldTime = game.settings.get(SYSTEM_RDD, WORLD_TIMESTAMP_SETTING); | ||||||
|     if (worldTime.indexJour && worldTime.heureRdD) { |     if (worldTime.indexJour != undefined && worldTime.heureRdD != undefined) { | ||||||
|       // Migration |       // Migration | ||||||
|       worldTime = { |       worldTime = { | ||||||
|         indexDate: worldTime.indexJour, |         indexDate: worldTime.indexJour, | ||||||
|         indexMinute: worldTime.heureRdD * 120 + worldTime.minutesRelative |         indexMinute: worldTime.heureRdD * 120 + worldTime.minutesRelative | ||||||
|       }; |       }; | ||||||
|       RdDTimestamp.setWorldTime(new RdDTimestamp(worldTime)) |       RdDTimestamp.setWorldTime(new RdDTimestamp(worldTime)) | ||||||
|  |  | ||||||
|     } |     } | ||||||
|     return new RdDTimestamp(worldTime); |     return new RdDTimestamp(worldTime); | ||||||
|   } |   } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user