MiniQuake2

src/miniquake2/runtime/product_startup.ml

Provides miniquake2 runtime product startup facilities for this project.

Package
miniquake2.runtime.product_startup
Reachable
Yes

Imports

Declarations

activate

function activate(lifecycle, mapName)

Performs the activate operation for the miniquake2 runtime product startup module.

ParameterTypeDefaultDescription
lifecycledynamic—lifecycle value consumed by this operation.
mapNamedynamic—mapName value consumed by this operation.

View source

addBrowserEntry

function addBrowserEntry(browser, endpoint, description, now)

Add browser entry.

ParameterTypeDefaultDescription
browserdynamic—browser value consumed by this operation.
endpointdynamic—endpoint value consumed by this operation.
descriptiondynamic—description value consumed by this operation.
nowdynamic—now value consumed by this operation.

View source

beginConnect

function beginConnect(lifecycle, endpoint)

Begin connect.

ParameterTypeDefaultDescription
lifecycledynamic—lifecycle value consumed by this operation.
endpointdynamic—endpoint value consumed by this operation.

View source

beginLocal

function beginLocal(lifecycle, mapName)

Begin local.

ParameterTypeDefaultDescription
lifecycledynamic—lifecycle value consumed by this operation.
mapNamedynamic—mapName value consumed by this operation.

View source

BROWSER_MSEC

const BROWSER_MSEC = 1200

Defines the browser msec constant used by the miniquake2 runtime product startup module.

View source

browserEntryCount

function browserEntryCount(browser)

Return the browser entry count.

ParameterTypeDefaultDescription
browserdynamic—browser value consumed by this operation.

View source

closeBrowser

function closeBrowser(browser)

Close browser.

ParameterTypeDefaultDescription
browserdynamic—browser value consumed by this operation.

View source

closeRconTransport

function closeRconTransport(transport)

Close an outstanding main-menu RCON exchange.

ParameterTypeDefaultDescription
transportdynamic—transport value consumed by this operation.

View source

createBrowser

function createBrowser()

Create browser.

View source

createLifecycle

function createLifecycle(dataRoot)

Create lifecycle.

ParameterTypeDefaultDescription
dataRootdynamic—dataRoot value consumed by this operation.

View source

createRconTransport

function createRconTransport()

Create a disconnected-console RCON transport without retaining a socket.

View source

decodePreferences

function decodePreferences(text)

Decode preferences.

ParameterTypeDefaultDescription
textdynamic—Text consumed by the operation.

View source

DEFAULT_PORT

const DEFAULT_PORT = 27910

Defines the default port constant used by the miniquake2 runtime product startup module.

View source

defaultDownloadPolicy

function defaultDownloadPolicy()

Return the default download policy value.

View source

defaultPlayerProfile

function defaultPlayerProfile()

Return the default player profile value.

View source

defaultPreferences

function defaultPreferences()

Return the default preferences value.

View source

defaultServerOptions

function defaultServerOptions()

Return the default server options value.

View source

disconnect

function disconnect(lifecycle)

Return the disconnect value.

ParameterTypeDefaultDescription
lifecycledynamic—lifecycle value consumed by this operation.

View source

discoverRetailRoot

function discoverRetailRoot(selectionPath, candidates)

Discover retail root.

ParameterTypeDefaultDescription
selectionPathdynamic—Path associated with selection.
candidatesdynamic—candidates value consumed by this operation.

View source

miniquake2.runtime.product_startup.DownloadPolicy struct

encodePreferences

function encodePreferences(preferences)

Encode preferences.

ParameterTypeDefaultDescription
preferencesdynamic—preferences value consumed by this operation.

View source

miniquake2.runtime.product_startup.Endpoint struct

endpointText

function endpointText(endpoint)

Return the endpoint text value.

ParameterTypeDefaultDescription
endpointdynamic—endpoint value consumed by this operation.

View source

loadPreferences

function loadPreferences(path)

Load preferences.

ParameterTypeDefaultDescription
pathdynamic—Path of the file or directory used by the operation.

View source

loadSelectedRoot

function loadSelectedRoot(path)

Load selected root.

ParameterTypeDefaultDescription
pathdynamic—Path of the file or directory used by the operation.

View source

MAX_BROWSER_SERVERS

const MAX_BROWSER_SERVERS = 8

Defines the max browser servers constant used by the miniquake2 runtime product startup module.

View source

miniquake2.runtime.product_startup.MultiplayerPreferences struct

parseEndpoint

function parseEndpoint(value)

Parse endpoint.

ParameterTypeDefaultDescription
valuedynamic—Value consumed or transformed by the operation.

View source

parsePort

function parsePort(value)

Parse port.

