@@ -450,19 +450,27 @@ public String getDesc() {
450
450
String details = getDetails ();
451
451
452
452
if (details != null && !details .isBlank ()) {
453
- toReturn .append ("</b><br/ >" ).append (getDetails ()).append ("<br/ >" );
453
+ toReturn .append ("</b><br>" ).append (getDetails ()).append ("<br>" );
454
454
}
455
455
456
- if (this instanceof mekhq .campaign .parts .equipment .AmmoBin ammoBin ) {
457
- if (campaign .getQuartermaster () != null ) {
458
- toReturn .append ("<br> <b>In Warehouse:</b> " )
459
- .append (campaign .getQuartermaster ().getAmmoAvailable (ammoBin .getType ()))
460
- .append (' ' );
456
+ if (this .isSalvaging ()) {
457
+ int inStock = 0 ;
458
+ if (this instanceof mekhq .campaign .parts .equipment .AmmoBin ammoBin ) {
459
+ if (campaign .getQuartermaster () != null ) {
460
+ inStock = campaign .getQuartermaster ().getAmmoAvailable (ammoBin .getType ());
461
+ }
462
+ } else if (campaign .getWarehouse () != null ) {
463
+ inStock = campaign .getWarehouse ().getSparePartsCount (this );
461
464
}
462
- } else if (campaign .getWarehouse () != null ) {
463
- toReturn .append ("<br> <b>In Warehouse:</b> " )
464
- .append (campaign .getWarehouse ().getSparePartsCount (this ))
465
- .append (' ' );
465
+ String inStockText = inStock == 0 ?
466
+ ReportingUtilities .messageSurroundedBySpanWithColor (MekHQ .getMHQOptions ()
467
+ .getFontColorNegativeHexColor (), "None in stock" ) :
468
+ ReportingUtilities .messageSurroundedBySpanWithColor (MekHQ .getMHQOptions ()
469
+ .getFontColorPositiveHexColor (), String .valueOf (inStock ) + " in stock" );
470
+
471
+ toReturn .append (inStockText ).append ("<br>" );
472
+ } else {
473
+ toReturn .append ("<br>" );
466
474
}
467
475
468
476
if (getSkillMin () <= SkillType .EXP_ELITE ) {
0 commit comments