//************************************************************************** //** //** ## ## ## ## ## #### #### ### ### //** ## ## ## ## ## ## ## ## ## ## #### #### //** ## ## ## ## ## ## ## ## ## ## ## ## ## ## //** ## ## ######## ## ## ## ## ## ## ## ### ## //** ### ## ## ### ## ## ## ## ## ## //** # ## ## # #### #### ## ## //** //** $Id: Key.vc 2573 2007-08-04 12:48:32Z dj_jl $ //** //** Copyright (C) 1999-2006 Jānis Legzdiņš //** //** 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. //** //************************************************************************** class Key : Inventory abstract; //========================================================================== // // HandlePickup // //========================================================================== bool HandlePickup(Inventory Item) { if (Item.Class == Class) { // In sinle player keys are always picked up, even if you // already have one. if (!Level.Game.netgame) { Item.bPickupGood = true; } return true; } if (Inventory) { return Inventory.HandlePickup(Item); } return false; } //========================================================================== // // ShouldStay // //========================================================================== bool ShouldStay() { return Level.Game.netgame; } defaultproperties { PickupSound = 'misc/k_pkup'; }