Skip to content

OnlyWorlds Unity SDK 0.48.0

Choose a tag to compare

@tmoosting tmoosting released this 22 Nov 16:52
· 151 commits to main since this release

Parity with the TypeScript SDK from 4.179.0 to 4.186.0: the map-space frame reading, the packet profile's readers of
a work item, the house rules a proposal would change, the typed refusal of a read's unknown fields, and the profiles'
fold and code-point order by name. A minor release because it adds public API (below).

Added

  • OWMapSpace.CarryOf(map, x, y, maps): the map-space profile's frame reading (rules 13 and 14), where a point
    on a child Map lies on its parent and on each Map above it, as an OWMapCarry. ParentFrame is the Map's own
    x_parent_frame when it is a parent frame (four finite numbers, x0 less than x1 and y0 less than y1, in the parent's
    pixels), else null; Lint says what is wrong with the key (no_parent, not_four_numbers, not_a_box, as
    OWMapCarryLint); Points is the point as given, then the point on each Map it is carried to (OWMapCarryPoint,
    64-bit floats), one level at a time by each level's own frame and written size, in the order the profile writes;
    Stop says why the walk ended (top, dangling, cycle, no_frame, no_carry, as OWMapCarryStop). A row
    that is no Map answers none of them. A point that is NaN or infinite is an ArgumentException. The map-space
    fixture's 66 frame_cases are replayed. Parity with the TypeScript SDK 4.183.0.
  • OWPacket: the packet profile's readers of a work item (a Relation with supertype Work item).
    WorkStateOf(item) is its state, the subtype trimmed and without regard to case when it is open, taken, done
    or standing, else null; IsOpenWork(item) is true for open and taken only, so a standing item (a kept list,
    never done) and one with no state are never open work. AskerOf(item, world) is the Character its
    x_packet_from names, read as written, never the maker and never actor. WorkOf(items, world, sourceWorld)
    reads the work items one reader is given together, as an OWWork: each item's state, every item shown, the open
    work on each element, each item's elements in the packet's order (OWWorkElement), each asker, the asker lints
    (OWWorkLint) and what each Character of the world is waiting on; the world is an OWWorkWorld (its Characters'
    ids and the other ids the reader holds). The profile's fixture (packet.fixture.json, 11 state cases and 14
    asker cases) is vendored and replayed. Parity with the TypeScript SDK 4.181.0, its tests ported.
  • OWProposal.House: the part of a world's house rules a queue row would change, on a proposal and on the
    queue's row for a new element written as proposed: charter (a Law that carries the Charter mark), skill (an
    Object a marked Law's text names) or new_charter (a Law an accept would make a Charter), as the constants
    OWProposal.HouseCharter, HouseSkill and HouseNewCharter; null for any other row. onlyworlds.com works it out
    only for the world's owner and co-builders and serves null to any other reader. Parity with the TypeScript SDK
    4.186.0.
  • OWApiError.FieldsRefusal: on a 422 whose Param is fields, when a read's fields list names fields its
    type does not have, everything the server says about it, as an OWFieldsRefusal: UnknownFields (every unknown
    name, in the order sent), TypesWithField (for each one another element type has, those types) and
    AllowedFields (the names this type takes). The server refuses the whole list once, so a caller corrects it in one
    try. Null for any other error or when the server sends no unknown_fields; an entry that is not a string is left
    out. Parity with the TypeScript SDK 4.179.0, its three tests ported.
  • OWText.TrimAndFold(text): a text trimmed and without regard to case, as the profiles define it once. It
    trims Unicode's White_Space set at both ends (U+0085 and the ideographic space go, a byte order mark stays), then
    applies simple case folding by Unicode 15.1's table (the long s folds to s, the sharp s stays). It is the fold the
    profile readers here already match by; string.Trim() and ToLowerInvariant() are neither. Null is refused with
    an ArgumentNullException.
  • OWText.ByCodePoint (an IComparer<string>) and OWText.CompareByCodePoint(a, b): two strings compared
    by code point, never by UTF-16 unit as StringComparer.Ordinal does (which puts a letter beyond U+FFFF before
    U+FF5A) and never by a culture's collation. It is the order the profile readers already use. Names as the profiles
    order them: by TrimAndFold(name) in this order, ties by id in the same order. Both are parity with the
    TypeScript SDK 4.180.0, its tests ported.

Changed

  • GetMeAsync's remarks say when the call tests a PIN: the PIN is sent with it, so a wrong one shows there first for
    a key that can write; beside a key that cannot (a read key, a player's), onlyworlds.com never reads a PIN. Parity
    with the TypeScript SDK 4.185.0. Documentation only.