!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! ! FrankenPuter -- an "Interactive Edutainment" story ! by ! Kirk R. Goodell ! for ! Computer Game Design and Implementation ! CIS 490A / 587 ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Constant Story "FrankenPuter"; Constant Headline "^^~If you build it, they will compute.~^^ An ~Interactive Edutainment~ story^ by Kirk R. Goodell.^^"; Constant MAX_SCORE = 100; !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! Inform Compiler mandatory includes Include "Parser"; Include "VerbLib"; Include "Grammar"; !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! Custom Verbs ! The player can type the following verb to generate an "ASCII-art" ! representation of all the Computer Show vendors he has visited up to ! that point. Each Vendor's "visited" attribute is queried to ! determine whether that vendor's locations should show up on the map. ! The name of the vendor at the player's current location will appear ! in reverse video. Verb "map" "m" * -> Map; ! The routine to handle unexpected usages of "map". As it turns out, ! ALL usages of "map" are unexpected, since I didn't bake explicit ! support into each enterable object to handle the new "Map:" verb. ! This works out quite nicely! [ MapSub ; do_map(); ]; !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! Custom attributes ! The player is given the following attribute when the Computer Show ! Pass has been found. Only then can the player enter the building. Attribute computer_show_pass; ! An item is given this attribute once the player has purchased it. ! this covers the case in which the player drops an item at the same ! vendor location that he bought it from. Otherwise, he would have to ! buy it again! Attribute bought; !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! Configure startup conditions; ! Player can never be in the dark, ! Player starts out in parking lot, ! Tell background story. [ Initialise; give player light; location = ParkingLot; "^^^~...I want a REALLY GOOD computer, and I don't want to spend a lot~, your friend says as he drops you off. ~I'll be back when you're done~, you hear him shout as his car disappears down the road. Great, you think to yourself. What did I get myself into...^"; ]; !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! The Parking Lot is the initial location and is the root parent/ ! grandparent/great grandparent/etc. object of all children objects. Object ParkingLot "Parking Lot" ! This is a "room object" -- name things here that the Game Engine ! should say the user "doesn't need to refer to" as opposed to saying ! "there's no such thing": with name "sky" "ground" "blacktop" "asphalt" "pavement" "cement", description "There are several dumpy cars in the parking lot, the kind always driven by the ~computer-afflicted~. There are several pieces of paper blowing around. There is a ditch to the north, some trees to the east, and a desolate-looking road to the south. Bordering the west edge of the parking lot is an unassuming brick building with a sign on it.", n_to Ditch, e_to Trees, s_to Road, ! The first time the player tries to go into the show, he is ! turned away for not having a pass, and the PassDescriptor ! object in the Trees becomes visible. The player can enter ! the show once he enters the Trees and finds and retrieves ! the Computer Show Pass. w_to [; if (player hasnt computer_show_pass) { print "You try to enter the building, but a pencil-necked geek at the door says, ~Not without a pass, NinnyHammer!~^"; give PassDescriptor ~concealed; return ParkingLot; } ! If the player is carrying the useless piece of paper, drop ! it in the parking lot, as it will screw up the player's ! ability to carry sufficient computer parts! if (PaperDescriptor in player) move PaperDescriptor to ParkingLot; if (Building hasnt visited) { print "The pencil-necked geek eyes your pass suspiciously (and your pocket protector longingly), and finally lets you in when you toss him a mechanical pencil.^"; score = score + 10; } else { print "The pencil-necked geek nods you through, happily twirling his newly-acquired mechanical pencil.^"; } return Building; ]; Object InParkingLotDescriptor ParkingLot has concealed static with name "parking" "lot", description "Wait--let me check--yep, it's a parking lot all right."; ! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! A meaningful child object of ParkingLot. Intended to lead the player ! into thinking that the Computer Show Pass can be found somewhere. Object PaperDescriptor "piece of paper" ParkingLot has concealed with name "paper" "papers" "pieces", description "They are just scrap pieces of paper blowing around, in and out of the parking lot."; !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! ! External Building descriptor; viewable from parking lot. Object BuildingDescriptor ParkingLot has concealed static with name "building" "brick", description "It's some kind of social club--Moose, Elks, Buffalo, whatever--one of those places where they regularly drum up excuses to serve mass quantities of adult beverages.^ There's a sign precariously hung on the building.^ There's an open door leading into the building, due west of you."; Object Building "Just inside building" ! This is a "room object" -- name things here that the Game Engine ! should say the user "doesn't need to refer to" as opposed to saying ! "there's no such thing": with name "vendor" "vendors" "table" "tables" "door" "signs" "show" "people", description "You are just inside the door of the social club. The normally dimly-lit, smoky interior is now bright and cheery, with large, colorful signs erected across a bewildering maze of tables. Odd-looking people (much like yourself) are milling about, most carrying armfuls of computer guts and software.^^ The command ~map~ (or just ~m~) will show you a vendor table map of the locations you have visited so far, like this:^^ . +--------+ +--------+^ . | RAM |------| door |^ . +--------+ +--------+^^ The location that you're currently in will be displayed in inverse video.^^ -------------------------------------------------------------------------^^ To the east is the parking lot, visible through the door.^ To the west is the RAM vendor.", w_to RamVendor, ! Player is leaving the building. If he's completed building ! the computer (and has it with him!), launch the game-winning ! sequence, otherwise chew him out and give him a rough idea of ! what he's missing. The number of missing pieces is only ! approximated here, because the complexity of determining the ! exact number is tedious, due to nested items. e_to [ pieces_missing ; if (Case in player && Monitor in player && children(Monitor) == 1 && children(Case) == 6 && children(Mainboard) == 5) { deadflag = 2; ! "You have won." score = score + 10; "^You emerge triumphantly from the Computer Show, a speaker-endowed monitor under one arm and a fully-stuffed computer case (trailing a mouse and keyboard) under the other. Right on cue, your buddy comes screeching into the parking lot. ~Good job!~, he says, as you toss the monster machine into the back seat. ~Now let's go buy the 'Leisure Suit Larry Collection' and score a couple of cases of Jolt Cola--my treat!~^^ (You smile in anticipation as the two of you drive off into the sunset...)"; } pieces_missing = 0; print "For some odd reason, Pencil-Neck smirks and shakes his head at you as you leave the building. Once out in the parking lot, you inspect your hoard, only to find out what Pencil-Neck was smirking about--you don't have everything you need! DOOH!!!^^"; if (Case notin player) { print "You don't even have the computer case, which should have a bunch of stuff in it!^"; pieces_missing = pieces_missing + 7; } else { if (children(Case) < 6) { print "You have the computer case, but it's "; switch (children(Case)) { 0: print "completely empty. It doesn't even have a mouse or a keyboard!^"; pieces_missing = pieces_missing + 6; 1: print "missing five pieces.^"; pieces_missing = pieces_missing + 5; 2: print "missing four pieces.^"; pieces_missing = pieces_missing + 4; 3: print "missing three pieces.^"; pieces_missing = pieces_missing + 3; 4: print "missing two pieces.^"; pieces_missing = pieces_missing + 2; 5: print "missing a piece.^"; pieces_missing = pieces_missing + 1; } } if (Mainboard in Case) print "You DID manage to stuff a mainboard into the case--"; } if (Mainboard in player) print "I see you've managed to acquire a mainboard--"; if (Mainboard in player || Mainboard in Case && Case in player) { if (children(Mainboard) == 5) print "and its fully populated, too!^"; else { switch (children(Mainboard)) { 0: print "but it's completely bare. It doesn't even have a CPU!^"; pieces_missing = pieces_missing + 5; 1: print "but it's missing four pieces.^"; pieces_missing = pieces_missing + 4; 2: print "but it's missing three pieces.^"; pieces_missing = pieces_missing + 3; 3: print "but it's missing two pieces.^"; pieces_missing = pieces_missing + 2; 4: print "but it's missing a piece.^"; pieces_missing = pieces_missing + 1; } } } else pieces_missing = pieces_missing + 6; if (Monitor notin player) { pieces_missing = pieces_missing + 2; if (pieces_missing == 0) print "You forgot the most important piece--the monitor!^"; else print "Besides THAT, you forgot the most important piece of all--the monitor!^"; } else if (children(Monitor) < 1) { print "You remembered a monitor, but it doesn't have any of those fancy velcro'ed-on speakers!^"; pieces_missing = pieces_missing + 1; } ! Look for indications of the resouceful gamer trying to get ! around the "two item limit" by accumulating stuff in the ! foyer, then picking it up all at once. He's got a big ! surprise coming--only vendors can correctly assemble the ! pieces! Tell the player that his trick didn't work, and ! tell him what he needs to do to recover. ! (NOTE: Building has 2 "naturally-occurring" children, ! and ParkingLot has 8.) if (children(player) > 2 || children(Building) > 2 || children(ParkingLot) > 8) { print "^Looks like you're having some assembly problems. If you've been accumulating and/or disassembling items in the building foyer or here in the parking lot, you'll need to take all your items and drop them at a vendor table, so they can help you assemble the computer. (Thought you were getting away with something, didn't you?) I'll even be nice to you, and let you carry all the items at the same time to a vendor. By the way, the vendor may get confused, depending on the order in which you drop and pick up stuff, so have some patience and work with him, OK?^^"; } else { ! We tallied missing pieces for the container objects-- ! the case, the mainboard, and the monitor. However, the ! player may be carrying some loose pieces, or he may be ! dropping them in the parking lot, so decrement these ! items from the "missing" tally. (Careful--ParkingLot ! has eight children from the get-go!) pieces_missing = pieces_missing - children(player); pieces_missing = pieces_missing - children(ParkingLot) +8; if (pieces_missing == 1) print "^Looks like you're only missing ONE piece. "; else print "^All told, looks like you've missing roughly ", pieces_missing, " pieces. "; } print "Now you'd better get back inside and get what you need before your buddy comes back!^"; return ParkingLot; ]; ! Internal Building descriptor; viewable from inside building. Object InBuildingDescriptor Building has concealed static with name "club" "interior" "building", description "Yep, it's some kind of social club all right, but there's no booze today, instead there's something far more intoxicating--COMPUTER STUFF!!! WOOHOO!!!"; !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! A meaningful child object of ParkingLot. Intended to inform the ! player that there is a Computer Show inside the building. Object SignDescriptor ParkingLot has concealed static with name "sign" "plaque" "words", description "The sign reads: ~Today only: Super-Duper Computer Sale (and Beanie Babies)~"; !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! A meaningful child object of ParkingLot. Intended as comic relief. Object CarsDescriptor ParkingLot has concealed static with name "car" "cars" "vehicle" "vehicles", description "These cars must have been something to look at in their heyday (20 years ago)."; !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! ! External Ditch descriptor; viewable from parking lot. Object DitchDescriptor ParkingLot has concealed static with name "ditch" "trench" "canal", description "I'm thirsty. I wonder if there's water in it?"; Object Ditch "Ditch" ! This is a "room object" -- name things here that the Game Engine ! should say the user "doesn't need to refer to" as opposed to saying ! "there's no such thing": with name "muck" "ankle" "thing", description "Nice going. You're now knee-deep in sticky muck. Something squirms around your ankle. Not knowing much about nature, you can't even BEGIN to imagine what it is.^ The parking lot is to the south, behind you.", s_to ParkingLot; ! Internal Ditch descriptor; viewable from inside Ditch. Object InDitchDescriptor Ditch has concealed static with name "ditch" "trench" "canal", description "The water sure LOOKS good..."; !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! A meaningful child object of Ditch. Before the stream is given the ! "general" attribute, the player will drink from the stream. After ! that, the player will refuse to drink any more, because we give the ! stream the "general" attribute. Note that the stream must be made ! static, so that the user cannot pick it up and place it in the ! parking lot, for example! Note also that the "Examine:" override ! changes the stream description after the player drinks from it. Object Stream "Stream" Ditch has static, ! This is a "room object" -- name things here that the Game Engine ! should say the user "doesn't need to refer to" as opposed to saying ! "there's no such thing": with name "stream" "water", description "It's a stream of potentially yummy water.", before [; Examine: if (self has general) { "It's a stream of definitedly yucky water."; } Drink: if (self hasnt general) { give self general; "Oh, THAT was refreshing. Keep THAT up, and you won't NEED a computer to hallucinate!. (Try it again and I'll decrement your score!)"; } score = score - 5; "Thank you, no. I'm still suffering from the first swig."; ]; !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! ! External Trees descriptor; viewable from parking lot. Object TreesDescriptor ParkingLot has concealed static with name "tree" "trees" "woods" "forest", description "You suddenly get the urge to relieve yourself."; Object Trees "Trees" ! This is a "room object" -- name things here that the Game Engine ! should say the user "doesn't need to refer to" as opposed to saying ! "there's no such thing": with name "ground" "dirt", description "You can't see the forest for the trees (And you had such high expectations...). The trees seem to be closing in on you; you're anxious to get back to the parking lot to the west.", w_to ParkingLot; ! Internal Trees descriptor; viewable from inside Trees. Object InTreesDescriptor Trees has concealed static with name "tree" "trees" "woods" "forest", description "Yeah, these are treeware all right, them things that they make printer paper and user manuals from."; !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! ! A meaningful child object of Trees. Before the pass is visible, The ! response to "examine paper(et al.)" uses the default "description" ! and refers to the papers in the parking lot. After the pass becomes ! visible, the "Examine:" case in the "before:" clause overrides the ! default description and refers to the pass. In other words, what ! "examine paper" refers to varies depending on the visibility of the ! Computer Show Pass. Object PassDescriptor "postcard stuck in a tree branch" Trees has concealed with name "paper" "papers" "pieces" "card" "postcard", description "Funny, no paper here. The way it was blowing around in the parking lot, you were SURE there would be some pieces stuck in the tree branches.", before [; Examine: if (PassDescriptor hasnt concealed) { "~Hey, is that what I think it is?~"; } Take: if (PassDescriptor hasnt concealed) { give player computer_show_pass; score = score + 10; remove PassDescriptor; "~Yep, this is a genuine Computer Show Pass!~ In typical nerd fashion, you pin the pass to your pocket protector, proudly protruding from the right-hand pocket of your double-pocketed shirt (you ARE, after all, left-handed, which is the whole reason for buying double-pocketed shirts in the first place, duh!)"; } ]; !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! ! External Road descriptor; viewable from parking lot. Object RoadDescriptor ParkingLot has concealed static with name "road" "street" "curb" "shoulder", description "Maybe there's some fresh road-kill!"; Object Road "Road" ! This is a "room object" -- name things here that the Game Engine ! should say the user "doesn't need to refer to" as opposed to saying ! "there's no such thing": with name "semi", description "You narrowly avoid being squished by a semi. Maybe you'd better wait for your buddy to come back with his car (Besides, isn't there something he wanted you to do?).^ The parking lot is right behind you, to the north.", n_to ParkingLot; ! Internal Road descriptor; viewable from inside Road. Object InRoadDescriptor Road has concealed static with name "road" "street" "curb" "shoulder", description "Dang! No road-kill. I'll check back later."; !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F- !F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F !-F-F !F-F- The following seven functions are used by vendor objects. !-F-F Although it makes no difference to the Inform Compuler, !F-F- they are listed here in a certain order--any function which !-F-F can be called by another function is defined before the !F-F- calling function, in C-language fashion. !-F-F !F-F- void do_map ( void ); !-F-F !F-F- Called by MapSub() when the new "map" verb is typed by the !-F-F user to print the map of vendors visited up to that point. !F-F- !-F-F void do_examine ( item, this ); !F-F- !-F-F Processes "Examine:" logic that's identical to !F-F- all attainable items' Vendor Objects. !-F-F !F-F- boolean player_hasnt_mainboard( void ); !-F-F !F-F- Returns "true" if player isn't holding the mainboard !-F-F directly, and either isn't holding the case or the case !F-F- doesn't contain the mainboard. Returns "false" otherwise. !-F-F Called by function limit_exceeded_by(). !F-F- !-F-F boolean limit_exceeded_by ( item ); !F-F- !-F-F Returns "true" if the item that the player is trying to !F-F- pick up would exceed the allowable item count, because !-F-F it can't be combined (by the subsequent call to !F-F- do_assembly()) with an item already being carried. !-F-F Returns "false" otherwise. !F-F- !-F-F void do_acquire ( item, this ); !F-F- !-F-F Processes "Buy,Take:" logic that's identical to !F-F- all attainable items' Vendor Objects. !-F-F !F-F- void do_assemble_to_mainboard ( void ); !-F-F !F-F- Assembles pieces to the mainboard !-F-F as the player acquires them. !F-F- Called by function do_assembly(). !-F-F !F-F- void do_assembly ( void ); !-F-F !F-F- Assembles pieces of the computer, as !-F-F possible, as the player acquires them. !F-F- !-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F- !F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F !-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F- ! ! FUNCTION: do_map(void); Standalone void function. ! ! void: no parameters ! returns: void (ignored) ! ! Prints map of visited Computer Show vendors. [ do_map ; ! void ; if (CaseVendor hasnt visited && ModemVendor hasnt visited && CdromVendor hasnt visited && MonitorVendor hasnt visited && CpuVendor hasnt visited && MouseVendor hasnt visited && FloppyVendor hasnt visited && RamVendor hasnt visited && HarddriveVendor hasnt visited && SoundVendor hasnt visited && KeybrdVendor hasnt visited && SpeakerVendor hasnt visited && MainboardVendor hasnt visited && VideoVendor hasnt visited) "Sorry, your map is blank--you haven't visited any vendors yet!"; !else ! Turn off default font; enables a monospaced font. font off; ! There are five horizontal (east-west) aisles. The northern-most ! aisle will be referred to as Aisle #1, the southern-most as ! Aisle #5, and the other three as #2, #3, and #4 as you move from ! north to south. In order to generate and print the map, the ! aisles must be processed top-down, from Aisle #1 to Aisle #5. !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! !! Aisle #1: !! !! +--------+ +--------+ !! | MICE |------| KEYBDs | !! +--------+ +--------+ !! | !! ! If the keyboard vendor has been visited, then print the mouse ! vendor location (which is to the left of it) also, since the ! player had to come through there to get to the keyboard vendor. if (KeybrdVendor has visited) { print " +--------+ +--------+ ^"; print " |" ; ! If the player is currently in the mouse vendor ! location, then print the location's name in reverse video. if (player in MouseVendor) style reverse; print " MICE " ; style roman; print "|------|" ; ! If the player is currently in the keyboard vendor ! location, then print the location's name in reverse video. if (player in KeybrdVendor) style reverse; print " KEYBDs " ; style roman; print "| ^"; print " +--------+ +--------+ ^"; } ! If the mouse vendor has been visited, but the keyboard vendor (to ! the right) has not, then just print the mouse vendor location. else if (MouseVendor has visited) { print " +--------+ ^"; print " |" ; ! If the player is currently in the mouse vendor ! location, then print the location's name in reverse video. if (player in MouseVendor) style reverse; print " MICE " ; style roman; print "|--- ^"; print " +--------+ ^"; } ! If the mouse vendor has been visited, print the mouse vendor's ! end of the aisleway which connects the mouse vendor to the hard ! drive vendor, since the player had to come through there to get ! to the mouse vendor. if (MouseVendor has visited) { print " | ^"; } !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! !! Aisle #2: !! | !! +--------+ +--------+ +--------+ +--------+ !! | M/Bs |------| HDs |------| FLOPPY |------| VIDEO | !! +--------+ +--------+ +--------+ +--------+ !! | !! ! If the hard drive vendor has been visited, then print the hard ! drive vendor's end of the aisleway leading to the mouse vendor. if (HarddriveVendor has visited) { print " | ^"; } ! If the mainboard and video vendors have both been visited, then ! print this whole line of vendor locations, since these vendors ! occupy the two end locations of this aisleway. if (MainboardVendor has visited && VideoVendor has visited) { print "+--------+ +--------+ +--------+ +--------+^"; print "|" ; ! If the player is currently in the mainboard vendor ! location, then print the location's name in reverse video. if (player in MainboardVendor) style reverse; print " M/Bs " ; style roman; print "|------|" ; ! If the player is currently in the hard drive vendor ! location, then print the location's name in reverse video. if (player in HarddriveVendor) style reverse; print " HDs " ; style roman; print "|------|" ; ! If the player is currently in the floppy drive vendor ! location, then print the location's name in reverse video. if (player in FloppyVendor) style reverse; print " FLOPPY " ; style roman; print "|------|" ; ! If the player is currently in the video card vendor ! location, then print the location's name in reverse video. if (player in VideoVendor) style reverse; print " VIDEO " ; style roman; print "|^"; print "+--------+ +--------+ +--------+ +--------+^"; } ! If the mainboard vendor hasn't been visited but the video vendor ! has, then print the line of vendor locations from the hard drive ! vendor to the video vendor, since all these locations had to be ! visited in order to get to the video vendor. else if (MainboardVendor hasnt visited && VideoVendor has visited) { print " +--------+ +--------+ +--------+^"; print " ---|" ; ! If the player is currently in the hard drive vendor ! location, then print the location's name in reverse video. if (player in HarddriveVendor) style reverse; print " HDs " ; style roman; print "|------|" ; ! If the player is currently in the floppy drive vendor ! location, then print the location's name in reverse video. if (player in FloppyVendor) style reverse; print " FLOPPY " ; style roman; print "|------|" ; ! If the player is currently in the video card vendor ! location, then print the location's name in reverse video. if (player in VideoVendor) style reverse; print " VIDEO " ; style roman; print "|^"; print " +--------+ +--------+ +--------+^"; } ! If the mainboard and video vendors haven't been visited but the ! floppy drive vendor has, then print the hard drive and floppy ! drive vendor locations, since the player had to go through the ! hard drive vendor in order to get to the floppy drive vendor. else if (MainboardVendor hasnt visited && FloppyVendor has visited) { print " +--------+ +--------+ ^"; print " ---|" ; ! If the player is currently in the hard drive vendor ! location, then print the location's name in reverse video. if (player in HarddriveVendor) style reverse; print " HDs " ; style roman; print "|------|" ; ! If the player is currently in the floppy drive vendor ! location, then print the location's name in reverse video. if (player in FloppyVendor) style reverse; print " FLOPPY " ; style roman; print "|--- ^"; print " +--------+ +--------+ ^"; } ! If the mainboard and floppy vendors haven't been visited but the ! hard drive vendor has, then print the hard drive vendor location. else if (MainboardVendor hasnt visited && HarddriveVendor has visited) { print " +--------+ ^"; print " ---|" ; ! If the player is currently in the hard drive vendor ! location, then print the location's name in reverse video. if (player in HarddriveVendor) style reverse; print " HDs " ; style roman; print "|--- ^"; print " +--------+ ^"; } ! If the mainboard and floppy drive vendors have been visited but the ! video vendor has not, then print the mainboard, hard drive, and ! floppy drive vendor locations, since the player had to go through ! the hard drive vendor in order to get to the mainboard and floppy ! drive vendors. else if (MainboardVendor has visited && FloppyVendor has visited) { print "+--------+ +--------+ +--------+ ^"; print "|" ; ! If the player is currently in the mainboard vendor ! location, then print the location's name in reverse video. if (player in MainboardVendor) style reverse; print " M/Bs " ; style roman; print "|------|" ; ! If the player is currently in the hard drive vendor ! location, then print the location's name in reverse video. if (player in HarddriveVendor) style reverse; print " HDs " ; style roman; print "|------|" ; ! If the player is currently in the floppy drive vendor ! location, then print the location's name in reverse video. if (player in FloppyVendor) style reverse; print " FLOPPY " ; style roman; print "|--- ^"; print "+--------+ +--------+ +--------+ ^"; } ! If the mainboard vendor has been visited but the floppy vendor ! has not, then print the mainboard and hard drive vendor locations ! since the player had to go through the hard drive vendor in order ! to get to the mainboard vendor. else if (MainboardVendor has visited) ! and FloppyVendor hasn't { print "+--------+ +--------+ ^"; print "|" ; ! If the player is currently in the mainboard vendor ! location, then print the location's name in reverse video. if (player in MainboardVendor) style reverse; print " M/Bs " ; style roman; print "|------|" ; ! If the player is currently in the hard drive vendor ! location, then print the location's name in reverse video. if (player in HarddriveVendor) style reverse; print " HDs " ; style roman; print "|--- ^"; print "+--------+ +--------+ ^"; } ! If the hard drive vendor has been visited, print the hard drive ! vendor's end of the aisleway which connects the hard drive vendor ! to the CD-ROM drive vendor, since the player had to come through ! there to get to the hard drive vendor. if (HarddriveVendor has visited) { print " | ^"; } !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! !! Aisle #3: !! | !! +--------+ +--------+ +--------+ +--------+ !! | MODEMS |------| CDs |------| SOUND |------| RAM |--> !! +--------+ +--------+ +--------+ +--------+ !! | | !! ! If the CD-ROM drive vendor has been visited, then print the ! CD-ROM drive vendor's end of the aisleway leading to the ! hard drive vendor. if (CdromVendor has visited) { print " | ^"; } ! If the modem vendor has been visited, then print this whole line ! of vendor locations, since this entire aisleway had to be ! traversed to reach the modem vendor. if (ModemVendor has visited) { print "+--------+ +--------+ +--------+ +--------+^"; print "|" ; ! If the player is currently in the modem vendor ! location, then print the location's name in reverse video. if (player in ModemVendor) style reverse; print " MODEMs " ; style roman; print "|------|" ; ! If the player is currently in the CD-ROM drive vendor ! location, then print the location's name in reverse video. if (player in CdromVendor) style reverse; print " CDs " ; style roman; print "|------|" ; ! If the player is currently in the sound card vendor ! location, then print the location's name in reverse video. if (player in SoundVendor) style reverse; print " SOUND " ; style roman; print "|------|" ; ! If the player is currently in the RAM vendor ! location, then print the location's name in reverse video. if (player in RamVendor) style reverse; print " RAM " ; style roman; print "|-->^"; print "+--------+ +--------+ +--------+ +--------+^"; print " | | ^"; } ! If the modem vendor has not been visited, but the CD-ROM drive ! vendor has, then print the line of vendor locations from the ! CD-ROM vendor to the RAM vendor, since they all had to be ! traversed to reach the CD-ROM drive vendor. else if (CdromVendor has visited) { print " +--------+ +--------+ +--------+^"; print " ---|" ; ! If the player is currently in the CD-ROM drive vendor ! location, then print the location's name in reverse video. if (player in CdromVendor) style reverse; print " CDs " ; style roman; print "|------|" ; ! If the player is currently in the sound card vendor ! location, then print the location's name in reverse video. if (player in SoundVendor) style reverse; print " SOUND " ; style roman; print "|------|" ; ! If the player is currently in the RAM vendor ! location, then print the location's name in reverse video. if (player in RamVendor) style reverse; print " RAM " ; style roman; print "|-->^"; print " +--------+ +--------+ +--------+^"; print " | ^"; } ! If the CD-ROM drive vendor has not been visited, but the sound ! card vendor has, then print the sound card and RAM vendor ! locations, since the player had to go through the RAM vendor to ! reach the sound card vendor. else if (SoundVendor has visited) { print " +--------+ +--------+^"; print " ---|" ; ! If the player is currently in the sound card vendor ! location, then print the location's name in reverse video. if (player in SoundVendor) style reverse; print " SOUND " ; style roman; print "|------|" ; ! If the player is currently in the RAM vendor ! location, then print the location's name in reverse video. if (player in RamVendor) style reverse; print " RAM " ; style roman; print "|-->^"; print " +--------+ +--------+^"; print " | ^"; } ! If the sound vendor has not been visited, but the RAM vendor has, ! then print the RAM vendor location only. else if (RamVendor has visited) { print " +--------+^"; print " ---|" ; ! If the player is currently in the RAM vendor ! location, then print the location's name in reverse video. if (player in RamVendor) style reverse; print " RAM " ; style roman; print "|-->^"; print " +--------+^"; print " ^"; } !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! !! Aisle #4: !! !! | !! +--------+ +--------+ +--------+ !! | CPUs | | CASEs |------|MONITORs| !! +--------+ +--------+ +--------+ !! | !! ! If the CPU vendor has been visited, but the monitor ! vendor has not, then just print the CPU vendor location. if (CpuVendor has visited && MonitorVendor hasnt visited) { print " | ^"; print "+--------+ ^"; print "|" ; ! If the player is currently in the CPU vendor ! location, then print the location's name in reverse video. if (player in CpuVendor) style reverse; print " CPUs " ; style roman; print "| ^"; print "+--------+ ^"; print " ^"; } ! If the CPU and case vendors have been visited, then print this ! whole line of vendor locations, since the monitor vendor had to ! be traversed to reach the case vendor. else if (CpuVendor has visited && CaseVendor has visited) { print " | | ^"; print "+--------+ +--------+ +--------+ ^"; print "|" ; ! If the player is currently in the CPU vendor ! location, then print the location's name in reverse video. if (player in CpuVendor) style reverse; print " CPUs " ; style roman; print "| |" ; ! If the player is currently in the case vendor ! location, then print the location's name in reverse video. if (player in CaseVendor) style reverse; print " CASEs " ; style roman; print "|------|" ; ! If the player is currently in the monitor vendor ! location, then print the location's name in reverse video. if (player in MonitorVendor) style reverse; print "MONITORs" ; style roman; print "| ^"; print "+--------+ +--------+ +--------+ ^"; print " | ^"; } ! If the CPU and monitor vendors have been visited, but the case ! vendor has not, then don't print the case vendor location. else if (CpuVendor has visited && MonitorVendor has visited && CaseVendor hasnt visited) { print " | | ^"; print "+--------+ +--------+ ^"; print "|" ; ! If the player is currently in the CPU vendor ! location, then print the location's name in reverse video. if (player in CpuVendor) style reverse; print " CPUs " ; style roman; print "| ---|" ; ! If the player is currently in the monitor vendor ! location, then print the location's name in reverse video. if (player in MonitorVendor) style reverse; print "MONITORs" ; style roman; print "| ^"; print "+--------+ +--------+ ^"; print " | ^"; } ! If the CPU and case vendors have not been visited, but the ! monitor vendor has been visited, then just print the monitor ! vendor location. else if (CpuVendor hasnt visited && CaseVendor hasnt visited && MonitorVendor has visited) { print " | ^"; print " +--------+ ^"; print " ---|" ; ! If the player is currently in the monitor vendor ! location, then print the location's name in reverse video. if (player in MonitorVendor) style reverse; print "MONITORs" ; style roman; print "| ^"; print " +--------+ ^"; print " | ^"; } ! If the CPU vendor has not been visited, but the case and monitor ! vendors have been visited, then print the case and monitor ! vendor locations. else if (CpuVendor hasnt visited && CaseVendor has visited && MonitorVendor has visited) { print " | ^"; print " +--------+ +--------+ ^"; print " |" ; ! If the player is currently in the case vendor ! location, then print the location's name in reverse video. if (player in CaseVendor) style reverse; print " CASEs " ; style roman; print "|------|" ; ! If the player is currently in the monitor vendor ! location, then print the location's name in reverse video. if (player in MonitorVendor) style reverse; print "MONITORs" ; style roman; print "| ^"; print " +--------+ +--------+ ^"; print " | ^"; } !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! !! Aisle #5: !! !! | !! +--------+ !! | SPKRs | !! +--------+ !! !! ! If speaker vendor has been visited, Print its location. if (SpeakerVendor has visited) { print " | ^"; print " +--------+ ^"; print " |" ; ! If the player is currently in the speaker vendor ! location, then print the location's name in reverse video. if (player in SpeakerVendor) style reverse; print " SPKRs " ; style roman; print "| ^"; print " +--------+ "; } ! Turn on previously disabled default font. font on; ]; ! !-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F- !-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F- ! ! FUNCTION: do_examine(item,this); Standalone void function. ! ! item: the object that the user is trying to examine ! this: the item that the vendor at this location sells ! returns: void (ignored) ! ! Processes "Examine:" logic that's identical to all attainable items. [ do_examine item this ; ! Override all other default descriptions to keep us out ! of trouble with the Inform Engine's spaghetti logic! if (noun ~= this) "Don't get distracted--you're concentrating on this particular vendor's wares at the moment."; ! If you already have an item from this vendor, override ! the default (prepurchase) description. if (item in player) "Actually, you have no further interest in this table, or this vendor, since you bought one of these already."; ! Default prepurchase description. "Yep, it's just the kind you need."; ]; ! !-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F- !-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F- ! ! FUNCTION: player_hasnt_mainboard(void); Standalome boolean function. ! ! void: no parameters ! returns: true if player isn't holding the mainboard directly, ! and either isn't holding the case or the case doesn't ! contain the mainboard. ! called by: function limit_exceeded_by(). [ player_hasnt_mainboard ; ! void ; if ( Mainboard notin player && ( Case notin player || ( Case in player && Mainboard notin Case ) ) ) rtrue; rfalse; ]; ! !-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F- !-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F- ! ! FUNCTION: limit_exceeded_by(item); Standalone boolean function. ! ! item: the object that the user is trying to acquire ! returns: true if item cannot be picked up without violating the ! "no more than two loose items at a time" rule. In other ! words, items that can be combined don't increase the ! item count. ! called by: function do_acquire(). ! NOTE: This function can actually exceed the allowed item ! count, but only if it knows that the subsequent call ! to do_assembly() can (and will) bring it back under ! the limit. [ limit_exceeded_by item ; ! void ; if (children(player) >= 2) { switch(item) { ! The player can pick up the case without increasing his item ! count if he has either the mainboard, mouse, keyboard, hard ! drive, floppy drive, or CD-ROM drive to combine with it. Case: if ( Mainboard notin player && Mouse notin player && Keybrd notin player && Harddrive notin player && Floppy notin player && Cdrom notin player ) rtrue; ! The player can pick up the CD-ROM drive without increasing ! his item count if he has the case to combine with it. Cdrom: if (Case notin player) rtrue; ! The player can pick up the CPU without increasing his ! item count if he has the mainboard to combine with it. Cpu: if (player_hasnt_mainboard()) rtrue; ! The player can pick up the floppy drive without increasing ! his item count if he has the case to combine with it. Floppy: if (Case notin player) rtrue; ! The player can pick up the hard drive without increasing ! his item count if he has the case to combine with it. Harddrive: if (Case notin player) rtrue; ! The player can pick up the keyboard without increasing ! his item count if he has the case to combine with it. Keybrd: if (Case notin player) rtrue; ! The player can pick up the mainboard without increasing ! his item count if he has either the case, RAM, sound card, ! video card, modem, or CPU to combine with it. Mainboard: if ( Case notin player && Ram notin player && Sound notin player && Video notin player && Modem notin player && Cpu notin player ) rtrue; ! The player can pick up the modem without increasing ! his item count if he has the mainboard to combine with it. Modem: if (player_hasnt_mainboard()) rtrue; ! The player can pick up the monitor without increasing ! his item count if he has the speakers to combine with it. Monitor: if (Speakers notin player) rtrue; ! The player can pick up the mouse without increasing ! his item count if he has the case to combine with it. Mouse: if (Case notin player) rtrue; ! The player can pick up the RAM without increasing ! his item count if he has the mainboard to combine with it. Ram: if (player_hasnt_mainboard()) rtrue; ! The player can pick up the sound card without increasing ! his item count if he has the mainboard to combine with it. Sound: if (player_hasnt_mainboard()) rtrue; ! The player can pick up the speakers without increasing ! his item count if he has the monitor to combine with them. Speakers: if (Monitor notin player) rtrue; ! The player can pick up the video card without increasing ! his item count if he has the mainboard to combine with it. Video: if (player_hasnt_mainboard()) rtrue; } ! end switch; } ! end if (children(player) >= 2) rfalse; ]; ! !-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F- !-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F- ! ! FUNCTION: do_acquire(item,this); Standalone void function. ! ! item: the object that the user is trying to acquire ! this: the item that the vendor at this location sells ! returns: void (ignored) ! ! Processes "Buy,Take:" logic that's identical to all attainble items. [ do_acquire item this ; ! Let's see if we can carry this item. if (limit_exceeded_by(item)) "You can only carry two things at a time (unless you spontaneously evolve into an insect-like creature). You'd better figure out how this stuff goes together on the ~fly~..."; ! If a previously purchasd item is here, you must ! have dropped it; go ahead and retrieve it again. if (item in self && item has bought) { move item to player; "You retrieve that item, which you had dropped here earlier."; } ! Don't allow player to retrieve a different vendor's item here. if (item ~= this) "You can't get that here. Besides, you already bought one."; ! Don't allow player to get multiple identical items. if (item in player) "You already bought one."; ! Player hasn't gotten one of these yet. move this to player; give this bought; score = score + 5; ! Don't know how to access the string name of an object. ! Switch off of the integer value. ! DANGER! These could change if the program is modified!!! print "You purchase a "; switch (this) { 44: print "nice tower case, with a beefy power supply"; 46: print "50X multi-track-read CD-ROM drive"; 48: print "750 MHz Plenty-yum 30 CPU"; 50: print "combination 1.44Mb/2.88Mb/120Mb floppy drive"; 52: print "ludicrously large, 50Gb SCUZZY hard drive"; 54: print "wireless, noiseless, ergonomic keyboard"; 56: print "SCUZZY-endowed ATX-style mainboard"; 58: print "112Kbps dual-line modem"; 60: print "21 inch, 80-pound monitor"; 62: print "3-button, wireless, scrolly-wheel rodent"; 64: print "1Gb, liquid-nitrogen-cooled RAM module"; 66: print "128-bit, 3D positional audio sound card"; 68: print "pair of 200-watt, crowd-annhilator speakers"; 70: print "32Mb 3Dfx Voodoo III video accelerator card"; } " from the vendor, charging it to your HackerCard."; ]; ! !-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F- !-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F- ! ! FUNCTION: do_assemble_to_mainboard(void); Standalone void function. ! ! void: no parameters ! returns: void (ignored) ! called by: function do_assembly(). ! ! Assembles pieces to the mainboard as the player acquires them. This ! was coded as a separate function, because it needs to be called for ! two separate conditions: ! (1) when the Mainboard is in the player, and ! (2) when the Mainboard is in the Case, which is in the player. [ do_assemble_to_mainboard ; ! void ; if (Cpu in player) move Cpu to Mainboard; if (Modem in player) move Modem to Mainboard; if (Ram in player) move Ram to Mainboard; if (Sound in player) move Sound to Mainboard; if (Video in player) move Video to Mainboard; ]; ! !-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F- !-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F- ! ! FUNCTION: do_assembly(void); Standalone void function. ! ! void: no parameters ! returns: void (ignored) ! ! Assembles pieces of the computer as the player acquires them. The ! player can carry no more than two things at any one time, so ! eventually he must end up with the monitor in one hand (with the ! speakers attached) and the computer in the other (with the mouse and ! keyboard attached and everything else inside). [ do_assembly ; ! void ; ! If the player is holding the mainboard, he can insert any of the ! following into it: CPU, modem, RAM, sound card, or video card. if (Mainboard in player) { do_assemble_to_mainboard(); } ! If the player is holding the case, we can check for two things: ! (1) he can insert any of the following directly into it: ! CD-ROM, floppy drive, hard drive, keyboard, mainboard, mouse. ! (2) if the mainboard is in the case, he can insert any of the ! following into it: CPU, modem, RAM, sound card, or video card if (Case in player) { ! (1) if (Cdrom in player) move Cdrom to Case; if (Floppy in player) move Floppy to Case; if (Harddrive in player) move Harddrive to Case; if (Keybrd in player) move Keybrd to Case; if (Mainboard in player) move Mainboard to Case; if (Mouse in player) move Mouse to Case; ! (2) if (Mainboard in Case) do_assemble_to_mainboard(); } ! If the player is holding the monitor and ! speakers, he can connect them together. if (Monitor in player && Speakers in player) move Speakers to Monitor; ]; ! !-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F-F- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!! !!!! The remaining 14 Object pairs (location/item) represent the 14 !!!! Computer Show Vendors. !!!! Since the player can only carry two things at a time (one in !!!! each hand), he must assemble the computer on the fly. !!!! For example, the player cannot carry the RAM, sound card, and !!!! monitor at the same time, because none of these objects can be !!!! combined with one another. !!!! The relationships between the items are as follows: !!!! !!!! !!!! +---------+ !!!! | Monitor | !!!! | (base | <-- Speakers !!!! | item) | !!!! +---------+ !!!! !!!! Cdrom --> +-------------+ +-----------+ <-- Cpu !!!! Floppy --> | Case | | | <-- Modem !!!! Harddrive --> | (the other | <-- | Mainboard | <-- Ram !!!! Keybrd --> | base item) | | | <-- Sound !!!! Mouse --> +-------------+ +-----------+ <-- Video !!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! Object CaseVendor "computer case vendor" ! This is a "room object" -- name things here that the Game Engine ! should say the user "doesn't need to refer to" as opposed to saying ! "there's no such thing": with name "vendor" "table", description "You are standing before the computer case vendor. There are several tower and desktop cases of various sizes here.^ To the east is the monitor vendor.", before [; Examine: do_examine(noun,Case); rtrue; Buy,Take: do_acquire(noun,Case); do_assembly(); rtrue; ], e_to MonitorVendor; ! Case object; viewable from inside CaseVendor. ! This is one of the items you acquire to build the computer. Object Case "case" CaseVendor has container open with name "case" "tower" "desktop"; !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! Object CdromVendor "CD-ROM drive vendor" ! This is a "room object" -- name things here that the Game Engine ! should say the user "doesn't need to refer to" as opposed to saying ! "there's no such thing": with name "vendor" "table" "door", description "You are standing before the CD-ROM drive vendor. His table has a veritable deluge of CD-ROM drives from speeds of 8X (antiques) up to the new 50X multi-track-read drives!.^ To the north is the hard drive vendor.^ To the east is the sound card vendor.^ To the west is the modem vendor.^", before [; Examine: do_examine(noun,Cdrom); rtrue; Buy,Take: do_acquire(noun,Cdrom); do_assembly(); rtrue; ], n_to HarddriveVendor, e_to SoundVendor, w_to ModemVendor; ! Cdrom object; viewable from inside CdromVendor. ! This is one of the items you acquire to build the computer. Object Cdrom "CD-ROM drive" CdromVendor with name "cd" "rom" "cdrom" "cd-rom"; !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! Object CpuVendor "CPU vendor" ! This is a "room object" -- name things here that the Game Engine ! should say the user "doesn't need to refer to" as opposed to saying ! "there's no such thing": with name "vendor" "table", description "You are standing before the CPU (processor) vendor. His table is lined with glass display cases showcasing all the latest CPUs.^ To the north is the modem vendor.", before [; Examine: do_examine(noun,Cpu); rtrue; Buy,Take: do_acquire(noun,Cpu); do_assembly(); rtrue; ], n_to ModemVendor; ! Cpu object; viewable from inside CpuVendor. ! This is one of the items you acquire to build the computer. Object Cpu "CPU" CpuVendor with name "cpu" "processor"; !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! Object FloppyVendor "floppy drive vendor" ! This is a "room object" -- name things here that the Game Engine ! should say the user "doesn't need to refer to" as opposed to saying ! "there's no such thing": with name "vendor" "table", description "You are standing before the floppy drive vendor. There are both 5 1/4 and 3 1/2 inch floppy drives, though I can't imagine why anyone would still want a 5 1/4! There might even be one or two of those preppy 2.88Mb drives here, that nobody but IBM supports.^ To the east is the video card vendor.^ To the west is the hard drive vendor.", before [; Examine: do_examine(noun,Floppy); rtrue; Buy,Take: do_acquire(noun,Floppy); do_assembly(); rtrue; ], e_to VideoVendor, w_to HarddriveVendor; ! Floppy object; viewable from inside FloppyVendor. ! This is one of the items you acquire to build the computer. Object Floppy "floppy drive" FloppyVendor with name "fd" "floppy" "floppy-drive"; !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! Object HarddriveVendor "hard drive vendor" ! This is a "room object" -- name things here that the Game Engine ! should say the user "doesn't need to refer to" as opposed to saying ! "there's no such thing": with name "vendor" "table", description "You are standing before the hard drive vendor. There are hard drives here ranging from 8.4Gb (smallish) to the latest 50Gb behemoths (oh, yeah!).^ To the north is the mouse vendor.^ To the south is the CD-ROM drive vendor.^ To the east is the floppy drive vendor.^ To the west is the mainboard vendor.", before [; Examine: do_examine(noun,Harddrive); rtrue; Buy,Take: do_acquire(noun,Harddrive); do_assembly(); rtrue; ], n_to MouseVendor, s_to CdromVendor, e_to FloppyVendor, w_to MainboardVendor; ! Harddrive object; viewable from inside HarddriveVendor. ! This is one of the items you acquire to build the computer. Object Harddrive "hard drive" HarddriveVendor with name "hd" "hard" "harddrive" "hard-drive"; !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! Object KeybrdVendor "keyboard vendor" ! This is a "room object" -- name things here that the Game Engine ! should say the user "doesn't need to refer to" as opposed to saying ! "there's no such thing": with name "vendor" "table", description "You are standing before the keyboard vendor. His table is lined with various keyboards--traditional, wireless, ergonomic, etc.^ To the west is the mouse vendor.", before [; Examine: do_examine(noun,Keybrd); rtrue; Buy,Take: do_acquire(noun,Keybrd); do_assembly(); rtrue; ], w_to MouseVendor; ! Keybrd object; viewable from inside KeybrdVendor. ! This is one of the items you acquire to build the computer. Object Keybrd "keyboard" KeybrdVendor with name "keyboard" "key" "kb"; !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! Object MainboardVendor "mainboard vendor" ! This is a "room object" -- name things here that the Game Engine ! should say the user "doesn't need to refer to" as opposed to saying ! "there's no such thing": with name "vendor" "table" "door", description "You are standing before the mainboard vendor. He's got stacks and stacks of mainboards: Pentium, PentiumII, and PentiumIII, most in either traditional or ATX form factor.^ To the east is the hard drive vendor.", before [; Examine: do_examine(noun,Mainboard); rtrue; Buy,Take: do_acquire(noun,Mainboard); do_assembly(); rtrue; ], e_to HarddriveVendor; ! Mainboard object; viewable from inside MainboardVendor. ! This is one of the items you acquire to build the computer. Object Mainboard "mainboard" MainboardVendor has container open with name "m/b" "mb" "mainboard" "main" "motherboard" "mother"; !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! Object ModemVendor "modem vendor" ! This is a "room object" -- name things here that the Game Engine ! should say the user "doesn't need to refer to" as opposed to saying ! "there's no such thing": with name "vendor" "table" "door", description "You are standing before the modem vendor. There are gobs of modems all over his table--analog, digital, ADSL, DSL, cable--you name it.^ To the south is the CPU vendor.^ To the east is the CD-ROM drive vendor.", before [; Examine: do_examine(noun,Modem); rtrue; Buy,Take: do_acquire(noun,Modem); do_assembly(); rtrue; ], s_to CpuVendor, e_to CdromVendor; ! Modem object; viewable from inside ModemVendor. ! This is one of the items you acquire to build the computer. Object Modem "modem" ModemVendor with name "modem"; !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! Object MonitorVendor "monitor vendor" ! This is a "room object" -- name things here that the Game Engine ! should say the user "doesn't need to refer to" as opposed to saying ! "there's no such thing": with name "vendor" "table", description "You are standing before the monitor vendor. There are several monitors of various sizes on display here.^ To the north is the sound card vendor.^ To the south is the speaker vendor.^ To the west is the computer case vendor.", before [; Examine: do_examine(noun,Monitor); rtrue; Buy,Take: do_acquire(noun,Monitor); do_assembly(); rtrue; ], n_to SoundVendor, s_to SpeakerVendor, w_to CaseVendor; ! Monitor object; viewable from inside MonitorVendor. ! This is one of the items you acquire to build the computer. Object Monitor "monitor" MonitorVendor has container open with name "monitor" "screen" "crt" "tube"; !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! Object MouseVendor "mouse vendor" ! This is a "room object" -- name things here that the Game Engine ! should say the user "doesn't need to refer to" as opposed to saying ! "there's no such thing": with name "vendor" "table" "door", description "You are standing before the mouse vendor. There's a healthy brood of rodents crawling all over this table.^ To the south is the hard drive vendor.^ To the east is the keyboard vendor.", before [; Examine: do_examine(noun,Mouse); rtrue; Buy,Take: do_acquire(noun,Mouse); do_assembly(); rtrue; ], s_to HarddriveVendor, e_to KeybrdVendor; ! Mouse object; viewable from inside MouseVendor. ! This is one of the items you acquire to build the computer. Object Mouse "mouse" MouseVendor with name "mouse" "rat" "rodent"; !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! Object RamVendor "RAM vendor" ! This is a "room object" -- name things here that the Game Engine ! should say the user "doesn't need to refer to" as opposed to saying ! "there's no such thing": with name "vendor" "table" "door", description "You are standing before the RAM vendor. His table is covered with a plethora of RAM modules.^ To the east, behind you, is the door to the parking lot.^ To the west is the sound card vendor.", before [; Examine: do_examine(noun,Ram); rtrue; Buy,Take: do_acquire(noun,Ram); do_assembly(); rtrue; Map: do_map(); rtrue; ], e_to Building, w_to SoundVendor; ! Ram object; viewable from inside RamVendor. ! This is one of the items you acquire to build the computer. Object Ram "RAM module" RamVendor with name "ram" "module" "memory"; !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! Object SoundVendor "Sound card vendor" ! This is a "room object" -- name things here that the Game Engine ! should say the user "doesn't need to refer to" as opposed to saying ! "there's no such thing": with name "vendor" "table", description "You are standing before the sound card vendor. His table is overflowing with various sound cards.^ To the south is the monitor vendor.^ To the east is the RAM vendor.^ To the west is the CD-ROM drive vendor.", before [; Examine: do_examine(noun,Sound); rtrue; Buy,Take: do_acquire(noun,Sound); do_assembly(); rtrue; ], s_to MonitorVendor, e_to RamVendor, w_to CdromVendor; ! Sound object; viewable from inside SoundVendor. ! This is one of the items you acquire to build the computer. Object Sound "sound card" SoundVendor with name "sound" "audio" "card"; !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! Object SpeakerVendor "speaker vendor" ! This is a "room object" -- name things here that the Game Engine ! should say the user "doesn't need to refer to" as opposed to saying ! "there's no such thing": with name "vendor" "table", description "You are standing before the speaker vendor. There are several types and wattages of speaker sets here.^ To the north is the monitor vendor.", before [; Examine: do_examine(noun,Speakers); rtrue; Buy,Take: do_acquire(noun,Speakers); do_assembly(); rtrue; ], n_to MonitorVendor; ! Speakers object; viewable from inside SpeakerVendor. ! This is one of the items you acquire to build the computer. Object Speakers "pair of speakers" SpeakerVendor with name "speaker" "pair" "speakers"; !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !! Object VideoVendor "video card vendor" ! This is a "room object" -- name things here that the Game Engine ! should say the user "doesn't need to refer to" as opposed to saying ! "there's no such thing": with name "vendor" "table" "door", description "You are standing before the video card vendor. His table has buttloads of 2D and 3D video cards, ranging from 4Mb to 32Mb of RAM on each.^ To the west is the floppy drive vendor.", before [; Examine: do_examine(noun,Video); rtrue; Buy,Take: do_acquire(noun,Video); do_assembly(); rtrue; ], w_to FloppyVendor; ! Video object; viewable from inside VideoVendor. ! This is one of the items you acquire to build the computer. Object Video "video card" VideoVendor with name "vid" "video" "2d" "3d"; !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!