added inventory equipment system
This commit is contained in:
@@ -504,24 +504,14 @@ func _process_pickup_on_server(player: Node):
|
||||
player.character_stats.add_item(item)
|
||||
print(name, " picked up item: ", item.item_name, " (added to inventory)")
|
||||
elif item.item_type == Item.ItemType.Restoration:
|
||||
# Consumable item - use immediately
|
||||
# Consumable item - add to inventory (use with F key in inventory)
|
||||
if player.character_stats:
|
||||
# Apply modifiers (hp, mp, etc.)
|
||||
if item.modifiers.has("hp"):
|
||||
var hp_heal = item.modifiers["hp"]
|
||||
if player.has_method("heal"):
|
||||
player.heal(hp_heal)
|
||||
if item.modifiers.has("mp"):
|
||||
var mana_amount = item.modifiers["mp"]
|
||||
player.character_stats.restore_mana(mana_amount)
|
||||
|
||||
# TODO: Handle other modifiers (dodge_chance, res_all, etc.) - these would need duration tracking
|
||||
|
||||
print(name, " used item: ", item.item_name)
|
||||
player.character_stats.add_item(item)
|
||||
print(name, " picked up item: ", item.item_name, " (added to inventory)")
|
||||
|
||||
# Show floating text with item name
|
||||
# Show floating text with item name (uppercase)
|
||||
var items_texture = load(item.spritePath)
|
||||
var display_text = item.item_name
|
||||
var display_text = item.item_name.to_upper() # Always uppercase
|
||||
var text_color = Color.WHITE
|
||||
|
||||
# Color code based on item type
|
||||
|
||||
Reference in New Issue
Block a user