10 lines
312 B
GDScript
10 lines
312 B
GDScript
extends Node3D
|
|
|
|
func reflect_bundle(p_bundle: Dictionary) -> void:
|
|
var item = GameState.fetch().INVENTORY_ITEM_DB[p_bundle["item_id"]]
|
|
$Sprite3D.texture = item.icon
|
|
if item.stackable:
|
|
$CountLabel.text = str(p_bundle["count"]) + "/" + str(item.stack_limit)
|
|
else:
|
|
$CountLabel.text = str(p_bundle["count"])
|