Atmospheric Effects

version 6/080508 by Mikael Segercrantz

  • Home page
  • Beginning
  • Previous
  • Next



  • Section 2(b)3 - Initialize the location

    To initialize the location (r - an object):
        if r is a room or r is a region or r is a thing:
            let tbl be the scenic table of r;
            repeat with n running from 1 to the number of rows in tbl:
                choose row n in tbl;
                if there is a subtable entry:
                    if there is an initch entry:
                        do nothing;
                    otherwise:
                        change the initch entry to 100;
                    if there is a latch entry:
                        do nothing;
                    otherwise:
                        change the latch entry to the initch entry;
                    if there is an aftcnt entry:
                        do nothing;
                    otherwise:
                        change the aftcnt entry to 0;
                    if the aftcnt entry is less than 0, change the aftcnt entry to 0;
                    change the curcnt entry to 0;
                    if there is an sctype entry:
                        do nothing;
                    otherwise:
                        change the sctype entry to random;
                    if there is a runtype entry:
                        do nothing;
                    otherwise:
                        change the runtype entry to run forever;
                    if there is an frtype entry:
                        do nothing;
                    otherwise:
                        change the frtype entry to stopping;
                    if there is an igtype entry:
                        do nothing;
                    otherwise:
                        change the igtype entry to do not ignore;
                    if the subtable entry is the Table of Default Messages:
                        change the frtype entry to stopping;
                        change the runtype entry to run forever;
                    repeat through the subtable entry:
                        change the used entry to 0.