mirror of
https://github.com/thepaperpilot/Advent-Incremental.git
synced 2025-03-21 21:51:45 +00:00
Improve sapling and tree effect displays
This commit is contained in:
parent
5a1df95001
commit
713642aa76
1 changed files with 19 additions and 28 deletions
|
@ -464,6 +464,15 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
}
|
||||
});
|
||||
|
||||
const netSaplingGain = computed(() => Decimal.sub(
|
||||
computedAutoCuttingAmount.value,
|
||||
computedAutoPlantingAmount.value
|
||||
));
|
||||
const netTreeGain = computed(() => Decimal.sub(
|
||||
computedAutoPlantingAmount.value,
|
||||
computedAutoCuttingAmount.value
|
||||
));
|
||||
|
||||
return {
|
||||
name,
|
||||
color,
|
||||
|
@ -513,20 +522,11 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
color="green"
|
||||
style="margin-bottom: 0"
|
||||
effectDisplay={
|
||||
Decimal.neq(
|
||||
Decimal.sub(
|
||||
computedAutoCuttingAmount.value,
|
||||
computedAutoPlantingAmount.value
|
||||
),
|
||||
0
|
||||
)
|
||||
? `+${format(
|
||||
Decimal.sub(
|
||||
computedAutoCuttingAmount.value,
|
||||
computedAutoPlantingAmount.value
|
||||
)
|
||||
)}/s`
|
||||
: undefined
|
||||
{
|
||||
[-1]: `${format(netSaplingGain.value)}/s`,
|
||||
0: undefined,
|
||||
1: `+${format(netSaplingGain.value)}/s`
|
||||
}[Decimal.compare(netSaplingGain.value, 0)]
|
||||
}
|
||||
/>
|
||||
<MainDisplay
|
||||
|
@ -534,20 +534,11 @@ const layer = createLayer(id, function (this: BaseLayer) {
|
|||
color="green"
|
||||
style="margin-bottom: 0"
|
||||
effectDisplay={
|
||||
Decimal.neq(
|
||||
Decimal.sub(
|
||||
computedAutoPlantingAmount.value,
|
||||
computedAutoCuttingAmount.value
|
||||
),
|
||||
0
|
||||
)
|
||||
? `+${format(
|
||||
Decimal.sub(
|
||||
computedAutoPlantingAmount.value,
|
||||
computedAutoCuttingAmount.value
|
||||
)
|
||||
)}/s`
|
||||
: undefined
|
||||
{
|
||||
[-1]: `${format(netTreeGain.value)}/s`,
|
||||
0: undefined,
|
||||
1: `+${format(netTreeGain.value)}/s`
|
||||
}[Decimal.compare(netTreeGain.value, 0)]
|
||||
}
|
||||
/>
|
||||
<Spacer />
|
||||
|
|
Loading…
Add table
Reference in a new issue