Slot.gd

Slot object. Store current equipped item data.

extends Control
class_name slot

var equipped_item : item # item object that equipped tho current slot

So we can get access to them through Inventory by using:

func _ready():
    # slot id can be: pistol, rifle, outfit, belt1, belt2, belt3, belt4
    # will return currently equipped item data
    GameManager.Gui.InventoryWindow._GetItemInSlot(slot_id : string).equipped_item

Last updated