From c8e3e3118c998629dd33ce25cbba0bee38a585f2 Mon Sep 17 00:00:00 2001 From: GoldenGnu Date: Tue, 3 Oct 2023 15:42:49 +0200 Subject: [PATCH] New Feature: Added owned column to industry jobs/market orders/contracts --- .../eve/jeveasset/data/api/my/MyContract.java | 18 ++++++++++++++---- .../jeveasset/data/api/my/MyIndustryJob.java | 14 ++++++++++++-- .../jeveasset/data/api/my/MyMarketOrder.java | 10 ++++++++++ .../jeveasset/data/profile/ProfileData.java | 13 +++++++++++++ .../tabs/contracts/ContractsTableFormat.java | 14 ++++++++++++++ .../gui/tabs/jobs/IndustryJobTableFormat.java | 15 +++++++++++++++ .../gui/tabs/orders/MarketTableFormat.java | 15 +++++++++++++++ .../nikr/eve/jeveasset/i18n/TabsContracts.java | 2 ++ .../net/nikr/eve/jeveasset/i18n/TabsJobs.java | 2 ++ .../nikr/eve/jeveasset/i18n/TabsOrders.java | 2 ++ .../jeveasset/i18n/TabsContracts.properties | 2 ++ .../eve/jeveasset/i18n/TabsJobs.properties | 2 ++ .../eve/jeveasset/i18n/TabsOrders.properties | 2 ++ 13 files changed, 105 insertions(+), 6 deletions(-) diff --git a/src/main/java/net/nikr/eve/jeveasset/data/api/my/MyContract.java b/src/main/java/net/nikr/eve/jeveasset/data/api/my/MyContract.java index f2c46e7c4..6961f2f9f 100644 --- a/src/main/java/net/nikr/eve/jeveasset/data/api/my/MyContract.java +++ b/src/main/java/net/nikr/eve/jeveasset/data/api/my/MyContract.java @@ -42,16 +42,18 @@ public class MyContract extends RawContract implements LocationsType, OwnersType private String issuer = ""; private final Set owners = new HashSet<>(); private boolean esi = true; + private boolean owned; private boolean issuerAfterAssets = false; private boolean acceptorAfterAssets = false; public MyContract(RawContract rawContract) { super(rawContract); - owners.add(getIssuerID()); - owners.add(getIssuerCorpID()); - owners.add(getAssigneeID()); - owners.add(getAcceptorID()); + this.owners.add(getIssuerID()); + this.owners.add(getIssuerCorpID()); + this.owners.add(getAssigneeID()); + this.owners.add(getAcceptorID()); + this.owned = !rawContract.isForCorp(); } public String getTypeName() { @@ -204,6 +206,14 @@ public boolean isExpired() { return Settings.getNow().after(getDateExpired()); } + public boolean isOwned() { + return owned; + } + + public void setOwned(boolean owned) { + this.owned = owned; + } + public String getStatusFormatted() { return getStatusName(super.getStatus(), isExpired()); } diff --git a/src/main/java/net/nikr/eve/jeveasset/data/api/my/MyIndustryJob.java b/src/main/java/net/nikr/eve/jeveasset/data/api/my/MyIndustryJob.java index 6f8d6f034..6bb41b46e 100644 --- a/src/main/java/net/nikr/eve/jeveasset/data/api/my/MyIndustryJob.java +++ b/src/main/java/net/nikr/eve/jeveasset/data/api/my/MyIndustryJob.java @@ -205,14 +205,16 @@ public String getDescriptionOf(final MyIndustryJob job) { private String completedCharacter = ""; private MyBlueprint blueprint; private MyLocation location; + private boolean owned; public MyIndustryJob(final RawIndustryJob rawIndustryJob, final Item item, final Item output, final OwnerType owner) { super(rawIndustryJob); this.item = item; this.output = output; this.owner = owner; - owners.add(getInstallerID()); - owners.add(owner.getOwnerID()); + this.owners.add(getInstallerID()); + this.owners.add(owner.getOwnerID()); + this.owned = owner.isCharacter(); switch (getActivityID()) { case 0: @@ -392,6 +394,14 @@ public final boolean isInvention() { return getActivity() == IndustryActivity.ACTIVITY_REVERSE_INVENTION; } + public boolean isOwned() { + return owned; + } + + public void setOwned(boolean owned) { + this.owned = owned; + } + public IndustryActivity getActivity() { return activity; } diff --git a/src/main/java/net/nikr/eve/jeveasset/data/api/my/MyMarketOrder.java b/src/main/java/net/nikr/eve/jeveasset/data/api/my/MyMarketOrder.java index 89951c12a..3d6d5b43f 100644 --- a/src/main/java/net/nikr/eve/jeveasset/data/api/my/MyMarketOrder.java +++ b/src/main/java/net/nikr/eve/jeveasset/data/api/my/MyMarketOrder.java @@ -62,6 +62,7 @@ public class MyMarketOrder extends RawMarketOrder implements Comparable