#pragma once

#include <common/items/item.qh>

CLASS(Pickup, GameItem)
#ifdef GAMEQC
    ATTRIB(Pickup, m_model, Model);
    ATTRIB(Pickup, m_skin, int);
    ATTRIB(Pickup, m_sound, Sound, SND_ITEMPICKUP);
#endif
    ATTRIB(Pickup, netname, string);
    ATTRIB(Pickup, m_name, string);
    ATTRIB(Pickup, m_color, vector, '1 1 1');
    METHOD(Pickup, show, void(Pickup this))
    {
        TC(Pickup, this);
        LOG_INFOF("%s: %s", etos(this), this.m_name);
    }
    ATTRIB(Pickup, m_itemid, int, 0);
#ifdef SVQC
    ATTRIB(Pickup, m_mins, vector, ITEM_D_MINS);
    ATTRIB(Pickup, m_maxs, vector, ITEM_D_MAXS);
    ATTRIB(Pickup, m_botvalue, int, 0);
    ATTRIB(Pickup, m_itemflags, int, 0);
    float generic_pickupevalfunc(entity player, entity item);
    ATTRIB(Pickup, m_pickupevalfunc, float(entity player, entity item), generic_pickupevalfunc);
    ATTRIB(Pickup, m_respawntime, float);
    ATTRIB(Pickup, m_respawntimejitter, float);
    ATTRIB(Pickup, m_pickupanyway, bool);
    ATTRIB(Pickup, m_iteminit, void(Pickup this, entity item));
    float Item_GiveTo(entity item, entity player);
    METHOD(Pickup, giveTo, bool(Pickup this, entity item, entity player));
    bool ITEM_HANDLE(Pickup, Pickup this, entity item, entity player);
#endif
ENDCLASS(Pickup)
