Add next task balance
This commit is contained in:
parent
9c6c1243cf
commit
c1c832c21c
@ -111,6 +111,14 @@
|
|||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
<resource-line
|
||||||
|
v-if="villageState.required.active"
|
||||||
|
:title="'Баланс след.:'"
|
||||||
|
:hint="'Баланс следующей задачи'"
|
||||||
|
:resources="villageState.required.balance"
|
||||||
|
:time1="renderGatheringTime(villageState.required.time)"
|
||||||
|
/>
|
||||||
|
|
||||||
<resource-line
|
<resource-line
|
||||||
v-for="queueState of villageState.queues"
|
v-for="queueState of villageState.queues"
|
||||||
v-bind:key="villageState.id + queueState.queue"
|
v-bind:key="villageState.id + queueState.queue"
|
||||||
|
@ -34,6 +34,10 @@ interface ResourceLineState {
|
|||||||
* Time to gather all type of resources (slowest time)
|
* Time to gather all type of resources (slowest time)
|
||||||
*/
|
*/
|
||||||
time: GatheringTime;
|
time: GatheringTime;
|
||||||
|
/**
|
||||||
|
* Is active - resources not equals to zero.
|
||||||
|
*/
|
||||||
|
active: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface VillageProductionQueueState {
|
interface VillageProductionQueueState {
|
||||||
@ -99,6 +103,7 @@ function calcResourceBalance(
|
|||||||
resources,
|
resources,
|
||||||
balance: current.sub(resources),
|
balance: current.sub(resources),
|
||||||
time: timeToAllResources(current, resources, performance),
|
time: timeToAllResources(current, resources, performance),
|
||||||
|
active: !resources.empty(),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user