Skip to content

Hold verbs: aim what a socket holds (rotation on place into a socket, and on swap) - #538

Merged
thorwhalen merged 1 commit into
mainfrom
place-rotation-into-socket
Oct 26, 2026
Merged

thorwhalen merged 1 commit into
mainfrom
place-rotation-into-socket

Conversation

@thorwhalen

Copy link
Copy Markdown
Collaborator

Follow-up to #502 / #535, found by the studio scene re-render (a musket and a sabre in one figurine hand must both point at the opponent).

Problem

A place into a socket ignored rotation: the item always took the socket's own frame (_socket_lin). Two items drawn differently (a carved musket barrel-down-right, a carved sabre tip-up-left) then point different ways in the same hand, and the socket's frame is the node's rest frame, so authoring a rotation on the slot node does not help either.

Change

  • PlaceAction.rotation into a socket: the stage angle the item comes to rest at there (the same meaning the field already had for the ground and world@x,y). From the contact on the item is held relative to the socket, so it turns with it.
  • SwapAction.rotation (new, optional): passed to the swap's give.
  • A place or swap without rotation is byte-identical.
  • Skill reference holding-things.md: the table row and a short Aiming what a socket holds note. CHANGELOG. Contract package 1.11.0 (additive field on swap).

Tests

  • test_a_place_into_a_socket_at_a_rotation_rests_aimed_and_turns_with_the_socket (grip stays on the socket; rotation 0.6 at rest; +0.3 when the stand turns)
  • test_a_swap_gives_at_the_rotation_it_is_given
  • round-trip through scene.md includes swap(..., rotation=...).
    Both new tests fail with the hold.py change reverted (mutation-checked).

https://claude.ai/code/session_013ALQpLK5gHwnn2fCni68Ut

… and on swap)

A place into a socket ignored `rotation`: the item always took the socket's
own frame, so two items drawn differently (a musket barrel-down, a sabre
tip-up) could not both point at one target from the same hand. `rotation` on
a place into a socket is now the stage angle the item comes to rest at there,
held relative to the socket afterwards (it turns with it); `swap` gains
`rotation`, passed to its give. A place without rotation is unchanged.

Contract package 1.11.0 (SwapAction gains a field: additive).
@thorwhalen
thorwhalen merged commit 9573416 into main Oct 26, 2026
15 checks passed
@thorwhalen
thorwhalen deleted the place-rotation-into-socket branch October 26, 2026 02:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant