1//************************************************************************** 2//** 3//** ## ## ## ## ## #### #### ### ### 4//** ## ## ## ## ## ## ## ## ## ## #### #### 5//** ## ## ## ## ## ## ## ## ## ## ## ## ## ## 6//** ## ## ######## ## ## ## ## ## ## ## ### ## 7//** ### ## ## ### ## ## ## ## ## ## 8//** # ## ## # #### #### ## ## 9//** 10//** $Id: FakeInventory.vc 2976 2008-01-03 16:27:08Z dj_jl $ 11//** 12//** Copyright (C) 1999-2006 Jānis Legzdiņš 13//** 14//** This program is free software; you can redistribute it and/or 15//** modify it under the terms of the GNU General Public License 16//** as published by the Free Software Foundation; either version 2 17//** of the License, or (at your option) any later version. 18//** 19//** This program is distributed in the hope that it will be useful, 20//** but WITHOUT ANY WARRANTY; without even the implied warranty of 21//** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 22//** GNU General Public License for more details. 23//** 24//************************************************************************** 25//** 26//** Base class for old style DECORATE pickups. It just executes the 27//** attached special. 28//** 29//************************************************************************** 30 31class FakeInventory : Inventory; 32 33bool bRespawns; 34 35//========================================================================== 36// 37// ShouldRespawn 38// 39//========================================================================== 40 41bool ShouldRespawn() 42{ 43 return bRespawns && ::ShouldRespawn(); 44} 45 46//========================================================================== 47// 48// TryPickup 49// 50//========================================================================== 51 52bool TryPickup(EntityEx Toucher) 53{ 54 bool Result = Level.ExecuteActionSpecial(Special, Args[0], Args[1], 55 Args[2], Args[3], Args[4], NULL, 0, Toucher); 56 if (Result) 57 { 58 GoAwayAndDie(); 59 } 60 return Result; 61} 62 63//========================================================================== 64// 65// DoPickupSpecial 66// 67//========================================================================== 68 69void DoPickupSpecial(EntityEx Toucher) 70{ 71 // TryPickup already executed special. 72} 73 74defaultproperties 75{ 76} 77