ajout état des items

This commit is contained in:
rwanoux
2024-11-22 18:15:41 +01:00
parent 742f20874c
commit 3a53644213
+15
View File
@@ -28,6 +28,21 @@ export class VermineItem extends Item {
default:
break;
}
if (this.system.damages?.value) {
this.damagedLabel = this.system.damages.state[parseInt(this.system.damages?.value) - 1];
switch (this.damagedLabel) {
case "endommagé":
this.damagedIcon = '<i class="fas fa-exclamation-circle" style:"color="yellow"></i>';
break;
case "défectueux":
this.damagedIcon = '<i class="fas fa-exclamation-triangle" style:"color="orange"></i>';
break;
case "hors d'usage":
this.damagedIcon = '<i class="fas fa-star-exclamation" style:"color="red"></i>';
break;
}
}
}
/**