Example #1
0
 public override void OnDisable()
 {
     if (autoUnlimitedAmmo.Value)
     {
         UnlimitedAmmo unlimitedAmmo = (UnlimitedAmmo)Main.ModuleManager.GetModule("UnlimitedAmmo");
         if (Main.ModuleManager.IsModuleActive(unlimitedAmmo))
         {
             Main.ModuleManager.Toggle(unlimitedAmmo);
         }
     }
 }
Example #2
0
 public override void OnUpdate()
 {
     selectionScript = (SelectionScript)GameObject.Find("WeaponAnimator").GetComponent(typeof(SelectionScript));
     GiveKeys();
     GiveAllWeapons();
     if (mode.Selected == "AUTO" && autoUnlimitedAmmo.Value)
     {
         UnlimitedAmmo unlimitedAmmo = (UnlimitedAmmo)Main.ModuleManager.GetModule("UnlimitedAmmo");
         if (!Main.ModuleManager.IsModuleActive(unlimitedAmmo))
         {
             Main.ModuleManager.Toggle(unlimitedAmmo);
         }
     }
     if (mode.Selected == "SINGLE")
     {
         Main.ModuleManager.Toggle(this);
     }
 }