class NeoXMed expands MedBox;

#exec MESH IMPORT MESH=NeoXMed ANIVFILE=MODELS\NeoXMed_a.3d DATAFILE=MODELS\NeoXMed_d.3d X=0 Y=0 Z=0
#exec MESH LODPARAMS MESH=NeoXMed STRENGTH=0
#exec MESH ORIGIN MESH=NeoXMed X=0 Y=0 Z=0 YAW=64

#exec MESH SEQUENCE MESH=NeoXMed SEQ=All STARTFRAME=0 NUMFRAMES=1
#exec MESH SEQUENCE MESH=NeoXMed SEQ=Still STARTFRAME=0 NUMFRAMES=1

#exec MESHMAP NEW MESHMAP=NeoXMed MESH=NeoXMed
#exec MESHMAP SCALE MESHMAP=NeoXMed X=0.056 Y=0.056 Z=0.112

#exec TEXTURE IMPORT NAME=NeoXMedSkin FILE=SKINS\NeoXMedSkin.bmp GROUP=Skins FLAGS=2 LODSET=2
#exec MESHMAP SETTEXTURE MESHMAP=NeoXMed NUM=1 TEXTURE=NeoXMedSkin

#exec TEXTURE IMPORT NAME=Glass FILE=SKINS\Glass.bmp GROUP=Skins FLAGS=2 LODSET=2
#exec MESHMAP SETTEXTURE MESHMAP=NeoXMed NUM=2 TEXTURE=Glass

#exec MESHMAP SETTEXTURE MESHMAP=NeoXMed NUM=3 TEXTURE=KamiOverFX

#exec MESHMAP SETTEXTURE MESHMAP=NeoXMed NUM=4 TEXTURE=SuperElectric02

#exec TEXTURE IMPORT NAME=ShineMetalB FILE=SKINS\ShineMetalB.bmp GROUP=Skins FLAGS=2 LODSET=2


simulated function PostBeginPlay()
{
	Super.PostBeginPlay();

	if (Role == ROLE_Authority)
	{
		if (!Class'NWMutator'.default.bPickupsDynLight)
			LightType = LT_None;
	}
	LODBias = Class'NWMutator'.default.PickupsDistDetail * 8/255;
}

auto state Pickup
{	
	function Touch( actor Other )
	{
		local int HealMax;
		local Pawn P;
			
		if ( ValidTouch(Other) ) 
		{	
			P = Pawn(Other);

			if ((Level.Game.IsA('MonsterHunt') && Class'NWMutator'.Default.EnableMonsterHuntMode && Class'NWMutator'.Default.MonsterHuntOnly) || (Class'NWMutator'.Default.EnableMonsterHuntMode && !Class'NWMutator'.Default.MonsterHuntOnly))
			{
				if (Class'NwMutator'.Default.MaxHealth > 300)
					HealMax = Class'NwMutator'.Default.MaxHealth / 3;
				else
					HealMax = 100;

				if (P.Health < HealMax) 
				{
					if (Level.Game.LocalLog != None)
						Level.Game.LocalLog.LogPickup(Self, P);
					if (Level.Game.WorldLog != None)
						Level.Game.WorldLog.LogPickup(Self, P);
					P.Health += HealingAmount;
					if (P.Health > HealMax) P.Health = HealMax;
					PlayPickupMessage(P);
					PlaySound (PickupSound,,2.5);
					Other.MakeNoise(0.2);		
					SetRespawn();
				}
			}
			else
				Super.Touch(Other);
		}
	}
}

defaultproperties
{
	DrawType=DT_Mesh
	Mesh=NeoXMed
	Texture=ShineMetalB
	LightBrightness=100
	LightHue=0
	LightSaturation=0
	LightRadius=3
	LightType=LT_Steady
	HealingAmount=30
	ScaleGlow=2.000000
	PickupSound=NeoXVialSnd
	PickupMessage="You picked up a NeoX Health Pack +"
	PickupViewMesh=NeoXMed
}
