/* TechCenter.m Class definition. Copyright (C) 1995 David Flater. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ #include "cheezmud.h" @implementation TechCenter + new { self=[super new]; [self describe: "techcenter": "Tech Center": "Tech Center": "This strange place is unlike anything you have ever seen. There are several\n\ large boxes with glowing, moving pictures on one side that are babbling\n\ nonsense and making strange noises. There are other boxes that have various\n\ kinds of long, thin ropes hitched to them for no apparent reason. You feel\n\ uneasy; this place is infested with evil spirits! The floor consists of\n\ removable tiles; you could go down under the floor if you wanted to. The\n\ exit is to the north."]; [[Idiot new] setlocation: self]; [[Idiot new] setlocation: self]; [[Radio new] setlocation: self]; [[Radio new] setlocation: self]; return self; } - (void) heartbeat { int i,m,Idiotcount; if (++beatcount < 1200) return; Idiotcount = beatcount = 0; for(i=0,m=[contents size];i<m;i++) { id whatever = [contents at:i]; if ([whatever isKindOf: [Idiot class]]) Idiotcount++; } if (Idiotcount < 2) { [self echo: "Some idiot walks in and changes the channel on one of the televisions."]; [[Idiot new] setlocation: self]; } } @end