Correction sur heures de repos
# Conflicts: # module/actor.js
This commit is contained in:
parent
250b936fae
commit
cf185844af
@ -556,11 +556,9 @@ export class RdDActor extends RdDBaseActorSang {
|
|||||||
if (fatigue <= fatigueMin) {
|
if (fatigue <= fatigueMin) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
fatigue = Math.max(fatigueMin, this._calculRecuperationSegment(fatigue));
|
fatigue = Math.max(fatigueMin, this._calculRecuperationSegment(fatigue))
|
||||||
setTimeout( // On attend un peu pour que le message de récupération de r
|
await this.update({ 'system.sante.fatigue.value': fatigue });
|
||||||
async () => {
|
await new Promise(resolve => setTimeout(resolve, 200));
|
||||||
await this.update({ 'system.sante.fatigue.value': fatigue });
|
|
||||||
}, 200);
|
|
||||||
if (fatigue == 0) {
|
if (fatigue == 0) {
|
||||||
message.content += "Vous êtes complêtement reposé. ";
|
message.content += "Vous êtes complêtement reposé. ";
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user