MiniQuake2

src/miniquake2/game/gameplay/powerups.ml

Provides miniquake2 game gameplay powerups facilities for this project.

Package
miniquake2.game.gameplay.powerups
Reachable
Yes

Imports

Declarations

armorByIndex

function armorByIndex(registry, index)

Return the armor by index.

ParameterTypeDefaultDescription
registrydynamic—registry value consumed by this operation.
indexdynamic—Zero-based index of the affected item.

View source

ArmorIndex

function ArmorIndex(player, registry)

Return the armor index.

ParameterTypeDefaultDescription
playerdynamic—player value consumed by this operation.
registrydynamic—registry value consumed by this operation.

View source

armorItem

function armorItem(registry, tag)

Return the armor item value.

ParameterTypeDefaultDescription
registrydynamic—registry value consumed by this operation.
tagdynamic—tag value consumed by this operation.

View source

CheckPowerArmor

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.

ParameterTypeDefaultDescription
playerdynamic—player value consumed by this operation.
registrydynamic—registry value consumed by this operation.
damagedynamic—damage value consumed by this operation.
damageFlagsdynamic—damageFlags value consumed by this operation.
inFrontdynamic—inFront value consumed by this operation.

View source

consumePowerup

function consumePowerup(player, item)

Consume powerup.

ParameterTypeDefaultDescription
playerdynamic—player value consumed by this operation.
itemdynamic—item value consumed by this operation.

View source

Drop_General

function Drop_General(player, item, registry, worldEntityNumber)

Drop general.

ParameterTypeDefaultDescription
playerdynamic—player value consumed by this operation.
itemdynamic—item value consumed by this operation.
registrydynamic—registry value consumed by this operation.
worldEntityNumberdynamic—worldEntityNumber value consumed by this operation.

View source

Drop_PowerArmor

function Drop_PowerArmor(player, item, registry, worldEntityNumber)

Drop power armor.

ParameterTypeDefaultDescription
playerdynamic—player value consumed by this operation.
itemdynamic—item value consumed by this operation.
registrydynamic—registry value consumed by this operation.
worldEntityNumberdynamic—worldEntityNumber value consumed by this operation.

View source

extendFrame

function extendFrame(existing, current, duration)

Return the extend frame value.

ParameterTypeDefaultDescription
existingdynamic—existing value consumed by this operation.
currentdynamic—current value consumed by this operation.
durationdynamic—duration value consumed by this operation.

View source

grantAmmo

function grantAmmo(player, registry, name)

Return the grant ammo value.

ParameterTypeDefaultDescription
playerdynamic—player value consumed by this operation.
registrydynamic—registry value consumed by this operation.
namedynamic—Name of the affected item.

View source

MegaHealthThink

function MegaHealthThink(itemEntity, context)

Run mega health.

ParameterTypeDefaultDescription
itemEntitydynamic—itemEntity value consumed by this operation.
contextdynamic—Context that carries state for the operation.

View source

metadata

function metadata(item, expectedKind)

Return the metadata value.

ParameterTypeDefaultDescription
itemdynamic—item value consumed by this operation.
expectedKinddynamic—expectedKind value consumed by this operation.

View source

Pickup_Adrenaline

function Pickup_Adrenaline(itemEntity, player, context, registry)

Pick up adrenaline.

ParameterTypeDefaultDescription
itemEntitydynamic—itemEntity value consumed by this operation.
playerdynamic—player value consumed by this operation.
contextdynamic—Context that carries state for the operation.
registrydynamic—registry value consumed by this operation.

View source

Pickup_AncientHead

function Pickup_AncientHead(itemEntity, player, context, registry)

Pick up ancient head.

ParameterTypeDefaultDescription
itemEntitydynamic—itemEntity value consumed by this operation.
playerdynamic—player value consumed by this operation.
contextdynamic—Context that carries state for the operation.
registrydynamic—registry value consumed by this operation.

View source

Pickup_Armor

function Pickup_Armor(itemEntity, player, context, registry)

Pick up armor.

ParameterTypeDefaultDescription
itemEntitydynamic—itemEntity value consumed by this operation.
playerdynamic—player value consumed by this operation.
contextdynamic—Context that carries state for the operation.
registrydynamic—registry value consumed by this operation.

View source

Pickup_Bandolier

function Pickup_Bandolier(itemEntity, player, context, registry)

Pick up bandolier.

ParameterTypeDefaultDescription
itemEntitydynamic—itemEntity value consumed by this operation.
playerdynamic—player value consumed by this operation.
contextdynamic—Context that carries state for the operation.
registrydynamic—registry value consumed by this operation.

View source

Pickup_Health

function Pickup_Health(itemEntity, player, context, registry)

Pick up health.

ParameterTypeDefaultDescription
itemEntitydynamic—itemEntity value consumed by this operation.
playerdynamic—player value consumed by this operation.
contextdynamic—Context that carries state for the operation.
registrydynamic—registry value consumed by this operation.

View source

Pickup_Key

function Pickup_Key(itemEntity, player, context, registry)

Pick up key.

ParameterTypeDefaultDescription
itemEntitydynamic—itemEntity value consumed by this operation.
playerdynamic—player value consumed by this operation.
contextdynamic—Context that carries state for the operation.
registrydynamic—registry value consumed by this operation.

