NRF SDK 0.9

Reference

Construction

Tickets and results for the experimental construction bridge.

Usage context

ModulePackageSDK source
Kotlin/JVMfr.nimby.sdkkotlin-client/src/main/kotlin/fr/nimby/sdk/Construction.kt

Public API for SDK 0.9.0-alpha.2. Each entry provides the Kotlin signature and its contract: what the value means, conditions of use and effects to understand. Choose imports from the module shown above.

Imports on this page
import fr.nimby.sdk.ConstructionResult
import fr.nimby.sdk.ConstructionState

ConstructionResult

fr.nimby.sdk · class
data class ConstructionResult(
    val state: ConstructionState, val token: Long, val createdIds: List<Long>,
    val reason: Int, val canUndo: Boolean,
)

Result of an experimental construction operation. Retain the ticket to track PENDING or an uncertain response; never repeat creation to wait for completion.

ConstructionResult.state

fr.nimby.sdk · val
val state: ConstructionState

Current operation state, to handle explicitly.

ConstructionResult.token

fr.nimby.sdk · val
val token: Long

Opaque ticket associated with the game/editing session. Retain it before writing and do not reuse it after a game change.

ConstructionResult.createdIds

fr.nimby.sdk · val
val createdIds: List<Long>

Identities of signals actually reported as created; retain them for partial results too.

ConstructionResult.reason

fr.nimby.sdk · val
val reason: Int

Refusal/result code to retain in logs with ticket and state; do not infer success from this code alone.

ConstructionResult.canUndo

fr.nimby.sdk · val
val canUndo: Boolean

Undo availability at result time; an intervening command can invalidate it.

ConstructionState

fr.nimby.sdk · class
enum class ConstructionState {
    READY,
    APPLIED,
    UNDONE,
    REJECTED,
    PARTIAL,
    PENDING
}

Distinct operation stages and outcomes. Pending or partial states must not be treated as complete success.

ConstructionState.READY

fr.nimby.sdk · enum-entry
READY

Preparation accepted; no signal added by that preparation.

ConstructionState.APPLIED

fr.nimby.sdk · enum-entry
APPLIED

Creation applied; read createdIds and canUndo.

ConstructionState.UNDONE

fr.nimby.sdk · enum-entry
UNDONE

Undo applied.

ConstructionState.REJECTED

fr.nimby.sdk · enum-entry
REJECTED

Operation refused; read reason and game state before another request.

ConstructionState.PARTIAL

fr.nimby.sdk · enum-entry
PARTIAL

Partial result; retain returned identities and inspect the situation without resending the full batch.

ConstructionState.PENDING

fr.nimby.sdk · enum-entry
PENDING

Operation still pending; inspect its ticket with poll.