zuse: fix +cite for odd-length names

Render `@p` shorthands correctly for short moon names. Fixes #5318.

This also changes galaxy and star moons to render as `~parent^` instead of some
longer variation.
This commit is contained in:
fang 2021-10-26 02:11:45 +02:00 committed by GitHub
parent 1a784cdeb7
commit 260c75f05d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4910,13 +4910,20 @@
++ cite :: render ship ++ cite :: render ship
|= who=@p |= who=@p
^- tape ^- tape
=+ kind=(clan who) =/ wid (met 4 who)
=+ name=(scow %p who) ?: (lte wid 2) (scow %p who)
?: =(%earl kind) ?: (lte wid 4)
:(weld "~" (swag [15 6] name) "^" (swag [22 6] name)) =/ nom (scow %p (end 5 who))
?: =(%pawn kind) :(weld (scag 7 nom) "^" (slag 8 nom))
:(weld (swag [0 7] name) "_" (swag [51 6] name)) %- trip
name %+ rap 3
:~ '~'
(tos:po (end 3 (rsh 3^(dec (mul wid 2)) who)))
(tod:po (end 3 (rsh 3^(mul (dec wid) 2) who)))
'_'
(tos:po (end 3 (rsh 3 who)))
(tod:po (end 3 who))
==
:: :: ++saxo:title :: :: ++saxo:title
++ saxo :: autocanon ++ saxo :: autocanon
|= [our=ship now=@da who=ship] |= [our=ship now=@da who=ship]