role select scroll log: less robotic phrasing + role code — 'assumes Nth Chair, where SUBJ will start the game as the Role [XC]' — TDD
Was 'assumes Nth Chair; SUBJ will start the game as the Role.' Now joins with ', where' and appends the role code in a no-wrap bracket (the Player [PC], the Builder [BC]…), matching the SkyDrive/Sea abbrev treatment. Chair stays capitalised (user-confirmed). 56 drama ITs green; the billscroll FT's 'assumes 1st Chair' assertion still holds. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -138,7 +138,13 @@ class GameEvent(models.Model):
|
||||
except ValueError:
|
||||
ordinal = "?"
|
||||
subj, _, _ = _actor_pronouns(self.actor)
|
||||
return f"assumes {ordinal} Chair; {subj} will start the game as the {role}."
|
||||
# Role code in a no-wrap bracket (e.g. "the Player [PC]"), matching
|
||||
# the SkyDrive/Sea abbrev treatment; less robotic than the old
|
||||
# "; SUBJ will…" (user-spec 2026-06-09).
|
||||
return (
|
||||
f"assumes {ordinal} Chair, where {subj} will start the game as "
|
||||
f'the {role} <span style="white-space:nowrap">[{code}]</span>.'
|
||||
)
|
||||
if self.verb == self.ROLES_REVEALED:
|
||||
return "All roles assigned"
|
||||
if self.verb == self.SIG_READY:
|
||||
|
||||
@@ -67,15 +67,15 @@ class GameEventModelTest(TestCase):
|
||||
with self.subTest(role=role):
|
||||
event = record(self.room, GameEvent.ROLE_SELECTED, actor=self.user,
|
||||
role=role, role_display="")
|
||||
self.assertIn(f"assumes {ordinal} Chair", event.to_prose())
|
||||
self.assertIn(f"assumes {ordinal} Chair, where", event.to_prose())
|
||||
|
||||
def test_role_selected_prose_includes_role_name(self):
|
||||
def test_role_selected_prose_includes_role_name_and_code(self):
|
||||
event = record(self.room, GameEvent.ROLE_SELECTED, actor=self.user,
|
||||
role="PC", role_display="Player")
|
||||
prose = event.to_prose()
|
||||
self.assertIn("Player", prose)
|
||||
# Default user pronouns = pluralism → "they".
|
||||
self.assertIn("they will start the game", prose)
|
||||
# Default user pronouns = pluralism → "they"; role code in a no-wrap bracket.
|
||||
self.assertIn("where they will start the game as ", prose)
|
||||
self.assertIn('the Player <span style="white-space:nowrap">[PC]</span>.', prose)
|
||||
|
||||
# ── to_prose — SIG_READY ─────────────────────────────────────────────
|
||||
|
||||
|
||||
Reference in New Issue
Block a user