Commit graph

9 commits

Author SHA1 Message Date
9594e23011
Add atmosphere rendering function 2026-02-14 16:20:00 -05:00
2a546a3171
Fix operator precedence in POV smart conjugation
The {s} conjugation check had incorrect operator precedence that
evaluated the ch/sh suffix check independently of the prev_text
existence check. This could lead to confusing logic flow even
though it didn't crash due to len() handling empty strings safely.

Fixed by wrapping both suffix conditions in parentheses so they're
both guarded by the prev_text truthiness check.
2026-02-14 01:00:37 -05:00
2b21257d26
Add POV template engine for combat messages 2026-02-13 23:05:19 -05:00
9729e853e1
Add color markup engine for prompt templates 2026-02-13 22:48:59 -05:00
d7d4fff701
Add render/room.py with structured room display functions 2026-02-13 22:20:48 -05:00
b0fcb080d3
Wire client capabilities into Player & terrain
Parse MTTS from telnetlib3 writer during connection and store capabilities
on Player.caps field. Add convenience property Player.color_depth that
delegates to caps.color_depth for easy access by rendering code.

Changes:
- Add caps field to Player with default 16-color ANSI capabilities
- Parse MTTS in server shell after Player creation using parse_mtts()
- Add Player.color_depth property for quick capability checks
- Add tests verifying Player caps integration and color_depth property
2026-02-07 22:44:45 -05:00
6549d09683
Add 256-color and truecolor SGR helpers
Extended ansi.py with fg_256, bg_256, fg_rgb, and bg_rgb functions
for generating 256-color and truecolor escape sequences. All functions
include value clamping to valid ranges (0-255).
2026-02-07 22:44:23 -05:00
0d0c142993
Add seed-based terrain world with movement and viewport
1000x1000 tile world generated deterministically from a seed using
layered Perlin noise. Terrain derived from elevation: mountains,
forests, grasslands, sand, water, with rivers traced downhill from
peaks. ANSI-colored viewport centered on player.

Command system with registry/dispatch, 8-direction movement (n/s/e/w
+ diagonals), look/l, quit/q. Players see arrival/departure messages.

Set connect_maxwait=0.5 on telnetlib3 to avoid the 4s CHARSET
negotiation timeout — MUD clients reject CHARSET immediately via MTTS.
2026-02-07 13:27:44 -05:00
541415e011 Add first generation 2026-02-07 09:45:48 -05:00