# armorByIndex
function armorByIndex(registry, index)Return the armor by index.
| Parameter | Type | Default | Description |
|---|---|---|---|
registry | dynamic | — | registry value consumed by this operation. |
index | dynamic | — | Zero-based index of the affected item. |
src/miniquake2/game/gameplay/powerups.mlProvides miniquake2 game gameplay powerups facilities for this project.
miniquake2/game/gameplay/constants.ml as gpconstants → src/miniquake2/game/gameplay/constants.mlminiquake2/game/gameplay/item_rules.ml as gprules → src/miniquake2/game/gameplay/item_rules.mlminiquake2/game/gameplay/types.ml as gptypes → src/miniquake2/game/gameplay/types.mlminiquake2/qcommon/byteio.ml as qbyteio → src/miniquake2/qcommon/byteio.mlfunction armorByIndex(registry, index)Return the armor by index.
| Parameter | Type | Default | Description |
|---|---|---|---|
registry | dynamic | — | registry value consumed by this operation. |
index | dynamic | — | Zero-based index of the affected item. |
function ArmorIndex(player, registry)Return the armor index.
| Parameter | Type | Default | Description |
|---|---|---|---|
player | dynamic | — | player value consumed by this operation. |
registry | dynamic | — | registry value consumed by this operation. |
function armorItem(registry, tag)Return the armor item value.
| Parameter | Type | Default | Description |
|---|---|---|---|
registry | dynamic | — | registry value consumed by this operation. |
tag | dynamic | — | tag value consumed by this operation. |
function CheckPowerArmor(player, registry, damage, damageFlags, inFront)Cell consumption half of g_combat.c::CheckPowerArmor. The screen-facing test is supplied by the caller because this package does not own view axes.
| Parameter | Type | Default | Description |
|---|---|---|---|
player | dynamic | — | player value consumed by this operation. |
registry | dynamic | — | registry value consumed by this operation. |
damage | dynamic | — | damage value consumed by this operation. |
damageFlags | dynamic | — | damageFlags value consumed by this operation. |
inFront | dynamic | — | inFront value consumed by this operation. |
function consumePowerup(player, item)Consume powerup.
| Parameter | Type | Default | Description |
|---|---|---|---|
player | dynamic | — | player value consumed by this operation. |
item | dynamic | — | item value consumed by this operation. |
function Drop_General(player, item, registry, worldEntityNumber)Drop general.
| 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. |
function Drop_PowerArmor(player, item, registry, worldEntityNumber)Drop power armor.
| 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. |
function extendFrame(existing, current, duration)Return the extend frame value.
| Parameter | Type | Default | Description |
|---|---|---|---|
existing | dynamic | — | existing value consumed by this operation. |
current | dynamic | — | current value consumed by this operation. |
duration | dynamic | — | duration value consumed by this operation. |
function grantAmmo(player, registry, name)Return the grant ammo value.
| Parameter | Type | Default | Description |
|---|---|---|---|
player | dynamic | — | player value consumed by this operation. |
registry | dynamic | — | registry value consumed by this operation. |
name | dynamic | — | Name of the affected item. |
function MegaHealthThink(itemEntity, context)Run mega health.
| Parameter | Type | Default | Description |
|---|---|---|---|
itemEntity | dynamic | — | itemEntity value consumed by this operation. |
context | dynamic | — | Context that carries state for the operation. |
function metadata(item, expectedKind)Return the metadata value.
| Parameter | Type | Default | Description |
|---|---|---|---|
item | dynamic | — | item value consumed by this operation. |
expectedKind | dynamic | — | expectedKind value consumed by this operation. |
function Pickup_Adrenaline(itemEntity, player, context, registry)Pick up adrenaline.
| 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. |
function Pickup_AncientHead(itemEntity, player, context, registry)Pick up ancient head.
| 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. |
function Pickup_Armor(itemEntity, player, context, registry)Pick up armor.
| 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. |
function Pickup_Bandolier(itemEntity, player, context, registry)Pick up bandolier.
| 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. |
function Pickup_Health(itemEntity, player, context, registry)Pick up health.
| 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. |
function Pickup_Key(itemEntity, player, context, registry)Pick up key.
| 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. |
function Pickup_Pack(itemEntity, player, context, registry)Pick up pack.
| 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. |
function Pickup_PowerArmor(itemEntity, player, context, registry)Pick up power armor.
| 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. |
function Pickup_Powerup(itemEntity, player, context, registry)Pick up powerup.
| 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. |
function PickupForPlayerData(itemEntity, playerData, playerContext)Pick up for player data.
| Parameter | Type | Default | Description |
|---|---|---|---|
itemEntity | dynamic | — | itemEntity value consumed by this operation. |
playerData | dynamic | — | playerData value consumed by this operation. |
playerContext | dynamic | — | playerContext value consumed by this operation. |
function PickupForPlayerDataAtSkill(itemEntity, playerData, playerContext, skill)Pick up for player data at skill.
| Parameter | Type | Default | Description |
|---|---|---|---|
itemEntity | dynamic | — | itemEntity value consumed by this operation. |
playerData | dynamic | — | playerData value consumed by this operation. |
playerContext | dynamic | — | playerContext value consumed by this operation. |
skill | dynamic | — | skill value consumed by this operation. |
function PowerArmorType(player, registry)Return the power armor type value.
| Parameter | Type | Default | Description |
|---|---|---|---|
player | dynamic | — | player value consumed by this operation. |
registry | dynamic | — | registry value consumed by this operation. |
function SyncArmorFromCombatant(player, combatant)Synchronize armor from combatant.
| Parameter | Type | Default | Description |
|---|---|---|---|
player | dynamic | — | player value consumed by this operation. |
combatant | dynamic | — | combatant value consumed by this operation. |
function SyncArmorToCombatant(player, combatant, registry)Synchronize armor to combatant.
| Parameter | Type | Default | Description |
|---|---|---|---|
player | dynamic | — | player value consumed by this operation. |
combatant | dynamic | — | combatant value consumed by this operation. |
registry | dynamic | — | registry value consumed by this operation. |
function SyncFromPlayerData(gameplayPlayer, playerData)Synchronize from player data.
| Parameter | Type | Default | Description |
|---|---|---|---|
gameplayPlayer | dynamic | — | gameplayPlayer value consumed by this operation. |
playerData | dynamic | — | playerData value consumed by this operation. |
function SyncToPlayerData(gameplayPlayer, playerData)Synchronize to player data.
| Parameter | Type | Default | Description |
|---|---|---|---|
gameplayPlayer | dynamic | — | gameplayPlayer value consumed by this operation. |
playerData | dynamic | — | playerData value consumed by this operation. |
function Use_Breather(player, item, context, registry)Use breather.
| Parameter | Type | Default | Description |
|---|---|---|---|
player | dynamic | — | player value consumed by this operation. |
item | dynamic | — | item value consumed by this operation. |
context | dynamic | — | Context that carries state for the operation. |
registry | dynamic | — | registry value consumed by this operation. |
function Use_Envirosuit(player, item, context, registry)Use envirosuit.
| Parameter | Type | Default | Description |
|---|---|---|---|
player | dynamic | — | player value consumed by this operation. |
item | dynamic | — | item value consumed by this operation. |
context | dynamic | — | Context that carries state for the operation. |
registry | dynamic | — | registry value consumed by this operation. |
function Use_Invulnerability(player, item, context, registry)Use invulnerability.
| Parameter | Type | Default | Description |
|---|---|---|---|
player | dynamic | — | player value consumed by this operation. |
item | dynamic | — | item value consumed by this operation. |
context | dynamic | — | Context that carries state for the operation. |
registry | dynamic | — | registry value consumed by this operation. |
function Use_PowerArmor(player, item, context, registry)Use power armor.
| Parameter | Type | Default | Description |
|---|---|---|---|
player | dynamic | — | player value consumed by this operation. |
item | dynamic | — | item value consumed by this operation. |
context | dynamic | — | Context that carries state for the operation. |
registry | dynamic | — | registry value consumed by this operation. |
function Use_Quad(player, item, context, registry)Use quad.
| Parameter | Type | Default | Description |
|---|---|---|---|
player | dynamic | — | player value consumed by this operation. |
item | dynamic | — | item value consumed by this operation. |
context | dynamic | — | Context that carries state for the operation. |
registry | dynamic | — | registry value consumed by this operation. |
function Use_Silencer(player, item, context, registry)Use silencer.
| Parameter | Type | Default | Description |
|---|---|---|---|
player | dynamic | — | player value consumed by this operation. |
item | dynamic | — | item value consumed by this operation. |
context | dynamic | — | Context that carries state for the operation. |
registry | dynamic | — | registry value consumed by this operation. |