|
|
@@ -8,6 +8,8 @@
|
|
|
:treeImage="currentVillage.treeImage"
|
|
|
:treeName="currentVillage.treeName"
|
|
|
:treeAnimProps="currentVillage.treeImageAnimProps"
|
|
|
+ :treeOffsetX="appConfiguration.tree.offsetX"
|
|
|
+ :treeOffsetY="appConfiguration.tree.offsetY"
|
|
|
:fruitImage="appConfiguration.tree.fruitImage"
|
|
|
:backgroundImage="appConfiguration.tree.backgroundImage"
|
|
|
:animFertilize="appConfiguration.tree.animFertilize"
|
|
|
@@ -351,7 +353,7 @@ async function handlePickOrWaterOrFertilize(action: 'pick' | 'water' | 'fertiliz
|
|
|
toast(res, 4000);
|
|
|
break;
|
|
|
case 'water': {
|
|
|
- //await TreeApi.water(villageStore.currentVillage.id);
|
|
|
+ await TreeApi.water(villageStore.currentVillage.id);
|
|
|
hideLoading();
|
|
|
villageTreeRef.value?.playStateAnimation('water');
|
|
|
lastRefreshAction.value = 'water';
|
|
|
@@ -431,7 +433,7 @@ async function refreshVillageTreeInfo() {
|
|
|
const newVillage = requireNotNull(villageStore.currentVillage);
|
|
|
const oldLight = oldVillage.lightTotal;
|
|
|
const oldTreeName = oldVillage.treeName;
|
|
|
- lastAddLight.value = Math.max(0, oldLight - newVillage.lightTotal);
|
|
|
+ lastAddLight.value = Math.max(0, newVillage.lightTotal - oldLight);
|
|
|
lastLevelUp.value = oldTreeName !== newVillage.treeName ? newVillage.treeName : '';
|
|
|
} else {
|
|
|
lastAddLight.value = 0;
|