1
1
mirror of https://github.com/Rundll86/Dog-Lynx-And-HCN.git synced 2026-05-27 22:41:56 +08:00

Add SVG assets for strawberries and watermelons with import configurations

- Added `strawberry-a.svg` and its corresponding import file `strawberry-a.svg.import`.
- Added `watermelon-a.svg` and its corresponding import file `watermelon-a.svg.import`.
- Added `watermelon-c.svg` and its corresponding import file `watermelon-c.svg.import`.
- Configured texture compression settings for all SVG assets to optimize rendering.
This commit is contained in:
2025-08-27 11:48:54 +08:00
parent b3b4fdafc2
commit 23bc9b3e20
49 changed files with 1498 additions and 15 deletions
+10 -4
View File
@@ -45,10 +45,10 @@ func _ready():
var count = costCounts[i]
var costShow: ItemShow = preload("res://components/UI/ItemShow.tscn").instantiate()
costShow.type = cost
costShow.count = count * multipiler()
costShow.count = int(count * multipiler())
costsBox.add_child(costShow)
func apply(entity: EntityBase):
func allHad(entity: EntityBase) -> bool:
var allHave = true
for i in range(min(costs.size(), costCounts.size())):
var item = costs[i]
@@ -56,6 +56,9 @@ func apply(entity: EntityBase):
if entity.inventory[item] < count:
allHave = false
break
return allHave
func apply(entity: EntityBase):
var allHave = allHad(entity)
if allHave:
for i in range(min(costs.size(), costCounts.size())):
var item = costs[i]
@@ -68,5 +71,8 @@ func apply(entity: EntityBase):
if !applier or applier.call(entity, value):
entity.fields[field] += value
return allHave
func multipiler():
return 1 - UIState.player.fields.get(FieldStore.Entity.PRICE_REDUCTION)
func multipiler() -> float:
if is_instance_valid(UIState.player):
return 1 - UIState.player.fields.get(FieldStore.Entity.PRICE_REDUCTION)
else:
return 1