Description:
Handle contracts without an associated organization.
Commit status:
[Not Reviewed]
References:
Diff options:
Comments:
0 Commit comments
0 Inline Comments
Unresolved TODOs:
There are no unresolved TODOs
@@ -217,10 +217,14 | |||
|
217 | 217 | && (contractStatus.status == ContractStatus.Proposed)) |
|
218 | 218 | { |
|
219 | 219 | try { |
|
220 | this.showContractIndicator = true; | |
|
221 |
|
|
|
222 | var name = GetComponent<NameAndDescriptionComponent>(organizationEntity).DisplayName; | |
|
223 | this.contracts.Add(name); | |
|
220 | this.showContractIndicator = true; | |
|
221 | if (HasComponent<RelatedOrganizationComponent>(entity)) | |
|
222 | { | |
|
223 | var organizationEntity = GetComponent<RelatedOrganizationComponent>(entity).Entity; | |
|
224 | var name = GetComponent<NameAndDescriptionComponent>(organizationEntity).DisplayName; | |
|
225 | this.contracts.Add(name); | |
|
226 | ||
|
227 | } | |
|
224 | 228 | } |
|
225 | 229 | catch (Exception e) |
|
226 | 230 | { |
@@ -127,6 +127,9 | |||
|
127 | 127 | { |
|
128 | 128 | organization_type = GetComponent<OrganizationTypeComponent>(contractOrganizations[organization_index]).type; |
|
129 | 129 | } |
|
130 | else { | |
|
131 | Logging.Debug(String.Format("Creating contract {0} without organizations.", message.name )); | |
|
132 | } | |
|
130 | 133 | |
|
131 | 134 | foreach (var (entity, status) in ReadEntities<AreaComponent>().SelectWhereF((e) => (e, GetComponent<ContractStatusComponent>(e)), (e) => ((e.Item2.status != ContractStatus.Broken) && (e.Item2.status != ContractStatus.Rejected) && (e.Item2.status != ContractStatus.Expired)))) { |
|
132 | 135 | var entitySquares = GetComponent<AreaComponent>(entity).squares; |
You need to be logged in to leave comments.
Login now