Skip to content

Commit

Permalink
Bug Fix: Delivered industry jobs was included in assets and stockpile…
Browse files Browse the repository at this point in the history
…s (Issue #480)
  • Loading branch information
GoldenGnu committed Oct 27, 2024
1 parent 0511258 commit 6d1cbc8
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -288,18 +288,17 @@ public final boolean isDone() {
}

public final boolean isNotDeliveredToAssets() {
return getStatus() != IndustryJobStatus.ARCHIVED //if ARCHIVED -> unknown if delivered or not -> false
return !isDone() //if not done -> not delivered to assets -> true
&& (owner.getAssetLastUpdate() == null //if null -> never updated -> not delivered to assets -> true
|| getCompletedDate() == null //if null -> not completed -> not delivered to assets -> true
|| owner.getAssetLastUpdate().before(getCompletedDate() //if assets last updated before completed date -> not delivered to assets -> true
));
|| owner.getAssetLastUpdate().before(getCompletedDate()) //if assets last updated before completed date -> not delivered to assets -> true
);
}

public final boolean isRemovedFromAssets() {
return owner.getAssetLastUpdate() != null //if null -> never updated -> not removed from assets -> false
&& getStartDate() != null //if null -> not started -> not removed from assets -> false
&& owner.getAssetLastUpdate().after(getStartDate() //if assets last updated after started date -> removed from assets -> true
);
&& owner.getAssetLastUpdate().after(getStartDate()); //if assets last updated after started date -> removed from assets -> true
}

public final boolean isManufacturing() {
Expand Down

0 comments on commit 6d1cbc8

Please sign in to comment.