It's alive... ALIVE!

Aug 24, 2014 23:56

After a week or so of evenings spent on this thing, I've got the first Coral verb executing in CliMOO. It's "!attrs", a debug command. I chose this one because it's non-trivial, but it's not super crazy.

*raises glass* For mad science!!

(Which leads me to want to plug one of my favorite indie comics.)

The code looks like this:

/// verb none for self
/// verb self
def verb():
out = "[b]Attributes on {0}:[/b]\n".format( self.fqpn )
out += "[table]"
for a in self.attributes:
name = a.name
if a.source == self:
name = "[b][color=#5cc]" + name + "[/color][/b]"

display = a.display
if display.length() > 60:
display = display[:60] + "..."

out += "[tr][td]{0} [/td][td]{1}[/td][/tr]".format( name, display )

out += "[/table]"

player.write(out)
Previous post
Up