Table of Contents

Class AreaObjectSnapshot

Namespace
Valheim.Testing.Game
Assembly
Valheim.Testing.Game.dll

Optional saved-object and loaded-structure evidence for a small area. The server observes saved ZDOs and containers; the client observes instantiated prefabs and current piece support. Counts are completeness checks, not assertions about what a mod ought to place. Use terrain snapshots separately for height and paint.

public sealed record AreaObjectSnapshot : IEvidence
Inheritance
object
AreaObjectSnapshot
Implements

Constructors

AreaObjectSnapshot(string, string, int, int, int, DateTimeOffset, DateTimeOffset, int, int, int, int, IReadOnlyList<ObservedCommand>)

Optional saved-object and loaded-structure evidence for a small area. The server observes saved ZDOs and containers; the client observes instantiated prefabs and current piece support. Counts are completeness checks, not assertions about what a mod ought to place. Use terrain snapshots separately for height and paint.

public AreaObjectSnapshot(string Site, string WorldUid, int X, int Z, int Radius, DateTimeOffset StartedUtc, DateTimeOffset FinishedUtc, int SavedObjects, int Containers, int LoadedPrefabs, int Pieces, IReadOnlyList<ObservedCommand> Commands)

Parameters

Site string
WorldUid string
X int
Z int
Radius int
StartedUtc DateTimeOffset
FinishedUtc DateTimeOffset
SavedObjects int
Containers int
LoadedPrefabs int
Pieces int
Commands IReadOnlyList<ObservedCommand>

Properties

Commands

public IReadOnlyList<ObservedCommand> Commands { get; init; }

Property Value

IReadOnlyList<ObservedCommand>

Containers

public int Containers { get; init; }

Property Value

int

FinishedUtc

public DateTimeOffset FinishedUtc { get; init; }

Property Value

DateTimeOffset

Kind

Lower-case letters, digits and hyphens; it names the file.

public string Kind { get; }

Property Value

string

LoadedPrefabs

public int LoadedPrefabs { get; init; }

Property Value

int

Pieces

public int Pieces { get; init; }

Property Value

int

Radius

public int Radius { get; init; }

Property Value

int

SavedObjects

public int SavedObjects { get; init; }

Property Value

int

Site

public string Site { get; init; }

Property Value

string

StartedUtc

public DateTimeOffset StartedUtc { get; init; }

Property Value

DateTimeOffset

WorldUid

public string WorldUid { get; init; }

Property Value

string

X

public int X { get; init; }

Property Value

int

Z

public int Z { get; init; }

Property Value

int

Methods

Capture(GameActor, GameActor, string, string, int, int, int, TimeSpan, bool, bool, CancellationToken)

Capture an already selected site. The client must have a ready player and loaded area at the point; the server must host the same world. Container and support reads are optional. Support is a read of the game's current value, including its reported pending/remote state; it does not settle or recompute support.

public static AreaObjectSnapshot Capture(GameActor server, GameActor client, string site, string worldUid, int x, int z, int radius, TimeSpan readinessTimeout, bool includeContainers = false, bool includeSupport = false, CancellationToken cancellation = default)

Parameters

server GameActor
client GameActor
site string
worldUid string
x int
z int
radius int
readinessTimeout TimeSpan
includeContainers bool
includeSupport bool
cancellation CancellationToken

Returns

AreaObjectSnapshot