Skip to content

Commit

Permalink
Set parts as brand new for specific resupply types.
Browse files Browse the repository at this point in the history
Updated the Resupply logic to mark parts as brand new for all resupply types except loot and smuggler. This ensures accurate tracking of part conditions in applicable scenarios.
  • Loading branch information
IllianiCBT committed Jan 29, 2025
1 parent 8e239fa commit 408c636
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -636,6 +636,11 @@ private Map<Part, PartDetails> applyWarehouseWeightModifiers(Set<PartInUse> part

Part part = partInUse.getPartToBuy().getAcquisitionPart();

if ((resupplyType != ResupplyType.RESUPPLY_LOOT)
&& (resupplyType != ResupplyType.RESUPPLY_SMUGGLER)) {
part.setBrandNew(true);

Check warning

Code scanning / CodeQL

Dereferenced variable may be null Warning

Variable
part
may be null at this access as suggested by
this
null guard.
}

if (part == null) {
continue;
}
Expand Down

0 comments on commit 408c636

Please sign in to comment.