[CODE] Calendar

From: Craig Cooney (perfect_circle@angelfire.com)
Date: 12/01/00


   I wanted a more 'normal' calendar of 12 months
composed of 30 days.

In utils.h

#define SECS_PER_MUD_HOUR       124
#define SECS_PER_MUD_DAY        (24*SECS_PER_MUD_HOUR)
#define SECS_PER_MUD_MONTH      (30*SECS_PER_MUD_DAY)
#define SECS_PER_MUD_YEAR       (12*SECS_PER_MUD_MONTH)


In act.informative.c  do_time

/* 30 days in a month */
weekday = ((30 * time_info.month) + time_info.day + 1) % 7;


In weather.c  another_hour()

if (time_info.hours > 23) {     /* Changed by HHS due to bug ??? */
    time_info.hours -= 24;
    time_info.day++;

    if (time_info.day > 29) {  // originally 34
      time_info.day = 0;
      time_info.month++;

      if (time_info.month > 11) { // originally 16
        time_info.month = 0;
        time_info.year++;


In weather.c  weather_change()

if ((time_info.month >= 6) && (time_info.month <= 11))


In db.c   reset_time()

if ((time_info.month >= 5) && (time_info.month <= 8))


By increasing the SECS_PER_MUD_HOUR to 124 it keeps the length of Mud year almost exactly the same(1071360 secs per year instead of 107100) so players
don't grow senile quickly.  But, I wanted that to
only affect weather and time, and for the regen
rates not to slow so..

In comm.c  heartbeat()

if (!(pulse % (SECS_PER_MUD_HOUR * PASSES_PER_SEC)))
    weather_and_time(1);

  if (!(pulse % (75 * PASSES_PER_SEC))) {
    affect_update();
    point_update();
    fflush(player_fl);
  }


Course in constants.c you'd need to erase 5 of the month_names so there are only 12(duh).  I think that was everything.



Angelfire for your free web-based e-mail. http://www.angelfire.com

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 04/11/01 PDT