ParameterTypeDefaultDescription
valuedynamic—Value consumed or transformed by the operation.

View source

persistSelectedRoot

function persistSelectedRoot(path, root)

Persist selected root.

ParameterTypeDefaultDescription
pathdynamic—Path of the file or directory used by the operation.
rootdynamic—root value consumed by this operation.

View source

miniquake2.runtime.product_startup.PlayerProfile struct

playerProfileValid

function playerProfileValid(profile)

Report whether player profile valid.

ParameterTypeDefaultDescription
profiledynamic—profile value consumed by this operation.

View source

playerUserInfo

function playerUserInfo(profile)

Return the player user info value.

ParameterTypeDefaultDescription
profiledynamic—profile value consumed by this operation.

View source

preferenceBool

function preferenceBool(value)

Return the preference bool value.

ParameterTypeDefaultDescription
valuedynamic—Value consumed or transformed by the operation.

View source

preferenceBoolean

function preferenceBoolean(value)

Return the preference boolean value.

ParameterTypeDefaultDescription
valuedynamic—Value consumed or transformed by the operation.

View source

preferenceInteger

function preferenceInteger(value, minimum, maximum)

Return the preference integer value.

ParameterTypeDefaultDescription
valuedynamic—Value consumed or transformed by the operation.
minimumdynamic—minimum value consumed by this operation.
maximumdynamic—maximum value consumed by this operation.

View source

preferenceLine

function preferenceLine(lines, index, prefix)

Return the preference line value.

ParameterTypeDefaultDescription
linesdynamic—lines value consumed by this operation.
indexdynamic—Zero-based index of the affected item.
prefixdynamic—prefix value consumed by this operation.

View source

PREFERENCES_HEADER

const PREFERENCES_HEADER = "MiniQuake2Multiplayer 2"

Defines the preferences header constant used by the miniquake2 runtime product startup module.

View source

PREFERENCES_LEGACY_HEADER

const PREFERENCES_LEGACY_HEADER = "MiniQuake2Multiplayer 1"

Defines the preferences legacy header constant used by the miniquake2 runtime product startup module.

View source

preferencesValid

function preferencesValid(preferences)

Report whether preferences valid.

ParameterTypeDefaultDescription
preferencesdynamic—preferences value consumed by this operation.

View source

preferenceTextSafe

function preferenceTextSafe(value, maximum)

Return the preference text safe value.

ParameterTypeDefaultDescription
valuedynamic—Value consumed or transformed by the operation.
maximumdynamic—maximum value consumed by this operation.

View source

miniquake2.runtime.product_startup.ProductLifecycle struct

pumpBrowser

function pumpBrowser(browser, now)

Pump browser.

ParameterTypeDefaultDescription
browserdynamic—browser value consumed by this operation.
nowdynamic—now value consumed by this operation.

View source

pumpRcon

function pumpRcon(transport, now)

Pump matching print replies without blocking the menu presentation loop.

ParameterTypeDefaultDescription
transportdynamic—transport value consumed by this operation.
nowdynamic—now value consumed by this operation.

View source

miniquake2.runtime.product_startup.RconTransport struct

retailRootValid

function retailRootValid(root)

Report whether retail root valid.

ParameterTypeDefaultDescription
rootdynamic—root value consumed by this operation.

View source

returnToMenu

function returnToMenu(lifecycle)

Return to menu.

ParameterTypeDefaultDescription
lifecycledynamic—lifecycle value consumed by this operation.

View source

savePreferences

function savePreferences(path, preferences)

Save preferences.

ParameterTypeDefaultDescription
pathdynamic—Path of the file or directory used by the operation.
preferencesdynamic—preferences value consumed by this operation.

View source

sendRcon

function sendRcon(transport, endpointTextValue, password, command, now)

Send one validated connectionless RCON request from a temporary UDP socket.

ParameterTypeDefaultDescription
transportdynamic—transport value consumed by this operation.
endpointTextValuedynamic—endpointTextValue value consumed by this operation.
passworddynamic—password value consumed by this operation.
commanddynamic—command value consumed by this operation.
nowdynamic—now value consumed by this operation.

View source

miniquake2.runtime.product_startup.ServerBrowser struct

miniquake2.runtime.product_startup.ServerEntry struct

miniquake2.runtime.product_startup.ServerOptions struct

standardRetailCandidates

function standardRetailCandidates()

Return the standard retail candidates value.

View source

startBrowser

function startBrowser(browser, addresses, now)

Start browser.

ParameterTypeDefaultDescription
browserdynamic—browser value consumed by this operation.
addressesdynamic—addresses value consumed by this operation.
nowdynamic—now value consumed by this operation.

View source