unfinished, would appreciate feedback since I don't know if i made weird design choices
New helper functions. A few replace older code. All have been exposed to Lua
K_PlayerHasItemOut(player_t *player)
: Checks if the player has an item out, EX: Orbinaut spawning.
K_AffectedByHyuduro(player_t *player)
: Checks if the player is being affected by an hyuduro item; item being stolen or given.
K_PlayerAttackWasPressed(player_t *player)
: Checks if the attack/item_use button was pressed on the current frame, but not the last.
K_IsGenericItemUsable(player_t *player)
: Returns true if item isn't out and not affected by a hyuduro.
Added New "ItemHeldThinker" Hook
this is for overwriting existing item behavior, or making new behavior for a lua defined item
Hook format: addHook("ItemHeldThinker", functionname, KITEM_ITEMTYPE)
Function format: function(player player_t)
Function return value: Boolean (override default behavior?)
itemusetest.lua ringracers0025
identifier
when using K_RegisterItem
give
command, and debugitem
cvar
luaitem_
cvars when K_RegisterItem is used. (you cannot register cvars that start with "luaitem_" normally)