Overview | Package | Class | Source | Class tree | Glossary | Deus Ex UnrealScript Documentation |
previous class next class | frames no frames |
00001 00002 00003 00004 00005 00006 00007 00008 00009 00010 00011 00012 00013 00014 00015 00016 00017 00018 00019 00020 00021 00022 00023 00024 00025 00026 00027 00028 00029 00030 00031 00032 00033 00034 00035 00036 00037 00038 00039 00040 00041 00042 00043 00044 00045 00046 00047 00048 00049 00050 00051 00052 00053 00054 00055 00056 00057 00058 00059 00060 00061 00062 00063 00064 00065 00066 00067 00068 00069 00070 00071 00072 00073 00074 00075 00076 00077 00078 00079 00080 00081 00082 00083 00084 00085 00086 00087 00088 00089 00090 00091 00092 00093 00094 00095 00096 00097 00098 00099 00100 00101 00102 00103 00104 00105 00106 00107 00108 00109 00110 00111 00112 00113 00114 00115 00116 00117 00118 00119 00120 00121 00122 00123 00124 00125 00126 00127 00128 00129 00130 00131 00132 00133 00134 00135 00136 00137 00138 00139 00140 00141 00142 00143 00144 00145 00146 00147 00148 00149 00150 00151 00152 00153 00154 00155 00156 00157 00158 00159 00160 00161 00162 00163 00164 00165 00166 00167 00168 00169 00170 00171 00172 00173 00174 00175 00176 00177 00178 00179 00180 00181 00182 00183 00184 00185 00186 00187 00188 |
//============================================================================= // MedKit. //============================================================================= class MedKit extends DeusExPickup; // // Healing order is head, torso, legs, then arms (critical -> less critical) // var int healAmount; var bool bNoPrintMustBeUsed; var localized string MustBeUsedOn; simulated function PreBeginPlay() { Super.PreBeginPlay(); // If this is a netgame, then override defaults if ( Level.NetMode != NM_StandAlone ) MaxCopies = 5; } // ---------------------------------------------------------------------- state Activated { function Activate() { // can't turn it off } function BeginState() { local DeusExPlayer player; Super.BeginState(); player = DeusExPlayer(Owner); if (player != None) { player.HealPlayer(healAmount, True); // Medkits kill all status effects when used in multiplayer if ( player.Level.NetMode != NM_Standalone ) { player.StopPoison(); player.ExtinguishFire(); player.drugEffectTimer = 0; } } UseOnce(); } Begin: } // ---------------------------------------------------------------------- // UpdateInfo() // ---------------------------------------------------------------------- function bool UpdateInfo(Object winObject) { local PersonaInfoWindow winInfo; local DeusExPlayer player; local String outText; winInfo = PersonaInfoWindow(winObject); if (winInfo == None) return False; player = DeusExPlayer(Owner); if (player != None) { winInfo.SetTitle(itemName); winInfo.SetText(Description $ winInfo.CR() $ winInfo.CR()); if (!bNoPrintMustBeUsed) { winInfo.AppendText(winInfo.CR() $ MustBeUsedOn $ winInfo.CR()); } else { bNoPrintMustBeUsed = False; } // Print the number of copies outText = CountLabel @ String(NumCopies); winInfo.AppendText(winInfo.CR() $ outText); } return True; } // ---------------------------------------------------------------------- // NoPrintMustBeUsed() // ---------------------------------------------------------------------- function NoPrintMustBeUsed() { bNoPrintMustBeUsed = True; } // ---------------------------------------------------------------------- // GetHealAmount() // // Arms and legs get healing bonuses // ---------------------------------------------------------------------- function float GetHealAmount(int bodyPart, optional float pointsToHeal) { local float amt; if (pointsToHeal == 0) pointsToHeal = healAmount; // CNN - just make all body parts equal to avoid confusion return pointsToHeal; /* switch (bodyPart) { case 0: // head amt = pointsToHeal * 2; break; break; case 1: // torso amt = pointstoHeal; break; case 2: // right arm amt = pointsToHeal * 1.5; break; case 3: // left arm amt = pointsToHeal * 1.5; break; case 4: // right leg amt = pointsToHeal * 1.5; break; case 5: // left leg amt = pointsToHeal * 1.5; break; default: amt = pointstoHeal; } return amt;*/ } // ---------------------------------------------------------------------- // TestMPBeltSpot() // Returns true if the suggested belt location is ok for the object in mp. // ---------------------------------------------------------------------- simulated function bool TestMPBeltSpot(int BeltSpot) { return (BeltSpot == 9); } // ---------------------------------------------------------------------- // ---------------------------------------------------------------------- defaultproperties { healAmount=30 MustBeUsedOn="Use to heal critical body parts, or use on character screen to direct healing at a certain body part." maxCopies=15 bCanHaveMultipleCopies=True bActivatable=True ItemName="Medkit" PlayerViewOffset=(X=30.000000,Z=-12.000000) PlayerViewMesh=LodMesh'DeusExItems.MedKit' PickupViewMesh=LodMesh'DeusExItems.MedKit' ThirdPersonMesh=LodMesh'DeusExItems.MedKit3rd' LandSound=Sound'DeusExSounds.Generic.PlasticHit2' Icon=Texture'DeusExUI.Icons.BeltIconMedKit' largeIcon=Texture'DeusExUI.Icons.LargeIconMedKit' largeIconWidth=39 largeIconHeight=46 Description="A first-aid kit.|n|n<UNATCO OPS FILE NOTE JR095-VIOLET> The nanomachines of an augmented agent will automatically metabolize the contents of a medkit to efficiently heal damaged areas. An agent with medical training could greatly expedite this process. -- Jaime Reyes <END NOTE>" beltDescription="MEDKIT" Mesh=LodMesh'DeusExItems.MedKit' CollisionRadius=7.500000 CollisionHeight=1.000000 Mass=10.000000 Buoyancy=8.000000 } |
Overview | Package | Class | Source | Class tree | Glossary | Deus Ex UnrealScript Documentation |
previous class next class | frames no frames |