Files
src/miniquake2/game/gameplay/item_rules.ml
Provides miniquake2 game gameplay item rules facilities for this project.
- Package
miniquake2.game.gameplay.item_rules- Reachable
- Yes
Imports
Declarations
# Add_Ammo
function Add_Ammo(player, item, count)
Add ammo.
| Parameter | Type | Default | Description |
|---|
player | dynamic | — | player value consumed by this operation. |
item | dynamic | — | item value consumed by this operation. |
count | dynamic | — | Number of items or units to process. |
View source
# ammoMaximum
function ammoMaximum(inventory, tag)
Return the ammo maximum value.
| Parameter | Type | Default | Description |
|---|
inventory | dynamic | — | inventory value consumed by this operation. |
tag | dynamic | — | tag value consumed by this operation. |
View source
# DoRespawn
function DoRespawn(itemEntity, time)
Return the do respawn value.
| Parameter | Type | Default | Description |
|---|
itemEntity | dynamic | — | itemEntity value consumed by this operation. |
time | dynamic | — | time value consumed by this operation. |
View source
# Drop_Ammo
function Drop_Ammo(player, item, registry, worldEntityNumber)
Drop ammo.
| Parameter | Type | Default | Description |
|---|
player | dynamic | — | player value consumed by this operation. |
item | dynamic | — | item value consumed by this operation. |
registry | dynamic | — | registry value consumed by this operation. |
worldEntityNumber | dynamic | — | worldEntityNumber value consumed by this operation. |
View source
# Drop_Weapon
function Drop_Weapon(player, item, registry, worldEntityNumber, dmFlags)
Drop weapon.
| Parameter | Type | Default | Description |
|---|
player | dynamic | — | player value consumed by this operation. |
item | dynamic | — | item value consumed by this operation. |
registry | dynamic | — | registry value consumed by this operation. |
worldEntityNumber | dynamic | — | worldEntityNumber value consumed by this operation. |
dmFlags | dynamic | — | dmFlags value consumed by this operation. |
View source
# findByClassName
function findByClassName(registry, className)
Find by class name.
| Parameter | Type | Default | Description |
|---|
registry | dynamic | — | registry value consumed by this operation. |
className | dynamic | — | className value consumed by this operation. |
View source
# findByPickupName
function findByPickupName(registry, pickupName)
Finds by pickup name used by the miniquake2 game gameplay item rules module.
| Parameter | Type | Default | Description |
|---|
registry | dynamic | — | registry value consumed by this operation. |
pickupName | dynamic | — | pickupName value consumed by this operation. |
View source
# getByIndex
function getByIndex(registry, index)
Return by index.
| Parameter | Type | Default | Description |
|---|
registry | dynamic | — | registry value consumed by this operation. |
index | dynamic | — | Zero-based index of the affected item. |
View source
# inventoryCount
function inventoryCount(player, item)
Return the inventory count.
| Parameter | Type | Default | Description |
|---|
player | dynamic | — | player value consumed by this operation. |
item | dynamic | — | item value consumed by this operation. |
View source
# Pickup_Ammo
function Pickup_Ammo(itemEntity, player, context, registry)
Pick up ammo.
| Parameter | Type | Default | Description |
|---|
itemEntity | dynamic | — | itemEntity value consumed by this operation. |
player | dynamic | — | player value consumed by this operation. |
context | dynamic | — | Context that carries state for the operation. |
registry | dynamic | — | registry value consumed by this operation. |
View source
# Pickup_Item
function Pickup_Item(itemEntity, player, context, registry)
Pick up item.
| Parameter | Type | Default | Description |
|---|
itemEntity | dynamic | — | itemEntity value consumed by this operation. |
player | dynamic | — | player value consumed by this operation. |
context | dynamic | — | Context that carries state for the operation. |
registry | dynamic | — | registry value consumed by this operation. |
View source
# Pickup_Weapon
function Pickup_Weapon(itemEntity, player, context, registry)
Pick up weapon.
| Parameter | Type | Default | Description |
|---|
itemEntity | dynamic | — | itemEntity value consumed by this operation. |
player | dynamic | — | player value consumed by this operation. |
context | dynamic | — | Context that carries state for the operation. |
registry | dynamic | — | registry value consumed by this operation. |
View source
# SetRespawn
function SetRespawn(itemEntity, delay, time)
Set respawn.
| Parameter | Type | Default | Description |
|---|
itemEntity | dynamic | — | itemEntity value consumed by this operation. |
delay | dynamic | — | delay value consumed by this operation. |
time | dynamic | — | time value consumed by this operation. |
View source
# Use_Weapon
function Use_Weapon(player, item, registry, selectEmpty)
Use weapon.
| Parameter | Type | Default | Description |
|---|
player | dynamic | — | player value consumed by this operation. |
item | dynamic | — | item value consumed by this operation. |
registry | dynamic | — | registry value consumed by this operation. |
selectEmpty | dynamic | — | selectEmpty value consumed by this operation. |
View source