mirror of
https://github.com/Rundll86/Dog-Lynx-And-HCN.git
synced 2026-05-28 06:51:54 +08:00
Add new styleboxes and import energy texture
- Created a new SVG import for the energy texture, enabling better resource management and compression. - Added a StyleBoxFlat resource for the top left panel with specified margins, background color, border width, and corner radius. - Introduced a StyleBoxFlat resource for the top panel with similar properties, ensuring consistent UI design across panels.
This commit is contained in:
@@ -45,21 +45,21 @@ func _ready():
|
||||
var count = costCounts[i]
|
||||
var costShow: ItemShow = preload("res://components/UI/ItemShow.tscn").instantiate()
|
||||
costShow.type = cost
|
||||
costShow.count = count
|
||||
costShow.count = count * multipiler()
|
||||
costsBox.add_child(costShow)
|
||||
|
||||
func apply(entity: EntityBase):
|
||||
var allHave = true
|
||||
for i in range(min(costs.size(), costCounts.size())):
|
||||
var item = costs[i]
|
||||
var count = costCounts[i]
|
||||
var count = costCounts[i] * multipiler()
|
||||
if entity.inventory[item] < count:
|
||||
allHave = false
|
||||
break
|
||||
if allHave:
|
||||
for i in range(min(costs.size(), costCounts.size())):
|
||||
var item = costs[i]
|
||||
var count = costCounts[i]
|
||||
var count = costCounts[i] * multipiler()
|
||||
entity.inventory[item] -= count
|
||||
for i in range(min(fields.size(), fieldValues.size())):
|
||||
var field = fields[i]
|
||||
@@ -68,3 +68,5 @@ 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)
|
||||
Reference in New Issue
Block a user