mGm_Lizard

mGmTrans.uc

Jul 30th, 2015
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. class mGmTrans extends Mutator
  2.     config(mGmTrans);
  3.  
  4. function bool CheckReplacement( Actor Other, out byte bSuperRelevant )
  5. {
  6.     local int i;
  7.     local WeaponLocker L;
  8.  
  9.     bSuperRelevant = 0;
  10.  
  11.     if ( xWeaponBase(Other) != None )
  12.     {
  13.         if ( string( xWeaponBase(Other).WeaponType ) ~= "XWeapons.TransLauncher" )
  14.         {
  15.             xWeaponBase(Other).WeaponType = class'mGmTransLauncher';
  16.             return false;
  17.         }
  18.     }
  19.     else if ( WeaponPickup(Other) != None )
  20.     {
  21.         if ( string(Other.Class) ~= "XWeapons.Transpickup" )
  22.         {
  23.             ReplaceWith( Other, "mGmTransPickup" );
  24.             return false;
  25.         }
  26.     }
  27.     else if ( WeaponLocker(Other) != None )
  28.     {
  29.         L = WeaponLocker(Other);
  30.  
  31.         for (i = 0; i < L.Weapons.Length; i++)
  32.         {
  33.             if ( string( L.Weapons[i].WeaponClass ) ~= "XWeapons.TransLauncher" )
  34.                 L.Weapons[i].WeaponClass = class'mGmTransLauncher';
  35.         }
  36.     }
  37.  
  38.     return true;
  39. }
  40.  
  41. function string GetInventoryClassOverride(string InventoryClassName)
  42. {
  43.     if (InventoryClassName == "XWeapons.TransLauncher")
  44.         InventoryClassName = "mGmTrans.mGmTransLauncher";
  45.  
  46.     return Super.GetInventoryClassOverride(InventoryClassName);
  47. }
  48.  
  49. defaultproperties
  50. {
  51.      GroupName="Daschinia's Modified Translocator"
  52.      FriendlyName="mGmTrans"
  53.      Description="Makes the translocator beacons explode for fun and giggles."
  54. }
Advertisement
Add Comment
Please, Sign In to add comment