Skip to content

Commit

Permalink
Merge branch 'main' into asset-log
Browse files Browse the repository at this point in the history
  • Loading branch information
GoldenGnu committed Oct 18, 2024
2 parents 50ddbf5 + 738c115 commit d491f2a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -554,6 +554,9 @@ void updateData() {
myLocations.add(asset.getLocation().getRegion());
}
for (MyIndustryJob industryJob : program.getIndustryJobsList()) {
if (!industryJob.isNotDeliveredToAssets()) {
continue; //Only open industry jobs
}
myLocations.add(industryJob.getLocation().getLocation());
myLocations.add(industryJob.getLocation().getSystem());
myLocations.add(industryJob.getLocation().getConstellation());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ protected void addContracts(List<MyContract> contractItems, Map<String, Value> v
//Transporting cargo (will get collateral back)
if (acceptor != null) {
//Not Done & Balance Updated = Add Collateral
//If ballance is not updated, there is nothing to counter...
//If balance is not updated, there is nothing to counter...
if (balanceUpdated(contract.getDateIssued(), acceptor) && contract.isInProgress()) {
addContractCollateral(contract, values, total, date, acceptor.getOwnerName()); //OK
}
Expand All @@ -260,14 +260,14 @@ protected void addContracts(List<MyContract> contractItems, Map<String, Value> v
if (issuer != null) { //Issuer
if (contract.isOpen()) { //Not Completed
//Not Done & Balance Updated = Add Reward (We still own the isk, until the contract is completed)
//If ballance is not updated, there is nothing to counter...
//If balance is not updated, there is nothing to counter...
if (balanceUpdated(contract.getDateIssued(), issuer)) {
//Buying: +Reward
addContractValue(values, total, date, issuer.getOwnerName(), contract.getReward()); //OK
} // else: Selling: we do not own the price isk, until the contract is completed
} else if (contract.isCompletedSuccessful()) { //Completed
//Done & Ballance not updated yet = Add Price + Remove Reward (Contract completed, update with the current values)
//If ballance is updated, so are all the values
//Done & Balance not updated yet = Add Price + Remove Reward (Contract completed, update with the current values)
//If balance is updated, so are all the values
if (balanceNotUpdated(contract.getDateCompleted(), issuer)) { //NOT TESTED
//Sold: +Price
addContractValue(values, total, date, issuer.getOwnerName(), contract.getPrice());
Expand All @@ -277,8 +277,8 @@ protected void addContracts(List<MyContract> contractItems, Map<String, Value> v
}
}
if (acceptor != null && contract.isCompletedSuccessful()) { //Completed
//Done & Ballance not updated yet = Remove Price & Add Reward (Contract completed, update with the current values)
//If ballance is updated, so are all the values
//Done & Balance not updated yet = Remove Price & Add Reward (Contract completed, update with the current values)
//If balance is updated, so are all the values
if (balanceNotUpdated(contract.getDateCompleted(), acceptor)) { //NOT TESTED
//Bought: -Price
addContractValue(values, total, date, acceptor.getOwnerName(), -contract.getPrice());
Expand Down

0 comments on commit d491f2a

Please sign in to comment.