From 8f3455ce0a09aa9693ec8b041d98f2d930dc0742 Mon Sep 17 00:00:00 2001 From: Jared Miller Date: Sat, 7 Feb 2026 23:39:45 -0500 Subject: [PATCH] Convert things-and-building doc to rst --- ...ngs-and-building.txt => things-and-building.rst} | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) rename docs/how/{things-and-building.txt => things-and-building.rst} (98%) diff --git a/docs/how/things-and-building.txt b/docs/how/things-and-building.rst similarity index 98% rename from docs/how/things-and-building.txt rename to docs/how/things-and-building.rst index 9b5ff42..437c3f1 100644 --- a/docs/how/things-and-building.txt +++ b/docs/how/things-and-building.rst @@ -1,3 +1,4 @@ +=================== things and building =================== @@ -17,7 +18,7 @@ the decorator pattern the core idea: things are python classes with decorators. no custom DSL. python IS the language. -here's a full example of a pepsi can: +here's a full example of a pepsi can:: from mudlib.things import thing, verb @@ -73,7 +74,7 @@ what's happening here: - no yaml needed for behavioral things. the python file IS the definition. for static items (no behavior, just a description), we could support TOML-only -for simple cases: +for simple cases:: [thing] name = "rock" @@ -87,6 +88,8 @@ builder commands the @ prefix for builder/admin commands. not combat, not normal play. building. +:: + @create item opens editor with a template python file @create room opens editor for a new room definition @edit opens editor for an existing thing/room @@ -149,7 +152,7 @@ open questions: map editing ----------- -the map format (TOML) is already writable: +the map format (TOML) is already writable:: [map] width = 20 @@ -189,14 +192,14 @@ interiors are rooms (classic MUD style) or small grids. entering: a tile on the overworld has an "enter" action that transitions you to an interior. the interior has an "exit" that puts you back on the overworld. -a room definition might look like: +a room definition might look like:: [room] name = "tavern" description = "a warm tavern. fire crackling. smells like stew." exits = { out = "overworld:12,45" } -or as python if it has behavior: +or as python if it has behavior:: @room class Tavern: