예제 #1
0
 private void CharacterBody_Update(On.RoR2.CharacterBody.orig_Update orig, CharacterBody self)
 {
     orig(self);
     if (self.hasAuthority && self.isPlayerControlled &&
         !LocalUserManager.readOnlyLocalUsersList[0].isUIFocused)
     {
         if (Input.GetKey(keyToDrop) && self.inventory?.currentEquipmentIndex == RoR2Content.Equipment.Fruit.equipmentIndex)
         {
             self.AddTimedBuffAuthority(modifierKeyBuff.buffIndex, 0.5f);
         }
     }
 }
예제 #2
0
 private void CharacterBody_Update(On.RoR2.CharacterBody.orig_Update orig, CharacterBody self)
 {
     orig(self);
     if (self.hasAuthority && self.isPlayerControlled && self.master &&
         !LocalUserManager.readOnlyLocalUsersList[0].isUIFocused &&
         Input.GetKeyDown(keyToDrop))
     {
         if (NetworkServer.active)
         {
             if (preventMoneyDrops)
             {
                 return;
             }
             ReleaseMoney(self.master);
         }
         else
         {
             self.AddTimedBuffAuthority(DoshContent.pendingDoshBuff.buffIndex, 1000000f);
         }
     }
 }