Table of Contents

Struct ZoneId

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

A zone as the game numbers it: 64 m square, zone (0, 0) centred on the world origin.

public readonly record struct ZoneId

Constructors

ZoneId(int, int)

A zone as the game numbers it: 64 m square, zone (0, 0) centred on the world origin.

public ZoneId(int X, int Z)

Parameters

X int
Z int

Fields

Size

public const float Size = 64

Field Value

float

Properties

X

public int X { get; init; }

Property Value

int

Z

public int Z { get; init; }

Property Value

int

Methods

Around(float, float, float)

Every zone that the square of half-width radius round the point touches.

public static IReadOnlyList<ZoneId> Around(float x, float z, float radius)

Parameters

x float
z float
radius float

Returns

IReadOnlyList<ZoneId>

Of(float, float)

The zone holding the point (x, z), as the game computes it in 1.0.16.

public static ZoneId Of(float x, float z)

Parameters

x float
z float

Returns

ZoneId

Rings(ZoneId)

The larger of the x and z zone distances: how many rings of zones separate the two.

public int Rings(ZoneId other)

Parameters

other ZoneId

Returns

int

ToString()

The adapter's argument: x,z.

public override string ToString()

Returns

string