XIII
Class XIIIDocuments

source: C:\XIII\XIII\Classes\XIIIDocuments.uc
Core.Object
   |
   +--Engine.Actor
      |
      +--Engine.Inventory
         |
         +--Engine.Powerups
            |
            +--XIII.XIIIDocuments
Direct Known Subclasses:SkillDocument

class XIIIDocuments
extends Engine.Powerups

//----------------------------------------------------------- // Docs on the Twenties. //-----------------------------------------------------------
Variables
 name EventCausedOnPick


Function Summary
 void GiveTo(Pawn Other)
     
//_____________________________________________________________________________
// Give this inventory item to a pawn.
 void PickupFunction(Pawn Other)
     
//_____________________________________________________________________________
// documents don't go into selected slot
 void Transfer(Pawn Other)
     
//_____________________________________________________________________________
// Transfer this inventory to Player (for SearchCorpse)



Source Code


00001	//-----------------------------------------------------------
00002	// Docs on the Twenties.
00003	//-----------------------------------------------------------
00004	class XIIIDocuments extends Powerups;
00005	
00006	var name EventCausedOnPick;
00007	
00008	//_____________________________________________________________________________
00009	// documents don't go into selected slot
00010	function PickupFunction(Pawn Other)
00011	{
00012	    Super.PickupFunction(Other);
00013	}
00014	
00015	//_____________________________________________________________________________
00016	// Give this inventory item to a pawn.
00017	function GiveTo( pawn Other )
00018	{
00019	//    Log("GIVETO (inventory)"@self@"to"@Other);
00020	
00021		// cause event on pick
00022		if (EventCausedOnPick != 'none' )
00023	        TriggerEvent(EventCausedOnPick,none,none );
00024	
00025		Super.GiveTo( Other );
00026	}
00027	
00028	//_____________________________________________________________________________
00029	// Transfer this inventory to Player (for SearchCorpse)
00030	function Transfer( pawn Other )
00031	{
00032	
00033	//    Log("TRANSFER (inventory)"@self@"to"@Other);
00034		if ( Instigator != none )
00035		{
00036			DetachFromPawn(Instigator);
00037			Instigator.DeleteInventory(self);
00038		}
00039	
00040		if ( PickupClass != none )
00041		{
00042			Other.PlaySound(PickupClass.default.PickupSound);
00043			Other.ReceiveLocalizedMessage( PickupClass.default.MessageClass, 0, None, None, PickupClass );
00044		}
00045	
00046		GiveTo(Other);
00047	
00048	}
00049	
00050	
00051	
00052	
00053	defaultproperties
00054	{
00055	     PickupClassName="XIII.XIIIDocumentPick"
00056	     Charge=1
00057	     ItemName="DOCUMENT"
00058	     bTravel=False
00059	}

End Source Code