RuneI
Class RuneOfPowerRefill

source: c:\runehov\RuneI\Classes\RuneOfPowerRefill.uc
Core.Object
   |
   +--Engine.Actor
      |
      +--Engine.Inventory
         |
         +--Engine.Pickup
            |
            +--RuneI.Runes
               |
               +--RuneI.RuneOfPowerRefill
Direct Known Subclasses:None

class RuneOfPowerRefill
extends RuneI.Runes

//============================================================================= // RuneOfPowerRefill. // Gives an amount of rune power //=============================================================================

Function Summary
 bool PawnWantsRune(Pawn Other)
 void PickupFunction(Pawn Other)



Source Code


00001	//=============================================================================
00002	// RuneOfPowerRefill.
00003	// Gives an amount of rune power
00004	//=============================================================================
00005	class RuneOfPowerRefill extends Runes;
00006	
00007	function PickupFunction(Pawn Other)
00008	{
00009		Other.RunePower += RunePower;
00010		if (Other.RunePower > Other.MaxPower)
00011			Other.RunePower = Other.MaxPower;
00012	
00013		// Cure eater of any ailments
00014		if(Other.Fatness != 128)
00015			Other.DesiredFatness = 128;
00016		if(Other.ScaleGlow != 1.0)
00017			Other.ScaleGlow = 1.0;
00018		if(Other.BodyPartMissing(BODYPART_LARM1))
00019			Other.RestoreBodyPart(BODYPART_LARM1);
00020		if(Other.BodyPartMissing(BODYPART_RARM1))
00021			Other.RestoreBodyPart(BODYPART_RARM1);
00022	
00023		Destroy();
00024	}
00025	
00026	function bool PawnWantsRune(Pawn Other)
00027	{// return whether the pawn should currently want this rune
00028		return (Other.RunePower < Other.MaxPower ||
00029				Other.BodyPartMissing(BODYPART_LARM1) ||
00030				Other.BodyPartMissing(BODYPART_RARM1));
00031	}
00032	
00033	defaultproperties
00034	{
00035	     RunePower=25.000000
00036	     SpheresClass=Class'RuneI.RuneSpheresPower2'
00037	     PickupMessage="You found a Rune of Lesser Power"
00038	     PickupSound=Sound'OtherSnd.Pickups.pickup11'
00039	     SoundRadius=21
00040	     SoundVolume=110
00041	     SoundPitch=88
00042	     AmbientSound=Sound'WeaponsSnd.PowerUps.power63L'
00043	     CollisionRadius=11.000000
00044	     CollisionHeight=10.000000
00045	     Skeletal=SkelModel'objects.Rune5'
00046	}

End Source Code