Athena.systems.inventory.weapons ​
Functions ​
addComponent ​
Usage
Athena.systems.inventory.weapons.addComponent(player
, type
, slot
, component
): Promise
<boolean
>
Add a weapon component to a weapon at a given slot.
Export
Parameters ​
Name | Type |
---|---|
player | Player |
type | "inventory" | "toolbar" |
slot | number |
component | string | number |
Returns ​
Promise
<boolean
>
Defined in ​
server/systems/inventory/weapons.ts:67
get ​
Usage
Athena.systems.inventory.weapons.get(dataSet
): player
[]
Return all weapons from a given data set.
Parameters ​
Name | Type |
---|---|
dataSet | StoredItem [] |
Returns ​
player
[]
Defined in ​
server/systems/inventory/weapons.ts:13
override ​
Usage
Athena.systems.inventory.weapons.override(functionName
, callback
): any
Used to override inventory item weapon functionality
Parameters ​
Name | Type |
---|---|
functionName | "update" |
callback | (player : Player ) => any |
Returns ​
any
Defined in ​
server/systems/inventory/weapons.ts:160
removeAll ​
Usage
Athena.systems.inventory.weapons.removeAll(dataSet
): player
[]
Remove all weapons from a given data set.
Parameters ​
Name | Type |
---|---|
dataSet | StoredItem [] |
Returns ​
player
[]
Defined in ​
server/systems/inventory/weapons.ts:40
update ​
Usage
Athena.systems.inventory.weapons.update(player
): any
Looks into the item toolbar and determines what weapons to equip / unequip.
Parameters ​
Name | Type | Description |
---|---|---|
player | Player | An alt:V Player Entity |
Returns ​
any