GameID

Swift
public struct GameID

extension GameID: Hashable, Comparable, CustomStringConvertible, Sendable

Steamworks CGameID - encapsulates an appID/modID pair


Topics

Properties

var modID: Int

The ModID of the GameID, max 32 bits (no typedef for this?)

Declaration
Swift
public var modID: Int { get set }

var appID: AppID

The AppID of the GameID - note for manual construction this is only a 24-bit value.

Declaration
Swift
public var appID: AppID { get set }

var asUInt64: UInt64

The flat version of the GameID

Declaration
Swift
public var asUInt64: UInt64 { get }

Queries

var isValid: Bool

Is the GameID representing a valid thing?

Declaration
Swift
public var isValid: Bool { get }

var isMod: Bool

Is this a mod?

Declaration
Swift
public var isMod: Bool { get }

var isShortcut: Bool

Is this a shortcut?

Declaration
Swift
public var isShortcut: Bool { get }

var isP2PFile: Bool

Is this a p2pfile [err what]?

Declaration
Swift
public var isP2PFile: Bool { get }

var isSteamApp: Bool

Is this an app (== game)?

Declaration
Swift
public var isSteamApp: Bool { get }

Initializers

init()

Create a fresh invalid GameID.

Declaration
Swift
public init()

init(UInt64)

Create a GameID from a flat value

Declaration
Swift
public init(_ gameID: UInt64)

Compound Setters

func reset()

Clear all fields, leaving an invalid ID.

Declaration
Swift
public mutating func reset()

Conformances

static func <(lhs: GameID, rhs: GameID) -> Bool

Following steam, ordering is defined on the raw 64-bit numeric value, for whatever good that does.

Declaration
Swift
public static func < (lhs: GameID, rhs: GameID) -> Bool

var description: String

A human-readable description of the GameID

Declaration
Swift
public var description: String { get }