MiniQuake2

src/miniquake2/game/gameplay/weapons.ml

Provides miniquake2 game gameplay weapons facilities for this project.

Package
miniquake2.game.gameplay.weapons
Reachable
Yes

Imports

Declarations

ammoAvailable

function ammoAvailable(player, item, registry)

Report whether ammo available.

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

View source

ChangeWeapon

function ChangeWeapon(player, registry)

Return the change weapon value.

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

View source

findByPickupName

function findByPickupName(registry, pickupName)

Finds by pickup name used by the miniquake2 game gameplay weapons module.

ParameterTypeDefaultDescription
registrydynamic—registry value consumed by this operation.
pickupNamedynamic—pickupName value consumed by this operation.

View source

FireBfg

function FireBfg(player, registry)

Performs the FireBfg operation for the miniquake2 game gameplay weapons module.

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

View source

FireCurrentWeapon

function FireCurrentWeapon(player, registry)

Basic fire callback used until weapon-specific projectile/hitscan code lands. It preserves the important contract: weapon callbacks own fire-frame advance.

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

View source

hasFrame

function hasFrame(frames, value)

Report whether has frame.

ParameterTypeDefaultDescription
framesdynamic—frames value consumed by this operation.
valuedynamic—Value consumed or transformed by the operation.

View source

mirrorGunFrame

function mirrorGunFrame(player)

Return the mirror gun frame value.

ParameterTypeDefaultDescription
playerdynamic—player value consumed by this operation.

View source

NoAmmoWeaponChange

function NoAmmoWeaponChange(player, registry)

Report whether no ammo weapon change.

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

View source

owned

function owned(player, item)

Return the owned value.

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

View source

Think_Bfg

function Think_Bfg(player, item, registry, pauseRoll)

Run bfg.

ParameterTypeDefaultDescription
playerdynamic—player value consumed by this operation.
itemdynamic—item value consumed by this operation.
registrydynamic—registry value consumed by this operation.
pauseRolldynamic—pauseRoll value consumed by this operation.

View source

Think_CurrentWeapon

function Think_CurrentWeapon(player, item, registry, pauseRoll)

Run current weapon.

ParameterTypeDefaultDescription
playerdynamic—player value consumed by this operation.
itemdynamic—item value consumed by this operation.
registrydynamic—registry value consumed by this operation.
pauseRolldynamic—pauseRoll value consumed by this operation.

View source

Weapon_Generic

function Weapon_Generic(player, frames, registry, fireCallback, pauseRoll)

Return the weapon generic value.

ParameterTypeDefaultDescription
playerdynamic—player value consumed by this operation.
framesdynamic—frames value consumed by this operation.
registrydynamic—registry value consumed by this operation.
fireCallbackdynamic—fireCallback value consumed by this operation.
pauseRolldynamic—pauseRoll value consumed by this operation.

View source