Table of Contents

Class ZonePreparation

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

Fixture authoring: make zones exist in a world before a scenario relies on them. Never an acceptance result.

public static class ZonePreparation
Inheritance
object
ZonePreparation

Methods

EnsureGeneratedAsync(GameActor, IEnumerable<(int X, int Z)>, ScenarioReport, TimeSpan, TimeSpan?, CancellationToken)

Makes each zone generated: asks ZoneSystem.instance.IsZoneGenerated, and if not, asks the server to create it as a ghost zone (CreateGhostZones at the zone's centre) and asks again. The game raises no event for a generated zone, so this re-asks every poll (250 ms by default, and positive) until perZone expires. Records one step per zone. Requires devcommands (cli_call).

public static Task EnsureGeneratedAsync(GameActor server, IEnumerable<(int X, int Z)> zones, ScenarioReport report, TimeSpan perZone, TimeSpan? poll = null, CancellationToken cancellation = default)

Parameters

server GameActor
zones IEnumerable<(int X, int Z)>
report ScenarioReport
perZone TimeSpan
poll TimeSpan?
cancellation CancellationToken

Returns

Task