def cmd_edit(args)
case args
when nil, ""
sendto("What??")
when /sysmsg\s+(\w+)/
@mode = :edit
@editobj = world.msgs
@editfield = $1.intern
@editstr = world.msgs[$1.intern] || ''
sendto(edit_display(@editstr))
when /#(\d+)\s+(\w+)/
o = get_object($1.to_i)
case o
when GameObject, Room, Character, Script, Exit
if o.respond_to?($2) &&
o.respond_to?("#$2=") &&
o.send($2).class == String
@mode = :edit
@editobj = o
@editfield = $2
@editstr = o.send $2
sendto(edit_display(@editstr))
else
sendto("Field #$2 not found on object.")
end
else
sendto("No object.")
end
else
sendto("What??")
end
end