Atmospheric Effects

version 6/080508 by Mikael Segercrantz

  • Home page
  • Beginning
  • Previous
  • Next

  • Part 5 - Common phrases for rooms, regions and things

    Chapter 5(a) - Displaying

    Section 5(a)1 - Display messages of

    To display messages of (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;
            let ign be 0;
            repeat with n running from 1 to the number of rows in tbl:
                choose row n in tbl;
                let doshow be 0;
                if there is a during entry:
                    if the during entry is happening, change doshow to 1;
                    change doshow to 1;
                if there is a subtable entry:
                    do nothing;
                    change doshow to 0;
                if ign is 1, change doshow to 0;
                if doshow is 1:
                    if a scenic with initch initch entry latch latch entry aftcnt aftcnt entry curcnt curcnt entry is shown:
                        let cc be the curcnt entry;
                        increase cc by 1;
                        if cc is greater than the number of filled rows in tbl, change cc to the number of filled rows in tbl;
                        change the curcnt entry to cc;
                        let rtype be the runtype entry;
                        let stbl be the subtable entry;
                        let scenic be the sctype entry;
                        if scenic is fully random, say a fully random scenic message of stbl running rtype;
                        if scenic is random, say a random scenic message of the stbl running rtype;
                        if scenic is ordered, say an ordered scenic message of stbl running rtype;
                        choose row n in tbl;
                        if the igtype entry is ignore, change ign to 1;
                        if the number of filled rows in the subtable entry is 0 and the frtype entry is default:
                            change the subtable entry to the Table of Default Messages;
                            change the frtype entry to stopping;
                            change the runtype entry to run forever.