[CODE] Easy Color / list_char_to_char

From: Jeremy Maloney (riodan@cyberspace.org)
Date: 01/23/03


Ok all,
I'm once again attempting to become an "aspiring" coder after a few days
of rest and relaxation and I've come across a few things that have posed a
two minor dilemma.  I use the &Y&y&R&r&M&m color snippet (easy color), in
a Circlemud patch level 17, heavily modified mud source. Recently I
thought, "Hey, why not make mobiles the standard color and player's name
either white or an off color to distinguish between the two!" Well, here's
the two dilemmas:

First, I did some poking around in act.informative.c and found this code:

  /* now list characters & objects */

  send_to_char(CCGRN(ch, C_NRM), ch);
  list_obj_to_char(world[ch->in_room].contents, ch, 0, FALSE);

  send_to_char(CCYEL(ch, C_NRM), ch);
  list_char_to_char(world[ch->in_room].people, ch);


  send_to_char(CCNRM(ch, C_NRM), ch);
}

Now, this works great for a general scale of things, but in
list_char_to_char, it appears to me that this is basically taking NPCs as
well as PCs and assigning them a general color of Yellow upon
listing the info to the room. I was considering a list_mob_to_room type
deal to distinguish clearly between PCs and NPCs. I have no idea however,
how I would do that... Any suggestions would be great! :)

The second dilemma was simply to do with the color codes and how they are
terminated upon an individual basis. If a player makes a mobile with color
codes and ends the long description with a &n, that &n bleeds and makes
everything below it white, which is rather frustrating.  I'm not sure but
wouldn't it be easier if &n was a marking point to terminate all color
codes until the next listing appears? Is there a way to fix the bleeding
problem?


Jeremy M. aka Riodan
(riodan@cyberspace.org)

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   | Newbie List:  http://groups.yahoo.com/group/circle-newbies/   |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 06/26/03 PDT