View source

Pickup_Pack

function Pickup_Pack(itemEntity, player, context, registry)

Pick up pack.

ParameterTypeDefaultDescription
itemEntitydynamic—itemEntity value consumed by this operation.
playerdynamic—player value consumed by this operation.
contextdynamic—Context that carries state for the operation.
registrydynamic—registry value consumed by this operation.

View source

Pickup_PowerArmor

function Pickup_PowerArmor(itemEntity, player, context, registry)

Pick up power armor.

ParameterTypeDefaultDescription
itemEntitydynamic—itemEntity value consumed by this operation.
playerdynamic—player value consumed by this operation.
contextdynamic—Context that carries state for the operation.
registrydynamic—registry value consumed by this operation.

View source

Pickup_Powerup

function Pickup_Powerup(itemEntity, player, context, registry)

Pick up powerup.

ParameterTypeDefaultDescription
itemEntitydynamic—itemEntity value consumed by this operation.
playerdynamic—player value consumed by this operation.
contextdynamic—Context that carries state for the operation.
registrydynamic—registry value consumed by this operation.

View source

PickupForPlayerData

function PickupForPlayerData(itemEntity, playerData, playerContext)

Pick up for player data.

ParameterTypeDefaultDescription
itemEntitydynamic—itemEntity value consumed by this operation.
playerDatadynamic—playerData value consumed by this operation.
playerContextdynamic—playerContext value consumed by this operation.

View source

PickupForPlayerDataAtSkill

function PickupForPlayerDataAtSkill(itemEntity, playerData, playerContext, skill)

Pick up for player data at skill.

ParameterTypeDefaultDescription
itemEntitydynamic—itemEntity value consumed by this operation.
playerDatadynamic—playerData value consumed by this operation.
playerContextdynamic—playerContext value consumed by this operation.
skilldynamic—skill value consumed by this operation.

View source

PowerArmorType

function PowerArmorType(player, registry)

Return the power armor type value.

ParameterTypeDefaultDescription
playerdynamic—player value consumed by this operation.
registrydynamic—registry value consumed by this operation.

View source

SyncArmorFromCombatant

function SyncArmorFromCombatant(player, combatant)

Synchronize armor from combatant.

ParameterTypeDefaultDescription
playerdynamic—player value consumed by this operation.
combatantdynamic—combatant value consumed by this operation.

View source

SyncArmorToCombatant

function SyncArmorToCombatant(player, combatant, registry)

Synchronize armor to combatant.

ParameterTypeDefaultDescription
playerdynamic—player value consumed by this operation.
combatantdynamic—combatant value consumed by this operation.
registrydynamic—registry value consumed by this operation.

View source

SyncFromPlayerData

function SyncFromPlayerData(gameplayPlayer, playerData)

Synchronize from player data.

ParameterTypeDefaultDescription
gameplayPlayerdynamic—gameplayPlayer value consumed by this operation.
playerDatadynamic—playerData value consumed by this operation.

View source

SyncToPlayerData

function SyncToPlayerData(gameplayPlayer, playerData)

Synchronize to player data.

ParameterTypeDefaultDescription
gameplayPlayerdynamic—gameplayPlayer value consumed by this operation.
playerDatadynamic—playerData value consumed by this operation.

View source

Use_Breather

function Use_Breather(player, item, context, registry)

Use breather.

ParameterTypeDefaultDescription
playerdynamic—player value consumed by this operation.
itemdynamic—item value consumed by this operation.
contextdynamic—Context that carries state for the operation.
registrydynamic—registry value consumed by this operation.

View source

Use_Envirosuit

function Use_Envirosuit(player, item, context, registry)

Use envirosuit.

ParameterTypeDefaultDescription
playerdynamic—player value consumed by this operation.
itemdynamic—item value consumed by this operation.
contextdynamic—Context that carries state for the operation.
registrydynamic—registry value consumed by this operation.

View source

Use_Invulnerability

function Use_Invulnerability(player, item, context, registry)

Use invulnerability.

ParameterTypeDefaultDescription
playerdynamic—player value consumed by this operation.
itemdynamic—item value consumed by this operation.
contextdynamic—Context that carries state for the operation.
registrydynamic—registry value consumed by this operation.

View source

Use_PowerArmor

function Use_PowerArmor(player, item, context, registry)

Use power armor.

ParameterTypeDefaultDescription
playerdynamic—player value consumed by this operation.
itemdynamic—item value consumed by this operation.
contextdynamic—Context that carries state for the operation.
registrydynamic—registry value consumed by this operation.

View source

Use_Quad

function Use_Quad(player, item, context, registry)

Use quad.

ParameterTypeDefaultDescription
playerdynamic—player value consumed by this operation.
itemdynamic—item value consumed by this operation.
contextdynamic—Context that carries state for the operation.
registrydynamic—registry value consumed by this operation.

View source

Use_Silencer

function Use_Silencer(player, item, context, registry)

Use silencer.

ParameterTypeDefaultDescription
playerdynamic—player value consumed by this operation.
itemdynamic—item value consumed by this operation.
contextdynamic—Context that carries state for the operation.
registrydynamic—registry value consumed by this operation.

View source